📝 Doc Gate · Documentation Generator
Core principle
No documentation, no module.
Documentation is the module's identity card.
A module without one does not ship.
Automatic generation
Run the doc generation script (cross-platform):
# from the skill directory
node scripts/doc_generator.cjs <module-path>
node scripts/doc_generator.cjs <module-path> --force # overwrite existing docs
node scripts/doc_generator.cjs <module-path> --json # JSON output
What it generates
README.md skeleton
The generated README.md includes:
- Module name — extracted from the directory name
- Description — extracted from code docstrings (when present)
- Feature list — to fill in
- Dependencies — extracted from requirements.txt/pyproject.toml
- Usage — base template
- API overview — class and function list extracted from code
- Directory structure — generated by scanning
DESIGN.md skeleton
The generated DESIGN.md includes:
- Design overview — goals and non-goals template
- Architecture — architecture diagram placeholder
- Core components — class list extracted from code
- Design decisions — decision-record table template
- Technology choices — language and dependencies auto-detected
- Trade-offs — known limitations and tech-debt template
- Security considerations — threat model and mitigations template
- Cross-cutting concerns — security, privacy, observability, cost
- Open questions — the undecided points, and who decides each
- Change history — initial version entry
verify-module blocks delivery on this section list. Change the generator, this
list, and the verify-module checklist in the same
commit.
Analysis
Supported languages
| Language | Analysis capability |
|---|---|
| Python | Classes, functions, docstrings, dependencies |
| Go | Directory structure, dependencies |
| TypeScript | Directory structure, dependencies |
| Rust | Directory structure, dependencies |
| Other | Basic directory structure |
Extracted information
- Module name (directory name)
- Primary language
- Code file list
- Class and function definitions (Python)
- Docstrings (Python)
- Dependency list
- Entry-point files
Auto-trigger moments
| Scenario | Trigger |
|---|---|
| New module | When module creation starts |
| Missing docs | When a module without docs is detected |
Workflow
1. Run doc_generator.cjs to generate the skeletons
2. Fill in the TODO-marked content
3. Add design decisions and their rationale
4. Add usage examples
5. Run /verify-module to check completeness
Post-generation checklist
README.md
- Fill in the module description
- Complete the feature list
- Add usage examples
- Confirm dependencies are complete
DESIGN.md
- State the design goals
- Record design decisions
- Justify technology choices
- List known limitations