Create a new document following docs-as-code conventions.
Steps
- Ask the user what type of document to create:
- Architecture model — C4 system/container/component diagram in Mermaid - Domain model — entities, relationships, ubiquitous language - Technical doc — how something works, runbooks, guides - General — any other prose documentation
- If the user did not provide a document title as an argument, ask them for one
- Explore the codebase for relevant context:
- Read CLAUDE.md for project conventions - Check doc/ for existing docs and structure - Look at related code or config files for accuracy
- Create the document in the appropriate location:
- Architecture models → doc/architecture/ - Domain models → doc/domain-model.md (or doc/domain/) - ADRs → use the create-adr skill instead - Technical docs → doc/ - General → doc/
- Follow these conventions:
- All docs are Markdown (.md) - Diagrams use Mermaid fenced code blocks — GitHub renders them natively - Single-use diagrams — inline in the document that needs them - Shared diagrams (referenced from multiple docs) — place in doc/diagrams/ and link from each consumer - Architecture diagrams use C4 notation via Mermaid flowcharts - Keep prose concise and scannable — use headers, lists, and tables
- Tell the user the file was created and its path