opencode-swarm 7.99.0 → 7.99.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.
- package/.opencode/skills/brainstorm/SKILL.md +11 -1
- package/.opencode/skills/loop/SKILL.md +13 -4
- package/.opencode/skills/plan/SKILL.md +8 -1
- package/.opencode/skills/specify/SKILL.md +4 -2
- package/README.md +5 -3
- package/dist/agents/_prompt-helpers.d.ts +1 -0
- package/dist/cli/{evidence-summary-service-4hs44n2c.js → evidence-summary-service-wxarfgt8.js} +2 -2
- package/dist/cli/{explorer-jc46negv.js → explorer-rwfvbbx5.js} +1 -1
- package/dist/cli/{guardrail-explain-ktm6szbm.js → guardrail-explain-t3prwa5b.js} +6 -6
- package/dist/cli/{index-hw8r3e5p.js → index-62tmq1kc.js} +212 -109
- package/dist/cli/{index-wwnjw0fb.js → index-6wgwybzj.js} +27 -14
- package/dist/cli/{index-we94wkty.js → index-94qwbx11.js} +48 -0
- package/dist/cli/{index-4pt2py5p.js → index-ryns3fqt.js} +6 -6
- package/dist/cli/{index-5fxjagjt.js → index-s3esnz7m.js} +1 -1
- package/dist/cli/{index-ft4gehk1.js → index-y4stbk2f.js} +1 -1
- package/dist/cli/{index-2a6ppa65.js → index-ydgy7vg5.js} +12 -7
- package/dist/cli/index.js +5 -5
- package/dist/cli/{pending-delegations-c785p5n2.js → pending-delegations-vh2nae3n.js} +1 -1
- package/dist/cli/{pr-subscriptions-fqrzm0tv.js → pr-subscriptions-d57tq0c0.js} +2 -2
- package/dist/commands/loop.d.ts +5 -0
- package/dist/commands/registry.d.ts +5 -2
- package/dist/db/qa-gate-profile.d.ts +10 -0
- package/dist/evidence/manager.d.ts +5 -0
- package/dist/hooks/auto-review.d.ts +1 -1
- package/dist/hooks/knowledge-migrator.d.ts +7 -0
- package/dist/index.js +2265 -2033
- package/dist/plan/utils.d.ts +8 -3
- package/dist/tools/dispatch-lanes.d.ts +14 -0
- package/dist/tools/phase-complete/gates/gate-helpers.d.ts +2 -0
- package/dist/tools/phase-complete/gates/types.d.ts +4 -0
- package/dist/turbo/lean/conflicts.d.ts +2 -13
- package/dist/utils/path.d.ts +1 -0
- package/package.json +1 -1
|
@@ -61,6 +61,14 @@ If `council.general.enabled` is true in the resolved opencode-swarm config AND a
|
|
|
61
61
|
- Exit when reviewer signs off (or user explicitly accepts remaining disagreements).
|
|
62
62
|
|
|
63
63
|
**Phase 6: QA GATE SELECTION, PARALLEL CODERS, AND COMMIT FREQUENCY (architect, dialogue only).**
|
|
64
|
+
Auto-loop exception: when BRAINSTORM is running inside MODE: LOOP with
|
|
65
|
+
`autonomy=auto`, do not ask this preference question. Write the balanced-speed
|
|
66
|
+
default `## Pending QA Gate Selection` instead (reviewer, test_engineer,
|
|
67
|
+
sme_enabled, critic_pre_plan, sast_enabled, drift_check ON; council_mode,
|
|
68
|
+
hallucination_guard, mutation_test, phase_council, final_council OFF). Do not
|
|
69
|
+
write `## Pending Parallelization Config` here because task scopes are not known
|
|
70
|
+
until PLAN; MODE: PLAN will choose safe parallelism automatically. Keep commit
|
|
71
|
+
frequency at phase-level only.
|
|
64
72
|
Now ask the user which QA gates to enable for this plan, how many parallel coders to use, and the commit frequency -- do not select on their behalf. Present all three items together as one unified exchange.
|
|
65
73
|
|
|
66
74
|
Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder count, and commit frequency as a single user-facing section. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
|
|
@@ -77,7 +85,7 @@ Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder
|
|
|
77
85
|
- final_council (default: OFF) -- when enabled, after all phases complete the architect dispatches the full 5-member council (critic, reviewer, sme, test_engineer, explorer) -- NOT the General Council -- at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This does not require `council.general.enabled`.
|
|
78
86
|
|
|
79
87
|
Additionally, present these two sub-items as part of the same exchange:
|
|
80
|
-
- Parallel coders (default: 1, range: 1-
|
|
88
|
+
- Parallel coders (default: 1, range: 1-6) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.
|
|
81
89
|
- Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
|
|
82
90
|
- auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking "Ready for Phase N+1?"; runtime toggle via /swarm auto-proceed on|off.
|
|
83
91
|
|
|
@@ -117,6 +125,8 @@ GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
|
|
|
117
125
|
→ WRONG: the architect does not configure gates. The user configures gates. Always ask.
|
|
118
126
|
|
|
119
127
|
MANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.
|
|
128
|
+
Exception: MODE: LOOP with `autonomy=auto` uses the balanced-speed defaults
|
|
129
|
+
above and does not pause for this preference exchange.
|
|
120
130
|
You are BLOCKED until ALL THREE of these conditions are met:
|
|
121
131
|
(1) The unified gate/coders/commit selection section has been presented to the user in a single message
|
|
122
132
|
(2) The user has responded (accept defaults OR customized list for all three items)
|
|
@@ -43,11 +43,11 @@ Parse the `[MODE: LOOP ...]` header to extract:
|
|
|
43
43
|
- `objective`: the goal text after the header (the WHAT to achieve). Empty only
|
|
44
44
|
when `resume=true`.
|
|
45
45
|
- `max_cycles`: integer 1..5 (default 3) — hard cap on outer improvement cycles.
|
|
46
|
-
- `autonomy`: `
|
|
47
|
-
- `checkpoint`: pause at each phase gate and wait for explicit user approval
|
|
48
|
-
before continuing.
|
|
46
|
+
- `autonomy`: `auto` (default) or `checkpoint`.
|
|
49
47
|
- `auto`: proceed across gates without prompting, but still enforce every
|
|
50
48
|
hard stop condition and the mandatory review/critic gates.
|
|
49
|
+
- `checkpoint`: pause at each phase gate and wait for explicit user approval
|
|
50
|
+
before continuing.
|
|
51
51
|
- `depth`: `standard` (default) or `exhaustive` (wider exploration in
|
|
52
52
|
BRAINSTORM and PLAN: more candidate approaches, deeper localization).
|
|
53
53
|
- `resume`: `true` | `false`. When true, resume the existing run from durable
|
|
@@ -100,6 +100,15 @@ IMPROVE**. Do not skip or collapse phases. Each phase has an entry gate
|
|
|
100
100
|
(precondition) and an exit gate (positive evidence required before the next
|
|
101
101
|
phase begins). In `checkpoint` autonomy, pause at each gate for user approval.
|
|
102
102
|
|
|
103
|
+
When `autonomy=auto`, use the balanced-speed defaults instead of asking the user
|
|
104
|
+
for execution preferences: reviewer ON, test_engineer ON, sme_enabled ON,
|
|
105
|
+
critic_pre_plan ON, sast_enabled ON, drift_check ON, and council_mode,
|
|
106
|
+
hallucination_guard, mutation_test, phase_council, final_council OFF. Keep
|
|
107
|
+
commit frequency at phase-level only. During PLAN, choose the largest safe
|
|
108
|
+
parallel coder count from dependency-ready, file-disjoint task groups, clamped to
|
|
109
|
+
the configured limit (currently 6); if scopes overlap or are unknown, use 1.
|
|
110
|
+
This does not weaken QA; it removes only the preference prompt.
|
|
111
|
+
|
|
103
112
|
On cycle 2+, BRAINSTORM is replaced by a lightweight **refinement** step: feed
|
|
104
113
|
the prior cycle's captured improvements and residual findings into PLAN
|
|
105
114
|
directly (skip full discovery dialogue) — the objective is already framed.
|
|
@@ -281,7 +290,7 @@ A minimal, append-friendly shape — extend as needed but keep these fields:
|
|
|
281
290
|
|
|
282
291
|
## Autonomy Quick Reference
|
|
283
292
|
|
|
284
|
-
| Behavior | `
|
|
293
|
+
| Behavior | `auto` (default) | `checkpoint` |
|
|
285
294
|
| --- | --- | --- |
|
|
286
295
|
| Pause at phase gates | Yes — wait for user approval | No |
|
|
287
296
|
| Confirm before next cycle | Yes | No |
|
|
@@ -203,6 +203,13 @@ save_plan({
|
|
|
203
203
|
})
|
|
204
204
|
|
|
205
205
|
**POST-SAVE_PLAN: APPLY QA GATE SELECTION.**
|
|
206
|
+
Auto-loop exception: when this PLAN step is running inside MODE: LOOP with
|
|
207
|
+
`autonomy=auto`, do not ask the gate/parallelism/commit-frequency question. Use
|
|
208
|
+
the balanced-speed defaults from the loop skill, call `set_qa_gates` with those
|
|
209
|
+
values after `save_plan`, keep phase-level commits, and set a locked
|
|
210
|
+
`execution_profile` automatically when the plan has dependency-ready,
|
|
211
|
+
file-disjoint tasks. Choose the largest safe count, clamped to the configured
|
|
212
|
+
limit (currently 6); use serial execution when scopes overlap or are unknown.
|
|
206
213
|
After `save_plan` succeeds, read `.swarm/context.md`:
|
|
207
214
|
- If a `## Pending QA Gate Selection` section exists: parse the gate values, call `set_qa_gates` with those flags, confirm with the user ("QA gates applied: <list>"), then remove the section from context.md.
|
|
208
215
|
- If a `## Pending Parallelization Config` section also exists: parse the values and call `save_plan` again with `execution_profile` set to `{ parallelization_enabled: <parsed>, max_concurrent_tasks: <parsed>, council_parallel: false, locked: true }`. Then remove the section from context.md. If the plan already had `execution_profile.locked: true`, skip this step — the profile is already locked and immutable.
|
|
@@ -220,7 +227,7 @@ After `save_plan` succeeds, read `.swarm/context.md`:
|
|
|
220
227
|
- drift_check (default: ON) - mandatory per-phase drift verification at PHASE-WRAP
|
|
221
228
|
- final_council (default: OFF) - when enabled, after all phases complete the architect dispatches the full 5-member council (critic, reviewer, sme, test_engineer, explorer) -- NOT the General Council -- at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This does not require `council.general.enabled`.
|
|
222
229
|
Additionally, present these two sub-items as part of the same exchange:
|
|
223
|
-
- Parallel coders (default: 1, range: 1-
|
|
230
|
+
- Parallel coders (default: 1, range: 1-6) - how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files - safe and faster, but only for tasks whose declared file scopes do NOT overlap. Inspect the plan and recommend a count equal to the number of dependency-ready, file-disjoint task groups (clamped 1-6); recommend 1 (serial) when scopes overlap or are unknown. State your recommendation and reasoning when you ask.
|
|
224
231
|
- Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
|
|
225
232
|
The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
|
|
226
233
|
If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
|
|
@@ -32,7 +32,7 @@ Activates when: user asks to "specify", "define requirements", "write a spec", o
|
|
|
32
32
|
- **Important:** If research is ongoing, monitor the timeout configured in `.swarm/config.json` under `research_needed_timeout_ms` (default: 300000ms / 5 minutes). If research does not complete before the timeout expires, automatically reclassify the item to `user_decision` with a note that research was incomplete, then surface it to the user. This prevents the clarification funnel from stalling while waiting for external research.
|
|
33
33
|
5. Write the spec to `.swarm/spec.md`.
|
|
34
34
|
5b. **QA GATE SELECTION, PARALLEL CODERS, COMMIT FREQUENCY, AND AUTO_PROCEED (dialogue only).**
|
|
35
|
-
Ask the user which QA gates to enable for this plan, how many parallel coders to use, the commit frequency, and auto_proceed -- do not select on their behalf. Present all four items together as one unified exchange.
|
|
35
|
+
Ask the user which QA gates to enable for this plan, how many parallel coders to use, the commit frequency, and auto_proceed -- do not select on their behalf. Present all four items together as one unified exchange. Exception: when SPECIFY is running inside MODE: LOOP with `autonomy=auto`, write the balanced-speed default `## Pending QA Gate Selection` instead (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, drift_check ON; council_mode, hallucination_guard, mutation_test, phase_council, final_council OFF), keep phase-level commits, and let MODE: PLAN choose safe parallelism after task scopes exist.
|
|
36
36
|
|
|
37
37
|
Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder count, commit frequency, and auto_proceed as a single user-facing section. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
|
|
38
38
|
- reviewer (default: ON) -- code review of coder output
|
|
@@ -48,7 +48,7 @@ Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder
|
|
|
48
48
|
- final_council (default: OFF) -- when enabled, after all phases complete the architect dispatches the full 5-member council (critic, reviewer, sme, test_engineer, explorer) -- NOT the General Council -- at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This does not require `council.general.enabled`.
|
|
49
49
|
|
|
50
50
|
Additionally, present these three sub-items as part of the same exchange:
|
|
51
|
-
- Parallel coders (default: 1, range: 1-
|
|
51
|
+
- Parallel coders (default: 1, range: 1-6) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.
|
|
52
52
|
- Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
|
|
53
53
|
- auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking "Ready for Phase N+1?"; runtime toggle via /swarm auto-proceed on|off.
|
|
54
54
|
|
|
@@ -88,6 +88,8 @@ GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
|
|
|
88
88
|
→ WRONG: the architect does not configure gates. The user configures gates. Always ask.
|
|
89
89
|
|
|
90
90
|
MANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.
|
|
91
|
+
Exception: MODE: LOOP with `autonomy=auto` uses the balanced-speed defaults
|
|
92
|
+
above and does not pause for this preference exchange.
|
|
91
93
|
You are BLOCKED until ALL THREE of these conditions are met:
|
|
92
94
|
(1) The unified gate/coders/commit/auto_proceed selection section has been presented to the user in a single message
|
|
93
95
|
(2) The user has responded (accept defaults OR customized list for all four items)
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Most AI coding tools let one model write code and ask that same model whether th
|
|
|
39
39
|
- 🔄 **Phase completion gates** — completion-verify and drift verifier gates enforced before phase completion
|
|
40
40
|
- 🔁 **Resumable sessions** — all state saved to `.swarm/`; pick up any project any day
|
|
41
41
|
- 🖥️ **PR Monitor** — GitHub PR subscription and background polling via `gh` CLI; delivers real-time CI, review, and merge status updates via the AutomationEventBus (FR-001, opt-in via `pr_monitor.enabled: true`). Subscribe with `/swarm pr subscribe <pr-url|owner/repo#N|N>`; unsubscribe with `/swarm pr unsubscribe <pr-url|owner/repo#N|N>`; check status with `/swarm pr status`. Enable `auto_pr_feedback: true` in `pr_monitor` config to inject `[MODE: PR_FEEDBACK pr="URL"]` on CI failures and merge conflicts automatically.
|
|
42
|
-
- 🌐 **
|
|
42
|
+
- 🌐 **12 full language profiles** (TypeScript, Python, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, Swift, Dart, PHP) with **tree-sitter parse validation across 20 grammars** (adds JavaScript, CSS, Bash, PowerShell, INI, Regex — and `.tsx` / `.c` aliases) — extending: see [docs/adding-a-language.md](docs/adding-a-language.md)
|
|
43
43
|
- 🛡️ **Built-in security** — SAST, secrets scanning, dependency audit per task
|
|
44
44
|
- 🔒 **Scope enforcement** — Validates write targets against declared scope with cross-process persistence, TTL expiry, and scope-aware destructive command blocking. **Handles both single-string and array-based path arguments** (`files[]`, `paths[]`, `targetFiles[]`) to prevent scope bypass via multi-file tool calls.
|
|
45
45
|
- 📝 **Shell write detection** — Static analysis of POSIX/PowerShell/cmd commands to detect file writes (redirects, builtins, in-place editors, network downloads, archive extraction, git destructive ops) before execution
|
|
@@ -522,6 +522,8 @@ Every agent runs inside a circuit breaker that prevents runaway behavior:
|
|
|
522
522
|
|
|
523
523
|
Limits reset per task. Per-agent overrides available in config.
|
|
524
524
|
|
|
525
|
+
> **Note:** Built-in per-agent profiles override the global `max_consecutive_errors` to **8** for `architect`, `coder`, `test_engineer`, `explorer`, and `reviewer` (`src/config/schema.ts` `DEFAULT_AGENT_PROFILES`). The `5` shown above is the `GuardrailsConfigSchema` global default that applies only when no per-agent profile sets the value. See [docs/installation.md § Guardrails Configuration](docs/installation.md#guardrails-configuration) for the full schema and [docs/configuration.md § Per-agent override fields](docs/configuration.md#per-agent-override-fields) for how to override.
|
|
526
|
+
|
|
525
527
|
### File Authority (Per-Agent Write Permissions)
|
|
526
528
|
|
|
527
529
|
Each agent can only write to specific paths:
|
|
@@ -540,7 +542,7 @@ Built-in tools verify every task before it ships:
|
|
|
540
542
|
|
|
541
543
|
- **syntax_check** — Tree-sitter validation across the configured language grammar map
|
|
542
544
|
- **placeholder_scan** — Catches TODOs, stubs, incomplete code
|
|
543
|
-
- **sast_scan** —
|
|
545
|
+
- **sast_scan** — 65 security rules across 7 languages (offline)
|
|
544
546
|
- **sbom_generate** — Dependency tracking (CycloneDX)
|
|
545
547
|
- **quality_budget** — Complexity, duplication, test ratio limits
|
|
546
548
|
|
|
@@ -796,7 +798,7 @@ Every candidate passes a 3-gate pipeline before entering quarantine:
|
|
|
796
798
|
|------|-------------|
|
|
797
799
|
| syntax_check | Tree-sitter validation across the configured language grammar map |
|
|
798
800
|
| placeholder_scan | Catches TODOs, FIXMEs, stubs, placeholder text |
|
|
799
|
-
| sast_scan | Offline security analysis,
|
|
801
|
+
| sast_scan | Offline security analysis, 65 rules, 7 languages |
|
|
800
802
|
| sbom_generate | CycloneDX dependency tracking, 8 ecosystems |
|
|
801
803
|
| build_check | Runs your project's native build/typecheck |
|
|
802
804
|
| incremental_verify | Post-coder hook for TS/JS, Go, Rust, Python, and C#; configured by `incremental_verify.*`, not invoked as a registered tool |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolvePrompt(base: string, custom?: string, append?: string): string;
|
package/dist/cli/{evidence-summary-service-4hs44n2c.js → evidence-summary-service-wxarfgt8.js}
RENAMED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
loadPlanJsonOnly,
|
|
7
7
|
mergeDurableGateEntriesFromEvidence,
|
|
8
8
|
readDurableGateEvidence
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-6wgwybzj.js";
|
|
10
10
|
import"./index-r8f89sm9.js";
|
|
11
11
|
import"./index-9b7qp18e.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-94qwbx11.js";
|
|
13
13
|
import"./index-jtqkh8jf.js";
|
|
14
14
|
import"./index-5e4e2hvv.js";
|
|
15
15
|
import"./index-p0arc26j.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-y4stbk2f.js";
|
|
5
|
+
import"./index-62tmq1kc.js";
|
|
6
6
|
import"./index-xsswhy6k.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-ydgy7vg5.js";
|
|
8
8
|
import"./index-vwyjkzgs.js";
|
|
9
9
|
import"./index-f7nma02k.js";
|
|
10
10
|
import"./index-svf2zjxs.js";
|
|
11
11
|
import"./index-7hnwnw5g.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-6wgwybzj.js";
|
|
13
13
|
import"./index-adz3nk9b.js";
|
|
14
14
|
import"./index-v4fcn4tr.js";
|
|
15
15
|
import"./index-r8f89sm9.js";
|
|
16
16
|
import"./index-9b7qp18e.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-s3esnz7m.js";
|
|
18
|
+
import"./index-94qwbx11.js";
|
|
19
19
|
import"./index-jtqkh8jf.js";
|
|
20
20
|
import"./index-5e4e2hvv.js";
|
|
21
21
|
import"./index-p0arc26j.js";
|