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.mdfor project conventions - Check
doc/for existing docs and structure - Look at related code or config files for accuracy
- Read
-
Create the document in the appropriate location:
- Architecture models →
doc/architecture/ - Domain models →
doc/domain-model.md(ordoc/domain/) - ADRs → use the
create-adrskill instead - Technical docs →
doc/ - General →
doc/
- Architecture models →
-
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
- All docs are Markdown (
-
Tell the user the file was created and its path