Skip to content

Documentation Generator

Turns your codebase analysis into a docs bundle — README, API reference, architecture diagrams, component docs. Output lands in docs/generated/.

ArtifactContent
README.mdProject overview, tech stack, setup, architecture summary
API documentationEndpoints with methods, parameters, responses, examples
Architecture diagramsMermaid or PlantUML — component relationships
Component documentationPer-component docs — props, methods, usage examples
Navigation indexTable of contents linking generated docs
CodeBuddy: Generate Documentation

Progress notification tracks phases:

%Phase
0Analyzing codebase
20Extracting API endpoints
40Analyzing architecture
60Generating README
70Generating API documentation
80Creating architecture diagrams
90Generating component documentation
95Creating navigation index

DocumentationConfig:

OptionDefaultValues
includeArchitecturetrueGenerate architecture section
includeAPItrueGenerate API reference
includeUsagetrueGenerate README/usage docs
includeContributingtrueGenerate contributing guide
includeLicensetrueInclude license info
outputFormat"markdown"markdown / html / both
diagramFormat"mermaid"mermaid / plantuml / ascii

API endpoints — per route:

  • HTTP method + path
  • Description from JSDoc/docstrings
  • Parameters (type, required, description)
  • Response status codes + schemas
  • Usage examples

Architecture:

  • Overview — high-level project description
  • Main components — services, controllers, models with types
  • Data flow — how data moves through the system
  • Dependencies — external packages with version + purpose
  • Patterns — detected design patterns (singleton, factory, observer, etc.)
  • Diagram — visual representation of relationships

Component docs — per component / service / class / function:

  • Name + type classification
  • Description from comments / docstrings
  • Props (for UI components) with types + required flags
  • Methods with parameters + return types + descriptions
  • Usage code

Uses CodebaseUnderstandingService — same service that backs CodeBuddy: Analyze Codebase. Benefits from cached analysis results (no duplicate work), pattern extraction across the workspace, and framework-aware detection (React, Express, FastAPI, etc.).