Repository navigation
feat(workflow): migrate deterministic uf.unleash procedures to plugin tools - #745
Conversation
… tools - Add uf_unleash_branch_gate, uf_delegate_command, and uf_unleash_detect_resume tools replacing prose branch gates, delegation mechanics, and resume detection - Move task parsing, checkbox marking, clarification marker handling, and conflict scanning into tested tools - Render exit/demo templates from code and write the unleash-summary artifact consumed by uf_finale_pr_context - Extract shared branch-classification and review-dispatch-artifact helpers into lib/ - Mirror scaffold assets with drift tests; add OpenSpec artifacts, Dewey learnings, and CHANGELOG entry Assisted-by: glm-5-3 Generated with AI assistance (glm-5-3)
600b1fd to
0b0b6e6
Compare
jflowers
left a comment
There was a problem hiding this comment.
Council Review: REQUEST CHANGES
Note: Posted as a comment because GitHub does not allow requesting changes on one's own pull request. The council verdict below stands as REQUEST CHANGES.
Verdict: REQUEST CHANGES — 2 HIGH findings require changes before merge. The Divisor council ran 5 reviewer personas (adversary/heavy, architect, curator, guard, testing); 2 returned REQUEST CHANGES, 3 returned APPROVE WITH ADVISORIES.
Blocking (HIGH)
- Gate modification needs maintainer ratification (
.uf/review-matrix.yaml:73) —per_run_timeout_secondsdoubled 600→1200 under the AGENTS.md Gatekeeping rule. D11 documents maintainer authorization (traceable in design.md, tasks.md 8.4, CHANGELOG, synced mirror), satisfying the exception clause's traceability requirement, but the authorization was given in-session and recorded after the fact. Please ratify on this PR. - #707 fix unpinned (
internal/scaffold/scaffold_test.go:177) — no test assertsuf.unleash.mdStep 10 invokeswrite_unleash_summary; the null-unleashSummary defect can silently regress with all suites green. The "Ceremony removed" count (exactly 2CHECKPOINT: Calloccurrences) is also unverified.
Additional findings (not inline)
- MEDIUM (testing):
countUncheckedCheckboxeshandles trailing\rbut no test exercises CRLF input — the resume suite's tasks.md fixtures are LF-only. The CRLF bug class already bit this change (round-2 HIGH infindTaskLine, pinned in unleash-tasks.test.ts); removing the strip fails silently to unchecked_count 0 and reports the implement phase complete on open tasks. - LOW (adversary):
resolveRepoRelative'sstartsWith(cwd + '/')traversal guard is case-sensitivity-blind on macOS filesystems — matches the acceptedstatePathprecedent; negligible in the single-user local context. - LOW (adversary):
write_unleash_summaryhas a TOCTOU gap between the lstat symlink checks and the write — accepted defense-in-depth per prior learnings; the dual dir+file check is the stronger variant.
CI
All 16 checks pass on 600b1fd (Build and Test, Plugin Tests, Council Review Pipeline Tests, linters, CRAP, security scans). No PR-caused or pre-existing failures.
Summary
The migration is architecturally sound: 11 tested tools, shared lib extraction, byte-identical mirrors, green CI. The blocking items are procedural ratification and regression pinning, not design flaws. The five MEDIUM findings fit the deferral-tracker pattern (#741/#742/#743).
This review was generated by /uf.review-pr (AI-assisted).
Extend TestUnleashCommand_ToolRoutingContracts (renamed from WorkflowTierBranching) with a step-10 span asserting the write_unleash_summary invocation and its distinguishing parameters, pin the two remaining CHECKPOINT calls, and add TestStageReviewPluginSources_CoversImportedLibModules deriving the staged lib set transitively from the staged plugin sources so an unlisted lib dependency fails CI. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Introduce WORKFLOW_TIERS as the single source for the workflow tier value set: UnleashTier, WorkflowTier, and ExitTierSchema now all derive from one const (mirroring UNLEASH_EXIT_VARIANTS), and isRecord rejects arrays so the guard matches its name. Scaffold mirrors synced byte-identical. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Add a connecting test that renders a real envelope through finalizeReviewDispatch and parses the persisted bytes with parseReviewDispatchArtifact (producer-consumer seam), and CRLF variants of the unchecked-box counting tests so the trailing-\r strip in countUncheckedCheckboxes cannot silently regress to zero open tasks. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Extend the Sequencing impact to name the second unarchived sibling (persist-unleash-summary) that write_unleash_summary supersedes, add deferred task 9.3 to annotate the sibling's stale FR-004/FR-006 requirement text before it archives, and document the persist_unleash_summary compatibility alias's contract change in the CHANGELOG for consumers of the old three-parameter name. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Store the lesson proposals submitted by Divisor review agents during the address-feedback Tier 2 assessment dispatches (gatekeeping ratification, regression pinning, openspec sibling supersession, contract testing, plugin staging, CRLF fixtures). Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The detect-resume input contract still hand-enumerated the tier enum, a fourth validation surface the single-source refactor missed. Derive it from WORKFLOW_TIERS and update the const's doc comment to name every derived schema site. Mirrors synced. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Broaden the specifier regexes to admit nested lib paths so a future ../../lib/sub/mod.js import cannot silently escape the closure check, and document why the transitive walk returns silently when a module has no embedded asset. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The sequencing bullet named the superseded sibling but pinned no archive order; if persist-unleash-summary archived first, its stale requirement text would land in the main spec before task 9.3 could fire. Pin the sibling to archive after this change. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
|
Addressed in |
|
Not addressed — the reviewer's own disposition holds: the |
|
Not addressed — the gap between the |
jflowers
left a comment
There was a problem hiding this comment.
Council Review: REQUEST CHANGES
Round 3 on head commit 9b509e9. Five personas ran (adversary/heavy, architect, curator, guard, testing); all 16 CI checks pass. Verdict: REQUEST CHANGES — 2 HIGH findings, both narrow fixes.
Blocking (HIGH)
1. Step 8 fix loop bypasses uf_delegate_command — .opencode/commands/uf.unleash.md:821
The Step 8 REQUEST-CHANGES fix loop delegates code fixes to the raw Task tool instead of uf_delegate_command. The spec delta (specs/unleash/spec.md:112-119) mandates all four delegation sites through the tool; tasks 2.3/5.2 decomposed only three, and design.md D2 explicitly rejected the retained prose approach. Every REQUEST CHANGES verdict runs code-fix delegation outside executeAgentSession, outside the divisor-* rejection boundary, without machine-parseable failure envelopes — the exact surface Principle VI retires. Fix: route the fix loop through uf_delegate_command (prompt-only, omitting command_path), apply to the scaffold mirror, and pin the fourth site in TestUnleashCommand_ToolRoutingContracts.
2. Command-prose pins cover 5 of 8 write_unleash_summary parameters — internal/scaffold/scaffold_test.go:218
The step-10 pin asserts change_name, tier, feature_dir, review_verdicts, learnings_stored, omitting whatWasBuilt, howToVerify, testResults — the exact #707 payload fields (WriteUnleashSummaryInputSchema requires all eight; uf_finale_pr_context reads them). The format_unleash_demo subtest (199-212) leaves the same three unpinned. A prose regression dropping these lines passes the entire Go suite; at runtime the zod schema rejects with INVALID_INPUT and Step 10's warn-and-continue path silently degrades /uf.finale to no-artifact mode — reintroducing the #707 defect class. Flagged independently by architect and testing; consolidated at HIGH per compound severity rules. Fix: add the three parameters to both pin lists; longer term, derive the list from the zod schemas.
Advisories (MEDIUM)
3. .opencode/commands/uf.unleash.md:38 — the SESSION-RESUME GUARD still declares "Only checkpoint state is authoritative for resumability", contradicting the artifact-first model uf_unleash_detect_resume implements (specs/unleash/spec.md:100-103). One-sentence fix in both copies.
4. .opencode/plugins/uf-workflow/index.ts — the safeParse → issues → failure(INVALID_INPUT) prologue is duplicated verbatim across ten tool execute bodies, violating CS-004; each future envelope-policy edit is a ten-site change doubled by the scaffold mirror. Extract a shared parseFailure(result) helper.
Advisories (LOW)
5. index.ts:1594 — readDispatchArtifacts joins readDir entry names into paths without path-separator validation (theoretical; store is tool-written).
6. index.ts:1647 — porcelainEntryPath does not decode git C-style quoted-path escapes (operational impact: possible false-positive dirty report).
7. plugin_activation_test.go:429 — the closure-walk regex cannot match parent-relative (../) imports from future nested lib modules; the adjacent comment overstates the enforced grammar (architect + testing).
8. index.ts (~3,700 lines, 26 tool factories) — per-domain modules under the plugin remain feasible without breaking drift enforcement.
9. design.md:260 — D6/D9 tool signatures drifted from the implemented zod schemas; amend before archive.
Persona Verdicts
| Persona | Verdict | Findings |
|---|---|---|
| adversary (heavy) | APPROVE WITH ADVISORIES | 2 LOW |
| architect | APPROVE WITH ADVISORIES | 2 MEDIUM, 2 LOW |
| curator | APPROVE | 0 |
| guard | REQUEST CHANGES | 1 HIGH, 1 MEDIUM, 1 LOW |
| testing | REQUEST CHANGES | 1 HIGH, 1 LOW |
Round-3 learnings are recorded in Dewey (plugin-architecture, spec-decomposition, intent-drift).
This review was generated by /uf.review-pr (AI-assisted).
Note: posted as a COMMENT because GitHub restricts the REQUEST_CHANGES event for the PR author; the council verdict is REQUEST CHANGES. Finding 1 has no inline anchor because its cited lines (uf.unleash.md:819-823) are unchanged context outside the diff hunks.
jflowers
left a comment
There was a problem hiding this comment.
Note: posted as COMMENT because GitHub does not allow requesting changes on one's own PR. Verdict: REQUEST CHANGES.
Council Review (round 3): REQUEST CHANGES
5 personas planned, 4 completed, 1 failed (divisor-adversary, provider error err_dd8928fe — does not vote).
| Persona | Verdict |
|---|---|
| divisor-architect | APPROVE WITH ADVISORIES |
| divisor-curator | APPROVE |
| divisor-guard | REQUEST CHANGES |
| divisor-testing | APPROVE WITH ADVISORIES |
Blocking finding
HIGH — intent-drift (divisor-guard) — .opencode/commands/uf.unleash.md:821: the Step 8 fix loop still delegates code-fix application to cobalt-crush-dev "via the Task tool". The spec delta added by this change (specs/unleash/spec.md "Command delegation tool" lines 110–118; proposal.md line 48; design.md D2) mandates Step 6 code-fix iterations through uf_delegate_command with prompt-only mode — which task 2.2 already implements. Steps 2/3/per-task call sites were migrated (lines 262/265, 285/288, 488–494, 640); no task covers the Step 6 site. Migrate the Step 8 call site to uf_delegate_command (command_path omitted) and extend the tool-routing + mirror drift tests, or narrow the spec delta text and record the exclusion in proposal.md.
Body-only findings (no single diff line)
- MEDIUM — dry (divisor-architect) —
.opencode/plugins/uf-workflow/index.ts: the repo-relative traversal-failure envelope is duplicated at 8 tool-factory call sites (feature_dir ×3 verbatim, tasks_path ×2, command_path/expected_artifact, paths variant) around the extractedresolveRepoRelativecore. CS-004 (more-than-two-locations) applies; every site's message is test-pinned, so extraction is behavior-preserving — extract the guard-and-envelope helper the way this file already extractsreadSpecText/readTasksTextandupsertCheckpointStep. - LOW — dry (divisor-architect) —
.opencode/plugins/uf-workflow/index.ts: the CRLF strip appears in all threematchTaskLineconsumers instead of a sharednormalizeLinehelper; the per-consumer CRLF fixtures compensate for the duplication rather than removing it (learninguf-workflow-testing-20261016T225128prescribes single-point normalization). Suitable for deferred tracking (#741–#743).
Context
CI: 16 checks, 0 failures. Pre-flight (ci-aware): PASS — all local tools covered by CI. Dispatch artifact: .uf/artifacts/dispatch/378face4-5828-4079-9f89-2260bd2758d0.json (commit 9b509e91). Round-1/round-2 findings verified addressed at head; the findings above are new or documented residuals.
This review was generated by /uf.review-pr (AI-assisted).
The code-review fix loop still delegated code fixes to cobalt-crush-dev via the Task tool; route it through uf_delegate_command, prompt-only (no command_path, no checkpoint_step -- the iteration CHECKPOINT stays the review-loop record), matching the per-task implement pattern and the D9 delegation contract. Also name uf_unleash_detect_resume in the session-resume guard so resumability follows its artifact-first result rather than checkpoint state alone. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
readDispatchArtifacts now skips entry names containing a path separator (defense-in-depth against a crafted entry resolving outside storeDir), and porcelainEntryPath decodes git's C-style quoted paths instead of stripping quotes: octal byte escapes are buffered and decoded as UTF-8 so a quoted non-ASCII tasks.md path still matches the checkbox exclusion (a false-positive dirty check would rerun the spec council). Resume tests cover the quoted modify and rename fixtures. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The step-10 write_unleash_summary and demo format_unleash_demo pin lists now assert the camelCase whatWasBuilt / howToVerify / testResults parameters the shipped schemas accept, and a new subtest pins the step 8 fix-loop delegation shape (uf_delegate_command, prompt-only, no Task tool). The lib closure walk is pinned to the flat opencode/lib layout: parent-relative and nested specifiers fail loudly through non-flat scans instead of silently skipping the walk. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
D6 and D9 describe superseded interface signatures (flat step-keyed exit args, snake_case demo fields, feature_dir / files parameter names). Add as-built notes recording the shipped variant-enum exit, camelCase demo fields, and tasks_path / paths parameter names so the design record matches the implementation. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Captures four learnings proposed by the round-4 review council: dewey path-verification gotcha, phantom-path manifest gotcha, direct-read verification over glob for dot-directories, and the tool-family catch-all test pattern. Addresses PR unbound-force#745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
jflowers
left a comment
There was a problem hiding this comment.
Council Review (round 5): APPROVE WITH ADVISORIES
5 personas planned, 4 completed, 1 failed (divisor-adversary, provider error err_59a5dd92 — does not vote). All 16 CI checks pass on head f0327a9.
| Persona | Verdict |
|---|---|
| divisor-architect | APPROVE WITH ADVISORIES |
| divisor-curator | APPROVE |
| divisor-guard | APPROVE WITH ADVISORIES |
| divisor-testing | APPROVE WITH ADVISORIES |
Rounds 1–4 blocking findings are verifiably addressed at this head (commits 6c192d13, 97e27cd5, 19876df0, 4e51fce0, 2890267d). No blocking findings remain; the seven advisories below are regression-hardening items.
Advisories
MEDIUM — DRY: duplicated tool-factory glue (architect, .opencode/plugins/uf-workflow/index.ts)
Eight traversal-failure envelopes, ten zod safeParse→INVALID_INPUT blocks, eleven per-tool catch-all envelopes, and three CRLF strips repeat across the eleven new tool factories (CS-004). Every site is pinned by the connecting tests this change adds, so extraction is regression-safe: parseToolInput(schema, args), resolveToolParam(cwd, value, paramName, failureCode), a shared failureFromError(code), and folding the CRLF strip into matchTaskLine — applied symmetrically to source and scaffold mirror.
MEDIUM — test coverage: missing fail-closed catch-all tests (testing, .opencode/plugins/uf-workflow/index.ts)
format_unleash_demo (FORMAT_UNLEASH_DEMO_ERROR), scan_clarifications (SCAN_CLARIFICATIONS_ERROR), and resolve_clarification (RESOLVE_CLARIFICATION_ERROR) lack the catch-all tests every earlier family member ships. The demo tool's checkpoint-write failure path is the load-bearing gap: a regression to warn-and-continue would pass the current suite. The existing corruptReads and branch-gate fail-closed patterns are directly analogous.
MEDIUM — regression protection: unpinned delegation call sites (testing, internal/scaffold/scaffold_test.go)
The spec enumerates four uf_delegate_command migration surfaces; TestUnleashCommand_ToolRoutingContracts pins only the Step 6 fix loop. Steps 2/3 (speckit.plan.md / speckit.tasks.md) and Step 5 per-task implement have no command-content pins — reverting any of them to Task-tool prose keeps the suite green. Three additive between-span pins (plus per-span "via the Task tool" absence checks, safer than the command-wide grep) close it.
LOW — test coverage: untested slash normalization (testing, .opencode/plugins/uf-workflow/index.ts)
uf_unleash_detect_resume normalizes a trailing slash onto feature_dir, but every fixture passes a trailing-slash directory, so the branch never executes under test. One additive test with a slash-less feature_dir, asserting the normalized status --porcelain -- <dir>/ pathspec, closes it.
Three additional LOW advisories are posted inline (lib-registration lockstep, review-matrix ratification comment, clarify-marker grammar divergence).
Dispatch artifact: .uf/artifacts/dispatch/d8cdb905-5206-473a-99b4-a2f878cee824.json
This review was generated by /uf.review-pr (AI-assisted).
| max_parallel_runs: 4 | ||
| per_run_timeout_seconds: 600 | ||
| per_run_timeout_seconds: 1200 | ||
| max_reported_cost_usd: 25 |
There was a problem hiding this comment.
LOW — on-PR ratification comment for the gate change (guard)
The per_run_timeout_seconds increase 600→1200 carries complete in-artifact authorization: design decision D11 (approver Jay Flowers, 2026-10-15, rationale, rollback, scope), task 8.4, the proposal Impact section, and the CHANGELOG entry. The remaining gap is procedural: no maintainer ratification comment exists on this PR itself; the authorization trail lives in agent-authored artifacts. A short on-PR ratification comment referencing D11 closes it before merge.
| // --------------------------------------------------------------------------- | ||
|
|
||
| /** Clarification marker prefix probed in speckit spec.md (command Step 2). */ | ||
| const CLARIFICATION_MARKER_PREFIX = "[NEEDS CLARIFICATION" |
There was a problem hiding this comment.
LOW — divergent clarify-marker grammars (guard)
The clarify probe (CLARIFICATION_MARKER_PREFIX, line 1447) and the extractor (CLARIFICATION_MARKER_PATTERN colon form, line 1955) implement two grammars for one marker family. A bare hand-written marker returns count 0 from scan_clarifications ("No clarification needed") while permanently blocking all_complete in uf_unleash_detect_resume — a behavioral narrowing vs the pre-rewrite prose scan, pinned as intentional fail-safe in unleash-clarify.test.ts. Learning determinism-20261016T152653 records the remedy (extract bare forms as unscoped questions), but nothing tracks it. Either implement the extraction or file a follow-up issue.
There was a problem hiding this comment.
Deferring with the maintainer's disposition of #743 item 5 (tracked there): the grammar split stays as-is for this PR — PREFIX keeps matching the bare markers the command file documents, PATTERN matches the colon form the clarify flow writes. Unifying them changes command-file prose and parser state in the same stroke, which is why it rides with the #743-5 deferral rather than this change. The round-5 council re-raised the divergence and the same disposition holds.
Extend TestUnleashCommand_ToolRoutingContracts (renamed from WorkflowTierBranching) with a step-10 span asserting the write_unleash_summary invocation and its distinguishing parameters, pin the two remaining CHECKPOINT calls, and add TestStageReviewPluginSources_CoversImportedLibModules deriving the staged lib set transitively from the staged plugin sources so an unlisted lib dependency fails CI. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Introduce WORKFLOW_TIERS as the single source for the workflow tier value set: UnleashTier, WorkflowTier, and ExitTierSchema now all derive from one const (mirroring UNLEASH_EXIT_VARIANTS), and isRecord rejects arrays so the guard matches its name. Scaffold mirrors synced byte-identical. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Add a connecting test that renders a real envelope through finalizeReviewDispatch and parses the persisted bytes with parseReviewDispatchArtifact (producer-consumer seam), and CRLF variants of the unchecked-box counting tests so the trailing-\r strip in countUncheckedCheckboxes cannot silently regress to zero open tasks. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Extend the Sequencing impact to name the second unarchived sibling (persist-unleash-summary) that write_unleash_summary supersedes, add deferred task 9.3 to annotate the sibling's stale FR-004/FR-006 requirement text before it archives, and document the persist_unleash_summary compatibility alias's contract change in the CHANGELOG for consumers of the old three-parameter name. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Store the lesson proposals submitted by Divisor review agents during the address-feedback Tier 2 assessment dispatches (gatekeeping ratification, regression pinning, openspec sibling supersession, contract testing, plugin staging, CRLF fixtures). Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The detect-resume input contract still hand-enumerated the tier enum, a fourth validation surface the single-source refactor missed. Derive it from WORKFLOW_TIERS and update the const's doc comment to name every derived schema site. Mirrors synced. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Broaden the specifier regexes to admit nested lib paths so a future ../../lib/sub/mod.js import cannot silently escape the closure check, and document why the transitive walk returns silently when a module has no embedded asset. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The sequencing bullet named the superseded sibling but pinned no archive order; if persist-unleash-summary archived first, its stale requirement text would land in the main spec before task 9.3 could fire. Pin the sibling to archive after this change. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The code-review fix loop still delegated code fixes to cobalt-crush-dev via the Task tool; route it through uf_delegate_command, prompt-only (no command_path, no checkpoint_step -- the iteration CHECKPOINT stays the review-loop record), matching the per-task implement pattern and the D9 delegation contract. Also name uf_unleash_detect_resume in the session-resume guard so resumability follows its artifact-first result rather than checkpoint state alone. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
readDispatchArtifacts now skips entry names containing a path separator (defense-in-depth against a crafted entry resolving outside storeDir), and porcelainEntryPath decodes git's C-style quoted paths instead of stripping quotes: octal byte escapes are buffered and decoded as UTF-8 so a quoted non-ASCII tasks.md path still matches the checkbox exclusion (a false-positive dirty check would rerun the spec council). Resume tests cover the quoted modify and rename fixtures. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
The step-10 write_unleash_summary and demo format_unleash_demo pin lists now assert the camelCase whatWasBuilt / howToVerify / testResults parameters the shipped schemas accept, and a new subtest pins the step 8 fix-loop delegation shape (uf_delegate_command, prompt-only, no Task tool). The lib closure walk is pinned to the flat opencode/lib layout: parent-relative and nested specifiers fail loudly through non-flat scans instead of silently skipping the walk. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
D6 and D9 describe superseded interface signatures (flat step-keyed exit args, snake_case demo fields, feature_dir / files parameter names). Add as-built notes recording the shipped variant-enum exit, camelCase demo fields, and tasks_path / paths parameter names so the design record matches the implementation. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Captures four learnings proposed by the round-4 review council: dewey path-verification gotcha, phantom-path manifest gotcha, direct-read verification over glob for dot-directories, and the tool-family catch-all test pattern. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Replace the per-tool safeParse prologues, traversal envelopes, and catch-all handlers with three shared helpers: parseToolInput (strict-schema validation to INVALID_INPUT envelopes with dotted field paths), resolveToolParam (repo-root traversal guard to the FEATURE_DIR_TRAVERSAL envelope), and failureFromError (unexpected runtime failures to tool-specific *_ERROR envelopes with the underlying error message). Nine tools validate through the shared prologue, eight sites share the traversal envelope, and thirteen catch-alls share the error wrapper. The three feature_dir schemas (detect_resume, scan_clarifications, resolve_clarification) now reject a leading ':' (git pathspec magic) with INVALID_INPUT before any read or git invocation, so a crafted feature_dir cannot alter the porcelain pathspec's semantics. Scaffold mirror synced byte-identical. Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
…step Add the fail-closed regression tests the round-5 review asked for: catch-all coverage for scan_clarifications, resolve_clarification, and format_unleash_demo (contract-breaking readers and a throwing checkpoint write must surface SCAN_CLARIFICATIONS_ERROR, RESOLVE_CLARIFICATION_ERROR, and FORMAT_UNLEASH_DEMO_ERROR with retryable false); INVALID_INPUT rows for leading-':' feature_dir values; and a slash-less feature_dir normalization pin proving the porcelain pathspec carries the trailing-slash form. New review-dispatch-artifact.test.ts covers every type-guard branch of parseReviewDispatchArtifact: valid parse, malformed JSON, non-record roots, foreign artifact_type, non-record context/payload/input_context, non-string mode/verdict/branch/ head_sha, and missing or unparseable timestamps sorting oldest. Scaffold tests pin the Step 2/3/5 delegation spans (uf_delegate_ command with command_path and checkpoint_step; Step 5 prompt-only, no Task tool) and extend the staged lib-module closure walk to full registration lockstep: staged content byte-identical to the embedded asset, isToolOwned true (uf init updates it), and isDivisorAsset true (DivisorOnly deployments stage it). Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
… entry Replace the stale "Command markdown + Go/TS test updates only" completeness clause with the shipped surface: shared input glue (parseToolInput/resolveToolParam/failureFromError), pathspec- magic rejection, *_ERROR envelopes for unexpected failures with per-path catch-all regression tests, Step 2/3/5 delegation pins, and staged lib-module lockstep (content, tool-ownership, Divisor staging). Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Captures four learnings from addressing the round-5 review: command-content pins must derive from the spec's enumerated call-site list (command-contract-tests), grammar divergence can originate in the spec delta (determinism), derived closure tests must assert every sibling registration list (plugin-activation), and learnings-only head commits act as a fresh domain-routed review queue (review-council). Addresses PR #745 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm-5-3
Summary
Migration of
/uf.unleash's remaining deterministic surface from commandprose to tested plugin tools (issue #716 increments 2-5; refs #707).
Eleven new uf-workflow tools:
uf_unleash_branch_gate— branch classification, workflow tier,feature-dir derivation, and per-tier prerequisites
uf_delegate_command— command-file delegation viaexecuteAgentSessionwith expected-artifact verification and auto-checkpointing
uf_unleash_detect_resume— filesystem probes + dispatch-artifact reviewderivation, authoritative over checkpoint state
scan_clarifications/resolve_clarification— extract and resolve[NEEDS CLARIFICATION]markersparse_tasks/mark_task_complete— CRLF-safe checkbox markingscan_conflict_markers— cherry-pick residuegit_conflict_filescannot see
format_unleash_exit/format_unleash_demo— prescribed-output renderingwrite_unleash_summary— writes.uf/artifacts/unleash-summary/<slug>.jsonthat
uf_finale_pr_contextreads back (the feat: /uf.unleash should persist demo summary for /uf.finale PR body generation #707 defect)Shared logic extracted to three new lib modules:
branch-classification.ts(also consumed byuf_finale_startup),unleash-templates.ts, andreview-dispatch-artifact.ts(singledispatch-envelope contract wired into both uf-workflow and review-dispatch).
uf.unleash.mdrewritten to tool invocations; checkpoint ceremonyblockquotes reduced from 15 to 2. Scaffold integration: tools registered in
the plugin server map, all 8 lib modules staged by
internal/scaffold,assets mirrored with
isToolOwned/isDivisorAssetpredicates and extendeddrift tests.
Closes #716
Refs #707 (closed as completed 2026-10-16 by the sibling persist-unleash-summary change; the persistence contract this PR supersedes and extends)
How to Test
make check— full gate (vet, golangci-lint, Go tests-race -count=1,scope-based coverage gate, plugin suite); expected exit 0.
make plugin-test— TypeScript suite; expected 31 files / 818 testspassing with >= 85% statements / 80% branches coverage.
go test ./internal/scaffold/— verifies embedded asset mirrors matchcanonical sources, staging covers all 8 lib modules, and the new libs
are recognized by
isToolOwned/isDivisorAsset./uf.unleashon an opsx feature branch — branch gate,delegation, resumability detection, checkpoint auto-record, and
exit/demo rendering execute via tool calls; on completion
.uf/artifacts/unleash-summary/<branch-slug>.jsonexists and/uf.finalesurfaces it as PR context.How to Demo
Run
/uf.unleashon any opsx feature branch: the branch gate, delegation,resume detection, and checkpoint steps execute as tool invocations rather
than re-interpreted prose. Interrupt and re-run to watch
uf_unleash_detect_resumereconstruct state; after completion, run/uf.finaleand see the unleash summary surface in the PR body.Key Files Changed
.opencode/plugins/uf-workflow/index.ts(+3,063) — 11 new tools.opencode/commands/uf.unleash.md— rewritten to tool invocations.opencode/lib/— newbranch-classification.ts,review-dispatch-artifact.ts,unleash-templates.ts.opencode/plugins/review-dispatch/index.ts,uf-finale/index.ts—consume shared libs
.opencode/test/unleash-*.test.ts— 7 new suites (~6,700 lines)internal/scaffold/— mirrored assets, staging, drift testsopenspec/changes/unleash-deterministic-tools/— spec artifacts.uf/dewey/learnings/(35 files) +CHANGELOG.mdKnown Issues
documented in design.md (D11).
Decompose uf-workflow plugin index (3,700+ lines, 25 tools) #741, Blog post: /uf.unleash deterministic tools epic when #716 closes #742, Round-2 review LOW findings follow-up (unleash-deterministic-tools) #743.
This PR was generated by /uf.finale (AI-assisted).