pr-review workflow: intake, anatomy, lenses, reviewers, synthesis, output #128

Closed
opened 2026-10-27 13:35:04 +00:00 by sam · 1 comment
Owner

Each agent call recorded as a StepExecution; reviewer fan-out as children. See docs/prds/pr-review-agent.md.

Close reason

Stage wiring landed in 62b4fbf4 (on top of the prior pass's f20d2263, b76e63d6): PRSource contract + fake, and phases 1/2/3/4/7/9 wired as workflow.Stage functions in prreview_stages.go, registered as the pr-review workflow via legacyBuiltinWorkflows. Phase 4's reviewer StepExecution status distinction (StepFailed for turn-cap/deadline exhaustion vs StepSucceeded for a clean zero-findings run) implemented via a bespoke runReviewerAgent bypassing the generic RunAgentChild, which only maps Go errors. task check clean on the final tree. Phases 5/6/8 (verification, coverage/consistency, merge gate) remain archie-core-afbk.4/.5's scope.


Imported from beads archie-core-afbk.3 · GitHub #1202 · type task · priority P1 · created 2026-09-25 · closed 2026-09-27

Each agent call recorded as a StepExecution; reviewer fan-out as children. See docs/prds/pr-review-agent.md. ### Close reason Stage wiring landed in 62b4fbf4 (on top of the prior pass's f20d2263, b76e63d6): PRSource contract + fake, and phases 1/2/3/4/7/9 wired as workflow.Stage functions in prreview_stages.go, registered as the pr-review workflow via legacyBuiltinWorkflows. Phase 4's reviewer StepExecution status distinction (StepFailed for turn-cap/deadline exhaustion vs StepSucceeded for a clean zero-findings run) implemented via a bespoke runReviewerAgent bypassing the generic RunAgentChild, which only maps Go errors. task check clean on the final tree. Phases 5/6/8 (verification, coverage/consistency, merge gate) remain archie-core-afbk.4/.5's scope. --- _Imported from beads `archie-core-afbk.3` · GitHub #1202 · type task · priority P1 · created 2026-09-25 · closed 2026-09-27_
sam added the hightask labels 2026-10-27 13:35:04 +00:00
sam self-assigned this 2026-10-27 13:35:04 +00:00
sam closed this issue 2026-10-27 13:35:04 +00:00
Author
Owner

sam wrote (originally 2026-09-27):

Partial progress (not closing -- scope remains open): commits f20d2263 (PRD refinements) and b76e63d6 (phase 1/3 deterministic core: depth classification, dimension merge/cap, hallucination-check dimension), both task-check clean.

Remaining for this bead: Stage wiring for intake/anatomy/lenses/reviewers/synthesis/output against the existing workflow engine (AgentStage, tc.RunAgentChild, StepExecution tree). Two concrete findings from this session that the next pass should start from:

  1. tc.RunAgentChild already supports concurrent fan-out from inside one Stage.Run body (each call independently records a StepExecution child under the stage's own StepID) -- the execution-tree PRD's 'no parallel sibling steps' out-of-scope note is about the engine's top-level Stage list, not a stage's internal goroutines. Phases 3 (3 lenses), 4 (up to 8 reviewers) and 9 (polish pool of 8) do not need an engine change, just goroutines + a bounded semaphore inside each stage.

  2. No existing capability (Forger/Trees) fetches an arbitrary external PR's diff text or materializes a .git-free snapshot of its head -- every existing path (Trees.Diff, Trees.Snapshot, StageReview's runReview) operates on the current task's own worktree the daemon is actively building, not a third-party PR being reviewed. Task.Owner/Repo/PRNumber already exist and are sufficient to identify a review target (no schema change needed there), but phase 1's diff statistics and the Isolation section's snapshot requirement need a narrow new contract -- recommend a PRSource interface on TaskContext (same pattern as Reviewer/Trees), implemented against real Forge/Trees calls by whichever bead wires triggers (afbk.7), with a test fake letting afbk.3's Stage code be built and tested today.

_sam wrote (originally 2026-09-27):_ Partial progress (not closing -- scope remains open): commits f20d2263 (PRD refinements) and b76e63d6 (phase 1/3 deterministic core: depth classification, dimension merge/cap, hallucination-check dimension), both task-check clean. Remaining for this bead: Stage wiring for intake/anatomy/lenses/reviewers/synthesis/output against the existing workflow engine (AgentStage, tc.RunAgentChild, StepExecution tree). Two concrete findings from this session that the next pass should start from: 1. tc.RunAgentChild already supports concurrent fan-out from inside one Stage.Run body (each call independently records a StepExecution child under the stage's own StepID) -- the execution-tree PRD's 'no parallel sibling steps' out-of-scope note is about the engine's top-level Stage list, not a stage's internal goroutines. Phases 3 (3 lenses), 4 (up to 8 reviewers) and 9 (polish pool of 8) do not need an engine change, just goroutines + a bounded semaphore inside each stage. 2. No existing capability (Forger/Trees) fetches an arbitrary external PR's diff text or materializes a .git-free snapshot of its head -- every existing path (Trees.Diff, Trees.Snapshot, StageReview's runReview) operates on the *current task's own worktree* the daemon is actively building, not a third-party PR being reviewed. Task.Owner/Repo/PRNumber already exist and are sufficient to identify a review target (no schema change needed there), but phase 1's diff statistics and the Isolation section's snapshot requirement need a narrow new contract -- recommend a PRSource interface on TaskContext (same pattern as Reviewer/Trees), implemented against real Forge/Trees calls by whichever bead wires triggers (afbk.7), with a test fake letting afbk.3's Stage code be built and tested today.
sam added a new dependency 2026-10-27 13:41:44 +00:00
sam added a new dependency 2026-10-27 13:41:44 +00:00
sam added a new dependency 2026-10-27 13:41:45 +00:00
sam added a new dependency 2026-11-14 14:45:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#128