analyze-requirements
Produce provenance-tagged architecture documentation with interactive diagrams, served on localhost for review.
Hard rules
- Every fact carries provenance:
observed|stated|researched(with source) |proposed. A claim nobody verified must never render like one that was. - One home per fact — diagrams own topology, tables own properties, prose owns neither.
- Unknowns render as honest absences (
Not applicable — <reason>,not estimated,Not provided) — never placeholders, never[TODO], never0. - Validation blocks rendering:
node scripts/validate.mjsmust exit 0 before the viewer is generated. - mattpocock files (
CONTEXT.md,CONTEXT-MAP.md,docs/adr/) are written into their existing formats — never restructured. Invoke thedomain-modelingskill for term work.
Flow
- Detect mode: target has source code → brownfield, else greenfield. State the detection and let the user override.
- Scan (brownfield):
index_repositoryif needed, thenget_architecture— clusters seed §6 Core Components. Readmanage_adrif present; never write it. - Interview: follow
references/interview.md. Detect project type perreferences/project-types.md. - Research: run
workflows/research.jsperreferences/research.md. Surface dropped items before writing. - Write: model first (
references/likec4.md), then ARCHITECTURE.md and companions (references/writing.md). - Validate: export the model with
node scripts/likec4-export.mjs --dir ... --out ..., thennode scripts/validate.mjs --arch ... --model ...(add--mode brownfield --clusters ...when applicable). Fix findings; re-run until clean. - Render + serve: follow
references/viewer.md; report the URL.
Dependency
Node ≥ 20 with npm (npx likec4). State this upfront; without it, stop before step 5.