opencode-swarm 7.126.1 → 7.126.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.opencode/skills/swarm-pr-feedback/SKILL.md +5 -2
  2. package/.opencode/skills/swarm-pr-review/SKILL.md +1 -1
  3. package/dist/cli/{config-doctor-23jxdqwv.js → config-doctor-mfx27331.js} +2 -2
  4. package/dist/cli/{curation-policy-0t6hny6g.js → curation-policy-n944aq62.js} +2 -2
  5. package/dist/cli/{curator-llm-factory-36psae60.js → curator-llm-factory-0rf29gfq.js} +12 -12
  6. package/dist/cli/{curator-g8rggzbk.js → curator-qfh9xty4.js} +12 -12
  7. package/dist/cli/{guardrail-explain-6ffgrjx9.js → guardrail-explain-jsrjqps1.js} +13 -13
  8. package/dist/cli/{guardrail-log-57sczn5h.js → guardrail-log-61gya05m.js} +3 -3
  9. package/dist/cli/{hive-promoter-c458rgp5.js → hive-promoter-ktt17fyf.js} +12 -12
  10. package/dist/cli/{index-w0yztxgq.js → index-3xd9a2g7.js} +1 -1
  11. package/dist/cli/{index-yf4kvhrn.js → index-5nq8dp63.js} +14 -14
  12. package/dist/cli/{index-k5xh81c9.js → index-7bxw3v5w.js} +3 -3
  13. package/dist/cli/{index-6j9p0c40.js → index-88dt7c9z.js} +2 -2
  14. package/dist/cli/{index-1p9z8cc4.js → index-bf76q8q7.js} +1 -1
  15. package/dist/cli/{index-vvwf9ark.js → index-c48dvb6j.js} +2 -2
  16. package/dist/cli/{index-y9t766sw.js → index-d88y17ht.js} +45 -42
  17. package/dist/cli/{index-nkhp7j16.js → index-f97dm6tz.js} +5 -5
  18. package/dist/cli/{index-abw10n3f.js → index-gf9cxvp0.js} +1 -1
  19. package/dist/cli/{index-kx3533dm.js → index-gwss5btk.js} +1 -1
  20. package/dist/cli/{index-echdpdhy.js → index-gxw20m1d.js} +1 -1
  21. package/dist/cli/{index-cnhp6c0k.js → index-nqp13m5a.js} +1 -1
  22. package/dist/cli/{index-nmyg9b7v.js → index-pb8ag9vg.js} +4 -4
  23. package/dist/cli/{index-3hkbegq2.js → index-pf3xae4s.js} +1 -1
  24. package/dist/cli/{index-c8sqc3nh.js → index-vcqwhe9d.js} +4 -0
  25. package/dist/cli/{index-x1w4cx3n.js → index-z8ftpav0.js} +2 -2
  26. package/dist/cli/index.js +12 -12
  27. package/dist/cli/{knowledge-escalator-kd80m9vp.js → knowledge-escalator-nna0zec3.js} +3 -3
  28. package/dist/cli/{knowledge-events-j7jfwm1d.js → knowledge-events-7k82xk36.js} +1 -1
  29. package/dist/cli/{knowledge-store-1d4byc7y.js → knowledge-store-efvtng9t.js} +1 -1
  30. package/dist/cli/{knowledge-validator-63mkgt9x.js → knowledge-validator-jh93eagj.js} +4 -4
  31. package/dist/cli/{scan-cursor-qzn5jmbe.js → scan-cursor-cydz8d9q.js} +2 -2
  32. package/dist/cli/{schema-2j92wnns.js → schema-fa033pqw.js} +1 -1
  33. package/dist/cli/{skill-generator-sv6zvdvz.js → skill-generator-8v463kj7.js} +5 -5
  34. package/dist/hooks/delegation-gate.d.ts +14 -2
  35. package/dist/hooks/pr-workflow-gate.d.ts +18 -0
  36. package/dist/index.js +41 -38
  37. package/dist/tools/index.d.ts +1 -0
  38. package/dist/tools/manifest.d.ts +1 -0
  39. package/dist/tools/prepare-pr-workflow-checkout.d.ts +25 -0
  40. package/dist/tools/tool-metadata.d.ts +4 -0
  41. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  readDoctorArtifact,
5
5
  removeStraySwarmDir,
6
6
  runConfigDoctor
7
- } from "./index-w0yztxgq.js";
7
+ } from "./index-3xd9a2g7.js";
8
8
  import {
9
9
  EvaluationTaskV1Schema,
10
10
  GateAuditManifestV1Schema,
@@ -94,15 +94,15 @@ import {
94
94
  retireSkill,
95
95
  selectCandidateEntries,
96
96
  syncBundledProjectSkillsIfMissingAsync
97
- } from "./index-k5xh81c9.js";
97
+ } from "./index-7bxw3v5w.js";
98
98
  import {
99
99
  readRecentEscalations
100
- } from "./index-nkhp7j16.js";
100
+ } from "./index-f97dm6tz.js";
101
101
  import {
102
102
  alreadyCuratedThisGeneration,
103
103
  claimNextScanBatch,
104
104
  resolveCohortId
105
- } from "./index-3hkbegq2.js";
105
+ } from "./index-pf3xae4s.js";
106
106
  import {
107
107
  CURATOR_INIT_PROMPT,
108
108
  CURATOR_PHASE_PROMPT,
@@ -135,11 +135,11 @@ import {
135
135
  validateActionability,
136
136
  validateActionableFields,
137
137
  validateLesson
138
- } from "./index-6j9p0c40.js";
138
+ } from "./index-88dt7c9z.js";
139
139
  import {
140
140
  authorizeCuration,
141
141
  buildConfigFingerprintInput
142
- } from "./index-kx3533dm.js";
142
+ } from "./index-gwss5btk.js";
143
143
  import {
144
144
  cohortConfigFingerprint
145
145
  } from "./index-rtry5xyf.js";
@@ -169,7 +169,7 @@ import {
169
169
  transactFile,
170
170
  transactKnowledge,
171
171
  wordBigrams
172
- } from "./index-nmyg9b7v.js";
172
+ } from "./index-pb8ag9vg.js";
173
173
  import {
174
174
  MAX_EVENT_LOG_ENTRIES,
175
175
  _internals,
@@ -179,7 +179,7 @@ import {
179
179
  recordHiveKnowledgeEvent,
180
180
  recordKnowledgeEvent,
181
181
  resolveKnowledgeEventsPath
182
- } from "./index-cnhp6c0k.js";
182
+ } from "./index-nqp13m5a.js";
183
183
  import {
184
184
  resolveHiveDataDir,
185
185
  resolveHiveEventsPath,
@@ -201,7 +201,7 @@ import {
201
201
  init_loader,
202
202
  loadPluginConfig,
203
203
  loadPluginConfigWithMeta
204
- } from "./index-abw10n3f.js";
204
+ } from "./index-gf9cxvp0.js";
205
205
  import {
206
206
  RetrospectiveEvidenceSchema
207
207
  } from "./index-k5jrywpr.js";
@@ -220,7 +220,7 @@ import {
220
220
  init_schema,
221
221
  init_tool_metadata,
222
222
  stripKnownSwarmPrefix
223
- } from "./index-c8sqc3nh.js";
223
+ } from "./index-vcqwhe9d.js";
224
224
  import {
225
225
  KNOWLEDGE_SCHEMA_VERSION,
226
226
  OUTCOME_BLOCK_THRESHOLD,
@@ -991,6 +991,7 @@ var _test_exports = {
991
991
  resolveRemoteRefsContainingHead,
992
992
  parseCriticVerdict,
993
993
  isProcessAlive,
994
+ rename: fsp.rename,
994
995
  nowMs: () => Date.now()
995
996
  };
996
997
  async function requireAnyActiveState(directory, sessionID) {
@@ -1009,7 +1010,8 @@ var PR_WORKFLOW_SHARED_CONTROLLER_TOOLS = new Set([
1009
1010
  "complete_pr_workflow",
1010
1011
  "dispatch_lanes_async",
1011
1012
  "get_async_result",
1012
- "get_async_status"
1013
+ "get_async_status",
1014
+ "prepare_pr_workflow_checkout"
1013
1015
  ]);
1014
1016
  var PR_REVIEW_CONTROLLER_TOOLS = new Set([
1015
1017
  "parse_lane_candidates",
@@ -1297,12 +1299,12 @@ function workflowGateStateLockPath(directory, sessionID) {
1297
1299
  return validateSwarmPath(directory, workflowGateStateLockRelativePath(sessionID));
1298
1300
  }
1299
1301
  function workflowGateStateLockRelativePath(sessionID) {
1300
- return path.join(WORKFLOW_GATE_DIR, `${safeSessionFileStem(sessionID)}.lock`);
1302
+ return path.join(WORKFLOW_GATE_DIR, `${prWorkflowSessionFileStem(sessionID)}.lock`);
1301
1303
  }
1302
1304
  function workflowGateStateRelativePath(sessionID) {
1303
- return path.join(WORKFLOW_GATE_DIR, `${safeSessionFileStem(sessionID)}.json`);
1305
+ return path.join(WORKFLOW_GATE_DIR, `${prWorkflowSessionFileStem(sessionID)}.json`);
1304
1306
  }
1305
- function safeSessionFileStem(sessionID) {
1307
+ function prWorkflowSessionFileStem(sessionID) {
1306
1308
  const normalized = normalizeSessionID(sessionID);
1307
1309
  const slug = normalized.replace(/[^A-Za-z0-9_.-]/g, "_").slice(0, 80) || "session";
1308
1310
  const digest = createHash2("sha256").update(normalized).digest("hex").slice(0, 12);
@@ -1322,7 +1324,7 @@ async function writeAtomicJson(filePath, value) {
1322
1324
  await fsp.writeFile(tempPath, JSON.stringify(value, null, 2), "utf-8");
1323
1325
  for (let attempt = 0;attempt < WINDOWS_RENAME_MAX_RETRIES; attempt++) {
1324
1326
  try {
1325
- await fsp.rename(tempPath, filePath);
1327
+ await _test_exports.rename(tempPath, filePath);
1326
1328
  lastError = undefined;
1327
1329
  break;
1328
1330
  } catch (error2) {
@@ -10947,7 +10949,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
10947
10949
  }
10948
10950
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
10949
10951
  try {
10950
- const skillModule = await import("./skill-generator-sv6zvdvz.js");
10952
+ const skillModule = await import("./skill-generator-8v463kj7.js");
10951
10953
  for (const cand of skillCandidates) {
10952
10954
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
10953
10955
  continue;
@@ -11284,7 +11286,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
11284
11286
  } catch {}
11285
11287
  }
11286
11288
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
11287
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-kd80m9vp.js");
11289
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-nna0zec3.js");
11288
11290
  for (const { id } of contradictedEntries) {
11289
11291
  try {
11290
11292
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -12083,7 +12085,7 @@ async function runCuratorPostMortem(directory, options = {}) {
12083
12085
  warnings.push("Failed to collect knowledge summary.");
12084
12086
  }
12085
12087
  try {
12086
- const { getScanStatus } = await import("./scan-cursor-qzn5jmbe.js");
12088
+ const { getScanStatus } = await import("./scan-cursor-cydz8d9q.js");
12087
12089
  const scanStatus = await getScanStatus(directory);
12088
12090
  if (scanStatus.remaining_estimate > 0) {
12089
12091
  warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
@@ -12255,9 +12257,9 @@ var _internals15 = {
12255
12257
  verifyPostMortemKnowledgeActions,
12256
12258
  repairPostMortemActions,
12257
12259
  loadDefaultKnowledgeConfig: async (directory) => {
12258
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2j92wnns.js");
12260
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
12259
12261
  try {
12260
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vvwf9ark.js");
12262
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
12261
12263
  const loaded = loadPluginConfigWithMeta2(directory);
12262
12264
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
12263
12265
  } catch {
@@ -12265,11 +12267,11 @@ var _internals15 = {
12265
12267
  }
12266
12268
  },
12267
12269
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
12268
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-g8rggzbk.js");
12270
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-qfh9xty4.js");
12269
12271
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
12270
12272
  },
12271
12273
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
12272
- const { checkHivePromotions } = await import("./hive-promoter-c458rgp5.js");
12274
+ const { checkHivePromotions } = await import("./hive-promoter-ktt17fyf.js");
12273
12275
  return checkHivePromotions(entries, knowledgeConfig, directory);
12274
12276
  },
12275
12277
  applyProposalTriage: async (directory, triage) => {
@@ -12278,7 +12280,7 @@ var _internals15 = {
12278
12280
  activateProposal,
12279
12281
  listSkills: listSkills2,
12280
12282
  sanitizeSlug
12281
- } = await import("./skill-generator-sv6zvdvz.js");
12283
+ } = await import("./skill-generator-8v463kj7.js");
12282
12284
  const result = {
12283
12285
  approved: [],
12284
12286
  rejected: [],
@@ -14803,9 +14805,9 @@ function hashContent(content) {
14803
14805
  return createHash7("sha1").update(content).digest("hex");
14804
14806
  }
14805
14807
  async function loadConfigForPolicyCurator(directory) {
14806
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2j92wnns.js");
14808
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
14807
14809
  try {
14808
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vvwf9ark.js");
14810
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
14809
14811
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
14810
14812
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
14811
14813
  } catch {
@@ -17966,7 +17968,7 @@ async function runFinalizeStage(ctx) {
17966
17968
  }
17967
17969
  }
17968
17970
  try {
17969
- const { CuratorConfigSchema: CCS } = await import("./schema-2j92wnns.js");
17971
+ const { CuratorConfigSchema: CCS } = await import("./schema-fa033pqw.js");
17970
17972
  const { config: pmLoadedConfig } = _internals24.loadPluginConfigWithMeta(ctx.directory);
17971
17973
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
17972
17974
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -20135,9 +20137,9 @@ var _internals28 = {
20135
20137
  readSwarmFileAsync,
20136
20138
  loadCuratorDeps: async () => {
20137
20139
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
20138
- import("./schema-2j92wnns.js"),
20139
- import("./curator-g8rggzbk.js"),
20140
- import("./curator-llm-factory-36psae60.js")
20140
+ import("./schema-fa033pqw.js"),
20141
+ import("./curator-qfh9xty4.js"),
20142
+ import("./curator-llm-factory-0rf29gfq.js")
20141
20143
  ]);
20142
20144
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
20143
20145
  }
@@ -20636,7 +20638,7 @@ import { fileURLToPath } from "url";
20636
20638
  // package.json
20637
20639
  var package_default = {
20638
20640
  name: "opencode-swarm",
20639
- version: "7.126.1",
20641
+ version: "7.126.2",
20640
20642
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
20641
20643
  main: "dist/index.js",
20642
20644
  types: "dist/index.d.ts",
@@ -21158,7 +21160,7 @@ async function computeCurationDiagnostics(directory, entries) {
21158
21160
  let scanCompleted = false;
21159
21161
  let scanRemaining = 0;
21160
21162
  try {
21161
- const { getScanStatus } = await import("./scan-cursor-qzn5jmbe.js");
21163
+ const { getScanStatus } = await import("./scan-cursor-cydz8d9q.js");
21162
21164
  const status = await getScanStatus(directory);
21163
21165
  scanGeneration = status.generation;
21164
21166
  scanCompleted = status.completed;
@@ -21168,17 +21170,17 @@ async function computeCurationDiagnostics(directory, entries) {
21168
21170
  try {
21169
21171
  const { isLinked: isLinked2 } = await import("./knowledge-link-4yd2z8ev.js");
21170
21172
  if (isLinked2(directory)) {
21171
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-2j92wnns.js");
21173
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-fa033pqw.js");
21172
21174
  let config;
21173
21175
  try {
21174
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-vvwf9ark.js");
21176
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-c48dvb6j.js");
21175
21177
  const loaded = loadPluginConfigWithMeta2(directory);
21176
21178
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
21177
21179
  } catch {
21178
21180
  config = KnowledgeConfigSchema2.parse({});
21179
21181
  }
21180
21182
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
21181
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-0t6hny6g.js");
21183
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-n944aq62.js");
21182
21184
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
21183
21185
  const cohortFp = await readCohortConfigFingerprint(directory);
21184
21186
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -22376,7 +22378,7 @@ async function handleDoctorCommand(directory, args) {
22376
22378
  const result = runConfigDoctor(config, directory);
22377
22379
  let output;
22378
22380
  if (enableAutoFix && result.hasAutoFixableIssues) {
22379
- const { runConfigDoctorWithFixes } = await import("./config-doctor-23jxdqwv.js");
22381
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-mfx27331.js");
22380
22382
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
22381
22383
  applyLossy: true
22382
22384
  });
@@ -41186,7 +41188,7 @@ function buildDetailedHelp(commandName, entry) {
41186
41188
  async function handleHelpCommand(ctx) {
41187
41189
  const targetCommand = ctx.args.join(" ");
41188
41190
  if (!targetCommand) {
41189
- const { buildHelpText } = await import("./index-yf4kvhrn.js");
41191
+ const { buildHelpText } = await import("./index-5nq8dp63.js");
41190
41192
  return buildHelpText();
41191
41193
  }
41192
41194
  const tokens = targetCommand.split(/\s+/);
@@ -41195,7 +41197,7 @@ async function handleHelpCommand(ctx) {
41195
41197
  return _internals62.buildDetailedHelp(resolved.key, resolved.entry);
41196
41198
  }
41197
41199
  const similar = _internals62.findSimilarCommands(targetCommand);
41198
- const { buildHelpText: fullHelp } = await import("./index-yf4kvhrn.js");
41200
+ const { buildHelpText: fullHelp } = await import("./index-5nq8dp63.js");
41199
41201
  if (similar.length > 0) {
41200
41202
  return `Command '/swarm ${targetCommand}' not found.
41201
41203
 
@@ -41334,7 +41336,7 @@ var COMMAND_REGISTRY = {
41334
41336
  },
41335
41337
  "guardrail explain": {
41336
41338
  handler: async (ctx) => {
41337
- const { handleGuardrailExplain } = await import("./guardrail-explain-6ffgrjx9.js");
41339
+ const { handleGuardrailExplain } = await import("./guardrail-explain-jsrjqps1.js");
41338
41340
  return handleGuardrailExplain(ctx.directory, ctx.args);
41339
41341
  },
41340
41342
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41344,7 +41346,7 @@ var COMMAND_REGISTRY = {
41344
41346
  },
41345
41347
  "guardrail-explain": {
41346
41348
  handler: async (ctx) => {
41347
- const { handleGuardrailExplain } = await import("./guardrail-explain-6ffgrjx9.js");
41349
+ const { handleGuardrailExplain } = await import("./guardrail-explain-jsrjqps1.js");
41348
41350
  return handleGuardrailExplain(ctx.directory, ctx.args);
41349
41351
  },
41350
41352
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -41354,7 +41356,7 @@ var COMMAND_REGISTRY = {
41354
41356
  },
41355
41357
  "guardrail-log": {
41356
41358
  handler: async (ctx) => {
41357
- const { handleGuardrailLog } = await import("./guardrail-log-57sczn5h.js");
41359
+ const { handleGuardrailLog } = await import("./guardrail-log-61gya05m.js");
41358
41360
  return handleGuardrailLog(ctx.directory, ctx.args);
41359
41361
  },
41360
41362
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -43138,7 +43140,7 @@ HARD CONSTRAINTS (apply regardless of skill load success):
43138
43140
  - Test execution, explorer lanes, reviewer dispatch, and critic challenge are all permitted within this mode
43139
43141
  - Quality is the only metric \u2014 there is no speed, efficiency, or time exception; time, tokens, and agent dispatches are irrelevant to correctness
43140
43142
  - FOLLOW THE SKILL EXACTLY: execute every phase of the loaded SKILL.md in order with no shortcuts, no phase-skipping, and no premature synthesis. If a required coverage phase cannot complete, apply the skill's coverage gate (retry or verified equivalent alternative). If the gap still cannot be closed, stop and surface the lane failure to the user as BLOCKED; do not produce a degraded review, partial verdict, or final synthesis.
43141
- - CHECK OUT THE PR BRANCH LOCALLY before launching explorer lanes: fetch the PR head ref if it is not present, verify the working tree is clean (git status --porcelain) and stash/abort if not, then check out the head branch. Explorers read the working-tree filesystem (Read/Glob/Grep), so without a checkout they read the base branch and produce invalid candidates. Always pass the base..head commit range in explorer delegations.
43143
+ - CHECK OUT THE PR BRANCH LOCALLY before launching explorer lanes: fetch the PR head ref if it is not present, verify the working tree is clean (git status --porcelain), and if tracked changes exist call \`prepare_pr_workflow_checkout\` with every explicit dirty tracked path before checkout. It returns an auditable stash OID and recovery command; it never stashes untracked files, which must be moved or removed manually. Do NOT run \`git stash\` through shell. Then check out the head branch. Explorers read the working-tree filesystem (Read/Glob/Grep), so without a checkout they read the base branch and produce invalid candidates. Always pass the base..head commit range in explorer delegations.
43142
43144
  - RUN ALL BASE LANES: the default PR_REVIEW path always launches exactly six repository-agnostic base check-type lanes from the skill. Use \`mode: "swarm-pr-review:base"\` and the exact six \`workflow_lane\` identifiers. The runtime rejects partial, duplicate, or mislabelled waves. Do not collapse, omit, or scale down the base lanes for a small, docs-only, or CI-only PR.
43143
43145
  - RETRY STRUCTURALLY: retry only failed base obligations in later \`swarm-pr-review:base\` async batches with the same exact \`pr_head_sha\`. Blocking \`dispatch_lanes\` and direct Task explorer/reviewer/critic dispatch are not provenance-equivalent and are rejected.
43144
43146
  - USE ASYNC DISPATCH WITHOUT IDLING: launch the base lanes with one \`dispatch_lanes_async\` call when available, record the \`batch_id\`, then keep doing non-dependent architect work while they run. Poll with \`collect_lane_results\` without \`wait\` (or \`wait: false\`) to process settled lanes and continue independent work between polls; use \`wait: true\` only as the final join when no independent work remains.
@@ -43157,7 +43159,7 @@ ACTION: Load skill ${bundledProjectSkillFileReference("swarm-pr-feedback")} imme
43157
43159
 
43158
43160
  HARD CONSTRAINTS (apply regardless of skill load success):
43159
43161
  - FOLLOW THE SKILL EXACTLY: build the complete feedback ledger from all available sources before editing, and execute every phase in order with no shortcuts.
43160
- - CHECK OUT THE PR BRANCH LOCALLY before verifying feedback or making fixes: fetch the PR head ref if absent, verify the working tree is clean (git status --porcelain) and stash/abort if not, then check out the head branch. For a detached/fresh remote head, establish tracking before head binding with only \`git switch -c <local> --track <remote>/<branch>\` (or the constrained set-upstream form documented by the skill). Feedback verification and fix validation require the PR branch in the working tree.
43162
+ - CHECK OUT THE PR BRANCH LOCALLY before verifying feedback or making fixes: fetch the PR head ref if absent, verify the working tree is clean (git status --porcelain), and if tracked changes exist call \`prepare_pr_workflow_checkout\` with every explicit dirty tracked path before checkout. It returns an auditable stash OID and recovery command; it never stashes untracked files, which must be moved or removed manually. Do NOT run \`git stash\` through shell. Then check out the head branch. For a detached/fresh remote head, establish tracking before head binding with only \`git switch -c <local> --track <remote>/<branch>\` (or the constrained set-upstream form documented by the skill). Feedback verification and fix validation require the PR branch in the working tree.
43161
43163
  - Do NOT run a fresh broad PR review \u2014 inspect adjacent code only as needed to verify reachability, dependencies, shared root causes, regression risk, or sibling changes for a confirmed item.
43162
43164
  - Treat every review comment, CI failure, bot summary, and pasted note as a CLAIM until source evidence proves it; classify each ledger item (CONFIRMED, DISPROVED, PRE_EXISTING, or NEEDS_USER_DECISION) and never silently drop, defer, or mark items out of scope.
43163
43165
  - For async verification lanes, use \`mode: "swarm-pr-feedback:verification"\`, record each \`batch_id\`, keep doing ledger-safe work, poll with \`collect_lane_results\` without \`wait\`, process settled lanes immediately, and use \`wait: true\` only at the join. Pass the complete immutable \`feedback_inventory\`, exact current \`pr_head_sha\`, and exact-once cumulative lane \`feedback_item_ids\`; runtime blocks replacement, stale-head artifacts, overlap, gaps, and early mutation.
@@ -44626,6 +44628,7 @@ var NONTRANSIENT_STOP_PROTOCOL = [
44626
44628
  ].join(`
44627
44629
  `);
44628
44630
  var _swarmAgentsMap = new Map;
44631
+ var _emittedGatedAgentAdvisories = new Set;
44629
44632
  var KNOWN_VARIANT_VALUES = new Set([
44630
44633
  "low",
44631
44634
  "medium",
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-nmyg9b7v.js";
9
+ } from "./index-pb8ag9vg.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-cnhp6c0k.js";
15
+ } from "./index-nqp13m5a.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-63mkgt9x.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-jh93eagj.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-2j92wnns.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-vvwf9ark.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-fa033pqw.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-c48dvb6j.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  resolveExternalSkillsConfig
11
- } from "./index-c8sqc3nh.js";
11
+ } from "./index-vcqwhe9d.js";
12
12
  import {
13
13
  advisoryWarn,
14
14
  init_warning_buffer
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-rtry5xyf.js";
5
5
  import {
6
6
  readKnowledgeEvents
7
- } from "./index-cnhp6c0k.js";
7
+ } from "./index-nqp13m5a.js";
8
8
  import {
9
9
  isLinked,
10
10
  readLinkPointer,
@@ -3,7 +3,7 @@ import {
3
3
  init_constants,
4
4
  init_schema,
5
5
  stripKnownSwarmPrefix
6
- } from "./index-c8sqc3nh.js";
6
+ } from "./index-vcqwhe9d.js";
7
7
  import {
8
8
  init_logger,
9
9
  warn
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
608
608
  deltas.push({ id, delta });
609
609
  }
610
610
  if (deltas.length > 0) {
611
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-1d4byc7y.js");
611
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-efvtng9t.js");
612
612
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
613
613
  }
614
614
  return {
@@ -650,7 +650,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
650
650
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
651
651
  if (atFloor.length === 0 && recovered.length === 0)
652
652
  return;
653
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-j7jfwm1d.js");
653
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-7k82xk36.js");
654
654
  const rollups = await readKnowledgeCounterRollups(directory);
655
655
  const flagIds = new Set;
656
656
  for (const e of atFloor) {
@@ -717,11 +717,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
717
717
  });
718
718
  }
719
719
  if (action === "quarantine" && toQuarantine.length > 0) {
720
- const { quarantineEntry } = await import("./knowledge-validator-63mkgt9x.js");
721
- const { KnowledgeConfigSchema } = await import("./schema-2j92wnns.js");
720
+ const { quarantineEntry } = await import("./knowledge-validator-jh93eagj.js");
721
+ const { KnowledgeConfigSchema } = await import("./schema-fa033pqw.js");
722
722
  let config;
723
723
  try {
724
- const { loadPluginConfigWithMeta } = await import("./index-vvwf9ark.js");
724
+ const { loadPluginConfigWithMeta } = await import("./index-c48dvb6j.js");
725
725
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
726
726
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
727
727
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-nmyg9b7v.js";
5
+ } from "./index-pb8ag9vg.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";
@@ -222,6 +222,10 @@ var init_tool_metadata = __esm(() => {
222
222
  description: "abort an unrecoverable PR_REVIEW/PR_FEEDBACK mechanical gate and clear its durable session state",
223
223
  agents: ["architect"]
224
224
  },
225
+ prepare_pr_workflow_checkout: {
226
+ description: "preserve explicit dirty tracked files before an unbound PR workflow checkout with an auditable recovery receipt",
227
+ agents: ["architect"]
228
+ },
225
229
  run_pr_feedback_stage_a: {
226
230
  description: "execute and persist mandatory PR-feedback Stage A checks on a content-bound revision",
227
231
  agents: ["architect"]
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-y9t766sw.js";
15
+ } from "./index-d88y17ht.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-echdpdhy.js";
22
+ } from "./index-gxw20m1d.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
package/dist/cli/index.js CHANGED
@@ -7,34 +7,34 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-y9t766sw.js";
11
- import"./index-echdpdhy.js";
12
- import"./index-w0yztxgq.js";
10
+ } from "./index-d88y17ht.js";
11
+ import"./index-gxw20m1d.js";
12
+ import"./index-3xd9a2g7.js";
13
13
  import"./index-kk1scggc.js";
14
14
  import"./index-4905hd2m.js";
15
15
  import"./index-134d35c1.js";
16
16
  import"./index-6n2jpz7x.js";
17
- import"./index-k5xh81c9.js";
18
- import"./index-nkhp7j16.js";
19
- import"./index-3hkbegq2.js";
17
+ import"./index-7bxw3v5w.js";
18
+ import"./index-f97dm6tz.js";
19
+ import"./index-pf3xae4s.js";
20
20
  import"./index-vxv732ex.js";
21
21
  import"./index-c8s9a3zh.js";
22
22
  import"./index-9ss2m4rs.js";
23
23
  import"./index-23zsx7dm.js";
24
- import"./index-6j9p0c40.js";
25
- import"./index-kx3533dm.js";
24
+ import"./index-88dt7c9z.js";
25
+ import"./index-gwss5btk.js";
26
26
  import"./index-rtry5xyf.js";
27
- import"./index-nmyg9b7v.js";
28
- import"./index-cnhp6c0k.js";
27
+ import"./index-pb8ag9vg.js";
28
+ import"./index-nqp13m5a.js";
29
29
  import"./index-ae75rja9.js";
30
30
  import"./index-q27bajqb.js";
31
- import"./index-abw10n3f.js";
31
+ import"./index-gf9cxvp0.js";
32
32
  import"./index-k5jrywpr.js";
33
33
  import"./index-n832052r.js";
34
34
  import {
35
35
  DEFAULT_AGENT_CONFIGS,
36
36
  init_constants
37
- } from "./index-c8sqc3nh.js";
37
+ } from "./index-vcqwhe9d.js";
38
38
  import"./index-bk5tah7q.js";
39
39
  import"./index-8fwhhayc.js";
40
40
  import"./index-q1exe2b3.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-nkhp7j16.js";
12
- import"./index-nmyg9b7v.js";
13
- import"./index-cnhp6c0k.js";
11
+ } from "./index-f97dm6tz.js";
12
+ import"./index-pb8ag9vg.js";
13
+ import"./index-nqp13m5a.js";
14
14
  import"./index-ae75rja9.js";
15
15
  import"./index-q27bajqb.js";
16
16
  import"./index-bk5tah7q.js";
@@ -26,7 +26,7 @@ import {
26
26
  resolveKnowledgeCounterBaselinePath,
27
27
  resolveKnowledgeEventsPath,
28
28
  resolveLegacyApplicationLogPath
29
- } from "./index-cnhp6c0k.js";
29
+ } from "./index-nqp13m5a.js";
30
30
  import"./index-ae75rja9.js";
31
31
  import"./index-q27bajqb.js";
32
32
  import"./index-zgwm4ryv.js";
@@ -40,7 +40,7 @@ import {
40
40
  transactKnowledge,
41
41
  transactKnowledgeWithCas,
42
42
  wordBigrams
43
- } from "./index-nmyg9b7v.js";
43
+ } from "./index-pb8ag9vg.js";
44
44
  import {
45
45
  resolveHiveDataDir
46
46
  } from "./index-ae75rja9.js";
@@ -23,11 +23,11 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-6j9p0c40.js";
27
- import"./index-kx3533dm.js";
26
+ } from "./index-88dt7c9z.js";
27
+ import"./index-gwss5btk.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-nmyg9b7v.js";
30
- import"./index-cnhp6c0k.js";
29
+ import"./index-pb8ag9vg.js";
30
+ import"./index-nqp13m5a.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-q27bajqb.js";
33
33
  import"./index-bk5tah7q.js";
@@ -4,8 +4,8 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-3hkbegq2.js";
8
- import"./index-nmyg9b7v.js";
7
+ } from "./index-pf3xae4s.js";
8
+ import"./index-pb8ag9vg.js";
9
9
  import"./index-ae75rja9.js";
10
10
  import"./index-q27bajqb.js";
11
11
  import"./index-bk5tah7q.js";
@@ -89,7 +89,7 @@ import {
89
89
  resolveGeneratedAgentRole,
90
90
  resolveGuardrailsConfig,
91
91
  stripKnownSwarmPrefix
92
- } from "./index-c8sqc3nh.js";
92
+ } from "./index-vcqwhe9d.js";
93
93
  import"./index-bk5tah7q.js";
94
94
  import"./index-zjygnfay.js";
95
95
  import"./index-bpmtbmy9.js";
@@ -33,12 +33,12 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-k5xh81c9.js";
37
- import"./index-6j9p0c40.js";
38
- import"./index-kx3533dm.js";
36
+ } from "./index-7bxw3v5w.js";
37
+ import"./index-88dt7c9z.js";
38
+ import"./index-gwss5btk.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-nmyg9b7v.js";
41
- import"./index-cnhp6c0k.js";
40
+ import"./index-pb8ag9vg.js";
41
+ import"./index-nqp13m5a.js";
42
42
  import"./index-ae75rja9.js";
43
43
  import"./index-q27bajqb.js";
44
44
  import"./index-bk5tah7q.js";
@@ -269,6 +269,17 @@ interface MessageWithParts {
269
269
  */
270
270
  export declare function isPlanCriticApproved(directory: string): Promise<boolean>;
271
271
  declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>): string | null;
272
+ /**
273
+ * Builds a cause-specific diagnostic for `prepareCoderScope`'s SCOPE_NOT_DECLARED
274
+ * throw when `resolveDelegatedPlanTaskId` returns null. Re-runs extraction with
275
+ * diagnostics enabled so the architect can self-correct in one turn instead of
276
+ * guessing. Issue #1914 Defect 2.
277
+ *
278
+ * Only invoked on the null-resolution failure path — does not affect happy-path
279
+ * latency, and does NOT handle plan-task-shaped-but-unknown ids (those are
280
+ * rejected by the membership gate in prepareCoderScope with their own message).
281
+ */
282
+ declare function describeCoderScopeFailure(args: Record<string, unknown>, planTaskIds: ReadonlySet<string>): string;
272
283
  /**
273
284
  * Parses structured per-task verdict lines from agent dispatch output.
274
285
  *
@@ -299,8 +310,8 @@ declare function buildParallelExecutionGuidance(directory: string | undefined, s
299
310
  declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined, session: AgentSessionState, directory: string): Promise<string | null>;
300
311
  /**
301
312
  * _internals export for testing — do not use in production code.
302
- * Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId, and
303
- * buildParallelExecutionGuidance for unit testing.
313
+ * Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId,
314
+ * describeCoderScopeFailure, and buildParallelExecutionGuidance for unit testing.
304
315
  *
305
316
  * Worktree operation entries (provisionWorktree, removeWorktree, etc.) proxy
306
317
  * to delegation-gate/worktree-isolation._internals via getters/setters so
@@ -309,6 +320,7 @@ declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined
309
320
  export declare const _internals: {
310
321
  resolveEvidenceTaskId: typeof resolveEvidenceTaskId;
311
322
  resolveDelegatedPlanTaskId: typeof resolveDelegatedPlanTaskId;
323
+ describeCoderScopeFailure: typeof describeCoderScopeFailure;
312
324
  parsePerTaskVerdicts: typeof parsePerTaskVerdicts;
313
325
  buildParallelExecutionGuidance: typeof buildParallelExecutionGuidance;
314
326
  loadPlanJsonOnly: typeof loadPlanJsonOnly;