opencode-swarm 7.5.2 → 7.6.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/dist/cli/index.js +14 -2
- package/dist/index.js +142 -13
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var package_default;
|
|
|
34
34
|
var init_package = __esm(() => {
|
|
35
35
|
package_default = {
|
|
36
36
|
name: "opencode-swarm",
|
|
37
|
-
version: "7.
|
|
37
|
+
version: "7.6.0",
|
|
38
38
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
39
39
|
main: "dist/index.js",
|
|
40
40
|
types: "dist/index.d.ts",
|
|
@@ -16331,6 +16331,7 @@ var init_constants = __esm(() => {
|
|
|
16331
16331
|
"imports",
|
|
16332
16332
|
"retrieve_summary",
|
|
16333
16333
|
"schema_drift",
|
|
16334
|
+
"search",
|
|
16334
16335
|
"symbols",
|
|
16335
16336
|
"knowledge_recall"
|
|
16336
16337
|
],
|
|
@@ -16416,6 +16417,7 @@ var init_constants = __esm(() => {
|
|
|
16416
16417
|
"imports",
|
|
16417
16418
|
"retrieve_summary",
|
|
16418
16419
|
"schema_drift",
|
|
16420
|
+
"search",
|
|
16419
16421
|
"symbols",
|
|
16420
16422
|
"todo_extract",
|
|
16421
16423
|
"knowledge_recall"
|
|
@@ -16423,6 +16425,7 @@ var init_constants = __esm(() => {
|
|
|
16423
16425
|
designer: [
|
|
16424
16426
|
"extract_code_blocks",
|
|
16425
16427
|
"retrieve_summary",
|
|
16428
|
+
"search",
|
|
16426
16429
|
"symbols",
|
|
16427
16430
|
"knowledge_recall"
|
|
16428
16431
|
],
|
|
@@ -20319,7 +20322,7 @@ var init_curator_agent = () => {};
|
|
|
20319
20322
|
// src/agents/reviewer.ts
|
|
20320
20323
|
var init_reviewer = () => {};
|
|
20321
20324
|
// src/agents/index.ts
|
|
20322
|
-
var warnedAgents;
|
|
20325
|
+
var warnedAgents, KNOWN_VARIANT_VALUES;
|
|
20323
20326
|
var init_agents2 = __esm(() => {
|
|
20324
20327
|
init_config();
|
|
20325
20328
|
init_constants();
|
|
@@ -20336,6 +20339,14 @@ var init_agents2 = __esm(() => {
|
|
|
20336
20339
|
init_curator_agent();
|
|
20337
20340
|
init_reviewer();
|
|
20338
20341
|
warnedAgents = new Set;
|
|
20342
|
+
KNOWN_VARIANT_VALUES = new Set([
|
|
20343
|
+
"low",
|
|
20344
|
+
"medium",
|
|
20345
|
+
"high",
|
|
20346
|
+
"max",
|
|
20347
|
+
"xhigh",
|
|
20348
|
+
"thinking"
|
|
20349
|
+
]);
|
|
20339
20350
|
});
|
|
20340
20351
|
// src/scope/scope-persistence.ts
|
|
20341
20352
|
import * as fs5 from "fs";
|
|
@@ -20578,6 +20589,7 @@ var init_state = __esm(() => {
|
|
|
20578
20589
|
init_delegation_gate();
|
|
20579
20590
|
init_manager();
|
|
20580
20591
|
init_telemetry();
|
|
20592
|
+
init_logger();
|
|
20581
20593
|
_councilDisagreementWarned = new Set;
|
|
20582
20594
|
_toolAggregates = new Map;
|
|
20583
20595
|
defaultRunContext = new AgentRunContext("default", _toolAggregates);
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var package_default;
|
|
|
33
33
|
var init_package = __esm(() => {
|
|
34
34
|
package_default = {
|
|
35
35
|
name: "opencode-swarm",
|
|
36
|
-
version: "7.
|
|
36
|
+
version: "7.6.0",
|
|
37
37
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
38
38
|
main: "dist/index.js",
|
|
39
39
|
types: "dist/index.d.ts",
|
|
@@ -518,6 +518,7 @@ var init_constants = __esm(() => {
|
|
|
518
518
|
"imports",
|
|
519
519
|
"retrieve_summary",
|
|
520
520
|
"schema_drift",
|
|
521
|
+
"search",
|
|
521
522
|
"symbols",
|
|
522
523
|
"knowledge_recall"
|
|
523
524
|
],
|
|
@@ -603,6 +604,7 @@ var init_constants = __esm(() => {
|
|
|
603
604
|
"imports",
|
|
604
605
|
"retrieve_summary",
|
|
605
606
|
"schema_drift",
|
|
607
|
+
"search",
|
|
606
608
|
"symbols",
|
|
607
609
|
"todo_extract",
|
|
608
610
|
"knowledge_recall"
|
|
@@ -610,6 +612,7 @@ var init_constants = __esm(() => {
|
|
|
610
612
|
designer: [
|
|
611
613
|
"extract_code_blocks",
|
|
612
614
|
"retrieve_summary",
|
|
615
|
+
"search",
|
|
613
616
|
"symbols",
|
|
614
617
|
"knowledge_recall"
|
|
615
618
|
],
|
|
@@ -26474,7 +26477,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = 7200000, dire
|
|
|
26474
26477
|
if (directory) {
|
|
26475
26478
|
let rehydrationPromise;
|
|
26476
26479
|
rehydrationPromise = _internals9.rehydrateSessionFromDisk(directory, sessionState).catch((err2) => {
|
|
26477
|
-
|
|
26480
|
+
warn("[state] Rehydration failed:", err2 instanceof Error ? err2.message : String(err2));
|
|
26478
26481
|
}).finally(() => {
|
|
26479
26482
|
swarmState.pendingRehydrations.delete(rehydrationPromise);
|
|
26480
26483
|
});
|
|
@@ -26760,7 +26763,7 @@ async function advanceTaskStateAndPersist(session, taskId, newState, directory,
|
|
|
26760
26763
|
try {
|
|
26761
26764
|
await updateTaskStatus(directory, taskId, planStatus);
|
|
26762
26765
|
} catch (err2) {
|
|
26763
|
-
|
|
26766
|
+
warn(`[advanceTaskStateAndPersist] persist ${taskId} → ${planStatus} failed (in-memory state still advanced): ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
26764
26767
|
}
|
|
26765
26768
|
}
|
|
26766
26769
|
function getTaskState(session, taskId) {
|
|
@@ -26815,7 +26818,7 @@ async function isCouncilGateActive(directory, council) {
|
|
|
26815
26818
|
const msg = err2 instanceof Error ? err2.message : String(err2);
|
|
26816
26819
|
const isBenign = msg.includes("SQLITE_CANTOPEN") || msg.includes("ENOENT");
|
|
26817
26820
|
if (!isBenign) {
|
|
26818
|
-
|
|
26821
|
+
warn(`[isCouncilGateActive] getProfile threw unexpectedly for plan ${planId}: ${msg}. Treating council as inactive.`);
|
|
26819
26822
|
}
|
|
26820
26823
|
profile = null;
|
|
26821
26824
|
}
|
|
@@ -26828,7 +26831,7 @@ async function isCouncilGateActive(directory, council) {
|
|
|
26828
26831
|
}
|
|
26829
26832
|
if (enabled !== councilMode && !_councilDisagreementWarned.has(planId)) {
|
|
26830
26833
|
_councilDisagreementWarned.add(planId);
|
|
26831
|
-
|
|
26834
|
+
warn(`[delegation-gate] Council mode mismatch for plan ${planId}: ` + `pluginConfig.council.enabled=${enabled}, QaGates.council_mode=${councilMode}. ` + "Falling back to Stage B (non-council) advancement.");
|
|
26832
26835
|
}
|
|
26833
26836
|
return false;
|
|
26834
26837
|
}
|
|
@@ -27038,6 +27041,7 @@ var init_state = __esm(() => {
|
|
|
27038
27041
|
init_delegation_gate();
|
|
27039
27042
|
init_manager();
|
|
27040
27043
|
init_telemetry();
|
|
27044
|
+
init_logger();
|
|
27041
27045
|
_councilDisagreementWarned = new Set;
|
|
27042
27046
|
_toolAggregates = new Map;
|
|
27043
27047
|
defaultRunContext = new AgentRunContext("default", _toolAggregates);
|
|
@@ -57252,6 +57256,63 @@ SECURITY_KEYWORDS: password, secret, token, credential, auth, login, encryption,
|
|
|
57252
57256
|
{{AGENT_PREFIX}}docs - Documentation updates (README, API docs, guides — NOT .swarm/ files)
|
|
57253
57257
|
{{AGENT_PREFIX}}designer - UI/UX design specs (scaffold generation for UI components — runs BEFORE coder on UI tasks)
|
|
57254
57258
|
|
|
57259
|
+
## SKILLS PROPAGATION
|
|
57260
|
+
|
|
57261
|
+
Subagents run in isolated contexts. Any project-specific skill constraints loaded into your session (e.g. \`writing-tests\`, \`engineering-conventions\`, coding standards, security guidelines) are NOT automatically visible to them. Passing full skill bodies inline for every delegation duplicates thousands of tokens and bloats context, so prefer repo-relative skill file references when the receiving agent can load them. Subagents without skills produce generic output that may violate project conventions.
|
|
57262
|
+
|
|
57263
|
+
### Step 1 — Discover available skills (once per session)
|
|
57264
|
+
|
|
57265
|
+
At session start, before your first delegation:
|
|
57266
|
+
1. Prefer skills already loaded into your context via \`<skill-context>\` blocks; reuse those immediately.
|
|
57267
|
+
2. When you need to inspect on-disk skills, use the \`search\` tool with \`include\` patterns like \`.opencode/skills/*/SKILL.md,.claude/skills/*/SKILL.md\` and frontmatter queries such as \`^name:\` / \`^description:\` so you only read the YAML lines you need.
|
|
57268
|
+
3. Write a brief skill index to \`.swarm/context.md\` under \`## Available Skills\`:
|
|
57269
|
+
- writing-tests: Guidelines for writing tests (bun:test, mock isolation, CI) → test_engineer, coder
|
|
57270
|
+
- engineering-conventions: Engineering invariants for this repo → coder, reviewer, test_engineer
|
|
57271
|
+
- [name]: [description] → [applicable agents]
|
|
57272
|
+
4. When discovery is ambiguous, prefer the canonical repo-relative skill file path in the delegation and let the receiving agent load it directly.
|
|
57273
|
+
|
|
57274
|
+
### Step 2 — Route skills to agents
|
|
57275
|
+
|
|
57276
|
+
Include a skill in a delegation when ANY of the following match:
|
|
57277
|
+
|
|
57278
|
+
| Skill description / name contains… | Pass to agents… |
|
|
57279
|
+
|---------------------------------------------------|---------------------------------------|
|
|
57280
|
+
| "test", "testing", "test files", "writing tests" | test_engineer, coder |
|
|
57281
|
+
| "engineering", "conventions", "invariants", "rules" | coder, reviewer, test_engineer |
|
|
57282
|
+
| "code", "implementation", "coding standards" | coder, reviewer |
|
|
57283
|
+
| "review", "security audit", "security guidelines" | reviewer |
|
|
57284
|
+
| "documentation", "docs", "writing docs" | docs |
|
|
57285
|
+
| "architecture", "design patterns", "ui" | designer, sme |
|
|
57286
|
+
| domain-specific (database, cloud, mobile, etc.) | sme |
|
|
57287
|
+
|
|
57288
|
+
When uncertain: pass the skill. Subagents ignore irrelevant content. A missing applicable skill degrades output quality.
|
|
57289
|
+
|
|
57290
|
+
### Step 3 — Include skill references in delegations
|
|
57291
|
+
|
|
57292
|
+
Add a \`SKILLS:\` field to every delegation that goes to an implementation or review agent (coder, reviewer, test_engineer, sme, docs, designer). Use one of:
|
|
57293
|
+
|
|
57294
|
+
- \`SKILLS: none\` — only when no project-specific skill applies to that delegation
|
|
57295
|
+
- \`SKILLS: file:.claude/skills/writing-tests/SKILL.md\` — preferred for skills that exist on disk; use repo-relative \`file:\` references, comma-separated when multiple skills apply
|
|
57296
|
+
- Inline block fallback:
|
|
57297
|
+
SKILLS:
|
|
57298
|
+
--- [skill-name] ---
|
|
57299
|
+
[full SKILL.md body content pasted here]
|
|
57300
|
+
--- [skill-name-2] ---
|
|
57301
|
+
[full SKILL.md body content pasted here]
|
|
57302
|
+
|
|
57303
|
+
Default to repo-relative \`file:\` references for coder, reviewer, test_engineer, and sme. Use inline skill bodies only when the skill exists only in live context (no stable repo file path) or a prior agent explicitly reported \`SKILL_LOAD_FAILED\`.
|
|
57304
|
+
|
|
57305
|
+
**SKILL_LOAD_FAILED recovery:** If a subagent reports SKILL_LOAD_FAILED for a \`file:\` reference, do NOT retry with the same reference. Instead, re-delegate with either: (a) the full skill body pasted inline, or (b) \`SKILLS: none\` if no applicable skill content is available. Never re-use a file: reference that has already failed.
|
|
57306
|
+
|
|
57307
|
+
**Mandatory for coding tasks:** Always provide \`writing-tests\` to test_engineer and \`engineering-conventions\` to coder + reviewer when those skills are present in the project. Prefer \`file:\` references when the files exist.
|
|
57308
|
+
|
|
57309
|
+
### ANTI-RATIONALIZATION
|
|
57310
|
+
- ✗ "The coder already knows these conventions" → Skills contain project-specific rules the model cannot know from training. Always pass.
|
|
57311
|
+
- ✗ "It's a simple task, skills aren't needed" → A short \`file:\` reference is cheap. Missing skill constraints cause convention drift. Always pass.
|
|
57312
|
+
- ✗ "I don't know which skill is relevant" → When uncertain, pass ALL discovered skills. Subagents discard inapplicable content.
|
|
57313
|
+
- ✗ "The skill was loaded earlier so the agent knows it" → Each subagent Task call is a fresh context. Skills do NOT persist across Task boundaries.
|
|
57314
|
+
- ✗ "I'll paste the whole skill body every time just to be safe" → Inline bodies are fallback only. Prefer \`file:\` references to avoid unnecessary context bloat.
|
|
57315
|
+
|
|
57255
57316
|
## SLASH COMMANDS
|
|
57256
57317
|
{{SLASH_COMMANDS}}
|
|
57257
57318
|
Commands above are documented with args and behavioral details. Run commands via /swarm <command> [args].
|
|
@@ -57265,15 +57326,13 @@ Available Tools: {{AVAILABLE_TOOLS}}
|
|
|
57265
57326
|
|
|
57266
57327
|
Delegations are performed ONLY by calling the **Task** tool. Writing delegation text into the chat does nothing — the agent will not receive it. Every delegation below is the content you pass to the Task tool, not text you output to the conversation.
|
|
57267
57328
|
|
|
57268
|
-
All delegations MUST
|
|
57329
|
+
All delegations MUST follow the receiving agent's INPUT FORMAT exactly. Do NOT invent fields, omit required fields, or force one agent's schema onto another. Every delegation MUST begin with the agent name, include \`TASK:\`, and include \`SKILLS:\` when that agent prompt supports skills.
|
|
57269
57330
|
Do NOT add conversational preamble before the agent prefix. Begin directly with the agent name.
|
|
57270
57331
|
|
|
57271
57332
|
{{AGENT_PREFIX}}[agent]
|
|
57272
57333
|
TASK: [single objective]
|
|
57273
|
-
|
|
57274
|
-
|
|
57275
|
-
OUTPUT: [expected deliverable format]
|
|
57276
|
-
CONSTRAINT: [what NOT to do]
|
|
57334
|
+
[agent-specific fields required by that agent's INPUT FORMAT]
|
|
57335
|
+
SKILLS: [either "none", repo-relative file: references, or inline skill bodies — see SKILLS PROPAGATION; use "none" only when no project-specific skill applies]
|
|
57277
57336
|
|
|
57278
57337
|
Examples:
|
|
57279
57338
|
|
|
@@ -57281,6 +57340,7 @@ Examples:
|
|
|
57281
57340
|
TASK: Analyze codebase for auth implementation
|
|
57282
57341
|
INPUT: Focus on src/auth/, src/middleware/
|
|
57283
57342
|
OUTPUT: Structure, frameworks, key files, relevant domains
|
|
57343
|
+
SKILLS: none
|
|
57284
57344
|
|
|
57285
57345
|
{{AGENT_PREFIX}}sme
|
|
57286
57346
|
TASK: Review auth token patterns
|
|
@@ -57288,12 +57348,14 @@ DOMAIN: security
|
|
|
57288
57348
|
INPUT: src/auth/login.ts uses JWT with RS256
|
|
57289
57349
|
OUTPUT: Security considerations, recommended patterns
|
|
57290
57350
|
CONSTRAINT: Focus on auth only, not general code style
|
|
57351
|
+
SKILLS: none
|
|
57291
57352
|
|
|
57292
57353
|
{{AGENT_PREFIX}}sme
|
|
57293
57354
|
TASK: Advise on state management approach
|
|
57294
57355
|
DOMAIN: ios
|
|
57295
57356
|
INPUT: Building a SwiftUI app with offline-first sync
|
|
57296
57357
|
OUTPUT: Recommended patterns, frameworks, gotchas
|
|
57358
|
+
SKILLS: none
|
|
57297
57359
|
|
|
57298
57360
|
PRE-STEP (required): call \`declare_scope({ taskId, files })\` BEFORE writing any {{AGENT_PREFIX}}coder delegation. See Rule 1a.
|
|
57299
57361
|
|
|
@@ -57303,6 +57365,7 @@ FILE: src/auth/login.ts
|
|
|
57303
57365
|
INPUT: Validate email format, password >= 8 chars
|
|
57304
57366
|
OUTPUT: Modified file
|
|
57305
57367
|
CONSTRAINT: Do not modify other functions
|
|
57368
|
+
SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
|
|
57306
57369
|
|
|
57307
57370
|
{{AGENT_PREFIX}}reviewer
|
|
57308
57371
|
TASK: Review login validation
|
|
@@ -57310,17 +57373,20 @@ FILE: src/auth/login.ts
|
|
|
57310
57373
|
CHECK: [security, correctness, edge-cases]
|
|
57311
57374
|
GATES: lint=PASS, sast_scan=PASS, secretscan=PASS
|
|
57312
57375
|
OUTPUT: VERDICT + RISK + ISSUES
|
|
57376
|
+
SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
|
|
57313
57377
|
|
|
57314
57378
|
{{AGENT_PREFIX}}test_engineer
|
|
57315
57379
|
TASK: Generate and run login validation tests
|
|
57316
57380
|
FILE: src/auth/login.ts
|
|
57317
57381
|
OUTPUT: Test file at src/auth/login.test.ts + VERDICT: PASS/FAIL with failure details
|
|
57382
|
+
SKILLS: file:.claude/skills/writing-tests/SKILL.md
|
|
57318
57383
|
|
|
57319
57384
|
{{AGENT_PREFIX}}critic
|
|
57320
57385
|
TASK: Review plan for user authentication feature
|
|
57321
57386
|
PLAN: [paste the plan.md content]
|
|
57322
57387
|
CONTEXT: [codebase summary from explorer]
|
|
57323
57388
|
OUTPUT: VERDICT + CONFIDENCE + ISSUES + SUMMARY
|
|
57389
|
+
SKILLS: none
|
|
57324
57390
|
|
|
57325
57391
|
{{AGENT_PREFIX}}reviewer
|
|
57326
57392
|
TASK: Security-only review of login validation
|
|
@@ -57328,18 +57394,21 @@ FILE: src/auth/login.ts
|
|
|
57328
57394
|
CHECK: [security-only] — evaluate against OWASP Top 10, scan for hardcoded secrets, injection vectors, insecure crypto, missing input validation
|
|
57329
57395
|
GATES: lint=PASS, sast_scan=PASS, secretscan=PASS
|
|
57330
57396
|
OUTPUT: VERDICT + RISK + SECURITY ISSUES ONLY
|
|
57397
|
+
SKILLS: file:.claude/skills/engineering-conventions/SKILL.md
|
|
57331
57398
|
|
|
57332
57399
|
{{AGENT_PREFIX}}test_engineer
|
|
57333
57400
|
TASK: Adversarial security testing
|
|
57334
57401
|
FILE: src/auth/login.ts
|
|
57335
57402
|
CONSTRAINT: ONLY attack vectors — malformed inputs, oversized payloads, injection attempts, auth bypass, boundary violations
|
|
57336
57403
|
OUTPUT: Test file + VERDICT: PASS/FAIL
|
|
57404
|
+
SKILLS: file:.claude/skills/writing-tests/SKILL.md
|
|
57337
57405
|
|
|
57338
57406
|
{{AGENT_PREFIX}}explorer
|
|
57339
57407
|
TASK: Integration impact analysis
|
|
57340
57408
|
INPUT: Contract changes detected: [list from diff tool]
|
|
57341
57409
|
OUTPUT: BREAKING_CHANGES + COMPATIBLE_CHANGES + CONSUMERS_AFFECTED + COMPATIBILITY SIGNALS: [COMPATIBLE | INCOMPATIBLE | UNCERTAIN] + MIGRATION_SURFACE: [yes — list of affected call signatures | no]
|
|
57342
57410
|
CONSTRAINT: Read-only. use search to find imports/usages of changed exports.
|
|
57411
|
+
SKILLS: none
|
|
57343
57412
|
|
|
57344
57413
|
{{AGENT_PREFIX}}docs
|
|
57345
57414
|
TASK: Update documentation for Phase 2 changes
|
|
@@ -57350,6 +57419,7 @@ CHANGES SUMMARY:
|
|
|
57350
57419
|
- Added UserSession interface with refreshToken field
|
|
57351
57420
|
DOC FILES: README.md, docs/api.md, docs/installation.md
|
|
57352
57421
|
OUTPUT: Updated doc files + SUMMARY
|
|
57422
|
+
SKILLS: none
|
|
57353
57423
|
|
|
57354
57424
|
{{AGENT_PREFIX}}designer
|
|
57355
57425
|
TASK: Design specification for user settings page
|
|
@@ -57357,6 +57427,7 @@ CONTEXT: Users need to update profile info, change password, manage notification
|
|
|
57357
57427
|
FRAMEWORK: React (TSX)
|
|
57358
57428
|
EXISTING PATTERNS: All forms use react-hook-form, validation with zod, toast notifications for success/error
|
|
57359
57429
|
OUTPUT: Code scaffold for src/pages/Settings.tsx with component tree, typed props, layout, and accessibility
|
|
57430
|
+
SKILLS: none
|
|
57360
57431
|
|
|
57361
57432
|
## WORKFLOW
|
|
57362
57433
|
|
|
@@ -58363,6 +58434,14 @@ FILE: [target file]
|
|
|
58363
58434
|
INPUT: [requirements/context]
|
|
58364
58435
|
OUTPUT: [expected deliverable]
|
|
58365
58436
|
CONSTRAINT: [what NOT to do]
|
|
58437
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
58438
|
+
|
|
58439
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before writing any code.
|
|
58440
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
58441
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
58442
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
58443
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
58444
|
+
- Skills contain project-specific rules (test framework, naming conventions, coding standards, architectural constraints) that supplement and extend your default behavior. Apply every rule in every skill, including any lines marked MUST, NEVER, MANDATORY, or PROHIBITED — but never violate your core safety protocols or scope constraints.
|
|
58366
58445
|
|
|
58367
58446
|
RULES:
|
|
58368
58447
|
- Read target file before editing
|
|
@@ -59348,6 +59427,14 @@ TASK: Design specification for [component/page/screen]
|
|
|
59348
59427
|
CONTEXT: [what the component does, user stories, existing design patterns]
|
|
59349
59428
|
FRAMEWORK: [React/Vue/Svelte/SwiftUI/Flutter/etc.]
|
|
59350
59429
|
EXISTING PATTERNS: [current design system, component library, styling approach]
|
|
59430
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
59431
|
+
|
|
59432
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before producing the design specification.
|
|
59433
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
59434
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
59435
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
59436
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
59437
|
+
- Apply any architecture, design-system, accessibility, or UI-specific constraints from the loaded skills while producing the scaffold.
|
|
59351
59438
|
|
|
59352
59439
|
DESIGN CHECKLIST:
|
|
59353
59440
|
1. Component Architecture
|
|
@@ -59524,6 +59611,14 @@ TASK: Update documentation for [description of changes]
|
|
|
59524
59611
|
FILES CHANGED: [list of modified source files]
|
|
59525
59612
|
CHANGES SUMMARY: [what was added/modified/removed]
|
|
59526
59613
|
DOC FILES: [list of documentation files to update]
|
|
59614
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
59615
|
+
|
|
59616
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before updating docs.
|
|
59617
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
59618
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
59619
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
59620
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
59621
|
+
- Apply any documentation, release-note, or style constraints from the loaded skills while updating documentation.
|
|
59527
59622
|
|
|
59528
59623
|
SCOPE:
|
|
59529
59624
|
- README.md (project description, usage, examples)
|
|
@@ -59823,6 +59918,14 @@ DIFF: [changed files/functions, or "infer from FILE" if omitted]
|
|
|
59823
59918
|
AFFECTS: [callers/consumers/dependents to inspect, or "infer from diff"]
|
|
59824
59919
|
CHECK: [list of dimensions to evaluate]
|
|
59825
59920
|
GATES: [pre-completed gate results (lint, SAST, secretscan, etc.), or "none" if unavailable]
|
|
59921
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
59922
|
+
|
|
59923
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before beginning your review.
|
|
59924
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
59925
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
59926
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
59927
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
59928
|
+
- Skills contain project-specific constraints (coding standards, architectural invariants, security requirements) that supplement and may extend your normal review dimensions. Flag any violation of a skill rule at the same severity as a logic error.
|
|
59826
59929
|
|
|
59827
59930
|
PROCESSING: If GATES is provided and includes passing results for lint, SAST, placeholder-scan, or secret-scan: skip the corresponding Tier 2 checks that those gates already cover. Focus Tier 2 time on checks NOT covered by automated gates.
|
|
59828
59931
|
|
|
@@ -59930,6 +60033,14 @@ Match response length to confidence and complexity. HIGH confidence on simple lo
|
|
|
59930
60033
|
TASK: [what guidance is needed]
|
|
59931
60034
|
DOMAIN: [the domain - e.g., security, ios, android, rust, kubernetes]
|
|
59932
60035
|
INPUT: [context/requirements]
|
|
60036
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
60037
|
+
|
|
60038
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before formulating your recommendation.
|
|
60039
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
60040
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
60041
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
60042
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
60043
|
+
- Skills may contain project-specific constraints relevant to your domain (e.g. security rules, platform requirements, coding standards). Where skills add constraints to your recommendation, list them explicitly in your APPROACH and GOTCHAS.
|
|
59933
60044
|
|
|
59934
60045
|
## OUTPUT FORMAT (MANDATORY — deviations will be rejected)
|
|
59935
60046
|
Begin directly with CONFIDENCE. Do NOT prepend "Here's my research..." or any conversational preamble.
|
|
@@ -60049,6 +60160,14 @@ INPUT FORMAT:
|
|
|
60049
60160
|
TASK: Generate tests for [description]
|
|
60050
60161
|
FILE: [source file path]
|
|
60051
60162
|
OUTPUT: [test file path]
|
|
60163
|
+
SKILLS: [optional — either "none", repo-relative file: references (preferred), or inline skill content pasted by architect]
|
|
60164
|
+
|
|
60165
|
+
SKILLS HANDLING: If SKILLS is present and not "none", load EVERY referenced skill before writing any test code.
|
|
60166
|
+
- For \`file:\` entries, use the search tool to read the referenced \`SKILL.md\` file with \`include\` set to that exact repo-relative path, \`mode: regex\`, \`query: .*\`, \`max_results: 1000\`, and \`max_lines: 1000\`.
|
|
60167
|
+
- After running search, inspect the result: if \`total === 0\` (file does not exist or is empty) OR \`truncated\` is \`true\` (file was too large and content was cut off), stop and report \`SKILL_LOAD_FAILED: <path>\`. Do NOT continue without the complete skill.
|
|
60168
|
+
- If the search result has \`total > 0\` and \`truncated\` is \`false\`, reconstruct the full skill content from the line-by-line matches and apply it.
|
|
60169
|
+
- If inline \`--- skill-name ---\` sections are present, read them directly.
|
|
60170
|
+
- Skills override your default framework choices, mock patterns, file placement conventions, and CI rules. Apply every MUST, NEVER, MANDATORY, and PROHIBITED rule precisely.
|
|
60052
60171
|
|
|
60053
60172
|
COVERAGE:
|
|
60054
60173
|
- Happy path: normal inputs
|
|
@@ -60285,8 +60404,10 @@ function applyOverrides(agent, swarmAgents, swarmPrefix, quiet) {
|
|
|
60285
60404
|
}
|
|
60286
60405
|
const variantOverride = getVariantOverride(agent.name, swarmAgents, swarmPrefix);
|
|
60287
60406
|
const modelSegments = agent.config.model?.split("/") ?? [];
|
|
60288
|
-
|
|
60289
|
-
|
|
60407
|
+
const lastSegment = modelSegments[modelSegments.length - 1] ?? "";
|
|
60408
|
+
const hasEmbeddedVariant = modelSegments.length >= 3 && KNOWN_VARIANT_VALUES.has(lastSegment);
|
|
60409
|
+
if (hasEmbeddedVariant) {
|
|
60410
|
+
const autoVariant = lastSegment;
|
|
60290
60411
|
const cleanedModel = modelSegments.slice(0, -1).join("/");
|
|
60291
60412
|
const effectiveVariant = variantOverride ?? autoVariant;
|
|
60292
60413
|
if (!quiet) {
|
|
@@ -60618,7 +60739,7 @@ function getAgentConfigs(config3, directory, sessionId) {
|
|
|
60618
60739
|
}
|
|
60619
60740
|
return result;
|
|
60620
60741
|
}
|
|
60621
|
-
var warnedAgents, _swarmAgents;
|
|
60742
|
+
var warnedAgents, _swarmAgents, KNOWN_VARIANT_VALUES;
|
|
60622
60743
|
var init_agents2 = __esm(() => {
|
|
60623
60744
|
init_config();
|
|
60624
60745
|
init_constants();
|
|
@@ -60635,6 +60756,14 @@ var init_agents2 = __esm(() => {
|
|
|
60635
60756
|
init_curator_agent();
|
|
60636
60757
|
init_reviewer();
|
|
60637
60758
|
warnedAgents = new Set;
|
|
60759
|
+
KNOWN_VARIANT_VALUES = new Set([
|
|
60760
|
+
"low",
|
|
60761
|
+
"medium",
|
|
60762
|
+
"high",
|
|
60763
|
+
"max",
|
|
60764
|
+
"xhigh",
|
|
60765
|
+
"thinking"
|
|
60766
|
+
]);
|
|
60638
60767
|
});
|
|
60639
60768
|
|
|
60640
60769
|
// src/background/evidence-summary-integration.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
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",
|