opencode-swarm 7.60.0 → 7.61.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.
@@ -21,6 +21,17 @@ MODE: BRAINSTORM runs seven phases in strict order. Do not skip phases. Do not c
21
21
  - Run CODEBASE REALITY CHECK on any claims the user made in their topic statement. Surface discrepancies before moving forward.
22
22
  - Exit when you have a confident map of: (a) existing code and patterns, (b) relevant prior decisions, (c) what is actually unknown.
23
23
 
24
+ **Phase 1b: GENERAL COUNCIL ADVISORY (optional, architect).**
25
+ If `council.general.enabled` is true in the resolved opencode-swarm config AND a search API key is configured:
26
+ - Ask the user: "Enable General Council advisory input? The 3-agent council (generalist, skeptic, domain expert) will research the problem domain and provide diverse perspectives to inform the specification and plan. (default: no)"
27
+ - If the user declines or config is not enabled, skip to Phase 2.
28
+ - If the user accepts:
29
+ 1. Run the Research Phase: formulate 1-3 targeted `web_search` queries grounded in the topic.
30
+ 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.
31
+ 3. Collect responses, call `convene_general_council` with mode `general`.
32
+ 4. Carry the council's consensus and disagreements forward as context for subsequent phases.
33
+ - Exit with council input noted (or skipped).
34
+
24
35
  **Phase 2: DIALOGUE (architect ↔ user).**
25
36
  - Ask EXACTLY ONE focused question per message. Wait for the user's answer before asking the next.
26
37
  - Prioritize questions that materially change scope, risk, or architecture. Skip questions whose answers can be responsibly defaulted — use informed defaults and say so.
@@ -48,25 +59,29 @@ MODE: BRAINSTORM runs seven phases in strict order. Do not skip phases. Do not c
48
59
  - Write the final spec to `.swarm/spec.md`.
49
60
  - Exit when reviewer signs off (or user explicitly accepts remaining disagreements).
50
61
 
51
- **Phase 6: QA GATE SELECTION (architect, dialogue only).**
52
- Now ask the user which QA gates to enable for this plan -- do not select on their behalf.
62
+ **Phase 6: QA GATE SELECTION, PARALLEL CODERS, AND COMMIT FREQUENCY (architect, dialogue only).**
63
+ 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.
53
64
 
54
- Present the eleven gates with their defaults (DEFAULT_QA_GATES) as a single user-facing question. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
65
+ 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:
55
66
  - reviewer (default: ON) -- code review of coder output
56
67
  - test_engineer (default: ON) -- test verification of coder output
57
68
  - sme_enabled (default: ON) -- SME consultation during planning/clarification
58
69
  - critic_pre_plan (default: ON) -- critic review before plan finalization
59
70
  - sast_enabled (default: ON) -- static security scanning
60
- - council_mode (default: OFF) -- multi-member council gate (recommended for high-impact architecture, public APIs, schema/data mutation, security-sensitive code)
71
+ - 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. (recommended for high-impact architecture, public APIs, schema/data mutation, security-sensitive code)
61
72
  - hallucination_guard (default: OFF) -- when enabled, mandatory per-phase API/signature/claim/citation verification via critic_hallucination_verifier at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm/evidence/{phase}/hallucination-guard.json exists with an APPROVED verdict (recommended for claim-heavy or research-heavy work)
62
73
  - 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 (recommended for projects with coverage gaps or safety-critical code)
63
- - council_general_review (default: OFF) -- when enabled, MODE: SPECIFY runs convene_general_council on the draft spec before the critic-gate; the architect runs a curated web_search pass, dispatches council_generalist / council_skeptic / council_domain_expert in parallel with a shared RESEARCH CONTEXT block, deliberates on disagreements, and synthesizes the result directly into the spec (recommended for novel architecture, unclear best practices, or high-risk design decisions). Requires council.general.enabled: true and a configured search API key in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.
74
+ - 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. (recommended for multi-task phases with cross-cutting concerns or high-risk integration)
64
75
  - drift_check (default: ON) -- when enabled, mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; compares implemented changes against spec.md intent; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists (recommended for all projects with a specification)
65
- - final_council (default: OFF) - when enabled, after all phases complete the architect dispatches the same five phase-council members (`critic`, `reviewer`, `sme`, `test_engineer`, `explorer`) at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This is not General Council mode and does not require `council.general.enabled`.
76
+ - 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`.
77
+
78
+ Additionally, present these two sub-items as part of the same exchange:
79
+ - Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel.
80
+ - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
66
81
 
67
- One question, one message, defaults pre-stated. Wait for the user's answer.
82
+ The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
68
83
 
69
- If the user answered the gate question, immediately follow up with ONE more question: "How many coders should run in parallel? (default: 1, range: 1-4)" -- if the user says a number > 1, also write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
84
+ If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
70
85
  ```
71
86
  ## Pending Parallelization Config
72
87
  - parallelization_enabled: true
@@ -77,8 +92,6 @@ If the user answered the gate question, immediately follow up with ONE more ques
77
92
  ```
78
93
  If the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.
79
94
 
80
- After asking the parallelization question (regardless of whether the user chose serial or parallel), immediately follow up with ONE more question: "Commit frequency for completed tasks? (default: phase-level only; optional per-task checkpoint commit after each task completion)".
81
-
82
95
  If the user chooses per-task commits, write this section to `.swarm/context.md`:
83
96
  ```
84
97
  ## Task Completion Commit Policy
@@ -100,14 +113,12 @@ GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
100
113
  → WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.
101
114
  ✗ "I already know which gates are right for this project"
102
115
  → WRONG: the architect does not configure gates. The user configures gates. Always ask.
103
- ✗ "council_general_review is off by default, I don't need to mention it"
104
- → WRONG: every gate is presented with its default stated. The user opts in or accepts the default explicitly.
105
116
 
106
117
  MANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.
107
118
  You are BLOCKED until ALL THREE of these conditions are met:
108
- (1) The gate selection question has been presented to the user in a single message
109
- (2) The user has responded (accept defaults OR customized list)
110
- (3) The elected gates have been written to .swarm/context.md under "## Pending QA Gate Selection"
119
+ (1) The unified gate/coders/commit selection section has been presented to the user in a single message
120
+ (2) The user has responded (accept defaults OR customized list for all three items)
121
+ (3) The elected gates, parallel coder config, and commit policy have been written to .swarm/context.md under "## Pending QA Gate Selection" (and related sections as applicable)
111
122
  <!-- BEHAVIORAL_GUIDANCE_END -->
112
123
 
113
124
  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:
@@ -121,7 +132,7 @@ Do NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Onc
121
132
  - council_mode: <true|false>
122
133
  - hallucination_guard: <true|false>
123
134
  - mutation_test: <true|false>
124
- - council_general_review: <true|false>
135
+ - phase_council: <true|false>
125
136
  - drift_check: <true|false>
126
137
  - final_council: <true|false>
127
138
  - recorded_at: <ISO timestamp>
@@ -136,7 +147,7 @@ MODE: PLAN applies these after `save_plan` succeeds via `set_qa_gates`.
136
147
 
137
148
  BRAINSTORM RULES:
138
149
  - No skipping phases. Each phase's exit condition must be met before moving on.
139
- - One question per message in DIALOGUE — never batch.
150
+ - One question per message in DIALOGUE — never batch. Exception: the QA gate selection section (Phase 6) presents gates, parallel coders, and commit frequency together as one unified exchange.
140
151
  - Always offer an informed default for every question.
141
152
  - The spec produced in Phase 5 must still satisfy the SPEC CONTENT RULES (no tech stack, no implementation details).
142
153
  - QA gates elected in Phase 6 are persisted during MODE: PLAN after `save_plan` succeeds and are ratchet-tighter from that point — once persisted you cannot undo them later in the session.
@@ -25,8 +25,9 @@ answer directly.
25
25
 
26
26
  This mode is ADVISORY. It does not block any other workflow and does not modify
27
27
  code, plans, or specs. The output is for the user (general mode) or for the spec
28
- being drafted in MODE: SPECIFY (spec_review mode, gated by
29
- `council_general_review`).
28
+ being drafted (spec_review mode is available via `/swarm council --spec-review`
29
+ for manual spec review). General Council advisory input is offered as an early
30
+ workflow option in MODE: BRAINSTORM (Phase 1b).
30
31
 
31
32
  #### Pre-flight (always run first)
32
33
 
@@ -95,6 +95,18 @@ It does NOT mean "code is reviewed." It does NOT mean "code is tested."
95
95
  After pre_check_batch passes, you MUST STILL delegate to the active swarm's reviewer agent.
96
96
  Treating pre_check_batch as a substitute for the active swarm's reviewer agent is a PROCESS VIOLATION.
97
97
 
98
+ 5j-COUNCIL (when council_mode is ON — replaces steps 5j through 5l):
99
+ When `council_mode` is enabled in the QA gate profile, Stage B (steps 5j-5l: reviewer + test_engineer) is REPLACED by the full 5-member council per task.
100
+
101
+ After Stage A (pre_check_batch) passes:
102
+ 1. Ensure `declare_council_criteria` was called for this task (prerequisite).
103
+ 2. Dispatch all 5 council members (critic, reviewer, sme, test_engineer, explorer) in PARALLEL with task-scoped context.
104
+ 3. Collect all 5 verdict objects. Do NOT fabricate or substitute verdicts.
105
+ 4. Call `submit_council_verdicts` with the collected verdicts.
106
+ 5. Act on the verdict: APPROVE → task passes. CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'` → HIGH/CRITICAL findings are blocking, no evidence written, return to coder with requiredFixes and re-council after fixes. CONCERNS with `success: true` → only MEDIUM/LOW advisory findings, task passes. REJECT → return to coder with requiredFixes.
107
+
108
+ When `council_mode` is OFF, the standard Stage B flow (steps 5j-5l: reviewer + test_engineer) runs as normal.
109
+
98
110
  5j. the active swarm's reviewer agent - General review. REJECTED before the configured QA retry limit → coder retry. REJECTED at the configured QA retry limit → escalate.
99
111
  → REQUIRED: Print "reviewer: [APPROVED | REJECTED — reason]"
100
112
  5k. Security gate: if change matches TIER 3 criteria OR content contains SECURITY_KEYWORDS OR secretscan has ANY findings OR sast_scan has ANY findings at or above threshold → MUST delegate the active swarm's reviewer agent security-only review. REJECTED before the configured QA retry limit → coder retry. REJECTED at the configured QA retry limit → escalate to user.
@@ -97,14 +97,23 @@ The tool will automatically write the retrospective to \`.swarm/evidence/retro-{
97
97
  - `.swarm/evidence/{phase}/mutation-gate.json` exists with verdict 'pass' or 'warn' (written by YOU via the `write_mutation_evidence` tool after step 5.56) — ONLY required when `mutation_test` is enabled in the QA gate profile
98
98
  If any required file is missing, run the missing gate first. Turbo mode skips all gates automatically.
99
99
  NOTE: Steps 5.5, 5.55, and 5.56 are enforced by runtime hooks. If `hallucination_guard` is enabled and you skip the critic_hallucination_verifier delegation (or fail to call `write_hallucination_evidence`), phase_complete will be BLOCKED by the plugin. Similarly, if `mutation_test` is enabled and you skip step 5.56 (or fail to call `write_mutation_evidence`), phase_complete will be BLOCKED. These are not suggestions — they are hard enforcement mechanisms.
100
+ 5.65. **Phase Council (conditional on QA gate — `phase_council`)**: Check whether `phase_council` is enabled in the effective QA gate profile (visible via `get_qa_gate_profile`). If disabled, skip silently and proceed to step 5.7.
101
+ This gate is triggered by the `phase_council` QA gate, NOT by `council_mode`. (`council_mode` controls per-task Stage B replacement in MODE: EXECUTE; `phase_council` controls holistic phase-level review here in MODE: PHASE-WRAP.)
102
+ If `phase_council` is enabled:
103
+ 1. Build a PHASE DOSSIER from all completed tasks in this phase, their evidence artifacts, changed-file summaries, and any drift/hallucination/mutation evidence.
104
+ 2. Dispatch the full 5-member council (`the active swarm's critic agent`, `the active swarm's reviewer agent`, `the active swarm's sme agent`, `the active swarm's test_engineer agent`, and `the active swarm's explorer agent`) in PARALLEL with phase-scoped context. Each member reviews the entire phase's work holistically and returns a `CouncilMemberVerdict` JSON object.
105
+ 3. Collect all 5 verdict objects. Do NOT fabricate or substitute verdicts.
106
+ 4. Act on the verdict: APPROVE → proceed. CONCERNS with `success: false` + `reason: 'blocking_concerns_unresolved'` → HIGH/CRITICAL findings are blocking, no evidence written, must resolve requiredFixes and re-council. CONCERNS with `success: true` → only MEDIUM/LOW advisory findings, phase may proceed per `phaseConcernsAllowComplete` flag. REJECT → surface required fixes to the user before proceeding.
107
+ Requires council.enabled: true in config.
108
+
100
109
  5.7. **Final Council (conditional on QA gate - last phase only)**: Check whether `final_council` is enabled in the effective QA gate profile (visible via `get_qa_gate_profile`). If disabled, skip silently and proceed to step 6.
101
110
  If enabled AND this is the LAST phase in the plan (all other phases have status 'complete' and no more phases remain):
102
- 1. Build a PROJECT DOSSIER from the completed plan, all phase summaries, changed-file summaries, and all relevant evidence artifacts. This is a completed-project review, not General Council mode.
103
- 2. Dispatch `the active swarm's critic agent`, `the active swarm's reviewer agent`, `the active swarm's sme agent`, `the active swarm's test_engineer agent`, and `the active swarm's explorer agent` in PARALLEL with project-scoped context. Each member must review the entire completed body of work and return a `CouncilMemberVerdict` JSON object using `agent`, `verdict` (APPROVE|CONCERNS|REJECT), `confidence`, `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`, and `durationMs`.
111
+ 1. Build a PROJECT DOSSIER from the completed plan, all phase summaries, changed-file summaries, and all relevant evidence artifacts. This is the full 5-member council (NOT the General Council) running a completed-project review.
112
+ 2. Dispatch the full 5-member council (`the active swarm's critic agent`, `the active swarm's reviewer agent`, `the active swarm's sme agent`, `the active swarm's test_engineer agent`, and `the active swarm's explorer agent`) in PARALLEL with project-scoped context. Each member must review the entire completed body of work and return a `CouncilMemberVerdict` JSON object using `agent`, `verdict` (APPROVE|CONCERNS|REJECT), `confidence`, `findings[]`, `criteriaAssessed[]`, `criteriaUnmet[]`, and `durationMs`.
104
113
  3. Collect the five returned verdict objects. Do NOT fabricate, infer, or substitute verdicts. If a member does not return valid JSON, re-dispatch that member.
105
114
  4. Call `write_final_council_evidence` with `phase`, `projectSummary`, `roundNumber`, and the collected `verdicts` array. This writes `.swarm/evidence/final-council.json` with plan binding, member verdicts, and quorum metadata.
106
115
  ⚠️ **GOTCHA**: `write_final_council_evidence` normalizes CONCERNS verdicts to "rejected" internally. A CONCERNS verdict in the **final council** still blocks `phase_complete` even with zero required fixes. You MUST either address the concerns and get APPROVE on a second council round, or surface the non-blocking advisory to the user before proceeding. (Note: the **phase-level** council has a `phaseConcernsAllowComplete` flag that makes CONCERNS advisory; the final council does not.)
107
- 5. Do NOT call `convene_general_council`, do NOT dispatch `council_generalist`, `council_skeptic`, or `council_domain_expert`, and do NOT require `council.general.enabled` for this gate. `final_council` is the same five-member phase council rerun at project scope.
116
+ 5. Do NOT call `convene_general_council`, do NOT dispatch `council_generalist`, `council_skeptic`, or `council_domain_expert`, and do NOT require `council.general.enabled` for this gate. `final_council` is the full 5-member council (NOT the General Council) rerun at project scope.
108
117
  6. Do NOT call `phase_complete` or `/swarm close` until `.swarm/evidence/final-council.json` exists with an approved, plan-bound, quorumed final-council verdict. When `final_council` is enabled, `phase_complete` will block until that evidence exists.
109
118
  If enabled but NOT the last phase, skip silently - final council only runs once, after all phases.
110
119
  6. Summarize to user
@@ -185,20 +185,23 @@ After `save_plan` succeeds, read `.swarm/context.md`:
185
185
  - 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.
186
186
  - 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.
187
187
  - 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")`.
188
- - If no pending section exists, ask the user inline now. Present the eleven gates with their defaults (DEFAULT_QA_GATES) as a single user-facing question. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
188
+ - If no pending section exists, ask the user inline now. 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:
189
189
  - reviewer (default: ON) - code review of coder output
190
190
  - test_engineer (default: ON) - test verification of coder output
191
191
  - sme_enabled (default: ON) - SME consultation during planning/clarification
192
192
  - critic_pre_plan (default: ON) - critic review before plan finalization
193
193
  - sast_enabled (default: ON) - static security scanning
194
- - council_mode (default: OFF) - multi-member council gate
194
+ - 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.
195
195
  - hallucination_guard (default: OFF) - mandatory per-phase API/signature/claim/citation verification at PHASE-WRAP
196
196
  - mutation_test (default: OFF) - mutation testing on source files touched this phase at PHASE-WRAP
197
- - council_general_review (default: OFF) - General Council review during MODE: SPECIFY when council.general.enabled is true
197
+ - 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.
198
198
  - drift_check (default: ON) - mandatory per-phase drift verification at PHASE-WRAP
199
- - final_council (default: OFF) - final project-scope council after all phases complete
200
- One question, one message, defaults pre-stated. Wait for the user's answer.
201
- If the user answered the gate question, immediately follow up with one more question: "How many coders should run in parallel? (default: 1, range: 1-4)" If the user says a number greater than 1, also write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
199
+ - 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`.
200
+ Additionally, present these two sub-items as part of the same exchange:
201
+ - Parallel coders (default: 1, range: 1-4) - how many coders should run in parallel.
202
+ - Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
203
+ The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
204
+ If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
202
205
  ```
203
206
  ## Pending Parallelization Config
204
207
  - parallelization_enabled: true
@@ -208,7 +211,6 @@ After `save_plan` succeeds, read `.swarm/context.md`:
208
211
  - recorded_at: <ISO timestamp>
209
212
  ```
210
213
  If the user accepts the default (1), skip writing this section entirely; serial execution is the default and needs no config.
211
- After asking the parallelization question, immediately follow up with one more question: "Commit frequency for completed tasks? (default: phase-level only; optional per-task checkpoint commit after each task completion)".
212
214
  If the user chooses per-task commits, write this section to `.swarm/context.md`:
213
215
  ```
214
216
  ## Task Completion Commit Policy
@@ -30,25 +30,29 @@ Activates when: user asks to "specify", "define requirements", "write a spec", o
30
30
  - Edge cases and known failure modes
31
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
32
  5. Write the spec to `.swarm/spec.md`.
33
- 5b. **QA GATE SELECTION (dialogue only).**
34
- Ask the user which QA gates to enable for this plan before suggesting the next step.
33
+ 5b. **QA GATE SELECTION, PARALLEL CODERS, AND COMMIT FREQUENCY (dialogue only).**
34
+ 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.
35
35
 
36
- Present the eleven gates with their defaults (DEFAULT_QA_GATES) as a single user-facing question. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:
36
+ 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:
37
37
  - reviewer (default: ON) -- code review of coder output
38
38
  - test_engineer (default: ON) -- test verification of coder output
39
39
  - sme_enabled (default: ON) -- SME consultation during planning/clarification
40
40
  - critic_pre_plan (default: ON) -- critic review before plan finalization
41
41
  - sast_enabled (default: ON) -- static security scanning
42
- - council_mode (default: OFF) -- multi-member council gate (recommended for high-impact architecture, public APIs, schema/data mutation, security-sensitive code)
42
+ - 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. (recommended for high-impact architecture, public APIs, schema/data mutation, security-sensitive code)
43
43
  - hallucination_guard (default: OFF) -- when enabled, mandatory per-phase API/signature/claim/citation verification via critic_hallucination_verifier at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm/evidence/{phase}/hallucination-guard.json exists with an APPROVED verdict (recommended for claim-heavy or research-heavy work)
44
44
  - 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 (recommended for projects with coverage gaps or safety-critical code)
45
- - council_general_review (default: OFF) -- when enabled, MODE: SPECIFY runs convene_general_council on the draft spec before the critic-gate; the architect runs a curated web_search pass, dispatches council_generalist / council_skeptic / council_domain_expert in parallel with a shared RESEARCH CONTEXT block, deliberates on disagreements, and synthesizes the result directly into the spec (recommended for novel architecture, unclear best practices, or high-risk design decisions). Requires council.general.enabled: true and a configured search API key in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.
45
+ - 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. (recommended for multi-task phases with cross-cutting concerns or high-risk integration)
46
46
  - drift_check (default: ON) -- when enabled, mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; compares implemented changes against spec.md intent; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists (recommended for all projects with a specification)
47
- - final_council (default: OFF) - when enabled, after all phases complete the architect dispatches the same five phase-council members (`critic`, `reviewer`, `sme`, `test_engineer`, `explorer`) at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This is not General Council mode and does not require `council.general.enabled`.
47
+ - 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`.
48
48
 
49
- One question, one message, defaults pre-stated. Wait for the user's answer.
49
+ Additionally, present these two sub-items as part of the same exchange:
50
+ - Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel.
51
+ - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
50
52
 
51
- If the user answered the gate question, immediately follow up with ONE more question: "How many coders should run in parallel? (default: 1, range: 1-4)" -- if the user says a number > 1, also write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
53
+ The user answers all three (gates, parallel coders, commit frequency) in one exchange. Wait for the user's response.
54
+
55
+ If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
52
56
  ```
53
57
  ## Pending Parallelization Config
54
58
  - parallelization_enabled: true
@@ -59,8 +63,6 @@ If the user answered the gate question, immediately follow up with ONE more ques
59
63
  ```
60
64
  If the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.
61
65
 
62
- After asking the parallelization question (regardless of whether the user chose serial or parallel), immediately follow up with ONE more question: "Commit frequency for completed tasks? (default: phase-level only; optional per-task checkpoint commit after each task completion)".
63
-
64
66
  If the user chooses per-task commits, write this section to `.swarm/context.md`:
65
67
  ```
66
68
  ## Task Completion Commit Policy
@@ -82,14 +84,12 @@ GATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:
82
84
  → WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.
83
85
  ✗ "I already know which gates are right for this project"
84
86
  → WRONG: the architect does not configure gates. The user configures gates. Always ask.
85
- ✗ "council_general_review is off by default, I don't need to mention it"
86
- → WRONG: every gate is presented with its default stated. The user opts in or accepts the default explicitly.
87
87
 
88
88
  MANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.
89
89
  You are BLOCKED until ALL THREE of these conditions are met:
90
- (1) The gate selection question has been presented to the user in a single message
91
- (2) The user has responded (accept defaults OR customized list)
92
- (3) The elected gates have been written to .swarm/context.md under "## Pending QA Gate Selection"
90
+ (1) The unified gate/coders/commit selection section has been presented to the user in a single message
91
+ (2) The user has responded (accept defaults OR customized list for all three items)
92
+ (3) The elected gates, parallel coder config, and commit policy have been written to .swarm/context.md under "## Pending QA Gate Selection" (and related sections as applicable)
93
93
  <!-- BEHAVIORAL_GUIDANCE_END -->
94
94
 
95
95
  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:
@@ -103,38 +103,14 @@ Do NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Onc
103
103
  - council_mode: <true|false>
104
104
  - hallucination_guard: <true|false>
105
105
  - mutation_test: <true|false>
106
- - council_general_review: <true|false>
106
+ - phase_council: <true|false>
107
107
  - drift_check: <true|false>
108
108
  - final_council: <true|false>
109
109
  - recorded_at: <ISO timestamp>
110
110
  ```
111
111
  MODE: PLAN will read this section after `save_plan` succeeds and persist via `set_qa_gates`.
112
112
 
113
- 5c. **SPECIFY-COUNCIL-REVIEW (fires ONLY when council_general_review gate is true).**
114
- Read the elected QA gates (parse the `## Pending QA Gate Selection` section from `.swarm/context.md` you just wrote, OR call `get_qa_gate_profile` if a profile already exists). If `council_general_review` is false or absent, skip directly to step 7.
115
-
116
- If `council_general_review` is true:
117
- 1. Read `council.general` from the resolved opencode-swarm config: global ~/.config/opencode/opencode-swarm.json first, then project .opencode/opencode-swarm.json overrides. A global config is valid and must be used when no project override is present; do not fail after checking only the project file. If `council.general.enabled` is not true OR no search API key is configured, surface to the user: "council_general_review gate is enabled but the General Council is not configured. Set council.general.enabled: true and configure a search API key in global ~/.config/opencode/opencode-swarm.json or project .opencode/opencode-swarm.json, or unset council_general_review and re-run." Then stop.
118
- 2. Run the Research Phase: formulate 1-3 targeted `web_search` queries grounded in the spec's domain, then compile a RESEARCH CONTEXT block (same format as MODE: COUNCIL step 2). If web_search fails or returns no usable current sources for a time-sensitive spec question, stop and report the failed grounding instead of dispatching council members. For stable, non-current spec questions only, note the failed search in the dispatch message and proceed with stable background knowledge.
119
- 3. 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 — one message per agent, then STOP and wait. Pass: the spec text as the question, round number 1, the RESEARCH CONTEXT block, and the instruction "Cite from the RESEARCH CONTEXT for external evidence. Your memberId and role are hardcoded in your system prompt." Do NOT share other agents' perspectives at this stage.
120
- 4. Collect all three JSON responses.
121
- 5. Call `convene_general_council` with mode: 'spec_review', the spec as question, and the collected `round1Responses`. Omit `round2Responses` — spec review is a single-pass advisory, not a full deliberation.
122
- 6. Read `consensusPoints` — incorporate unambiguous consensus directly into the spec.
123
- 7. Read `disagreements` — for each: (a) accept one position with rationale, (b) mark as `[NEEDS CLARIFICATION]` in the spec, or (c) schedule an SME consultation.
124
- 8. Synthesize the final spec-review answer directly from the `synthesis` returned by `convene_general_council`. Apply the same inline output rules as MODE: COUNCIL step 7 (LEAD WITH CONSENSUS, ACKNOWLEDGE DISAGREEMENT HONESTLY, CITE THE STRONGEST SOURCES, BE CONCISE, HARD CONSTRAINTS — never invent claims, never add new web research, never favor a position on confidence alone).
125
- 9. Revise `.swarm/spec.md` to reflect the council input.
126
-
127
- <!-- BEHAVIORAL_GUIDANCE_START -->
128
- SPECIFY-COUNCIL-REVIEW RULES:
129
- ✗ "council_general_review is off by default, I'll skip this"
130
- → CORRECT only when the gate is explicitly false or absent. Do NOT assume false. Read the actual gate value before deciding to skip.
131
- ✗ "The spec is already good, no need to ask the council"
132
- → WRONG when gate is true: the user enabled this gate for a reason. Run it regardless.
133
- ✗ "I'll include round2Responses for spec_review — more is better"
134
- → WRONG: spec review is a single advisory pass. Omit `round2Responses` for spec_review mode.
135
- ✗ "I'll skip the Research Phase to save time"
136
- → WRONG: the council agents have no tools and depend on the architect-supplied RESEARCH CONTEXT for external evidence. Skipping the pre-search degrades every downstream agent's grounding.
137
- <!-- BEHAVIORAL_GUIDANCE_END -->
113
+ General Council advisory input is offered as an early workflow option in MODE: BRAINSTORM (Phase 1b), not as a SPECIFY step. If the user wants council input during SPECIFY, they can use `/swarm council <question>` manually.
138
114
 
139
115
  7. Report a summary to the user (MUST count, SHALL count, scenario count, clarification markers, elected QA gates) and suggest the next step: `CLARIFY-SPEC` (if markers exist) or `PLAN`.
140
116
 
package/dist/cli/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "opencode-swarm",
55
- version: "7.60.0",
55
+ version: "7.61.0",
56
56
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
57
57
  main: "dist/index.js",
58
58
  types: "dist/index.d.ts",
@@ -17046,11 +17046,11 @@ var init_tool_metadata = __esm(() => {
17046
17046
  ]
17047
17047
  },
17048
17048
  get_qa_gate_profile: {
17049
- description: "retrieve the QA gate profile for the current plan: gates (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, council_general_review, drift_check, final_council), lock state, and profile hash. Read-only.",
17049
+ description: "retrieve the QA gate profile for the current plan: gates (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council), lock state, and profile hash. Read-only.",
17050
17050
  agents: ["architect"]
17051
17051
  },
17052
17052
  set_qa_gates: {
17053
- description: "configure the QA gate profile for the current plan. Architect-only. Ratchet-tighter only \u2014 rejected once the profile is locked after critic approval. Supports: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, council_general_review, drift_check, final_council.",
17053
+ description: "configure the QA gate profile for the current plan. Architect-only. Ratchet-tighter only \u2014 rejected once the profile is locked after critic approval. Supports: reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, council_mode, hallucination_guard, mutation_test, phase_council, drift_check, final_council.",
17054
17054
  agents: ["architect"]
17055
17055
  },
17056
17056
  web_search: {
@@ -18122,7 +18122,7 @@ var init_schema = __esm(() => {
18122
18122
  requireAllMembers: exports_external.boolean().default(false).describe("When true, submit_council_verdicts rejects if fewer than 5 member verdicts are provided. Equivalent to minimumMembers: 5."),
18123
18123
  minimumMembers: exports_external.number().int().min(1).max(5).default(3).describe("Minimum distinct council member verdicts required for synthesis. Default 3. Set to 1 to disable quorum enforcement. requireAllMembers: true overrides this to 5 (stricter constraint wins)."),
18124
18124
  escalateOnMaxRounds: exports_external.string().optional().describe("Optional webhook URL or handler name invoked when maxRounds is reached without APPROVE. Declared for forward compatibility; no behavior is implemented yet."),
18125
- phaseConcernsAllowComplete: exports_external.boolean().default(true).describe("When true, a phase-level council CONCERNS verdict does NOT block phase completion \u2014 the advisory notes are logged as warnings and the phase proceeds. When false, CONCERNS blocks like REJECT. Default: true (CONCERNS is advisory)."),
18125
+ phaseConcernsAllowComplete: exports_external.boolean().default(true).describe("When true, a phase-level council CONCERNS verdict with only MEDIUM/LOW findings does NOT block phase completion \u2014 the advisory notes are logged as warnings and the phase proceeds. When false, CONCERNS blocks like REJECT. Note: HIGH/CRITICAL findings from CONCERNS members are always promoted to requiredFixes and block at the tool level regardless of this setting. Default: true."),
18126
18126
  general: GeneralCouncilConfigSchema.optional()
18127
18127
  }).strict();
18128
18128
  ParallelizationConfigSchema = exports_external.object({
@@ -21062,11 +21062,26 @@ import { createHash as createHash3 } from "crypto";
21062
21062
  function rowToProfile(row) {
21063
21063
  let parsed = {};
21064
21064
  try {
21065
- parsed = JSON.parse(row.gates);
21065
+ const maybeGates = JSON.parse(row.gates);
21066
+ if (maybeGates && typeof maybeGates === "object" && !Array.isArray(maybeGates)) {
21067
+ parsed = maybeGates;
21068
+ }
21066
21069
  } catch {
21067
21070
  parsed = {};
21068
21071
  }
21069
- const gates = { ...DEFAULT_QA_GATES, ...parsed };
21072
+ const raw = parsed;
21073
+ if (raw.council_mode === true && raw.phase_council === undefined) {
21074
+ parsed.phase_council = true;
21075
+ parsed.council_mode = false;
21076
+ }
21077
+ const knownKeys = new Set(Object.keys(DEFAULT_QA_GATES));
21078
+ const filteredParsed = {};
21079
+ for (const key of Object.keys(parsed)) {
21080
+ if (knownKeys.has(key)) {
21081
+ filteredParsed[key] = parsed[key];
21082
+ }
21083
+ }
21084
+ const gates = { ...DEFAULT_QA_GATES, ...filteredParsed };
21070
21085
  return {
21071
21086
  id: row.id,
21072
21087
  plan_id: row.plan_id,
@@ -21173,7 +21188,7 @@ var init_qa_gate_profile = __esm(() => {
21173
21188
  hallucination_guard: false,
21174
21189
  sast_enabled: true,
21175
21190
  mutation_test: false,
21176
- council_general_review: false,
21191
+ phase_council: false,
21177
21192
  drift_check: true,
21178
21193
  final_council: false
21179
21194
  };
@@ -56571,7 +56586,7 @@ var init_qa_gates = __esm(() => {
56571
56586
  "hallucination_guard",
56572
56587
  "sast_enabled",
56573
56588
  "mutation_test",
56574
- "council_general_review",
56589
+ "phase_council",
56575
56590
  "drift_check",
56576
56591
  "final_council"
56577
56592
  ];
@@ -59671,7 +59686,7 @@ Subcommands:
59671
59686
  handler: (ctx) => handleQaGatesCommand(ctx.directory, ctx.args, ctx.sessionID),
59672
59687
  description: "View or modify QA gate profile for the current plan [enable|override <gate>...]",
59673
59688
  args: "[show|enable|override] <gate>...",
59674
- details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, council_general_review, drift_check.",
59689
+ details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, phase_council, drift_check, final_council.",
59675
59690
  category: "config"
59676
59691
  },
59677
59692
  promote: {
@@ -369,7 +369,7 @@ export declare const COMMAND_REGISTRY: {
369
369
  readonly handler: (ctx: CommandContext) => Promise<string>;
370
370
  readonly description: "View or modify QA gate profile for the current plan [enable|override <gate>...]";
371
371
  readonly args: "[show|enable|override] <gate>...";
372
- readonly details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, council_general_review, drift_check.";
372
+ readonly details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, phase_council, drift_check, final_council.";
373
373
  readonly category: "config";
374
374
  };
375
375
  readonly promote: {
@@ -5,7 +5,7 @@
5
5
  * No business logic, no I/O. Only types, interfaces, and defaults.
6
6
  */
7
7
  export type CouncilVerdict = 'APPROVE' | 'CONCERNS' | 'REJECT';
8
- export type CouncilFindingSeverity = 'HIGH' | 'MEDIUM' | 'LOW';
8
+ export type CouncilFindingSeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
9
9
  export type CouncilFindingCategory = 'logic' | 'edge_case' | 'error_handling' | 'spec_compliance' | 'security' | 'maintainability' | 'naming' | 'domain' | 'test_gap' | 'test_quality' | 'mutation_gap' | 'adversarial_gap' | 'slop_pattern' | 'hallucinated_api' | 'lazy_abstraction' | 'cargo_cult' | 'spec_drift' | 'other';
10
10
  export type CouncilAgent = 'critic' | 'reviewer' | 'sme' | 'test_engineer' | 'explorer';
11
11
  export interface CouncilFinding {
@@ -52,6 +52,8 @@ export interface CouncilSynthesis {
52
52
  allCriteriaMet: boolean;
53
53
  /** Distinct council members that produced verdicts (deduplicated count). */
54
54
  quorumSize: number;
55
+ /** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
56
+ blockingConcernsCount: number;
55
57
  /** true when called with an empty verdicts array — the APPROVE is vacuous */
56
58
  emptyVerdictsWarning?: boolean;
57
59
  }
@@ -84,6 +86,8 @@ export interface PhaseCouncilSynthesis {
84
86
  allCriteriaMet: boolean;
85
87
  /** Distinct council members that produced verdicts */
86
88
  quorumSize: number;
89
+ /** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
90
+ blockingConcernsCount: number;
87
91
  /** Path where evidence was written, e.g. .swarm/evidence/1/phase-council.json */
88
92
  evidencePath: string;
89
93
  /** Summary of the phase being reviewed */
@@ -116,6 +120,8 @@ export interface FinalCouncilSynthesis {
116
120
  allCriteriaMet: boolean;
117
121
  /** Distinct council members that produced verdicts */
118
122
  quorumSize: number;
123
+ /** Count of HIGH/CRITICAL findings from CONCERNS members promoted to requiredFixes */
124
+ blockingConcernsCount: number;
119
125
  /** Path where evidence was written */
120
126
  evidencePath: '.swarm/evidence/final-council.json';
121
127
  /** Summary of the completed project being reviewed */
@@ -154,7 +160,7 @@ export interface CouncilConfig {
154
160
  * options: critic_oversight agent, HTTP webhook, or configurable handler.
155
161
  */
156
162
  escalateOnMaxRounds?: string;
157
- /** Default true — CONCERNS verdict at phase-level council does NOT block completion (advisory). Set false to make CONCERNS block like REJECT. */
163
+ /** Default true — CONCERNS verdict with only MEDIUM/LOW findings does NOT block completion (advisory). Set false to make all CONCERNS block like REJECT. Note: HIGH/CRITICAL findings from CONCERNS members are always promoted to requiredFixes and block at the tool level regardless of this setting. */
158
164
  phaseConcernsAllowComplete: boolean;
159
165
  }
160
166
  export declare const COUNCIL_DEFAULTS: CouncilConfig;
@@ -31,7 +31,7 @@ export interface QaGates {
31
31
  hallucination_guard: boolean;
32
32
  sast_enabled: boolean;
33
33
  mutation_test: boolean;
34
- council_general_review: boolean;
34
+ phase_council: boolean;
35
35
  drift_check: boolean;
36
36
  final_council: boolean;
37
37
  }
@@ -100,7 +100,7 @@ export declare function computeProfileHash(profile: QaGateProfile): string;
100
100
  * machine; blocks coder→next-coder advancement until reviewer + test_engineer
101
101
  * delegations observed).
102
102
  * - council_mode — src/state.ts isCouncilGateActive + src/hooks/delegation-gate.ts
103
- * (Stage B replaced by submit_council_verdicts verdict).
103
+ * (replaces per-task Stage B with full 5-member council via submit_council_verdicts).
104
104
  * - sme_enabled — consumed during MODE: BRAINSTORM/SPECIFY architect dialogue.
105
105
  * - critic_pre_plan — consumed by MODE: PLAN critic delegation before save_plan.
106
106
  * - sast_enabled — consumed inside pre_check_batch tool.
@@ -108,11 +108,14 @@ export declare function computeProfileHash(profile: QaGateProfile): string;
108
108
  * until .swarm/evidence/{phase}/hallucination-guard.json has APPROVED verdict).
109
109
  * - mutation_test — src/tools/phase-complete.ts Gate 4 (blocks phase_complete
110
110
  * until .swarm/evidence/{phase}/mutation-gate.json has pass verdict; warn does not block)
111
- * - council_general_review — src/agents/architect.ts SPECIFY-COUNCIL-REVIEW
112
- * (fires when gate is true; runs convene_general_council on draft spec before
113
- * critic-gate to fold multi-model deliberation into the spec).
111
+ * - phase_council — src/tools/phase-complete/gates/phase-council-gate.ts Gate 5
112
+ * (blocks phase_complete until .swarm/evidence/{phase}/phase-council.json has
113
+ * approved verdict from 5-member holistic phase review).
114
114
  * - drift_check — src/tools/phase-complete.ts Gate 2 (blocks phase_complete when
115
115
  * drift-verifier.json missing or rejected)
116
+ * - final_council — src/tools/write-final-council-evidence.ts (blocks project
117
+ * completion until .swarm/evidence/final-council.json has approved verdict
118
+ * from 5-member project-scope review).
116
119
  *
117
120
  * Session overrides are intentionally ephemeral — they live only in
118
121
  * in-memory `AgentSessionState.qaGateSessionOverrides` and are NOT