| name | update-design |
| description | Review or update repository design documents, compare them with the actual codebase, and surface concrete gaps before implementation proceeds. Use when working on docs/design, ADRs, architecture notes, or when a plan depends on design quality. |
update-design
Review design documents against the current repository state and improve them before implementation depends on them.
Phase 1: Gather Context
Read only what is relevant:
docs/design/*.md, docs/adr/*.md, and architecture notes under docs/
docs/development-memo.md when present
- the source directories touched by the design
- build manifests and CI workflows that constrain implementation
AGENTS.md
If design docs do not exist, report that first and switch to proposing a minimal design outline derived from the current memo and README.
Phase 2: Evaluate the Design
Score each relevant document across these categories:
- module and ownership boundaries
- data flow and control flow
- interfaces, types, and configuration surface
- failure modes, validation, and observability
- testing and rollout strategy
Use a 100-point scale. Treat 90+ as ready for implementation.
Phase 3: Check Against the Code
Confirm whether the design matches reality:
- documented modules exist
- names and paths match the codebase
- described behaviors are implemented or clearly marked as planned
- validation steps match the actual tooling
Call out both directions:
- documented but not implemented
- implemented but undocumented
Phase 4: Produce Improvements
Return a concise report in this shape:
## Design Review
### <document>
| Category | Score |
|---|---:|
| Module boundaries | XX |
| Data flow | XX |
| Interfaces | XX |
| Failure modes | XX |
| Testing and rollout | XX |
Average: XX.X
Issues:
- ...
Recommended edits:
- ...
Code mismatch:
- ...
Editing Rules
- keep design docs implementation-oriented
- prefer concrete file paths, types, commands, and invariants
- do not restate obvious code when a short reference is enough
- if a design decision matters later, suggest an ADR under
docs/adr/