Add code_review phase with approval gate, reviewer≠implementer enforcement, and structured CODE_REVIEW.md
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
- Insert code_review phase between implement and bug_find - Approval gate: code_review:awaiting_approval → code_review:approved - Read-only phase — no edits, no fixes, no returning to implement - Reviewer≠implementer: .state.implementer tracking + --claim enforcement - Structured CODE_REVIEW.md: spec compliance, design conformance, quality scorecard, items found (severity/category/location/resolution), test coverage - Updated status.py (10 data structures), dashboard (4 files), prompts (3 files), agent routing, tests (6 new test classes, 19 new tests)
This commit is contained in:
+8
-2
@@ -47,7 +47,10 @@ When `Mode: multi-agent` is set in `.agent.md`, a `.state.lock` file tracks whic
|
||||
| **Test Design** | Has `.state` = `test_design` | test_design:awaiting_approval | Present TEST_PLAN.md draft for user sign-off |
|
||||
| **test_design:awaiting_approval** | Has `.state` = `test_design:awaiting_approval` | test_design:approved | User says "APPROVED", call `status.py --approve` |
|
||||
| **test_design:approved** | Has `.state` = `test_design:approved` | Implement | Transition via `status.py --transition` |
|
||||
| **Implementation** | Has `.state` = `implement` | Bug Find | Generate `BUG_REPORT.md` |
|
||||
| **Implementation** | Has `.state` = `implement` | Code Review | Generate `CODE_REVIEW.md` |
|
||||
| **Code Review** | Has `.state` = `code_review` | code_review:awaiting_approval | Present CODE_REVIEW.md draft for user sign-off |
|
||||
| **code_review:awaiting_approval** | Has `.state` = `code_review:awaiting_approval` | code_review:approved | User says "APPROVED", call `status.py --approve` |
|
||||
| **code_review:approved** | Has `.state` = `code_review:approved` | Bug Find | Transition via `status.py --transition` |
|
||||
| **Bug Find** | Has `.state` = `bug_find` | Adversarial Bug Find | Generate `ADVERSARIAL_BUG_REPORT.md` |
|
||||
| **Adversarial Bug Find** | Has `.state` = `adversarial_bug_find` | Doc Review | Generate `DOC_REVIEW.md` |
|
||||
| **Doc Review** | Has `.state` = `doc_review` | Referee | Generate `VERDICT.md` |
|
||||
@@ -59,6 +62,9 @@ The following phases do **not** have `:awaiting_approval` sub-states because the
|
||||
- `implement`, `bug_find`, `adversarial_bug_find`, `doc_review`, `referee`
|
||||
- These transition directly to the next phase upon producing their artifact and calling `status.py --transition`
|
||||
|
||||
Phases with approval gates (require user sign-off):
|
||||
- `research`, `decomposition`, `design`, `test_design`, `code_review`
|
||||
|
||||
## Task Creation (via `status.py`)
|
||||
|
||||
New tasks MUST be created via `status.py --create-task {name} --project {project}`. This creates the folder, `.state` = `new`, and an empty `.state.approvals` file.
|
||||
@@ -101,7 +107,7 @@ All transitions go through `status.py --transition {phase} --project {project}`:
|
||||
## Autopilot Rules
|
||||
|
||||
1. **Linear Progression**: Never skip a phase. Each transition must go through `status.py --transition --project {project}`.
|
||||
2. **Approval Gates**: Research, Decomposition, Design, and Test Design phases require explicit user approval before proceeding. The autopilot MUST pause at `:awaiting_approval` sub-states.
|
||||
2. **Approval Gates**: Research, Decomposition, Design, Test Design, and Code Review phases require explicit user approval before proceeding. The autopilot MUST pause at `:awaiting_approval` sub-states.
|
||||
3. **Artifact Check**: A phase is only considered "complete" if its corresponding artifact exists, is non-empty, AND the `.state` file reflects the completed phase.
|
||||
4. **Folder Validation**: Before each phase transition, run `status.py --validate-folder --project {project}`. Do not proceed past violations.
|
||||
5. **Human Intervention**: If the Referee marks a task as `FAIL`, `NEEDS_REVIEW`, or identifies "Tie-Breaks", the Autopilot pauses and waits for user input.
|
||||
|
||||
Reference in New Issue
Block a user