opencode-swarm 7.89.0 → 7.90.1
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/commit-pr/SKILL.md +548 -0
- package/.opencode/skills/engineering-conventions/SKILL.md +57 -0
- package/.opencode/skills/phase-wrap/SKILL.md +1 -1
- package/.opencode/skills/running-tests/SKILL.md +282 -0
- package/.opencode/skills/writing-tests/SKILL.md +794 -0
- package/dist/cli/{evidence-summary-service-5me91eq8.js → evidence-summary-service-mr9sns2d.js} +5 -5
- package/dist/cli/{gate-evidence-y8zn7fe2.js → gate-evidence-nphg8hay.js} +4 -4
- package/dist/cli/{guardrail-explain-hy0zz0p6.js → guardrail-explain-w29j6dmx.js} +10 -10
- package/dist/cli/{index-9w07ye9b.js → index-4gm78w6c.js} +23 -14
- package/dist/cli/{index-1ccnwh54.js → index-5hrexm02.js} +3 -3
- package/dist/cli/{index-bcp79s17.js → index-91qtsbce.js} +1 -1
- package/dist/cli/{index-dprk5c5f.js → index-c5d6tgbs.js} +10 -10
- package/dist/cli/{index-6k31ysgd.js → index-j49ge0mg.js} +1 -1
- package/dist/cli/{index-fjwwrwr5.js → index-kv4dd5c5.js} +1 -1
- package/dist/cli/{index-e7h9bb6v.js → index-mh1ej70w.js} +2 -2
- package/dist/cli/{index-vqyfscxd.js → index-sf08zj91.js} +1 -1
- package/dist/cli/{index-axwxkbdd.js → index-w7gkpmq8.js} +2 -2
- package/dist/cli/{index-p0ye10nd.js → index-xchgryg4.js} +10 -2
- package/dist/cli/{index-8y7qetpg.js → index-y1z6yaq4.js} +3 -3
- package/dist/cli/index.js +9 -9
- package/dist/cli/{knowledge-store-gsy6p46z.js → knowledge-store-eqans52j.js} +4 -4
- package/dist/cli/{pending-delegations-35fvcj7z.js → pending-delegations-shqbvfjc.js} +2 -2
- package/dist/cli/{pr-subscriptions-b18n1yd8.js → pr-subscriptions-2565fpsc.js} +3 -3
- package/dist/cli/{skill-generator-1hzfyhth.js → skill-generator-d0jzw6n2.js} +5 -5
- package/dist/cli/{telemetry-9bbyxrvn.js → telemetry-aa1ma1dr.js} +4 -2
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/config/skill-mirrors.d.ts +87 -0
- package/dist/index.js +21 -5
- package/dist/telemetry.d.ts +7 -0
- package/package.json +6 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for skill mirror contracts between the OpenCode-side
|
|
3
|
+
* (`.opencode/skills/`) and Claude-side (`.claude/skills/`) skill trees, plus
|
|
4
|
+
* Codex/GitHub adapter shims (`.agents/skills/`, `.github/skills/`).
|
|
5
|
+
*
|
|
6
|
+
* Consumed by:
|
|
7
|
+
* - tests/unit/skills/skill-mirrors.test.ts (architect MODE mirror regression)
|
|
8
|
+
* - scripts/drift-check.ts (issue #1497 CI drift detector)
|
|
9
|
+
*
|
|
10
|
+
* Keeping the lists here — rather than inline in the test — means the drift
|
|
11
|
+
* checker and the regression test cannot themselves drift apart.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Architect MODE skills whose `.opencode` and `.claude` mirrors must be
|
|
15
|
+
* byte-identical. `.opencode` is the operative protocol loaded by
|
|
16
|
+
* `src/agents/architect.ts` MODE stubs; the `.claude` mirror must match so
|
|
17
|
+
* Claude Code and OpenCode sessions cannot diverge silently. Tuple shape is
|
|
18
|
+
* `[slug, opencodePath, claudePath]`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MIRRORED_ARCHITECT_MODE_SKILLS: readonly [readonly ["brainstorm", ".opencode/skills/brainstorm/SKILL.md", ".claude/skills/brainstorm/SKILL.md"], readonly ["specify", ".opencode/skills/specify/SKILL.md", ".claude/skills/specify/SKILL.md"], readonly ["clarify-spec", ".opencode/skills/clarify-spec/SKILL.md", ".claude/skills/clarify-spec/SKILL.md"], readonly ["resume", ".opencode/skills/resume/SKILL.md", ".claude/skills/resume/SKILL.md"], readonly ["clarify", ".opencode/skills/clarify/SKILL.md", ".claude/skills/clarify/SKILL.md"], readonly ["discover", ".opencode/skills/discover/SKILL.md", ".claude/skills/discover/SKILL.md"], readonly ["consult", ".opencode/skills/consult/SKILL.md", ".claude/skills/consult/SKILL.md"], readonly ["pre-phase-briefing", ".opencode/skills/pre-phase-briefing/SKILL.md", ".claude/skills/pre-phase-briefing/SKILL.md"], readonly ["council", ".opencode/skills/council/SKILL.md", ".claude/skills/council/SKILL.md"], readonly ["deep-dive", ".opencode/skills/deep-dive/SKILL.md", ".claude/skills/deep-dive/SKILL.md"], readonly ["deep-research", ".opencode/skills/deep-research/SKILL.md", ".claude/skills/deep-research/SKILL.md"], readonly ["issue-ingest", ".opencode/skills/issue-ingest/SKILL.md", ".claude/skills/issue-ingest/SKILL.md"], readonly ["plan", ".opencode/skills/plan/SKILL.md", ".claude/skills/plan/SKILL.md"], readonly ["critic-gate", ".opencode/skills/critic-gate/SKILL.md", ".claude/skills/critic-gate/SKILL.md"], readonly ["execute", ".opencode/skills/execute/SKILL.md", ".claude/skills/execute/SKILL.md"], readonly ["phase-wrap", ".opencode/skills/phase-wrap/SKILL.md", ".claude/skills/phase-wrap/SKILL.md"], readonly ["design-docs", ".opencode/skills/design-docs/SKILL.md", ".claude/skills/design-docs/SKILL.md"]];
|
|
21
|
+
/**
|
|
22
|
+
* Architect MODE skills where `.opencode` is the full operative protocol and
|
|
23
|
+
* `.claude` is an intentionally different surface. Both must exist; byte
|
|
24
|
+
* identity is not required, but the divergence is documented here.
|
|
25
|
+
*/
|
|
26
|
+
export declare const DIVERGENT_ARCHITECT_MODE_SKILLS: Array<{
|
|
27
|
+
slug: string;
|
|
28
|
+
opencodePath: string;
|
|
29
|
+
claudePath: string;
|
|
30
|
+
reason: string;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Architect MODE skills whose `.opencode` SKILL.md is canonical and whose
|
|
34
|
+
* `.claude`/`.agents` surfaces are thin adapter shims that delegate back to the
|
|
35
|
+
* canonical `.opencode` skill.
|
|
36
|
+
*
|
|
37
|
+
* `expectedCanonicalRef` is the relative path that each adapter SKILL.md must
|
|
38
|
+
* contain as a reference back to the canonical `.opencode` skill. All adapter
|
|
39
|
+
* shims live exactly three directory levels deep (`.{runtime}/skills/{slug}/`),
|
|
40
|
+
* so `../../../` always resolves to the repo root from any adapter path. If
|
|
41
|
+
* the directory structure changes (e.g., skills are reorganised to a flat
|
|
42
|
+
* layout), update `expectedCanonicalRef` entries accordingly.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ADAPTER_ARCHITECT_MODE_SKILLS: Array<{
|
|
45
|
+
slug: string;
|
|
46
|
+
canonicalPath: string;
|
|
47
|
+
adapterPaths: string[];
|
|
48
|
+
expectedCanonicalRef: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Architect MODE skills whose `.opencode` protocol is intentionally NOT mirrored
|
|
52
|
+
* to `.claude` (e.g. a `.claude` mirror would shadow a Claude Code built-in
|
|
53
|
+
* skill of the same name, or the mode is only reachable through the OpenCode
|
|
54
|
+
* plugin runtime).
|
|
55
|
+
*/
|
|
56
|
+
export declare const OPENCODE_ONLY_ARCHITECT_MODE_SKILLS: Array<{
|
|
57
|
+
slug: string;
|
|
58
|
+
opencodePath: string;
|
|
59
|
+
reason: string;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Skill mirror contracts for skill pairs that are NOT architect MODE skills but
|
|
63
|
+
* still exist across the `.opencode`/`.claude` trees. The drift checker
|
|
64
|
+
* (scripts/drift-check.ts) classifies every cross-tree skill pair; without an
|
|
65
|
+
* entry here a both-tree pair is reported as "unclassified" so a human decides
|
|
66
|
+
* its contract. See issue #1497.
|
|
67
|
+
*
|
|
68
|
+
* `kind`:
|
|
69
|
+
* - `identical`: `.opencode` and `.claude` SKILL.md must be byte-identical.
|
|
70
|
+
* `canonical` records which side wins when they drift (fix direction only;
|
|
71
|
+
* detection is symmetric).
|
|
72
|
+
* - `divergent`: both must exist; content intentionally differs per runtime.
|
|
73
|
+
* - `opencode-only`: `.opencode` exists; no `.claude` mirror expected.
|
|
74
|
+
*/
|
|
75
|
+
export declare const ADDITIONAL_SKILL_MIRROR_CONTRACTS: Array<{
|
|
76
|
+
slug: string;
|
|
77
|
+
kind: 'identical' | 'divergent' | 'opencode-only';
|
|
78
|
+
canonical?: '.claude' | '.opencode';
|
|
79
|
+
reason: string;
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* Top-level entries under `.opencode/skills/` that are not bundled skills and
|
|
83
|
+
* must be ignored by the drift checker. `generated/` holds user-generated
|
|
84
|
+
* skills produced at runtime (src/services/skill-generator.ts) and has no
|
|
85
|
+
* direct SKILL.md.
|
|
86
|
+
*/
|
|
87
|
+
export declare const NON_SKILL_OPENCODE_DIRS: Set<string>;
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var package_default;
|
|
|
69
69
|
var init_package = __esm(() => {
|
|
70
70
|
package_default = {
|
|
71
71
|
name: "opencode-swarm",
|
|
72
|
-
version: "7.
|
|
72
|
+
version: "7.90.1",
|
|
73
73
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
74
74
|
main: "dist/index.js",
|
|
75
75
|
types: "dist/index.d.ts",
|
|
@@ -130,6 +130,10 @@ var init_package = __esm(() => {
|
|
|
130
130
|
".opencode/skills/execute",
|
|
131
131
|
".opencode/skills/phase-wrap",
|
|
132
132
|
".opencode/skills/loop",
|
|
133
|
+
".opencode/skills/writing-tests",
|
|
134
|
+
".opencode/skills/running-tests",
|
|
135
|
+
".opencode/skills/engineering-conventions",
|
|
136
|
+
".opencode/skills/commit-pr",
|
|
133
137
|
"tests/fixtures/memory-recall",
|
|
134
138
|
"README.md",
|
|
135
139
|
"LICENSE"
|
|
@@ -140,6 +144,7 @@ var init_package = __esm(() => {
|
|
|
140
144
|
typecheck: "tsc --noEmit",
|
|
141
145
|
test: "bun test",
|
|
142
146
|
lint: "biome lint .",
|
|
147
|
+
"drift:check": "bun run scripts/drift-check.ts",
|
|
143
148
|
format: "biome format . --write",
|
|
144
149
|
check: "biome check --write .",
|
|
145
150
|
dev: "bun run build && opencode",
|
|
@@ -17419,7 +17424,11 @@ var init_bundled_skills = __esm(() => {
|
|
|
17419
17424
|
"critic-gate",
|
|
17420
17425
|
"execute",
|
|
17421
17426
|
"phase-wrap",
|
|
17422
|
-
"loop"
|
|
17427
|
+
"loop",
|
|
17428
|
+
"writing-tests",
|
|
17429
|
+
"running-tests",
|
|
17430
|
+
"engineering-conventions",
|
|
17431
|
+
"commit-pr"
|
|
17423
17432
|
];
|
|
17424
17433
|
syncedProjectSkillTargets = new Set;
|
|
17425
17434
|
});
|
|
@@ -18777,7 +18786,8 @@ __export(exports_telemetry, {
|
|
|
18777
18786
|
initTelemetry: () => initTelemetry,
|
|
18778
18787
|
emit: () => emit,
|
|
18779
18788
|
addTelemetryListener: () => addTelemetryListener,
|
|
18780
|
-
_internals: () => _internals5
|
|
18789
|
+
_internals: () => _internals5,
|
|
18790
|
+
ROTATION_CHECK_INTERVAL: () => ROTATION_CHECK_INTERVAL
|
|
18781
18791
|
});
|
|
18782
18792
|
import * as fs6 from "node:fs";
|
|
18783
18793
|
import { createWriteStream } from "node:fs";
|
|
@@ -18787,6 +18797,7 @@ function resetTelemetryForTesting() {
|
|
|
18787
18797
|
_disabled = false;
|
|
18788
18798
|
_projectDirectory = null;
|
|
18789
18799
|
_listeners.length = 0;
|
|
18800
|
+
_emitCount = 0;
|
|
18790
18801
|
if (_writeStream !== null) {
|
|
18791
18802
|
_writeStream.end();
|
|
18792
18803
|
_writeStream = null;
|
|
@@ -18834,6 +18845,11 @@ function emit(event, data) {
|
|
|
18834
18845
|
listener(event, data);
|
|
18835
18846
|
} catch {}
|
|
18836
18847
|
}
|
|
18848
|
+
_emitCount++;
|
|
18849
|
+
if (_emitCount >= ROTATION_CHECK_INTERVAL) {
|
|
18850
|
+
_emitCount = 0;
|
|
18851
|
+
_internals5.rotateTelemetryIfNeeded();
|
|
18852
|
+
}
|
|
18837
18853
|
} catch {}
|
|
18838
18854
|
}
|
|
18839
18855
|
function addTelemetryListener(callback) {
|
|
@@ -18864,7 +18880,7 @@ function rotateTelemetryIfNeeded(maxBytes = 10 * 1024 * 1024) {
|
|
|
18864
18880
|
}
|
|
18865
18881
|
} catch {}
|
|
18866
18882
|
}
|
|
18867
|
-
var _writeStream = null, _projectDirectory = null, _listeners, _disabled = false, telemetry, _internals5;
|
|
18883
|
+
var _writeStream = null, _projectDirectory = null, _listeners, _disabled = false, _emitCount = 0, ROTATION_CHECK_INTERVAL = 50, telemetry, _internals5;
|
|
18868
18884
|
var init_telemetry = __esm(() => {
|
|
18869
18885
|
_listeners = [];
|
|
18870
18886
|
telemetry = {
|
|
@@ -18995,7 +19011,7 @@ var init_telemetry = __esm(() => {
|
|
|
18995
19011
|
});
|
|
18996
19012
|
}
|
|
18997
19013
|
};
|
|
18998
|
-
_internals5 = { telemetry, emit };
|
|
19014
|
+
_internals5 = { telemetry, emit, rotateTelemetryIfNeeded };
|
|
18999
19015
|
});
|
|
19000
19016
|
|
|
19001
19017
|
// src/turbo/epic/state.ts
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'phase_changed' | 'budget_updated' | 'model_fallback' | 'hard_limit_hit' | 'revision_limit_hit' | 'loop_detected' | 'scope_violation' | 'qa_skip_violation' | 'heartbeat' | 'turbo_mode_changed' | 'auto_oversight_escalation' | 'environment_detected' | 'evidence_lock_acquired' | 'evidence_lock_contended' | 'evidence_lock_stale_recovered' | 'plan_ledger_cas_retry' | 'plan_md_write_failed' | 'snapshot_failed' | 'prm_pattern_detected' | 'prm_course_correction_injected' | 'prm_escalation_triggered' | 'prm_hard_stop';
|
|
2
2
|
export type TelemetryListener = (event: TelemetryEvent, data: Record<string, unknown>) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Number of emits between rotation checks. 50 keeps the overhead at one
|
|
5
|
+
* `statSync` per 50 telemetry writes (~once per few seconds in a busy
|
|
6
|
+
* session, roughly once per minute in a quiet one).
|
|
7
|
+
*/
|
|
8
|
+
export declare const ROTATION_CHECK_INTERVAL = 50;
|
|
3
9
|
/** @internal - For testing only */
|
|
4
10
|
export declare function resetTelemetryForTesting(): void;
|
|
5
11
|
/**
|
|
@@ -69,4 +75,5 @@ export declare const telemetry: {
|
|
|
69
75
|
export declare const _internals: {
|
|
70
76
|
telemetry: typeof telemetry;
|
|
71
77
|
emit: typeof emit;
|
|
78
|
+
rotateTelemetryIfNeeded: typeof rotateTelemetryIfNeeded;
|
|
72
79
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.90.1",
|
|
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",
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
".opencode/skills/execute",
|
|
62
62
|
".opencode/skills/phase-wrap",
|
|
63
63
|
".opencode/skills/loop",
|
|
64
|
+
".opencode/skills/writing-tests",
|
|
65
|
+
".opencode/skills/running-tests",
|
|
66
|
+
".opencode/skills/engineering-conventions",
|
|
67
|
+
".opencode/skills/commit-pr",
|
|
64
68
|
"tests/fixtures/memory-recall",
|
|
65
69
|
"README.md",
|
|
66
70
|
"LICENSE"
|
|
@@ -71,6 +75,7 @@
|
|
|
71
75
|
"typecheck": "tsc --noEmit",
|
|
72
76
|
"test": "bun test",
|
|
73
77
|
"lint": "biome lint .",
|
|
78
|
+
"drift:check": "bun run scripts/drift-check.ts",
|
|
74
79
|
"format": "biome format . --write",
|
|
75
80
|
"check": "biome check --write .",
|
|
76
81
|
"dev": "bun run build && opencode",
|