opencode-swarm 7.139.4 → 7.139.6
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 +8 -101
- package/.opencode/skills/execute/SKILL.md +10 -9
- package/.opencode/skills/issue-ingest/SKILL.md +1 -1
- package/.opencode/skills/plan/SKILL.md +40 -97
- package/.opencode/skills/specify/SKILL.md +3 -89
- package/dist/agents/architect.d.ts +2 -3
- package/dist/cli/{config-doctor-whxr386t.js → config-doctor-7v9at76j.js} +3 -3
- package/dist/cli/{core-aj5g7an6.js → core-jtj9j6z5.js} +2 -2
- package/dist/cli/{curation-policy-anym2y3v.js → curation-policy-rbrx3kd2.js} +6 -6
- package/dist/cli/{curator-e8cvb55d.js → curator-bdc5hssa.js} +27 -27
- package/dist/cli/{curator-llm-factory-h9xbpgmw.js → curator-llm-factory-305cfcxz.js} +27 -27
- package/dist/cli/{evidence-summary-service-g82bsjqa.js → evidence-summary-service-nfdc1ht9.js} +9 -8
- package/dist/cli/{gate-evidence-72cgrvs2.js → gate-evidence-46qeyfc1.js} +4 -4
- package/dist/cli/{guardrail-explain-0be7msvq.js → guardrail-explain-w9rwgz4c.js} +28 -28
- package/dist/cli/{guardrail-log-9mm5443g.js → guardrail-log-4805jgj5.js} +4 -4
- package/dist/cli/{hive-promoter-nnzs5x1r.js → hive-promoter-jrd4pjb6.js} +27 -27
- package/dist/cli/{index-sd657fkp.js → index-1m1ksyqt.js} +1 -1
- package/dist/cli/{index-5azdnaty.js → index-1tw24kcp.js} +2 -2
- package/dist/cli/{index-pg84msyc.js → index-3fscvmfw.js} +3 -3
- package/dist/cli/{index-k41dn8me.js → index-68gh7p3t.js} +3 -3
- package/dist/cli/{index-e1k9vpqn.js → index-7qx874pn.js} +2 -2
- package/dist/cli/{index-jnfyxeap.js → index-8d2d7c6k.js} +4 -4
- package/dist/cli/{index-0e95eck5.js → index-a6v3kzyc.js} +5 -5
- package/dist/cli/{index-xmhhhjjw.js → index-adyxbmt5.js} +3 -3
- package/dist/cli/{index-xb1zq933.js → index-b6k9z88b.js} +1 -1
- package/dist/cli/{index-j77frjq8.js → index-b9rd29ge.js} +1 -1
- package/dist/cli/{index-6nzmp937.js → index-brh827g0.js} +442 -27
- package/dist/cli/{index-1kz6da87.js → index-d181x9zr.js} +2 -1
- package/dist/cli/{index-ejbcpbzp.js → index-ev72jrxc.js} +2 -2
- package/dist/cli/{index-s58vghgj.js → index-fjrt81db.js} +2 -2
- package/dist/cli/{index-6r522srn.js → index-h2waehqq.js} +1 -1
- package/dist/cli/{index-vyqd1hzm.js → index-h7ht03c4.js} +1529 -969
- package/dist/cli/{index-6z0a940s.js → index-hbnsmnb0.js} +2 -2
- package/dist/cli/{index-s0qc4gj6.js → index-hfvxhk4z.js} +1 -1
- package/dist/cli/{index-0xkjhgrf.js → index-jfjnn408.js} +1 -1
- package/dist/cli/{index-vfsqpcz6.js → index-k5z14rb1.js} +4 -4
- package/dist/cli/{index-6rxgb5r9.js → index-kbfsp07d.js} +16 -6
- package/dist/cli/{index-6vh6vrnk.js → index-m7xks4r4.js} +6 -6
- package/dist/cli/{index-5z2xps64.js → index-n0pja0qs.js} +2 -2
- package/dist/cli/{index-5s23pfsy.js → index-n3ppm2gt.js} +2 -2
- package/dist/cli/{index-4wjk296r.js → index-r4t92q32.js} +2 -2
- package/dist/cli/{index-33skgk1a.js → index-rs1f1bh0.js} +1 -1
- package/dist/cli/{index-rsrx77fg.js → index-ry0hgg3m.js} +3 -3
- package/dist/cli/{index-sa15nfgg.js → index-sfbwze80.js} +29 -29
- package/dist/cli/{index-gfmrw2f5.js → index-t94f72tb.js} +2 -2
- package/dist/cli/{index-9cdj4020.js → index-wv89xmbe.js} +2 -2
- package/dist/cli/{index-nrx08gcr.js → index-yyyk63kk.js} +2 -2
- package/dist/cli/index.js +27 -27
- package/dist/cli/{knowledge-escalator-a6z30y9p.js → knowledge-escalator-7z9vwqrk.js} +7 -7
- package/dist/cli/{knowledge-events-deq0ds8e.js → knowledge-events-vw2cdtnp.js} +5 -5
- package/dist/cli/{knowledge-link-bmbatt8s.js → knowledge-link-q46k9adx.js} +4 -4
- package/dist/cli/{knowledge-store-vdr19mnq.js → knowledge-store-ecv0qs7r.js} +5 -5
- package/dist/cli/{knowledge-validator-5hgacnrf.js → knowledge-validator-arppnzpb.js} +8 -8
- package/dist/cli/{pending-delegations-7ayryxbg.js → pending-delegations-qzrx38y9.js} +3 -3
- package/dist/cli/{pr-subscriptions-w5y08ebc.js → pr-subscriptions-5s59h4dd.js} +3 -3
- package/dist/cli/{runner-h7vmgkth.js → runner-y78d7ryb.js} +5 -5
- package/dist/cli/{scan-cursor-d6qcg9hr.js → scan-cursor-7740wg6r.js} +6 -6
- package/dist/cli/{schema-y1zekrag.js → schema-sajt4mcv.js} +2 -2
- package/dist/cli/{scope-persistence-tj6qway9.js → scope-persistence-dr1msqxw.js} +5 -5
- package/dist/cli/{skill-generator-bw8xhzzn.js → skill-generator-k8qz8ja5.js} +9 -9
- package/dist/cli/{telemetry-62cn5t24.js → telemetry-sc57xtb0.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-hs5c2qzp.js → worktree-collision-ownership-7a8e6gr9.js} +3 -3
- package/dist/config/plan-schema.d.ts +2 -0
- package/dist/db/index.d.ts +1 -1
- package/dist/db/qa-gate-profile.d.ts +86 -2
- package/dist/db/task-checkpoint-receipt.d.ts +27 -0
- package/dist/index.js +394 -309
- package/dist/plan/manager.d.ts +4 -0
- package/dist/qa-gate/recovery.d.ts +6 -0
- package/dist/services/export-service.d.ts +2 -6
- package/dist/services/handoff-service.d.ts +2 -6
- package/dist/tools/checkpoint.d.ts +17 -7
- package/dist/tools/get-approved-plan.d.ts +8 -6
- package/dist/tools/get-qa-gate-profile.d.ts +7 -3
- package/dist/tools/phase-complete/gates/gate-helpers.d.ts +1 -0
- package/dist/tools/qa-gate-plan-identity.d.ts +28 -0
- package/dist/tools/save-plan.d.ts +3 -14
- package/dist/tools/set-qa-gates.d.ts +13 -8
- package/dist/tools/write-drift-evidence.d.ts +2 -0
- package/package.json +1 -1
|
@@ -63,112 +63,19 @@ If `council.general.enabled` is true in the resolved opencode-swarm config AND a
|
|
|
63
63
|
- Write the final spec to `.swarm/spec.md`.
|
|
64
64
|
- Exit when reviewer signs off (or user explicitly accepts remaining disagreements).
|
|
65
65
|
|
|
66
|
-
**Phase 6: QA
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
sme_enabled, critic_pre_plan, sast_enabled, drift_check ON; council_mode,
|
|
71
|
-
hallucination_guard, mutation_test, phase_council, final_council OFF). Do not
|
|
72
|
-
write `## Pending Parallelization Config` here because task scopes are not known
|
|
73
|
-
until PLAN; MODE: PLAN will choose safe parallelism automatically. Keep commit
|
|
74
|
-
frequency at phase-level only.
|
|
75
|
-
Now 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.
|
|
76
|
-
|
|
77
|
-
<!-- BEGIN QA_GATE_BODY -->
|
|
78
|
-
|
|
79
|
-
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:
|
|
80
|
-
- reviewer (default: ON) - code review of coder output
|
|
81
|
-
- test_engineer (default: ON) - test verification of coder output
|
|
82
|
-
- sme_enabled (default: ON) - SME consultation during planning/clarification
|
|
83
|
-
- critic_pre_plan (default: ON) - critic review before plan finalization
|
|
84
|
-
- sast_enabled (default: ON) - static security scanning
|
|
85
|
-
- council_mode (default: OFF) - replaces per-task Stage B (reviewer + test_engineer) with the full 5-member council (critic, reviewer, sme, test_engineer, explorer). Requires council.enabled: true in config.
|
|
86
|
-
- hallucination_guard (default: OFF) - when enabled, mandatory per-phase API/signature/claim/citation verification at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm/evidence/{phase}/hallucination-guard.json exists with an APPROVED verdict.
|
|
87
|
-
- mutation_test (default: OFF) - when enabled, runs mutation testing on source files touched this phase via generate_mutants + mutation_test + write_mutation_evidence at PHASE-WRAP; FAIL verdict blocks phase_complete; WARN is non-blocking.
|
|
88
|
-
- phase_council (default: OFF) - full 5-member council reviews all work in a phase holistically at phase_complete time. Requires council.enabled: true in config.
|
|
89
|
-
- drift_check (default: ON) - mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists.
|
|
90
|
-
- 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`.
|
|
91
|
-
|
|
92
|
-
Additionally, present these three sub-items as part of the same exchange:
|
|
93
|
-
- 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. 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.
|
|
94
|
-
> COMMON MISCONCEPTION: worktree isolation is baseline for standard parallel coders, governed by the parallel execution profile plus top-level `worktree.policy`. It is not provided by Lean Turbo or Epic. Do not recommend Lean Turbo or Epic to obtain worktree isolation; recommend them only for what they add beyond baseline (Lean Turbo: lane planning, file locks, phase reviewer, integrated diff; Epic: co-change awareness and auto-decide). Worktrees also do not make overlapping scopes safe: dependency readiness, file-disjoint scopes, and merge-back ownership are still required.
|
|
95
|
-
- Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
|
|
96
|
-
- 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.
|
|
97
|
-
|
|
98
|
-
<!-- END QA_GATE_BODY -->
|
|
99
|
-
|
|
100
|
-
The user answers all four items (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.
|
|
101
|
-
|
|
102
|
-
If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
|
|
103
|
-
```
|
|
104
|
-
## Pending Parallelization Config
|
|
105
|
-
- parallelization_enabled: true
|
|
106
|
-
- max_concurrent_tasks: <user's number>
|
|
107
|
-
- council_parallel: false
|
|
108
|
-
- locked: true
|
|
109
|
-
- recorded_at: <ISO timestamp>
|
|
110
|
-
```
|
|
111
|
-
If the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.
|
|
112
|
-
|
|
113
|
-
If the user chooses per-task commits, write this section to `.swarm/context.md`:
|
|
114
|
-
```
|
|
115
|
-
## Task Completion Commit Policy
|
|
116
|
-
- commit_after_each_completed_task: true
|
|
117
|
-
- recorded_at: <ISO timestamp>
|
|
118
|
-
```
|
|
119
|
-
If the user keeps the default phase-level behavior, do not write this section.
|
|
120
|
-
|
|
121
|
-
<!-- BEHAVIORAL_GUIDANCE_START -->
|
|
122
|
-
GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
|
|
123
|
-
✗ "I'll use the defaults — they're probably fine"
|
|
124
|
-
→ WRONG: defaults are not the user's decision. The user must be asked every time.
|
|
125
|
-
✗ "The user didn't mention gates, so defaults are fine"
|
|
126
|
-
→ WRONG: silence is not consent. The gate dialogue is not optional.
|
|
127
|
-
✗ "I'll handle it in MODE: PLAN after the spec is done"
|
|
128
|
-
→ WRONG: ## Pending QA Gate Selection must exist in context.md BEFORE save_plan is called.
|
|
129
|
-
save_plan will reject with QA_GATE_SELECTION_REQUIRED if this section is absent.
|
|
130
|
-
✗ "This feature is simple — gates are obvious"
|
|
131
|
-
→ WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.
|
|
132
|
-
✗ "I already know which gates are right for this project"
|
|
133
|
-
→ WRONG: the architect does not configure gates. The user configures gates. Always ask.
|
|
134
|
-
|
|
135
|
-
MANDATORY PAUSE: Do NOT write the spec summary (Phase 7 transition). Do NOT suggest next steps.
|
|
136
|
-
Exception: MODE: LOOP with `autonomy=auto` uses the balanced-speed defaults
|
|
137
|
-
above and does not pause for this preference exchange.
|
|
138
|
-
You are BLOCKED until ALL THREE of these conditions are met:
|
|
139
|
-
(1) The unified gate/coders/commit/auto_proceed selection section has been presented to the user in a single message
|
|
140
|
-
(2) The user has responded (accept defaults OR customized list for all four items)
|
|
141
|
-
(3) The elected gates, parallel coder config, commit policy, and auto_proceed selection have been written to .swarm/context.md under "## Pending QA Gate Selection" (and related sections as applicable)
|
|
142
|
-
<!-- BEHAVIORAL_GUIDANCE_END -->
|
|
143
|
-
|
|
144
|
-
Do NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Once the user answers, write the elected gates to `.swarm/context.md` under a new section:
|
|
145
|
-
```
|
|
146
|
-
## Pending QA Gate Selection
|
|
147
|
-
- reviewer: <true|false>
|
|
148
|
-
- test_engineer: <true|false>
|
|
149
|
-
- sme_enabled: <true|false>
|
|
150
|
-
- critic_pre_plan: <true|false>
|
|
151
|
-
- sast_enabled: <true|false>
|
|
152
|
-
- council_mode: <true|false>
|
|
153
|
-
- hallucination_guard: <true|false>
|
|
154
|
-
- mutation_test: <true|false>
|
|
155
|
-
- phase_council: <true|false>
|
|
156
|
-
- drift_check: <true|false>
|
|
157
|
-
- final_council: <true|false>
|
|
158
|
-
- auto_proceed: <true|false>
|
|
159
|
-
- recorded_at: <ISO timestamp>
|
|
160
|
-
```
|
|
161
|
-
MODE: PLAN applies these after `save_plan` succeeds via `set_qa_gates`.
|
|
162
|
-
- Exit with the elected gates recorded in `.swarm/context.md` (NOT yet persisted to plan.json).
|
|
66
|
+
**Phase 6: DEFER QA AND EXECUTION PROFILE SELECTION.**
|
|
67
|
+
- BRAINSTORM does not collect, infer, or stage QA gates, parallel coder count, commit frequency, or `auto_proceed`.
|
|
68
|
+
- MODE: PLAN owns the unified four-choice dialogue after it has drafted task scopes and frozen the exact plan identity (`swarm_id` plus title). MODE: LOOP with `autonomy=auto` also applies its balanced-speed defaults there without pausing.
|
|
69
|
+
- Do not write execution choices to `.swarm/context.md`.
|
|
163
70
|
|
|
164
71
|
**Phase 7: TRANSITION.**
|
|
165
|
-
- Summarize: (a) chosen approach, (b) design sections produced, (c) spec written, (d)
|
|
166
|
-
- Offer the user two next steps: `PLAN` (go to MODE: PLAN and write plan.md) or `CLARIFY-SPEC` (resolve remaining markers first).
|
|
72
|
+
- Summarize: (a) chosen approach, (b) design sections produced, (c) spec written, and (d) remaining `[NEEDS CLARIFICATION]` markers.
|
|
73
|
+
- Offer the user two next steps: `PLAN` (go to MODE: PLAN and persist the plan via the authoritative ledger-backed `save_plan` tool; never write `.swarm/plan.md` directly) or `CLARIFY-SPEC` (resolve remaining markers first).
|
|
167
74
|
- Do NOT proceed to PLAN or CLARIFY-SPEC automatically — wait for user direction.
|
|
168
75
|
|
|
169
76
|
BRAINSTORM RULES:
|
|
170
77
|
- No skipping phases. Each phase's exit condition must be met before moving on.
|
|
171
|
-
- One question per message in DIALOGUE — never batch.
|
|
78
|
+
- One question per message in DIALOGUE — never batch. MODE: PLAN owns the later unified QA and execution-profile exchange.
|
|
172
79
|
- Always offer an informed default for every question.
|
|
173
80
|
- The spec produced in Phase 5 must still satisfy the SPEC CONTENT RULES (no tech stack, no implementation details).
|
|
174
|
-
- QA gates
|
|
81
|
+
- QA gates are first selected and persisted during MODE: PLAN against the exact plan identity; they are ratchet-tighter from that point.
|
|
@@ -137,13 +137,13 @@ Treating pre_check_batch as a substitute for the active swarm's reviewer agent i
|
|
|
137
137
|
5l-bis. REGRESSION SWEEP (automatic after test_engineer-verification PASS):
|
|
138
138
|
Iterate the changed source files preemptively and run one `test_runner` call per changed source file with { scope: "graph", files: [<one changed source file>] }.
|
|
139
139
|
scope:"graph" traces imports to discover test files beyond the task's own tests that may be affected by each source change. Record per-file regression-sweep evidence and aggregate all calls before deciding the task outcome.
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
Outcomes (based on test_runner result.outcome field):
|
|
142
142
|
- any outcome: "regression" → Print "regression-sweep: FAIL — REGRESSION DETECTED in [source → failing tests]. The failing tests are CORRECT — fix the source code, not the tests." Return to coder with retry from 5g.
|
|
143
143
|
- all executed calls pass → Print "regression-sweep: PASS [N per-file sweeps, M tests]".
|
|
144
144
|
- outcome: "skip" → Record "[source]: SKIPPED — [actual tool reason]". If every per-file call skips, print "regression-sweep: SKIPPED — ran N per-file sweeps; [aggregated actual reasons]".
|
|
145
145
|
- outcome: "scope_exceeded" or "error" → Record the affected source and exact tool reason. Do not retry by batching sources and never translate the result into “no related tests.” Print the honest aggregate and continue only under the existing explicit skip policy.
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
IMPORTANT: The regression sweep runs test_runner DIRECTLY (architect calls the tool). Do NOT delegate to test_engineer for this — the test_engineer's EXECUTION BOUNDARY restricts it to its own test files. The architect has unrestricted test_runner access.
|
|
148
148
|
→ REQUIRED: Print "regression-sweep: [PASS — N per-file sweeps | FAIL — REGRESSION DETECTED | SKIPPED — N per-file sweeps with exact reasons]"
|
|
149
149
|
|
|
@@ -154,7 +154,7 @@ Treating pre_check_batch as a substitute for the active swarm's reviewer agent i
|
|
|
154
154
|
- Public contracts or schemas changed (API types, tool argument schemas, return types)
|
|
155
155
|
- Assertion-heavy areas where output strings are tested (command/help output tests, error message tests)
|
|
156
156
|
- Helper behavior or lifecycle semantics changed (state machines, lifecycle hooks, initialization)
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
If NOT triggered: Print "test-drift: NOT TRIGGERED — no drift-prone change detected"
|
|
159
159
|
If TRIGGERED:
|
|
160
160
|
- Use grep/search to find test files that cover the affected functionality
|
|
@@ -213,12 +213,13 @@ This step supplements (not replaces) the existing regression-sweep and test-drif
|
|
|
213
213
|
Filling this checklist from memory ("I think I ran it") is INVALID. Each value must come from actual tool/agent output in this session.
|
|
214
214
|
|
|
215
215
|
5p. Call update_task_status with status "completed".
|
|
216
|
-
5q. OPTIONAL TASK-COMPLETION COMMIT
|
|
217
|
-
- If
|
|
218
|
-
`checkpoint
|
|
219
|
-
- If the
|
|
220
|
-
- This optional
|
|
221
|
-
-
|
|
216
|
+
5q. OPTIONAL TASK-COMPLETION CHECKPOINT: after `update_task_status(status="completed")` succeeds and every PRE-COMMIT RULE gate above has passed, read `plan.execution_profile.commit_after_each_completed_task` from the current durable plan.
|
|
217
|
+
- If the persisted value is `true`, immediately call:
|
|
218
|
+
`checkpoint({ action: "save_task_completion", task_id: "<task-id>" })`
|
|
219
|
+
- If the field is absent or false, skip this step. Never infer the policy from chat or context.
|
|
220
|
+
- This optional checkpoint NEVER bypasses PRE-COMMIT RULE checks above.
|
|
221
|
+
- A successful result with `idempotent: true` is idempotent success: the task was already checkpointed by a prior completion or retry, so continue without another commit.
|
|
222
|
+
- Any other checkpoint failure is advisory: report the exact error and continue to the next task. Do not revert the completed status and do not retry in a loop.
|
|
222
223
|
5r. Proceed to next task.
|
|
223
224
|
|
|
224
225
|
## Dispatch-lanes empty-output fallback
|
|
@@ -57,7 +57,7 @@ Flags parsed from signal:
|
|
|
57
57
|
4. If the issue is a bug: spec must describe the correct behavior, not the broken behavior.
|
|
58
58
|
5. If the issue is a feature: spec must describe the user-facing outcome, not the implementation.
|
|
59
59
|
6. Carry forward any `[NEEDS REPRO]` / `[NEEDS CLARIFICATION]` flags from Phase 1 into the spec as open questions; do not silently drop them.
|
|
60
|
-
7. QA
|
|
60
|
+
7. QA AND EXECUTION PROFILE SELECTION: Defer all four choices (QA gates, parallel coder count, commit frequency, and `auto_proceed`) to MODE: PLAN. PLAN first drafts task scopes and freezes the exact plan identity, then persists the choices before the first plan save. Do not stage execution choices in `.swarm/context.md`.
|
|
61
61
|
|
|
62
62
|
#### Phase 4: TRANSITION
|
|
63
63
|
Based on flags:
|
|
@@ -62,8 +62,8 @@ Before drafting or saving the plan, the architect MUST offer General Council adv
|
|
|
62
62
|
1. Run the General Council Research Phase: formulate 1-3 targeted `web_search` queries grounded in the work being planned.
|
|
63
63
|
2. Dispatch `the active swarm's council_generalist agent`, `the active swarm's council_skeptic agent`, and `the active swarm's council_domain_expert agent` in PARALLEL with the RESEARCH CONTEXT.
|
|
64
64
|
3. Collect responses and call `convene_general_council` with mode `general`.
|
|
65
|
-
4.
|
|
66
|
-
5. Use that
|
|
65
|
+
4. Carry the council consensus, disagreements, cited sources, and any plan-impacting assumptions into the relevant plan task descriptions or acceptance criteria supplied to `save_plan`.
|
|
66
|
+
5. Use that council input as planning context before calling `save_plan`.
|
|
67
67
|
- If General Council is unavailable and the user explicitly requested council input, surface the config/key requirement and stop before `save_plan` rather than writing an ungrounded plan.
|
|
68
68
|
|
|
69
69
|
General Council is advisory and distinct from `council_mode`, `phase_council`, and `final_council`. It is not a QA gate. Its purpose here is to make current external context available before the architect writes any plan and before any critic pre-plan review.
|
|
@@ -161,7 +161,7 @@ The critic may improve wording or confirm prior context, but these categories MU
|
|
|
161
161
|
|
|
162
162
|
#### Assumptions Recording
|
|
163
163
|
|
|
164
|
-
All items resolved in Stages 2-3 (self_resolved, critic_resolved, deferred_nonblocking) MUST be recorded as explicit assumptions in
|
|
164
|
+
All items resolved in Stages 2-3 (self_resolved, critic_resolved, deferred_nonblocking) MUST be recorded as explicit assumptions in the relevant plan task descriptions or acceptance criteria passed to `save_plan`. Silently dropping resolved uncertainties is a protocol violation — every uncertainty that entered the funnel must have a recorded outcome.
|
|
165
165
|
|
|
166
166
|
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.
|
|
167
167
|
|
|
@@ -171,64 +171,20 @@ The plan generated by `save_plan` MUST include explicit assumptions and remainin
|
|
|
171
171
|
|
|
172
172
|
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. This is tracked as future work in a follow-up issue; until then, enforcement relies on the skill instructions.
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
Draft the complete implementation plan in memory first. Required parameters:
|
|
175
175
|
- `title`: The real project name from the spec (NOT a placeholder like [Project])
|
|
176
176
|
- `swarm_id`: The swarm identifier (e.g. "mega", "local", "paid")
|
|
177
177
|
- `phases`: Array of phases, each with `id` (number), `name` (string), and `tasks` (array)
|
|
178
178
|
- Each task needs: `id` (e.g. "1.1"), `description` (real content from spec — bracket placeholders like [task] will be REJECTED)
|
|
179
179
|
- Optional task fields: `size` (small/medium/large), `depends` (array of task IDs), `acceptance` (string)
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
save_plan({ title: "My Real Project", swarm_id: "mega", phases: [{ id: 1, name: "Setup", tasks: [{ id: "1.1", description: "Install dependencies and configure TypeScript", size: "small" }] }] })
|
|
181
|
+
**QA AND EXECUTION PROFILE BOOTSTRAP (before first `save_plan`).**
|
|
183
182
|
|
|
184
|
-
|
|
183
|
+
1. Finish drafting the title, swarm identifier, phases, tasks, dependencies, and `files_touched` scopes. Freeze the exact raw plan identity as `swarm_id` plus `plan_title` (the same title passed to `save_plan`). Do not normalize, shorten, or rename either value between profile creation and plan save. An intentional identity replacement must use `confirm_identity_change: true`; never silently create a second profile because wording changed.
|
|
184
|
+
2. Inspect dependency-ready tasks and their file scopes before recommending parallelism. File-disjoint task groups may run concurrently in isolated worktrees; overlapping or unknown scopes require serial execution.
|
|
185
|
+
3. Present the following unified four-choice dialogue in one message and wait for one complete answer. Silence is not consent.
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
Fields:
|
|
189
|
-
- `parallelization_enabled` (boolean, default false): When true, tasks may run in parallel.
|
|
190
|
-
- `max_concurrent_tasks` (integer 1–64, default 10): Maximum simultaneous tasks when parallel is enabled.
|
|
191
|
-
- `council_parallel` (boolean, default true): When true, council review phases may parallelise.
|
|
192
|
-
- `locked` (boolean, default false): When true, the profile is immutable — future save_plan calls that include execution_profile will be REJECTED (fail-closed).
|
|
193
|
-
|
|
194
|
-
WHEN TO SET IT:
|
|
195
|
-
1. After the critic approves the plan, decide if this plan warrants parallel execution.
|
|
196
|
-
2. Call save_plan with execution_profile to record the decision.
|
|
197
|
-
3. Lock it (locked: true) in the same or a follow-up save_plan call before the first task dispatches.
|
|
198
|
-
4. Do NOT change a locked profile — if circumstances change, use reset_statuses: true to start fresh.
|
|
199
|
-
|
|
200
|
-
LOCK DISCIPLINE:
|
|
201
|
-
- A locked profile signals that concurrency constraints are authoritative for this plan.
|
|
202
|
-
- The delegation gate enforces the locked profile — it cannot be bypassed.
|
|
203
|
-
- If you do NOT set an execution_profile, serial (sequential) execution applies (safe default).
|
|
204
|
-
- If the plan has a locked profile with parallelization_enabled: false, Stage B parallel dispatch is blocked even if the global config enables it.
|
|
205
|
-
|
|
206
|
-
WRONG: Setting execution_profile after tasks have started (profile would not apply retroactively).
|
|
207
|
-
WRONG: Setting locked: true and then trying to change it — save_plan will reject the update.
|
|
208
|
-
WRONG: Assuming the global plugin config overrides a locked profile — it does not.
|
|
209
|
-
|
|
210
|
-
Example (set and lock in one call):
|
|
211
|
-
save_plan({
|
|
212
|
-
title: "My Project",
|
|
213
|
-
swarm_id: "mega",
|
|
214
|
-
phases: [...],
|
|
215
|
-
execution_profile: { parallelization_enabled: true, max_concurrent_tasks: 3, council_parallel: false, locked: true }
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
**POST-SAVE_PLAN: APPLY QA GATE SELECTION.**
|
|
219
|
-
Auto-loop exception: when this PLAN step is running inside MODE: LOOP with
|
|
220
|
-
`autonomy=auto`, do not ask the gate/parallelism/commit-frequency question. Use
|
|
221
|
-
the balanced-speed defaults from the loop skill, call `set_qa_gates` with those
|
|
222
|
-
values after `save_plan`, keep phase-level commits, and set a locked
|
|
223
|
-
`execution_profile` automatically when the plan has dependency-ready,
|
|
224
|
-
file-disjoint tasks. Choose the largest safe count, clamped to the configured
|
|
225
|
-
limit (currently 6); use serial execution when scopes overlap or are unknown.
|
|
226
|
-
After `save_plan` succeeds, read `.swarm/context.md`:
|
|
227
|
-
- If a `## Pending QA Gate Selection` section exists: parse the gate values (including `auto_proceed` if present), call `set_qa_gates` with those flags, confirm with the user ("QA gates applied: <list>"), then remove the section from context.md. `auto_proceed` is parsed from the dialogue and persisted in `execution_profile` on re-save.
|
|
228
|
-
- 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.
|
|
229
|
-
- If a `## Task Completion Commit Policy` section exists: preserve it in `.swarm/context.md` (do NOT remove). This section is execution-time guidance for optional per-task checkpoint commits after `update_task_status(status="completed")`.
|
|
230
|
-
- If no pending section exists, ask the user inline now. 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:
|
|
231
|
-
<!-- BEGIN QA_GATE_BODY -->
|
|
187
|
+
<!-- BEGIN QA_GATE_BODY -->
|
|
232
188
|
|
|
233
189
|
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:
|
|
234
190
|
- reviewer (default: ON) - code review of coder output
|
|
@@ -244,52 +200,39 @@ Present the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder
|
|
|
244
200
|
- 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`.
|
|
245
201
|
|
|
246
202
|
Additionally, present these three sub-items as part of the same exchange:
|
|
247
|
-
- 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.
|
|
203
|
+
- 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 drafted plan and recommend the number of dependency-ready, file-disjoint task groups, clamped to 1-6; recommend 1 when scopes overlap or are unknown.
|
|
248
204
|
> COMMON MISCONCEPTION: worktree isolation is baseline for standard parallel coders, governed by the parallel execution profile plus top-level `worktree.policy`. It is not provided by Lean Turbo or Epic. Do not recommend Lean Turbo or Epic to obtain worktree isolation; recommend them only for what they add beyond baseline (Lean Turbo: lane planning, file locks, phase reviewer, integrated diff; Epic: co-change awareness and auto-decide). Worktrees also do not make overlapping scopes safe: dependency readiness, file-disjoint scopes, and merge-back ownership are still required.
|
|
249
205
|
- Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
|
|
250
206
|
- 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.
|
|
251
207
|
|
|
252
208
|
<!-- END QA_GATE_BODY -->
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
MANDATORY PAUSE: Present the gate question. Wait for the user's answer.
|
|
281
|
-
Do NOT call `set_qa_gates` until the user has responded.
|
|
282
|
-
<!-- BEHAVIORAL_GUIDANCE_END -->
|
|
283
|
-
Then call `set_qa_gates` with the user's chosen flags.
|
|
284
|
-
Either path must yield a persisted QA gate profile before the first task dispatches.
|
|
285
|
-
|
|
286
|
-
⚠️ If `save_plan` is unavailable, delegate plan writing to the active swarm's coder agent:
|
|
287
|
-
⚠️ Even in this fallback, you MUST call `declare_scope` for ".swarm/plan.md" BEFORE the coder delegation. Scope discipline applies to plan-writing delegations too. See Rule 1a.
|
|
288
|
-
TASK: Write the implementation plan to .swarm/plan.md
|
|
289
|
-
OUTPUT: .swarm/plan.md
|
|
290
|
-
INPUT: [provide the complete plan content below]
|
|
291
|
-
CONSTRAINT: Write EXACTLY the content provided. Do not modify, summarize, or interpret.
|
|
292
|
-
ACCEPTANCE: DONE = .swarm/plan.md contains the verbatim plan content provided in INPUT, byte-for-byte, with no modification, summarization, or interpretation. (This fallback has no fr_refs — per ACCEPTANCE FIELD RESOLUTION in your system prompt, use this one-line task-derived DONE restatement. A missing or empty ACCEPTANCE line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED before the coder runs.)
|
|
209
|
+
|
|
210
|
+
4. MODE: LOOP exception: when `autonomy=auto`, do not pause. Use the loop skill's balanced-speed defaults: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, and drift_check ON; council_mode, hallucination_guard, mutation_test, phase_council, and final_council OFF. Choose the largest safe parallel count from the drafted scopes (1 when overlap or uncertainty exists), keep phase-level commits (`commit_after_each_completed_task: false`), and set `auto_proceed: true`.
|
|
211
|
+
5. Before the first `save_plan`, persist all eleven gate booleans with `set_qa_gates({ swarm_id: <exact swarm_id>, plan_title: <exact title>, ...gates })`. If it fails, stop and resolve the profile error; do not save a plan without the matching profile.
|
|
212
|
+
Recovery for upgraded legacy plans: if `get_qa_gate_profile`, `save_plan`, or an execution gate reports that the QA profile is not exact-bound, run `set_qa_gates({ swarm_id: <exact swarm_id>, plan_title: <exact title>, adopt_legacy_binding_only: true })`. This exact-binds the existing profile without changing gates or its lock, then you retry the blocked read/save/enforcement step.
|
|
213
|
+
6. Immediately call `save_plan` with the same exact identity, the full drafted phases, and the complete locked profile:
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
save_plan({
|
|
217
|
+
title: <exact plan_title>,
|
|
218
|
+
swarm_id: <exact swarm_id>,
|
|
219
|
+
phases: [...],
|
|
220
|
+
execution_profile: {
|
|
221
|
+
parallelization_enabled: <parallel coders > 1>,
|
|
222
|
+
max_concurrent_tasks: <selected count>,
|
|
223
|
+
council_parallel: false,
|
|
224
|
+
locked: true,
|
|
225
|
+
auto_proceed: <selected boolean>,
|
|
226
|
+
commit_after_each_completed_task: <selected boolean>
|
|
227
|
+
}
|
|
228
|
+
})
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
7. Read the persisted profile with `get_qa_gate_profile({ swarm_id: <exact swarm_id>, plan_title: <exact plan_title> })`. Use its persisted `critic_pre_plan` value for the critic decision; do not rely on a default, conversation memory, or transient context. Any retry must reuse the frozen identity and the full execution profile.
|
|
232
|
+
|
|
233
|
+
The locked execution profile is plan-scoped and authoritative. Do not change it after tasks start. A global concurrency setting cannot override it.
|
|
234
|
+
|
|
235
|
+
If the authoritative ledger-backed `save_plan` tool is unavailable, STOP and report the blocker. Never ask a coder to hand-write `.swarm/plan.md` or any other derived plan projection.
|
|
293
236
|
|
|
294
237
|
TASK GRANULARITY RULES:
|
|
295
238
|
- SMALL task: 1 file, 1 logical concern. Delegate as-is.
|
|
@@ -324,7 +267,7 @@ PHASE COUNT GUIDANCE:
|
|
|
324
267
|
- Rationale: Retrospectives at phase boundaries capture lessons that improve subsequent
|
|
325
268
|
phases. A single-phase plan gets zero iterative learning benefit.
|
|
326
269
|
|
|
327
|
-
|
|
270
|
+
Do not create or hand-edit `.swarm/context.md` as part of PLAN. Durable plan and execution policy must flow through the authoritative tools above.
|
|
328
271
|
|
|
329
272
|
TRACEABILITY CHECK (run after plan is written, when an effective spec exists):
|
|
330
273
|
|
|
@@ -349,9 +292,9 @@ REPORT FORMAT:
|
|
|
349
292
|
|
|
350
293
|
### Transition to CRITIC-GATE
|
|
351
294
|
|
|
352
|
-
After the QA gate selection
|
|
295
|
+
After the QA gate selection and execution profile are persisted and the TRACEABILITY CHECK is complete:
|
|
353
296
|
|
|
354
|
-
1. If `
|
|
297
|
+
1. If the persisted QA profile returned by `get_qa_gate_profile` has `critic_pre_plan: true`, the plan MUST be reviewed by the critic before any implementation begins. If false, skip only this critic gate.
|
|
355
298
|
2. Transition to **MODE: CRITIC-GATE** by delegating the full plan to the active swarm's critic agent:
|
|
356
299
|
- The critic receives: the plan, the spec (if one exists), and codebase context
|
|
357
300
|
- The critic returns: APPROVED / NEEDS_REVISION / REJECTED
|
|
@@ -50,98 +50,12 @@ Activates when: user asks to "specify", "define requirements", "write a spec", o
|
|
|
50
50
|
- `[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
|
|
51
51
|
- **Important:** If research is ongoing, apply a fixed 5-minute protocol budget to `research_needed`. If research does not complete before the budget 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.
|
|
52
52
|
5. Write the spec to `.swarm/spec.md`.
|
|
53
|
-
5b. **QA
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<!-- BEGIN QA_GATE_BODY -->
|
|
57
|
-
|
|
58
|
-
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:
|
|
59
|
-
- reviewer (default: ON) - code review of coder output
|
|
60
|
-
- test_engineer (default: ON) - test verification of coder output
|
|
61
|
-
- sme_enabled (default: ON) - SME consultation during planning/clarification
|
|
62
|
-
- critic_pre_plan (default: ON) - critic review before plan finalization
|
|
63
|
-
- sast_enabled (default: ON) - static security scanning
|
|
64
|
-
- council_mode (default: OFF) - replaces per-task Stage B (reviewer + test_engineer) with the full 5-member council (critic, reviewer, sme, test_engineer, explorer). Requires council.enabled: true in config.
|
|
65
|
-
- hallucination_guard (default: OFF) - when enabled, mandatory per-phase API/signature/claim/citation verification at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm/evidence/{phase}/hallucination-guard.json exists with an APPROVED verdict.
|
|
66
|
-
- mutation_test (default: OFF) - when enabled, runs mutation testing on source files touched this phase via generate_mutants + mutation_test + write_mutation_evidence at PHASE-WRAP; FAIL verdict blocks phase_complete; WARN is non-blocking.
|
|
67
|
-
- phase_council (default: OFF) - full 5-member council reviews all work in a phase holistically at phase_complete time. Requires council.enabled: true in config.
|
|
68
|
-
- drift_check (default: ON) - mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists.
|
|
69
|
-
- 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`.
|
|
70
|
-
|
|
71
|
-
Additionally, present these three sub-items as part of the same exchange:
|
|
72
|
-
- 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. 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.
|
|
73
|
-
> COMMON MISCONCEPTION: worktree isolation is baseline for standard parallel coders, governed by the parallel execution profile plus top-level `worktree.policy`. It is not provided by Lean Turbo or Epic. Do not recommend Lean Turbo or Epic to obtain worktree isolation; recommend them only for what they add beyond baseline (Lean Turbo: lane planning, file locks, phase reviewer, integrated diff; Epic: co-change awareness and auto-decide). Worktrees also do not make overlapping scopes safe: dependency readiness, file-disjoint scopes, and merge-back ownership are still required.
|
|
74
|
-
- Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
|
|
75
|
-
- 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.
|
|
76
|
-
|
|
77
|
-
<!-- END QA_GATE_BODY -->
|
|
78
|
-
|
|
79
|
-
The user answers all four (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.
|
|
80
|
-
|
|
81
|
-
If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
|
|
82
|
-
```
|
|
83
|
-
## Pending Parallelization Config
|
|
84
|
-
- parallelization_enabled: true
|
|
85
|
-
- max_concurrent_tasks: <user's number>
|
|
86
|
-
- council_parallel: false
|
|
87
|
-
- locked: true
|
|
88
|
-
- recorded_at: <ISO timestamp>
|
|
89
|
-
```
|
|
90
|
-
If the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.
|
|
91
|
-
|
|
92
|
-
If the user chooses per-task commits, write this section to `.swarm/context.md`:
|
|
93
|
-
```
|
|
94
|
-
## Task Completion Commit Policy
|
|
95
|
-
- commit_after_each_completed_task: true
|
|
96
|
-
- recorded_at: <ISO timestamp>
|
|
97
|
-
```
|
|
98
|
-
If the user keeps the default phase-level behavior, do not write this section.
|
|
99
|
-
|
|
100
|
-
<!-- BEHAVIORAL_GUIDANCE_START -->
|
|
101
|
-
GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
|
|
102
|
-
✗ "I'll use the defaults — they're probably fine"
|
|
103
|
-
→ WRONG: defaults are not the user's decision. The user must be asked every time.
|
|
104
|
-
✗ "The user didn't mention gates, so defaults are fine"
|
|
105
|
-
→ WRONG: silence is not consent. The gate dialogue is not optional.
|
|
106
|
-
✗ "I'll handle it in MODE: PLAN after the spec is done"
|
|
107
|
-
→ WRONG: ## Pending QA Gate Selection must exist in context.md BEFORE save_plan is called.
|
|
108
|
-
save_plan will reject with QA_GATE_SELECTION_REQUIRED if this section is absent.
|
|
109
|
-
✗ "This feature is simple — gates are obvious"
|
|
110
|
-
→ WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.
|
|
111
|
-
✗ "I already know which gates are right for this project"
|
|
112
|
-
→ WRONG: the architect does not configure gates. The user configures gates. Always ask.
|
|
113
|
-
|
|
114
|
-
MANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.
|
|
115
|
-
Exception: MODE: LOOP with `autonomy=auto` uses the balanced-speed defaults
|
|
116
|
-
above and does not pause for this preference exchange.
|
|
117
|
-
You are BLOCKED until ALL THREE of these conditions are met:
|
|
118
|
-
(1) The unified gate/coders/commit/auto_proceed selection section has been presented to the user in a single message
|
|
119
|
-
(2) The user has responded (accept defaults OR customized list for all four items)
|
|
120
|
-
(3) The elected gates, parallel coder config, commit policy, and auto_proceed selection have been written to .swarm/context.md under "## Pending QA Gate Selection" (and related sections as applicable)
|
|
121
|
-
<!-- BEHAVIORAL_GUIDANCE_END -->
|
|
122
|
-
|
|
123
|
-
Do NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Once the user answers, write the elected gates to `.swarm/context.md` under a new section:
|
|
124
|
-
```
|
|
125
|
-
## Pending QA Gate Selection
|
|
126
|
-
- reviewer: <true|false>
|
|
127
|
-
- test_engineer: <true|false>
|
|
128
|
-
- sme_enabled: <true|false>
|
|
129
|
-
- critic_pre_plan: <true|false>
|
|
130
|
-
- sast_enabled: <true|false>
|
|
131
|
-
- council_mode: <true|false>
|
|
132
|
-
- hallucination_guard: <true|false>
|
|
133
|
-
- mutation_test: <true|false>
|
|
134
|
-
- phase_council: <true|false>
|
|
135
|
-
- drift_check: <true|false>
|
|
136
|
-
- final_council: <true|false>
|
|
137
|
-
- auto_proceed: <true|false>
|
|
138
|
-
- recorded_at: <ISO timestamp>
|
|
139
|
-
```
|
|
140
|
-
MODE: PLAN will read this section after `save_plan` succeeds and persist via `set_qa_gates`.
|
|
53
|
+
5b. **DEFER QA AND EXECUTION PROFILE SELECTION.**
|
|
54
|
+
SPECIFY does not collect, infer, or stage QA gates, parallel coder count, commit frequency, or `auto_proceed`. Those choices depend on the drafted task graph and its exact plan identity. MODE: PLAN freezes the exact `swarm_id` and plan title, presents the unified four-choice dialogue, persists the gate profile, and saves the execution profile. Do not write execution choices to `.swarm/context.md`.
|
|
141
55
|
|
|
142
56
|
General Council advisory input is offered as an early workflow option in MODE: BRAINSTORM (Phase 1b) and MODE: PLAN before `save_plan`, not as a SPECIFY step. If the user wants council input during SPECIFY, they can use `/swarm council <question>` manually.
|
|
143
57
|
|
|
144
|
-
7. Report a summary to the user (MUST count, SHALL count, scenario count, clarification markers
|
|
58
|
+
7. Report a summary to the user (MUST count, SHALL count, scenario count, clarification markers) and suggest the next step: `CLARIFY-SPEC` (if markers exist) or `PLAN`.
|
|
145
59
|
|
|
146
60
|
SPEC CONTENT RULES — the spec MUST NOT contain:
|
|
147
61
|
- Technology stack, framework choices, library names
|
|
@@ -68,9 +68,8 @@ export declare function buildCouncilWorkflow(council?: CouncilWorkflowConfig): s
|
|
|
68
68
|
* - tests/unit/agents/architect-hallucination-gate.test.ts:3
|
|
69
69
|
* - tests/unit/skills/plan-protocol.test.ts:8
|
|
70
70
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* this helper may be deleted.
|
|
71
|
+
* `references/qa-gate-gates-body.md` is the canonical runtime skill body. This
|
|
72
|
+
* helper remains as a compatibility oracle for direct prompt-contract tests.
|
|
74
73
|
*/
|
|
75
74
|
export declare function buildQaGateSelectionDialogue(modeLabel: 'BRAINSTORM' | 'SPECIFY' | 'PLAN'): string;
|
|
76
75
|
export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: AdversarialTestingConfig, council?: CouncilWorkflowConfig, uiReview?: UIReviewConfig, memoryEnabled?: boolean, architecturalSupervision?: ArchitectureSupervisionWorkflowConfig, designDocsEnabled?: boolean, externalSkillsEnabled?: boolean, turboEnabled?: boolean, skillsEnabled?: boolean): AgentDefinition;
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-7qx874pn.js";
|
|
16
16
|
import"./index-ee3x66a5.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-n3ppm2gt.js";
|
|
19
|
+
import"./index-r4t92q32.js";
|
|
20
20
|
import"./index-zjygnfay.js";
|
|
21
21
|
import"./index-bk5tah7q.js";
|
|
22
22
|
import"./index-bpmtbmy9.js";
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
resolveWorktreeBaseDir,
|
|
15
15
|
shortenWorktreePath,
|
|
16
16
|
writeLaneProfileToDiskReal
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-hbnsmnb0.js";
|
|
18
18
|
import"./index-ee3x66a5.js";
|
|
19
19
|
import"./index-4nt52yr9.js";
|
|
20
20
|
import"./index-4rhhvd1a.js";
|
|
21
21
|
import"./index-zgwm4ryv.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-r4t92q32.js";
|
|
23
23
|
import"./index-zjygnfay.js";
|
|
24
24
|
import"./index-a76rekgs.js";
|
|
25
25
|
export {
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-1tw24kcp.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-68gh7p3t.js";
|
|
10
10
|
import"./index-ae75rja9.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-rs1f1bh0.js";
|
|
12
|
+
import"./index-h2waehqq.js";
|
|
13
13
|
import"./index-ed5ykebp.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-hfvxhk4z.js";
|
|
15
15
|
import"./index-7g4c7s5r.js";
|
|
16
16
|
import"./index-4nt52yr9.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-ry0hgg3m.js";
|
|
19
19
|
import"./index-bpmtbmy9.js";
|
|
20
20
|
import"./index-a76rekgs.js";
|
|
21
21
|
export {
|