design-review-gate — Claude Code rule: what it does and install
design-review-gate audits draft architectures before generating design.md. It links requirement IDs to concrete components and prevents speculative interfaces.
MIT ★ 3,774 updated 2026-10-22
.claude/rules/design-review-gate.mdWhat design-review-gate does
This rule adds a quality gate to the specification workflow. It begins with mechanical checks: every numeric ID from requirements.md must link to an actual component or data model. The file structure plan cannot contain placeholder text like "TBD", and every mentioned module must map to a defined file path.
The review blocks speculative abstraction. Any component or adapter designed for hypothetical future scope must be stripped out. Decisions regarding external dependencies, runtime prerequisites, and concurrency boundaries must be declared clearly so implementation tasks can proceed without hidden prerequisites.
The review-and-repair loop has a hard limit of two passes. If issues stem from missing or contradictory requirements, the model must halt and escalate back to the requirements phase rather than inventing architectural details.
What it helps with
- map numeric requirement IDs to components and state transitions
- catch orphan components missing explicit file paths
- strip speculative abstractions created for unconfirmed scope
- halt architecture work when source requirements conflict
Example prompts for the agent
- Review the architectural draft before writing
design.md - Run mechanical traceability checks against
requirements.md
How to install design-review-gate
Manually: put the files in place
.claude/rules/design-review-gate.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/design-review-gate.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/design-review-gate.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/design-review-gate.mdManually: put the files in place
.clinerules/design-review-gate.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about design-review-gate
How to install design-review-gate in Claude Code?
Save the rule file to .claude/rules/design-review-gate.md. The assistant will automatically enforce the review gate before finalizing design documents.
What does design-review-gate do?
It verifies that every numeric requirement maps to code structure, cleans out placeholder text, and confirms architecture readiness before tasks are created.
How many repair passes does the gate permit?
It enforces a maximum of two review-and-repair cycles. If ambiguities persist after two attempts, the model stops and requests updated requirements.
Source text
design-review-gate.md · MIT
# Design Review Gate Before writing `design.md`, review the draft design and repair local issues until the design passes or a true spec gap is discovered. ## Requirements Coverage Review - Every numeric requirement ID from `requirements.md` must appear in the design traceability mapping and be backed by one or more concrete components, contracts, flows, data models, or operational decisions. - Every requirement that introduces an external dependency, integration point, runtime prerequisite, migration concern, observability need, security constraint, or performance target must be reflected explicitly in `design.md`. - If coverage is missing because the design draft is incomplete, repair the draft and review again. - If coverage cannot be completed cleanly because requirements are ambiguous, contradictory, or underspecified, stop and return to the requirements phase instead of inventing design detail. ## Architecture Readiness Review - Component boundaries must be explicit enough that implementation tasks can be assigned without guessing ownership. - Interfaces, contracts, state transitions, and integration boundaries must be concrete enough for implementation and validation. - Build-vs-adopt decisions that materially affect architecture must be captured in `design.md`, with deeper investigation left in `research.md` when present. - Runtime prerequisites, migrations, rollout constraints, validation hooks, and failure modes must be surfaced when they materially affect implementation order or risk. ## Executability Review - The design must be implementable as a sequence of bounded tasks without hidden prerequisites. - Parallel-safe boundaries should be visible where the architecture intends concurrent implementation. - Avoid speculative abstraction: remove components, adapters, or interfaces that exist only for hypothetical future scope. - If a section is too vague for tasks to reference directly, rewrite it before finalizing the design. ## Mechanical Checks Before applying judgment, verify these mechanically: - **Requirements traceability**: Extract all numeric requirement IDs from `requirements.md`. Scan the design draft for each ID. Report any IDs not found in the design. - **File Structure Plan populated**: The File Structure Plan section must contain concrete file paths (not just "TBD" or empty). Scan for placeholder text in that section. - **No orphan components**: Every component mentioned in the design must appear in the File Structure Plan with a file path. Scan for component names that have no corresponding file entry. ## Review Loop - Run mechanical checks first, then judgment-based review. - If issues are local to the draft, repair the draft and re-run the review gate. - Keep the loop bounded: no more than 2 review-and-repair passes before escalating a real spec gap. - Write `design.md` only after the review gate passes.
© gotalab · MIT · gotalab/cc-sdd