You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract plugin helpers into shared libs (issue-reference + state-path) #782
Approved as follow-up work during the unleash-tier-routing code review (advisories A6/A7 — advisory-only because extraction touches scaffold mirrors and warrants its own spec ceremony):
A6 (divisor-architect, structure): uf_unleash_resolve_issue's tools and pure helpers (findIssueReference, parseGhIssuePayload, URL/hash patterns) live inline in the ~4,450-line .opencode/plugins/uf-workflow/index.ts. Precedent: .opencode/lib/branch-classification.ts. Extraction target: .opencode/lib/issue-reference.ts (live + scaffold mirror).
A7 (divisor-architect, conventions): the uf-finale route-decision reader (.opencode/plugins/uf-finale/index.ts ~402) hardcodes the .uf/progress/${sanitizeSlug(branch)}/uf.unleash.json path and re-implements completed_steps/positive-integer guards. The writer-reader pair is test-pinned (feat: /uf.unleash should persist demo summary for /uf.finale PR body generation #707 precedent). Extraction target: a shared lib path/state helper used by both writer and reader.
Scope
Extract the issue-reference helpers into .opencode/lib/issue-reference.ts with tests unchanged in behavior
Extract the shared progress-state path + guard helpers used by uf-workflow (writer) and uf-finale (reader)
Keep live/mirror byte-identity (drift tests) and the full suite green
Constraints
Goes through its own spec workflow (OpenSpec tactical change); mirror-touching refactor
No behavior changes — pure moves with import rewiring
The Divisor review panel assessed this issue with four successful reviewer runs (architect, guard, sre, testing); a fifth dispatched run (adversary) failed on a transient provider error and did not vote. Applied label: enhancement.
Evidence verified by the panel
findIssueReference and parseGhIssuePayload exist inline in .opencode/plugins/uf-workflow/index.ts (lines 1358, 1381), consumed by uf_unleash_resolve_issue (lines 1482, 1527).
.opencode/plugins/uf-finale/index.ts hardcodes the .uf/progress/${routeSlugged}/uf.unleash.json path and re-implements the completed_steps guard (lines 411–425; second reader site at line 443).
The cited precedent .opencode/lib/branch-classification.ts exists in both the live tree and the scaffold mirror.
The unleash-tier-routing design doc (openspec/changes/unleash-tier-routing/design, Risks/Trade-offs) records this extraction as the deferred follow-up tracked here.
One nuance the panel confirmed: sanitizeSlug itself is already shared via lib/uf-workflow-types.js; the duplication is the path template and guard logic, which matches the issue's stated scope.
Recommendations
Route through an OpenSpec tactical change (opsx/<name>): pure moves with import rewiring, no behavior changes, fewer than three stories, single repo.
Preserve live/mirror byte-identity for both extracted modules; the drift-detection tests and make plugin-test enforce this.
Name the A7 target file during design (A6 already names issue-reference.ts); the panel classifies this as a design-phase decision, not a clarity gap.
Next steps
Create openspec/changes/<name>/ covering both extractions as one cohesive refactor (same source file, same pattern).
Extend the existing test suites to the new module boundaries (22 table-driven tests already cover uf_unleash_resolve_issue).
Verify with make check (includes plugin-test and drift tests).
This triage was performed by the Divisor review panel.
Activity
jflowers commentedon Oct 23, 2026
Issue Triage: VALID — Enhancement
Classification
The Divisor review panel assessed this issue with four successful reviewer runs (architect, guard, sre, testing); a fifth dispatched run (adversary) failed on a transient provider error and did not vote. Applied label:
enhancement.Evidence verified by the panel
findIssueReferenceandparseGhIssuePayloadexist inline in.opencode/plugins/uf-workflow/index.ts(lines 1358, 1381), consumed byuf_unleash_resolve_issue(lines 1482, 1527)..opencode/plugins/uf-finale/index.tshardcodes the.uf/progress/${routeSlugged}/uf.unleash.jsonpath and re-implements thecompleted_stepsguard (lines 411–425; second reader site at line 443)..opencode/lib/branch-classification.tsexists in both the live tree and the scaffold mirror.openspec/changes/unleash-tier-routing/design, Risks/Trade-offs) records this extraction as the deferred follow-up tracked here.sanitizeSlugitself is already shared vialib/uf-workflow-types.js; the duplication is the path template and guard logic, which matches the issue's stated scope.Recommendations
opsx/<name>): pure moves with import rewiring, no behavior changes, fewer than three stories, single repo.make plugin-testenforce this.issue-reference.ts); the panel classifies this as a design-phase decision, not a clarity gap.Next steps
openspec/changes/<name>/covering both extractions as one cohesive refactor (same source file, same pattern).uf_unleash_resolve_issue).make check(includesplugin-testand drift tests).This triage was performed by the Divisor review panel.