requirements-review-gate — правило для Claude Code
Правило requirements-review-gate останавливает работу и требует отремонтировать черновик требований перед тем, как начать писать requirements.md. Проверяет полноту охвата, формат EARS и структуру.
MIT ★ 3 774 обновлён 2026-10-22
.claude/rules/requirements-review-gate.mdЧто делает requirements-review-gate
Правило запускает четыре этапа рецензии. Сначала проверяет, что черновик покрывает основные пути пользователя, границы скопа, основные ошибки и видимые граничные случаи — если чего-то не хватает, ремонтирует черновик и начинает заново. Затем валидирует, что каждый критерий принятия написан по правилам EARS из файла ears-format.md и остаётся тестируемым. Убирает детали реализации, которые принадлежат design.md. Проверяет механически: все ли требования имеют числовые ID, есть ли у каждого минимум один критерий, нет ли в тексте имён баз данных и фреймворков.
Если проблемы локальные — исправляет черновик прямо в диалоге. Если обнаруживает настоящую неясность (противоречие в описании, недостаток контекста), останавливается и просит у вас уточнение. Не пишет requirements.md, пока все проверки не пройдут. Цикл ограничен двумя проходами: если после второго ремонта остаются вопросы — выходит к вам.
Какие задачи решает
- Проверить, что требования покрывают все основные пути и граничные случаи
- Убедиться, что каждый критерий принятия соответствует формату EARS
- Отделить требования от деталей дизайна и реализации
- Найти скрытые неясности в описании фичи до того, как начать писать код
Примеры запросов агенту
- Вот черновик требований, проверь его перед writing
- Нужно отремонтировать requirements.md, помоги пройти review gate
- Сначала проведи требования через requirements-review-gate, потом уже пишем дизайн
Как установить requirements-review-gate
Вручную: положить файлы
.claude/rules/requirements-review-gate.mdПоле paths во frontmatter ограничивает файлы
AGENTS.md
Codex читает AGENTS.md: вставьте текст правила туда
Вручную: положить файлы
.cursor/rules/requirements-review-gate.mdcВо frontmatter: description, globs, alwaysApply
Вручную: положить файлы
.github/instructions/requirements-review-gate.instructions.mdПоле applyTo задаёт, к каким файлам применять
Вручную: положить файлы
.devin/rules/requirements-review-gate.mdВручную: положить файлы
.clinerules/requirements-review-gate.mdПо шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать
Вопросы о requirements-review-gate
Как установить requirements-review-gate в Claude Code?
Сохрани файл правила в .claude/rules/requirements-review-gate.md. Claude Code загрузит его автоматически при следующем диалоге.
Что делает requirements-review-gate?
Рецензирует черновик требований перед написанием requirements.md: проверяет полноту охвата, формат EARS каждого критерия, структуру и наличие деталей реализации, которые должны быть в дизайне. Ремонтирует локальные проблемы или просит уточнение, если обнаружена неясность.
На какие платформы установить правило?
Правило работает в Claude Code и Codex. Для других IDE — Cursor (.cursor/rules/requirements-review-gate.mdc), GitHub Copilot (.github/instructions/requirements-review-gate.instructions.md), Windsurf (.devin/rules/requirements-review-gate.md), Cline (.clinerules/requirements-review-gate.md).
Исходный текст
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