Phase Reviewer
Mandatory review gate for every /dev phase.
Core rules
- Reviewer must differ from the author.
- Review must be strict and independent.
- Any deliverable change after review requires re-review.
- Review results must be persisted to
docs/reviews/phase-{NN}-{phase_key}.md. - Reviewer must read mapped textbook references before reviewing.
- Reviewer must verify textbook compliance and update
docs/process/textbook-compliance-log.mdif the process was violated.
Reviewer assignment
| Phase | Author | Reviewer |
|---|---|---|
requirements |
Alice (PM) | Bob (Architect) |
prd |
Alice (PM) | Bob (Architect) |
architecture |
Bob (Architect) | Charlie (Tech Lead) |
stories |
Charlie (Lead) | Bob (Architect) |
database |
Bob (Architect) | David (Backend) |
backend |
David (Backend) | Grace (Reviewer) |
frontend |
Eve (Frontend) | Grace (Reviewer) |
testing |
Frank (QA) | Charlie (Tech Lead) |
review |
Grace (Reviewer) | Charlie (Tech Lead) |
deployment |
Henry (DevOps) | Bob (Architect) |
Phase to checklist mapping
| Phase | Review type | Checklist |
|---|---|---|
requirements |
document | references/document-review.md |
prd |
document | references/document-review.md |
architecture |
document | references/document-review.md |
stories |
document | references/document-review.md |
database |
document | references/document-review.md |
backend |
code | references/code-review.md |
frontend |
code | references/code-review.md |
review |
code | references/code-review.md |
testing |
testing | references/testing-review.md |
deployment |
deployment | references/deployment-review.md |
Workflow
- Read the current phase from
.dev-state.yaml. - Determine the reviewer from the table above.
- Determine the review type and checklist.
- Read
.agent/config/textbook-skill-mapping.yaml. - Resolve relevant topics with
textbooks/topic_index.json. - Read the relevant textbook excerpts under
data/mineru_output/. - Run automatic validation for the phase.
- Execute the checklist, including textbook-compliance checks.
- If textbook lookup was skipped or backfilled late, append an entry to
docs/process/textbook-compliance-log.md. - Generate or update
docs/reviews/phase-{NN}-{phase_key}.md. - If any
CRITICALorHIGHfinding exists, block the phase and require re-review after fixes. - Update
.dev-state.yamlonly after the review gate passes.
Automatic validation
| Phase | Validation |
|---|---|
requirements |
output document exists and is non-empty |
prd |
output document exists and is non-empty |
architecture |
output document exists and is non-empty |
stories |
output document exists and is non-empty |
database |
output document exists |
backend |
uv run ruff check app/, uv run pytest --tb=short in backend/ |
frontend |
project-specific frontend validation |
testing |
tests pass and coverage meets threshold |
review |
no blocking review findings remain |
deployment |
deployment config exists |
Output requirements
Review reports must include:
- automated validation results
- findings ordered by severity
- textbook basis summary
- final conclusion
- re-review section if fixes were made after initial review