opencode-swarm 7.60.0 → 7.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/brainstorm/SKILL.md +28 -17
- package/.opencode/skills/council/SKILL.md +3 -2
- package/.opencode/skills/execute/SKILL.md +12 -0
- package/.opencode/skills/phase-wrap/SKILL.md +12 -3
- package/.opencode/skills/plan/SKILL.md +9 -7
- package/.opencode/skills/specify/SKILL.md +17 -41
- package/README.md +1 -0
- package/dist/cli/index.js +1882 -1216
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/registry.d.ts +29 -1
- package/dist/commands/sdd.d.ts +15 -0
- package/dist/commands/tool-policy.d.ts +1 -1
- package/dist/council/types.d.ts +8 -2
- package/dist/db/qa-gate-profile.d.ts +8 -5
- package/dist/index.js +3331 -2510
- package/dist/sdd/effective-spec.d.ts +45 -0
- package/dist/state.d.ts +3 -3
- package/dist/tools/convene-council.d.ts +1 -0
- package/dist/tools/phase-complete/gates/drift-gate.d.ts +1 -1
- package/dist/tools/phase-complete/gates/phase-council-gate.d.ts +1 -1
- package/dist/tools/set-qa-gates.d.ts +1 -1
- package/dist/tools/submit-phase-council-verdicts.d.ts +1 -0
- package/dist/tools/update-task-status.d.ts +8 -5
- package/dist/tools/write-final-council-evidence.d.ts +1 -0
- package/dist/utils/spec-hash.d.ts +2 -0
- package/package.json +1 -1
package/dist/commands/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { handleResetCommand } from './reset';
|
|
|
38
38
|
export { handleResetSessionCommand } from './reset-session';
|
|
39
39
|
export { handleRetrieveCommand } from './retrieve';
|
|
40
40
|
export { handleRollbackCommand } from './rollback';
|
|
41
|
+
export { handleSddCommand, handleSddProjectCommand, handleSddStatusCommand, handleSddValidateCommand, } from './sdd';
|
|
41
42
|
export { handleSimulateCommand } from './simulate';
|
|
42
43
|
export { handleSpecifyCommand } from './specify';
|
|
43
44
|
export { handleStatusCommand } from './status';
|
|
@@ -270,6 +270,34 @@ export declare const COMMAND_REGISTRY: {
|
|
|
270
270
|
readonly args: "--threshold <number>, --min-commits <number>";
|
|
271
271
|
readonly category: "diagnostics";
|
|
272
272
|
};
|
|
273
|
+
readonly sdd: {
|
|
274
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
275
|
+
readonly description: "Manage OpenSpec-compatible SDD artifacts and effective spec projection";
|
|
276
|
+
readonly args: "status|validate|project [--json] [--change <id>] [--dry-run]";
|
|
277
|
+
readonly details: "Parent command for spec-driven development artifacts. Use sdd status to inspect .swarm/spec.md plus openspec/ artifacts, sdd validate to validate OpenSpec-compatible deltas, and sdd project to materialize the effective spec into .swarm/spec.md for planning.";
|
|
278
|
+
readonly category: "utility";
|
|
279
|
+
};
|
|
280
|
+
readonly 'sdd status': {
|
|
281
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
282
|
+
readonly description: "Show OpenSpec-compatible SDD status and effective spec source";
|
|
283
|
+
readonly subcommandOf: "sdd";
|
|
284
|
+
readonly args: "[--json]";
|
|
285
|
+
readonly category: "utility";
|
|
286
|
+
};
|
|
287
|
+
readonly 'sdd validate': {
|
|
288
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
289
|
+
readonly description: "Validate OpenSpec-compatible artifacts and effective spec projection";
|
|
290
|
+
readonly subcommandOf: "sdd";
|
|
291
|
+
readonly args: "[--json] [--change <id>]";
|
|
292
|
+
readonly category: "utility";
|
|
293
|
+
};
|
|
294
|
+
readonly 'sdd project': {
|
|
295
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
296
|
+
readonly description: "Materialize the OpenSpec-compatible effective spec into .swarm/spec.md";
|
|
297
|
+
readonly subcommandOf: "sdd";
|
|
298
|
+
readonly args: "[--dry-run] [--json] [--change <id>]";
|
|
299
|
+
readonly category: "utility";
|
|
300
|
+
};
|
|
273
301
|
readonly analyze: {
|
|
274
302
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
275
303
|
readonly description: "Analyze spec.md vs plan.md for requirement coverage gaps";
|
|
@@ -369,7 +397,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
369
397
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
370
398
|
readonly description: "View or modify QA gate profile for the current plan [enable|override <gate>...]";
|
|
371
399
|
readonly args: "[show|enable|override] <gate>...";
|
|
372
|
-
readonly details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test,
|
|
400
|
+
readonly details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, phase_council, drift_check, final_council.";
|
|
373
401
|
readonly category: "config";
|
|
374
402
|
};
|
|
375
403
|
readonly promote: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface ParsedSddArgs {
|
|
2
|
+
json: boolean;
|
|
3
|
+
dryRun: boolean;
|
|
4
|
+
changeId?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function parseArgs(args: string[]): ParsedSddArgs;
|
|
8
|
+
export declare function handleSddStatusCommand(directory: string, args: string[]): Promise<string>;
|
|
9
|
+
export declare function handleSddValidateCommand(directory: string, args: string[]): Promise<string>;
|
|
10
|
+
export declare function handleSddProjectCommand(directory: string, args: string[]): Promise<string>;
|
|
11
|
+
export declare function handleSddCommand(_directory: string, _args: string[]): Promise<string>;
|
|
12
|
+
export declare const _test_exports: {
|
|
13
|
+
parseArgs: typeof parseArgs;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResolvedSwarmCommand, SwarmCommandPolicyResult } from './command-dispatch.js';
|
|
2
|
-
export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sync-plan", "export"];
|
|
2
|
+
export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sdd", "sdd status", "sdd validate", "sdd project", "sync-plan", "export"];
|
|
3
3
|
export type SwarmCommandToolInputCommand = (typeof SWARM_COMMAND_TOOL_COMMANDS)[number];
|
|
4
4
|
export declare const SWARM_COMMAND_TOOL_ALLOWLIST: Set<string>;
|
|
5
5
|
/**
|
package/dist/council/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* No business logic, no I/O. Only types, interfaces, and defaults.
|
|
6
6
|
*/
|
|
7
7
|
export type CouncilVerdict = 'APPROVE' | 'CONCERNS' | 'REJECT';
|
|
8
|
-
export type CouncilFindingSeverity = 'HIGH' | 'MEDIUM' | 'LOW';
|
|
8
|
+
export type CouncilFindingSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
9
9
|
export type CouncilFindingCategory = 'logic' | 'edge_case' | 'error_handling' | 'spec_compliance' | 'security' | 'maintainability' | 'naming' | 'domain' | 'test_gap' | 'test_quality' | 'mutation_gap' | 'adversarial_gap' | 'slop_pattern' | 'hallucinated_api' | 'lazy_abstraction' | 'cargo_cult' | 'spec_drift' | 'other';
|
|
10
10
|
export type CouncilAgent = 'critic' | 'reviewer' | 'sme' | 'test_engineer' | 'explorer';
|
|
11
11
|
export interface CouncilFinding {
|
|
@@ -52,6 +52,8 @@ export interface CouncilSynthesis {
|
|
|
52
52
|
allCriteriaMet: boolean;
|
|
53
53
|
/** Distinct council members that produced verdicts (deduplicated count). */
|
|
54
54
|
quorumSize: number;
|
|
55
|
+
/** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
|
|
56
|
+
blockingConcernsCount: number;
|
|
55
57
|
/** true when called with an empty verdicts array — the APPROVE is vacuous */
|
|
56
58
|
emptyVerdictsWarning?: boolean;
|
|
57
59
|
}
|
|
@@ -84,6 +86,8 @@ export interface PhaseCouncilSynthesis {
|
|
|
84
86
|
allCriteriaMet: boolean;
|
|
85
87
|
/** Distinct council members that produced verdicts */
|
|
86
88
|
quorumSize: number;
|
|
89
|
+
/** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
|
|
90
|
+
blockingConcernsCount: number;
|
|
87
91
|
/** Path where evidence was written, e.g. .swarm/evidence/1/phase-council.json */
|
|
88
92
|
evidencePath: string;
|
|
89
93
|
/** Summary of the phase being reviewed */
|
|
@@ -116,6 +120,8 @@ export interface FinalCouncilSynthesis {
|
|
|
116
120
|
allCriteriaMet: boolean;
|
|
117
121
|
/** Distinct council members that produced verdicts */
|
|
118
122
|
quorumSize: number;
|
|
123
|
+
/** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
|
|
124
|
+
blockingConcernsCount: number;
|
|
119
125
|
/** Path where evidence was written */
|
|
120
126
|
evidencePath: '.swarm/evidence/final-council.json';
|
|
121
127
|
/** Summary of the completed project being reviewed */
|
|
@@ -154,7 +160,7 @@ export interface CouncilConfig {
|
|
|
154
160
|
* options: critic_oversight agent, HTTP webhook, or configurable handler.
|
|
155
161
|
*/
|
|
156
162
|
escalateOnMaxRounds?: string;
|
|
157
|
-
/** Default true — CONCERNS verdict
|
|
163
|
+
/** Default true — CONCERNS verdict with only MEDIUM/LOW findings does NOT block completion (advisory). Set false to make all CONCERNS block like REJECT. Note: HIGH/CRITICAL findings from CONCERNS members are always promoted to requiredFixes and block at the tool level regardless of this setting. */
|
|
158
164
|
phaseConcernsAllowComplete: boolean;
|
|
159
165
|
}
|
|
160
166
|
export declare const COUNCIL_DEFAULTS: CouncilConfig;
|
|
@@ -31,7 +31,7 @@ export interface QaGates {
|
|
|
31
31
|
hallucination_guard: boolean;
|
|
32
32
|
sast_enabled: boolean;
|
|
33
33
|
mutation_test: boolean;
|
|
34
|
-
|
|
34
|
+
phase_council: boolean;
|
|
35
35
|
drift_check: boolean;
|
|
36
36
|
final_council: boolean;
|
|
37
37
|
}
|
|
@@ -100,7 +100,7 @@ export declare function computeProfileHash(profile: QaGateProfile): string;
|
|
|
100
100
|
* machine; blocks coder→next-coder advancement until reviewer + test_engineer
|
|
101
101
|
* delegations observed).
|
|
102
102
|
* - council_mode — src/state.ts isCouncilGateActive + src/hooks/delegation-gate.ts
|
|
103
|
-
* (Stage B
|
|
103
|
+
* (replaces per-task Stage B with full 5-member council via submit_council_verdicts).
|
|
104
104
|
* - sme_enabled — consumed during MODE: BRAINSTORM/SPECIFY architect dialogue.
|
|
105
105
|
* - critic_pre_plan — consumed by MODE: PLAN critic delegation before save_plan.
|
|
106
106
|
* - sast_enabled — consumed inside pre_check_batch tool.
|
|
@@ -108,11 +108,14 @@ export declare function computeProfileHash(profile: QaGateProfile): string;
|
|
|
108
108
|
* until .swarm/evidence/{phase}/hallucination-guard.json has APPROVED verdict).
|
|
109
109
|
* - mutation_test — src/tools/phase-complete.ts Gate 4 (blocks phase_complete
|
|
110
110
|
* until .swarm/evidence/{phase}/mutation-gate.json has pass verdict; warn does not block)
|
|
111
|
-
* -
|
|
112
|
-
* (
|
|
113
|
-
*
|
|
111
|
+
* - phase_council — src/tools/phase-complete/gates/phase-council-gate.ts Gate 5
|
|
112
|
+
* (blocks phase_complete until .swarm/evidence/{phase}/phase-council.json has
|
|
113
|
+
* approved verdict from 5-member holistic phase review).
|
|
114
114
|
* - drift_check — src/tools/phase-complete.ts Gate 2 (blocks phase_complete when
|
|
115
115
|
* drift-verifier.json missing or rejected)
|
|
116
|
+
* - final_council — src/tools/write-final-council-evidence.ts (blocks project
|
|
117
|
+
* completion until .swarm/evidence/final-council.json has approved verdict
|
|
118
|
+
* from 5-member project-scope review).
|
|
116
119
|
*
|
|
117
120
|
* Session overrides are intentionally ephemeral — they live only in
|
|
118
121
|
* in-memory `AgentSessionState.qaGateSessionOverrides` and are NOT
|