Repository navigation
π Author exact-revision review for Stages 5β6Β #706
Description
Parent: #633
Architecture ancestry: PR #630
Planning base: 0479b3b1e6a3de08fb7d9de515a3efde80e7fe91; implementation base is the exact lifecycle integration head containing accepted L7 and L8 feedback commits over the foundation
Stack position: L9; follows L8 and precedes L10
Readiness: blocked until the exact lifecycle integration SHA containing accepted L7/L8 and foundation commits is recorded; no review subject, invalidation, readiness, or decision about permissions or ownership is delegated
Purpose and observable outcome
Planner Review and Architect Review inspect the exact current implementation revision, retain ordered verdicts, return defects to the earliest invalidated contract, and make the PR ready only after the accepted Stage 6 verdict remains current.
Authoritative behavior
- Before each prompt, reread PR head/base and complete required reviews/comments/checks; no verdict is requested for a revision already stale.
- Planner Stage 5 and Architect Stage 6 each receive one tool-less turn with the accepted chain, Stage 4 evidence, and exact
{ headSha, baseSha }. - Same-stage correction stays at its stage. Implementation correction returns to 4; plan gap to 3; architecture gap to 2; product gap to 1. Later stages rerun.
- Accepted verdict is retained before comment/Project projection. Stage 6 alone may invoke the explicit PR-ready effect.
- A changed head returns to 4. A changed base returns to 5 only when no synchronization or implementation work is needed; otherwise 4.
- Remote ready/comment/Project state cannot manufacture a verdict.
Current state
L7/L8 provide the accepted chain, Stage 4 revision, draft PR, and exact handoff. Existing PR evidence readers provide complete reviews/comments/checks. F3 provides reconciled comments/Project/ready; F6 provides exact frontier/revision validation. No authored Planner Review or Architect Review component exists.
Affected modules and public contracts
- Add Planner Review, Architect Review, review-evidence rendering, invalidation, and ready-handoff Markdown components to the immutable factory bundle.
- Reuse F6 verdict records and F3 effects; add no alternate review schema or GitHub mutation API.
- Add explicit review-race/invalidation/recovery fixtures and normalized-output tests.
- Update factory-spec examples only when needed to reflect the authored component syntax.
Ordered implementation plan
- At Stage 5, reread exact PR revision/evidence and compare it with the active Stage 4 handoff before prompting.
- Render and parse Planner verdict; validate exact subject and retain amendment, acceptance, or earliest invalidation before projecting.
- At Stage 6, reread the same categories and require the active accepted Planner verdict for the still-current revision.
- Render and parse Architect verdict; validate exact subject and retain amendment, acceptance, or earliest invalidation.
- After accepted Stage 6, invoke F3 ready exactly once, reconcile the PR handoff comment, and project
User Review. - Recheck revision around every remote boundary; a race invalidates rather than attaching a verdict to changed work.
Failure, cancellation, teardown, and replay
Incomplete PR evidence, stale head/base, wrong active verdict, malformed role output, unavailable GitHub state, projection conflict, or ready-state drift prevents adjacent acceptance. Prompt cancellation closes the role scope and retains no verdict. An interrupted projection/ready effect resumes through F3 reconciliation. Completed replay starts no Agent and performs no remote mutation.
Frozen evidence matrix
- Planner and Architect accept only the exact active
{ headSha, baseSha }; stale/wrong subjects mutate nothing. - Valid Planner acceptance moves 5β6 only; valid Architect acceptance moves 6β7 only.
- Same-stage correction preserves history and does not advance.
- Returns to Stages 1, 2, 3, or 4 deactivate exactly the later frontier and require reviews again.
- Head change returns to 4; base-only/no-work returns to 5; base-needs-work returns to 4.
- Only accepted Stage 6 invokes ready, and observed ready state cannot create the verdict.
- Kill around comments, Project, or ready converges without duplicates or skipped ownership or settlement checks.
- Agents remain tool-less and completed replay invokes neither Agent nor GitHub.
Focused feedback evidence
Add explicit files such as packages/workflow/tests/factory-review-stages.test.ts, factory-review-invalidation.test.ts, factory-review-races.test.ts, and packages/cli/tests/factory-review-output.test.ts. Run them with PR read/durability, F3 projection, F6 frontier, Agent-session, and L8 revision regressions plus deno task test --changed. Render normalized output. Commit when the frozen matrix passes and report the exact L9 SHA and commands.
Delivery verification
Run deno task lint and deno task check; run deno task check:jsr only if public exports move. CI owns exhaustive runtimes.
Exclusions
No CI monitoring as architecture evidence, Stage 7 human decision, target merge/ref update, abandonment, new provider effect, or review control derived from GitHub state.
Risks and recovery
The structural risk is a verdict following mutable work. Every prompt and effect validates the exact active subject. If L8's revision handoff is insufficient, return to L8/F6; do not infer missing identity from GitHub presentation.
Handoff
Record the exact lifecycle integration SHA and accepted L7/L8 ancestry. Implement only Stages 5β6, freeze the matrix, and return the exact L9 feedback commit for L10's base.
Activity