Documentation Generator
Turns your codebase analysis into a docs bundle — README, API reference, architecture diagrams, component docs. Output lands in docs/generated/.
Output
Section titled “Output”| Artifact | Content |
|---|---|
README.md | Project overview, tech stack, setup, architecture summary |
| API documentation | Endpoints with methods, parameters, responses, examples |
| Architecture diagrams | Mermaid or PlantUML — component relationships |
| Component documentation | Per-component docs — props, methods, usage examples |
| Navigation index | Table of contents linking generated docs |
Running
Section titled “Running”CodeBuddy: Generate DocumentationProgress notification tracks phases:
| % | Phase |
|---|---|
| 0 | Analyzing codebase |
| 20 | Extracting API endpoints |
| 40 | Analyzing architecture |
| 60 | Generating README |
| 70 | Generating API documentation |
| 80 | Creating architecture diagrams |
| 90 | Generating component documentation |
| 95 | Creating navigation index |
Config
Section titled “Config”DocumentationConfig:
| Option | Default | Values |
|---|---|---|
includeArchitecture | true | Generate architecture section |
includeAPI | true | Generate API reference |
includeUsage | true | Generate README/usage docs |
includeContributing | true | Generate contributing guide |
includeLicense | true | Include license info |
outputFormat | "markdown" | markdown / html / both |
diagramFormat | "mermaid" | mermaid / plantuml / ascii |
What it extracts
Section titled “What it extracts”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
Powered by codebase analysis
Section titled “Powered by codebase analysis”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.).
Related
Section titled “Related”- Codebase analysis — the analysis this generator consumes
- Architecture concept — where this fits in the overall picture