opencode-swarm 7.107.4 → 7.107.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/.opencode/skills/codebase-review-swarm/SKILL.md +15 -0
  2. package/.opencode/skills/codebase-review-swarm/references/review-protocol-v8.2.md +15 -0
  3. package/.opencode/skills/engineering-conventions/SKILL.md +1 -1
  4. package/.opencode/skills/execute/SKILL.md +2 -0
  5. package/.opencode/skills/phase-wrap/SKILL.md +6 -1
  6. package/.opencode/skills/swarm-implement/SKILL.md +161 -0
  7. package/.opencode/skills/swarm-pr-feedback/SKILL.md +5 -2
  8. package/.opencode/skills/swarm-pr-review/SKILL.md +61 -0
  9. package/.opencode/skills/writing-tests/SKILL.md +7 -0
  10. package/dist/cli/{curator-rb05fjjk.js → curator-jpwvkpdv.js} +3 -3
  11. package/dist/cli/{curator-llm-factory-abw56kg0.js → curator-llm-factory-9y15npd5.js} +3 -3
  12. package/dist/cli/{evidence-summary-service-nwdfnbz1.js → evidence-summary-service-6zsgw7x7.js} +2 -2
  13. package/dist/cli/{gate-evidence-ywys9vfs.js → gate-evidence-pgr7d942.js} +1 -1
  14. package/dist/cli/{guardrail-explain-dayy7zw4.js → guardrail-explain-jk0amzae.js} +4 -4
  15. package/dist/cli/{hive-promoter-34bdmw1w.js → hive-promoter-j2krbdn9.js} +3 -3
  16. package/dist/cli/{index-r8f89sm9.js → index-0kxc7t16.js} +2 -1
  17. package/dist/cli/{index-gyzxeza3.js → index-572t1qff.js} +12 -10
  18. package/dist/cli/{index-f45hbd5x.js → index-57rthc1z.js} +1 -1
  19. package/dist/cli/{index-9b7a6agd.js → index-6h82c2h0.js} +25 -8
  20. package/dist/cli/{index-19vxtwa6.js → index-h28wfp7n.js} +4 -4
  21. package/dist/cli/index.js +3 -3
  22. package/dist/config/bundled-skills.d.ts +1 -1
  23. package/dist/config/skill-mirrors.d.ts +1 -1
  24. package/dist/index.js +13 -13
  25. package/package.json +2 -1
@@ -64,6 +64,21 @@ Use these baselines unless repository policy explicitly requires stricter or old
64
64
  7. Write `review-report.md` only after coverage closure and final critic PASS.
65
65
  8. Final response reports only the run path, selected tracks, counts summary, highest-risk items, coverage limitations, and confirmation that no source files were modified.
66
66
 
67
+ ## Pre-flight: PR Branch Checkout Before Explorer Dispatch
68
+
69
+ When the review target is a PR branch or commit range, complete this before any
70
+ explorer or candidate-generation dispatch:
71
+
72
+ 1. Verify the working tree is clean with `git status --porcelain`. If
73
+ uncommitted changes exist, stash them or abort the checkout to prevent data
74
+ loss.
75
+ 2. Fetch and check out the PR head branch locally. Explorer agents read the
76
+ working-tree filesystem (`Read`/`Glob`/`Grep`), not git history, so reviewing
77
+ a PR while the base branch is checked out produces invalid candidates.
78
+ 3. Record the exact commit range (`base_ref..head_ref`) in the source-of-truth
79
+ packet and pass that range in every explorer/candidate-generation delegation
80
+ so agents have revision context for targeted `git show` inspection.
81
+
67
82
  ## Async advisory lanes
68
83
 
69
84
  When selected-track inventory or candidate generation decomposes into independent read-only units, launch those units with `dispatch_lanes_async` when available. Record each returned `batch_id`, then continue architect-owned deterministic work that does not depend on lane output: update the coverage ledger shell, run safe local tools, prepare validation shards, and document unresolved coverage units. Do not mark coverage `REVIEWED`, promote candidates to findings, or write the final report from running lanes.
@@ -190,6 +190,21 @@ The source-of-truth packet must include repo identity, tech stack, commands, pub
190
190
 
191
191
  The repository-context packet must be concise and global: architectural style, key modules and responsibilities, primary data flows, trust boundaries, notable tech decisions, and cross-cutting patterns visible from quoted Phase 0 inventory.
192
192
 
193
+ ### 0J-bis - PR branch checkout pre-flight
194
+
195
+ If the review target is a PR branch or commit range, complete this before Phase 1
196
+ candidate-generation dispatch:
197
+
198
+ 1. Verify the working tree is clean with `git status --porcelain`. If
199
+ uncommitted changes exist, stash them or abort the checkout to prevent data
200
+ loss.
201
+ 2. Fetch and check out the PR head branch locally. Explorer agents read the
202
+ working-tree filesystem (`Read`/`Glob`/`Grep`), not git history; without the
203
+ checkout, they inspect the base branch and produce invalid candidates.
204
+ 3. Record `base_ref..head_ref` in `source-of-truth-packet.md` and pass that
205
+ commit range in every explorer/candidate-generation delegation so lanes can
206
+ use `git show` for revision-specific inspection.
207
+
193
208
  ### 0K — User review mode gate
194
209
 
195
210
  Stop and present the ten review choices unless the user’s original request already selected tracks and explicitly authorized continuing. If the user selects a focused review, do not run unrelated tracks; record omitted tracks in coverage notes.
@@ -102,7 +102,7 @@ The `commit-pr` skill Tier 1 - quality section pins the biome command to the pac
102
102
  The cross-tree skill mirror contract is the authoritative registry at `src/config/skill-mirrors.ts`. If your PR modifies `.opencode/skills/<X>/SKILL.md` or `.claude/skills/<X>/SKILL.md`, consult that file to determine the contract kind for skill `<X>`:
103
103
 
104
104
  - **`identical`:** `.opencode` and `.claude` SKILL.md must be byte-identical (the `canonical` field records which side wins when they drift). Update both trees byte-for-byte in the same commit. Verify with `bun run drift:check`. PR #1512 (lane-dispatch) introduced drift in council/deep-dive by only updating `.opencode` — a contract violation.
105
- - **`divergent`:** both must exist but content intentionally differs per runtime. Examples: `engineering-conventions` is divergent (different frontmatter, different conventions per Claude Code vs OpenCode); `writing-tests` is divergent pending maintainer confirmation (#1497).
105
+ - **`divergent`:** both must exist but content intentionally differs per runtime. Examples: `engineering-conventions` is divergent (different frontmatter, different conventions per Claude Code vs OpenCode). `writing-tests` is classified divergent because the additional-contract model does not yet have an adapter kind, but operationally `.opencode/skills/writing-tests/SKILL.md` is canonical and `.claude/skills/writing-tests/SKILL.md` delegates to it.
106
106
  - **`opencode-only`:** `.opencode` exists; no `.claude` mirror expected. Examples: `loop` (would shadow Claude Code's built-in `/loop`), `running-tests` (OpenCode-runtime guidance).
107
107
  - **Adapter shim pattern:** for architect MODE skills like `swarm-pr-review` and `swarm-pr-feedback`, the `.claude` and `.agents` files are thin adapter shims that delegate to the canonical `.opencode` file via `expectedCanonicalRef`. When updating these, the canonical content goes in `.opencode`; the adapter shim typically needs no change unless the cross-tree delegation interface changes.
108
108
 
@@ -53,6 +53,7 @@ All other gates: failure → return to coder. No self-fixes. No workarounds.
53
53
  5b-BASE (required, once per task): Call `sast_scan` with `{ capture_baseline: true, phase: <N>, changed_files: <files from 5b-PRE> }` where `<N>` is the current phase number (extract from current task ID: task "3.2" → phase 3, task "1.5" → phase 1). The tool maintains `.swarm/evidence/{phase}/sast-baseline.json` as a phase-scoped, incrementally merged baseline of pre-existing SAST findings. Calling twice for the same files is safe (idempotent merge). Do NOT re-capture mid-task.
54
54
  → REQUIRED: Print "sast-baseline: [WRITTEN — N fingerprints | MERGED — N fingerprints | SKIPPED — gate disabled | ERROR — details]"
55
55
  → Subsequent `pre_check_batch` calls with `phase: <N>` will automatically diff against this baseline — only NEW findings (not in baseline) drive the fail verdict.
56
+ -> PREFLIGHT CHECKLIST: Before first coder delegation, answer "SAST baseline captured before first coder delegation? yes/no/disabled/error". If the answer is no, do not delegate to coder; run 5b-BASE first. If disabled or error, record the exact tool result.
56
57
  5b. the active swarm's coder agent - Implement (if designer scaffold produced, include it as INPUT).
57
58
  5b-bis. **CODER OUTPUT VERIFICATION**: After the coder reports completion, do NOT accept the self-report alone. Run `diff` (step 5c) and inspect at least one of the modified files yourself to confirm the change exists. The coder may report DONE without having produced any diff. A 30-second read of the changed file(s) catches this failure mode. This is NOT a separate explorer dispatch — the existing `diff` tool at step 5c is the verification mechanism; the key discipline is checking that `diff` returns actual changes before proceeding, rather than forwarding the coder's self-report to the next gate.
58
59
  5c. Run `diff` tool. If `hasContractChanges` → the active swarm's explorer agent integration analysis. If COMPATIBILITY SIGNALS=INCOMPATIBLE or MIGRATION_SURFACE=yes → coder retry. If COMPATIBILITY SIGNALS=COMPATIBLE and MIGRATION_SURFACE=no → proceed.
@@ -157,6 +158,7 @@ PRE-COMMIT RULE — Before ANY commit or push:
157
158
  [ ] Did the active swarm's reviewer agent run and return APPROVED? (not "I reviewed it" — the agent must have run)
158
159
  [ ] Did the active swarm's test_engineer agent run and return PASS? (not "the code looks correct" — the agent must have run)
159
160
  [ ] Did pre_check_batch run with gates_passed true?
161
+ [ ] SAST baseline captured before first coder delegation (or explicit disabled/error recorded)?
160
162
  [ ] Did the diff step run?
161
163
  [ ] Did regression-sweep run (or SKIP with no related tests or test_runner error)?
162
164
  [ ] Did test-drift check run (or NOT TRIGGERED)?
@@ -95,7 +95,12 @@ The tool will automatically write the retrospective to \`.swarm/evidence/retro-{
95
95
  - `.swarm/evidence/{phase}/drift-verifier.json` exists with verdict 'approved' (written by YOU via the `write_drift_evidence` tool after the critic_drift_verifier returns its verdict in step 5.5) — required when .swarm/spec.md exists
96
96
  - `.swarm/evidence/{phase}/hallucination-guard.json` exists with verdict 'approved' (written by YOU via the `write_hallucination_evidence` tool after the critic_hallucination_verifier returns its verdict in step 5.55) — ONLY required when `hallucination_guard` is enabled in the QA gate profile
97
97
  - `.swarm/evidence/{phase}/mutation-gate.json` exists with verdict 'pass' or 'warn' (written by YOU via the `write_mutation_evidence` tool after step 5.56) — ONLY required when `mutation_test` is enabled in the QA gate profile
98
- If any required file is missing, run the missing gate first. Turbo mode skips all gates automatically.
98
+ - regression-test falsification evidence exists for at least one regression
99
+ test added or modified in this phase: fix removed/bypassed -> test fails
100
+ for the expected reason -> fix restored -> test passes. If the phase
101
+ changed no regression tests, record `not applicable` with the changed-file
102
+ evidence.
103
+ If any required file is missing, run the missing gate first. Turbo mode skips all gates automatically.
99
104
  NOTE: Steps 5.5, 5.55, and 5.56 are enforced by runtime hooks. If `hallucination_guard` is enabled and you skip the critic_hallucination_verifier delegation (or fail to call `write_hallucination_evidence`), phase_complete will be BLOCKED by the plugin. Similarly, if `mutation_test` is enabled and you skip step 5.56 (or fail to call `write_mutation_evidence`), phase_complete will be BLOCKED. These are not suggestions — they are hard enforcement mechanisms.
100
105
  5.65. **Phase Council (conditional on QA gate — `phase_council`)**: Check whether `phase_council` is enabled in the effective QA gate profile (visible via `get_qa_gate_profile`). If disabled, skip silently and proceed to step 5.7.
101
106
  This gate is triggered by the `phase_council` QA gate, NOT by `council_mode`. (`council_mode` controls per-task Stage B replacement in MODE: EXECUTE; `phase_council` controls holistic phase-level review here in MODE: PHASE-WRAP.)
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: swarm-implement
3
+ description: Execute complex implementation work with a swarm-like workflow: parallel exploration, scoped planning, objective validation, mandatory independent implementation review for changed work, and final critic approval. Use for feature work, bug fixes, refactors, and multi-file changes.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # /swarm-implement
8
+
9
+ Use this skill for implementation work when you want a fast, high-quality swarm
10
+ workflow rather than a single-threaded assistant.
11
+
12
+ ## Purpose
13
+
14
+ Complete real coding tasks while preserving speed and adding swarm-style quality
15
+ discipline.
16
+
17
+ ## Core operating model
18
+
19
+ Use this execution ladder:
20
+
21
+ 1. Explore in parallel.
22
+ 2. Build a scoped plan.
23
+ 3. Implement in small, coherent units.
24
+ 4. Run objective validation.
25
+ 5. For any worktree edit, use independent reviewer validation on the latest diff
26
+ and evidence.
27
+ 6. For any worktree edit, use a separate final critic after reviewer approval.
28
+ 7. Synthesize and report what changed, what was verified, and what remains risky.
29
+
30
+ ## Command Namespace
31
+
32
+ Swarm commands always use `/swarm <subcommand>`. Never invoke bare subcommand
33
+ names that collide with host commands such as `/plan`, `/reset`, `/checkpoint`,
34
+ or `/status`.
35
+
36
+ ## High-risk work
37
+
38
+ Always use the deeper validation path for auth, permissions, payments,
39
+ destructive actions, dependency changes, public APIs, schemas, migrations,
40
+ concurrency, queues, retries, state machines, caching, file access, subprocesses,
41
+ parsing, secrets, security-sensitive logic, and large cross-file refactors with
42
+ correctness risk.
43
+
44
+ ## Recommended workflow
45
+
46
+ ### Phase 0 - Establish scope
47
+
48
+ Determine the exact task scope first:
49
+
50
+ - what changed or needs to change,
51
+ - what files are likely involved,
52
+ - what success looks like,
53
+ - what must not be broken,
54
+ - what verification is required.
55
+
56
+ If the task is unclear, ask targeted questions or create a short written plan
57
+ before coding.
58
+
59
+ ### Phase 0a - Parallel work check
60
+
61
+ If this project has the OpenCode-generated
62
+ [`parallel-work-check` skill](../generated/parallel-work-check/SKILL.md), follow
63
+ its full protocol. Otherwise, before starting implementation on an existing
64
+ branch:
65
+
66
+ 1. Fetch remote state and compare with local (`git fetch` plus HEAD hashes).
67
+ 2. If parallel swarm work is detected on the target branch, read the new commits,
68
+ decide whether to integrate, supersede, or proceed, and document the decision.
69
+ 3. Prefer the parallel work unless you can clearly articulate why your approach
70
+ is better.
71
+
72
+ ### Phase 0b - PR branch checkout pre-flight
73
+
74
+ When implementation or review-scoping work depends on explorer agents reading a
75
+ PR branch or commit range, complete this before Phase 1 explorer dispatch:
76
+
77
+ 1. Verify the working tree is clean with `git status --porcelain`. If
78
+ uncommitted changes exist, stash them or abort the checkout to prevent data
79
+ loss.
80
+ 2. Fetch and check out the PR head branch locally. Explorer agents read files
81
+ from the working tree (`Read`/`Glob`/`Grep`), not from git history, so a stale
82
+ checkout makes them inspect the base branch.
83
+ 3. Pass the exact commit range (`base_ref..head_ref`) in every explorer
84
+ delegation so agents have revision context for targeted `git show`
85
+ inspection.
86
+
87
+ ### Phase 1 - Parallel exploration
88
+
89
+ Launch parallel subagents for disjoint investigation tasks such as repository
90
+ mapping, locating existing patterns, finding tests/contracts, side-effect
91
+ analysis, and dependency or migration checks. Keep the main context focused.
92
+
93
+ ### Phase 2 - Plan
94
+
95
+ Create a concrete implementation plan before editing for any non-trivial task.
96
+ Include files to change, intended behavior, risks, validation commands, and
97
+ whether reviewer and critic passes are required.
98
+
99
+ ### Phase 3 - Implement in scoped units
100
+
101
+ Implement in coherent, reviewable chunks. Follow existing repository patterns.
102
+
103
+ **`declare_scope` discipline.** Before every coder or test-engineer delegation (and before every retry of one), call `declare_scope({ taskId, files })` with the exact file list the delegated agent is allowed to modify — including generated/lockfile paths the change will produce (e.g. `dist/*`, `package-lock.json`, `bun.lock`). Scope is enforced at the Edit/Write/Patch tool layer only — bash-based writes (`sed -i`, `echo >`, `cat > <<HEREDOC`, heredoc-to-file redirects) bypass the check (see issue #520), so do not rely on `declare_scope` to bound shell-redirect writes. If the file list is not 100% obvious from the prompt, declare the containing directories instead. Repeat the declaration before every retry, even when files appear unchanged — scope state is per-attempt, not per-task.
104
+
105
+ If the project exposes `sast_scan` with `capture_baseline`, capture the
106
+ phase-scoped SAST baseline before first coder delegation so later scans fail only
107
+ on new findings rather than pre-existing infrastructure noise.
108
+
109
+ ### Phase 4 - Objective validation
110
+
111
+ Run the strongest objective checks available for the task: tests, lint,
112
+ typecheck, build, targeted repro scripts, and local runtime verification where
113
+ relevant. If you cannot verify it, do not claim it is done.
114
+
115
+ ### Phase 5 - Independent reviewer validation
116
+
117
+ Use an independent reviewer subagent when the task edits code, tests, docs,
118
+ package metadata, release notes, or skill files. The reviewer must inspect the
119
+ actual current diff and validation evidence after implementation. Any later edit
120
+ invalidates approval and requires re-review.
121
+
122
+ Reviewer responsibilities:
123
+
124
+ - inspect the implementation with fresh context,
125
+ - look for correctness bugs, edge cases, regressions, claim-vs-actual
126
+ mismatches, and test blind spots,
127
+ - default to disbelief until evidence supports the change,
128
+ - classify issues as `CONFIRMED`, `DISPROVED`, `UNVERIFIED`, or `PRE_EXISTING`
129
+ when useful,
130
+ - verify that at least one regression test in the diff has falsification
131
+ evidence when the task claims regression coverage: the fix was temporarily
132
+ removed or bypassed, the test failed for the expected reason, the fix was
133
+ restored, and the test passed again. If no regression test is applicable, the
134
+ reviewer must record why,
135
+ - return `APPROVE`, `NEEDS_REVISION`, or `BLOCKED`.
136
+
137
+ `NEEDS_REVISION` or `BLOCKED` blocks completion until fixed and re-reviewed.
138
+
139
+ ### Phase 6 - Critic challenge
140
+
141
+ Use a critic subagent after independent reviewer approval for any task that edits
142
+ code, tests, docs, package metadata, release notes, or skill files. The critic
143
+ must challenge the reviewer-approved current diff and evidence. Any later edit
144
+ invalidates critic approval and requires another critic pass.
145
+
146
+ ### Phase 7 - Final synthesis
147
+
148
+ Before calling work complete, verify:
149
+
150
+ - objective validation ran and results were recorded,
151
+ - the independent reviewer approved the latest diff and evidence,
152
+ - a separate critic approved after reviewer approval,
153
+ - every `NEEDS_REVISION` or `BLOCKED` item was fixed and re-reviewed,
154
+ - no edit occurred after the latest reviewer/critic approval,
155
+ - no behavior is unwired or deferred without explicit user instruction.
156
+
157
+ ## Adapter notes
158
+
159
+ Runtime-specific adapter skills in `.claude/skills/swarm-implement/` and
160
+ `.agents/skills/swarm-implement/` must stay thin and delegate to this canonical
161
+ `.opencode` workflow.
@@ -141,8 +141,11 @@ tree:
141
141
  filesystem (`Read`/`Glob`/`Grep`), and fixes must land on the PR branch — without a
142
142
  checkout you would verify and patch the base branch's code instead. Record the
143
143
  `base_ref..head_ref` range for diff-scoped inspection.
144
- - If no PR reference was provided (a pasted-feedback session on the current branch),
145
- confirm the current branch is the intended PR branch before editing.
144
+ - Pass the `base_ref..head_ref` commit range in every read-only verification or
145
+ explorer/advisory-lane delegation so lane agents can inspect specific revisions
146
+ with `git show` when needed.
147
+ - If no PR reference was provided (a pasted-feedback session on the current branch),
148
+ confirm the current branch is the intended PR branch before editing.
146
149
 
147
150
  When a verification lane result includes `output_ref`, treat `output` as a
148
151
  preview and call `retrieve_lane_output` before using it to classify, resolve,
@@ -422,6 +422,54 @@ The context pack must include, when available:
422
422
 
423
423
  ---
424
424
 
425
+ ## Review Finding Persistence
426
+
427
+ Do not rely on conversation context to preserve review findings. Create a run
428
+ artifact under `.swarm/pr-review/<run_id>/findings.jsonl` when file writes are
429
+ allowed, or under `.swarm/evidence/pr-review-<run_id>-findings.jsonl` when the
430
+ review already uses the evidence tree.
431
+
432
+ Each persisted finding record must include at least:
433
+
434
+ ```json
435
+ {"finding_id":"F-001","status":"PENDING","file_line":"src/file.ts:123","evidence":"quote, command output, lane id, or reviewer rationale","next_action":"route_to_reviewer"}
436
+ ```
437
+
438
+ Minimum field contract:
439
+
440
+ - `finding_id`: stable ID from the candidate/reviewer/critic ledger.
441
+ - `status`: one of `PENDING`, `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
442
+ - `file_line`: exact `file:line` reference, or `N/A` with reason when the
443
+ finding is cross-file or artifact-only.
444
+ - `evidence`: compact source-backed proof, including lane/reviewer/critic IDs or
445
+ command output references when available.
446
+ - `next_action`: the next required action, such as `route_to_reviewer`,
447
+ `route_to_critic`, `report`, `suppress_with_reason`, or `handoff_to_feedback`.
448
+
449
+ Persist after every major validation boundary:
450
+
451
+ 1. **Post-explorer:** after Phase 3/4 candidate parsing and before reviewer
452
+ dispatch, write all candidates as `PENDING` with their lane provenance.
453
+ 2. **Post-reviewer:** after Phase 6 reviewer validation, update each reviewed
454
+ record to `CONFIRMED`, `DISPROVED`, `PRE_EXISTING`, or keep `PENDING` with a
455
+ concrete `next_action` if more evidence is required.
456
+ 3. **Post-critic:** after Phase 8 critic challenge, update final status,
457
+ severity/action notes in `evidence`, and final reporting or handoff action.
458
+
459
+ Resume/reload procedure:
460
+
461
+ 1. Before continuing any compacted or resumed review, read the latest
462
+ `findings.jsonl` artifact and reconstruct the candidate/reviewer/critic
463
+ ledger from disk before dispatching more lanes.
464
+ 2. If the artifact is missing but a review context says prior lanes ran, stop and
465
+ surface the missing artifact as a coverage gap instead of reclassifying from
466
+ memory.
467
+ 3. Append new records rather than overwriting history unless the artifact format
468
+ explicitly tracks revisions; latest record for a `finding_id` wins during
469
+ reload.
470
+
471
+ ---
472
+
425
473
  ## Phase 1: Intent Reconstruction / Obligation Extraction
426
474
 
427
475
  Reconstruct what the PR is obligated to deliver before looking for bugs.
@@ -551,6 +599,10 @@ rather than preview-text extraction:
551
599
 
552
600
  If a lane has `output_degraded: true`, `transcript_incomplete: true`, or no usable `output_ref`, apply the COVERAGE GATE from Phase 3: retry (max 2) with materially different parameters, then use blocking `dispatch_lanes` or the Task tool as verified-equivalent fallbacks when lane tools do not work. If the gap cannot be closed, stop and surface the lane failure to the user as BLOCKED. Do not mark affected candidates UNVERIFIED to proceed past the gap. Never infer candidate absence from a preview.
553
601
 
602
+ After candidate parsing and before reviewer dispatch, persist the post-explorer
603
+ candidate ledger using the Review Finding Persistence contract. This is the
604
+ durable recovery point for context compaction before Phase 6.
605
+
554
606
  **Fallback convention:** If the parser is unavailable, the explorer MAY emit
555
607
  `[CANDIDATE]` rows in the lane output as a fallback convention (see the
556
608
  Explorer Prompt Template at the end of this skill), but the orchestrator
@@ -728,6 +780,11 @@ Reviewer output format:
728
780
 
729
781
  `DISPROVED` findings must include the reason. `PRE_EXISTING` findings must include the base-branch evidence if available.
730
782
 
783
+ After reviewer lanes settle, persist the post-reviewer finding ledger before
784
+ critic routing or synthesis. The artifact must preserve `CONFIRMED`,
785
+ `DISPROVED`, `PRE_EXISTING`, and still-`PENDING` records with reviewer IDs and
786
+ next actions.
787
+
731
788
  ---
732
789
 
733
790
  ## Phase 7: Falsification Probe Requirement
@@ -782,6 +839,10 @@ The `[CRITIC]` row in the format above is **mandatory contract**, not advisory o
782
839
 
783
840
  Refuted findings become `DISPROVED` or `ADVISORY`, depending on critic rationale. Downgrades must be listed in the final validation provenance.
784
841
 
842
+ After critic lanes settle, persist the post-critic finding ledger before final
843
+ synthesis. This artifact is the source of truth for resumed reporting and for
844
+ any later `swarm-pr-feedback` handoff.
845
+
785
846
  ---
786
847
 
787
848
  ## Runtime-Aware False-Positive Guard Checklist
@@ -580,6 +580,13 @@ Rules:
580
580
  - The leading comment in the body explains the **prior buggy behavior** in concrete terms — what the code did before, not what it does now.
581
581
  - One regression test per finding. Do not pile unrelated assertions into a single regression block.
582
582
 
583
+ Regression tests must be falsifiable. Before marking regression coverage
584
+ complete, temporarily remove or bypass the fix, run the regression test and
585
+ confirm it fails for the expected reason, restore the fix, then rerun the test
586
+ and confirm it passes. Record both commands/results in the task evidence. If the
587
+ fix cannot be safely reverted, document the exact reason and use the smallest
588
+ equivalent mutation that would reintroduce the bug.
589
+
583
590
  Examples in-tree: `tests/unit/graph/graph-query.test.ts`, `tests/unit/graph/import-extractor.test.ts`, `tests/unit/graph/graph-store.test.ts`.
584
591
 
585
592
  ### Guardrail Authority Tests
@@ -11,11 +11,11 @@ import {
11
11
  runCuratorInit,
12
12
  runCuratorPhase,
13
13
  writeCuratorSummary
14
- } from "./index-gyzxeza3.js";
14
+ } from "./index-572t1qff.js";
15
15
  import"./index-4vsgp5a8.js";
16
16
  import"./index-c8s9a3zh.js";
17
17
  import"./index-wvxhynxq.js";
18
- import"./index-9b7a6agd.js";
18
+ import"./index-6h82c2h0.js";
19
19
  import"./index-91j1sqzm.js";
20
20
  import"./index-xg18az81.js";
21
21
  import"./index-09xpycan.js";
@@ -28,7 +28,7 @@ import"./index-xmarctsf.js";
28
28
  import"./index-n1sptn1w.js";
29
29
  import"./index-bfwt3abw.js";
30
30
  import"./index-v4fcn4tr.js";
31
- import"./index-r8f89sm9.js";
31
+ import"./index-0kxc7t16.js";
32
32
  import"./index-9b7qp18e.js";
33
33
  import"./index-4r5z8sgw.js";
34
34
  import"./index-57ymmh7h.js";
@@ -1,11 +1,11 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-gyzxeza3.js";
4
+ } from "./index-572t1qff.js";
5
5
  import"./index-4vsgp5a8.js";
6
6
  import"./index-c8s9a3zh.js";
7
7
  import"./index-wvxhynxq.js";
8
- import"./index-9b7a6agd.js";
8
+ import"./index-6h82c2h0.js";
9
9
  import"./index-91j1sqzm.js";
10
10
  import"./index-xg18az81.js";
11
11
  import"./index-09xpycan.js";
@@ -18,7 +18,7 @@ import"./index-xmarctsf.js";
18
18
  import"./index-n1sptn1w.js";
19
19
  import"./index-bfwt3abw.js";
20
20
  import"./index-v4fcn4tr.js";
21
- import"./index-r8f89sm9.js";
21
+ import"./index-0kxc7t16.js";
22
22
  import"./index-9b7qp18e.js";
23
23
  import"./index-4r5z8sgw.js";
24
24
  import"./index-57ymmh7h.js";
@@ -6,9 +6,9 @@ import {
6
6
  loadPlanJsonOnly,
7
7
  mergeDurableGateEntriesFromEvidence,
8
8
  readDurableGateEvidence
9
- } from "./index-9b7a6agd.js";
9
+ } from "./index-6h82c2h0.js";
10
10
  import"./index-91j1sqzm.js";
11
- import"./index-r8f89sm9.js";
11
+ import"./index-0kxc7t16.js";
12
12
  import"./index-9b7qp18e.js";
13
13
  import"./index-57ymmh7h.js";
14
14
  import"./index-5e4e2hvv.js";
@@ -9,7 +9,7 @@ import {
9
9
  readTaskEvidenceRaw,
10
10
  recordAgentDispatch,
11
11
  recordGateEvidence
12
- } from "./index-r8f89sm9.js";
12
+ } from "./index-0kxc7t16.js";
13
13
  import"./index-9b7qp18e.js";
14
14
  import"./index-293f68mj.js";
15
15
  import"./index-3naa2ajc.js";
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-f45hbd5x.js";
5
- import"./index-gyzxeza3.js";
4
+ } from "./index-57rthc1z.js";
5
+ import"./index-572t1qff.js";
6
6
  import"./index-4vsgp5a8.js";
7
7
  import"./index-c8s9a3zh.js";
8
8
  import"./index-wvxhynxq.js";
9
- import"./index-9b7a6agd.js";
9
+ import"./index-6h82c2h0.js";
10
10
  import"./index-91j1sqzm.js";
11
11
  import"./index-xg18az81.js";
12
12
  import"./index-09xpycan.js";
@@ -19,7 +19,7 @@ import"./index-xmarctsf.js";
19
19
  import"./index-n1sptn1w.js";
20
20
  import"./index-bfwt3abw.js";
21
21
  import"./index-v4fcn4tr.js";
22
- import"./index-r8f89sm9.js";
22
+ import"./index-0kxc7t16.js";
23
23
  import"./index-9b7qp18e.js";
24
24
  import"./index-4r5z8sgw.js";
25
25
  import"./index-57ymmh7h.js";
@@ -5,11 +5,11 @@ import {
5
5
  isHiveEligible,
6
6
  promoteFromSwarm,
7
7
  promoteToHive
8
- } from "./index-gyzxeza3.js";
8
+ } from "./index-572t1qff.js";
9
9
  import"./index-4vsgp5a8.js";
10
10
  import"./index-c8s9a3zh.js";
11
11
  import"./index-wvxhynxq.js";
12
- import"./index-9b7a6agd.js";
12
+ import"./index-6h82c2h0.js";
13
13
  import"./index-91j1sqzm.js";
14
14
  import"./index-xg18az81.js";
15
15
  import"./index-09xpycan.js";
@@ -22,7 +22,7 @@ import"./index-xmarctsf.js";
22
22
  import"./index-n1sptn1w.js";
23
23
  import"./index-bfwt3abw.js";
24
24
  import"./index-v4fcn4tr.js";
25
- import"./index-r8f89sm9.js";
25
+ import"./index-0kxc7t16.js";
26
26
  import"./index-9b7qp18e.js";
27
27
  import"./index-4r5z8sgw.js";
28
28
  import"./index-57ymmh7h.js";
@@ -216,7 +216,8 @@ function readTaskEvidenceRaw(directory, taskId) {
216
216
  const raw = readFileSync(evidencePath, "utf-8");
217
217
  return TaskEvidenceSchema.parse(JSON.parse(raw));
218
218
  } catch (error) {
219
- if (error.code === "ENOENT")
219
+ const code = error.code;
220
+ if (code === "ENOENT" || code === "ENAMETOOLONG")
220
221
  return null;
221
222
  throw error;
222
223
  }
@@ -47,7 +47,7 @@ import {
47
47
  savePlan,
48
48
  transientBackoff,
49
49
  validateProjectRoot
50
- } from "./index-9b7a6agd.js";
50
+ } from "./index-6h82c2h0.js";
51
51
  import {
52
52
  buildOpenSpecProjectionSync,
53
53
  detectSpeckit,
@@ -5678,6 +5678,7 @@ var BUNDLED_PROJECT_SKILLS = [
5678
5678
  "deep-dive",
5679
5679
  "deep-research",
5680
5680
  "codebase-review-swarm",
5681
+ "swarm-implement",
5681
5682
  "design-docs",
5682
5683
  "swarm-pr-review",
5683
5684
  "swarm-pr-feedback",
@@ -7936,11 +7937,11 @@ var _internals8 = {
7936
7937
  return KnowledgeConfigSchema2.parse({});
7937
7938
  },
7938
7939
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig) => {
7939
- const { applyCuratorKnowledgeUpdates } = await import("./curator-rb05fjjk.js");
7940
+ const { applyCuratorKnowledgeUpdates } = await import("./curator-jpwvkpdv.js");
7940
7941
  return applyCuratorKnowledgeUpdates(directory, recommendations, knowledgeConfig);
7941
7942
  },
7942
7943
  checkHivePromotions: async (entries, knowledgeConfig) => {
7943
- const { checkHivePromotions } = await import("./hive-promoter-34bdmw1w.js");
7944
+ const { checkHivePromotions } = await import("./hive-promoter-j2krbdn9.js");
7944
7945
  return checkHivePromotions(entries, knowledgeConfig);
7945
7946
  },
7946
7947
  applyProposalTriage: async (directory, triage) => {
@@ -17266,8 +17267,8 @@ var _internals22 = {
17266
17267
  loadCuratorDeps: async () => {
17267
17268
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
17268
17269
  import("./schema-x0ekqzvs.js"),
17269
- import("./curator-rb05fjjk.js"),
17270
- import("./curator-llm-factory-abw56kg0.js")
17270
+ import("./curator-jpwvkpdv.js"),
17271
+ import("./curator-llm-factory-9y15npd5.js")
17271
17272
  ]);
17272
17273
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
17273
17274
  }
@@ -17763,7 +17764,7 @@ import { fileURLToPath } from "url";
17763
17764
  // package.json
17764
17765
  var package_default = {
17765
17766
  name: "opencode-swarm",
17766
- version: "7.107.4",
17767
+ version: "7.107.6",
17767
17768
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
17768
17769
  main: "dist/index.js",
17769
17770
  types: "dist/index.d.ts",
@@ -17815,6 +17816,7 @@ var package_default = {
17815
17816
  ".opencode/skills/deep-dive",
17816
17817
  ".opencode/skills/deep-research",
17817
17818
  ".opencode/skills/codebase-review-swarm",
17819
+ ".opencode/skills/swarm-implement",
17818
17820
  ".opencode/skills/design-docs",
17819
17821
  ".opencode/skills/swarm-pr-review",
17820
17822
  ".opencode/skills/swarm-pr-feedback",
@@ -20020,7 +20022,7 @@ async function handleEvidenceCommand(directory, args) {
20020
20022
  return formatTaskEvidenceMarkdown(evidenceData);
20021
20023
  }
20022
20024
  async function handleEvidenceSummaryCommand(directory) {
20023
- const { buildEvidenceSummary } = await import("./evidence-summary-service-nwdfnbz1.js");
20025
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-6zsgw7x7.js");
20024
20026
  const artifact = await buildEvidenceSummary(directory);
20025
20027
  if (!artifact) {
20026
20028
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -32287,7 +32289,7 @@ function buildDetailedHelp(commandName, entry) {
32287
32289
  async function handleHelpCommand(ctx) {
32288
32290
  const targetCommand = ctx.args.join(" ");
32289
32291
  if (!targetCommand) {
32290
- const { buildHelpText } = await import("./index-19vxtwa6.js");
32292
+ const { buildHelpText } = await import("./index-h28wfp7n.js");
32291
32293
  return buildHelpText();
32292
32294
  }
32293
32295
  const tokens = targetCommand.split(/\s+/);
@@ -32296,7 +32298,7 @@ async function handleHelpCommand(ctx) {
32296
32298
  return _internals49.buildDetailedHelp(resolved.key, resolved.entry);
32297
32299
  }
32298
32300
  const similar = _internals49.findSimilarCommands(targetCommand);
32299
- const { buildHelpText: fullHelp } = await import("./index-19vxtwa6.js");
32301
+ const { buildHelpText: fullHelp } = await import("./index-h28wfp7n.js");
32300
32302
  if (similar.length > 0) {
32301
32303
  return `Command '/swarm ${targetCommand}' not found.
32302
32304
 
@@ -32429,7 +32431,7 @@ var COMMAND_REGISTRY = {
32429
32431
  },
32430
32432
  "guardrail explain": {
32431
32433
  handler: async (ctx) => {
32432
- const { handleGuardrailExplain } = await import("./guardrail-explain-dayy7zw4.js");
32434
+ const { handleGuardrailExplain } = await import("./guardrail-explain-jk0amzae.js");
32433
32435
  return handleGuardrailExplain(ctx.directory, ctx.args);
32434
32436
  },
32435
32437
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-gyzxeza3.js";
15
+ } from "./index-572t1qff.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,