Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/requirements-review-gate.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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

Similar IDE rules

All IDE rules for Design →

From the same set12

The whole set →
design-synthesis design-synthesis is a rule for analyzing gathered requirements before writing a design document. It uses generalization, build-or-adopt, and simplification to set the solution's scope. CX Codex +1 ★ 3,774repo stars steering-principles steering-principles defines standards for project memory files, capturing architecture patterns without cluttering context with exhaustive file catalogs. CX Codex +1 ★ 3,774repo stars tasks-parallel-analysis The tasks-parallel-analysis rule sets checks for marking tasks in tasks.md as parallel work. Use it when an agent drafts an implementation plan and needs to account for dependencies. CX Codex +1 ★ 3,774repo stars design-review-gate design-review-gate audits draft architectures before generating design.md. It links requirement IDs to concrete components and prevents speculative interfaces. CX Codex +1 ★ 3,774repo stars ears-format The ears-format rule formats acceptance criteria with EARS patterns. Use it when a specification needs clear conditions, subjects, and system responses. CX Codex +1 ★ 3,774repo stars design-discovery-full The design-discovery-full rule systematically maps requirements, existing code, technologies, and risks before design begins. It ensures architectural choices rest on facts rather than assumptions. CX Codex +1 ★ 3,774repo stars design-review design-review reviews technical design documents before coding starts and issues a GO/NO-GO verdict. Caps feedback at three critical issues tied directly to project requirements. CX Codex +1 ★ 3,774repo stars cc-sdd-new-agent The cc-sdd-new-agent skill guides a new coding-agent integration in cc-sdd, from official-format research and planning to implementation checks. CX Codex +1 ★ 3,774repo stars

Project sponsors

Companies that keep this analytics open