opencode-swarm 7.125.6 → 7.126.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +18 -14
  2. package/.opencode/skills/plan/SKILL.md +21 -15
  3. package/.opencode/skills/specify/SKILL.md +18 -14
  4. package/.opencode/skills/swarm-pr-feedback/SKILL.md +19 -14
  5. package/.opencode/skills/swarm-pr-review/SKILL.md +17 -13
  6. package/dist/agents/architect.d.ts +9 -7
  7. package/dist/cli/{config-doctor-akxywx0c.js → config-doctor-23jxdqwv.js} +2 -2
  8. package/dist/cli/{core-v1kp7anb.js → core-wg3re04e.js} +1 -1
  9. package/dist/cli/{curation-policy-62w2pwfz.js → curation-policy-0t6hny6g.js} +2 -2
  10. package/dist/cli/{curator-gke6nrc4.js → curator-g8rggzbk.js} +14 -14
  11. package/dist/cli/{curator-llm-factory-40c4852v.js → curator-llm-factory-36psae60.js} +14 -14
  12. package/dist/cli/{guardrail-explain-m34vcgjg.js → guardrail-explain-6ffgrjx9.js} +15 -15
  13. package/dist/cli/{guardrail-log-222xyxfp.js → guardrail-log-57sczn5h.js} +3 -3
  14. package/dist/cli/{hive-promoter-6fg3redm.js → hive-promoter-c458rgp5.js} +14 -14
  15. package/dist/cli/{index-qzkcy22e.js → index-1p9z8cc4.js} +1 -1
  16. package/dist/cli/{index-e315gwc9.js → index-3hkbegq2.js} +1 -1
  17. package/dist/cli/{index-gnvg72y1.js → index-4ff0x4cg.js} +79 -1
  18. package/dist/cli/{index-yq4s3q43.js → index-6j9p0c40.js} +2 -2
  19. package/dist/cli/{index-74xejn4v.js → index-abw10n3f.js} +139 -83
  20. package/dist/cli/{index-r1gdkn2d.js → index-c8sqc3nh.js} +113 -21
  21. package/dist/cli/{index-gbnpz7rh.js → index-cnhp6c0k.js} +1 -1
  22. package/dist/cli/{index-dezgmvtw.js → index-echdpdhy.js} +1 -1
  23. package/dist/cli/{index-gd5w3ef8.js → index-k5xh81c9.js} +3 -3
  24. package/dist/cli/{index-1htanqp1.js → index-kx3533dm.js} +1 -1
  25. package/dist/cli/{index-0f45t7xy.js → index-nkhp7j16.js} +5 -5
  26. package/dist/cli/{index-1012f47p.js → index-nmyg9b7v.js} +4 -4
  27. package/dist/cli/{index-4b1e5m0d.js → index-vvwf9ark.js} +2 -2
  28. package/dist/cli/{index-jt7hnr7q.js → index-w0yztxgq.js} +1 -1
  29. package/dist/cli/{index-g4ef4v3m.js → index-w9cb5zwh.js} +1 -1
  30. package/dist/cli/{index-1cxp3b5y.js → index-x1w4cx3n.js} +2 -2
  31. package/dist/cli/{index-d17kqe54.js → index-y9t766sw.js} +4950 -4890
  32. package/dist/cli/{index-zp330ss0.js → index-yf4kvhrn.js} +16 -16
  33. package/dist/cli/index.js +14 -14
  34. package/dist/cli/{knowledge-escalator-h3hg7ek7.js → knowledge-escalator-kd80m9vp.js} +3 -3
  35. package/dist/cli/{knowledge-events-jtr66wxz.js → knowledge-events-j7jfwm1d.js} +1 -1
  36. package/dist/cli/{knowledge-store-69ttjjjs.js → knowledge-store-1d4byc7y.js} +1 -1
  37. package/dist/cli/{knowledge-validator-yn06rh13.js → knowledge-validator-63mkgt9x.js} +4 -4
  38. package/dist/cli/{scan-cursor-r0w2p5gz.js → scan-cursor-qzn5jmbe.js} +2 -2
  39. package/dist/cli/{schema-69z8w1ka.js → schema-2j92wnns.js} +1 -1
  40. package/dist/cli/{scope-persistence-habn4q8a.js → scope-persistence-dm5bab50.js} +3 -1
  41. package/dist/cli/{skill-generator-a7xfyddq.js → skill-generator-sv6zvdvz.js} +5 -5
  42. package/dist/commands/turbo-constants.d.ts +6 -0
  43. package/dist/config/constants.d.ts +1 -1
  44. package/dist/config/index.d.ts +1 -0
  45. package/dist/config/loader.d.ts +51 -10
  46. package/dist/hooks/pr-workflow-gate.d.ts +39 -0
  47. package/dist/hooks/scope-guard.d.ts +6 -1
  48. package/dist/index.js +47 -84
  49. package/dist/scope/scope-binding.d.ts +21 -2
  50. package/dist/scope/scope-persistence.d.ts +6 -0
  51. package/dist/tools/index.d.ts +2 -0
  52. package/dist/tools/manifest.d.ts +2 -0
  53. package/dist/tools/prepare-pr-feedback-scope.d.ts +5 -0
  54. package/dist/tools/tool-metadata.d.ts +98 -0
  55. package/dist/tools/write-pr-review-artifact.d.ts +5 -0
  56. package/package.json +4 -3
@@ -74,24 +74,28 @@ until PLAN; MODE: PLAN will choose safe parallelism automatically. Keep commit
74
74
  frequency at phase-level only.
75
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
76
 
77
+ <!-- BEGIN QA_GATE_BODY -->
78
+
77
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:
78
- - reviewer (default: ON) -- code review of coder output
79
- - test_engineer (default: ON) -- test verification of coder output
80
- - sme_enabled (default: ON) -- SME consultation during planning/clarification
81
- - critic_pre_plan (default: ON) -- critic review before plan finalization
82
- - sast_enabled (default: ON) -- static security scanning
83
- - 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)
84
- - 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)
85
- - 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)
86
- - 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)
87
- - 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)
88
- - 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`.
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`.
89
91
 
90
92
  Additionally, present these three sub-items as part of the same exchange:
91
- - Parallel coders (default: 1, range: 1-6) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.
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.
92
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.
93
- - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
94
- - 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.
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 -->
95
99
 
96
100
  The user answers all four items (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.
97
101
 
@@ -228,22 +228,28 @@ After `save_plan` succeeds, read `.swarm/context.md`:
228
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
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
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
- - reviewer (default: ON) - code review of coder output
232
- - test_engineer (default: ON) - test verification of coder output
233
- - sme_enabled (default: ON) - SME consultation during planning/clarification
234
- - critic_pre_plan (default: ON) - critic review before plan finalization
235
- - sast_enabled (default: ON) - static security scanning
236
- - 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.
237
- - hallucination_guard (default: OFF) - mandatory per-phase API/signature/claim/citation verification at PHASE-WRAP
238
- - mutation_test (default: OFF) - mutation testing on source files touched this phase at PHASE-WRAP
239
- - 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.
240
- - drift_check (default: ON) - mandatory per-phase drift verification at PHASE-WRAP
241
- - 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`.
242
- Additionally, present these three sub-items as part of the same exchange:
243
- - Parallel coders (default: 1, range: 1-6) - how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files - safe and faster, but only for tasks whose declared file scopes do NOT overlap. Inspect the plan and recommend a count equal to the number of dependency-ready, file-disjoint task groups (clamped 1-6); recommend 1 (serial) when scopes overlap or are unknown. State your recommendation and reasoning when you ask.
231
+ <!-- BEGIN QA_GATE_BODY -->
232
+
233
+ 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
+ - reviewer (default: ON) - code review of coder output
235
+ - test_engineer (default: ON) - test verification of coder output
236
+ - sme_enabled (default: ON) - SME consultation during planning/clarification
237
+ - critic_pre_plan (default: ON) - critic review before plan finalization
238
+ - sast_enabled (default: ON) - static security scanning
239
+ - 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.
240
+ - 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.
241
+ - 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.
242
+ - 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.
243
+ - 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.
244
+ - 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
+
246
+ 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. 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.
244
248
  > 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.
245
- - Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
246
- - 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.
249
+ - Commit frequency (default: phase-level only) - optional per-task checkpoint commit after each task completion.
250
+ - 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
+
252
+ <!-- END QA_GATE_BODY -->
247
253
  The user answers all four (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.
248
254
  If the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm/context.md` alongside the gate selection:
249
255
  ```
@@ -53,24 +53,28 @@ Activates when: user asks to "specify", "define requirements", "write a spec", o
53
53
  5b. **QA GATE SELECTION, PARALLEL CODERS, COMMIT FREQUENCY, AND AUTO_PROCEED (dialogue only).**
54
54
  Ask the user which QA gates to enable for this plan, how many parallel coders to use, the commit frequency, and auto_proceed -- do not select on their behalf. Present all four items together as one unified exchange. Exception: when SPECIFY is running inside MODE: LOOP with `autonomy=auto`, write the balanced-speed default `## Pending QA Gate Selection` instead (reviewer, test_engineer, sme_enabled, critic_pre_plan, sast_enabled, drift_check ON; council_mode, hallucination_guard, mutation_test, phase_council, final_council OFF), keep phase-level commits, and let MODE: PLAN choose safe parallelism after task scopes exist.
55
55
 
56
+ <!-- BEGIN QA_GATE_BODY -->
57
+
56
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:
57
- - reviewer (default: ON) -- code review of coder output
58
- - test_engineer (default: ON) -- test verification of coder output
59
- - sme_enabled (default: ON) -- SME consultation during planning/clarification
60
- - critic_pre_plan (default: ON) -- critic review before plan finalization
61
- - sast_enabled (default: ON) -- static security scanning
62
- - 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)
63
- - 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)
64
- - 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)
65
- - 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)
66
- - 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)
67
- - 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`.
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`.
68
70
 
69
71
  Additionally, present these three sub-items as part of the same exchange:
70
- - Parallel coders (default: 1, range: 1-6) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.
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.
71
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.
72
- - Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.
73
- - 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.
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 -->
74
78
 
75
79
  The user answers all four (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.
76
80
 
@@ -203,20 +203,25 @@ for the Fix Planning step.
203
203
 
204
204
  ## Pre-flight: Scope Discipline
205
205
 
206
- The following `save_plan` / `declare_scope` mechanics apply only when those
207
- plugin tools are available. In other repositories or runtimes, use the native
208
- scope controller; if none exists, put exact allowed files and non-goals in the
209
- delegation and verify the resulting diff mechanically. Never bypass an
210
- available scope controller merely to reduce ceremony.
211
-
212
- `declare_scope({ taskId, files })` enforces that the delegated coder agent may only modify the declared files. The enforcement requires an active `.swarm/plan.json` — calling `declare_scope` in a feedback-closure run (which does not go through `save_plan`) rejects with "No plan found."
213
-
214
- **When to use `declare_scope` (preferred):** any feedback round that touches 2+ files, OR any feedback round where the file scope is not 100% obvious from the prompt. Before delegating, save a minimal plan via `save_plan` with a single phase containing the feedback-closure tasks, then call `declare_scope` per task with the exact file list.
215
-
216
- **Carve-out for direct Task delegation:** 1-file, single-function changes where the file path appears verbatim in the coder's prompt may use direct `Task(subagent_type="<coder>", ...)` delegation without `declare_scope`, where `<coder>` is the active swarm's coder agent (e.g. `coder`, or `paid_coder` when the swarm id is `paid`). This is a narrow exception; the orchestrator is responsible for verifying the scope is unambiguous.
217
- REQUIRED: even under this carve-out, the direct Task dispatch MUST contain a literal `ACCEPTANCE:` line resolve per ACCEPTANCE FIELD RESOLUTION in your system prompt (one-line task-derived DONE restatement for the feedback fix, since feedback-closure runs typically have no fr_refs). A missing line is BLOCKED by ACCEPTANCE_FIELD_REQUIRED.
218
-
219
- **Anti-pattern:** do not use `Task` delegation for multi-file feedback fixes just to skip `save_plan` — the loss of scope discipline is not worth the saved ceremony.
206
+ When the plugin's mechanical controller is available, every coder Task must be
207
+ preceded by `prepare_pr_feedback_scope({ task_id, files })`. The controller is
208
+ available only after the immutable feedback-verification lanes have settled and
209
+ binds the exact file set to the current feedback revision, parent session, and
210
+ next matching Task call. The coder prompt must use the same numeric `task_id`,
211
+ contain matching `FILE:` directives, and include a literal `ACCEPTANCE:` line.
212
+ Once a Task consumes that scope, its `task_id` is immutable for the current
213
+ feedback revision. Any retry must prepare and dispatch a fresh nested numeric
214
+ task identity (for example `1.1.1`), never re-declare the consumed ID.
215
+
216
+ Do not create a synthetic `save_plan` merely to authorize feedback work, and do
217
+ not use `declare_scope`; those tools belong to the normal implementation-plan
218
+ lifecycle. There is no one-file or single-function carve-out from the dedicated
219
+ PR-feedback scope controller.
220
+
221
+ In runtimes without this controller, use the native scope mechanism. If none
222
+ exists, put exact allowed files and non-goals in the delegation and verify the
223
+ resulting diff mechanically. Never bypass an available scope controller merely
224
+ to reduce ceremony.
220
225
 
221
226
  ## Intake Surfaces
222
227
 
@@ -24,11 +24,11 @@ without running a fresh broad review.
24
24
  When a review finishes with actionable validated findings, stop and ask the user
25
25
  whether to continue into `swarm-pr-feedback`. Do not auto-dispatch fix work from
26
26
  `PR_REVIEW`. Instead, write a handoff artifact under
27
- `.swarm/pr-review/<run_id>/feedback-handoff.md` (or `.json`) and include the
28
- exact continuation prompt:
27
+ `.swarm/pr-review/<run_id>/feedback-handoff.json` with `write_pr_review_artifact`
28
+ and include the exact continuation prompt:
29
29
 
30
30
  ```text
31
- /swarm pr-feedback <PR_URL> continue from .swarm/pr-review/<run_id>/feedback-handoff.md
31
+ /swarm pr-feedback <PR_URL> continue from .swarm/pr-review/<run_id>/feedback-handoff.json
32
32
  ```
33
33
 
34
34
  `<run_id>` is a stable identifier for this review run, such as
@@ -459,10 +459,10 @@ The context pack must include, when available:
459
459
 
460
460
  ## Review Finding Persistence
461
461
 
462
- Do not rely on conversation context to preserve review findings. Create a run
463
- artifact under `.swarm/pr-review/<run_id>/findings.jsonl` when file writes are
464
- allowed, or under `.swarm/evidence/pr-review-<run_id>-findings.jsonl` when the
465
- review already uses the evidence tree.
462
+ Do not rely on conversation context to preserve review findings. Use
463
+ `write_pr_review_artifact` with `kind: "findings"`; the controller creates and
464
+ appends `.swarm/pr-review/<run_id>/findings.jsonl` without granting generic
465
+ write authority over `.swarm/`.
466
466
 
467
467
  Each persisted finding record must include at least:
468
468
 
@@ -484,11 +484,14 @@ Minimum field contract:
484
484
  Persist after every major validation boundary:
485
485
 
486
486
  1. **Post-explorer:** after Phase 3/4 candidate parsing and before reviewer
487
- dispatch, write all candidates as `PENDING` with their lane provenance.
488
- 2. **Post-reviewer:** after Phase 6 reviewer validation, update each reviewed
487
+ dispatch, call `write_pr_review_artifact` with `boundary: "post_explorer"`
488
+ and all candidates as `PENDING` with their lane provenance.
489
+ 2. **Post-reviewer:** after Phase 6 reviewer validation, call the controller
490
+ with `boundary: "post_reviewer"` and update each reviewed
489
491
  record to `CONFIRMED`, `DISPROVED`, `PRE_EXISTING`, or keep `PENDING` with a
490
492
  concrete `next_action` if more evidence is required.
491
- 3. **Post-critic:** after Phase 8 critic challenge, update final status,
493
+ 3. **Post-critic:** after Phase 8 critic challenge, call the controller with
494
+ `boundary: "post_critic"` and update final status,
492
495
  severity/action notes in `evidence`, and final reporting or handoff action.
493
496
 
494
497
  Resume/reload procedure:
@@ -1376,7 +1379,9 @@ Explain the recommendation in one short paragraph and list required actions befo
1376
1379
  ## Feedback handoff
1377
1380
 
1378
1381
  When the review produced actionable validated findings or operational blockers,
1379
- include:
1382
+ call `write_pr_review_artifact` with `kind: "handoff"`. The controller writes
1383
+ `.swarm/pr-review/<run_id>/feedback-handoff.json` only when its finding IDs
1384
+ exactly match the latest confirmed `handoff_to_feedback` records. Include:
1380
1385
 
1381
1386
  - the handoff artifact path,
1382
1387
  - the preserved finding IDs and provenance that `swarm-pr-feedback` must carry
@@ -1387,7 +1392,7 @@ include:
1387
1392
  Use this exact continuation prompt format:
1388
1393
 
1389
1394
  ```text
1390
- /swarm pr-feedback <PR_URL> continue from .swarm/pr-review/<run_id>/feedback-handoff.md
1395
+ /swarm pr-feedback <PR_URL> continue from .swarm/pr-review/<run_id>/feedback-handoff.json
1391
1396
  ```
1392
1397
 
1393
1398
  ---
@@ -1435,4 +1440,3 @@ unproductive wakes, and the only exits are:
1435
1440
  Abort is a recovery tool, not a coverage shortcut. Use it only when the
1436
1441
  bind/checkout path is genuinely unreachable; never use it to skip a
1437
1442
  coverage obligation that is merely expensive or inconvenient.
1438
-
@@ -61,14 +61,16 @@ export declare function buildArchitectureSupervisionWorkflow(arch?: Architecture
61
61
  */
62
62
  export declare function buildCouncilWorkflow(council?: CouncilWorkflowConfig): string;
63
63
  /**
64
- * Build the user-facing QA gate selection dialogue, used by MODE: SPECIFY
65
- * (step 5b), MODE: BRAINSTORM (Phase 6), and MODE: PLAN (post-`save_plan`
66
- * inline path). The dialogue is dialogue-only persistence happens during
67
- * MODE: PLAN after `save_plan` creates `plan.json`.
64
+ * TEST-ONLY ORACLE: This function is no longer wired into the architect prompt
65
+ * (the {{QA_GATE_DIALOGUE_*}} placeholder substitution was removed in #1690,
66
+ * task 3.1). It is retained here because three test files import it directly:
67
+ * - src/__tests__/qa-gate-hardening.test.ts:17
68
+ * - tests/unit/agents/architect-hallucination-gate.test.ts:3
69
+ * - tests/unit/skills/plan-protocol.test.ts:8
68
70
  *
69
- * The lead-in sentence varies per mode, but the body (ten gates with
70
- * defaults, one-shot accept-or-customize prompt) is shared so SPECIFY,
71
- * BRAINSTORM, and PLAN inline paths stay in lockstep.
71
+ * Future work (task 3.2) will create `references/qa-gate-gates-body.md` and
72
+ * migrate those tests to assert against the canonical body. Once migrated,
73
+ * this helper may be deleted.
72
74
  */
73
75
  export declare function buildQaGateSelectionDialogue(modeLabel: 'BRAINSTORM' | 'SPECIFY' | 'PLAN'): string;
74
76
  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,8 +12,8 @@ import {
12
12
  shouldRunOnStartup,
13
13
  writeBackupArtifact,
14
14
  writeDoctorArtifact
15
- } from "./index-jt7hnr7q.js";
16
- import"./index-r1gdkn2d.js";
15
+ } from "./index-w0yztxgq.js";
16
+ import"./index-c8sqc3nh.js";
17
17
  import"./index-bk5tah7q.js";
18
18
  import"./index-z6xqpmqg.js";
19
19
  import"./index-zjygnfay.js";
@@ -14,7 +14,7 @@ import {
14
14
  resolveWorktreeBaseDir,
15
15
  shortenWorktreePath,
16
16
  writeLaneProfileToDiskReal
17
- } from "./index-g4ef4v3m.js";
17
+ } from "./index-w9cb5zwh.js";
18
18
  import"./index-4rhhvd1a.js";
19
19
  import"./index-z6xqpmqg.js";
20
20
  import"./index-zjygnfay.js";
@@ -4,9 +4,9 @@ import {
4
4
  authorizeCuration,
5
5
  buildConfigFingerprintInput,
6
6
  readCohortConfigFingerprint
7
- } from "./index-1htanqp1.js";
7
+ } from "./index-kx3533dm.js";
8
8
  import"./index-rtry5xyf.js";
9
- import"./index-gbnpz7rh.js";
9
+ import"./index-cnhp6c0k.js";
10
10
  import"./index-ae75rja9.js";
11
11
  import"./index-q27bajqb.js";
12
12
  import"./index-zgwm4ryv.js";
@@ -14,38 +14,38 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-d17kqe54.js";
18
- import"./index-dezgmvtw.js";
19
- import"./index-jt7hnr7q.js";
17
+ } from "./index-y9t766sw.js";
18
+ import"./index-echdpdhy.js";
19
+ import"./index-w0yztxgq.js";
20
20
  import"./index-kk1scggc.js";
21
21
  import"./index-4905hd2m.js";
22
22
  import"./index-134d35c1.js";
23
23
  import"./index-6n2jpz7x.js";
24
- import"./index-gd5w3ef8.js";
25
- import"./index-0f45t7xy.js";
26
- import"./index-e315gwc9.js";
24
+ import"./index-k5xh81c9.js";
25
+ import"./index-nkhp7j16.js";
26
+ import"./index-3hkbegq2.js";
27
27
  import"./index-vxv732ex.js";
28
28
  import"./index-c8s9a3zh.js";
29
29
  import"./index-9ss2m4rs.js";
30
30
  import"./index-23zsx7dm.js";
31
- import"./index-yq4s3q43.js";
32
- import"./index-1htanqp1.js";
31
+ import"./index-6j9p0c40.js";
32
+ import"./index-kx3533dm.js";
33
33
  import"./index-rtry5xyf.js";
34
- import"./index-1012f47p.js";
35
- import"./index-gbnpz7rh.js";
34
+ import"./index-nmyg9b7v.js";
35
+ import"./index-cnhp6c0k.js";
36
36
  import"./index-ae75rja9.js";
37
37
  import"./index-q27bajqb.js";
38
- import"./index-74xejn4v.js";
38
+ import"./index-abw10n3f.js";
39
39
  import"./index-k5jrywpr.js";
40
40
  import"./index-n832052r.js";
41
- import"./index-r1gdkn2d.js";
41
+ import"./index-c8sqc3nh.js";
42
42
  import"./index-bk5tah7q.js";
43
43
  import"./index-8fwhhayc.js";
44
44
  import"./index-q1exe2b3.js";
45
- import"./index-gnvg72y1.js";
45
+ import"./index-4ff0x4cg.js";
46
46
  import"./index-2tn5h2zp.js";
47
47
  import"./index-1kz6da87.js";
48
- import"./index-g4ef4v3m.js";
48
+ import"./index-w9cb5zwh.js";
49
49
  import"./index-4rhhvd1a.js";
50
50
  import"./index-0cz1ws47.js";
51
51
  import"./index-2445sx3d.js";
@@ -1,38 +1,38 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-d17kqe54.js";
5
- import"./index-dezgmvtw.js";
6
- import"./index-jt7hnr7q.js";
4
+ } from "./index-y9t766sw.js";
5
+ import"./index-echdpdhy.js";
6
+ import"./index-w0yztxgq.js";
7
7
  import"./index-kk1scggc.js";
8
8
  import"./index-4905hd2m.js";
9
9
  import"./index-134d35c1.js";
10
10
  import"./index-6n2jpz7x.js";
11
- import"./index-gd5w3ef8.js";
12
- import"./index-0f45t7xy.js";
13
- import"./index-e315gwc9.js";
11
+ import"./index-k5xh81c9.js";
12
+ import"./index-nkhp7j16.js";
13
+ import"./index-3hkbegq2.js";
14
14
  import"./index-vxv732ex.js";
15
15
  import"./index-c8s9a3zh.js";
16
16
  import"./index-9ss2m4rs.js";
17
17
  import"./index-23zsx7dm.js";
18
- import"./index-yq4s3q43.js";
19
- import"./index-1htanqp1.js";
18
+ import"./index-6j9p0c40.js";
19
+ import"./index-kx3533dm.js";
20
20
  import"./index-rtry5xyf.js";
21
- import"./index-1012f47p.js";
22
- import"./index-gbnpz7rh.js";
21
+ import"./index-nmyg9b7v.js";
22
+ import"./index-cnhp6c0k.js";
23
23
  import"./index-ae75rja9.js";
24
24
  import"./index-q27bajqb.js";
25
- import"./index-74xejn4v.js";
25
+ import"./index-abw10n3f.js";
26
26
  import"./index-k5jrywpr.js";
27
27
  import"./index-n832052r.js";
28
- import"./index-r1gdkn2d.js";
28
+ import"./index-c8sqc3nh.js";
29
29
  import"./index-bk5tah7q.js";
30
30
  import"./index-8fwhhayc.js";
31
31
  import"./index-q1exe2b3.js";
32
- import"./index-gnvg72y1.js";
32
+ import"./index-4ff0x4cg.js";
33
33
  import"./index-2tn5h2zp.js";
34
34
  import"./index-1kz6da87.js";
35
- import"./index-g4ef4v3m.js";
35
+ import"./index-w9cb5zwh.js";
36
36
  import"./index-4rhhvd1a.js";
37
37
  import"./index-0cz1ws47.js";
38
38
  import"./index-2445sx3d.js";
@@ -1,39 +1,39 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-1cxp3b5y.js";
5
- import"./index-d17kqe54.js";
6
- import"./index-dezgmvtw.js";
7
- import"./index-jt7hnr7q.js";
4
+ } from "./index-x1w4cx3n.js";
5
+ import"./index-y9t766sw.js";
6
+ import"./index-echdpdhy.js";
7
+ import"./index-w0yztxgq.js";
8
8
  import"./index-kk1scggc.js";
9
9
  import"./index-4905hd2m.js";
10
10
  import"./index-134d35c1.js";
11
11
  import"./index-6n2jpz7x.js";
12
- import"./index-gd5w3ef8.js";
13
- import"./index-0f45t7xy.js";
14
- import"./index-e315gwc9.js";
12
+ import"./index-k5xh81c9.js";
13
+ import"./index-nkhp7j16.js";
14
+ import"./index-3hkbegq2.js";
15
15
  import"./index-vxv732ex.js";
16
16
  import"./index-c8s9a3zh.js";
17
17
  import"./index-9ss2m4rs.js";
18
18
  import"./index-23zsx7dm.js";
19
- import"./index-yq4s3q43.js";
20
- import"./index-1htanqp1.js";
19
+ import"./index-6j9p0c40.js";
20
+ import"./index-kx3533dm.js";
21
21
  import"./index-rtry5xyf.js";
22
- import"./index-1012f47p.js";
23
- import"./index-gbnpz7rh.js";
22
+ import"./index-nmyg9b7v.js";
23
+ import"./index-cnhp6c0k.js";
24
24
  import"./index-ae75rja9.js";
25
25
  import"./index-q27bajqb.js";
26
- import"./index-74xejn4v.js";
26
+ import"./index-abw10n3f.js";
27
27
  import"./index-k5jrywpr.js";
28
28
  import"./index-n832052r.js";
29
- import"./index-r1gdkn2d.js";
29
+ import"./index-c8sqc3nh.js";
30
30
  import"./index-bk5tah7q.js";
31
31
  import"./index-8fwhhayc.js";
32
32
  import"./index-q1exe2b3.js";
33
- import"./index-gnvg72y1.js";
33
+ import"./index-4ff0x4cg.js";
34
34
  import"./index-2tn5h2zp.js";
35
35
  import"./index-1kz6da87.js";
36
- import"./index-g4ef4v3m.js";
36
+ import"./index-w9cb5zwh.js";
37
37
  import"./index-4rhhvd1a.js";
38
38
  import"./index-0cz1ws47.js";
39
39
  import"./index-2445sx3d.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-qzkcy22e.js";
5
- import"./index-dezgmvtw.js";
6
- import"./index-r1gdkn2d.js";
4
+ } from "./index-1p9z8cc4.js";
5
+ import"./index-echdpdhy.js";
6
+ import"./index-c8sqc3nh.js";
7
7
  import"./index-bk5tah7q.js";
8
8
  import"./index-z6xqpmqg.js";
9
9
  import"./index-zjygnfay.js";
@@ -7,40 +7,40 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-d17kqe54.js";
11
- import"./index-dezgmvtw.js";
12
- import"./index-jt7hnr7q.js";
10
+ } from "./index-y9t766sw.js";
11
+ import"./index-echdpdhy.js";
12
+ import"./index-w0yztxgq.js";
13
13
  import"./index-kk1scggc.js";
14
14
  import"./index-4905hd2m.js";
15
15
  import"./index-134d35c1.js";
16
16
  import"./index-6n2jpz7x.js";
17
- import"./index-gd5w3ef8.js";
18
- import"./index-0f45t7xy.js";
19
- import"./index-e315gwc9.js";
17
+ import"./index-k5xh81c9.js";
18
+ import"./index-nkhp7j16.js";
19
+ import"./index-3hkbegq2.js";
20
20
  import"./index-vxv732ex.js";
21
21
  import"./index-c8s9a3zh.js";
22
22
  import"./index-9ss2m4rs.js";
23
23
  import"./index-23zsx7dm.js";
24
- import"./index-yq4s3q43.js";
25
- import"./index-1htanqp1.js";
24
+ import"./index-6j9p0c40.js";
25
+ import"./index-kx3533dm.js";
26
26
  import"./index-rtry5xyf.js";
27
27
  import {
28
28
  resolveHiveKnowledgePath
29
- } from "./index-1012f47p.js";
30
- import"./index-gbnpz7rh.js";
29
+ } from "./index-nmyg9b7v.js";
30
+ import"./index-cnhp6c0k.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-q27bajqb.js";
33
- import"./index-74xejn4v.js";
33
+ import"./index-abw10n3f.js";
34
34
  import"./index-k5jrywpr.js";
35
35
  import"./index-n832052r.js";
36
- import"./index-r1gdkn2d.js";
36
+ import"./index-c8sqc3nh.js";
37
37
  import"./index-bk5tah7q.js";
38
38
  import"./index-8fwhhayc.js";
39
39
  import"./index-q1exe2b3.js";
40
- import"./index-gnvg72y1.js";
40
+ import"./index-4ff0x4cg.js";
41
41
  import"./index-2tn5h2zp.js";
42
42
  import"./index-1kz6da87.js";
43
- import"./index-g4ef4v3m.js";
43
+ import"./index-w9cb5zwh.js";
44
44
  import"./index-4rhhvd1a.js";
45
45
  import"./index-0cz1ws47.js";
46
46
  import"./index-2445sx3d.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-dezgmvtw.js";
5
+ } from "./index-echdpdhy.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-1012f47p.js";
5
+ } from "./index-nmyg9b7v.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";