opencode-swarm 7.96.0 → 7.97.0

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.
@@ -128,7 +128,7 @@ Before writing under `.swarm/`, verify `.swarm/` is ignored or locally excluded.
128
128
  1. Run 0A alone.
129
129
  2. After 0A, run 0B and 0C through `dispatch_lanes_async` only if the repository is large enough to benefit. While those lanes run, the Architect continues deterministic inventory work that does not depend on their results.
130
130
  3. After 0B, run 0D and 0E through `dispatch_lanes_async` only if 0E can leave `linked_claims` blank for Architect linking in 0J. Otherwise run 0D before 0E.
131
- 4. Preferred async batch order: batch 1 = 0F and 0G; batch 2 = 0H and 0I. Never exceed two Phase 0 agents.
131
+ 4. Preferred async batch order: batch 1 = 0F and 0G; batch 2 = 0H and 0I. Never exceed two Phase 0 agents — Phase 0 inventory units (0A→0J) form a largely sequential dependency chain, so concurrency is intentionally capped at 2 to respect that ordering rather than scaled toward the 8-lane dispatch limit.
132
132
  5. Run 0F after 0E when possible.
133
133
  6. Run 0G after 0B and 0C.
134
134
  7. Run 0H and 0I after 0B and 0C.
@@ -18,7 +18,7 @@ Read-only deep audit of a specified codebase scope using parallel explorer waves
18
18
  Parse the MODE: DEEP_DIVE header to extract:
19
19
  - `scope`: the codebase area to audit (e.g., "auth", "payment flow", "src/hooks/")
20
20
  - `profile`: one of standard | security | ux | architecture | full (default: standard)
21
- - `max_explorers`: integer 1..8 (default: 6, or 8 for full profile)
21
+ - `max_explorers`: integer 1..8 — upper bound on explorer waves (default: 6, or 8 for full profile). This is a CAP, not a fixed count: scale the actual wave size to the resolved scope surface — a trivial scope needs 1–2 explorers, a typical scope 3–5, a large multi-module scope up to the cap — never fix the count in advance.
22
22
  - `output`: markdown | json (default: markdown)
23
23
  - `update_main`: boolean (default: true) — whether to fetch/ff-only main before starting
24
24
  - `allow_dirty`: boolean (default: false) — whether to proceed with uncommitted changes
@@ -52,6 +52,8 @@ Dispatch explorer waves with `dispatch_lanes_async` when available. Each wave co
52
52
  - ~3500 total lines across all files in a mission
53
53
  - Group files by import proximity (files that import each other go in the same mission)
54
54
 
55
+ **Partition is the contract:** missions own non-overlapping file sets — no file appears in two missions — and the union of all missions must cover every file in the Step 2 scope map. Any scope-map file not assigned to a mission is an explicit coverage gap, not an optional skip.
56
+
55
57
  **Profile-based lane selection — each profile activates specific lanes:**
56
58
 
57
59
  | Lane | Template | standard | security | ux | architecture | full |
@@ -123,14 +123,14 @@ synthesis lanes run, poll with `collect_lane_results` without `wait` (or
123
123
  `wait: false`) to process completed worker responses as they settle while
124
124
  continuing independent architect work between polls. Before Step 5, call
125
125
  `collect_lane_results` with `wait: true` for every open synthesis batch only if
126
- lanes are still pending and no independent work remains. Collect all completed
127
- worker responses into a candidate findings set, each finding tagged with its
128
- subtopic, evidence refs, and the worker's confidence. Treat missing, stale,
129
- cancelled, or failed lanes as explicit coverage gaps. If `dispatch_lanes_async`
130
- is unavailable, use blocking `dispatch_lanes` and record that async advisory
131
- lanes were unavailable; do not substitute per-agent Task calls for this fallback
132
- unless lane tools are unavailable and you explicitly verify equivalent agent
133
- type, prompt, scope, and isolation.
126
+ lanes are still pending and no independent work remains. Do not advance to Step 5
127
+ until every synthesis lane is settled. Collect all completed worker responses into
128
+ a candidate findings set, each finding tagged with its subtopic, evidence refs,
129
+ and the worker's confidence. Treat missing, stale, cancelled, or failed lanes as
130
+ explicit coverage gaps. If `dispatch_lanes_async` is unavailable, use blocking
131
+ `dispatch_lanes` and record that async advisory lanes were unavailable; do not
132
+ substitute per-agent Task calls for this fallback unless lane tools are unavailable
133
+ and you explicitly verify equivalent agent type, prompt, scope, and isolation.
134
134
 
135
135
  ## Step 5 — Dual-Reviewer Claim Verification
136
136
 
@@ -42,15 +42,31 @@ This briefing is a HARD REQUIREMENT for ALL phases. Skipping it is a process vio
42
42
 
43
43
  ### CODEBASE REALITY CHECK (Required Before Speccing or Planning)
44
44
 
45
- Before any spec generation, plan creation, or plan ingestion begins, the Architect must dispatch the Explorer agent in targeted, scoped chunks one per logical area of the codebase referenced by the work (e.g., per module, per hook, per config surface). Each chunk must be explored with full depth rather than a broad surface pass.
45
+ Before any spec generation, plan creation, or plan ingestion begins, the Architect must verify the codebase reality of every item the work references. This runs as **asynchronous, fanned-out Explorer lanes by default**, joined behind a hard settlement gate never as a single blocking explorer call, and never as fire-and-forget.
46
46
 
47
- For each scoped chunk, Explorer must determine:
47
+ **1. Enumerate and partition the references (before dispatch).**
48
+ List every referenced item — file, module, function, API, config surface, and behavioral assumption — named or implied by the spec, the user request, or the plan. Partition them into **non-overlapping** lane assignments. The partition is the contract: no two lanes may share a reference (this prevents duplicated work), and the **union of all lanes must cover every referenced item** (this prevents gaps). Under-specified lane boundaries are the dominant fan-out failure mode — be explicit about what each lane owns.
49
+
50
+ **2. Scale the number of lanes to the size of the referenced surface.**
51
+ - Trivial surface (a single file/function, one logical area) → **1 lane**.
52
+ - Typical phase spanning a few areas → **2–4 lanes**.
53
+ - Large surface (many modules/hooks/config surfaces) → **more lanes, up to the dispatch cap of 8 lanes per batch**.
54
+
55
+ Do not fix the lane count in advance and do not over-spawn: extra lanes on a small surface waste tokens without improving coverage, while too few on a large surface leave gaps. Split by codebase area by default; when the surface is a single dense area, split by check-type instead — one lane for *existence & current state*, one for *assumption correctness & prior-work*.
56
+
57
+ **3. Dispatch asynchronously, then keep working.**
58
+ Dispatch the lanes with `dispatch_lanes_async`, record the returned `batch_id`, and continue **non-dependent** Architect work while they run — digest the retrospective and `user_directives`, review the spec/plan text for internal consistency, check governance/QA-gate config and the obligation ledger, and prepare the plan skeleton / task decomposition. This is dispatch-and-keep-busy, not fire-and-forget. Poll with `collect_lane_results` (wait omitted or false) to process settled lanes incrementally, or join with `wait: true` once independent work is exhausted.
59
+
60
+ Each lane must be given: its objective, its named (disjoint) reference subset, the fixed REALITY-CHECK output format below, and clear boundaries. Lanes are read-only — they cannot `declare_scope` or mutate the worktree.
61
+
62
+ **4. For each referenced item, the lane must determine:**
48
63
  - Does this file/module/function already exist?
49
64
  - If it exists, what is its current state? Does it already implement any part of what the plan or spec describes?
50
65
  - Is the plan's or user's assumption about the current state accurate? Flag any discrepancy between what is expected and what actually exists.
51
66
  - Has any portion of this work already been applied (partially or fully) in a prior session or commit?
52
67
 
53
- Explorer outputs a CODEBASE REALITY REPORT before any other agent proceeds. The report must list every referenced item with one of:
68
+ **5. Hard settlement gate (join before any downstream work).**
69
+ The Architect synthesizes the lane outputs into a single CODEBASE REALITY REPORT. The report must list every referenced item with one of:
54
70
  NOT STARTED | PARTIALLY DONE | ALREADY COMPLETE | ASSUMPTION INCORRECT
55
71
 
56
72
  Format:
@@ -59,11 +75,11 @@ Format:
59
75
  ✗ src/services/status-service.ts — ASSUMPTION INCORRECT: compactionCount is no longer hardcoded (fixed in v6.29.1)
60
76
  ✓ src/config/evidence-schema.ts — confirmed phase_number min(1)
61
77
 
62
- No implementation agent (coder, reviewer, test-engineer) may begin until this report is finalized.
78
+ No spec finalization, plan generation, plan ingestion, `declare_scope`, or implementation-agent dispatch (coder, reviewer, test-engineer) may begin until ALL lanes in the batch are settled (`collect_lane_results` reports `all_settled`) AND this report is finalized. A lane that is missing, failed, or timed out is an explicit coverage gap, not a pass: mark the affected references BLOCKED or SKIPPED_WITH_REASON and resolve them before proceeding — never silently continue. Async dispatch changes *when* the Architect waits, never *whether* the gate holds.
63
79
 
64
80
  This check fires automatically in:
65
81
  - MODE: SPECIFY — before explorer dispatch for context (step 2)
66
82
  - MODE: PLAN — before plan generation or validation
67
83
  - EXTERNAL PLAN IMPORT PATH — before parsing the provided plan
68
84
 
69
- GREENFIELD EXEMPTION: If the work is purely greenfield (new project, no existing codebase references), skip this check.
85
+ GREENFIELD EXEMPTION: If the work is purely greenfield (new project, no existing codebase references), skip this check. A trivial single-area surface stays a single lane rather than being force-fanned.
@@ -198,15 +198,27 @@ If a source is unavailable, retry with alternative access paths. If unavailable
198
198
  After the complete feedback ledger exists and before editing, use
199
199
  `dispatch_lanes_async` when available for independent read-only verification lanes:
200
200
  comment classification, CI/log root-cause inspection, test impact mapping,
201
- release/docs claim checks, and stale-branch/conflict analysis. Record each
202
- returned `batch_id`, then continue only ledger-safe architect work: normalize
203
- feedback IDs, gather deterministic PR metadata, prepare reproduction commands,
204
- and plan likely fix groups. Do not edit, close items, or mark feedback resolved
205
- from running lanes.
201
+ release/docs claim checks, and stale-branch/conflict analysis. Partition the
202
+ ledger so each `FB-###` item is owned by exactly one verification lane and the
203
+ union of lanes covers the entire ledger no feedback item may be left
204
+ unassigned to a lane; state each lane's owned `FB-###` range in its prompt. Scale
205
+ the lane count to the ledger size: a 1–3 item round may use a single combined
206
+ lane, while a large multi-round intake may warrant one lane per category above.
207
+ Cap each `dispatch_lanes_async` batch at 8 lanes (`MAX_LANES`); if the ledger
208
+ needs more than 8 verification lanes, dispatch in sequential batches and settle
209
+ each batch's COVERAGE GATE before the next — do not over-spawn lanes for a
210
+ trivial round. Record each returned `batch_id`, then continue only ledger-safe
211
+ architect work: normalize feedback IDs, gather deterministic PR metadata, prepare
212
+ reproduction commands, and plan likely fix groups. Do not edit, close items, or
213
+ mark feedback resolved from running lanes.
206
214
 
207
215
  Before the Verification step can mark any item `RESOLVED`, `DISPROVED`,
208
- `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, or `NEEDS_USER_DECISION`, call
209
- `collect_lane_results` with `wait: true` for every open verification batch.
216
+ `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, or `NEEDS_USER_DECISION`, every open
217
+ verification batch must be fully settled. Poll with `collect_lane_results` (wait
218
+ omitted or `false`) to process settled lanes incrementally — clustering confirmed
219
+ items and pre-reading files for settled findings while ledger-safe work remains —
220
+ then issue a final `collect_lane_results` with `wait: true` per batch once
221
+ independent work is exhausted, to confirm every lane is settled.
210
222
  Missing, stale, cancelled, or failed lanes are coverage gaps that must be closed
211
223
  before marking any item RESOLVED/DISPROVED/PRE_EXISTING. Apply the COVERAGE GATE:
212
224
  retry failed lanes (max 2), deploy a verified equivalent alternative (same agent
@@ -558,6 +558,8 @@ in the same batch unless intentionally replacing that exact lane before dispatch
558
558
 
559
559
  Explorers optimize for recall. Over-reporting is expected. Explorers produce candidates only.
560
560
 
561
+ The six lanes are a fixed **check-type** partition (correctness / security / deps / docs / tests / performance), not an area partition: the count is intentionally constant — every PR needs all six review dimensions — and the lanes deliberately overlap by file, each receiving the same diff via `common_prompt` and viewing it through a different lens. This is the deliberate exception to surface-scaled fan-out: the base wave is a fixed six by design, never collapsed or expanded with the size of the change. Coverage is guaranteed by the six dimensions each reading the whole diff, not by partitioning files across lanes — so the disjoint-partition rule that governs area-split fan-outs does not apply to these check-type lanes.
562
+
561
563
  | Lane | Focus | Required checks |
562
564
  |---|---|---|
563
565
  | Lane 1: Correctness and edge cases | Logic errors, null/undefined handling, incorrect operators, async ordering, races, off-by-one, error paths | input domain, nullability, async/await, loop termination, exception behavior, backward compatibility |
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-d3ds25vx.js";
5
- import"./index-q0t7gpf2.js";
4
+ } from "./index-a9ghr5cx.js";
5
+ import"./index-sgdr2e4n.js";
6
6
  import"./index-b223mczb.js";
7
7
  import"./index-2a6ppa65.js";
8
8
  import"./index-fjxjb66n.js";
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-q0t7gpf2.js";
15
+ } from "./index-sgdr2e4n.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-d3ds25vx.js";
4
+ } from "./index-a9ghr5cx.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-rdc6nvmw.js";
@@ -78,7 +78,7 @@ import {
78
78
  handleWriteRetroCommand,
79
79
  normalizeSwarmCommandInput,
80
80
  resolveCommand
81
- } from "./index-q0t7gpf2.js";
81
+ } from "./index-sgdr2e4n.js";
82
82
  import"./index-b223mczb.js";
83
83
  import"./index-2a6ppa65.js";
84
84
  import"./index-fjxjb66n.js";
@@ -909,7 +909,7 @@ var init_executor = __esm(() => {
909
909
  // package.json
910
910
  var package_default = {
911
911
  name: "opencode-swarm",
912
- version: "7.96.0",
912
+ version: "7.97.0",
913
913
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
914
914
  main: "dist/index.js",
915
915
  types: "dist/index.d.ts",
@@ -31857,7 +31857,7 @@ function buildDetailedHelp(commandName, entry) {
31857
31857
  async function handleHelpCommand(ctx) {
31858
31858
  const targetCommand = ctx.args.join(" ");
31859
31859
  if (!targetCommand) {
31860
- const { buildHelpText } = await import("./index-r0zbs7ny.js");
31860
+ const { buildHelpText } = await import("./index-byb9tgay.js");
31861
31861
  return buildHelpText();
31862
31862
  }
31863
31863
  const tokens = targetCommand.split(/\s+/);
@@ -31866,7 +31866,7 @@ async function handleHelpCommand(ctx) {
31866
31866
  return _internals45.buildDetailedHelp(resolved.key, resolved.entry);
31867
31867
  }
31868
31868
  const similar = _internals45.findSimilarCommands(targetCommand);
31869
- const { buildHelpText: fullHelp } = await import("./index-r0zbs7ny.js");
31869
+ const { buildHelpText: fullHelp } = await import("./index-byb9tgay.js");
31870
31870
  if (similar.length > 0) {
31871
31871
  return `Command '/swarm ${targetCommand}' not found.
31872
31872
 
@@ -31999,7 +31999,7 @@ var COMMAND_REGISTRY = {
31999
31999
  },
32000
32000
  "guardrail explain": {
32001
32001
  handler: async (ctx) => {
32002
- const { handleGuardrailExplain } = await import("./guardrail-explain-0hw3kyab.js");
32002
+ const { handleGuardrailExplain } = await import("./guardrail-explain-t6svvtmn.js");
32003
32003
  return handleGuardrailExplain(ctx.directory, ctx.args);
32004
32004
  },
32005
32005
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
package/dist/cli/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-q0t7gpf2.js";
10
+ } from "./index-sgdr2e4n.js";
11
11
  import"./index-b223mczb.js";
12
12
  import"./index-2a6ppa65.js";
13
13
  import"./index-fjxjb66n.js";
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ var package_default;
69
69
  var init_package = __esm(() => {
70
70
  package_default = {
71
71
  name: "opencode-swarm",
72
- version: "7.96.0",
72
+ version: "7.97.0",
73
73
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
74
74
  main: "dist/index.js",
75
75
  types: "dist/index.d.ts",
@@ -102537,7 +102537,7 @@ Purpose: Read the previous retrospective and produce a codebase reality report b
102537
102537
  ACTION: Load skill file:.opencode/skills/pre-phase-briefing/SKILL.md immediately. Follow the protocol defined there.
102538
102538
 
102539
102539
  HARD CONSTRAINTS:
102540
- - Complete the codebase reality report before starting or resuming phase implementation.
102540
+ - Complete the codebase reality report before spec finalization, plan generation, plan ingestion, declare_scope, or starting/resuming phase implementation. Dispatching the reality-check lanes asynchronously is allowed and preferred; settling all lanes before any of that downstream work is not optional.
102541
102541
 
102542
102542
  ### MODE: COUNCIL
102543
102543
  Activates when the user invokes /swarm council or requests a council-style decision review.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.96.0",
3
+ "version": "7.97.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",