opencode-swarm 7.88.0 → 7.88.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/brainstorm/SKILL.md +2 -1
- package/.opencode/skills/clarify/SKILL.md +7 -1
- package/.opencode/skills/clarify-spec/SKILL.md +1 -1
- package/.opencode/skills/issue-ingest/SKILL.md +3 -2
- package/.opencode/skills/plan/SKILL.md +7 -1
- package/.opencode/skills/specify/SKILL.md +3 -2
- package/dist/cli/{guardrail-explain-sw5bjxtk.js → guardrail-explain-995zavv8.js} +2 -2
- package/dist/cli/{index-jch711dq.js → index-4td9ef53.js} +518 -224
- package/dist/cli/{index-dkytd370.js → index-sr7g2msm.js} +2 -2
- package/dist/cli/{index-fwb5f2gr.js → index-tt5aehrb.js} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1346 -994
- package/dist/memory/config.d.ts +1 -0
- package/dist/memory/gateway.d.ts +1 -0
- package/dist/memory/provider-pool.d.ts +50 -0
- package/dist/memory/sqlite-provider.d.ts +3 -0
- package/package.json +1 -1
|
@@ -52,7 +52,8 @@ If `council.general.enabled` is true in the resolved opencode-swarm config AND a
|
|
|
52
52
|
- Exit with a design outline the user can skim in under two minutes.
|
|
53
53
|
|
|
54
54
|
**Phase 5: SPEC WRITE + SELF-REVIEW (architect + reviewer).**
|
|
55
|
-
- Generate `.swarm/spec.md` following the same SPEC CONTENT RULES that MODE: SPECIFY uses: WHAT/WHY only, no tech stack, no implementation details, FR-### / SC-### numbering, Given/When/Then scenarios, `[NEEDS CLARIFICATION]` markers only for items that survive the clarification funnel: inventory all material uncertainties without numeric cap → classify each (self_resolved/critic_resolved/research_needed/user_decision/deferred_nonblocking) — **
|
|
55
|
+
- Generate `.swarm/spec.md` following the same SPEC CONTENT RULES that MODE: SPECIFY uses: WHAT/WHY only, no tech stack, no implementation details, FR-### / SC-### numbering, Given/When/Then scenarios, `[NEEDS CLARIFICATION]` markers only for items that survive the clarification funnel: inventory all material uncertainties without numeric cap → classify each (self_resolved/critic_resolved/research_needed/user_decision/deferred_nonblocking) — **Overconfidence guard:** if the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved` → consult critic_sounding_board — critic responds per SoundingBoardVerdict: UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER — **always-surface protection:** always-surface categories must not receive UNNECESSARY/DROP; override to APPROVED/ASK_USER → record resolved items as assumptions → surface only survivors as markers with decision packet format (grouped by category, recommended defaults, blocking vs optional markers).
|
|
56
|
+
- **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.
|
|
56
57
|
- Cross-reference design sections by name where relevant context helps (but keep HOW out of the spec).
|
|
57
58
|
- Delegate to `the active swarm's reviewer agent` for an independent review of the draft spec. Reviewer must flag: requirements that encode HOW, untestable requirements, missing edge cases, silent assumptions.
|
|
58
59
|
- Apply reviewer feedback. If reviewer rejects, iterate once and re-review. After two rounds, surface remaining disagreements to the user.
|
|
@@ -38,7 +38,7 @@ There is NO hard cap on the internal inventory. Record every material uncertaint
|
|
|
38
38
|
Classify each item as exactly one of:
|
|
39
39
|
- `self_resolved`: answered from the user request, spec, plan, codebase reality check, `.swarm/context.md`, repo conventions, or an informed default. **If the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved`.**
|
|
40
40
|
- `critic_resolved`: sent to Critic Sounding Board and resolved by the critic.
|
|
41
|
-
- `research_needed`: needs SME/explorer/domain lookup before user escalation.
|
|
41
|
+
- `research_needed`: needs SME/explorer/domain lookup before user escalation. **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.
|
|
42
42
|
- `user_decision`: only the user can decide because it affects product scope, risk tolerance, policy, budget, UX, rollout, or destructive behavior.
|
|
43
43
|
- `deferred_nonblocking`: useful follow-up detail that does not block a correct initial plan and can be explicitly recorded as an assumption or follow-up.
|
|
44
44
|
|
|
@@ -101,3 +101,9 @@ The critic may improve wording or confirm prior context, but these categories MU
|
|
|
101
101
|
### Assumptions Recording
|
|
102
102
|
|
|
103
103
|
All items resolved in Stages 2-3 (self_resolved, critic_resolved, deferred_nonblocking) MUST be recorded as explicit assumptions in the spec, plan, or `.swarm/context.md`. Silently dropping resolved uncertainties is a protocol violation — every uncertainty that entered the funnel must have a recorded outcome.
|
|
104
|
+
|
|
105
|
+
### Mechanical Enforcement of DROP Protection
|
|
106
|
+
|
|
107
|
+
**Implementation Note:** The hard constraint against `DROP` on always-surface items (defined in Stage 3 of the clarification funnel) is currently enforced via skill instructions to the architect. A lightweight runtime enforcement mechanism is recommended: when processing the critic sounding board verdict response in `src/agents/critic.ts`, validate that any items tagged as "always-surface" do not receive `UNNECESSARY`/`DROP` verdicts. If a DROP verdict is encountered on an always-surface item, override it to `APPROVED`/`ASK_USER` at the code level rather than relying solely on prompt-based enforcement.
|
|
108
|
+
|
|
109
|
+
This mechanical enforcement prevents the following failure mode: the architect prompt instructs the override, but due to parsing errors, context limits, or model behavior variance, the DROP verdict is mistakenly applied to an always-surface item and silently accepted. The validation should occur in the decision-packet assembly code (when building the final clarification packet to surface to the user) and should emit a warning log when an override is applied.
|
|
@@ -50,7 +50,7 @@ CLARIFY-SPEC handles **already-surfaced** `[NEEDS CLARIFICATION]` markers and sp
|
|
|
50
50
|
However, before surfacing each marker question to the user, CLARIFY-SPEC MUST:
|
|
51
51
|
|
|
52
52
|
1. **Consult `critic_sounding_board`** with the candidate marker question and surrounding spec context to check whether the question wording can be improved or the item can be resolved from existing context.
|
|
53
|
-
2. **Apply the
|
|
53
|
+
2. **Apply the Overconfidence guard:** If the critic supplies a `RESOLVE` verdict with a default answer, but that default is not directly supported by user request, spec, or recorded context, classify the item as `user_decision` rather than `self_resolved`.
|
|
54
54
|
3. **Apply always-surface protection:** If the marker belongs to an always-surface category (scope boundaries, destructive behavior, security/privacy, backward compatibility, breaking API changes, new dependencies, deprecations, cross-platform impact, cost/performance tradeoffs, user-visible UX, rollout strategy, QA gates), the item MUST NOT receive `UNNECESSARY`/`DROP` from the critic — override to `APPROVED`/`ASK_USER`.
|
|
55
55
|
|
|
56
56
|
Critic verdict mapping (see `src/agents/critic.ts` `SoundingBoardVerdict`): `UNNECESSARY`→DROP, `RESOLVE`→RESOLVE, `REPHRASE`→REPHRASE, `APPROVED`→ASK_USER.
|
|
@@ -45,8 +45,9 @@ Flags parsed from signal:
|
|
|
45
45
|
- WHAT users need and WHY — never HOW to implement
|
|
46
46
|
- FR-### / SC-### numbering, Given/When/Then scenarios
|
|
47
47
|
- No technology stack, APIs, or code structure
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
- `[NEEDS CLARIFICATION]` markers only for items that survive the clarification funnel: inventory all material uncertainties without numeric cap → classify each (self_resolved/critic_resolved/research_needed/user_decision/deferred_nonblocking) — **Overconfidence guard:** if the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved` → consult critic_sounding_board — critic responds per SoundingBoardVerdict: UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER — **always-surface protection:** always-surface categories must not receive UNNECESSARY/DROP; override to APPROVED/ASK_USER → record resolved items as assumptions → surface only survivors as markers with decision packet format (grouped by category, recommended defaults, blocking vs optional markers)
|
|
49
|
+
- **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.
|
|
50
|
+
2. Cross-reference the spec against the issue's expected behavior to ensure alignment.
|
|
50
51
|
3. If the issue is a bug: spec must describe the correct behavior, not the broken behavior.
|
|
51
52
|
4. If the issue is a feature: spec must describe the user-facing outcome, not the implementation.
|
|
52
53
|
5. QA GATE SELECTION: Ask user which QA gates to enable (same dialogue as MODE: SPECIFY). Write to `.swarm/context.md` under `## Pending QA Gate Selection`.
|
|
@@ -81,7 +81,7 @@ Classify each item as exactly one of:
|
|
|
81
81
|
|
|
82
82
|
- `self_resolved`: answered from the user request, spec, plan, codebase reality check, `.swarm/context.md`, repo conventions, or an informed default. **If the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved`.**
|
|
83
83
|
- `critic_resolved`: sent to Critic Sounding Board and resolved by the critic.
|
|
84
|
-
- `research_needed`: needs SME/explorer/domain lookup before user escalation.
|
|
84
|
+
- `research_needed`: needs SME/explorer/domain lookup before user escalation. **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.
|
|
85
85
|
- `user_decision`: only the user can decide because it affects product scope, risk tolerance, policy, budget, UX, rollout, or destructive behavior.
|
|
86
86
|
- `deferred_nonblocking`: useful follow-up detail that does not block a correct initial plan and can be explicitly recorded as an assumption or follow-up.
|
|
87
87
|
|
|
@@ -152,6 +152,12 @@ All items resolved in Stages 2-3 (self_resolved, critic_resolved, deferred_nonbl
|
|
|
152
152
|
|
|
153
153
|
The plan generated by `save_plan` MUST include explicit assumptions and remaining unresolved decisions in the task descriptions or acceptance criteria — not silently omit them.
|
|
154
154
|
|
|
155
|
+
#### Mechanical Enforcement of DROP Protection
|
|
156
|
+
|
|
157
|
+
**Implementation Note:** The hard constraint against `DROP` on always-surface items (Stage 3 of the clarification funnel) is currently enforced via skill instructions to the architect. A lightweight runtime enforcement mechanism is recommended: when processing the critic sounding board verdict response in `src/agents/critic.ts`, validate that any items tagged as "always-surface" do not receive `UNNECESSARY`/`DROP` verdicts. If a DROP verdict is encountered on an always-surface item, override it to `APPROVED`/`ASK_USER` at the code level rather than relying solely on prompt-based enforcement.
|
|
158
|
+
|
|
159
|
+
This mechanical enforcement prevents the following failure mode: the architect prompt instructs the override, but due to parsing errors, context limits, or model behavior variance, the DROP verdict is mistakenly applied to an always-surface item and silently accepted. The validation should occur in the decision-packet assembly code (when building the final clarification packet to surface to the user) and should emit a warning log when an override is applied.
|
|
160
|
+
|
|
155
161
|
Use the `save_plan` tool to create the implementation plan. Required parameters:
|
|
156
162
|
- `title`: The real project name from the spec (NOT a placeholder like [Project])
|
|
157
163
|
- `swarm_id`: The swarm identifier (e.g. "mega", "local", "paid")
|
|
@@ -28,8 +28,9 @@ Activates when: user asks to "specify", "define requirements", "write a spec", o
|
|
|
28
28
|
- Success criteria numbered SC-001, SC-002… — measurable and technology-agnostic
|
|
29
29
|
- Key entities if data is involved (no schema or field definitions — entity names only)
|
|
30
30
|
- Edge cases and known failure modes
|
|
31
|
-
- `[NEEDS CLARIFICATION]` markers for items where uncertainty could change scope, security, or core behavior, BUT ONLY after running the clarification funnel: (1) inventory all material uncertainties without numeric cap, (2) classify each as self_resolved/critic_resolved/research_needed/user_decision/deferred_nonblocking — **
|
|
32
|
-
|
|
31
|
+
- `[NEEDS CLARIFICATION]` markers for items where uncertainty could change scope, security, or core behavior, BUT ONLY after running the clarification funnel: (1) inventory all material uncertainties without numeric cap, (2) classify each as self_resolved/critic_resolved/research_needed/user_decision/deferred_nonblocking — **Overconfidence guard:** if the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved`, (3) consult critic_sounding_board with candidate items — critic responds per SoundingBoardVerdict: UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER — **always-surface protection:** always-surface categories must not receive UNNECESSARY/DROP; override to APPROVED/ASK_USER, (4) record all resolved items as explicit assumptions in the spec, (5) use markers only for items that survive the funnel (ASK_USER or unresolved after critic consultation). Decision packet format: grouped by category, recommended defaults, blocking vs optional markers, impact of accepting default. Prefer informed defaults over asking
|
|
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
|
+
5. Write the spec to `.swarm/spec.md`.
|
|
33
34
|
5b. **QA GATE SELECTION, PARALLEL CODERS, COMMIT FREQUENCY, AND AUTO_PROCEED (dialogue only).**
|
|
34
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
36
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-tt5aehrb.js";
|
|
5
|
+
import"./index-4td9ef53.js";
|
|
6
6
|
import"./index-g00qm2gf.js";
|
|
7
7
|
import"./index-yhsmmv2z.js";
|
|
8
8
|
import"./index-32axfg6h.js";
|