Loading...
Loading...
Generate an ARCHITECTURE.md file for a codebase following matklad's principles. Use when asked to "write an architecture doc", "create ARCHITECTURE.md", "document the architecture", "explain the codebase structure", "write a codemap", or when onboarding contributors to a project. Based on https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html and modeled after rust-analyzer's architecture doc.
npx skill4agent add caidanw/skills architecture-mdtreetree -L 2 -d# Architecture
[One paragraph: what this project does at the highest level. What problem it solves.]
## Bird's Eye View
[How data flows through the system at the coarsest level.
Input -> Processing stages -> Output.
Keep this to 1-3 paragraphs.]
## Code Map
[Brief intro: "This section describes the high-level structure of the codebase.
Pay attention to **Boundary** and **Invariant** callouts."]
### `path/to/module-a/`
[What this module does in 1-3 sentences. Key types: `ImportantType`, `AnotherType`.]
**Boundary:** [If this is an API boundary, say so and what it means.]
**Invariant:** [What's deliberately absent or enforced. E.g., "This module never does I/O"
or "Nothing here depends on the HTTP layer."]
### `path/to/module-b/`
[Repeat for each significant module.]
### `path/to/module-c/`
[...]
## Cross-Cutting Concerns
### Error Handling
[How errors are handled across the codebase. Is it Result-based? Exceptions?
Do errors propagate or get caught at boundaries?]
### Testing
[Testing strategy. Where do tests live? What kinds of tests exist?
What are the important test boundaries?]
### [Other concerns as applicable]
[Configuration, observability/logging, code generation, build system, etc.
Only include sections that are genuinely cross-cutting.]### \FooBarBazQux