requirements-review-gate — Claude Code rule
The requirements-review-gate rule halts work and requires fixing the requirements draft before requirements.md is written. It validates scope coverage, EARS format compliance, and structural quality.
MIT ★ 3,774 updated 2026-10-22
.claude/rules/requirements-review-gate.mdWhat requirements-review-gate does
The rule performs a four-stage review. First, it checks whether the draft covers core user journeys, scope boundaries, primary error cases, and user-visible edge conditions. If coverage is incomplete, it repairs the draft and restarts the review. Next, it validates that each acceptance criterion follows EARS rules from ears-format.md and remains testable. It removes implementation details that belong in design.md. Then it runs mechanical checks: verifies all requirements have numeric IDs, each has at least one acceptance criterion, and no database or framework names appear in the text.
When issues are local to the draft, it fixes them inline. When it finds genuine ambiguity—contradictions or underspecified context—it stops and asks you to clarify rather than guessing. The loop is bounded: after two repair passes, any remaining questions escalate back to you. It does not write requirements.md until all checks pass.
What it helps with
- Verify scope coverage across all major user journeys and edge cases
- Ensure every acceptance criterion meets EARS format rules
- Separate requirements from design and implementation details
- Surface hidden scope ambiguities before design and coding begin
Example prompts for the agent
- Here's my requirements draft—run it through the review gate first
- Help me repair these requirements by checking them against the gate
- Before we write design, validate the requirements with this rule
How to install requirements-review-gate
Manually: put the files in place
.claude/rules/requirements-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/requirements-review-gate.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/requirements-review-gate.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/requirements-review-gate.mdManually: put the files in place
.clinerules/requirements-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 requirements-review-gate
How do I install requirements-review-gate in Claude Code?
Save the rule file to .claude/rules/requirements-review-gate.md. Claude Code loads it automatically in your next session.
What does requirements-review-gate do?
It reviews a requirements draft before requirements.md is written. It checks scope coverage, validates EARS format for each acceptance criterion, verifies structure, and flags implementation details that belong in design. It repairs local issues or asks for clarification if it finds genuine ambiguity.
Which IDEs support this rule?
It works in Claude Code and Codex. For other IDEs: Cursor uses .cursor/rules/requirements-review-gate.mdc, GitHub Copilot uses .github/instructions/requirements-review-gate.instructions.md, Windsurf uses .devin/rules/requirements-review-gate.md, and Cline uses .clinerules/requirements-review-gate.md.
Source text
requirements-review-gate.md · MIT
# Requirements Review Gate Before writing `requirements.md`, review the draft requirements and repair local issues until the draft passes or a true scope ambiguity is discovered. ## Scope and Coverage Review - The draft must cover the feature's core user journeys, major scope boundaries, primary error cases, and meaningful edge conditions that are visible to the user or operator. - Business/domain rules, compliance constraints, security/privacy expectations, and operational constraints that materially shape user-visible behavior must be reflected explicitly when they are in scope. - If coverage is missing because the draft is incomplete, repair the draft and review again. - If coverage cannot be completed cleanly because the project description or steering context is ambiguous, contradictory, or underspecified, stop and ask the user to clarify instead of guessing. ## EARS and Testability Review - Every acceptance criterion must follow the EARS rules defined in `ears-format.md`. - Every requirement must be testable, observable, and specific enough that later design and validation can verify it. - Remove implementation details that belong in `design.md` rather than `requirements.md`. - Requirement headings must use numeric IDs only; do not mix numeric and alphabetic labels. ## Structure and Quality Review - Group related behaviors into coherent requirement areas without duplicating the same obligation across multiple sections. - Make inclusion/exclusion boundaries explicit when the feature scope could otherwise be misread. - Ensure non-functional expectations remain user-observable or operator-observable; move technology choices and internal architecture detail out of requirements. - Normalize vague language such as "fast", "robust", or "secure" into concrete user-visible expectations whenever the source material supports it. ## Mechanical Checks Before applying judgment, verify these mechanically: - **Numeric IDs present**: Every requirement heading has a numeric ID (1, 1.1, 2, etc.). Scan the draft for headings without IDs. - **Acceptance criteria exist**: Every requirement has at least one EARS-format acceptance criterion. Scan for requirements with no "When/If/While/Where" acceptance statements. - **No implementation language**: Scan for technology-specific terms (database names, framework names, API patterns) that belong in design, not requirements. Flag any found. ## 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 ambiguity back to the user. - Write `requirements.md` only after the review gate passes.
© gotalab · MIT · gotalab/cc-sdd