opencode-swarm 7.125.5 → 7.125.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.
@@ -57,6 +57,7 @@ If `council.general.enabled` is true in the resolved opencode-swarm config AND a
57
57
  - **Important:** If research is ongoing, apply a fixed 5-minute protocol budget to `research_needed`. If research does not complete before the budget expires, automatically reclassify the item to `user_decision` with a note that research was incomplete, then surface it to the user. This prevents the clarification funnel from stalling while waiting for external research.
58
58
  - Cross-reference design sections by name where relevant context helps (but keep HOW out of the spec).
59
59
  - Delegate to `the active swarm's reviewer agent` for an independent review of the draft spec. Reviewer must flag: requirements that encode HOW, untestable requirements, missing edge cases, silent assumptions.
60
+ → REQUIRED: The reviewer Task dispatch MUST contain a literal `ACCEPTANCE:` line. This is a pre-plan spec review (no fr_refs yet), so resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt using a one-line task-derived DONE restatement, e.g. "DONE = reviewer flags HOW-encoded requirements, untestable requirements, missing edge cases, and silent assumptions in the draft spec." A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED.
60
61
  - Apply reviewer feedback. If reviewer rejects, iterate once and re-review. After two rounds, surface remaining disagreements to the user.
61
62
  - Before writing `.swarm/spec.md`, apply the FR-002 non-shadowing check: if a non-native spec already exists, do not shadow it (see MODE: SPECIFY step 1b).
62
63
  - Write the final spec to `.swarm/spec.md`.
@@ -38,6 +38,7 @@ TASK: Fix [gate name] failure
38
38
  FILE: [affected file(s)]
39
39
  INPUT: [exact error output from the gate]
40
40
  CONSTRAINT: Fix ONLY the reported issue, do not modify other code
41
+ ACCEPTANCE: [resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt — REQUIRED on every coder/reviewer dispatch; a missing line is blocked by ACCEPTANCE_FIELD_REQUIRED. Copy the SAME ACCEPTANCE text used on the original coder dispatch for this task.]
41
42
  ✓ After coder returns, re-run the failed gate from the step that failed
42
43
  ✓ Print "Coder attempt [N/configured QA retry limit] on task [X.Y]"
43
44
 
@@ -56,6 +57,7 @@ All other gates: failure → return to coder. No self-fixes. No workarounds.
56
57
  → Subsequent `pre_check_batch` calls with `phase: <N>` will automatically diff against this baseline — only NEW findings (not in baseline) drive the fail verdict.
57
58
  -> 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.
58
59
  5b. the active swarm's coder agent - Implement (if designer scaffold produced, include it as INPUT).
60
+ → REQUIRED: The coder Task dispatch MUST contain a literal `ACCEPTANCE:` line — resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (verbatim FR/SC text when fr_refs is non-empty, otherwise a one-line task-derived DONE restatement). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED before the coder runs. Do NOT confuse the plan-task `acceptance` field with this per-dispatch header — both are required.
59
61
  → If this dispatch fails with `PLAN_CRITIC_GATE_VIOLATION`: the plan has no current critic-approved snapshot (commonly a plan approved before this mechanical gate existed). Do NOT retry the coder dispatch as-is — re-run MODE: CRITIC-GATE to get a fresh critic `APPROVED` verdict, then retry this step.
60
62
  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.
61
63
  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.
@@ -105,6 +107,7 @@ Treating pre_check_batch as a substitute for the active swarm's reviewer agent i
105
107
  After Stage A (pre_check_batch) passes:
106
108
  1. Ensure `declare_council_criteria` was called for this task (prerequisite).
107
109
  2. Dispatch all 5 council members (critic, reviewer, sme, test_engineer, explorer) in PARALLEL with task-scoped context.
110
+ → REQUIRED: Any council member whose agent role is `coder` or `reviewer` MUST receive a Task prompt containing a literal `ACCEPTANCE:` line — resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (same text as the coder delegation for this task). In the standard 5-member council only the reviewer member is gated (ACCEPTANCE_FIELD_REQUIRED); the wording covers coder too in case a future council profile includes one.
108
111
  3. Collect all 5 verdict objects. Do NOT fabricate or substitute verdicts.
109
112
  4. Call `submit_council_verdicts` with the collected verdicts.
110
113
  5. Act on the verdict: APPROVE → task passes. CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'` → HIGH/CRITICAL findings are blocking, no evidence written, return to coder with requiredFixes and re-council after fixes. CONCERNS with `success: true` → only MEDIUM/LOW advisory findings, task passes. REJECT → return to coder with requiredFixes.
@@ -114,8 +117,10 @@ Treating pre_check_batch as a substitute for the active swarm's reviewer agent i
114
117
  For set-dispatch reviewer/test_engineer verdict rows that must be attributed to plan tasks, read `file:.swarm/bundled-skills/gate-attribution/SKILL.md`. Before re-dispatching a coder for a task that already has a lane (any prior dispatch status), read `file:.swarm/bundled-skills/worktree-retry-cleanup/SKILL.md`.
115
118
 
116
119
  5j. the active swarm's reviewer agent - General review. REJECTED before the configured QA retry limit → coder retry. REJECTED at the configured QA retry limit → escalate.
120
+ → REQUIRED: The reviewer Task dispatch MUST contain a literal `ACCEPTANCE:` line — same text as the coder delegation for this task. Resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt. A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED.
117
121
  → REQUIRED: Print "reviewer: [APPROVED | REJECTED — reason]"
118
122
  5k. Security gate: if change matches TIER 3 criteria OR content contains SECURITY_KEYWORDS OR secretscan has ANY findings OR sast_scan has ANY findings at or above threshold → MUST delegate the active swarm's reviewer agent security-only review. REJECTED before the configured QA retry limit → coder retry. REJECTED at the configured QA retry limit → escalate to user.
123
+ → REQUIRED: The security-reviewer Task dispatch MUST contain a literal `ACCEPTANCE:` line — same text as the coder delegation for this task (the security review is still a reviewer dispatch; the gate does not exempt security-only reviews). Resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt. A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED.
119
124
  → REQUIRED: Print "security-reviewer: [TRIGGERED | NOT TRIGGERED — reason]"
120
125
  → If TRIGGERED: Print "security-reviewer: [APPROVED | REJECTED — reason]"
121
126
  5l. the active swarm's test_engineer agent - Verification tests. FAIL → coder retry from 5g.
@@ -135,6 +135,7 @@ There is no project where code ships without review, tests, and required documen
135
135
  If `phase_council` is enabled:
136
136
  1. Build a PHASE DOSSIER from all completed tasks in this phase, their evidence artifacts, changed-file summaries, and any drift/hallucination/mutation evidence.
137
137
  2. Dispatch the full 5-member council (`the active swarm's critic agent`, `the active swarm's reviewer agent`, `the active swarm's sme agent`, `the active swarm's test_engineer agent`, and `the active swarm's explorer agent`) in PARALLEL with phase-scoped context. Each member reviews the entire phase's work holistically and returns a `CouncilMemberVerdict` JSON object.
138
+ → REQUIRED: The reviewer council member Task dispatch MUST contain a literal `ACCEPTANCE:` line — resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (phase-scoped: concatenate the verbatim FR/SC text for every task in this phase when fr_refs is non-empty, otherwise a one-line phase-derived DONE restatement). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED. The other four members are not gated by this rule.
138
139
  3. Collect all 5 verdict objects. Do NOT fabricate or substitute verdicts.
139
140
  4. Act on the verdict: APPROVE → proceed. CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'` → HIGH/CRITICAL findings are blocking, no evidence written, must resolve requiredFixes and re-council. CONCERNS with `success: true` → only MEDIUM/LOW advisory findings, phase may proceed per `phaseConcernsAllowComplete` flag. REJECT → surface required fixes to the user before proceeding.
140
141
  5. YOU (the architect) call the `submit_phase_council_verdicts` tool with the phase number and the collected council verdicts to persist the phase-council evidence. The council members do NOT write files — they are read-only. Only the `submit_phase_council_verdicts` tool writes `.swarm/evidence/{phase}/phase-council.json` (with plan binding, member verdicts, and quorum metadata). Do this BEFORE calling `phase_complete`.
@@ -144,6 +145,7 @@ There is no project where code ships without review, tests, and required documen
144
145
  If enabled AND this is the LAST phase in the plan (all other phases have status 'complete' and no more phases remain):
145
146
  1. Build a PROJECT DOSSIER from the completed plan, all phase summaries, changed-file summaries, and all relevant evidence artifacts. This is the full 5-member council (NOT the General Council) running a completed-project review.
146
147
  2. Dispatch the full 5-member council (`the active swarm's critic agent`, `the active swarm's reviewer agent`, `the active swarm's sme agent`, `the active swarm's test_engineer agent`, and `the active swarm's explorer agent`) in PARALLEL with project-scoped context. Each member must review the entire completed body of work and return a `CouncilMemberVerdict` JSON object using `agent`, `verdict` (APPROVE|CONCERNS|REJECT), `confidence`, `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`, and `durationMs`.
148
+ → REQUIRED: The reviewer council member Task dispatch MUST contain a literal `ACCEPTANCE:` line — resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (project-scoped: concatenate the verbatim FR/SC text across all phases, otherwise a one-line project-derived DONE restatement). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED. The other four members are not gated by this rule.
147
149
  3. Collect the five returned verdict objects. Do NOT fabricate, infer, or substitute verdicts. If a member does not return valid JSON, re-dispatch that member.
148
150
  4. Call `write_final_council_evidence` with `phase`, `projectSummary`, `roundNumber`, and the collected `verdicts` array. This writes `.swarm/evidence/final-council.json` with plan binding, member verdicts, and quorum metadata.
149
151
  ⚠️ **GOTCHA**: `write_final_council_evidence` normalizes a CONCERNS verdict based on whether there are required fixes. CONCERNS with `requiredFixes > 0` → the tool writes NO evidence file (early-return `blocking_concerns_unresolved`) and `phase_complete` then blocks on the MISSING `final-council.json`. CONCERNS with zero required fixes → the tool writes a `concerns` verdict which is NON-blocking (advisory warning only). So: you MUST address required fixes from a CONCERNS verdict and re-council, or you will block on a missing evidence file. (Note: the **phase-level** council's `phaseConcernsAllowComplete` flag makes CONCERNS advisory at phase scope; the final council does not have that flag.)
@@ -283,6 +283,7 @@ TASK: Write the implementation plan to .swarm/plan.md
283
283
  OUTPUT: .swarm/plan.md
284
284
  INPUT: [provide the complete plan content below]
285
285
  CONSTRAINT: Write EXACTLY the content provided. Do not modify, summarize, or interpret.
286
+ ACCEPTANCE: DONE = .swarm/plan.md contains the verbatim plan content provided in INPUT, byte-for-byte, with no modification, summarization, or interpretation. (This fallback has no fr_refs — per ACCEPTANCE FIELD RESOLUTION in your system prompt, use this one-line task-derived DONE restatement. A missing or empty ACCEPTANCE line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED before the coder runs.)
286
287
 
287
288
  TASK GRANULARITY RULES:
288
289
  - SMALL task: 1 file, 1 logical concern. Delegate as-is.
@@ -214,6 +214,7 @@ available scope controller merely to reduce ceremony.
214
214
  **When to use `declare_scope` (preferred):** any feedback round that touches 2+ files, OR any feedback round where the file scope is not 100% obvious from the prompt. Before delegating, save a minimal plan via `save_plan` with a single phase containing the feedback-closure tasks, then call `declare_scope` per task with the exact file list.
215
215
 
216
216
  **Carve-out for direct Task delegation:** 1-file, single-function changes where the file path appears verbatim in the coder's prompt may use direct `Task(subagent_type="<coder>", ...)` delegation without `declare_scope`, where `<coder>` is the active swarm's coder agent (e.g. `coder`, or `paid_coder` when the swarm id is `paid`). This is a narrow exception; the orchestrator is responsible for verifying the scope is unambiguous.
217
+ → REQUIRED: even under this carve-out, the direct Task dispatch MUST contain a literal `ACCEPTANCE:` line — resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (one-line task-derived DONE restatement for the feedback fix, since feedback-closure runs typically have no fr_refs). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED.
217
218
 
218
219
  **Anti-pattern:** do not use `Task` delegation for multi-file feedback fixes just to skip `save_plan` — the loss of scope discipline is not worth the saved ceremony.
219
220
 
@@ -14,7 +14,7 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-s6hskqg6.js";
17
+ } from "./index-d17kqe54.js";
18
18
  import"./index-dezgmvtw.js";
19
19
  import"./index-jt7hnr7q.js";
20
20
  import"./index-kk1scggc.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-s6hskqg6.js";
4
+ } from "./index-d17kqe54.js";
5
5
  import"./index-dezgmvtw.js";
6
6
  import"./index-jt7hnr7q.js";
7
7
  import"./index-kk1scggc.js";
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-ccfkfrew.js";
5
- import"./index-s6hskqg6.js";
4
+ } from "./index-1cxp3b5y.js";
5
+ import"./index-d17kqe54.js";
6
6
  import"./index-dezgmvtw.js";
7
7
  import"./index-jt7hnr7q.js";
8
8
  import"./index-kk1scggc.js";
@@ -7,7 +7,7 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-s6hskqg6.js";
10
+ } from "./index-d17kqe54.js";
11
11
  import"./index-dezgmvtw.js";
12
12
  import"./index-jt7hnr7q.js";
13
13
  import"./index-kk1scggc.js";
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-s6hskqg6.js";
15
+ } from "./index-d17kqe54.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
@@ -12243,11 +12243,11 @@ var _internals15 = {
12243
12243
  }
12244
12244
  },
12245
12245
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
12246
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-mhhvx2pw.js");
12246
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-gke6nrc4.js");
12247
12247
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
12248
12248
  },
12249
12249
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
12250
- const { checkHivePromotions } = await import("./hive-promoter-6mhnhrbx.js");
12250
+ const { checkHivePromotions } = await import("./hive-promoter-6fg3redm.js");
12251
12251
  return checkHivePromotions(entries, knowledgeConfig, directory);
12252
12252
  },
12253
12253
  applyProposalTriage: async (directory, triage) => {
@@ -20114,8 +20114,8 @@ var _internals28 = {
20114
20114
  loadCuratorDeps: async () => {
20115
20115
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
20116
20116
  import("./schema-69z8w1ka.js"),
20117
- import("./curator-mhhvx2pw.js"),
20118
- import("./curator-llm-factory-av2tcfy9.js")
20117
+ import("./curator-gke6nrc4.js"),
20118
+ import("./curator-llm-factory-40c4852v.js")
20119
20119
  ]);
20120
20120
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
20121
20121
  }
@@ -20614,7 +20614,7 @@ import { fileURLToPath } from "url";
20614
20614
  // package.json
20615
20615
  var package_default = {
20616
20616
  name: "opencode-swarm",
20617
- version: "7.125.5",
20617
+ version: "7.125.6",
20618
20618
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
20619
20619
  main: "dist/index.js",
20620
20620
  types: "dist/index.d.ts",
@@ -41126,7 +41126,7 @@ function buildDetailedHelp(commandName, entry) {
41126
41126
  async function handleHelpCommand(ctx) {
41127
41127
  const targetCommand = ctx.args.join(" ");
41128
41128
  if (!targetCommand) {
41129
- const { buildHelpText } = await import("./index-0cdq55k0.js");
41129
+ const { buildHelpText } = await import("./index-zp330ss0.js");
41130
41130
  return buildHelpText();
41131
41131
  }
41132
41132
  const tokens = targetCommand.split(/\s+/);
@@ -41135,7 +41135,7 @@ async function handleHelpCommand(ctx) {
41135
41135
  return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
41136
41136
  }
41137
41137
  const similar = _internals62.findSimilarCommands(targetCommand);
41138
- const { buildHelpText: fullHelp } = await import("./index-0cdq55k0.js");
41138
+ const { buildHelpText: fullHelp } = await import("./index-zp330ss0.js");
41139
41139
  if (similar.length > 0) {
41140
41140
  return `Command '/swarm ${targetCommand}' not found.
41141
41141
 
@@ -41274,7 +41274,7 @@ var COMMAND_REGISTRY = {
41274
41274
  },
41275
41275
  "guardrail explain": {
41276
41276
  handler: async (ctx) => {
41277
- const { handleGuardrailExplain } = await import("./guardrail-explain-kqx2bczn.js");
41277
+ const { handleGuardrailExplain } = await import("./guardrail-explain-m34vcgjg.js");
41278
41278
  return handleGuardrailExplain(ctx.directory, ctx.args);
41279
41279
  },
41280
41280
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41284,7 +41284,7 @@ var COMMAND_REGISTRY = {
41284
41284
  },
41285
41285
  "guardrail-explain": {
41286
41286
  handler: async (ctx) => {
41287
- const { handleGuardrailExplain } = await import("./guardrail-explain-kqx2bczn.js");
41287
+ const { handleGuardrailExplain } = await import("./guardrail-explain-m34vcgjg.js");
41288
41288
  return handleGuardrailExplain(ctx.directory, ctx.args);
41289
41289
  },
41290
41290
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -42570,7 +42570,12 @@ DELEGATION ENVELOPE FIELDS \u2014 include these in every delegation for traceabi
42570
42570
 
42571
42571
  Before delegating to {{AGENT_PREFIX}}reviewer: call check_gate_status for the current task_id and include the gate results in the GATES field of the reviewer message. Format: GATES: lint=PASS/FAIL, sast_scan=PASS/FAIL, secretscan=PASS/FAIL (use PASS/FAIL/skipped for each gate). If no gates have been run yet, use GATES: none.
42572
42572
 
42573
- ACCEPTANCE FIELD RESOLUTION \u2014 before every {{AGENT_PREFIX}}coder (and {{AGENT_PREFIX}}reviewer) delegation, populate that delegation's ACCEPTANCE field like this: (1) read the current task's \`fr_refs\` from the plan; (2) if \`fr_refs\` is non-empty, look up EVERY listed FR-###/SC-### id in the current \`.swarm/spec.md\` and copy each one's full requirement text into ACCEPTANCE VERBATIM \u2014 byte-for-byte, no summarizing or paraphrasing, and concatenate all of them when a task maps to more than one; (3) if \`fr_refs\` is empty or absent, populate ACCEPTANCE with a task-derived one-line restatement of what DONE looks like instead (the same pattern as \`acceptanceCriteria\` above). ACCEPTANCE must never be empty \u2014 lacking a spec mapping is normal and is not a reason to omit it.
42573
+ ACCEPTANCE FIELD RESOLUTION \u2014 REQUIRED on every {{AGENT_PREFIX}}coder and {{AGENT_PREFIX}}reviewer Task dispatch. A dispatch with no ACCEPTANCE: line is BLOCKED by the delegation gate before the agent runs (ACCEPTANCE_FIELD_REQUIRED). Resolve it as:
42574
+ 1. Read the current task's \`fr_refs\` from the plan.
42575
+ 2. If \`fr_refs\` is non-empty: look up EVERY listed FR-###/SC-### id in the current \`.swarm/spec.md\` and copy each one's full requirement text into ACCEPTANCE VERBATIM \u2014 byte-for-byte, no summarizing or paraphrasing, and concatenate all of them when a task maps to more than one.
42576
+ 3. When the task has no spec mapping: if \`fr_refs\` is empty or absent, populate ACCEPTANCE with a task-derived one-line restatement of what DONE looks like instead (the same pattern as \`acceptanceCriteria\` above).
42577
+ ACCEPTANCE must never be empty \u2014 lacking a spec mapping is normal and is not a reason to omit it.
42578
+ NOTE: the plan-task \`acceptance\` field is a different thing. Writing acceptance on the plan task does NOT satisfy this rule. The delegation prompt needs its own literal \`ACCEPTANCE:\` line.
42574
42579
 
42575
42580
  <!-- BEHAVIORAL_GUIDANCE_START -->
42576
42581
  PARTIAL GATE RATIONALIZATIONS \u2014 automated gates \u2260 agent review. Running SOME gates is NOT compliance:
@@ -42748,7 +42753,7 @@ FILE: src/auth/login.ts
42748
42753
  INPUT: Validate email format, password >= 8 chars
42749
42754
  OUTPUT: Modified file
42750
42755
  CONSTRAINT: Do not modify other functions
42751
- ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement \u2014 see ACCEPTANCE FIELD RESOLUTION]
42756
+ ACCEPTANCE: FR-007 The login endpoint SHALL reject passwords shorter than 8 characters with HTTP 400 and a localized error message.
42752
42757
  SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
42753
42758
 
42754
42759
  {{AGENT_PREFIX}}reviewer
@@ -42756,11 +42761,13 @@ TASK: Review login validation
42756
42761
  FILE: src/auth/login.ts
42757
42762
  CHECK: [security, correctness, edge-cases]
42758
42763
  GATES: lint=PASS, sast_scan=PASS, secretscan=PASS
42759
- ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement \u2014 see ACCEPTANCE FIELD RESOLUTION; same text as the coder delegation for this task]
42764
+ ACCEPTANCE: FR-007 The login endpoint SHALL reject passwords shorter than 8 characters with HTTP 400 and a localized error message.
42760
42765
  SKILLS_USED_BY_CODER: file:.claude/skills/engineering-conventions/SKILL.md
42761
42766
  OUTPUT: VERDICT + RISK + ISSUES + ACCEPTANCE_SATISFACTION
42762
42767
  SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
42763
42768
 
42769
+ NOTE (ACCEPTANCE examples above): the FR-### form applies when fr_refs is non-empty. When the task has no fr_refs, ACCEPTANCE instead carries a one-line task-derived DONE restatement, e.g. "DONE = login rejects <8-char passwords with HTTP 400; the 6 happy-path tests pass." The reviewer delegation for the same task uses the identical ACCEPTANCE text as the coder delegation.
42770
+
42764
42771
  {{AGENT_PREFIX}}test_engineer
42765
42772
  TASK: Generate and run login validation tests
42766
42773
  FILE: src/auth/login.ts
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-ccfkfrew.js";
4
+ } from "./index-1cxp3b5y.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-qzkcy22e.js";
@@ -83,7 +83,7 @@ import {
83
83
  handleWriteRetroCommand,
84
84
  normalizeSwarmCommandInput,
85
85
  resolveCommand
86
- } from "./index-s6hskqg6.js";
86
+ } from "./index-d17kqe54.js";
87
87
  import"./index-dezgmvtw.js";
88
88
  import"./index-jt7hnr7q.js";
89
89
  import"./index-kk1scggc.js";
package/dist/cli/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-s6hskqg6.js";
10
+ } from "./index-d17kqe54.js";
11
11
  import"./index-dezgmvtw.js";
12
12
  import"./index-jt7hnr7q.js";
13
13
  import"./index-kk1scggc.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{createRequire}from"node:module";var __create=Object.create;var{getPrototypeOf:__getProtoOf,defineProperty:__defProp,getOwnPropertyNames:__getOwnPropNames,getOwnPropertyDescriptor:__getOwnPropDesc}=Object,__hasOwnProp=Object.prototype.hasOwnProperty;function __accessProp(key){return this[key]}var __toESMCache_node,__toESMCache_esm,__toESM=(mod,isNodeMode,target)=>{var canCache=mod!=null&&typeof mod==="object";if(canCache){var cache=isNodeMode?__toESMCache_node??=new WeakMap:__toESMCache_esm??=new WeakMap,cached=cache.get(mod);if(cached)return cached}target=mod!=null?__create(__getProtoOf(mod)):{};let to=isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target;for(let key of __getOwnPropNames(mod))if(!__hasOwnProp.call(to,key))__defProp(to,key,{get:__accessProp.bind(mod,key),enumerable:!0});if(canCache)cache.set(mod,to);return to},__toCommonJS=(from)=>{var entry=(__moduleCache??=new WeakMap).get(from),desc;if(entry)return entry;if(entry=__defProp({},"__esModule",{value:!0}),from&&typeof from==="object"||typeof from==="function"){for(var key of __getOwnPropNames(from))if(!__hasOwnProp.call(entry,key))__defProp(entry,key,{get:__accessProp.bind(from,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return __moduleCache.set(from,entry),entry},__moduleCache,__commonJS=(cb,mod)=>()=>(mod||cb((mod={exports:{}}).exports,mod),mod.exports);var __returnValue=(v)=>v;function __exportSetter(name,newValue){this[name]=__returnValue.bind(null,newValue)}var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0,configurable:!0,set:__exportSetter.bind(all,name)})};var __esm=(fn2,res)=>()=>(fn2&&(res=fn2(fn2=0)),res);var __require=createRequire(import.meta.url);var package_default;var init_package=__esm(()=>{package_default={name:"opencode-swarm",version:"7.125.5",description:"Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",main:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",default:"./dist/index.js"},"./package.json":"./package.json"},bin:{"opencode-swarm":"./dist/cli/index.js"},type:"module",engines:{bun:">=1.3.13"},license:"MIT",repository:{type:"git",url:"https://github.com/ZaxbyHub/opencode-swarm.git"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},keywords:["opencode","opencode-plugin","ai","agents","orchestration","swarm","multi-agent","llm"],files:["dist","dist/lang/grammars","binaries","evaluation-fixtures",".opencode/skills/brainstorm",".opencode/skills/specify",".opencode/skills/clarify-spec",".opencode/skills/resume",".opencode/skills/clarify",".opencode/skills/discover",".opencode/skills/consult",".opencode/skills/pre-phase-briefing",".opencode/skills/council",".opencode/skills/deep-dive",".opencode/skills/deep-research",".opencode/skills/codebase-review-swarm",".opencode/skills/swarm-implement",".opencode/skills/design-docs",".opencode/skills/swarm-pr-review",".opencode/skills/swarm",".opencode/skills/swarm-pr-feedback",".opencode/skills/swarm-pr-subscribe",".opencode/skills/swarm-ci-monitor",".opencode/skills/issue-ingest",".opencode/skills/plan",".opencode/skills/critic-gate",".opencode/skills/execute",".opencode/skills/phase-wrap",".opencode/skills/loop",".opencode/skills/writing-tests",".opencode/skills/running-tests",".opencode/skills/engineering-conventions",".opencode/skills/commit-pr",".opencode/skills/ci-failure-batching",".opencode/skills/gate-attribution",".opencode/skills/merge-queue-readiness",".opencode/skills/skill-edit-validation",".opencode/skills/worktree-retry-cleanup",".opencode/skills/test-file-split",".opencode/skills/fork-pr-operations",".opencode/skills/parallel-work-check",".opencode/skills/ci-fix-monitor",".opencode/skills/issue-tracer","tests/fixtures/memory-recall","README.md","LICENSE"],scripts:{clean:`bun -e "require('fs').rmSync('dist',{recursive:true,force:true})"`,build:"bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target node --format esm --external web-tree-sitter --minify-whitespace --minify-syntax && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external bash-parser --splitting && bun run scripts/copy-grammars.ts --to-dist && tsc --emitDeclarationOnly",typecheck:"tsc --noEmit",test:"bun test",lint:"biome lint .","lint:ci":"biome ci .","test:unit:ci":"bun scripts/ci/run-unit-tests-local.ts","drift:check":"bun run scripts/drift-check.ts","drift:fix":"bun run scripts/drift-check.ts --fix --confirm",format:"biome format . --write",check:"biome check --write .",dev:"bun run build && opencode","package:smoke":"node scripts/package-smoke.mjs",prepare:"bun run build","repro:704":"node scripts/repro-704.mjs","repro:1144":"bun scripts/repro-1144.mjs","repro:1873":"bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs"},dependencies:{"@opencode-ai/plugin":"^1.1.53","@opencode-ai/sdk":"^1.1.53","@vscode/tree-sitter-wasm":"^0.3.0","bash-parser":"^0.5.0","p-limit":"^7.3.0",picomatch:"^4.0.4","proper-lockfile":"^4.1.2","quick-lru":"^7.3.0","web-tree-sitter":"^0.25.0",zod:"^4.1.8"},devDependencies:{"@biomejs/biome":"2.3.14","@types/picomatch":"^4.0.3","bun-types":"1.3.8","js-yaml":"^4.1.1",typescript:"^5.7.3"}}});var QA_AGENTS,PIPELINE_AGENTS,ORCHESTRATOR_NAME="architect",ALL_SUBAGENT_NAMES,ALL_AGENT_NAMES;var init_agent_names=__esm(()=>{QA_AGENTS=["reviewer","critic","critic_oversight"],PIPELINE_AGENTS=["explorer","coder","test_engineer"],ALL_SUBAGENT_NAMES=["sme","researcher","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","curator_postmortem","curator_consolidation","council_generalist","council_skeptic","council_domain_expert","skill_improver","spec_writer",...QA_AGENTS,...PIPELINE_AGENTS],ALL_AGENT_NAMES=["architect",...ALL_SUBAGENT_NAMES]});var TOOL_METADATA,TOOL_NAMES,TOOL_NAME_SET,TOOL_DESCRIPTIONS,AGENT_TOOL_MAP;var init_tool_metadata=__esm(()=>{init_agent_names();TOOL_METADATA={diff:{description:"structured git diff with contract change detection",agents:["architect","reviewer","critic_oversight","coder","test_engineer"]},diff_summary:{description:"filter classified AST changes by category, risk level, or file for reviewer drill-down",agents:["architect","reviewer","critic_oversight"]},syntax_check:{description:"check syntax of source files using tree-sitter parsers across multiple languages, returning per-file errors",agents:["architect","coder","test_engineer"]},placeholder_scan:{description:"todo and FIXME comment detection",agents:["architect","reviewer"]},imports:{description:"find all consumers that import from a given file — use before refactoring shared modules to avoid breaking unseen dependents",agents:["architect","sme","researcher","docs","docs_design","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","reviewer","critic","coder","test_engineer"]},lint:{description:"run project linter in check or fix mode; supports biome, eslint, ruff, clippy, and more, returns structured results",agents:["architect","reviewer","coder"]},secretscan:{description:"scan for secrets (API keys, tokens, passwords) via regex and entropy; returns redacted previews, excludes common dirs",agents:["architect","reviewer","critic_oversight"]},sast_scan:{description:"static analysis security scan",agents:["architect","reviewer","critic_oversight"]},build_check:{description:"discover and run build, typecheck, and test commands for various project ecosystems in the working directory",agents:["architect","coder","test_engineer"]},pre_check_batch:{description:"parallel verification: lint:check + secretscan + sast_scan + quality_budget",agents:["architect","reviewer"]},quality_budget:{description:"code quality budget check",agents:["architect"]},symbols:{description:"extract exported symbols (functions, classes, interfaces, types) from source files; supports TypeScript, JavaScript, and Python",agents:["architect","sme","researcher","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","spec_writer","reviewer","critic","coder","test_engineer"]},complexity_hotspots:{description:"git churn × complexity risk map",agents:["architect","sme","researcher","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","reviewer","critic","critic_oversight","explorer","test_engineer"]},schema_drift:{description:"OpenAPI spec vs route drift",agents:["architect","sme","researcher","docs","explorer"]},todo_extract:{description:"structured TODO/FIXME extraction",agents:["architect","researcher","docs","explorer"]},evidence_check:{description:"verify task evidence completeness",agents:["architect","critic_oversight"]},check_gate_status:{description:"check the gate status of a specific task",agents:["architect","critic_oversight"]},completion_verify:{description:"verify completed tasks have required evidence",agents:["architect","critic_oversight"]},complete_pr_workflow:{description:"validate terminal PR workflow evidence and clear its durable session gate",agents:["architect"]},abort_pr_workflow:{description:"abort an unrecoverable PR_REVIEW/PR_FEEDBACK mechanical gate and clear its durable session state",agents:["architect"]},run_pr_feedback_stage_a:{description:"execute and persist mandatory PR-feedback Stage A checks on a content-bound revision",agents:["architect"]},submit_council_verdicts:{description:"submit pre-collected council member verdicts for synthesis (architect MUST dispatch critic/reviewer/sme/test_engineer/explorer as Agent tasks first; this tool synthesizes only, it does not contact members)",agents:[]},submit_phase_council_verdicts:{description:"submit pre-collected phase-level council member verdicts for holistic phase synthesis (architect MUST dispatch all 5 council members with phase-scoped context first; this tool synthesizes only, it does not contact members)",agents:[]},declare_council_criteria:{description:"pre-declare acceptance criteria for a task before the coder starts work; criteria are read back during council evaluation",agents:[]},sbom_generate:{description:"SBOM generation for dependency inventory",agents:["architect"]},checkpoint:{description:"create named git checkpoints for save, restore, and delete — use before risky operations to enable rollback",agents:["architect"]},pkg_audit:{description:"dependency vulnerability scan — npm/pip/cargo",agents:["architect","critic_hallucination_verifier","reviewer","critic_oversight","test_engineer"]},parse_lane_candidates:{description:"Parse [CANDIDATE] rows from a dispatch_lanes or collect_lane_results artifact (by output_ref), produce structured records with provenance, optionally persist to a per-batch sidecar JSONL. Pure-parser variant exists as internal module.",agents:["architect"]},write_pr_review_trigger_eval:{description:"persist the complete PR-review trigger evaluation with exact-set validation, dispatch provenance, and live merge-base verification",agents:["architect"]},test_runner:{description:"auto-detect and run tests",agents:["architect","reviewer","test_engineer"]},test_impact:{description:"identify test files impacted by changed source files via import analysis",agents:["architect","reviewer","critic_oversight","test_engineer"]},mutation_test:{description:"executes pre-generated mutation patches against tests, evaluates kill rate against quality gate thresholds",agents:["architect","test_engineer"]},generate_mutants:{description:"generate LLM-based mutation testing patches for source files; returns MutationPatch[] for direct consumption by the mutation_test tool",agents:["architect"]},detect_domains:{description:"detect which SME domains are relevant for a given text",agents:["architect","sme","docs","docs_design","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic","critic_oversight","explorer"]},git_blame:{description:"per-line git blame metadata: sha, author, date, summary for each line in a file",agents:["reviewer","explorer","architect"]},gitingest:{description:"fetch a GitHub repository full content via gitingest.com",agents:["architect","docs","explorer"]},retrieve_summary:{description:"retrieve the full content of a stored tool output summary",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","spec_writer","reviewer","critic","coder","test_engineer"]},retrieve_lane_output:{description:"retrieve paged full dispatch lane output by output_ref; use before consuming truncated lane previews or routing candidates from lane results",agents:["architect"]},extract_code_blocks:{description:"extract code blocks from text content and save them to files",agents:["docs","docs_design","designer","spec_writer","coder","test_engineer"]},phase_complete:{description:"mark a phase as complete and track dispatched agents",agents:["architect"]},save_plan:{description:"save a structured implementation plan",agents:["architect"]},update_task_status:{description:"mark tasks complete, track phase progress",agents:["architect"]},lint_spec:{description:"validate .swarm/spec.md format and required fields",agents:["architect","spec_writer"]},write_retro:{description:"document phase retrospectives via phase_complete workflow, capture lessons learned",agents:["architect"]},write_drift_evidence:{description:"write drift verification evidence for a completed phase",agents:["architect"]},write_hallucination_evidence:{description:"write hallucination verification evidence for a completed phase",agents:["architect"]},write_mutation_evidence:{description:"write mutation gate evidence for a completed phase; normalizes PASS/WARN/FAIL/SKIP verdicts and writes .swarm/evidence/{phase}/mutation-gate.json",agents:["architect"]},declare_scope:{description:"declare file scope for next coder delegation",agents:["architect"]},knowledge_query:{description:"query swarm or hive knowledge with optional filters",agents:["architect","skill_improver","spec_writer"]},doc_scan:{description:"scan project documentation files and build an index manifest",agents:["architect","docs_design","skill_improver","spec_writer","explorer"]},doc_extract:{description:"extract actionable constraints from project documentation",agents:["architect","docs_design","skill_improver","spec_writer"]},curator_analyze:{description:"run curator phase analysis and optionally apply knowledge recommendations",agents:["architect"]},knowledge_add:{description:"store a new lesson in the knowledge base",agents:["architect","coder"]},knowledge_recall:{description:"search the knowledge base for relevant past decisions",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","skill_improver","spec_writer","reviewer","critic","critic_oversight","explorer","coder","test_engineer"]},knowledge_remove:{description:"delete an outdated swarm knowledge entry by ID (swarm tier only)",agents:["architect"]},co_change_analyzer:{description:"detect hidden couplings by analyzing git history",agents:["architect"]},context_status:{description:"report current context-window headroom for the active session — returns tokens-used, model-limit, usage-percent, threshold-state (none/warn/critical), model name, and provider. Pure read-only: no state mutation, no warning injection. Works whether context_budget.enabled is true or false.",agents:["architect"]},search:{description:"Workspace-scoped ripgrep-style text search with structured JSON output. Supports literal and regex modes, glob filtering, and result limits. NOTE: This is text search, not structural AST search — use symbols and imports tools for structural queries.",agents:["architect","sme","docs","docs_design","designer","critic_hallucination_verifier","skill_improver","spec_writer","reviewer","critic_oversight","explorer","coder","test_engineer","researcher"]},ast_grep:{description:"Read-only structural AST search using ast-grep patterns with optional language and glob filters. Use for syntax-aware code pattern searches; does not rewrite files.",agents:["architect","sme","docs","docs_design","critic_hallucination_verifier","spec_writer","explorer","coder","test_engineer","researcher"]},actionlint_scan:{description:"Run actionlint against GitHub Actions workflow YAML files with structured findings. Resolves actionlint lazily and does not modify files.",agents:["architect","test_engineer"]},osv_scan:{description:"Run OSV-Scanner against a workspace path and return structured dependency vulnerability findings. Resolves osv-scanner lazily and does not modify files.",agents:["architect","test_engineer"]},gh_evidence:{description:"Fetch bounded GitHub pull request or issue metadata through gh for review and CI evidence. Resolves gh lazily and is read-only.",agents:["architect","researcher"]},batch_symbols:{description:"Batched symbol extraction across multiple files. Returns per-file symbol summaries with isolated error handling.",agents:["architect","critic_hallucination_verifier","reviewer","critic_oversight","explorer"]},suggest_patch:{description:"Reviewer-safe structured patch suggestion tool. Produces context-anchored patch artifacts without file modification. Returns structured diagnostics on context mismatch.",agents:["architect","reviewer"]},req_coverage:{description:"query requirement coverage status for tracked functional requirements",agents:["critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","spec_writer","critic","critic_oversight"]},get_approved_plan:{description:"retrieve the last critic-approved immutable plan snapshot for baseline drift comparison",agents:["critic_drift_verifier","critic","critic_oversight"]},repo_map:{description:"query the repo code graph: importers, dependencies, blast radius, localization, ontology facts, package boundaries, and heuristic preflight packets before refactoring; ontology findings are advisory, not formal proofs",agents:["architect","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","reviewer","critic","critic_oversight","explorer","coder"]},get_qa_gate_profile:{description:"retrieve the QA gate profile for the current plan: gates (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council), lock state, and profile hash. Read-only.",agents:["architect"]},set_qa_gates:{description:"configure the QA gate profile for the current plan. Architect-only. Ratchet-tighter only — rejected once the profile is locked after critic approval. Supports: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council.",agents:["architect"]},web_search:{description:"External web search (Tavily or Brave) for architect-driven council research, SME domain research, researcher auto-research, and skill-improver research. Returns titled results with snippets, URLs, normalized query metadata, temporal intent, freshness, and removed stale years. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides. Requires a search API key. Used by the architect in MODE: COUNCIL to gather a RESEARCH CONTEXT before dispatching council agents, by SME for opt-in external skill/source evaluation, and by the researcher agent for multi-source auto-research.",agents:["sme","researcher","skill_improver"]},web_fetch:{description:"Fetch the readable text of a single http(s) URL (architect-only). Returns decoded page text, document title, final URL after redirects, and an evidence reference. Reads primary sources that web_search only surfaces as snippets. Config-gated on council.general.enabled. Blocks private/loopback/link-local/metadata addresses (re-validated and re-pinned across redirects); enforces timeout and body size cap.",agents:[]},convene_general_council:{description:"Synthesize responses from a multi-model General Council. Accepts parallel member responses (Round 1, optionally Round 2), detects disagreements, and returns consensus points, persisting disagreements, and a structured synthesis. Architect-only. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.",agents:[]},write_final_council_evidence:{description:"Persist project-scoped final council evidence to .swarm/evidence/final-council.json. PREREQUISITE: dispatch critic, reviewer, sme, test_engineer, and explorer as project-scoped Agent tasks and collect their CouncilMemberVerdict JSON — this tool synthesizes only. Rejects on insufficient quorum or CONCERNS with unresolved requiredFixes; normalizes verdicts to approved/concerns/rejected. Architect-only.",agents:[]},skill_generate:{description:"compile knowledge entries into a structured SKILL.md draft",agents:["skill_improver"]},skill_list:{description:"list generated skill files and their status",agents:["skill_improver"]},skill_apply:{description:"activate a draft skill proposal",agents:[]},skill_inspect:{description:"inspect the content and source entries of a skill file",agents:["skill_improver"]},run_stale_reconciliation:{description:"reconcile skills against the knowledge store: mark skills stale when source knowledge is archived or deleted, or clear stale markers",agents:["architect"]},skill_regenerate:{description:"regenerate an active skill by re-clustering its source knowledge entries and updating the SKILL.md in place",agents:[]},skill_retire:{description:"retire a generated skill by adding a retired.marker file; retired skills are excluded from scoring and injection",agents:[]},skill_improve:{description:"run the skill_improver agent to review and refine skills",agents:["skill_improver"]},spec_write:{description:"author or update .swarm/spec.md for the current project",agents:["spec_writer"]},knowledge_receipt:{description:"file a receipt for retrieved knowledge (applied/ignored/contradicted + new lessons), recorded as immutable knowledge events",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","skill_improver","spec_writer","reviewer","critic","coder","test_engineer"]},knowledge_archive:{description:"archive (default), quarantine, or purge a swarm or hive knowledge entry by ID with an immutable audit tombstone; purge requires an admin flag",agents:["architect"]},swarm_memory_recall:{description:"recall scoped Swarm memory for the current repository as untrusted background",agents:[]},swarm_memory_propose:{description:"create a pending Swarm memory proposal; does not write durable memory directly",agents:[]},swarm_command:{description:"run supported /swarm commands through the canonical command registry",agents:["architect","sme","researcher","docs","docs_design","designer","reviewer","critic","explorer","coder","test_engineer"]},dispatch_lanes:{description:"dispatch read-only exploration/review lanes concurrently and BLOCK until all finish; prefer dispatch_lanes_async for non-blocking dispatch, use this only when promptAsync is unavailable",agents:["architect"]},dispatch_lanes_async:{description:"launch read-only advisory lanes non-blockingly and return a batch id plus lane session handles immediately so you can keep working; launch_timeout_ms is only a promptAsync acceptance budget, not a lane runtime timeout; poll incrementally with collect_lane_results (wait omitted or false) while doing independent investigation, or join with wait: true when you need all results",agents:["architect"]},collect_lane_results:{description:"collect or poll results for a dispatch_lanes_async batch; supports both non-blocking polling (wait omitted or false) and blocking join (wait: true). Non-blocking polls include pending lane identities by default and process settled lanes incrementally while continuing independent work; busy/retry lanes are not timed out just because they run for a long time. Does not advance workflow gates.",agents:["architect"]},summarize_work:{description:"emit a short structured summary of completed work (key decisions, assumptions, risks, constraints) at task completion; rolls up per phase for architecture-supervisor review. Advisory, never blocks.",agents:["architect","sme","researcher","docs","docs_design","designer","explorer","coder","test_engineer"]},write_architecture_supervisor_evidence:{description:"persist the architecture supervisor verdict for a phase (architect MUST dispatch critic_architecture_supervisor first and collect its JSON verdict; this tool persists only, it does not contact the supervisor)",agents:["architect"]},lean_turbo_plan_lanes:{description:"partition phase tasks into parallel lanes based on file-scope conflicts for Lean Turbo execution",agents:[]},lean_turbo_acquire_locks:{description:"acquire file locks for all files in a lane (all-or-nothing) before lane execution",agents:[]},lean_turbo_runner_status:{description:"read Lean Turbo run state from .swarm/turbo-state.json",agents:[]},lean_turbo_review:{description:"dispatch a read-only reviewer agent to evaluate a completed Lean Turbo phase",agents:[]},lean_turbo_run_phase:{description:"Execute a phase using Lean Turbo parallel lane execution. Plans lanes, acquires file locks, and dispatches coder agents concurrently. Use when Lean Turbo is active and you want to execute all tasks in a phase in parallel lanes.",agents:[]},lean_turbo_status:{description:"returns Lean Turbo configuration and active status for the current session",agents:[]},swarm_apply_patch:{description:"Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation. Use standard unified diff format only — does NOT support *** Begin Patch / *** Update File payloads (use native apply_patch for those).",agents:["coder","test_engineer"]},external_skill_discover:{description:"Discover external skill candidates from configured sources. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_list:{description:"List external skill candidates in the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_inspect:{description:"Inspect a specific external skill candidate by ID. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_promote:{description:"Promote a validated external skill candidate to an active generated skill. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_reject:{description:"Reject an external skill candidate after evaluation. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_delete:{description:"Delete an external skill candidate from the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_revoke:{description:"Revoke a previously promoted external skill. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},epic_decide_phase:{description:"Compute the Epic Mode verdict for a phase WITHOUT dispatching coders. Runs preflight + calibration + the three gates (p-threshold, hot-module, greenfield), persists the decision, and returns the verdict so the architect can dispatch waves via the visible Task tool (promote) or fall back to per-task serial (demote). Pair with `epic_plan_waves` to get the wave plan when promoted. Use when /swarm epic is on for the session.",agents:["architect"]},epic_plan_waves:{description:"Partition a phase's pending tasks into ordered concurrent waves for Epic Mode dispatch. A wave is a set of tasks with mutually disjoint declared scopes and all dependencies satisfied by prior waves. Returns `{ waves: [{ waveId, taskIds, files }, ...], serializedTasks, degradedTasks }`. "+'For each wave in order, the architect dispatches one `Task(subagent_type="coder", ...)` per `taskId` — all in one assistant message — so the wave runs concurrently and each coder appears as a visible subagent. '+"Wait for the wave to finish before dispatching the next. Pair with `epic_decide_phase` (called first; this tool is only relevant on a `promote` verdict). "+"Preflight reject reasons: `no-plan`, `no-phase`, `phase-empty`, `phase-already-complete`, `scopes-missing` (call `declare_scope` for `missingScopes`), `git-failed` (transient — retry), `planner-error`.",agents:["architect"]},epic_record_divergence:{description:"After every `update_task_status(completed)`, record the task's declared-vs-actual divergence to .swarm/epic/divergence.jsonl. Feeds Epic Mode's self-calibration loop (Capability D). Best-effort: never blocks.",agents:["architect"]}},TOOL_NAMES=Object.keys(TOOL_METADATA),TOOL_NAME_SET=new Set(TOOL_NAMES),TOOL_DESCRIPTIONS=Object.fromEntries(Object.entries(TOOL_METADATA).map(([name,meta])=>[name,meta.description])),AGENT_TOOL_MAP=(()=>{let map=Object.fromEntries(ALL_AGENT_NAMES.map((agent)=>[agent,[]]));for(let[name,meta]of Object.entries(TOOL_METADATA))for(let agent of meta.agents)map[agent].push(name);return map})()});function deepMergeInternal(base,override,depth){if(depth>=10)throw Error("deepMerge exceeded maximum depth of 10");let result={...base};for(let key of Object.keys(override)){let baseVal=base[key],overrideVal=override[key];if(typeof baseVal==="object"&&baseVal!==null&&typeof overrideVal==="object"&&overrideVal!==null&&!Array.isArray(baseVal)&&!Array.isArray(overrideVal))result[key]=deepMergeInternal(baseVal,overrideVal,depth+1);else result[key]=overrideVal}return result}function deepMerge(base,override){if(!base)return override;if(!override)return base;return deepMergeInternal(base,override,0)}var MAX_MERGE_DEPTH=10;function freezeSet(items){let set=new Set(items),proxy=new Proxy(set,{get(target,prop){if(prop==="add"||prop==="delete"||prop==="clear")return()=>{throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")};if(prop==="forEach")return(callback,thisArg)=>{let wrapped=(v,k)=>callback.call(thisArg??void 0,v,k,proxy);return set.forEach(wrapped)};let value=Reflect.get(target,prop);return typeof value==="function"?value.bind(target):value},set(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},deleteProperty(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},defineProperty(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},setPrototypeOf(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")}});return proxy}function isQAAgent(name){return QA_AGENTS.includes(name)}function isSubagent(name){return ALL_SUBAGENT_NAMES.includes(name)}function isLowCapabilityModel(modelId){let lower=(modelId||"").toLowerCase();return LOW_CAPABILITY_MODELS.some((substr)=>lower.includes(substr))}var OPENCODE_NATIVE_AGENTS,CLAUDE_CODE_NATIVE_COMMANDS,MEMORY_AGENT_TOOL_MAP,EXTERNAL_SKILL_TOOL_NAMES,EXTERNAL_SKILL_AGENT_TOOL_MAP,COUNCIL_TOOL_NAMES,COUNCIL_AGENT_TOOL_MAP,GENERAL_COUNCIL_TOOL_NAMES,GENERAL_COUNCIL_AGENT_TOOL_MAP,TURBO_TOOL_NAMES,TURBO_AGENT_TOOL_MAP,SKILL_TOOL_NAMES,SKILL_AGENT_TOOL_MAP,WRITE_TOOL_NAMES,DEFAULT_MODELS,DEFAULT_SCORING_CONFIG,LOW_CAPABILITY_MODELS,TURBO_MODE_BANNER=`## \uD83D\uDE80 TURBO MODE ACTIVE
1
+ import{createRequire}from"node:module";var __create=Object.create;var{getPrototypeOf:__getProtoOf,defineProperty:__defProp,getOwnPropertyNames:__getOwnPropNames,getOwnPropertyDescriptor:__getOwnPropDesc}=Object,__hasOwnProp=Object.prototype.hasOwnProperty;function __accessProp(key){return this[key]}var __toESMCache_node,__toESMCache_esm,__toESM=(mod,isNodeMode,target)=>{var canCache=mod!=null&&typeof mod==="object";if(canCache){var cache=isNodeMode?__toESMCache_node??=new WeakMap:__toESMCache_esm??=new WeakMap,cached=cache.get(mod);if(cached)return cached}target=mod!=null?__create(__getProtoOf(mod)):{};let to=isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target;for(let key of __getOwnPropNames(mod))if(!__hasOwnProp.call(to,key))__defProp(to,key,{get:__accessProp.bind(mod,key),enumerable:!0});if(canCache)cache.set(mod,to);return to},__toCommonJS=(from)=>{var entry=(__moduleCache??=new WeakMap).get(from),desc;if(entry)return entry;if(entry=__defProp({},"__esModule",{value:!0}),from&&typeof from==="object"||typeof from==="function"){for(var key of __getOwnPropNames(from))if(!__hasOwnProp.call(entry,key))__defProp(entry,key,{get:__accessProp.bind(from,key),enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return __moduleCache.set(from,entry),entry},__moduleCache,__commonJS=(cb,mod)=>()=>(mod||cb((mod={exports:{}}).exports,mod),mod.exports);var __returnValue=(v)=>v;function __exportSetter(name,newValue){this[name]=__returnValue.bind(null,newValue)}var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0,configurable:!0,set:__exportSetter.bind(all,name)})};var __esm=(fn2,res)=>()=>(fn2&&(res=fn2(fn2=0)),res);var __require=createRequire(import.meta.url);var package_default;var init_package=__esm(()=>{package_default={name:"opencode-swarm",version:"7.125.6",description:"Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",main:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",default:"./dist/index.js"},"./package.json":"./package.json"},bin:{"opencode-swarm":"./dist/cli/index.js"},type:"module",engines:{bun:">=1.3.13"},license:"MIT",repository:{type:"git",url:"https://github.com/ZaxbyHub/opencode-swarm.git"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},keywords:["opencode","opencode-plugin","ai","agents","orchestration","swarm","multi-agent","llm"],files:["dist","dist/lang/grammars","binaries","evaluation-fixtures",".opencode/skills/brainstorm",".opencode/skills/specify",".opencode/skills/clarify-spec",".opencode/skills/resume",".opencode/skills/clarify",".opencode/skills/discover",".opencode/skills/consult",".opencode/skills/pre-phase-briefing",".opencode/skills/council",".opencode/skills/deep-dive",".opencode/skills/deep-research",".opencode/skills/codebase-review-swarm",".opencode/skills/swarm-implement",".opencode/skills/design-docs",".opencode/skills/swarm-pr-review",".opencode/skills/swarm",".opencode/skills/swarm-pr-feedback",".opencode/skills/swarm-pr-subscribe",".opencode/skills/swarm-ci-monitor",".opencode/skills/issue-ingest",".opencode/skills/plan",".opencode/skills/critic-gate",".opencode/skills/execute",".opencode/skills/phase-wrap",".opencode/skills/loop",".opencode/skills/writing-tests",".opencode/skills/running-tests",".opencode/skills/engineering-conventions",".opencode/skills/commit-pr",".opencode/skills/ci-failure-batching",".opencode/skills/gate-attribution",".opencode/skills/merge-queue-readiness",".opencode/skills/skill-edit-validation",".opencode/skills/worktree-retry-cleanup",".opencode/skills/test-file-split",".opencode/skills/fork-pr-operations",".opencode/skills/parallel-work-check",".opencode/skills/ci-fix-monitor",".opencode/skills/issue-tracer","tests/fixtures/memory-recall","README.md","LICENSE"],scripts:{clean:`bun -e "require('fs').rmSync('dist',{recursive:true,force:true})"`,build:"bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target node --format esm --external web-tree-sitter --minify-whitespace --minify-syntax && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --external bash-parser --splitting && bun run scripts/copy-grammars.ts --to-dist && tsc --emitDeclarationOnly",typecheck:"tsc --noEmit",test:"bun test",lint:"biome lint .","lint:ci":"biome ci .","test:unit:ci":"bun scripts/ci/run-unit-tests-local.ts","drift:check":"bun run scripts/drift-check.ts","drift:fix":"bun run scripts/drift-check.ts --fix --confirm",format:"biome format . --write",check:"biome check --write .",dev:"bun run build && opencode","package:smoke":"node scripts/package-smoke.mjs",prepare:"bun run build","repro:704":"node scripts/repro-704.mjs","repro:1144":"bun scripts/repro-1144.mjs","repro:1873":"bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs"},dependencies:{"@opencode-ai/plugin":"^1.1.53","@opencode-ai/sdk":"^1.1.53","@vscode/tree-sitter-wasm":"^0.3.0","bash-parser":"^0.5.0","p-limit":"^7.3.0",picomatch:"^4.0.4","proper-lockfile":"^4.1.2","quick-lru":"^7.3.0","web-tree-sitter":"^0.25.0",zod:"^4.1.8"},devDependencies:{"@biomejs/biome":"2.3.14","@types/picomatch":"^4.0.3","bun-types":"1.3.8","js-yaml":"^4.1.1",typescript:"^5.7.3"}}});var QA_AGENTS,PIPELINE_AGENTS,ORCHESTRATOR_NAME="architect",ALL_SUBAGENT_NAMES,ALL_AGENT_NAMES;var init_agent_names=__esm(()=>{QA_AGENTS=["reviewer","critic","critic_oversight"],PIPELINE_AGENTS=["explorer","coder","test_engineer"],ALL_SUBAGENT_NAMES=["sme","researcher","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","curator_postmortem","curator_consolidation","council_generalist","council_skeptic","council_domain_expert","skill_improver","spec_writer",...QA_AGENTS,...PIPELINE_AGENTS],ALL_AGENT_NAMES=["architect",...ALL_SUBAGENT_NAMES]});var TOOL_METADATA,TOOL_NAMES,TOOL_NAME_SET,TOOL_DESCRIPTIONS,AGENT_TOOL_MAP;var init_tool_metadata=__esm(()=>{init_agent_names();TOOL_METADATA={diff:{description:"structured git diff with contract change detection",agents:["architect","reviewer","critic_oversight","coder","test_engineer"]},diff_summary:{description:"filter classified AST changes by category, risk level, or file for reviewer drill-down",agents:["architect","reviewer","critic_oversight"]},syntax_check:{description:"check syntax of source files using tree-sitter parsers across multiple languages, returning per-file errors",agents:["architect","coder","test_engineer"]},placeholder_scan:{description:"todo and FIXME comment detection",agents:["architect","reviewer"]},imports:{description:"find all consumers that import from a given file — use before refactoring shared modules to avoid breaking unseen dependents",agents:["architect","sme","researcher","docs","docs_design","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","reviewer","critic","coder","test_engineer"]},lint:{description:"run project linter in check or fix mode; supports biome, eslint, ruff, clippy, and more, returns structured results",agents:["architect","reviewer","coder"]},secretscan:{description:"scan for secrets (API keys, tokens, passwords) via regex and entropy; returns redacted previews, excludes common dirs",agents:["architect","reviewer","critic_oversight"]},sast_scan:{description:"static analysis security scan",agents:["architect","reviewer","critic_oversight"]},build_check:{description:"discover and run build, typecheck, and test commands for various project ecosystems in the working directory",agents:["architect","coder","test_engineer"]},pre_check_batch:{description:"parallel verification: lint:check + secretscan + sast_scan + quality_budget",agents:["architect","reviewer"]},quality_budget:{description:"code quality budget check",agents:["architect"]},symbols:{description:"extract exported symbols (functions, classes, interfaces, types) from source files; supports TypeScript, JavaScript, and Python",agents:["architect","sme","researcher","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","spec_writer","reviewer","critic","coder","test_engineer"]},complexity_hotspots:{description:"git churn × complexity risk map",agents:["architect","sme","researcher","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","reviewer","critic","critic_oversight","explorer","test_engineer"]},schema_drift:{description:"OpenAPI spec vs route drift",agents:["architect","sme","researcher","docs","explorer"]},todo_extract:{description:"structured TODO/FIXME extraction",agents:["architect","researcher","docs","explorer"]},evidence_check:{description:"verify task evidence completeness",agents:["architect","critic_oversight"]},check_gate_status:{description:"check the gate status of a specific task",agents:["architect","critic_oversight"]},completion_verify:{description:"verify completed tasks have required evidence",agents:["architect","critic_oversight"]},complete_pr_workflow:{description:"validate terminal PR workflow evidence and clear its durable session gate",agents:["architect"]},abort_pr_workflow:{description:"abort an unrecoverable PR_REVIEW/PR_FEEDBACK mechanical gate and clear its durable session state",agents:["architect"]},run_pr_feedback_stage_a:{description:"execute and persist mandatory PR-feedback Stage A checks on a content-bound revision",agents:["architect"]},submit_council_verdicts:{description:"submit pre-collected council member verdicts for synthesis (architect MUST dispatch critic/reviewer/sme/test_engineer/explorer as Agent tasks first; this tool synthesizes only, it does not contact members)",agents:[]},submit_phase_council_verdicts:{description:"submit pre-collected phase-level council member verdicts for holistic phase synthesis (architect MUST dispatch all 5 council members with phase-scoped context first; this tool synthesizes only, it does not contact members)",agents:[]},declare_council_criteria:{description:"pre-declare acceptance criteria for a task before the coder starts work; criteria are read back during council evaluation",agents:[]},sbom_generate:{description:"SBOM generation for dependency inventory",agents:["architect"]},checkpoint:{description:"create named git checkpoints for save, restore, and delete — use before risky operations to enable rollback",agents:["architect"]},pkg_audit:{description:"dependency vulnerability scan — npm/pip/cargo",agents:["architect","critic_hallucination_verifier","reviewer","critic_oversight","test_engineer"]},parse_lane_candidates:{description:"Parse [CANDIDATE] rows from a dispatch_lanes or collect_lane_results artifact (by output_ref), produce structured records with provenance, optionally persist to a per-batch sidecar JSONL. Pure-parser variant exists as internal module.",agents:["architect"]},write_pr_review_trigger_eval:{description:"persist the complete PR-review trigger evaluation with exact-set validation, dispatch provenance, and live merge-base verification",agents:["architect"]},test_runner:{description:"auto-detect and run tests",agents:["architect","reviewer","test_engineer"]},test_impact:{description:"identify test files impacted by changed source files via import analysis",agents:["architect","reviewer","critic_oversight","test_engineer"]},mutation_test:{description:"executes pre-generated mutation patches against tests, evaluates kill rate against quality gate thresholds",agents:["architect","test_engineer"]},generate_mutants:{description:"generate LLM-based mutation testing patches for source files; returns MutationPatch[] for direct consumption by the mutation_test tool",agents:["architect"]},detect_domains:{description:"detect which SME domains are relevant for a given text",agents:["architect","sme","docs","docs_design","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic","critic_oversight","explorer"]},git_blame:{description:"per-line git blame metadata: sha, author, date, summary for each line in a file",agents:["reviewer","explorer","architect"]},gitingest:{description:"fetch a GitHub repository full content via gitingest.com",agents:["architect","docs","explorer"]},retrieve_summary:{description:"retrieve the full content of a stored tool output summary",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","spec_writer","reviewer","critic","coder","test_engineer"]},retrieve_lane_output:{description:"retrieve paged full dispatch lane output by output_ref; use before consuming truncated lane previews or routing candidates from lane results",agents:["architect"]},extract_code_blocks:{description:"extract code blocks from text content and save them to files",agents:["docs","docs_design","designer","spec_writer","coder","test_engineer"]},phase_complete:{description:"mark a phase as complete and track dispatched agents",agents:["architect"]},save_plan:{description:"save a structured implementation plan",agents:["architect"]},update_task_status:{description:"mark tasks complete, track phase progress",agents:["architect"]},lint_spec:{description:"validate .swarm/spec.md format and required fields",agents:["architect","spec_writer"]},write_retro:{description:"document phase retrospectives via phase_complete workflow, capture lessons learned",agents:["architect"]},write_drift_evidence:{description:"write drift verification evidence for a completed phase",agents:["architect"]},write_hallucination_evidence:{description:"write hallucination verification evidence for a completed phase",agents:["architect"]},write_mutation_evidence:{description:"write mutation gate evidence for a completed phase; normalizes PASS/WARN/FAIL/SKIP verdicts and writes .swarm/evidence/{phase}/mutation-gate.json",agents:["architect"]},declare_scope:{description:"declare file scope for next coder delegation",agents:["architect"]},knowledge_query:{description:"query swarm or hive knowledge with optional filters",agents:["architect","skill_improver","spec_writer"]},doc_scan:{description:"scan project documentation files and build an index manifest",agents:["architect","docs_design","skill_improver","spec_writer","explorer"]},doc_extract:{description:"extract actionable constraints from project documentation",agents:["architect","docs_design","skill_improver","spec_writer"]},curator_analyze:{description:"run curator phase analysis and optionally apply knowledge recommendations",agents:["architect"]},knowledge_add:{description:"store a new lesson in the knowledge base",agents:["architect","coder"]},knowledge_recall:{description:"search the knowledge base for relevant past decisions",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","skill_improver","spec_writer","reviewer","critic","critic_oversight","explorer","coder","test_engineer"]},knowledge_remove:{description:"delete an outdated swarm knowledge entry by ID (swarm tier only)",agents:["architect"]},co_change_analyzer:{description:"detect hidden couplings by analyzing git history",agents:["architect"]},context_status:{description:"report current context-window headroom for the active session — returns tokens-used, model-limit, usage-percent, threshold-state (none/warn/critical), model name, and provider. Pure read-only: no state mutation, no warning injection. Works whether context_budget.enabled is true or false.",agents:["architect"]},search:{description:"Workspace-scoped ripgrep-style text search with structured JSON output. Supports literal and regex modes, glob filtering, and result limits. NOTE: This is text search, not structural AST search — use symbols and imports tools for structural queries.",agents:["architect","sme","docs","docs_design","designer","critic_hallucination_verifier","skill_improver","spec_writer","reviewer","critic_oversight","explorer","coder","test_engineer","researcher"]},ast_grep:{description:"Read-only structural AST search using ast-grep patterns with optional language and glob filters. Use for syntax-aware code pattern searches; does not rewrite files.",agents:["architect","sme","docs","docs_design","critic_hallucination_verifier","spec_writer","explorer","coder","test_engineer","researcher"]},actionlint_scan:{description:"Run actionlint against GitHub Actions workflow YAML files with structured findings. Resolves actionlint lazily and does not modify files.",agents:["architect","test_engineer"]},osv_scan:{description:"Run OSV-Scanner against a workspace path and return structured dependency vulnerability findings. Resolves osv-scanner lazily and does not modify files.",agents:["architect","test_engineer"]},gh_evidence:{description:"Fetch bounded GitHub pull request or issue metadata through gh for review and CI evidence. Resolves gh lazily and is read-only.",agents:["architect","researcher"]},batch_symbols:{description:"Batched symbol extraction across multiple files. Returns per-file symbol summaries with isolated error handling.",agents:["architect","critic_hallucination_verifier","reviewer","critic_oversight","explorer"]},suggest_patch:{description:"Reviewer-safe structured patch suggestion tool. Produces context-anchored patch artifacts without file modification. Returns structured diagnostics on context mismatch.",agents:["architect","reviewer"]},req_coverage:{description:"query requirement coverage status for tracked functional requirements",agents:["critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","spec_writer","critic","critic_oversight"]},get_approved_plan:{description:"retrieve the last critic-approved immutable plan snapshot for baseline drift comparison",agents:["critic_drift_verifier","critic","critic_oversight"]},repo_map:{description:"query the repo code graph: importers, dependencies, blast radius, localization, ontology facts, package boundaries, and heuristic preflight packets before refactoring; ontology findings are advisory, not formal proofs",agents:["architect","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","reviewer","critic","critic_oversight","explorer","coder"]},get_qa_gate_profile:{description:"retrieve the QA gate profile for the current plan: gates (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council), lock state, and profile hash. Read-only.",agents:["architect"]},set_qa_gates:{description:"configure the QA gate profile for the current plan. Architect-only. Ratchet-tighter only — rejected once the profile is locked after critic approval. Supports: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council.",agents:["architect"]},web_search:{description:"External web search (Tavily or Brave) for architect-driven council research, SME domain research, researcher auto-research, and skill-improver research. Returns titled results with snippets, URLs, normalized query metadata, temporal intent, freshness, and removed stale years. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides. Requires a search API key. Used by the architect in MODE: COUNCIL to gather a RESEARCH CONTEXT before dispatching council agents, by SME for opt-in external skill/source evaluation, and by the researcher agent for multi-source auto-research.",agents:["sme","researcher","skill_improver"]},web_fetch:{description:"Fetch the readable text of a single http(s) URL (architect-only). Returns decoded page text, document title, final URL after redirects, and an evidence reference. Reads primary sources that web_search only surfaces as snippets. Config-gated on council.general.enabled. Blocks private/loopback/link-local/metadata addresses (re-validated and re-pinned across redirects); enforces timeout and body size cap.",agents:[]},convene_general_council:{description:"Synthesize responses from a multi-model General Council. Accepts parallel member responses (Round 1, optionally Round 2), detects disagreements, and returns consensus points, persisting disagreements, and a structured synthesis. Architect-only. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.",agents:[]},write_final_council_evidence:{description:"Persist project-scoped final council evidence to .swarm/evidence/final-council.json. PREREQUISITE: dispatch critic, reviewer, sme, test_engineer, and explorer as project-scoped Agent tasks and collect their CouncilMemberVerdict JSON — this tool synthesizes only. Rejects on insufficient quorum or CONCERNS with unresolved requiredFixes; normalizes verdicts to approved/concerns/rejected. Architect-only.",agents:[]},skill_generate:{description:"compile knowledge entries into a structured SKILL.md draft",agents:["skill_improver"]},skill_list:{description:"list generated skill files and their status",agents:["skill_improver"]},skill_apply:{description:"activate a draft skill proposal",agents:[]},skill_inspect:{description:"inspect the content and source entries of a skill file",agents:["skill_improver"]},run_stale_reconciliation:{description:"reconcile skills against the knowledge store: mark skills stale when source knowledge is archived or deleted, or clear stale markers",agents:["architect"]},skill_regenerate:{description:"regenerate an active skill by re-clustering its source knowledge entries and updating the SKILL.md in place",agents:[]},skill_retire:{description:"retire a generated skill by adding a retired.marker file; retired skills are excluded from scoring and injection",agents:[]},skill_improve:{description:"run the skill_improver agent to review and refine skills",agents:["skill_improver"]},spec_write:{description:"author or update .swarm/spec.md for the current project",agents:["spec_writer"]},knowledge_receipt:{description:"file a receipt for retrieved knowledge (applied/ignored/contradicted + new lessons), recorded as immutable knowledge events",agents:["architect","sme","docs","docs_design","designer","critic_sounding_board","critic_drift_verifier","critic_hallucination_verifier","critic_architecture_supervisor","curator_init","curator_phase","skill_improver","spec_writer","reviewer","critic","coder","test_engineer"]},knowledge_archive:{description:"archive (default), quarantine, or purge a swarm or hive knowledge entry by ID with an immutable audit tombstone; purge requires an admin flag",agents:["architect"]},swarm_memory_recall:{description:"recall scoped Swarm memory for the current repository as untrusted background",agents:[]},swarm_memory_propose:{description:"create a pending Swarm memory proposal; does not write durable memory directly",agents:[]},swarm_command:{description:"run supported /swarm commands through the canonical command registry",agents:["architect","sme","researcher","docs","docs_design","designer","reviewer","critic","explorer","coder","test_engineer"]},dispatch_lanes:{description:"dispatch read-only exploration/review lanes concurrently and BLOCK until all finish; prefer dispatch_lanes_async for non-blocking dispatch, use this only when promptAsync is unavailable",agents:["architect"]},dispatch_lanes_async:{description:"launch read-only advisory lanes non-blockingly and return a batch id plus lane session handles immediately so you can keep working; launch_timeout_ms is only a promptAsync acceptance budget, not a lane runtime timeout; poll incrementally with collect_lane_results (wait omitted or false) while doing independent investigation, or join with wait: true when you need all results",agents:["architect"]},collect_lane_results:{description:"collect or poll results for a dispatch_lanes_async batch; supports both non-blocking polling (wait omitted or false) and blocking join (wait: true). Non-blocking polls include pending lane identities by default and process settled lanes incrementally while continuing independent work; busy/retry lanes are not timed out just because they run for a long time. Does not advance workflow gates.",agents:["architect"]},summarize_work:{description:"emit a short structured summary of completed work (key decisions, assumptions, risks, constraints) at task completion; rolls up per phase for architecture-supervisor review. Advisory, never blocks.",agents:["architect","sme","researcher","docs","docs_design","designer","explorer","coder","test_engineer"]},write_architecture_supervisor_evidence:{description:"persist the architecture supervisor verdict for a phase (architect MUST dispatch critic_architecture_supervisor first and collect its JSON verdict; this tool persists only, it does not contact the supervisor)",agents:["architect"]},lean_turbo_plan_lanes:{description:"partition phase tasks into parallel lanes based on file-scope conflicts for Lean Turbo execution",agents:[]},lean_turbo_acquire_locks:{description:"acquire file locks for all files in a lane (all-or-nothing) before lane execution",agents:[]},lean_turbo_runner_status:{description:"read Lean Turbo run state from .swarm/turbo-state.json",agents:[]},lean_turbo_review:{description:"dispatch a read-only reviewer agent to evaluate a completed Lean Turbo phase",agents:[]},lean_turbo_run_phase:{description:"Execute a phase using Lean Turbo parallel lane execution. Plans lanes, acquires file locks, and dispatches coder agents concurrently. Use when Lean Turbo is active and you want to execute all tasks in a phase in parallel lanes.",agents:[]},lean_turbo_status:{description:"returns Lean Turbo configuration and active status for the current session",agents:[]},swarm_apply_patch:{description:"Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation. Use standard unified diff format only — does NOT support *** Begin Patch / *** Update File payloads (use native apply_patch for those).",agents:["coder","test_engineer"]},external_skill_discover:{description:"Discover external skill candidates from configured sources. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_list:{description:"List external skill candidates in the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_inspect:{description:"Inspect a specific external skill candidate by ID. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_promote:{description:"Promote a validated external skill candidate to an active generated skill. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_reject:{description:"Reject an external skill candidate after evaluation. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_delete:{description:"Delete an external skill candidate from the quarantine store. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},external_skill_revoke:{description:"Revoke a previously promoted external skill. Returns a disabled message when external_skills.curation_enabled is false.",agents:[]},epic_decide_phase:{description:"Compute the Epic Mode verdict for a phase WITHOUT dispatching coders. Runs preflight + calibration + the three gates (p-threshold, hot-module, greenfield), persists the decision, and returns the verdict so the architect can dispatch waves via the visible Task tool (promote) or fall back to per-task serial (demote). Pair with `epic_plan_waves` to get the wave plan when promoted. Use when /swarm epic is on for the session.",agents:["architect"]},epic_plan_waves:{description:"Partition a phase's pending tasks into ordered concurrent waves for Epic Mode dispatch. A wave is a set of tasks with mutually disjoint declared scopes and all dependencies satisfied by prior waves. Returns `{ waves: [{ waveId, taskIds, files }, ...], serializedTasks, degradedTasks }`. "+'For each wave in order, the architect dispatches one `Task(subagent_type="coder", ...)` per `taskId` — all in one assistant message — so the wave runs concurrently and each coder appears as a visible subagent. '+"Wait for the wave to finish before dispatching the next. Pair with `epic_decide_phase` (called first; this tool is only relevant on a `promote` verdict). "+"Preflight reject reasons: `no-plan`, `no-phase`, `phase-empty`, `phase-already-complete`, `scopes-missing` (call `declare_scope` for `missingScopes`), `git-failed` (transient — retry), `planner-error`.",agents:["architect"]},epic_record_divergence:{description:"After every `update_task_status(completed)`, record the task's declared-vs-actual divergence to .swarm/epic/divergence.jsonl. Feeds Epic Mode's self-calibration loop (Capability D). Best-effort: never blocks.",agents:["architect"]}},TOOL_NAMES=Object.keys(TOOL_METADATA),TOOL_NAME_SET=new Set(TOOL_NAMES),TOOL_DESCRIPTIONS=Object.fromEntries(Object.entries(TOOL_METADATA).map(([name,meta])=>[name,meta.description])),AGENT_TOOL_MAP=(()=>{let map=Object.fromEntries(ALL_AGENT_NAMES.map((agent)=>[agent,[]]));for(let[name,meta]of Object.entries(TOOL_METADATA))for(let agent of meta.agents)map[agent].push(name);return map})()});function deepMergeInternal(base,override,depth){if(depth>=10)throw Error("deepMerge exceeded maximum depth of 10");let result={...base};for(let key of Object.keys(override)){let baseVal=base[key],overrideVal=override[key];if(typeof baseVal==="object"&&baseVal!==null&&typeof overrideVal==="object"&&overrideVal!==null&&!Array.isArray(baseVal)&&!Array.isArray(overrideVal))result[key]=deepMergeInternal(baseVal,overrideVal,depth+1);else result[key]=overrideVal}return result}function deepMerge(base,override){if(!base)return override;if(!override)return base;return deepMergeInternal(base,override,0)}var MAX_MERGE_DEPTH=10;function freezeSet(items){let set=new Set(items),proxy=new Proxy(set,{get(target,prop){if(prop==="add"||prop==="delete"||prop==="clear")return()=>{throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")};if(prop==="forEach")return(callback,thisArg)=>{let wrapped=(v,k)=>callback.call(thisArg??void 0,v,k,proxy);return set.forEach(wrapped)};let value=Reflect.get(target,prop);return typeof value==="function"?value.bind(target):value},set(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},deleteProperty(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},defineProperty(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")},setPrototypeOf(){throw TypeError("CLAUDE_CODE_NATIVE_COMMANDS is readonly")}});return proxy}function isQAAgent(name){return QA_AGENTS.includes(name)}function isSubagent(name){return ALL_SUBAGENT_NAMES.includes(name)}function isLowCapabilityModel(modelId){let lower=(modelId||"").toLowerCase();return LOW_CAPABILITY_MODELS.some((substr)=>lower.includes(substr))}var OPENCODE_NATIVE_AGENTS,CLAUDE_CODE_NATIVE_COMMANDS,MEMORY_AGENT_TOOL_MAP,EXTERNAL_SKILL_TOOL_NAMES,EXTERNAL_SKILL_AGENT_TOOL_MAP,COUNCIL_TOOL_NAMES,COUNCIL_AGENT_TOOL_MAP,GENERAL_COUNCIL_TOOL_NAMES,GENERAL_COUNCIL_AGENT_TOOL_MAP,TURBO_TOOL_NAMES,TURBO_AGENT_TOOL_MAP,SKILL_TOOL_NAMES,SKILL_AGENT_TOOL_MAP,WRITE_TOOL_NAMES,DEFAULT_MODELS,DEFAULT_SCORING_CONFIG,LOW_CAPABILITY_MODELS,TURBO_MODE_BANNER=`## \uD83D\uDE80 TURBO MODE ACTIVE
2
2
 
3
3
  **Speed optimization enabled for this session.**
4
4
 
@@ -2121,7 +2121,7 @@ automatically — advisory and never blocking.
2121
2121
  4. Act on the verdict: address REJECT/CONCERNS findings before completing the phase.
2122
2122
 
2123
2123
  Do NOT dispatch the supervisor yourself as a reviewer of code — it is summary-only.
2124
- \`write_architecture_supervisor_evidence\` persists only; it does not run the supervisor.`}function buildCouncilWorkflow(council){if(council?.enabled!==!0)return"";return"## COUNCIL WORKFLOW\n\nANTI-CONFUSION: Do NOT confuse the three council modes:\n(1) `council_mode` — per-task full council replacing Stage B.\n(2) `phase_council` — phase-level holistic review at `phase_complete`.\n(3) `final_council` — project-level final review after all phases.\nNone of these use the General Council (3-agent advisory). The General Council is an early workflow option gated by `council.general.enabled`, not a QA gate.\n\n## A. PER-TASK COUNCIL (when `council_mode` is ON)\n\nWhen `council_mode` is enabled in the QA gate profile, Stage B (reviewer + test_engineer) is **replaced** by the full 5-member council (critic, reviewer, sme, test_engineer, explorer) per task. Stage A (`pre_check_batch`) still runs as the pre-review gate.\n\n### PREREQUISITES\n- `declare_council_criteria` must be called for each task before council dispatch.\n\n### MANDATORY SEQUENCE — never skip or reorder\n\n#### STEP 1 — DISPATCH all 5 council members in parallel (task-scoped)\nAfter Stage A passes for a task, in a SINGLE message, dispatch `critic`, `reviewer`, `sme`, `test_engineer`, and `explorer` as parallel Agent tasks. Each member receives task-scoped context:\n- `critic` — task diff + task spec + approved-plan baseline (via `get_approved_plan`) + spec-intent drift analysis\n- `reviewer` — task semantic diff summary + blast radius across changed files\n- `sme` — task domain context + knowledge base entries relevant to the task\n- `test_engineer` — changed test files for the task + coverage delta + known mutation gaps\n- `explorer` — task diff + original task intent + prior slop findings\n (hunts for lazy implementations, hallucinated APIs, cargo-cult patterns,\n spec drift, lazy abstractions)\n\nWait for ALL dispatched agents to return their verdict objects before proceeding.\n\n#### STEP 2 — COLLECT verdicts\nRead each agent's response and extract their `CouncilMemberVerdict` object.\nEach member must return: `agent`, `verdict` (APPROVE|CONCERNS|REJECT),\n`confidence` (0.0–1.0), `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`,\n`durationMs`.\n\nDo NOT fabricate, infer, or substitute a verdict. If an agent did not return\na valid verdict object, re-dispatch that agent.\n\n#### STEP 3 — CALL submit_council_verdicts (the per-task tool, NOT submit_phase_council_verdicts)\nONLY after collecting real verdicts from all dispatched agents, call\n`submit_council_verdicts` with the collected verdicts. The per-task council\nverdict replaces the Stage B gate — APPROVE advances the task, REJECT blocks it.\n\n#### STEP 4 — ACT on the verdict\n- **APPROVE**: Task passes. Proceed to the next task.\n If `advisoryFindingsCount > 0`, deliver `unifiedFeedbackMd` as a single\n non-blocking advisory note before proceeding.\n- **CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'`**:\n The tool blocked because HIGH/CRITICAL findings from CONCERNS members were\n promoted to `requiredFixes`. No evidence was written. Send `unifiedFeedbackMd`\n to the coder — every `requiredFix` must be resolved. Increment `roundNumber`\n and re-convene council after fixes. This is tool-enforced: you cannot bypass it.\n- **CONCERNS with `success: true`**: Only MEDIUM/LOW advisory findings remain.\n Task passes — surface `unifiedFeedbackMd` as a non-blocking note.\n- **REJECT**: Block task advancement. Send `unifiedFeedbackMd` to the coder\n with the BLOCKING flag. The coder must resolve all `requiredFixes` before\n the council is re-convened. Maximum `council.maxRounds` rounds (default 3).\n If `roundNumber >= maxRounds` and verdict is still REJECT, surface\n `unifiedFeedbackMd` to the user and HALT — do NOT auto-advance.\n\n### ANTI-PATTERNS — per-task council bypass violations\n- ✗ Calling `submit_council_verdicts` without first dispatching all 5 members.\n- ✗ Passing verdicts inferred or fabricated rather than received from dispatched agents.\n- ✗ Claiming \"Council APPROVED\" when `membersAbsent` is non-empty.\n- ✗ Falling back to Stage B (reviewer + test_engineer only) when `council_mode` is ON — the full council replaces Stage B.\n- ✗ Skipping `declare_council_criteria` before dispatching council members.\n- ✗ Using `submit_phase_council_verdicts` for per-task verdicts — use `submit_council_verdicts`.\n\n## B. PHASE COUNCIL (when `phase_council` is ON)\n\nCRITICAL: `submit_phase_council_verdicts` does NOT run council members.\nIt synthesizes verdicts that you must collect BEFORE calling it.\n\nWhen `phase_council` is enabled in the QA gate profile, a phase-level council review is required before calling `phase_complete`. This is additive to whichever per-task mechanism is active — Stage B (reviewer + test_engineer) runs per task by default, or the full 5-member per-task council if `council_mode` is ON.\n\n### WHEN TO RUN PHASE COUNCIL\nAfter ALL tasks in the current phase have been marked `completed` and their\nper-task gates have passed, and BEFORE calling `phase_complete`, convene the\nphase council for a Phase Dossier Assembly — a holistic review of cross-cutting concerns,\nbehavioral cohesion, and the full body of work completed in the phase.\n\n### MANDATORY SEQUENCE — never skip or reorder\n\n#### STEP 1 — DISPATCH all 5 council members in parallel (phase-scoped)\nIn a SINGLE message, dispatch `critic`, `reviewer`, `sme`, `test_engineer`,\nand `explorer` as parallel Agent tasks. Each member receives phase-scoped context:\n- `critic` — full diff for the phase + all task specs + approved-plan baseline (via `get_approved_plan`) + spec-intent drift analysis\n- `reviewer` — phase-wide semantic diff summary + blast radius across all changed files\n- `sme` — phase domain context + knowledge base entries relevant to the phase\n- `test_engineer` — all changed test files for the phase + coverage delta + known mutation gaps\n- `explorer` — full phase diff + original task intents + prior slop findings across all tasks\n (hunts for lazy implementations, hallucinated APIs, cargo-cult patterns,\n spec drift, lazy abstractions introduced anywhere in the phase)\n\nWait for ALL dispatched agents to return their verdict objects before proceeding.\n\n#### STEP 2 — COLLECT verdicts\nRead each agent's response and extract their `CouncilMemberVerdict` object.\nEach member must return: `agent`, `verdict` (APPROVE|CONCERNS|REJECT),\n`confidence` (0.0–1.0), `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`,\n`durationMs`.\n\nDo NOT fabricate, infer, or substitute a verdict. If an agent did not return\na valid verdict object, re-dispatch that agent.\n\n#### STEP 3 — CALL submit_phase_council_verdicts\nONLY after collecting real verdicts from all dispatched agents, call\n`submit_phase_council_verdicts` with:\n- `phaseNumber`: the phase number just completed (integer, e.g. `1`)\n- `swarmId`: the swarm identifier (e.g. `\"mega\"`)\n- `phaseSummary`: a 2–4 sentence plain-language summary of what the phase accomplished\n- `verdicts`: the array of collected `CouncilMemberVerdict` objects\n- `roundNumber`: 1-indexed (default 1 on first council call for this phase)\n\nThis writes `.swarm/evidence/{phase}/phase-council.json`, which Gate 5 in\n`phase_complete` will read and validate.\n\n#### STEP 4 — READ the response\nInspect `membersAbsent`. If non-empty, dispatch the missing members and re-collect.\nInspect `overallVerdict`.\n\nIf `success: false` and `reason: 'insufficient_quorum'`:\ndispatch ALL absent members in a single parallel batch, wait for all verdicts,\nand re-call `submit_phase_council_verdicts`.\n\n#### STEP 5 — ACT on the verdict, then call phase_complete\n- **APPROVE**: Call `phase_complete`. Gate 5 will pass.\n If `advisoryFindingsCount > 0`, deliver `unifiedFeedbackMd` as a single\n non-blocking advisory note to the team before proceeding.\n- **CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'`**:\n The tool blocked because HIGH/CRITICAL findings from CONCERNS members were\n promoted to `requiredFixes`. No evidence was written. Send `unifiedFeedbackMd`\n to the coder — every `requiredFix` must be resolved. Increment `roundNumber`\n and re-convene council after fixes. This is tool-enforced: you cannot bypass it.\n- **CONCERNS with `success: true`**: Only MEDIUM/LOW advisory findings remain.\n Call `phase_complete` and surface `unifiedFeedbackMd` as a non-blocking note.\n- **REJECT**: Block advancement. Send `unifiedFeedbackMd` to the coder\n with the BLOCKING flag. The coder must resolve all `requiredFixes` before\n the phase council is re-convened. Maximum `council.maxRounds` rounds (default 3).\n If `roundNumber >= maxRounds` and verdict is still REJECT, surface\n `unifiedFeedbackMd` to the user and HALT — do NOT auto-advance.\n\n### ANTI-PATTERNS — phase council bypass violations\n- ✗ Calling `submit_phase_council_verdicts` without first dispatching all 5 members.\n- ✗ Passing verdicts inferred or fabricated rather than received from dispatched agents.\n- ✗ Claiming \"Council APPROVED\" when `membersAbsent` is non-empty.\n- ✗ Skipping per-task gates because phase council will catch issues — per-task gates are mandatory regardless.\n- ✗ Calling `phase_complete` before council evidence has been written (Gate 5 will block you).\n- ✗ Treating a prior phase's council verdict as valid for a new phase.\n- ✗ Incrementing `roundNumber` without re-dispatching members for the new round.\n- ✗ Using `submit_council_verdicts` for phase verdicts — use `submit_phase_council_verdicts`.\n\n### ROUND 2 DELIBERATION\nIf round 1 produces REJECT or CONCERNS requiring re-work, every prior-round\ndissenter must be re-dispatched for round 2 focused on the areas they flagged.\nRound 2 must produce NEW agent responses — never reuse round 1 verdicts.\n\n### Retry protocol\nOn re-submission after REJECT/CONCERNS: council members receive (a) the previous\nsynthesis findings plus (b) the diff of what changed since the last round.\nMembers verify prior findings are resolved without re-reviewing unchanged code.\nThe architect resolves any `unresolvedConflicts` in `unifiedFeedbackMd` BEFORE\nsending it to the coder — the coder never sees contradictory instructions."}function buildYourToolsList(council,memoryEnabled=!1,externalSkillsEnabled=!1,turboEnabled=!1,skillsEnabled=!1){let qaCouncilEnabled=council?.enabled===!0,generalCouncilEnabled=council?.general?.enabled===!0;return`Task (delegation), ${[...[...AGENT_TOOL_MAP.architect??[],...memoryEnabled?MEMORY_AGENT_TOOL_MAP.architect??[]:[],...externalSkillsEnabled?EXTERNAL_SKILL_AGENT_TOOL_MAP.architect??[]:[],...qaCouncilEnabled?COUNCIL_AGENT_TOOL_MAP.architect??[]:[],...generalCouncilEnabled?GENERAL_COUNCIL_AGENT_TOOL_MAP.architect??[]:[],...turboEnabled?TURBO_AGENT_TOOL_MAP.architect??[]:[],...skillsEnabled?SKILL_AGENT_TOOL_MAP.architect??[]:[]]].sort().join(", ")}.`}function buildQaGateSelectionDialogue(modeLabel){return`${modeLabel==="BRAINSTORM"?"Now ask the user which QA gates to enable for this plan — do not select on their behalf.":modeLabel==="SPECIFY"?"Ask the user which QA gates to enable for this plan before suggesting the next step.":"No pending gate selection found in `.swarm/context.md`. Ask the user inline now."}
2124
+ \`write_architecture_supervisor_evidence\` persists only; it does not run the supervisor.`}function buildCouncilWorkflow(council){if(council?.enabled!==!0)return"";return"## COUNCIL WORKFLOW\n\nANTI-CONFUSION: Do NOT confuse the three council modes:\n(1) `council_mode` — per-task full council replacing Stage B.\n(2) `phase_council` — phase-level holistic review at `phase_complete`.\n(3) `final_council` — project-level final review after all phases.\nNone of these use the General Council (3-agent advisory). The General Council is an early workflow option gated by `council.general.enabled`, not a QA gate.\n\n## A. PER-TASK COUNCIL (when `council_mode` is ON)\n\nWhen `council_mode` is enabled in the QA gate profile, Stage B (reviewer + test_engineer) is **replaced** by the full 5-member council (critic, reviewer, sme, test_engineer, explorer) per task. Stage A (`pre_check_batch`) still runs as the pre-review gate.\n\n### PREREQUISITES\n- `declare_council_criteria` must be called for each task before council dispatch.\n\n### MANDATORY SEQUENCE — never skip or reorder\n\n#### STEP 1 — DISPATCH all 5 council members in parallel (task-scoped)\nAfter Stage A passes for a task, in a SINGLE message, dispatch `critic`, `reviewer`, `sme`, `test_engineer`, and `explorer` as parallel Agent tasks. Each member receives task-scoped context:\n- `critic` — task diff + task spec + approved-plan baseline (via `get_approved_plan`) + spec-intent drift analysis\n- `reviewer` — task semantic diff summary + blast radius across changed files\n- `sme` — task domain context + knowledge base entries relevant to the task\n- `test_engineer` — changed test files for the task + coverage delta + known mutation gaps\n- `explorer` — task diff + original task intent + prior slop findings\n (hunts for lazy implementations, hallucinated APIs, cargo-cult patterns,\n spec drift, lazy abstractions)\n→ REQUIRED: the `reviewer` member dispatch MUST include a literal `ACCEPTANCE:` line per ACCEPTANCE FIELD RESOLUTION above (same text as the coder delegation for this task). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED before that member runs. The other four members are not gated by this rule.\n\nWait for ALL dispatched agents to return their verdict objects before proceeding.\n\n#### STEP 2 — COLLECT verdicts\nRead each agent's response and extract their `CouncilMemberVerdict` object.\nEach member must return: `agent`, `verdict` (APPROVE|CONCERNS|REJECT),\n`confidence` (0.0–1.0), `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`,\n`durationMs`.\n\nDo NOT fabricate, infer, or substitute a verdict. If an agent did not return\na valid verdict object, re-dispatch that agent.\n\n#### STEP 3 — CALL submit_council_verdicts (the per-task tool, NOT submit_phase_council_verdicts)\nONLY after collecting real verdicts from all dispatched agents, call\n`submit_council_verdicts` with the collected verdicts. The per-task council\nverdict replaces the Stage B gate — APPROVE advances the task, REJECT blocks it.\n\n#### STEP 4 — ACT on the verdict\n- **APPROVE**: Task passes. Proceed to the next task.\n If `advisoryFindingsCount > 0`, deliver `unifiedFeedbackMd` as a single\n non-blocking advisory note before proceeding.\n- **CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'`**:\n The tool blocked because HIGH/CRITICAL findings from CONCERNS members were\n promoted to `requiredFixes`. No evidence was written. Send `unifiedFeedbackMd`\n to the coder — every `requiredFix` must be resolved. Increment `roundNumber`\n and re-convene council after fixes. This is tool-enforced: you cannot bypass it.\n- **CONCERNS with `success: true`**: Only MEDIUM/LOW advisory findings remain.\n Task passes — surface `unifiedFeedbackMd` as a non-blocking note.\n- **REJECT**: Block task advancement. Send `unifiedFeedbackMd` to the coder\n with the BLOCKING flag. The coder must resolve all `requiredFixes` before\n the council is re-convened. Maximum `council.maxRounds` rounds (default 3).\n If `roundNumber >= maxRounds` and verdict is still REJECT, surface\n `unifiedFeedbackMd` to the user and HALT — do NOT auto-advance.\n\n### ANTI-PATTERNS — per-task council bypass violations\n- ✗ Calling `submit_council_verdicts` without first dispatching all 5 members.\n- ✗ Passing verdicts inferred or fabricated rather than received from dispatched agents.\n- ✗ Claiming \"Council APPROVED\" when `membersAbsent` is non-empty.\n- ✗ Falling back to Stage B (reviewer + test_engineer only) when `council_mode` is ON — the full council replaces Stage B.\n- ✗ Skipping `declare_council_criteria` before dispatching council members.\n- ✗ Using `submit_phase_council_verdicts` for per-task verdicts — use `submit_council_verdicts`.\n\n## B. PHASE COUNCIL (when `phase_council` is ON)\n\nCRITICAL: `submit_phase_council_verdicts` does NOT run council members.\nIt synthesizes verdicts that you must collect BEFORE calling it.\n\nWhen `phase_council` is enabled in the QA gate profile, a phase-level council review is required before calling `phase_complete`. This is additive to whichever per-task mechanism is active — Stage B (reviewer + test_engineer) runs per task by default, or the full 5-member per-task council if `council_mode` is ON.\n\n### WHEN TO RUN PHASE COUNCIL\nAfter ALL tasks in the current phase have been marked `completed` and their\nper-task gates have passed, and BEFORE calling `phase_complete`, convene the\nphase council for a Phase Dossier Assembly — a holistic review of cross-cutting concerns,\nbehavioral cohesion, and the full body of work completed in the phase.\n\n### MANDATORY SEQUENCE — never skip or reorder\n\n#### STEP 1 — DISPATCH all 5 council members in parallel (phase-scoped)\nIn a SINGLE message, dispatch `critic`, `reviewer`, `sme`, `test_engineer`,\nand `explorer` as parallel Agent tasks. Each member receives phase-scoped context:\n- `critic` — full diff for the phase + all task specs + approved-plan baseline (via `get_approved_plan`) + spec-intent drift analysis\n- `reviewer` — phase-wide semantic diff summary + blast radius across all changed files\n- `sme` — phase domain context + knowledge base entries relevant to the phase\n- `test_engineer` — all changed test files for the phase + coverage delta + known mutation gaps\n- `explorer` — full phase diff + original task intents + prior slop findings across all tasks\n (hunts for lazy implementations, hallucinated APIs, cargo-cult patterns,\n spec drift, lazy abstractions introduced anywhere in the phase)\n→ REQUIRED: the `reviewer` member dispatch MUST include a literal `ACCEPTANCE:` line per ACCEPTANCE FIELD RESOLUTION above (phase-scoped: concatenate the verbatim FR/SC text for every task in this phase when fr_refs is non-empty, otherwise a one-line phase-derived DONE restatement). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED before that member runs. The other four members are not gated by this rule.\n\nWait for ALL dispatched agents to return their verdict objects before proceeding.\n\n#### STEP 2 — COLLECT verdicts\nRead each agent's response and extract their `CouncilMemberVerdict` object.\nEach member must return: `agent`, `verdict` (APPROVE|CONCERNS|REJECT),\n`confidence` (0.0–1.0), `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`,\n`durationMs`.\n\nDo NOT fabricate, infer, or substitute a verdict. If an agent did not return\na valid verdict object, re-dispatch that agent.\n\n#### STEP 3 — CALL submit_phase_council_verdicts\nONLY after collecting real verdicts from all dispatched agents, call\n`submit_phase_council_verdicts` with:\n- `phaseNumber`: the phase number just completed (integer, e.g. `1`)\n- `swarmId`: the swarm identifier (e.g. `\"mega\"`)\n- `phaseSummary`: a 2–4 sentence plain-language summary of what the phase accomplished\n- `verdicts`: the array of collected `CouncilMemberVerdict` objects\n- `roundNumber`: 1-indexed (default 1 on first council call for this phase)\n\nThis writes `.swarm/evidence/{phase}/phase-council.json`, which Gate 5 in\n`phase_complete` will read and validate.\n\n#### STEP 4 — READ the response\nInspect `membersAbsent`. If non-empty, dispatch the missing members and re-collect.\nInspect `overallVerdict`.\n\nIf `success: false` and `reason: 'insufficient_quorum'`:\ndispatch ALL absent members in a single parallel batch, wait for all verdicts,\nand re-call `submit_phase_council_verdicts`.\n\n#### STEP 5 — ACT on the verdict, then call phase_complete\n- **APPROVE**: Call `phase_complete`. Gate 5 will pass.\n If `advisoryFindingsCount > 0`, deliver `unifiedFeedbackMd` as a single\n non-blocking advisory note to the team before proceeding.\n- **CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'`**:\n The tool blocked because HIGH/CRITICAL findings from CONCERNS members were\n promoted to `requiredFixes`. No evidence was written. Send `unifiedFeedbackMd`\n to the coder — every `requiredFix` must be resolved. Increment `roundNumber`\n and re-convene council after fixes. This is tool-enforced: you cannot bypass it.\n- **CONCERNS with `success: true`**: Only MEDIUM/LOW advisory findings remain.\n Call `phase_complete` and surface `unifiedFeedbackMd` as a non-blocking note.\n- **REJECT**: Block advancement. Send `unifiedFeedbackMd` to the coder\n with the BLOCKING flag. The coder must resolve all `requiredFixes` before\n the phase council is re-convened. Maximum `council.maxRounds` rounds (default 3).\n If `roundNumber >= maxRounds` and verdict is still REJECT, surface\n `unifiedFeedbackMd` to the user and HALT — do NOT auto-advance.\n\n### ANTI-PATTERNS — phase council bypass violations\n- ✗ Calling `submit_phase_council_verdicts` without first dispatching all 5 members.\n- ✗ Passing verdicts inferred or fabricated rather than received from dispatched agents.\n- ✗ Claiming \"Council APPROVED\" when `membersAbsent` is non-empty.\n- ✗ Skipping per-task gates because phase council will catch issues — per-task gates are mandatory regardless.\n- ✗ Calling `phase_complete` before council evidence has been written (Gate 5 will block you).\n- ✗ Treating a prior phase's council verdict as valid for a new phase.\n- ✗ Incrementing `roundNumber` without re-dispatching members for the new round.\n- ✗ Using `submit_council_verdicts` for phase verdicts — use `submit_phase_council_verdicts`.\n\n### ROUND 2 DELIBERATION\nIf round 1 produces REJECT or CONCERNS requiring re-work, every prior-round\ndissenter must be re-dispatched for round 2 focused on the areas they flagged.\nRound 2 must produce NEW agent responses — never reuse round 1 verdicts.\n\n### Retry protocol\nOn re-submission after REJECT/CONCERNS: council members receive (a) the previous\nsynthesis findings plus (b) the diff of what changed since the last round.\nMembers verify prior findings are resolved without re-reviewing unchanged code.\nThe architect resolves any `unresolvedConflicts` in `unifiedFeedbackMd` BEFORE\nsending it to the coder — the coder never sees contradictory instructions."}function buildYourToolsList(council,memoryEnabled=!1,externalSkillsEnabled=!1,turboEnabled=!1,skillsEnabled=!1){let qaCouncilEnabled=council?.enabled===!0,generalCouncilEnabled=council?.general?.enabled===!0;return`Task (delegation), ${[...[...AGENT_TOOL_MAP.architect??[],...memoryEnabled?MEMORY_AGENT_TOOL_MAP.architect??[]:[],...externalSkillsEnabled?EXTERNAL_SKILL_AGENT_TOOL_MAP.architect??[]:[],...qaCouncilEnabled?COUNCIL_AGENT_TOOL_MAP.architect??[]:[],...generalCouncilEnabled?GENERAL_COUNCIL_AGENT_TOOL_MAP.architect??[]:[],...turboEnabled?TURBO_AGENT_TOOL_MAP.architect??[]:[],...skillsEnabled?SKILL_AGENT_TOOL_MAP.architect??[]:[]]].sort().join(", ")}.`}function buildQaGateSelectionDialogue(modeLabel){return`${modeLabel==="BRAINSTORM"?"Now ask the user which QA gates to enable for this plan — do not select on their behalf.":modeLabel==="SPECIFY"?"Ask the user which QA gates to enable for this plan before suggesting the next step.":"No pending gate selection found in `.swarm/context.md`. Ask the user inline now."}
2125
2125
 
2126
2126
  Present the eleven gates with their defaults (DEFAULT_QA_GATES) as a single user-facing question. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
2127
2127
  - reviewer (default: ON) — code review of coder output
@@ -2519,7 +2519,12 @@ DELEGATION ENVELOPE FIELDS — include these in every delegation for traceabilit
2519
2519
 
2520
2520
  Before delegating to {{AGENT_PREFIX}}reviewer: call check_gate_status for the current task_id and include the gate results in the GATES field of the reviewer message. Format: GATES: lint=PASS/FAIL, sast_scan=PASS/FAIL, secretscan=PASS/FAIL (use PASS/FAIL/skipped for each gate). If no gates have been run yet, use GATES: none.
2521
2521
 
2522
- ACCEPTANCE FIELD RESOLUTION — before every {{AGENT_PREFIX}}coder (and {{AGENT_PREFIX}}reviewer) delegation, populate that delegation's ACCEPTANCE field like this: (1) read the current task's \`fr_refs\` from the plan; (2) if \`fr_refs\` is non-empty, look up EVERY listed FR-###/SC-### id in the current \`.swarm/spec.md\` and copy each one's full requirement text into ACCEPTANCE VERBATIM — byte-for-byte, no summarizing or paraphrasing, and concatenate all of them when a task maps to more than one; (3) if \`fr_refs\` is empty or absent, populate ACCEPTANCE with a task-derived one-line restatement of what DONE looks like instead (the same pattern as \`acceptanceCriteria\` above). ACCEPTANCE must never be empty — lacking a spec mapping is normal and is not a reason to omit it.
2522
+ ACCEPTANCE FIELD RESOLUTION — REQUIRED on every {{AGENT_PREFIX}}coder and {{AGENT_PREFIX}}reviewer Task dispatch. A dispatch with no ACCEPTANCE: line is BLOCKED by the delegation gate before the agent runs (ACCEPTANCE_FIELD_REQUIRED). Resolve it as:
2523
+ 1. Read the current task's \`fr_refs\` from the plan.
2524
+ 2. If \`fr_refs\` is non-empty: look up EVERY listed FR-###/SC-### id in the current \`.swarm/spec.md\` and copy each one's full requirement text into ACCEPTANCE VERBATIM — byte-for-byte, no summarizing or paraphrasing, and concatenate all of them when a task maps to more than one.
2525
+ 3. When the task has no spec mapping: if \`fr_refs\` is empty or absent, populate ACCEPTANCE with a task-derived one-line restatement of what DONE looks like instead (the same pattern as \`acceptanceCriteria\` above).
2526
+ ACCEPTANCE must never be empty — lacking a spec mapping is normal and is not a reason to omit it.
2527
+ NOTE: the plan-task \`acceptance\` field is a different thing. Writing acceptance on the plan task does NOT satisfy this rule. The delegation prompt needs its own literal \`ACCEPTANCE:\` line.
2523
2528
 
2524
2529
  <!-- BEHAVIORAL_GUIDANCE_START -->
2525
2530
  PARTIAL GATE RATIONALIZATIONS — automated gates ≠ agent review. Running SOME gates is NOT compliance:
@@ -2697,7 +2702,7 @@ FILE: src/auth/login.ts
2697
2702
  INPUT: Validate email format, password >= 8 chars
2698
2703
  OUTPUT: Modified file
2699
2704
  CONSTRAINT: Do not modify other functions
2700
- ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement see ACCEPTANCE FIELD RESOLUTION]
2705
+ ACCEPTANCE: FR-007 The login endpoint SHALL reject passwords shorter than 8 characters with HTTP 400 and a localized error message.
2701
2706
  SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
2702
2707
 
2703
2708
  {{AGENT_PREFIX}}reviewer
@@ -2705,11 +2710,13 @@ TASK: Review login validation
2705
2710
  FILE: src/auth/login.ts
2706
2711
  CHECK: [security, correctness, edge-cases]
2707
2712
  GATES: lint=PASS, sast_scan=PASS, secretscan=PASS
2708
- ACCEPTANCE: [copied verbatim from spec.md, or a task-derived DONE restatement see ACCEPTANCE FIELD RESOLUTION; same text as the coder delegation for this task]
2713
+ ACCEPTANCE: FR-007 The login endpoint SHALL reject passwords shorter than 8 characters with HTTP 400 and a localized error message.
2709
2714
  SKILLS_USED_BY_CODER: file:.claude/skills/engineering-conventions/SKILL.md
2710
2715
  OUTPUT: VERDICT + RISK + ISSUES + ACCEPTANCE_SATISFACTION
2711
2716
  SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
2712
2717
 
2718
+ NOTE (ACCEPTANCE examples above): the FR-### form applies when fr_refs is non-empty. When the task has no fr_refs, ACCEPTANCE instead carries a one-line task-derived DONE restatement, e.g. "DONE = login rejects <8-char passwords with HTTP 400; the 6 happy-path tests pass." The reviewer delegation for the same task uses the identical ACCEPTANCE text as the coder delegation.
2719
+
2713
2720
  {{AGENT_PREFIX}}test_engineer
2714
2721
  TASK: Generate and run login validation tests
2715
2722
  FILE: src/auth/login.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.125.5",
3
+ "version": "7.125.6",
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",