Generate a map linking modules to their governing ADRs and architecture documents. Scans all modules via CLAUDE.md discovery, cross-references ADRs and architecture docs, and classifies governance coverage as Full, Partial, or None.
How this skill is triggered — by the user, by Claude, or both
Slash command
/principled-architecture:arch-mapThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a map between code modules and their governing ADRs and architecture documents. The foundational skill for architecture governance.
Generate a map between code modules and their governing ADRs and architecture documents. The foundational skill for architecture governance.
/arch-map [--module <path>] [--output <path>]
| Argument | Required | Description |
|---|---|---|
--module <path> | No | Scope the map to a single module. Maps all modules if omitted. |
--output <path> | No | Write the map to a file. Prints to output if omitted. |
Scan modules. Discover all modules by finding CLAUDE.md files:
bash scripts/scan-modules.sh [--module <path>]
This outputs tab-separated lines: <module-path>\t<module-type>\t<module-name>.
Read all ADRs. List and read each file in docs/decisions/:
accepted ADRs for governance mapping)Read all architecture docs. List and read each file in docs/architecture/:
Cross-reference. For each module:
Render the map. Read the template from templates/arch-map.md and fill in:
{{DATE}} --- current date (YYYY-MM-DD){{MODULE_COUNT}} --- total modules scanned{{MODULES}} --- rendered module sections (see format below){{FULL_COUNT}}, {{PARTIAL_COUNT}}, {{NONE_COUNT}} --- coverage countsEach module section follows this format:
## Module: <path> (<type>)
### Governing ADRs
- **ADR-NNN**: <title> --- Affects: <brief scope description>
### Architecture Docs
- [<title>](path) --- Referenced in: <section or "body">
### Coverage: <Full|Partial|None>
If a module has no governing ADRs, show - _(none)_.
If a module has no architecture doc references, show - _(none)_.
Output results. If --output is specified, write the map to that file. Otherwise, display the rendered map. Report a summary:
Architecture map generated:
Modules: 12
Full coverage: 5
Partial coverage: 4
No coverage: 3
scripts/scan-modules.sh --- Discover modules via CLAUDE.md and parse module typetemplates/arch-map.md --- Architecture map template with placeholder variables for date, module sections, and coverage countsnpx claudepluginhub alexnodeland/principled --plugin principled-architectureMaintains architecture.yml with module metadata (path, role, stability) for AI-first repos. Drafts structured answers from directory walk + AGENTS.md; user confirms role/stability.
Builds and maintains ARCHITECTURE.md and DETAILED_DESIGN.md incrementally with coverage tracking. Principal mode analyzes vision, bottlenecks, gaps, and alternatives.