Planner Developer Review Loop
Overview
Planner is the coordination owner and evidence judge. The workflow is a bounded loop: Planner may handle inspection, documentation, and coordination directly; Developer owns implementation; Review Team independently judges review readiness and defects. The result returns to Planner before the next decision.
Roles
| Role |
Owns |
Must not do |
| Planner |
project/thread identity, scope, live evidence, triage record, route decision, approval gates |
treat a Developer report as proof or duplicate a running implementation |
| Developer |
scoped code, tests, artifacts, and isolated-workspace implementation |
widen scope or commit/push without explicit authorization |
| Review Team |
read-only independent review and a separate PASS/CHANGES_REQUESTED report |
edit implementation or the Planner triage record |
Loop
- Resolve the project root and existing
Developer and Review Team threads by cwd or saved project. Record exact IDs. A same-named thread in another project is not a match. If identity or authority remains ambiguous, stop with BLOCKED_NEEDS_USER.
- Read the latest completed turn and current status. If the target thread is running, do not send duplicate work. Planner may continue only with non-overlapping inspection, documentation, or coordination work.
- Build an evidence ledger before routing: separate
Reported, Observed, and Not Verified. Inspect git status, intended diff, applicable plan/spec, tests, artifacts, current-state docs, and safety boundaries. Preserve unrelated dirty changes.
- Choose the owner. Planner handles read-only investigation, factual status updates, documentation, and triage. Send implementation or artifact work to Developer. Send independent quality judgment to Review Team only after the requested slice is review-ready.
- Create one new, immutable triage record for each routing event using references/contracts.md. Never overwrite an earlier cycle and never ask Review Team to edit it.
- Activate exactly one route:
- missing required deliverable, observed failure, stale current docs, artifact mismatch, or unresolved known finding ->
DEVELOPER_FIXBACK;
- concrete Developer completion evidence, present deliverables, consistent docs/artifacts, and no known finding ->
REVIEW_TEAM;
- running target ->
RUNNING_NO_DUPLICATE;
- ambiguous identity or missing authority ->
BLOCKED_NEEDS_USER.
Review Outcomes
PASS: report the review and stop the code-review cycle. Commit, promotion, push, deploy, reindex, rebuild, or service restart is a separate authorized scope. If authorized, create a new promotion triage record and re-check the exact candidate before routing it.
CHANGES_REQUESTED: send one focused Developer fixback covering required findings and acceptance checks. Wait for completion, create a new triage record, then route the corrected slice to Review Team. Optional cleanup is allowed only when it is inside the same reviewed scope and does not obscure the required fix.
- New work after
PASS: start a new bounded cycle; do not append unrelated work to a reviewed slice.
Prompt Contracts
Developer prompts contain: project and isolated workspace, exact scope, evidence-backed findings, minimal fixes in priority order, acceptance tests/artifacts, exclusions and safety boundaries, completion marker, and the no-stage/no-commit/no-push rule unless separately authorized.
Review prompts contain: project and scope, triage/spec/report paths, exact independent checks, read-only boundary, separate immutable report path, severity-ordered findings, and a final PASS or CHANGES_REQUESTED verdict.
Guardrails
- Delivery of a prompt is not completion; verify the resulting thread and repository state.
- Never route by title alone, send both routes for one state, or trust “all tests pass” without evidence.
- Do not merge or push merely because Review Team returned
PASS; preserve the explicit promotion gate.
- Do not expose secrets, raw user data, or unnecessary session text in records or prompts.
Quick Reference
| State |
Planner action |
| Planner-only inspection/docs |
perform directly if non-overlapping |
| Developer running |
wait; no duplicate implementation |
| Developer incomplete or contradicted |
one Developer fixback |
| Developer complete and evidence-consistent |
one Review Team request |
Review CHANGES_REQUESTED |
Developer fixback, then re-review |
Review PASS |
report; separate promotion authorization |
1---2name: route-developer-review3description: Use when a project has separate Planner, Developer, and Review Team threads and work must be coordinated across implementation evidence, independent review, fixback cycles, or approval-gated promotion.4---56# Planner Developer Review Loop78## Overview910Planner is the coordination owner and evidence judge. The workflow is a bounded loop: Planner may handle inspection, documentation, and coordination directly; Developer owns implementation; Review Team independently judges review readiness and defects. The result returns to Planner before the next decision.1112## Roles1314| Role | Owns | Must not do |15|---|---|---|16| Planner | project/thread identity, scope, live evidence, triage record, route decision, approval gates | treat a Developer report as proof or duplicate a running implementation |17| Developer | scoped code, tests, artifacts, and isolated-workspace implementation | widen scope or commit/push without explicit authorization |18| Review Team | read-only independent review and a separate `PASS`/`CHANGES_REQUESTED` report | edit implementation or the Planner triage record |1920## Loop21221. Resolve the project root and existing `Developer` and `Review Team` threads by `cwd` or saved project. Record exact IDs. A same-named thread in another project is not a match. If identity or authority remains ambiguous, stop with `BLOCKED_NEEDS_USER`.232. Read the latest completed turn and current status. If the target thread is running, do not send duplicate work. Planner may continue only with non-overlapping inspection, documentation, or coordination work.243. Build an evidence ledger before routing: separate `Reported`, `Observed`, and `Not Verified`. Inspect `git status`, intended diff, applicable plan/spec, tests, artifacts, current-state docs, and safety boundaries. Preserve unrelated dirty changes.254. Choose the owner. Planner handles read-only investigation, factual status updates, documentation, and triage. Send implementation or artifact work to Developer. Send independent quality judgment to Review Team only after the requested slice is review-ready.265. Create one new, immutable triage record for each routing event using [references/contracts.md](references/contracts.md). Never overwrite an earlier cycle and never ask Review Team to edit it.276. Activate exactly one route:28 - missing required deliverable, observed failure, stale current docs, artifact mismatch, or unresolved known finding -> `DEVELOPER_FIXBACK`;29 - concrete Developer completion evidence, present deliverables, consistent docs/artifacts, and no known finding -> `REVIEW_TEAM`;30 - running target -> `RUNNING_NO_DUPLICATE`;31 - ambiguous identity or missing authority -> `BLOCKED_NEEDS_USER`.3233## Review Outcomes3435- `PASS`: report the review and stop the code-review cycle. Commit, promotion, push, deploy, reindex, rebuild, or service restart is a separate authorized scope. If authorized, create a new promotion triage record and re-check the exact candidate before routing it.36- `CHANGES_REQUESTED`: send one focused Developer fixback covering required findings and acceptance checks. Wait for completion, create a new triage record, then route the corrected slice to Review Team. Optional cleanup is allowed only when it is inside the same reviewed scope and does not obscure the required fix.37- New work after `PASS`: start a new bounded cycle; do not append unrelated work to a reviewed slice.3839## Prompt Contracts4041Developer prompts contain: project and isolated workspace, exact scope, evidence-backed findings, minimal fixes in priority order, acceptance tests/artifacts, exclusions and safety boundaries, completion marker, and the no-stage/no-commit/no-push rule unless separately authorized.4243Review prompts contain: project and scope, triage/spec/report paths, exact independent checks, read-only boundary, separate immutable report path, severity-ordered findings, and a final `PASS` or `CHANGES_REQUESTED` verdict.4445## Guardrails4647- Delivery of a prompt is not completion; verify the resulting thread and repository state.48- Never route by title alone, send both routes for one state, or trust “all tests pass” without evidence.49- Do not merge or push merely because Review Team returned `PASS`; preserve the explicit promotion gate.50- Do not expose secrets, raw user data, or unnecessary session text in records or prompts.5152## Quick Reference5354| State | Planner action |55|---|---|56| Planner-only inspection/docs | perform directly if non-overlapping |57| Developer running | wait; no duplicate implementation |58| Developer incomplete or contradicted | one Developer fixback |59| Developer complete and evidence-consistent | one Review Team request |60| Review `CHANGES_REQUESTED` | Developer fixback, then re-review |61| Review `PASS` | report; separate promotion authorization |