Skip to content

feat(update-run-pipeline-plan): two-delegation protocol via uf_delegate_command - #839

Merged
jflowers merged 4 commits into
unbound-force:mainfrom
jflowers:opsx/update-run-pipeline-plan
Oct 27, 2026
Merged

jflowers merged 4 commits into
unbound-force:mainfrom
jflowers:opsx/update-run-pipeline-plan

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

Rewrote /uf.run-pipeline-plan (and its byte-identical scaffold mirror) to fix drift from recent /uf.unleash and /uf.finale changes:

  • The three-subagent protocol (/opsx-propose → /uf.unleash → /uf.finale via nonexistent general subagents) is now a two-delegation pipeline: each work item delegates /uf.unleash (which resolves the issue, routes the workflow tier, runs the entry command, and drives spec review, implement, code review, retrospective, and demo), then /uf.finale (nine steps including sync-with-base, ending in an open PR with Closes #N threaded from originating_issue).
  • The orphaned Gate Relay Protocol (GATE:<name> structured values, task_id resumption) is removed — human gates inside delegated commands surface directly to the operator.
  • Paused exits (all 11 format_unleash_exit variants) are relayed verbatim with [BLOCKED: <variant>] tracking annotations and a pause-relay question.
  • The explicit-staging guardrail is re-anchored: the orchestrator stages and commits nothing; staging happens inside the delegated finale child.
  • A Closes-linkage verification backstop uses gh pr view / gh pr edit; item completion requires a created PR plus green gh pr checks.

How to Test

  1. Inspect .opencode/commands/uf.run-pipeline-plan.md: exactly two uf_delegate_command delegations, no general subagent references, grep -c 'GATE:' returns 0, 11-variant paused-exit list.
  2. cmp .opencode/commands/uf.run-pipeline-plan.md internal/scaffold/assets/opencode/commands/uf.run-pipeline-plan.md (byte-identical).
  3. go test ./internal/scaffold/ -run TestEmbeddedAssets_MatchSource -race -count=1.
  4. Full CI parity: make check.

How to Demo

Run /uf.run-pipeline-plan with a one-item plan; observe the two delegations (/uf.unleash through demo, then /uf.finale), gates surfacing directly, paused-exit relay with [BLOCKED:] annotation, and the item completing only after PR creation + green checks.

Key Files Changed

  • .opencode/commands/uf.run-pipeline-plan.md (+204 lines changed) and scaffold mirror
  • CHANGELOG.md (+31)
  • openspec/changes/update-run-pipeline-plan/ — proposal, design, spec delta, tasks, .openspec.yaml (new)
  • .uf/dewey/learnings/ — 8 retrospective learnings from this change

Known Issues

Both review councils consolidated 3/4 (divisor-adversary blocked by a persistent google-vertex-anthropic provider outage; disclosed in review artifacts). Approving verdicts on both; 7 advisory findings recorded, not fixed:

  • MEDIUM Re-run instruction "no routing context" is wrong for pre-branch variants (tier-routing-dirty-tree/-missing-tooling) — those exit before any feature branch exists, so the re-run must re-receive the work item's description + issue refs.
  • MEDIUM Hard-failure definition dropped the spec's broader disjunct (non-error returns with neither exit text nor demo).
  • MEDIUM Task 3.3 completion-note evidentiary record — addressed via the commit message Docs: trailer.
  • LOW "Exactly two calls" scenario vs. the re-run protocol's third call.
  • LOW Determinism extraction follow-up untracked — recommend filing a follow-up issue (plugin-side tooling).
  • LOW Re-run prompt content for pre-branch variants (subset of the first MEDIUM).

Docs dispositions: #838 (in-repo), unbound-force/website#332 (cross-repo rule); #747 superseded — its AGENTS.md follow-up stays open there.

This PR was generated by /uf.finale (AI-assisted).

…te_command

Replace the three-subagent pipeline (opsx-propose, unleash, finale on
nonexistent `general` agents) with two uf_delegate_command delegations:
/uf.unleash (resolves the issue, routes the tier, runs the entry
command itself, drives through demo) and /uf.finale (nine steps,
delegated only after the demo block).

- remove the orphaned Gate Relay Protocol (GATE:<name> structured
  values, task_id resumption); human gates inside delegated commands
  now surface directly from parented child sessions
- add paused-exit handling for all 11 format_unleash_exit variants:
  relay verbatim, mark the work item [BLOCKED: <variant>], ask the
  pause-relay question, re-run the delegation, finale only after demo
- re-anchor the explicit-staging guardrail: the orchestrator stages
  and commits nothing; staging happens inside the /uf.finale child
- replace manual Closes-linkage mechanics with a verification backstop
  (gh pr view / gh pr edit) over originating_issue threading
- mark work items complete only after PR creation and green CI
  (gh pr checks), with a non-green-CI relay protocol
- sync the internal/scaffold mirror byte-identically; CHANGELOG entry

Docs: unbound-force#838, unbound-force/website#332
Spec: openspec/changes/update-run-pipeline-plan/

Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers requested a review from a team as a code owner October 26, 2026 18:37
@jflowers jflowers self-assigned this Oct 26, 2026

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The council verdict is REQUEST CHANGES. GitHub does not allow requesting changes on one's own pull request, so this review posts as a comment instead.

Council Review: REQUEST CHANGES

The Divisor review council (3 of 4 reviewers — divisor-adversary blocked by the persistent google-vertex-anthropic provider outage, consistent with this PR's Known Issues disclosure) consolidates 9 findings across two corroborated HIGH root causes. CI is fully green and no security findings were raised.

Blocking (HIGH)

  1. Direct Human Gate Surfacing claim is falsified by this PR's own evidence (.opencode/commands/uf.run-pipeline-plan.md:190-191; architect + guard). The same-PR learning uf-workflow-20261026T182050 records that delegated children cannot surface question-tool prompts — the whole-pipeline /uf.unleash delegation hung at the spec-review per-finding gate until the 30-minute timeout, and the parent had to relay. Both delegations cross mandatory question gates (/uf.unleash spec-review; /uf.finale commit-approval), no timeout is prescribed (uf_delegate_command default 600s, max 1800s), and the re-run protocol cannot clear a hung gate. Reconcile before merge: verify the mechanism and correct the learning, or scope the claim to tool-rendered paused exits and add a gate-timeout recovery path. The claim ships in the spec delta (specs/run-plan-command.md:213), design D3, the CHANGELOG, and the scaffold mirror — all four need the fix.

  2. "No routing context" re-run instruction is false for pre-branch variants (.opencode/commands/uf.run-pipeline-plan.md:224-225; architect + curator + guard). tier-routing-dirty-tree and tier-routing-missing-tooling exit inside uf_unleash_route_decision before any durable state exists; a re-run restarts tier routing on main. The re-run prompt must still carry the work-item description and issue references, or the child asks what to build (learning uf-workflow-20261026T182020). Define the term, split the protocol by variant class (mid-pipeline resume vs tier-routing fresh restart with description re-supplied), and sync spec requirement 4, design D4, and the mirror byte-identically.

Advisory

  • LOW — plugin-extraction follow-up named nowhere (proposal.md:208-209; architect + guard): no tracking issue or OpenSpec change exists; file and reference one (zero-waste).
  • LOW — website#332 filed without the docs label; task 3.3's website command omits --label docs (tasks.md:133; curator): run gh issue edit 332 --repo unbound-force/website --add-label docs and add the flag for future runs.
  • LOW — Delegation 2 instruction omits the prompt-content clause the spec requires (cmd:156; guard).

Details in inline comments.

This review was generated by /uf.review-pr (AI-assisted).

…otocol by variant class

Addresses PR unbound-force#839 review feedback from @jflowers.

- scope human-gate surfacing to tool-rendered paused exits;
  question-tool prompts inside a parented child do not surface
  (delegation wedges at the gate until timeout); add gate-timeout
  recovery path (human clears gate on the feature branch before
  re-delegation, or orchestrator re-anchors via get_progress/
  parse_tasks/git status and drives remaining steps directly)
- define "no routing context" inline (omitting orchestrator-side
  tier and branch directives while the prompt still carries the
  work item's description and issue reference(s)); split the
  /uf.unleash re-run by variant class: mid-pipeline variants resume
  from durable state; tier-routing variants (dirty-tree,
  missing-tooling) restart fresh on main with the description and
  issue reference(s) re-supplied
- require the Delegation 2 (/uf.finale) prompt to carry the work
  item's context (title, description, issue refs, parent-repo PR)
- reference the plugin-extraction follow-up as unbound-force#842 (zero-waste)
- add --label docs to the website issue-create command in tasks.md
  (website#332 now labeled docs)
- sync the scaffold mirror byte-identically;
  TestEmbeddedAssets_MatchSource passes

Docs issues: unbound-force#838, unbound-force/website#332

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
…, dedupe variant lists

Council iteration-1 findings: state Delegation 1 timeout (1800000 max,
overrun routes through gate-timeout recovery); reframe Delegation 2
expected outcome as a designed handoff at the commit-approval gate
(question prompts do not surface from a parented child); bound
direct-drive recovery to mechanical steps with consent gates answered
via pause-relay; wire stray-file removal into the pre-finale disk-handoff
verification; align question-scope sentence with spec enumeration;
dedupe the double variant enumeration (flat list removed, class-
annotated lists kept at the re-run decision point); correct the
182020 learning's mid-pipeline class (planner-failure included).
Docs issues unbound-force#838 and website#332 bodies corrected out-of-band.

Addresses PR unbound-force#839 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
…und 2

Reframe the /uf.finale delegation description as a designed handoff at
the commit-approval gate (description bullet, proposal What-Changes
item 5, task 1.4), state the Delegation 2 timeout (600000ms bounds the
orchestrator's wait before gate-timeout recovery engages), restore the
third gate-relay prohibition (MUST NOT instruct children to avoid the
question tool), add the question-tool qualifier to the proposal Why
bullet, and pin the docs-gate issues in the CHANGELOG entry.

Addresses PR unbound-force#839 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
@jflowers
jflowers merged commit 29bdeaa into unbound-force:main Oct 27, 2026
17 checks passed
jflowers added a commit that referenced this pull request Oct 27, 2026
…otocol by variant class

Addresses PR #839 review feedback from @jflowers.

- scope human-gate surfacing to tool-rendered paused exits;
  question-tool prompts inside a parented child do not surface
  (delegation wedges at the gate until timeout); add gate-timeout
  recovery path (human clears gate on the feature branch before
  re-delegation, or orchestrator re-anchors via get_progress/
  parse_tasks/git status and drives remaining steps directly)
- define "no routing context" inline (omitting orchestrator-side
  tier and branch directives while the prompt still carries the
  work item's description and issue reference(s)); split the
  /uf.unleash re-run by variant class: mid-pipeline variants resume
  from durable state; tier-routing variants (dirty-tree,
  missing-tooling) restart fresh on main with the description and
  issue reference(s) re-supplied
- require the Delegation 2 (/uf.finale) prompt to carry the work
  item's context (title, description, issue refs, parent-repo PR)
- reference the plugin-extraction follow-up as #842 (zero-waste)
- add --label docs to the website issue-create command in tasks.md
  (website#332 now labeled docs)
- sync the scaffold mirror byte-identically;
  TestEmbeddedAssets_MatchSource passes

Docs issues: #838, unbound-force/website#332

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
jflowers added a commit that referenced this pull request Oct 27, 2026
…, dedupe variant lists

Council iteration-1 findings: state Delegation 1 timeout (1800000 max,
overrun routes through gate-timeout recovery); reframe Delegation 2
expected outcome as a designed handoff at the commit-approval gate
(question prompts do not surface from a parented child); bound
direct-drive recovery to mechanical steps with consent gates answered
via pause-relay; wire stray-file removal into the pre-finale disk-handoff
verification; align question-scope sentence with spec enumeration;
dedupe the double variant enumeration (flat list removed, class-
annotated lists kept at the re-run decision point); correct the
182020 learning's mid-pipeline class (planner-failure included).
Docs issues #838 and website#332 bodies corrected out-of-band.

Addresses PR #839 review feedback from @jflowers.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers deleted the opsx/update-run-pipeline-plan branch November 15, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant