/theway:document
Write architecture docs for the project in docs/architecture/
Three documents come from the templates in <home>/templates/; others are added as the project needs them.
Usage
/theway:documentExample
On my-api:
/theway:documentDocumented my-api in docs/architecture/:
- coding-standards.md: ESM, no dependencies, JSON error bodies, node --test with injected clocks.
- source-tree.md: src/app.js (routes, rate-limit guard), src/rate-limit.js, test/.
- tech-stack.md: Node, node:http, no framework, single instance with no proxy.Steps
-
Reads the standards that
theway context documentlists: the enabled standards, shipped opt-in or yours; each applies to every phase unless itsapplies_tonarrows it (see Configuration). -
Generates each document from its template, following the template's frontmatter instructions. An existing file is overwritten.
<home>is the foldertheway pathprints,~/.thewayby default.Template Output <home>/templates/coding-standards-template.mdcoding-standards.md<home>/templates/source-tree-template.mdsource-tree.md<home>/templates/tech-stack-template.mdtech-stack.md -
Adds other documentation as needed: system overviews, backend design and API contracts, frontend patterns, infrastructure and deployment, and architecture decision records.
The documents stay short and favor code examples over explanations.
Output
docs/architecture/
├── coding-standards.md # project coding conventions
├── source-tree.md # repository structure
└── tech-stack.md # technology choices/theway:workflow reads docs/architecture/coding-standards.md when it exists.