Repository navigation
Agent handoff: downstream injection, waiting, attribution - #112
Merged
suprie merged 1 commit intoOct 30, 2026
Merged
Conversation
Dependent phases receive upstream handoff artifacts inline in a separate turn, bounded to 8 KiB and contract-cited. Unmet handoff dependencies now surface as Waiting instead of parking, and every consumed artifact is recorded in the run report with roles, path, and a coverage-only citation result. Rubric: PASS — 7/7 criteria Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependent phases now receive their upstream handoff artifacts inline in a separate turn, bounded to 8 KiB per artifact and required to cite them. A phase with an unmet handoff dependency reports
Waitinginstead of parking. Every consumed artifact is recorded in the run report with its from-role, to-role, store path, and a coverage-only citation result.What changed
depends_onancestor publishes ahandoff_topic..loopdeck/handoffs/, inlined with their store paths, and capped at 8 KiB; a missing or oversized artifact parks the batch instead of truncating.RunPhaseStatus::Waitingand its transition edges are wired; the executor re-checks blocked phases after every turn, re-queues satisfied ones, parks terminal-bad ones, and parks any remainder at run end.pass/partial/missingcitation result; the run report filters the ledger by plan id.PRD
docs/epics/role-based-orchestration/prd-agent-handoff.md
Decisions
workspaceWritewithapprovalPolicy: on-requestunder the destructive-command floor.Test plan
cargo testcargo clippy -- -D warningsnpx tsc --noEmitVerify Verdict
PRD Verification — prd-agent-handoff.md
Verdict: PASS
depends_onancestor whosehandoff_topicis setsrc-tauri/src/commands/run_queue.rs:1400stops the batch before a consumer;src-tauri/src/run_executor.rs:510identifies consumerssrc-tauri/src/handoff.rs:268enforces the 8 KiB cap;src-tauri/src/handoff.rs:296renders path, body, and citation rule;src-tauri/src/commands/run_queue.rs:2058appends it to the promptsrc-tauri/src/runplan.rs:54addsWaiting;src-tauri/src/transition.rs:158maps it;src-tauri/src/run_executor.rs:537re-checks;src-tauri/src/commands/run_queue.rs:1881invokes the re-check after each turnsrc-tauri/src/run_executor.rs:537parks on terminal-bad;src-tauri/src/run_executor.rs:605parks leftovers;src-tauri/src/commands/run_queue.rs:2506parks at run endsrc-tauri/src/handoff.rs:64defines the entry;src-tauri/src/commands/run_queue.rs:2221records after a passing turn;src-tauri/src/runplan.rs:323exposesRunReport.handoffssrc-tauri/src/handoff.rs:439filters by run id;src-tauri/src/commands/run_queue.rs:920scopes the report toplan.idsrc-tauri/src/handoff.rs:10778 KiB bound;src-tauri/src/handoff.rs:1118citation coverage;src-tauri/src/run_executor.rs:1607Waiting re-check;src-tauri/src/transition.rs:304Waiting edges;cargo test= 759 passedNon-goals audit
Roll-up: PASS — 0 FAIL, 0 PARTIAL, 7 PASS.
Run metadata
agent-handoff/downstream-injection— "Inject upstream artifacts into a dependent phase's prompt with bounded size and contract citation" (role-based-orchestration / prd-agent-handoff / Phase 2 — Downstream injection + waiting)agent-handoff/waiting-status— "Wire the unused Waiting status so phases with unmet handoff dependencies wait instead of parking" (role-based-orchestration / prd-agent-handoff / Phase 2 — Downstream injection + waiting)agent-handoff/report-attribution— "Record every handoff (from-role, to-role, artifact path, citation check) in the run report" (role-based-orchestration / prd-agent-handoff / Phase 3 — Report + audit)agent-handoff/tests— "Add Rust tests for store round-trips, injection bounds, and Waiting transitions; verify against the spike's contract" (role-based-orchestration / prd-agent-handoff / Phase 4 — Tests/verification)🤖 Generated with Claude Code