opencode-swarm 7.79.1 → 7.79.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/council/SKILL.md +2 -1
- package/.opencode/skills/loop/SKILL.md +311 -0
- package/.opencode/skills/plan/SKILL.md +17 -1
- package/.opencode/skills/specify/SKILL.md +9 -9
- package/dist/agents/architect.d.ts +2 -1
- package/dist/cli/index.js +211 -22
- package/dist/commands/loop.d.ts +15 -0
- package/dist/commands/registry.d.ts +68 -0
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/index.js +236 -26
- package/package.json +3 -2
package/dist/cli/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "opencode-swarm",
|
|
55
|
-
version: "7.79.
|
|
55
|
+
version: "7.79.4",
|
|
56
56
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
57
57
|
main: "dist/index.js",
|
|
58
58
|
types: "dist/index.d.ts",
|
|
@@ -73,7 +73,7 @@ var init_package = __esm(() => {
|
|
|
73
73
|
license: "MIT",
|
|
74
74
|
repository: {
|
|
75
75
|
type: "git",
|
|
76
|
-
url: "https://github.com/
|
|
76
|
+
url: "https://github.com/ZaxbyHub/opencode-swarm.git"
|
|
77
77
|
},
|
|
78
78
|
publishConfig: {
|
|
79
79
|
access: "public",
|
|
@@ -112,6 +112,7 @@ var init_package = __esm(() => {
|
|
|
112
112
|
".opencode/skills/critic-gate",
|
|
113
113
|
".opencode/skills/execute",
|
|
114
114
|
".opencode/skills/phase-wrap",
|
|
115
|
+
".opencode/skills/loop",
|
|
115
116
|
"tests/fixtures/memory-recall",
|
|
116
117
|
"README.md",
|
|
117
118
|
"LICENSE"
|
|
@@ -318,7 +319,8 @@ var init_bundled_skills = __esm(() => {
|
|
|
318
319
|
"plan",
|
|
319
320
|
"critic-gate",
|
|
320
321
|
"execute",
|
|
321
|
-
"phase-wrap"
|
|
322
|
+
"phase-wrap",
|
|
323
|
+
"loop"
|
|
322
324
|
];
|
|
323
325
|
syncedProjectSkillTargets = new Set;
|
|
324
326
|
});
|
|
@@ -23512,8 +23514,16 @@ var init_tool_policy = __esm(() => {
|
|
|
23512
23514
|
}).sort());
|
|
23513
23515
|
SWARM_COMMAND_TOOL_ALLOWLIST = lazySet(() => VALID_COMMANDS.filter((cmd) => COMMAND_REGISTRY[cmd]?.toolPolicy === "agent"));
|
|
23514
23516
|
HUMAN_ONLY_SWARM_COMMANDS = lazySet(() => VALID_COMMANDS.filter((cmd) => {
|
|
23515
|
-
const
|
|
23516
|
-
|
|
23517
|
+
const entry = COMMAND_REGISTRY[cmd];
|
|
23518
|
+
const policy = entry?.toolPolicy;
|
|
23519
|
+
if (policy === "human-only" || policy === "restricted")
|
|
23520
|
+
return true;
|
|
23521
|
+
if (entry?.aliasOf) {
|
|
23522
|
+
const target = COMMAND_REGISTRY[entry.aliasOf];
|
|
23523
|
+
const targetPolicy = target?.toolPolicy;
|
|
23524
|
+
return targetPolicy === "human-only" || targetPolicy === "restricted";
|
|
23525
|
+
}
|
|
23526
|
+
return false;
|
|
23517
23527
|
}));
|
|
23518
23528
|
NO_ARGS = lazySet(() => VALID_COMMANDS.filter((cmd) => COMMAND_REGISTRY[cmd]?.toolNoArgs === true));
|
|
23519
23529
|
SUMMARY_ID_PATTERN = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
|
|
@@ -54770,6 +54780,116 @@ var init_learning = __esm(() => {
|
|
|
54770
54780
|
init_learning_metrics();
|
|
54771
54781
|
});
|
|
54772
54782
|
|
|
54783
|
+
// src/commands/loop.ts
|
|
54784
|
+
function sanitizeObjective(raw) {
|
|
54785
|
+
const collapsed = raw.replace(/\s+/g, " ").trim();
|
|
54786
|
+
const stripped = collapsed.replace(/\[\s*MODE\s*:[^\]]*\]/gi, "");
|
|
54787
|
+
const normalized = stripped.replace(/\s+/g, " ").trim();
|
|
54788
|
+
if (normalized.length <= MAX_OBJECTIVE_LEN)
|
|
54789
|
+
return normalized;
|
|
54790
|
+
return `${normalized.slice(0, MAX_OBJECTIVE_LEN)}\u2026`;
|
|
54791
|
+
}
|
|
54792
|
+
function isPositiveInteger(raw) {
|
|
54793
|
+
return /^\d+$/.test(raw);
|
|
54794
|
+
}
|
|
54795
|
+
function parseArgs7(args) {
|
|
54796
|
+
const result = {
|
|
54797
|
+
maxCycles: DEFAULT_MAX_CYCLES,
|
|
54798
|
+
autonomy: DEFAULT_AUTONOMY,
|
|
54799
|
+
depth: DEFAULT_DEPTH2,
|
|
54800
|
+
resume: false,
|
|
54801
|
+
rest: []
|
|
54802
|
+
};
|
|
54803
|
+
let i = 0;
|
|
54804
|
+
while (i < args.length) {
|
|
54805
|
+
const token = args[i];
|
|
54806
|
+
if (token === "--max-cycles") {
|
|
54807
|
+
if (i + 1 >= args.length) {
|
|
54808
|
+
return { ...result, error: `Flag "${token}" requires a value` };
|
|
54809
|
+
}
|
|
54810
|
+
const value = args[++i];
|
|
54811
|
+
if (!isPositiveInteger(value) || Number(value) < MIN_MAX_CYCLES || Number(value) > MAX_MAX_CYCLES) {
|
|
54812
|
+
return {
|
|
54813
|
+
...result,
|
|
54814
|
+
error: `Invalid --max-cycles value "${value}". Must be an integer between ${MIN_MAX_CYCLES} and ${MAX_MAX_CYCLES}.`
|
|
54815
|
+
};
|
|
54816
|
+
}
|
|
54817
|
+
result.maxCycles = Number(value);
|
|
54818
|
+
} else if (token === "--autonomy") {
|
|
54819
|
+
if (i + 1 >= args.length) {
|
|
54820
|
+
return { ...result, error: `Flag "${token}" requires a value` };
|
|
54821
|
+
}
|
|
54822
|
+
const value = args[++i];
|
|
54823
|
+
if (!AUTONOMY_LEVELS.has(value)) {
|
|
54824
|
+
return {
|
|
54825
|
+
...result,
|
|
54826
|
+
error: `Invalid autonomy "${value}". Must be one of: checkpoint, auto.`
|
|
54827
|
+
};
|
|
54828
|
+
}
|
|
54829
|
+
result.autonomy = value;
|
|
54830
|
+
} else if (token === "--depth") {
|
|
54831
|
+
if (i + 1 >= args.length) {
|
|
54832
|
+
return { ...result, error: `Flag "${token}" requires a value` };
|
|
54833
|
+
}
|
|
54834
|
+
const value = args[++i];
|
|
54835
|
+
if (!DEPTHS2.has(value)) {
|
|
54836
|
+
return {
|
|
54837
|
+
...result,
|
|
54838
|
+
error: `Invalid depth "${value}". Must be one of: standard, exhaustive.`
|
|
54839
|
+
};
|
|
54840
|
+
}
|
|
54841
|
+
result.depth = value;
|
|
54842
|
+
} else if (token === "--resume") {
|
|
54843
|
+
result.resume = true;
|
|
54844
|
+
} else if (token.startsWith("--")) {
|
|
54845
|
+
return { ...result, error: `Unknown flag "${token}"` };
|
|
54846
|
+
} else {
|
|
54847
|
+
result.rest.push(token);
|
|
54848
|
+
}
|
|
54849
|
+
i++;
|
|
54850
|
+
}
|
|
54851
|
+
return result;
|
|
54852
|
+
}
|
|
54853
|
+
async function handleLoopCommand(_directory, args) {
|
|
54854
|
+
const parsed = parseArgs7(args);
|
|
54855
|
+
if (parsed.error) {
|
|
54856
|
+
return `Error: ${parsed.error}
|
|
54857
|
+
|
|
54858
|
+
${USAGE7}`;
|
|
54859
|
+
}
|
|
54860
|
+
const objective = sanitizeObjective(parsed.rest.join(" "));
|
|
54861
|
+
if (!objective && !parsed.resume) {
|
|
54862
|
+
return USAGE7;
|
|
54863
|
+
}
|
|
54864
|
+
const header = `[MODE: LOOP max_cycles=${parsed.maxCycles} autonomy=${parsed.autonomy}` + ` depth=${parsed.depth} resume=${parsed.resume}]`;
|
|
54865
|
+
if (!objective && parsed.resume) {
|
|
54866
|
+
return `${header} Resume the existing compound-engineering loop from durable state in .swarm/loop/. Read the latest run state, report cycle progress, and continue from the current phase.`;
|
|
54867
|
+
}
|
|
54868
|
+
return `${header} ${objective}`;
|
|
54869
|
+
}
|
|
54870
|
+
var MAX_OBJECTIVE_LEN = 2000, DEPTHS2, AUTONOMY_LEVELS, DEFAULT_DEPTH2 = "standard", DEFAULT_AUTONOMY = "checkpoint", DEFAULT_MAX_CYCLES = 3, MIN_MAX_CYCLES = 1, MAX_MAX_CYCLES = 5, USAGE7 = `Usage: /swarm loop <objective> [--max-cycles 1..5] [--autonomy checkpoint|auto] [--depth standard|exhaustive] [--resume]
|
|
54871
|
+
|
|
54872
|
+
Run a compound-engineering loop: brainstorm \u2192 plan \u2192 build \u2192 review \u2192 improve,
|
|
54873
|
+
iterating until the objective is met or a budget stop condition fires.
|
|
54874
|
+
|
|
54875
|
+
Examples:
|
|
54876
|
+
/swarm loop "add rate limiting to the public API"
|
|
54877
|
+
/swarm loop "harden auth session handling" --depth exhaustive --max-cycles 2
|
|
54878
|
+
/swarm loop "migrate config loader" --autonomy auto
|
|
54879
|
+
/swarm loop --resume
|
|
54880
|
+
|
|
54881
|
+
Flags:
|
|
54882
|
+
--max-cycles <N> outer improvement cycles, 1..5 (default: 3)
|
|
54883
|
+
--autonomy <level> checkpoint (pause at phase gates, default) or auto
|
|
54884
|
+
(run unattended; hard stop conditions still apply)
|
|
54885
|
+
--depth <name> standard (default) or exhaustive (wider exploration)
|
|
54886
|
+
--resume resume the existing loop run from durable state in
|
|
54887
|
+
.swarm/loop/ instead of starting a new objective`;
|
|
54888
|
+
var init_loop = __esm(() => {
|
|
54889
|
+
DEPTHS2 = new Set(["standard", "exhaustive"]);
|
|
54890
|
+
AUTONOMY_LEVELS = new Set(["checkpoint", "auto"]);
|
|
54891
|
+
});
|
|
54892
|
+
|
|
54773
54893
|
// src/memory/config.ts
|
|
54774
54894
|
function resolveMemoryConfig(input) {
|
|
54775
54895
|
return {
|
|
@@ -58629,7 +58749,7 @@ var init_pr_monitor_status = __esm(() => {
|
|
|
58629
58749
|
});
|
|
58630
58750
|
|
|
58631
58751
|
// src/commands/pr-review.ts
|
|
58632
|
-
function
|
|
58752
|
+
function parseArgs8(args) {
|
|
58633
58753
|
const out = { council: false, rest: [] };
|
|
58634
58754
|
for (const token of args) {
|
|
58635
58755
|
if (token === "--council") {
|
|
@@ -58648,29 +58768,29 @@ function parseArgs7(args) {
|
|
|
58648
58768
|
return out;
|
|
58649
58769
|
}
|
|
58650
58770
|
function handlePrReviewCommand(directory, args) {
|
|
58651
|
-
const parsed =
|
|
58771
|
+
const parsed = parseArgs8(args);
|
|
58652
58772
|
if (parsed.unknownFlag) {
|
|
58653
58773
|
return `Error: Unknown flag "${parsed.unknownFlag}"
|
|
58654
58774
|
|
|
58655
|
-
${
|
|
58775
|
+
${USAGE8}`;
|
|
58656
58776
|
}
|
|
58657
58777
|
const resolved = resolvePrCommandInput(parsed.rest, directory);
|
|
58658
58778
|
if (resolved === null) {
|
|
58659
|
-
return
|
|
58779
|
+
return USAGE8;
|
|
58660
58780
|
}
|
|
58661
58781
|
if ("error" in resolved) {
|
|
58662
58782
|
return `Error: ${resolved.error}
|
|
58663
58783
|
|
|
58664
|
-
${
|
|
58784
|
+
${USAGE8}`;
|
|
58665
58785
|
}
|
|
58666
58786
|
const councilFlag = parsed.council ? "council=true" : "council=false";
|
|
58667
58787
|
const signal = `[MODE: PR_REVIEW pr="${resolved.prUrl}" ${councilFlag}]`;
|
|
58668
58788
|
return resolved.instructions ? `${signal} ${resolved.instructions}` : signal;
|
|
58669
58789
|
}
|
|
58670
|
-
var
|
|
58790
|
+
var USAGE8;
|
|
58671
58791
|
var init_pr_review = __esm(() => {
|
|
58672
58792
|
init_pr_ref();
|
|
58673
|
-
|
|
58793
|
+
USAGE8 = [
|
|
58674
58794
|
"Usage: /swarm pr-review <url|owner/repo#N|N> [--council] [instructions...]",
|
|
58675
58795
|
"",
|
|
58676
58796
|
"Run a full swarm PR review on a GitHub pull request.",
|
|
@@ -65850,7 +65970,7 @@ var init_rollback = __esm(() => {
|
|
|
65850
65970
|
});
|
|
65851
65971
|
|
|
65852
65972
|
// src/commands/sdd.ts
|
|
65853
|
-
function
|
|
65973
|
+
function parseArgs9(args) {
|
|
65854
65974
|
const parsed = { json: false, dryRun: false };
|
|
65855
65975
|
for (let i = 0;i < args.length; i++) {
|
|
65856
65976
|
const token = args[i];
|
|
@@ -65881,11 +66001,11 @@ function formatList(items) {
|
|
|
65881
66001
|
`) : "- none";
|
|
65882
66002
|
}
|
|
65883
66003
|
async function handleSddStatusCommand(directory, args) {
|
|
65884
|
-
const parsed =
|
|
66004
|
+
const parsed = parseArgs9(args);
|
|
65885
66005
|
if (parsed.error)
|
|
65886
66006
|
return `Error: ${parsed.error}
|
|
65887
66007
|
|
|
65888
|
-
${
|
|
66008
|
+
${USAGE9}`;
|
|
65889
66009
|
const status = loadSddStatusSync(directory);
|
|
65890
66010
|
if (parsed.json)
|
|
65891
66011
|
return JSON.stringify(status, null, 2);
|
|
@@ -65919,11 +66039,11 @@ ${formatList([
|
|
|
65919
66039
|
`);
|
|
65920
66040
|
}
|
|
65921
66041
|
async function handleSddValidateCommand(directory, args) {
|
|
65922
|
-
const parsed =
|
|
66042
|
+
const parsed = parseArgs9(args);
|
|
65923
66043
|
if (parsed.error)
|
|
65924
66044
|
return `Error: ${parsed.error}
|
|
65925
66045
|
|
|
65926
|
-
${
|
|
66046
|
+
${USAGE9}`;
|
|
65927
66047
|
const status = loadSddStatusSync(directory);
|
|
65928
66048
|
const projection = buildOpenSpecProjectionSync(directory, {
|
|
65929
66049
|
changeId: parsed.changeId
|
|
@@ -65961,11 +66081,11 @@ ${formatList(result.warnings)}` : ""
|
|
|
65961
66081
|
`);
|
|
65962
66082
|
}
|
|
65963
66083
|
async function handleSddProjectCommand(directory, args) {
|
|
65964
|
-
const parsed =
|
|
66084
|
+
const parsed = parseArgs9(args);
|
|
65965
66085
|
if (parsed.error)
|
|
65966
66086
|
return `Error: ${parsed.error}
|
|
65967
66087
|
|
|
65968
|
-
${
|
|
66088
|
+
${USAGE9}`;
|
|
65969
66089
|
const result = writeProjectedSpecSync(directory, {
|
|
65970
66090
|
changeId: parsed.changeId,
|
|
65971
66091
|
dryRun: parsed.dryRun
|
|
@@ -65985,7 +66105,7 @@ ${USAGE8}`;
|
|
|
65985
66105
|
return [
|
|
65986
66106
|
"SDD projection failed: no valid OpenSpec-compatible projection could be built.",
|
|
65987
66107
|
"",
|
|
65988
|
-
|
|
66108
|
+
USAGE9
|
|
65989
66109
|
].join(`
|
|
65990
66110
|
`);
|
|
65991
66111
|
}
|
|
@@ -66002,9 +66122,9 @@ ${formatList(result.projection.warnings)}` : ""
|
|
|
66002
66122
|
`);
|
|
66003
66123
|
}
|
|
66004
66124
|
async function handleSddCommand(_directory, _args) {
|
|
66005
|
-
return
|
|
66125
|
+
return USAGE9;
|
|
66006
66126
|
}
|
|
66007
|
-
var
|
|
66127
|
+
var USAGE9 = `Usage:
|
|
66008
66128
|
/swarm sdd status [--json]
|
|
66009
66129
|
/swarm sdd validate [--json] [--change <id>]
|
|
66010
66130
|
/swarm sdd project [--dry-run] [--json] [--change <id>]
|
|
@@ -67474,6 +67594,7 @@ var init_registry = __esm(() => {
|
|
|
67474
67594
|
init_issue();
|
|
67475
67595
|
init_knowledge();
|
|
67476
67596
|
init_learning();
|
|
67597
|
+
init_loop();
|
|
67477
67598
|
init_memory2();
|
|
67478
67599
|
init_plan();
|
|
67479
67600
|
init_post_mortem();
|
|
@@ -67833,6 +67954,24 @@ Subcommands:
|
|
|
67833
67954
|
category: "utility",
|
|
67834
67955
|
toolPolicy: "human-only"
|
|
67835
67956
|
},
|
|
67957
|
+
"sdd-status": {
|
|
67958
|
+
handler: (ctx) => handleSddStatusCommand(ctx.directory, ctx.args),
|
|
67959
|
+
description: "Show OpenSpec-compatible SDD status and effective spec source",
|
|
67960
|
+
aliasOf: "sdd status",
|
|
67961
|
+
deprecated: true
|
|
67962
|
+
},
|
|
67963
|
+
"sdd-validate": {
|
|
67964
|
+
handler: (ctx) => handleSddValidateCommand(ctx.directory, ctx.args),
|
|
67965
|
+
description: "Validate OpenSpec-compatible artifacts and effective spec projection",
|
|
67966
|
+
aliasOf: "sdd validate",
|
|
67967
|
+
deprecated: true
|
|
67968
|
+
},
|
|
67969
|
+
"sdd-project": {
|
|
67970
|
+
handler: (ctx) => handleSddProjectCommand(ctx.directory, ctx.args),
|
|
67971
|
+
description: "Materialize the OpenSpec-compatible effective spec into .swarm/spec.md",
|
|
67972
|
+
aliasOf: "sdd project",
|
|
67973
|
+
deprecated: true
|
|
67974
|
+
},
|
|
67836
67975
|
analyze: {
|
|
67837
67976
|
handler: (ctx) => handleAnalyzeCommand(ctx.directory, ctx.args),
|
|
67838
67977
|
description: "Analyze spec.md vs plan.md for requirement coverage gaps",
|
|
@@ -67862,6 +68001,14 @@ Subcommands:
|
|
|
67862
68001
|
category: "agent",
|
|
67863
68002
|
toolPolicy: "none"
|
|
67864
68003
|
},
|
|
68004
|
+
loop: {
|
|
68005
|
+
handler: (ctx) => handleModeCommandWithBundledSkills(ctx, handleLoopCommand),
|
|
68006
|
+
description: "Enter architect MODE: LOOP \u2014 compound-engineering loop: brainstorm \u2192 plan \u2192 build \u2192 review \u2192 improve, iterating until done [objective]",
|
|
68007
|
+
args: "<objective> [--max-cycles 1..5] [--autonomy checkpoint|auto] [--depth standard|exhaustive] [--resume]",
|
|
68008
|
+
details: "Triggers the architect to run the compound-engineering loop defined in .opencode/skills/loop/SKILL.md: BRAINSTORM (requirements) \u2192 PLAN (+ critic gate) \u2192 BUILD (execute) \u2192 REVIEW (independent reviewer + critic on the diff, report-only) \u2192 IMPROVE (phase-wrap retrospective + compounding learning capture), then evaluate stop conditions and loop for another improvement cycle if the objective is unmet and budget remains. Generator and reviewer/critic run in separate contexts; failing assertions must be fixed at the root cause, never weakened, mocked, or skipped. Defense-in-depth stop conditions: objective met, --max-cycles budget (default 3), no-progress/plateau, oscillation, unrecoverable error, or explicit user stop. --autonomy checkpoint (default) pauses at phase gates for user approval; --autonomy auto runs unattended with hard stops still enforced. --depth exhaustive widens exploration. --resume continues an existing loop run from durable .swarm/loop/ state. Distinct from full-auto (autonomous cross-phase oversight) and turbo (parallel lanes within a phase): loop is a user-initiated, gated, compounding workflow.",
|
|
68009
|
+
category: "agent",
|
|
68010
|
+
toolPolicy: "none"
|
|
68011
|
+
},
|
|
67865
68012
|
council: {
|
|
67866
68013
|
handler: (ctx) => handleModeCommandWithBundledSkills(ctx, handleCouncilCommand),
|
|
67867
68014
|
description: "Enter architect MODE: COUNCIL \u2014 multi-model deliberation [question] [--preset <name>] [--spec-review]",
|
|
@@ -67894,6 +68041,12 @@ Subcommands:
|
|
|
67894
68041
|
category: "agent",
|
|
67895
68042
|
toolPolicy: "human-only"
|
|
67896
68043
|
},
|
|
68044
|
+
"pr-subscribe": {
|
|
68045
|
+
handler: (ctx) => handlePrSubscribeCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
68046
|
+
description: "Subscribe the current session to PR state-change notifications",
|
|
68047
|
+
aliasOf: "pr subscribe",
|
|
68048
|
+
deprecated: true
|
|
68049
|
+
},
|
|
67897
68050
|
"pr unsubscribe": {
|
|
67898
68051
|
handler: (ctx) => handlePrUnsubscribeCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
67899
68052
|
description: "Unsubscribe the current session from PR state-change notifications",
|
|
@@ -67902,6 +68055,12 @@ Subcommands:
|
|
|
67902
68055
|
category: "agent",
|
|
67903
68056
|
toolPolicy: "human-only"
|
|
67904
68057
|
},
|
|
68058
|
+
"pr-unsubscribe": {
|
|
68059
|
+
handler: (ctx) => handlePrUnsubscribeCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
68060
|
+
description: "Unsubscribe the current session from PR state-change notifications",
|
|
68061
|
+
aliasOf: "pr unsubscribe",
|
|
68062
|
+
deprecated: true
|
|
68063
|
+
},
|
|
67905
68064
|
"pr status": {
|
|
67906
68065
|
handler: (ctx) => handlePrMonitorStatusCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
67907
68066
|
description: "Show PR monitor subscription status for the current session",
|
|
@@ -67911,6 +68070,12 @@ Subcommands:
|
|
|
67911
68070
|
toolPolicy: "agent",
|
|
67912
68071
|
toolNoArgs: true
|
|
67913
68072
|
},
|
|
68073
|
+
"pr-status": {
|
|
68074
|
+
handler: (ctx) => handlePrMonitorStatusCommand(ctx.directory, ctx.args, ctx.sessionID),
|
|
68075
|
+
description: "Show PR monitor subscription status for the current session",
|
|
68076
|
+
aliasOf: "pr status",
|
|
68077
|
+
deprecated: true
|
|
68078
|
+
},
|
|
67914
68079
|
"deep-dive": {
|
|
67915
68080
|
handler: (ctx) => handleModeCommandWithBundledSkills(ctx, handleDeepDiveCommand),
|
|
67916
68081
|
description: "Launch deep codebase audit with parallel explorer waves, dual reviewers, and critic challenge [scope]",
|
|
@@ -68209,6 +68374,30 @@ Subcommands:
|
|
|
68209
68374
|
category: "utility",
|
|
68210
68375
|
toolPolicy: "human-only"
|
|
68211
68376
|
},
|
|
68377
|
+
"memory-status": {
|
|
68378
|
+
handler: (ctx) => handleMemoryStatusCommand(ctx.directory, ctx.args),
|
|
68379
|
+
description: "Show Swarm memory provider, JSONL, and migration status",
|
|
68380
|
+
aliasOf: "memory status",
|
|
68381
|
+
deprecated: true
|
|
68382
|
+
},
|
|
68383
|
+
"memory-export": {
|
|
68384
|
+
handler: (ctx) => handleMemoryExportCommand(ctx.directory, ctx.args),
|
|
68385
|
+
description: "Export current Swarm memory to JSONL files",
|
|
68386
|
+
aliasOf: "memory export",
|
|
68387
|
+
deprecated: true
|
|
68388
|
+
},
|
|
68389
|
+
"memory-import": {
|
|
68390
|
+
handler: (ctx) => handleMemoryImportCommand(ctx.directory, ctx.args),
|
|
68391
|
+
description: "Import legacy JSONL memory into SQLite",
|
|
68392
|
+
aliasOf: "memory import",
|
|
68393
|
+
deprecated: true
|
|
68394
|
+
},
|
|
68395
|
+
"memory-migrate": {
|
|
68396
|
+
handler: (ctx) => handleMemoryMigrateCommand(ctx.directory, ctx.args),
|
|
68397
|
+
description: "Run the one-time legacy JSONL to SQLite migration",
|
|
68398
|
+
aliasOf: "memory migrate",
|
|
68399
|
+
deprecated: true
|
|
68400
|
+
},
|
|
68212
68401
|
checkpoint: {
|
|
68213
68402
|
handler: (ctx) => handleCheckpointCommand(ctx.directory, ctx.args),
|
|
68214
68403
|
description: "Manage project checkpoints [save|restore|delete|list] <label>",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle /swarm loop command.
|
|
3
|
+
*
|
|
4
|
+
* Sanitizes the objective input, parses flags, and emits a [MODE: LOOP ...]
|
|
5
|
+
* signal. The architect picks up the signal and loads
|
|
6
|
+
* `.opencode/skills/loop/SKILL.md`, which runs the compound-engineering loop:
|
|
7
|
+
* brainstorm → plan → build → review → improve, iterating under
|
|
8
|
+
* defense-in-depth stop conditions until the objective is met or a budget is
|
|
9
|
+
* exhausted.
|
|
10
|
+
*
|
|
11
|
+
* The objective is sanitized to prevent prompt injection of rival MODE:
|
|
12
|
+
* headers or newline-based control sequences (mirrors the brainstorm /
|
|
13
|
+
* deep-dive handlers).
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleLoopCommand(_directory: string, args: string[]): Promise<string>;
|
|
@@ -381,6 +381,24 @@ export declare const COMMAND_REGISTRY: {
|
|
|
381
381
|
readonly category: "utility";
|
|
382
382
|
readonly toolPolicy: "human-only";
|
|
383
383
|
};
|
|
384
|
+
readonly 'sdd-status': {
|
|
385
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
386
|
+
readonly description: "Show OpenSpec-compatible SDD status and effective spec source";
|
|
387
|
+
readonly aliasOf: "sdd status";
|
|
388
|
+
readonly deprecated: true;
|
|
389
|
+
};
|
|
390
|
+
readonly 'sdd-validate': {
|
|
391
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
392
|
+
readonly description: "Validate OpenSpec-compatible artifacts and effective spec projection";
|
|
393
|
+
readonly aliasOf: "sdd validate";
|
|
394
|
+
readonly deprecated: true;
|
|
395
|
+
};
|
|
396
|
+
readonly 'sdd-project': {
|
|
397
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
398
|
+
readonly description: "Materialize the OpenSpec-compatible effective spec into .swarm/spec.md";
|
|
399
|
+
readonly aliasOf: "sdd project";
|
|
400
|
+
readonly deprecated: true;
|
|
401
|
+
};
|
|
384
402
|
readonly analyze: {
|
|
385
403
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
386
404
|
readonly description: "Analyze spec.md vs plan.md for requirement coverage gaps";
|
|
@@ -410,6 +428,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
410
428
|
readonly category: "agent";
|
|
411
429
|
readonly toolPolicy: "none";
|
|
412
430
|
};
|
|
431
|
+
readonly loop: {
|
|
432
|
+
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
433
|
+
readonly description: "Enter architect MODE: LOOP — compound-engineering loop: brainstorm → plan → build → review → improve, iterating until done [objective]";
|
|
434
|
+
readonly args: "<objective> [--max-cycles 1..5] [--autonomy checkpoint|auto] [--depth standard|exhaustive] [--resume]";
|
|
435
|
+
readonly details: "Triggers the architect to run the compound-engineering loop defined in .opencode/skills/loop/SKILL.md: BRAINSTORM (requirements) → PLAN (+ critic gate) → BUILD (execute) → REVIEW (independent reviewer + critic on the diff, report-only) → IMPROVE (phase-wrap retrospective + compounding learning capture), then evaluate stop conditions and loop for another improvement cycle if the objective is unmet and budget remains. Generator and reviewer/critic run in separate contexts; failing assertions must be fixed at the root cause, never weakened, mocked, or skipped. Defense-in-depth stop conditions: objective met, --max-cycles budget (default 3), no-progress/plateau, oscillation, unrecoverable error, or explicit user stop. --autonomy checkpoint (default) pauses at phase gates for user approval; --autonomy auto runs unattended with hard stops still enforced. --depth exhaustive widens exploration. --resume continues an existing loop run from durable .swarm/loop/ state. Distinct from full-auto (autonomous cross-phase oversight) and turbo (parallel lanes within a phase): loop is a user-initiated, gated, compounding workflow.";
|
|
436
|
+
readonly category: "agent";
|
|
437
|
+
readonly toolPolicy: "none";
|
|
438
|
+
};
|
|
413
439
|
readonly council: {
|
|
414
440
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
415
441
|
readonly description: "Enter architect MODE: COUNCIL — multi-model deliberation [question] [--preset <name>] [--spec-review]";
|
|
@@ -442,6 +468,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
442
468
|
readonly category: "agent";
|
|
443
469
|
readonly toolPolicy: "human-only";
|
|
444
470
|
};
|
|
471
|
+
readonly 'pr-subscribe': {
|
|
472
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
473
|
+
readonly description: "Subscribe the current session to PR state-change notifications";
|
|
474
|
+
readonly aliasOf: "pr subscribe";
|
|
475
|
+
readonly deprecated: true;
|
|
476
|
+
};
|
|
445
477
|
readonly 'pr unsubscribe': {
|
|
446
478
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
447
479
|
readonly description: "Unsubscribe the current session from PR state-change notifications";
|
|
@@ -450,6 +482,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
450
482
|
readonly category: "agent";
|
|
451
483
|
readonly toolPolicy: "human-only";
|
|
452
484
|
};
|
|
485
|
+
readonly 'pr-unsubscribe': {
|
|
486
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
487
|
+
readonly description: "Unsubscribe the current session from PR state-change notifications";
|
|
488
|
+
readonly aliasOf: "pr unsubscribe";
|
|
489
|
+
readonly deprecated: true;
|
|
490
|
+
};
|
|
453
491
|
readonly 'pr status': {
|
|
454
492
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
455
493
|
readonly description: "Show PR monitor subscription status for the current session";
|
|
@@ -459,6 +497,12 @@ export declare const COMMAND_REGISTRY: {
|
|
|
459
497
|
readonly toolPolicy: "agent";
|
|
460
498
|
readonly toolNoArgs: true;
|
|
461
499
|
};
|
|
500
|
+
readonly 'pr-status': {
|
|
501
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
502
|
+
readonly description: "Show PR monitor subscription status for the current session";
|
|
503
|
+
readonly aliasOf: "pr status";
|
|
504
|
+
readonly deprecated: true;
|
|
505
|
+
};
|
|
462
506
|
readonly 'deep-dive': {
|
|
463
507
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
464
508
|
readonly description: "Launch deep codebase audit with parallel explorer waves, dual reviewers, and critic challenge [scope]";
|
|
@@ -742,6 +786,30 @@ export declare const COMMAND_REGISTRY: {
|
|
|
742
786
|
readonly category: "utility";
|
|
743
787
|
readonly toolPolicy: "human-only";
|
|
744
788
|
};
|
|
789
|
+
readonly 'memory-status': {
|
|
790
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
791
|
+
readonly description: "Show Swarm memory provider, JSONL, and migration status";
|
|
792
|
+
readonly aliasOf: "memory status";
|
|
793
|
+
readonly deprecated: true;
|
|
794
|
+
};
|
|
795
|
+
readonly 'memory-export': {
|
|
796
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
797
|
+
readonly description: "Export current Swarm memory to JSONL files";
|
|
798
|
+
readonly aliasOf: "memory export";
|
|
799
|
+
readonly deprecated: true;
|
|
800
|
+
};
|
|
801
|
+
readonly 'memory-import': {
|
|
802
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
803
|
+
readonly description: "Import legacy JSONL memory into SQLite";
|
|
804
|
+
readonly aliasOf: "memory import";
|
|
805
|
+
readonly deprecated: true;
|
|
806
|
+
};
|
|
807
|
+
readonly 'memory-migrate': {
|
|
808
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
809
|
+
readonly description: "Run the one-time legacy JSONL to SQLite migration";
|
|
810
|
+
readonly aliasOf: "memory migrate";
|
|
811
|
+
readonly deprecated: true;
|
|
812
|
+
};
|
|
745
813
|
readonly checkpoint: {
|
|
746
814
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
747
815
|
readonly description: "Manage project checkpoints [save|restore|delete|list] <label>";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BUNDLED_PROJECT_SKILLS: readonly ["brainstorm", "specify", "clarify-spec", "resume", "clarify", "discover", "consult", "pre-phase-briefing", "council", "deep-dive", "deep-research", "codebase-review-swarm", "design-docs", "swarm-pr-review", "swarm-pr-feedback", "issue-ingest", "plan", "critic-gate", "execute", "phase-wrap"];
|
|
1
|
+
export declare const BUNDLED_PROJECT_SKILLS: readonly ["brainstorm", "specify", "clarify-spec", "resume", "clarify", "discover", "consult", "pre-phase-briefing", "council", "deep-dive", "deep-research", "codebase-review-swarm", "design-docs", "swarm-pr-review", "swarm-pr-feedback", "issue-ingest", "plan", "critic-gate", "execute", "phase-wrap", "loop"];
|
|
2
2
|
interface CopyState {
|
|
3
3
|
files: number;
|
|
4
4
|
bytes: number;
|