| name | codebase-documentation |
| description | Use when generating or maintaining codebase documentation. Divio framework. |
| version | 1.0.0 |
| tags | ["docs","authoring"] |
Codebase Documentation
When to Use
∀ codebase analysis tasks. ∀ documentation tasks.
Divio Framework
| Type | Purpose | Audience | Style |
|---|
| Tutorial | Learning-oriented | New dev | Step-by-step, "do this, then this" |
| How-to | Task-oriented | Working dev | "To achieve X, do Y" |
| Reference | Information-oriented | Any dev | Accurate, complete, terse |
| Explanation | Understanding-oriented | Curious dev | Discursive, "why" focused |
Documentation Outputs
| File | Focus | Content |
|---|
| STACK.md | Technology | Languages, frameworks, tools, versions, rationale |
| ARCHITECTURE.md | Structure | Patterns, layers, boundaries, data flow |
| CONCERNS.md | Cross-cutting | Tech debt, security, fragile areas, missing coverage |
| CONVENTIONS.md | Standards | Naming, file structure, commit format, review process |
Process
- Read focus from prompt (tech/arch/concerns/conventions)
- Glob -> relevant files (targeted)
- Grep -> patterns (imports, TODOs, configs)
- Read key files -> write to
project docs directory (e.g., docs/)
- Report brief confirmation
Anti-Patterns
- Speculating about code behavior (¬verified -> say "¬ found")
- Including implementation details that change frequently
- Duplicating what's ∈ README.md
- Writing prose when tables suffice
Rules
- Reference style for generated docs (terse, accurate)
- ∀ secrets: ¬read ∧ ¬quote
- ∀ paths: backtick format
- ∀ doc: <= 200 lines
- Include "last generated" timestamp