opencode-swarm 7.12.0 → 7.13.1

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.
package/README.md CHANGED
@@ -217,12 +217,12 @@ in your `opencode-swarm.json`.
217
217
 
218
218
  ## Commands
219
219
 
220
- All 41 subcommands at a glance:
220
+ All 43 subcommands at a glance:
221
221
 
222
222
  ```bash
223
223
  /swarm help [command] # List all commands or get detailed help for a specific command
224
224
  /swarm status # Current phase and task
225
- /swarm plan [N] # Full plan or filtered by phase
225
+ /swarm show-plan [N] # Full plan or filtered by phase
226
226
  /swarm agents # Registered agents and models
227
227
  /swarm diagnose # Health check
228
228
  /swarm evidence [task] # Test and review results
@@ -233,7 +233,7 @@ Use `/swarm help` to see all available commands categorized by function. Use `/s
233
233
 
234
234
  Nine commands display a ⚠️ warning in help output because they share names with Claude Code built-in slash commands (e.g., `/plan`, `/reset`, `/status`). The warning reminds you to always use `/swarm <command>` — the bare CC command does something different and sometimes destructive. See [docs/commands.md#claude-code-command-conflicts](docs/commands.md#claude-code-command-conflicts) for the full conflict registry.
235
235
 
236
- See [docs/commands.md](docs/commands.md) for the full reference (41 commands).
236
+ See [docs/commands.md](docs/commands.md) for the full reference (43 commands).
237
237
 
238
238
  ## Command Aliases
239
239
 
@@ -248,6 +248,8 @@ Some commands are available under deprecated names for backwards compatibility.
248
248
  | `/swarm info` | `/swarm status` |
249
249
  | `/swarm list-agents` | `/swarm agents` |
250
250
  | `/swarm health` | `/swarm diagnose` |
251
+ | `/swarm plan` | `/swarm show-plan` |
252
+ | `/swarm close` | `/swarm finalize` |
251
253
  | `/swarm check` | `/swarm preflight` |
252
254
  | `/swarm clear` | `/swarm reset-session` |
253
255
 
@@ -1321,7 +1323,8 @@ Control how tool outputs are summarized for LLM context.
1321
1323
  |---------|-------------|
1322
1324
  | `/swarm help [command]` | List all commands or get detailed help for a specific command |
1323
1325
  | `/swarm status` | Current phase, task progress, agent count |
1324
- | `/swarm plan [N]` | Full plan or filtered by phase |
1326
+ | `/swarm show-plan [N]` | Full plan or filtered by phase |
1327
+ | `/swarm plan [N]` | Deprecated alias for `/swarm show-plan [N]` |
1325
1328
  | `/swarm agents` | Registered agents with models and permissions |
1326
1329
  | `/swarm history` | Completed phases with status |
1327
1330
  | `/swarm config` | Current resolved configuration |
@@ -1340,7 +1343,8 @@ Control how tool outputs are summarized for LLM context.
1340
1343
  | `/swarm specify [description]` | Generate or import a feature specification |
1341
1344
  | `/swarm clarify [topic]` | Clarify and refine an existing feature specification |
1342
1345
  | `/swarm analyze` | Analyze spec.md vs plan.md for requirement coverage gaps |
1343
- | `/swarm close [--prune-branches]` | Idempotent session close-out: retrospectives, lesson curation, evidence archive, context.md reset, config-backup cleanup, optional branch pruning |
1346
+ | `/swarm finalize [--prune-branches]` | Idempotent session close-out: retrospectives, lesson curation, evidence archive, context.md reset, config-backup cleanup, optional branch pruning |
1347
+ | `/swarm close [--prune-branches]` | Deprecated alias for `/swarm finalize [--prune-branches]` |
1344
1348
  | `/swarm write-retro` | Write a phase retrospective manually |
1345
1349
  | `/swarm handoff` | Generate a handoff summary for context-budget-critical sessions |
1346
1350
  | `/swarm simulate` | Simulate plan execution without writing code |
package/dist/cli/index.js CHANGED
@@ -34,7 +34,7 @@ var package_default;
34
34
  var init_package = __esm(() => {
35
35
  package_default = {
36
36
  name: "opencode-swarm",
37
- version: "7.12.0",
37
+ version: "7.13.1",
38
38
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
39
39
  main: "dist/index.js",
40
40
  types: "dist/index.d.ts",
@@ -48521,6 +48521,14 @@ var init_write_retro2 = __esm(() => {
48521
48521
  init_write_retro();
48522
48522
  });
48523
48523
 
48524
+ // src/commands/command-names.ts
48525
+ var COMMAND_NAMES, COMMAND_NAME_SET;
48526
+ var init_command_names = __esm(() => {
48527
+ init_registry();
48528
+ COMMAND_NAMES = Object.freeze(Object.keys(COMMAND_REGISTRY));
48529
+ COMMAND_NAME_SET = new Set(COMMAND_NAMES);
48530
+ });
48531
+
48524
48532
  // src/commands/index.ts
48525
48533
  var exports_commands = {};
48526
48534
  __export(exports_commands, {
@@ -48568,7 +48576,9 @@ __export(exports_commands, {
48568
48576
  createSwarmCommandHandler: () => createSwarmCommandHandler,
48569
48577
  buildHelpText: () => buildHelpText,
48570
48578
  VALID_COMMANDS: () => VALID_COMMANDS,
48571
- COMMAND_REGISTRY: () => COMMAND_REGISTRY
48579
+ COMMAND_REGISTRY: () => COMMAND_REGISTRY,
48580
+ COMMAND_NAME_SET: () => COMMAND_NAME_SET,
48581
+ COMMAND_NAMES: () => COMMAND_NAMES
48572
48582
  });
48573
48583
  import fs22 from "fs";
48574
48584
  import path37 from "path";
@@ -48748,6 +48758,7 @@ var init_commands = __esm(() => {
48748
48758
  init_benchmark();
48749
48759
  init_checkpoint2();
48750
48760
  init_close();
48761
+ init_command_names();
48751
48762
  init_config2();
48752
48763
  init_council();
48753
48764
  init_curate();
@@ -49005,11 +49016,19 @@ var init_registry = __esm(() => {
49005
49016
  category: "core",
49006
49017
  clashesWithNativeCcCommand: "/status"
49007
49018
  },
49019
+ "show-plan": {
49020
+ handler: (ctx) => handlePlanCommand(ctx.directory, ctx.args),
49021
+ description: "Show current plan (optionally filter by phase number)",
49022
+ category: "core",
49023
+ args: "[phase-number]"
49024
+ },
49008
49025
  plan: {
49009
49026
  handler: (ctx) => handlePlanCommand(ctx.directory, ctx.args),
49010
- description: "Show plan (optionally filter by phase number)",
49027
+ description: "Show current plan (deprecated alias for /swarm show-plan)",
49011
49028
  category: "core",
49012
- clashesWithNativeCcCommand: "/plan"
49029
+ clashesWithNativeCcCommand: "/plan",
49030
+ aliasOf: "show-plan",
49031
+ deprecated: true
49013
49032
  },
49014
49033
  agents: {
49015
49034
  handler: (ctx) => Promise.resolve(handleAgentsCommand(ctx.agents, undefined)),
@@ -49179,13 +49198,22 @@ var init_registry = __esm(() => {
49179
49198
  args: "--threshold <number>, --min-commits <number>",
49180
49199
  category: "diagnostics"
49181
49200
  },
49182
- close: {
49201
+ finalize: {
49183
49202
  handler: (ctx) => handleCloseCommand(ctx.directory, ctx.args),
49184
- description: "Use /swarm close to close the swarm project and archive evidence",
49203
+ description: "Use /swarm finalize to finalize the swarm project and archive evidence",
49185
49204
  details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs safe git ff-only to main. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation.",
49186
49205
  args: "--prune-branches",
49187
49206
  category: "core"
49188
49207
  },
49208
+ close: {
49209
+ handler: (ctx) => handleCloseCommand(ctx.directory, ctx.args),
49210
+ description: "Use /swarm close (deprecated alias) to finalize and archive swarm state",
49211
+ details: "Deprecated alias for /swarm finalize. Preserved for backward compatibility.",
49212
+ args: "--prune-branches",
49213
+ category: "core",
49214
+ aliasOf: "finalize",
49215
+ deprecated: true
49216
+ },
49189
49217
  simulate: {
49190
49218
  handler: (ctx) => handleSimulateCommand(ctx.directory, ctx.args),
49191
49219
  description: "Dry-run hidden coupling analysis with configurable thresholds",
@@ -49219,9 +49247,9 @@ var init_registry = __esm(() => {
49219
49247
  },
49220
49248
  council: {
49221
49249
  handler: (ctx) => handleCouncilCommand(ctx.directory, ctx.args),
49222
- description: "Enter architect MODE: COUNCIL \u2014 multi-model deliberation [question] [--spec-review]",
49223
- args: "<question> [--spec-review]",
49224
- details: "Triggers the architect to convene a three-agent General Council: Generalist (reviewer model), Skeptic (critic model), and Domain Expert (SME model). " + "The architect first runs 1\u20133 targeted web searches and passes a compiled RESEARCH CONTEXT " + "to all three agents before dispatching them in parallel. Agents deliberate using the NSED peer-review protocol (Round 1 independent analysis, Round 2 MAINTAIN/CONCEDE/NUANCE for disagreements). The architect synthesizes the final answer directly from convene_general_council output. --spec-review switches to single-pass advisory mode for spec review. Requires council.general.enabled: true and a search API key in opencode-swarm.json.",
49250
+ description: "Enter architect MODE: COUNCIL \u2014 multi-model deliberation [question] [--preset <name>] [--spec-review]",
49251
+ args: "<question> [--preset <name>] [--spec-review]",
49252
+ details: "Triggers the architect to convene a three-agent General Council: Generalist (reviewer model), Skeptic (critic model), and Domain Expert (SME model). Use --preset <name> to choose a named member preset from council.general.presets. " + "The architect first runs 1\u20133 targeted web searches and passes a compiled RESEARCH CONTEXT " + "to all three agents before dispatching them in parallel. Agents deliberate using the NSED peer-review protocol (Round 1 independent analysis, Round 2 MAINTAIN/CONCEDE/NUANCE for disagreements). The architect synthesizes the final answer directly from convene_general_council output. --spec-review switches to single-pass advisory mode for spec review. Requires council.general.enabled: true and a search API key in opencode-swarm.json.",
49225
49253
  category: "agent"
49226
49254
  },
49227
49255
  "pr-review": {
@@ -49454,11 +49482,7 @@ function writeProjectConfigIfMissing(cwd) {
49454
49482
  return;
49455
49483
  }
49456
49484
  ensureDir(opencodeDir);
49457
- const starterConfig = {
49458
- agents: { ...DEFAULT_AGENT_CONFIGS },
49459
- default_agent: "architect"
49460
- };
49461
- saveJson(projectConfigPath, starterConfig);
49485
+ saveJson(projectConfigPath, { agents: {} });
49462
49486
  console.log("\u2713 Created project config at:", projectConfigPath);
49463
49487
  } catch (error93) {
49464
49488
  console.warn("\u26A0 Could not create project config \u2014 installation will continue:");
@@ -0,0 +1,4 @@
1
+ import { COMMAND_REGISTRY } from './registry.js';
2
+ export type CommandName = keyof typeof COMMAND_REGISTRY;
3
+ export declare const COMMAND_NAMES: readonly CommandName[];
4
+ export declare const COMMAND_NAME_SET: ReadonlySet<CommandName>;
@@ -0,0 +1 @@
1
+ export {};
@@ -17,12 +17,12 @@ export interface CommandConflict {
17
17
  disambiguationNote: string;
18
18
  }
19
19
  export declare const CLAUDE_CODE_CONFLICTS: readonly [{
20
- readonly swarmCommand: "plan";
20
+ readonly swarmCommand: "show-plan";
21
21
  readonly ccCommand: "/plan";
22
22
  readonly severity: "CRITICAL";
23
23
  readonly ccBehavior: "Enters Claude Code plan mode — Claude proposes all actions before executing them";
24
24
  readonly swarmBehavior: "Displays the current .swarm/plan.md task list";
25
- readonly disambiguationNote: "Use /swarm plan to read the swarm task plan. NEVER invoke the bare /plan command — it enters Claude Code plan mode and blocks execution.";
25
+ readonly disambiguationNote: "Use /swarm show-plan to read the swarm task plan. NEVER invoke the bare /plan command — it enters Claude Code plan mode and blocks execution.";
26
26
  }, {
27
27
  readonly swarmCommand: "reset";
28
28
  readonly ccCommand: "/reset";
@@ -8,6 +8,8 @@ export { handleBrainstormCommand } from './brainstorm';
8
8
  export { handleCheckpointCommand } from './checkpoint';
9
9
  export { handleClarifyCommand } from './clarify';
10
10
  export { handleCloseCommand } from './close';
11
+ export type { CommandName } from './command-names.js';
12
+ export { COMMAND_NAME_SET, COMMAND_NAMES } from './command-names.js';
11
13
  export { handleConfigCommand } from './config';
12
14
  export { handleCouncilCommand } from './council';
13
15
  export { handleCurateCommand } from './curate';
@@ -50,11 +50,19 @@ export declare const COMMAND_REGISTRY: {
50
50
  readonly category: "core";
51
51
  readonly clashesWithNativeCcCommand: "/status";
52
52
  };
53
+ readonly 'show-plan': {
54
+ readonly handler: (ctx: CommandContext) => Promise<string>;
55
+ readonly description: "Show current plan (optionally filter by phase number)";
56
+ readonly category: "core";
57
+ readonly args: "[phase-number]";
58
+ };
53
59
  readonly plan: {
54
60
  readonly handler: (ctx: CommandContext) => Promise<string>;
55
- readonly description: "Show plan (optionally filter by phase number)";
61
+ readonly description: "Show current plan (deprecated alias for /swarm show-plan)";
56
62
  readonly category: "core";
57
63
  readonly clashesWithNativeCcCommand: "/plan";
64
+ readonly aliasOf: "show-plan";
65
+ readonly deprecated: true;
58
66
  };
59
67
  readonly agents: {
60
68
  readonly handler: (ctx: CommandContext) => Promise<string>;
@@ -224,13 +232,22 @@ export declare const COMMAND_REGISTRY: {
224
232
  readonly args: "--threshold <number>, --min-commits <number>";
225
233
  readonly category: "diagnostics";
226
234
  };
227
- readonly close: {
235
+ readonly finalize: {
228
236
  readonly handler: (ctx: CommandContext) => Promise<string>;
229
- readonly description: "Use /swarm close to close the swarm project and archive evidence";
237
+ readonly description: "Use /swarm finalize to finalize the swarm project and archive evidence";
230
238
  readonly details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs safe git ff-only to main. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation.";
231
239
  readonly args: "--prune-branches";
232
240
  readonly category: "core";
233
241
  };
242
+ readonly close: {
243
+ readonly handler: (ctx: CommandContext) => Promise<string>;
244
+ readonly description: "Use /swarm close (deprecated alias) to finalize and archive swarm state";
245
+ readonly details: "Deprecated alias for /swarm finalize. Preserved for backward compatibility.";
246
+ readonly args: "--prune-branches";
247
+ readonly category: "core";
248
+ readonly aliasOf: "finalize";
249
+ readonly deprecated: true;
250
+ };
234
251
  readonly simulate: {
235
252
  readonly handler: (ctx: CommandContext) => Promise<string>;
236
253
  readonly description: "Dry-run hidden coupling analysis with configurable thresholds";
@@ -264,8 +281,8 @@ export declare const COMMAND_REGISTRY: {
264
281
  };
265
282
  readonly council: {
266
283
  readonly handler: (ctx: CommandContext) => Promise<string>;
267
- readonly description: "Enter architect MODE: COUNCIL — multi-model deliberation [question] [--spec-review]";
268
- readonly args: "<question> [--spec-review]";
284
+ readonly description: "Enter architect MODE: COUNCIL — multi-model deliberation [question] [--preset <name>] [--spec-review]";
285
+ readonly args: "<question> [--preset <name>] [--spec-review]";
269
286
  readonly details: string;
270
287
  readonly category: "agent";
271
288
  };
@@ -15,7 +15,7 @@ export declare function synthesizeCouncilVerdicts(taskId: string, swarmId: strin
15
15
  * Reuses the same veto detection, conflict detection, and finding
16
16
  * classification logic as per-task council, but scoped to a phase number.
17
17
  *
18
- * Evidence is written to .swarm/evidence/{phase}/phase-council.json relative
19
- * to workingDir (or cwd).
18
+ * Pure computation no I/O. File writes are the caller's responsibility
19
+ * (see writePhaseCouncilEvidence in submit-phase-council-verdicts.ts).
20
20
  */
21
- export declare function synthesizePhaseCouncilAdvisory(phaseNumber: number, phaseSummary: string, verdicts: CouncilMemberVerdict[], roundNumber: number, config?: Partial<CouncilConfig>, workingDir?: string): PhaseCouncilSynthesis;
21
+ export declare function synthesizePhaseCouncilAdvisory(phaseNumber: number, phaseSummary: string, verdicts: CouncilMemberVerdict[], roundNumber: number, config?: Partial<CouncilConfig>, _workingDir?: string): PhaseCouncilSynthesis;