opencode-swarm 7.65.3 → 7.66.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.
@@ -78,6 +78,7 @@ Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder
78
78
  Additionally, present these two sub-items as part of the same exchange:
79
79
  - Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel.
80
80
  - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
81
+ - auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking "Ready for Phase N+1?"; runtime toggle via /swarm auto-proceed on|off.
81
82
 
82
83
  The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
83
84
 
@@ -117,7 +117,14 @@ The tool will automatically write the retrospective to \`.swarm/evidence/retro-{
117
117
  6. Do NOT call `phase_complete` or `/swarm close` until `.swarm/evidence/final-council.json` exists with an approved, plan-bound, quorumed final-council verdict. When `final_council` is enabled, `phase_complete` will block until that evidence exists.
118
118
  If enabled but NOT the last phase, skip silently - final council only runs once, after all phases.
119
119
  6. Summarize to user
120
- 7. Ask: "Ready for Phase [N+1]?"
120
+ 7. Check the AUTO_PROCEED STATUS banner (injected into your context by the system-enhancer). The banner shows:
121
+ - `auto-proceed: <on|off>` — the current effective value
122
+ - `source: <session|plan-or-default>` — which side it came from
123
+ - `nudge: <true|false>` — whether the FR-004 first-boundary nudge has already been done
124
+ Then branch:
125
+ - If `auto-proceed: on`: call `phase_complete`, then advance to the first task of the next phase. Do NOT ask the user.
126
+ - If `auto-proceed: off` AND `nudge: false`: after the user confirms the phase transition, suggest enabling auto-proceed. Use the swarm_command tool to record the user's answer: `swarm_command({ command: "auto-proceed", args: ["on"] })` for yes, `swarm_command({ command: "auto-proceed", args: ["off"] })` for no. Either call sets nudge to true and prevents re-nudging.
127
+ - If `auto-proceed: off` AND `nudge: true`: Ask "Ready for Phase [N+1]?" and wait for user confirmation before proceeding.
121
128
 
122
129
  CATASTROPHIC VIOLATION CHECK — ask yourself at EVERY phase boundary (MODE: PHASE-WRAP):
123
130
  "Have I delegated to the active swarm's reviewer agent at least once this phase?"
@@ -49,6 +49,7 @@ Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder
49
49
  Additionally, present these two sub-items as part of the same exchange:
50
50
  - Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel.
51
51
  - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
52
+ - auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking "Ready for Phase N+1?"; runtime toggle via /swarm auto-proceed on|off.
52
53
 
53
54
  The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
54
55
 
package/README.md CHANGED
@@ -134,6 +134,8 @@ Swarm has two independent mode systems:
134
134
  | **Lean Turbo** | High | Fast | Parallel lanes for non-conflicting tasks (up to `max_parallel_coders` coders) |
135
135
  | **Full-Auto** | Deterministic policy + critic oversight | Fast | Unattended multi-interaction runs |
136
136
 
137
+ **Auto-proceed** — a session toggle (`/swarm auto-proceed [on|off]`) that skips the "Ready for Phase N+1?" prompt at phase boundaries. Defaults to `false`; set as a plan default via `execution_profile.auto_proceed` during QA GATE SELECTION. Session override always wins. Independent of Full-Auto.
138
+
137
139
  Full-Auto reduces approval friction by deterministically allowing safe operations (read-only tools, in-scope writes, safe shell) and routing every ambiguous or high-risk action (writes to plugin/build/guardrail paths, network, dependency changes, plan/phase mutations, subagent delegation) through the read-only `critic_oversight` agent before it executes. Denials are returned to the agent as structured signals so it can choose a safer path; repeated denials pause the run; phase completion requires an APPROVED oversight record. See [docs/modes.md](docs/modes.md#full-auto) for `mode`, `permission_policy`, `denials`, and `oversight` config keys, fail-closed semantics, and recovery from a paused run.
138
140
 
139
141
  **Project mode** — persistent via `execution_mode` config key:
@@ -144,7 +146,7 @@ Full-Auto reduces approval friction by deterministically allowing safe operation
144
146
  | `balanced` (default) | Standard hooks |
145
147
  | `fast` | Skips compaction service — for short sessions under context pressure |
146
148
 
147
- Switch session modes with `/swarm turbo [on|off]` or `/swarm full-auto [on|off]`. Set project mode in config. Lean Turbo is configured in `turbo.lean.*` in config and composes with all session modes. See [docs/modes.md](docs/modes.md).
149
+ Switch session modes with `/swarm turbo [on|off]` or `/swarm full-auto [on|off]`. Control phase-boundary auto-proceed with `/swarm auto-proceed [on|off]`. Set project mode in config. Lean Turbo is configured in `turbo.lean.*` in config and composes with all session modes. See [docs/modes.md](docs/modes.md).
148
150
 
149
151
  ---
150
152
 
package/dist/cli/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "opencode-swarm",
55
- version: "7.65.3",
55
+ version: "7.66.0",
56
56
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
57
57
  main: "dist/index.js",
58
58
  types: "dist/index.d.ts",
@@ -14700,7 +14700,8 @@ var init_plan_schema = __esm(() => {
14700
14700
  parallelization_enabled: exports_external.boolean().default(false),
14701
14701
  max_concurrent_tasks: exports_external.number().int().min(1).max(64).default(1),
14702
14702
  council_parallel: exports_external.boolean().default(false),
14703
- locked: exports_external.boolean().default(false)
14703
+ locked: exports_external.boolean().default(false),
14704
+ auto_proceed: exports_external.boolean().default(false)
14704
14705
  });
14705
14706
  TaskStatusSchema = exports_external.enum([
14706
14707
  "pending",
@@ -22753,6 +22754,45 @@ var init_state = __esm(() => {
22753
22754
  };
22754
22755
  });
22755
22756
 
22757
+ // src/commands/auto-proceed.ts
22758
+ async function handleAutoProceedCommand(_directory, args, sessionID) {
22759
+ if (!sessionID || sessionID.trim() === "") {
22760
+ return "Error: No active session context. Auto-proceed requires an active session. Use /swarm auto-proceed from within an OpenCode session, or start a session first.";
22761
+ }
22762
+ const session = getAgentSession(sessionID);
22763
+ if (!session) {
22764
+ return "Error: No active session. Auto-proceed requires an active session to operate.";
22765
+ }
22766
+ if (stripKnownSwarmPrefix(session.agentName) !== "architect") {
22767
+ return `Error: Auto-proceed can only be toggled from the architect session. Currently active session is: ${session.agentName}`;
22768
+ }
22769
+ const arg = args[0]?.toLowerCase();
22770
+ const wasUndefinedBefore = session.autoProceedOverride === undefined;
22771
+ let newAutoProceedOverride;
22772
+ if (arg === "on") {
22773
+ newAutoProceedOverride = true;
22774
+ } else if (arg === "off") {
22775
+ newAutoProceedOverride = false;
22776
+ } else if (arg === undefined) {
22777
+ newAutoProceedOverride = !session.autoProceedOverride;
22778
+ } else {
22779
+ return 'Error: Invalid argument for /swarm auto-proceed. Valid options: "on", "off", or omit the argument to toggle.';
22780
+ }
22781
+ session.autoProceedOverride = newAutoProceedOverride;
22782
+ if (arg === "on" || arg === "off" || arg === undefined && wasUndefinedBefore) {
22783
+ session.autoProceedNudgeDone = true;
22784
+ }
22785
+ if (newAutoProceedOverride) {
22786
+ return "Auto-proceed is now ON. Phase boundaries will advance automatically.";
22787
+ } else {
22788
+ return "Auto-proceed is now OFF. You will be asked before advancing to the next phase.";
22789
+ }
22790
+ }
22791
+ var init_auto_proceed = __esm(() => {
22792
+ init_schema();
22793
+ init_state();
22794
+ });
22795
+
22756
22796
  // src/commands/benchmark.ts
22757
22797
  async function handleBenchmarkCommand(directory, args) {
22758
22798
  let cumulative = args.includes("--cumulative");
@@ -48893,6 +48933,12 @@ function serializeAgentSession(s) {
48893
48933
  ...Object.keys(stageBCompletion).length > 0 && { stageBCompletion },
48894
48934
  ...s.maxConcurrencyOverride !== undefined && {
48895
48935
  maxConcurrencyOverride: s.maxConcurrencyOverride
48936
+ },
48937
+ ...s.autoProceedOverride !== undefined && {
48938
+ autoProceedOverride: s.autoProceedOverride
48939
+ },
48940
+ ...s.autoProceedNudgeDone !== undefined && {
48941
+ autoProceedNudgeDone: s.autoProceedNudgeDone
48896
48942
  }
48897
48943
  };
48898
48944
  }
@@ -61755,7 +61801,8 @@ var init_tool_policy = __esm(() => {
61755
61801
  "sdd validate",
61756
61802
  "sdd project",
61757
61803
  "sync-plan",
61758
- "export"
61804
+ "export",
61805
+ "auto-proceed"
61759
61806
  ];
61760
61807
  SWARM_COMMAND_TOOL_ALLOWLIST = new Set([
61761
61808
  "agents",
@@ -61784,7 +61831,8 @@ var init_tool_policy = __esm(() => {
61784
61831
  "sdd status",
61785
61832
  "sdd validate",
61786
61833
  "sync-plan",
61787
- "export"
61834
+ "export",
61835
+ "auto-proceed"
61788
61836
  ]);
61789
61837
  HUMAN_ONLY_SWARM_COMMANDS = new Set([
61790
61838
  "acknowledge-spec-drift",
@@ -61878,6 +61926,7 @@ __export(exports_commands, {
61878
61926
  handleCheckpointCommand: () => handleCheckpointCommand,
61879
61927
  handleBrainstormCommand: () => handleBrainstormCommand,
61880
61928
  handleBenchmarkCommand: () => handleBenchmarkCommand,
61929
+ handleAutoProceedCommand: () => handleAutoProceedCommand,
61881
61930
  handleArchiveCommand: () => handleArchiveCommand,
61882
61931
  handleAnalyzeCommand: () => handleAnalyzeCommand,
61883
61932
  handleAgentsCommand: () => handleAgentsCommand,
@@ -62130,6 +62179,7 @@ var init_commands = __esm(() => {
62130
62179
  init_acknowledge_spec_drift();
62131
62180
  init_agents();
62132
62181
  init_archive();
62182
+ init_auto_proceed();
62133
62183
  init_benchmark();
62134
62184
  init_checkpoint2();
62135
62185
  init_close();
@@ -62362,6 +62412,7 @@ var init_registry = __esm(() => {
62362
62412
  init_acknowledge_spec_drift();
62363
62413
  init_agents();
62364
62414
  init_archive();
62415
+ init_auto_proceed();
62365
62416
  init_benchmark();
62366
62417
  init_checkpoint2();
62367
62418
  init_close();
@@ -62839,6 +62890,13 @@ Subcommands:
62839
62890
  details: 'Toggles Full-Auto Mode which enables autonomous execution without confirmation prompts. When enabled, the architect proceeds through implementation steps automatically. Session-scoped \u2014 resets on new session. Use "on" or "off" to set explicitly, or toggle with no argument.',
62840
62891
  category: "utility"
62841
62892
  },
62893
+ "auto-proceed": {
62894
+ handler: (ctx) => handleAutoProceedCommand(ctx.directory, ctx.args, ctx.sessionID),
62895
+ description: "Toggle or set auto-proceed override for the active session",
62896
+ args: "[on|off]",
62897
+ category: "config",
62898
+ details: 'Without argument, toggles auto-proceed mode. With "on" or "off", sets the state explicitly.'
62899
+ },
62842
62900
  "write-retro": {
62843
62901
  handler: (ctx) => handleWriteRetroCommand(ctx.directory, ctx.args),
62844
62902
  description: "Write a retrospective evidence bundle for a completed phase <json>",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Handles the /swarm auto-proceed command.
3
+ * Sets or toggles the auto-proceed override for the active session.
4
+ *
5
+ * Unlike full-auto, this command has no config-level enablement requirement,
6
+ * no durable state, and no v2 oversight infrastructure.
7
+ *
8
+ * @param directory - Project directory (accepted for signature consistency with other command handlers; unused)
9
+ * @param args - Optional argument: "on" | "off" | undefined (toggle behavior)
10
+ * @param sessionID - Session ID for accessing active session state
11
+ * @returns Feedback message about auto-proceed override state
12
+ */
13
+ export declare function handleAutoProceedCommand(_directory: string, args: string[], sessionID: string): Promise<string>;
@@ -3,6 +3,7 @@ export { handleAcknowledgeSpecDriftCommand } from './acknowledge-spec-drift';
3
3
  export { handleAgentsCommand } from './agents';
4
4
  export { handleAnalyzeCommand } from './analyze';
5
5
  export { handleArchiveCommand } from './archive';
6
+ export { handleAutoProceedCommand } from './auto-proceed';
6
7
  export { handleBenchmarkCommand } from './benchmark';
7
8
  export { handleBrainstormCommand } from './brainstorm';
8
9
  export { handleCheckpointCommand } from './checkpoint';
@@ -457,6 +457,13 @@ export declare const COMMAND_REGISTRY: {
457
457
  readonly details: "Toggles Full-Auto Mode which enables autonomous execution without confirmation prompts. When enabled, the architect proceeds through implementation steps automatically. Session-scoped — resets on new session. Use \"on\" or \"off\" to set explicitly, or toggle with no argument.";
458
458
  readonly category: "utility";
459
459
  };
460
+ readonly 'auto-proceed': {
461
+ readonly handler: (ctx: CommandContext) => Promise<string>;
462
+ readonly description: "Toggle or set auto-proceed override for the active session";
463
+ readonly args: "[on|off]";
464
+ readonly category: "config";
465
+ readonly details: "Without argument, toggles auto-proceed mode. With \"on\" or \"off\", sets the state explicitly.";
466
+ };
460
467
  readonly 'write-retro': {
461
468
  readonly handler: (ctx: CommandContext) => Promise<string>;
462
469
  readonly description: "Write a retrospective evidence bundle for a completed phase <json>";
@@ -1,5 +1,5 @@
1
1
  import type { ResolvedSwarmCommand, SwarmCommandPolicyResult } from './command-dispatch.js';
2
- export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sdd", "sdd status", "sdd validate", "sdd project", "sync-plan", "export"];
2
+ export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sdd", "sdd status", "sdd validate", "sdd project", "sync-plan", "export", "auto-proceed"];
3
3
  export type SwarmCommandToolInputCommand = (typeof SWARM_COMMAND_TOOL_COMMANDS)[number];
4
4
  export declare const SWARM_COMMAND_TOOL_ALLOWLIST: Set<string>;
5
5
  /**
@@ -73,8 +73,10 @@ export declare const COMPACTION_DEFAULTS: {
73
73
  };
74
74
  export declare const TURBO_MODE_BANNER = "## \uD83D\uDE80 TURBO MODE ACTIVE\n\n**Speed optimization enabled for this session.**\n\nWhile Turbo Mode is active:\n- **Stage A gates** (lint, imports, pre_check_batch) are still REQUIRED for ALL tasks\n- **Tier 3 tasks** (security-sensitive files matching: architect*.ts, delegation*.ts, guardrails*.ts, adversarial*.ts, sanitiz*.ts, auth*, permission*, crypto*, secret*, security) still require FULL review (Stage B)\n- **Tier 0-2 tasks** can skip Stage B (reviewer, test_engineer) to speed up execution\n- **Phase completion gates** (completion-verify and drift verification gate) are automatically bypassed \u2014 phase_complete will succeed without drift verification evidence when turbo is active. Note: turbo bypass is session-scoped; one session's turbo does not affect other sessions.\n\nClassification still determines the pipeline:\n- TIER 0 (metadata): lint + diff only \u2014 no change\n- TIER 1 (docs): Stage A + reviewer \u2014 no change\n- TIER 2 (standard code): Stage A + reviewer + test_engineer \u2014 CAN SKIP Stage B with turboMode\n- TIER 3 (critical): Stage A + 2x reviewer + 2x test_engineer \u2014 Stage B REQUIRED (no turbo bypass)\n\nDo NOT skip Stage A gates. Do NOT skip Stage B for TIER 3.\n";
75
75
  export declare const FULL_AUTO_BANNER = "## \u26A1 FULL-AUTO MODE ACTIVE\n\nYou are operating without a human in the loop. All escalations route to the Autonomous Oversight Critic instead of a user.\n\nBehavioral changes:\n- TIER 3 escalations go to the critic, not a human. Frame your questions technically, not conversationally.\n- Phase completion approval comes from the critic. Ensure all evidence is written before requesting.\n- The critic defaults to REJECT. Do not attempt to pressure, negotiate, or shortcut. Complete the evidence trail.\n- If the critic returns ESCALATE_TO_HUMAN, the session will pause or terminate. Only the critic can trigger this.\n- Do NOT ask \"Ready for Phase N+1?\" \u2014 call phase_complete directly. The critic reviews automatically.\n";
76
+ export declare const AUTO_PROCEED_BANNER = "## \u23ED\uFE0F AUTO-PROCEED STATUS\n\nAuto-proceed controls whether the architect advances to the next phase automatically (skipping the \"Ready for Phase N+1?\" confirmation).\n\nBehavioral rules:\n- Session override (set via /swarm auto-proceed on|off) wins over the plan default.\n- If neither is set, auto-proceed defaults to OFF and the architect asks before advancing.\n- Full-auto mode (critic oversight) is independent \u2014 it has its own auto-advance mechanism.\n- autoProceedNudgeDone prevents the FR-004 first-boundary nudge from re-firing in this session.\n\nTo toggle at runtime: call swarm_command({ command: \"auto-proceed\", args: [\"on\"|\"off\"] }) from the architect.\n";
76
77
  /**
77
78
  * Canonical default Lean Turbo configuration.
79
+
78
80
  *
79
81
  * This is the single source of truth for all LeanTurboConfig fields.
80
82
  * Consumers MUST reference this constant instead of hardcoding their own
@@ -4,6 +4,7 @@ export declare const ExecutionProfileSchema: z.ZodObject<{
4
4
  max_concurrent_tasks: z.ZodDefault<z.ZodNumber>;
5
5
  council_parallel: z.ZodDefault<z.ZodBoolean>;
6
6
  locked: z.ZodDefault<z.ZodBoolean>;
7
+ auto_proceed: z.ZodDefault<z.ZodBoolean>;
7
8
  }, z.core.$strip>;
8
9
  export type ExecutionProfile = z.infer<typeof ExecutionProfileSchema>;
9
10
  export declare const TaskStatusSchema: z.ZodEnum<{
@@ -166,6 +167,7 @@ export declare const PlanSchema: z.ZodObject<{
166
167
  max_concurrent_tasks: z.ZodDefault<z.ZodNumber>;
167
168
  council_parallel: z.ZodDefault<z.ZodBoolean>;
168
169
  locked: z.ZodDefault<z.ZodBoolean>;
170
+ auto_proceed: z.ZodDefault<z.ZodBoolean>;
169
171
  }, z.core.$strip>>;
170
172
  }, z.core.$strip>;
171
173
  export type Plan = z.infer<typeof PlanSchema>;
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.65.3",
72
+ version: "7.66.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",
@@ -851,6 +851,17 @@ Behavioral changes:
851
851
  - The critic defaults to REJECT. Do not attempt to pressure, negotiate, or shortcut. Complete the evidence trail.
852
852
  - If the critic returns ESCALATE_TO_HUMAN, the session will pause or terminate. Only the critic can trigger this.
853
853
  - Do NOT ask "Ready for Phase N+1?" — call phase_complete directly. The critic reviews automatically.
854
+ `, AUTO_PROCEED_BANNER = `## ⏭️ AUTO-PROCEED STATUS
855
+
856
+ Auto-proceed controls whether the architect advances to the next phase automatically (skipping the "Ready for Phase N+1?" confirmation).
857
+
858
+ Behavioral rules:
859
+ - Session override (set via /swarm auto-proceed on|off) wins over the plan default.
860
+ - If neither is set, auto-proceed defaults to OFF and the architect asks before advancing.
861
+ - Full-auto mode (critic oversight) is independent — it has its own auto-advance mechanism.
862
+ - autoProceedNudgeDone prevents the FR-004 first-boundary nudge from re-firing in this session.
863
+
864
+ To toggle at runtime: call swarm_command({ command: "auto-proceed", args: ["on"|"off"] }) from the architect.
854
865
  `, DEFAULT_LEAN_TURBO_CONFIG, DEFAULT_WORKTREE_ISOLATION_CONFIG, LEAN_TURBO_BANNER = `## \uD83D\uDEE4️ LEAN TURBO ACTIVE
855
866
 
856
867
  Lane-based parallel execution is enabled for this phase.
@@ -16568,7 +16579,8 @@ var init_plan_schema = __esm(() => {
16568
16579
  parallelization_enabled: exports_external.boolean().default(false),
16569
16580
  max_concurrent_tasks: exports_external.number().int().min(1).max(64).default(1),
16570
16581
  council_parallel: exports_external.boolean().default(false),
16571
- locked: exports_external.boolean().default(false)
16582
+ locked: exports_external.boolean().default(false),
16583
+ auto_proceed: exports_external.boolean().default(false)
16572
16584
  });
16573
16585
  TaskStatusSchema = exports_external.enum([
16574
16586
  "pending",
@@ -43164,6 +43176,7 @@ __export(exports_state, {
43164
43176
  getTaskState: () => getTaskState,
43165
43177
  getSessionEnvironment: () => getSessionEnvironment,
43166
43178
  getRunContext: () => getRunContext,
43179
+ getResolvedAutoProceed: () => getResolvedAutoProceed,
43167
43180
  getAgentSession: () => getAgentSession,
43168
43181
  getActiveWindow: () => getActiveWindow,
43169
43182
  ensureSessionEnvironment: () => ensureSessionEnvironment,
@@ -43873,6 +43886,9 @@ function hasActiveLeanTurbo(sessionID) {
43873
43886
  }
43874
43887
  return false;
43875
43888
  }
43889
+ function getResolvedAutoProceed(session, planAutoProceed) {
43890
+ return session.autoProceedOverride ?? planAutoProceed ?? false;
43891
+ }
43876
43892
  function setSessionEnvironment(sessionId, profile) {
43877
43893
  swarmState.environmentProfiles.set(sessionId, profile);
43878
43894
  }
@@ -43979,6 +43995,45 @@ var init_state = __esm(() => {
43979
43995
  };
43980
43996
  });
43981
43997
 
43998
+ // src/commands/auto-proceed.ts
43999
+ async function handleAutoProceedCommand(_directory, args2, sessionID) {
44000
+ if (!sessionID || sessionID.trim() === "") {
44001
+ return "Error: No active session context. Auto-proceed requires an active session. Use /swarm auto-proceed from within an OpenCode session, or start a session first.";
44002
+ }
44003
+ const session = getAgentSession(sessionID);
44004
+ if (!session) {
44005
+ return "Error: No active session. Auto-proceed requires an active session to operate.";
44006
+ }
44007
+ if (stripKnownSwarmPrefix(session.agentName) !== "architect") {
44008
+ return `Error: Auto-proceed can only be toggled from the architect session. Currently active session is: ${session.agentName}`;
44009
+ }
44010
+ const arg = args2[0]?.toLowerCase();
44011
+ const wasUndefinedBefore = session.autoProceedOverride === undefined;
44012
+ let newAutoProceedOverride;
44013
+ if (arg === "on") {
44014
+ newAutoProceedOverride = true;
44015
+ } else if (arg === "off") {
44016
+ newAutoProceedOverride = false;
44017
+ } else if (arg === undefined) {
44018
+ newAutoProceedOverride = !session.autoProceedOverride;
44019
+ } else {
44020
+ return 'Error: Invalid argument for /swarm auto-proceed. Valid options: "on", "off", or omit the argument to toggle.';
44021
+ }
44022
+ session.autoProceedOverride = newAutoProceedOverride;
44023
+ if (arg === "on" || arg === "off" || arg === undefined && wasUndefinedBefore) {
44024
+ session.autoProceedNudgeDone = true;
44025
+ }
44026
+ if (newAutoProceedOverride) {
44027
+ return "Auto-proceed is now ON. Phase boundaries will advance automatically.";
44028
+ } else {
44029
+ return "Auto-proceed is now OFF. You will be asked before advancing to the next phase.";
44030
+ }
44031
+ }
44032
+ var init_auto_proceed = __esm(() => {
44033
+ init_schema();
44034
+ init_state();
44035
+ });
44036
+
43982
44037
  // src/commands/benchmark.ts
43983
44038
  async function handleBenchmarkCommand(directory, args2) {
43984
44039
  let cumulative = args2.includes("--cumulative");
@@ -72140,6 +72195,12 @@ function serializeAgentSession(s) {
72140
72195
  ...Object.keys(stageBCompletion).length > 0 && { stageBCompletion },
72141
72196
  ...s.maxConcurrencyOverride !== undefined && {
72142
72197
  maxConcurrencyOverride: s.maxConcurrencyOverride
72198
+ },
72199
+ ...s.autoProceedOverride !== undefined && {
72200
+ autoProceedOverride: s.autoProceedOverride
72201
+ },
72202
+ ...s.autoProceedNudgeDone !== undefined && {
72203
+ autoProceedNudgeDone: s.autoProceedNudgeDone
72143
72204
  }
72144
72205
  };
72145
72206
  }
@@ -86457,7 +86518,8 @@ var init_tool_policy = __esm(() => {
86457
86518
  "sdd validate",
86458
86519
  "sdd project",
86459
86520
  "sync-plan",
86460
- "export"
86521
+ "export",
86522
+ "auto-proceed"
86461
86523
  ];
86462
86524
  SWARM_COMMAND_TOOL_ALLOWLIST = new Set([
86463
86525
  "agents",
@@ -86486,7 +86548,8 @@ var init_tool_policy = __esm(() => {
86486
86548
  "sdd status",
86487
86549
  "sdd validate",
86488
86550
  "sync-plan",
86489
- "export"
86551
+ "export",
86552
+ "auto-proceed"
86490
86553
  ]);
86491
86554
  HUMAN_ONLY_SWARM_COMMANDS = new Set([
86492
86555
  "acknowledge-spec-drift",
@@ -86580,6 +86643,7 @@ __export(exports_commands, {
86580
86643
  handleCheckpointCommand: () => handleCheckpointCommand,
86581
86644
  handleBrainstormCommand: () => handleBrainstormCommand,
86582
86645
  handleBenchmarkCommand: () => handleBenchmarkCommand,
86646
+ handleAutoProceedCommand: () => handleAutoProceedCommand,
86583
86647
  handleArchiveCommand: () => handleArchiveCommand,
86584
86648
  handleAnalyzeCommand: () => handleAnalyzeCommand,
86585
86649
  handleAgentsCommand: () => handleAgentsCommand,
@@ -86832,6 +86896,7 @@ var init_commands = __esm(() => {
86832
86896
  init_acknowledge_spec_drift();
86833
86897
  init_agents();
86834
86898
  init_archive();
86899
+ init_auto_proceed();
86835
86900
  init_benchmark();
86836
86901
  init_checkpoint2();
86837
86902
  init_close();
@@ -87064,6 +87129,7 @@ var init_registry = __esm(() => {
87064
87129
  init_acknowledge_spec_drift();
87065
87130
  init_agents();
87066
87131
  init_archive();
87132
+ init_auto_proceed();
87067
87133
  init_benchmark();
87068
87134
  init_checkpoint2();
87069
87135
  init_close();
@@ -87541,6 +87607,13 @@ Subcommands:
87541
87607
  details: 'Toggles Full-Auto Mode which enables autonomous execution without confirmation prompts. When enabled, the architect proceeds through implementation steps automatically. Session-scoped — resets on new session. Use "on" or "off" to set explicitly, or toggle with no argument.',
87542
87608
  category: "utility"
87543
87609
  },
87610
+ "auto-proceed": {
87611
+ handler: (ctx) => handleAutoProceedCommand(ctx.directory, ctx.args, ctx.sessionID),
87612
+ description: "Toggle or set auto-proceed override for the active session",
87613
+ args: "[on|off]",
87614
+ category: "config",
87615
+ details: 'Without argument, toggles auto-proceed mode. With "on" or "off", sets the state explicitly.'
87616
+ },
87544
87617
  "write-retro": {
87545
87618
  handler: (ctx) => handleWriteRetroCommand(ctx.directory, ctx.args),
87546
87619
  description: "Write a retrospective evidence bundle for a completed phase <json>",
@@ -89004,6 +89077,9 @@ INLINE GATE SELECTION -- no pending section found in context.md. You MUST ask no
89004
89077
 
89005
89078
  MANDATORY PAUSE: Present the gate question. Wait for the user's answer.
89006
89079
  Do NOT call \`set_qa_gates\` until the user has responded.
89080
+
89081
+ Execution preferences (auto-proceed phase transitions):
89082
+ - \`auto_proceed\` (boolean, default false): When true, the architect auto-advances to the next phase without asking "Ready for Phase N+1?". Runtime toggle via /swarm auto-proceed on|off.
89007
89083
  <!-- BEHAVIORAL_GUIDANCE_END -->
89008
89084
  - Preserve task granularity, test task deduplication, phase count guidance, and TRACEABILITY CHECK rules from the loaded skill.
89009
89085
 
@@ -89049,6 +89125,17 @@ ACTION: Load skill file:.opencode/skills/phase-wrap/SKILL.md immediately. Follow
89049
89125
 
89050
89126
  HARD CONSTRAINTS:
89051
89127
  - Complete retrospective evidence with \`write_retro\` before \`phase_complete\`.
89128
+ - Before step 7 (phase transition): read the AUTO_PROCEED STATUS banner injected into your context. The banner tells you:
89129
+ - auto-proceed state (on/off)
89130
+ - source (session override vs plan-or-default)
89131
+ - nudge flag (true if user has already been asked or has explicitly toggled)
89132
+ - If auto-proceed is ON (banner shows "on"): call \`phase_complete\`, then advance to the first task of the next phase. Do NOT ask the user.
89133
+ - If auto-proceed is OFF (banner shows "off") AND nudge flag is false: after the user confirms the phase transition, suggest enabling auto-proceed with: "Auto-proceed is currently disabled. Would you like me to automatically advance to future phases without asking?" Then:
89134
+ - On YES: call \`swarm_command({ command: "auto-proceed", args: ["on"] })\` — this sets both override and nudge-done
89135
+ - On NO: call \`swarm_command({ command: "auto-proceed", args: ["off"] })\` — this sets override=false and nudge-done=true
89136
+ - If auto-proceed is OFF AND nudge flag is true: just ask "Ready for Phase [N+1]?" as before.
89137
+ - SC-001: auto-proceed only skips the phase-transition confirmation. The architect MUST still stop for blocked tasks, user questions, clarification needs, and any decision requiring human input. This behavior is NOT affected by the auto_proceed setting.
89138
+ - Full-auto mode (critic oversight) is independent — its existing "Do NOT ask Ready for Phase N+1?" override continues to work. auto_proceed has no additional effect under full-auto.
89052
89139
 
89053
89140
  > **NOTE**: The \`critic_oversight\` agent (\`AUTONOMOUS_OVERSIGHT_PROMPT\`) is dispatched only via full-auto mode (\`src/full-auto/oversight.ts\`). It has no architect MODE dispatch path — it is **NOT** reachable from \`MODE: CRITIC-GATE\`, \`MODE: EXECUTE\`, or \`MODE: PHASE-WRAP\`. This is intentional: it serves as the sole quality gate in autonomous oversight mode.
89054
89141
 
@@ -103238,6 +103325,7 @@ init_schema();
103238
103325
  init_manager2();
103239
103326
  init_detector();
103240
103327
  init_manager();
103328
+ init_state();
103241
103329
  import * as fs71 from "node:fs";
103242
103330
  import * as path114 from "node:path";
103243
103331
 
@@ -103531,7 +103619,6 @@ init_preflight_service();
103531
103619
  init_status_service();
103532
103620
 
103533
103621
  // src/hooks/system-enhancer.ts
103534
- init_state();
103535
103622
  init_telemetry();
103536
103623
  init_utils();
103537
103624
 
@@ -106637,6 +106724,20 @@ ${lines.join(`
106637
106724
  tryInject(LEAN_TURBO_BANNER);
106638
106725
  }
106639
106726
  }
106727
+ const sessionIdAutoProceed = _input.sessionID;
106728
+ if (sessionIdAutoProceed) {
106729
+ const sessionAutoProceed = getAgentSession(sessionIdAutoProceed);
106730
+ if (sessionAutoProceed && stripKnownSwarmPrefix(sessionAutoProceed.agentName) === "architect") {
106731
+ const resolvedAutoProceed = getResolvedAutoProceed(sessionAutoProceed, plan2?.execution_profile?.auto_proceed);
106732
+ const source = sessionAutoProceed.autoProceedOverride !== undefined ? "session" : "plan-or-default";
106733
+ const banner = `${AUTO_PROCEED_BANNER}
106734
+ ## ⏭️ AUTO_PROCEED STATUS:
106735
+ - auto-proceed: ${resolvedAutoProceed ? "on" : "off"}
106736
+ - source: ${source}
106737
+ - nudge: ${sessionAutoProceed.autoProceedNudgeDone ? "true" : "false"}`;
106738
+ tryInject(banner);
106739
+ }
106740
+ }
106640
106741
  try {
106641
106742
  const currentPhaseNum = plan2?.current_phase ?? 1;
106642
106743
  const retroText = await buildRetroInjection(directory, currentPhaseNum, plan2?.title ?? undefined);
@@ -112462,7 +112563,9 @@ var TRANSIENT_SESSION_FIELDS = [
112462
112563
  { name: "model_fallback_index", resetValue: 0 },
112463
112564
  { name: "modelFallbackExhausted", resetValue: false },
112464
112565
  { name: "scopeViolationDetected", resetValue: false },
112465
- { name: "delegationActive", resetValue: false }
112566
+ { name: "delegationActive", resetValue: false },
112567
+ { name: "autoProceedOverride", resetValue: undefined },
112568
+ { name: "autoProceedNudgeDone", resetValue: undefined }
112466
112569
  ];
112467
112570
  var VALID_TASK_WORKFLOW_STATES = [
112468
112571
  "idle",
@@ -112563,6 +112666,8 @@ function deserializeAgentSession(s) {
112563
112666
  fullAutoDeadlockCount: s.fullAutoDeadlockCount ?? 0,
112564
112667
  fullAutoLastQuestionHash: s.fullAutoLastQuestionHash ?? null,
112565
112668
  maxConcurrencyOverride: typeof s.maxConcurrencyOverride === "number" ? Math.min(64, Math.max(1, s.maxConcurrencyOverride)) : undefined,
112669
+ autoProceedOverride: s.autoProceedOverride,
112670
+ autoProceedNudgeDone: s.autoProceedNudgeDone,
112566
112671
  prmPatternCounts: new Map,
112567
112672
  prmEscalationLevel: 0,
112568
112673
  prmLastPatternDetected: null,
@@ -131215,7 +131320,7 @@ init_effective_spec();
131215
131320
  init_state();
131216
131321
  init_create_tool();
131217
131322
  function executionProfilesEqual(a, b) {
131218
- return a.parallelization_enabled === b.parallelization_enabled && a.max_concurrent_tasks === b.max_concurrent_tasks && a.council_parallel === b.council_parallel && a.locked === b.locked;
131323
+ return a.parallelization_enabled === b.parallelization_enabled && a.max_concurrent_tasks === b.max_concurrent_tasks && a.council_parallel === b.council_parallel && a.locked === b.locked && a.auto_proceed === b.auto_proceed;
131219
131324
  }
131220
131325
  function detectPlaceholderContent(args2) {
131221
131326
  const issues = [];
@@ -131409,7 +131514,7 @@ async function executeSavePlan(args2, fallbackDir) {
131409
131514
  success: false,
131410
131515
  message: "Invalid execution_profile: schema validation failed",
131411
131516
  errors: requestedProfile.error.issues.map((i2) => `${i2.path.join(".")}: ${i2.message}`),
131412
- recovery_guidance: "Check execution_profile fields: parallelization_enabled (boolean), " + "max_concurrent_tasks (integer 1-64), council_parallel (boolean), locked (boolean)."
131517
+ recovery_guidance: "Check execution_profile fields: parallelization_enabled (boolean), " + "max_concurrent_tasks (integer 1-64), council_parallel (boolean), locked (boolean), auto_proceed (boolean)."
131413
131518
  };
131414
131519
  }
131415
131520
  if (executionProfilesEqual(existing.execution_profile, requestedProfile.data)) {
@@ -131699,7 +131804,8 @@ var save_plan = createSwarmTool({
131699
131804
  parallelization_enabled: exports_external.boolean().optional().describe("When true, enables parallel task dispatch for this plan. Default false (serial)."),
131700
131805
  max_concurrent_tasks: exports_external.number().int().min(1).max(64).optional().describe("Maximum tasks that may run concurrently when parallelization is enabled. Default 1."),
131701
131806
  council_parallel: exports_external.boolean().optional().describe("When true, council review phases may run in parallel. Default false."),
131702
- locked: exports_external.boolean().optional().describe("When true, locks the profile — future save_plan calls that include " + "execution_profile will be rejected (fail-closed). " + "Unlock by resetting the plan (reset_statuses: true).")
131807
+ locked: exports_external.boolean().optional().describe("When true, locks the profile — future save_plan calls that include " + "execution_profile will be rejected (fail-closed). " + "Unlock by resetting the plan (reset_statuses: true)."),
131808
+ auto_proceed: exports_external.boolean().optional().describe("When true, the architect advances to the next phase automatically without asking for confirmation. Default false.")
131703
131809
  }).optional().describe("Architect-facing concurrency controls. Once locked, cannot be changed without resetting. " + "Omit to preserve the existing profile.")
131704
131810
  },
131705
131811
  execute: async (args2, _directory) => {
@@ -138379,6 +138485,10 @@ async function initializeOpenCodeSwarm(ctx) {
138379
138485
  template: "/swarm full-auto $ARGUMENTS",
138380
138486
  description: "Toggle Full-Auto Mode for the active session [on|off]"
138381
138487
  },
138488
+ "swarm-auto-proceed": {
138489
+ template: "/swarm auto-proceed $ARGUMENTS",
138490
+ description: "Toggle auto-proceed mode for automatic phase advancement"
138491
+ },
138382
138492
  "swarm-write-retro": {
138383
138493
  template: "/swarm write-retro $ARGUMENTS",
138384
138494
  description: "Use /swarm write-retro to manually write a phase retrospective"
@@ -63,6 +63,10 @@ export interface SerializedAgentSession {
63
63
  stageBCompletion?: Record<string, string[]>;
64
64
  /** Session-scoped concurrency override for max_concurrent_tasks (Issue #761) */
65
65
  maxConcurrencyOverride?: number;
66
+ /** Session-level auto-proceed override (Phase 1) */
67
+ autoProceedOverride?: boolean;
68
+ /** Flag tracking whether the auto-proceed nudge has been shown (Phase 1) */
69
+ autoProceedNudgeDone?: boolean;
66
70
  }
67
71
  /**
68
72
  * Minimal interface for serialized InvocationWindow
package/dist/state.d.ts CHANGED
@@ -175,6 +175,12 @@ export interface AgentSessionState {
175
175
  * When set, overrides the plan's execution_profile.max_concurrent_tasks
176
176
  * for delegation-gate guidance. Cleared on session reset. */
177
177
  maxConcurrencyOverride?: number;
178
+ /** Session-scoped override for execution_profile.auto_proceed.
179
+ * When set, overrides the plan's auto_proceed for this session.
180
+ * true = auto-advance, false = do not auto-advance. Cleared on session reset. */
181
+ autoProceedOverride?: boolean;
182
+ /** Tracks whether the FR-004 nudge ("would you like to auto-advance?") has already been shown this session. */
183
+ autoProceedNudgeDone?: boolean;
178
184
  /** Session-level QA gate overrides layered on top of the spec-level profile.
179
185
  * Overrides can only enable gates (true); false values are ignored by
180
186
  * getEffectiveGates. Cleared on session reset. Optional for backwards
@@ -594,6 +600,13 @@ export declare function hasActiveFullAuto(sessionID?: string): boolean;
594
600
  * or if any session has that combination when no sessionID provided.
595
601
  */
596
602
  export declare function hasActiveLeanTurbo(sessionID?: string): boolean;
603
+ /**
604
+ * Resolves the effective auto_proceed value for a session.
605
+ * Session override (autoProceedOverride) takes precedence over the plan default.
606
+ * Accepts `boolean | undefined` for the plan default so callers can pass
607
+ * `plan?.execution_profile?.auto_proceed` directly without a falsy fallback.
608
+ */
609
+ export declare function getResolvedAutoProceed(session: AgentSessionState, planAutoProceed: boolean | undefined): boolean;
597
610
  export declare function setSessionEnvironment(sessionId: string, profile: EnvironmentProfile): void;
598
611
  export declare function getSessionEnvironment(sessionId: string): EnvironmentProfile | undefined;
599
612
  export declare function ensureSessionEnvironment(sessionId: string): EnvironmentProfile;
@@ -75,6 +75,7 @@ export interface SavePlanArgs {
75
75
  max_concurrent_tasks?: number;
76
76
  council_parallel?: boolean;
77
77
  locked?: boolean;
78
+ auto_proceed?: boolean;
78
79
  };
79
80
  }
80
81
  /**
@@ -95,6 +96,7 @@ export interface SavePlanResult {
95
96
  max_concurrent_tasks: number;
96
97
  council_parallel: boolean;
97
98
  locked: boolean;
99
+ auto_proceed?: boolean;
98
100
  };
99
101
  }
100
102
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.65.3",
3
+ "version": "7.66.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",