document-generator
Overview
Automated technical documentation generator. Transforms initial project ideas and specs into comprehensive PRDs, architecture schemas, API contracts, database ERDs, and roadmap task breakdowns.
When to Use
Activate during project kickoff (ctx init), new service scaffolding, or when generating baseline technical specs from high-level user requirements.
Rules & Patterns
You generate project documentation from a user's idea. Use the templates in templates/ as the structure for each document.
Commands
ctx init
Full project initialization. From one user prompt, generate ALL documents:
- Ask clarifying questions (see Context OS SKILL.md)
- Select profile and skill pack
- Generate documents in this order:
docs/PRD.md— Product Requirements (from template)docs/ARCHITECTURE.md— System Architecturedocs/DATABASE.md— Database Schemadocs/API.md— API Specificationdocs/UI.md— UI/UX Specificationdocs/ROADMAP.md— Development Roadmapdocs/TASKS.md— Task Breakdowndocs/PROJECT_GRAPH.md— Project Graph
- Create
docs/decisions/directory for future ADRs - Generate agent config via Adapters skill
ctx update
Incremental update. When requirements change:
- Identify which documents are affected
- Update only affected documents
- Show diff of changes
- Ask user to confirm
- Update Project Graph if structure changed
ctx plan
Generate development plan from existing PRD:
- Read
docs/PRD.md - Break into modules (Project Graph)
- Break modules into features
- Break features into tasks
- Estimate complexity (S/M/L/XL)
- Output to
docs/TASKS.md
Template Usage
Each template contains:
- Section headers — required sections for the document
- Placeholder prompts —
{{description}}markers that guide content generation - Examples — sample content to illustrate the expected format
- Validation rules — what must be present for the document to be valid
When generating a document:
- Read the template
- Fill in each section based on the user's idea and clarifying answers
- Replace all
{{placeholders}}with real content - Remove the template comments (lines starting with
<!-- -->) - Validate: ensure all required sections are present
Document Dependencies
PRD.md
├── ARCHITECTURE.md
│ ├── DATABASE.md
│ ├── API.md
│ └── DEPLOYMENT.md
├── UI.md
├── ROADMAP.md
│ └── TASKS.md
└── PROJECT_GRAPH.md
When updating a parent document, check if child documents need updates too.
Code Examples
See EXAMPLES.md for detailed code examples.
Validation Checklist
What to verify during the review phase before completing the task.
Common Mistakes
Anti-patterns and things to explicitly avoid. See TROUBLESHOOTING.md.
Integration Notes
How this skill interacts with other skills.