@mmerterden/multi-agent-pipeline 18.0.0 → 19.1.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.
Files changed (234) hide show
  1. package/CHANGELOG.md +287 -0
  2. package/README.md +36 -20
  3. package/README.tr.md +14 -16
  4. package/docs/adr/0002-instruction-driven-flag.md +1 -0
  5. package/docs/adr/0005-lazy-phase-docs.md +11 -1
  6. package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +1 -0
  7. package/docs/adr/0010-own-code-graph.md +1 -0
  8. package/docs/adr/0014-six-phase-consolidation.md +134 -0
  9. package/docs/adr/README.md +2 -1
  10. package/docs/architecture.md +37 -38
  11. package/docs/best-practices.md +1 -1
  12. package/docs/ecosystem.md +46 -27
  13. package/docs/engineering.md +1 -1
  14. package/docs/facts.json +61 -0
  15. package/docs/features.md +55 -54
  16. package/docs/performance.md +5 -5
  17. package/docs/recovery-guide.md +17 -17
  18. package/docs/token-budget-history.md +3 -1
  19. package/index.js +2 -2
  20. package/install/_codex-agents.mjs +1 -1
  21. package/install/templates/claude-hooks.json +1 -1
  22. package/install/templates/codex-instructions.md +1 -1
  23. package/install/templates/copilot-instructions.md +28 -28
  24. package/manifest.json +234 -216
  25. package/package.json +2 -2
  26. package/pipeline/agents/dev-critic.md +7 -7
  27. package/pipeline/commands/figma-to-swiftui.md +1 -1
  28. package/pipeline/commands/multi-agent/SKILL.md +9 -9
  29. package/pipeline/commands/multi-agent/analysis/SKILL.md +15 -15
  30. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +2 -2
  31. package/pipeline/commands/multi-agent/autopilot/SKILL.md +7 -7
  32. package/pipeline/commands/multi-agent/channels/SKILL.md +15 -15
  33. package/pipeline/commands/multi-agent/diff-explain/SKILL.md +6 -6
  34. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
  35. package/pipeline/commands/multi-agent/graph/SKILL.md +1 -1
  36. package/pipeline/commands/multi-agent/help/SKILL.md +62 -62
  37. package/pipeline/commands/multi-agent/language/SKILL.md +2 -2
  38. package/pipeline/commands/multi-agent/local/SKILL.md +11 -11
  39. package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +13 -13
  40. package/pipeline/commands/multi-agent/log/SKILL.md +2 -2
  41. package/pipeline/commands/multi-agent/manual-test/SKILL.md +9 -9
  42. package/pipeline/commands/multi-agent/model/SKILL.md +69 -0
  43. package/pipeline/commands/multi-agent/refactor/SKILL.md +3 -3
  44. package/pipeline/commands/multi-agent/resume/SKILL.md +4 -4
  45. package/pipeline/commands/multi-agent/resume-local/SKILL.md +19 -17
  46. package/pipeline/commands/multi-agent/review/SKILL.md +2 -2
  47. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +1 -1
  48. package/pipeline/commands/multi-agent/route-off/SKILL.md +36 -0
  49. package/pipeline/commands/multi-agent/route-on/SKILL.md +74 -0
  50. package/pipeline/commands/multi-agent/route-status/SKILL.md +56 -0
  51. package/pipeline/commands/multi-agent/setup/SKILL.md +2 -2
  52. package/pipeline/commands/multi-agent/status/SKILL.md +5 -5
  53. package/pipeline/commands/multi-agent/steer/SKILL.md +2 -2
  54. package/pipeline/commands/multi-agent/sync/SKILL.md +12 -13
  55. package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
  56. package/pipeline/lib/credential-inventory.sh +1 -1
  57. package/pipeline/lib/fetch-fortify.sh +1 -1
  58. package/pipeline/lib/model-dispatch.sh +140 -0
  59. package/pipeline/lib/model-rung.sh +142 -0
  60. package/pipeline/lib/outbound-gate.mjs +14 -0
  61. package/pipeline/lib/phase-schema.mjs +88 -0
  62. package/pipeline/lib/plan-todos.sh +5 -5
  63. package/pipeline/lib/route-state.sh +161 -0
  64. package/pipeline/lib/run-paths.sh +2 -2
  65. package/pipeline/multi-agent-refs/_account-picker.md +1 -1
  66. package/pipeline/multi-agent-refs/_dev-context.md +6 -6
  67. package/pipeline/multi-agent-refs/_input-parser.md +1 -1
  68. package/pipeline/multi-agent-refs/analysis/evidence.md +2 -11
  69. package/pipeline/multi-agent-refs/analysis/intake.md +7 -7
  70. package/pipeline/multi-agent-refs/analysis/locked.md +48 -22
  71. package/pipeline/multi-agent-refs/analysis/redesign.md +1 -1
  72. package/pipeline/multi-agent-refs/analysis/render.md +10 -10
  73. package/pipeline/multi-agent-refs/analysis/resolve.md +1 -1
  74. package/pipeline/multi-agent-refs/analysis/review.md +2 -2
  75. package/pipeline/multi-agent-refs/analysis/synthesis.md +13 -7
  76. package/pipeline/multi-agent-refs/analysis-template-corporate.md +9 -9
  77. package/pipeline/multi-agent-refs/analysis-template.md +19 -19
  78. package/pipeline/multi-agent-refs/android-guide.md +1 -1
  79. package/pipeline/multi-agent-refs/audit-guide.md +13 -13
  80. package/pipeline/multi-agent-refs/channels/issue-comment.md +2 -2
  81. package/pipeline/multi-agent-refs/channels/jira.md +3 -3
  82. package/pipeline/multi-agent-refs/channels/pr.md +4 -4
  83. package/pipeline/multi-agent-refs/channels/wiki.md +1 -1
  84. package/pipeline/multi-agent-refs/component-dispatch.md +8 -8
  85. package/pipeline/multi-agent-refs/conventions-defaults.md +2 -2
  86. package/pipeline/multi-agent-refs/cross-cli-contract.md +31 -6
  87. package/pipeline/multi-agent-refs/features/analysis-jira.md +1 -1
  88. package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +4 -4
  89. package/pipeline/multi-agent-refs/features/code-graph.md +5 -5
  90. package/pipeline/multi-agent-refs/features/design-conformance.md +1 -1
  91. package/pipeline/multi-agent-refs/features/dev-critic.md +3 -3
  92. package/pipeline/multi-agent-refs/features/doctor.md +3 -3
  93. package/pipeline/multi-agent-refs/features/external-context-injection.md +3 -3
  94. package/pipeline/multi-agent-refs/features/maturity-followup.md +3 -3
  95. package/pipeline/multi-agent-refs/features/model-fallback.md +41 -5
  96. package/pipeline/multi-agent-refs/features/plan-todos.md +1 -1
  97. package/pipeline/multi-agent-refs/features/repo-map.md +1 -1
  98. package/pipeline/multi-agent-refs/features/review-delta.md +3 -3
  99. package/pipeline/multi-agent-refs/features/review-multi-repo.md +2 -2
  100. package/pipeline/multi-agent-refs/features/scope-check.md +4 -4
  101. package/pipeline/multi-agent-refs/features/skill-conformance.md +2 -2
  102. package/pipeline/multi-agent-refs/features/stack-skill-routing.md +1 -1
  103. package/pipeline/multi-agent-refs/features/url-enrichment.md +1 -1
  104. package/pipeline/multi-agent-refs/features/verify-by-test.md +4 -4
  105. package/pipeline/multi-agent-refs/features/visual-evidence.md +19 -19
  106. package/pipeline/multi-agent-refs/features/worktree-finalize.md +6 -6
  107. package/pipeline/multi-agent-refs/issue-jira-triad.md +10 -10
  108. package/pipeline/multi-agent-refs/knowledge.md +11 -11
  109. package/pipeline/multi-agent-refs/multi-repo-integration-build.md +13 -13
  110. package/pipeline/multi-agent-refs/payload-contracts.md +8 -8
  111. package/pipeline/multi-agent-refs/phases/log-format.md +10 -10
  112. package/pipeline/multi-agent-refs/phases/modes.md +30 -30
  113. package/pipeline/multi-agent-refs/phases/operations.md +8 -8
  114. package/pipeline/multi-agent-refs/phases/phase-0-init.md +24 -24
  115. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +599 -0
  116. package/pipeline/multi-agent-refs/phases/{phase-3-dev.md → phase-2-dev.md} +129 -49
  117. package/pipeline/multi-agent-refs/phases/{phase-4-review.md → phase-3-review.md} +225 -107
  118. package/pipeline/multi-agent-refs/phases/{phase-6-commit.md → phase-4-commit.md} +23 -23
  119. package/pipeline/multi-agent-refs/phases/{phase-7-report.md → phase-5-report.md} +29 -29
  120. package/pipeline/multi-agent-refs/phases.md +44 -48
  121. package/pipeline/multi-agent-refs/picker-contract.md +1 -1
  122. package/pipeline/multi-agent-refs/progress-contract.md +6 -6
  123. package/pipeline/multi-agent-refs/readiness-review.md +1 -1
  124. package/pipeline/multi-agent-refs/rules.md +7 -7
  125. package/pipeline/multi-agent-refs/swiftui-guide.md +2 -2
  126. package/pipeline/multi-agent-refs/tracker-contract.md +31 -32
  127. package/pipeline/multi-agent-refs/wiki-capture.md +14 -14
  128. package/pipeline/preferences-template.json +9 -1
  129. package/pipeline/rules/figma-pipeline.md +8 -8
  130. package/pipeline/rules/outside-the-pipeline.md +1 -1
  131. package/pipeline/schemas/agent-state.schema.json +50 -50
  132. package/pipeline/schemas/analysis-output.schema.json +3 -3
  133. package/pipeline/schemas/analysis-spec.schema.json +2 -2
  134. package/pipeline/schemas/autopilot-config.schema.json +1 -1
  135. package/pipeline/schemas/code-graph.schema.json +1 -1
  136. package/pipeline/schemas/criteria-manifest.schema.json +1 -1
  137. package/pipeline/schemas/dev-critic-output.schema.json +1 -1
  138. package/pipeline/schemas/diff-risk.schema.json +1 -1
  139. package/pipeline/schemas/figma-project-config.schema.json +1 -1
  140. package/pipeline/schemas/migrations/prefs-2.4.0-to-2.5.0.mjs +2 -2
  141. package/pipeline/schemas/migrations/prefs-2.6.0-to-2.7.0.mjs +31 -0
  142. package/pipeline/schemas/migrations/state-2.1.0-to-2.2.0.mjs +129 -0
  143. package/pipeline/schemas/phases.json +105 -0
  144. package/pipeline/schemas/plan-todos.schema.json +5 -5
  145. package/pipeline/schemas/planning-output.schema.json +1 -1
  146. package/pipeline/schemas/prefs.schema.json +102 -58
  147. package/pipeline/schemas/reviewer-output.schema.json +3 -3
  148. package/pipeline/schemas/route-config.schema.json +74 -0
  149. package/pipeline/schemas/scope-check.schema.json +1 -1
  150. package/pipeline/schemas/secret-patterns.json +124 -0
  151. package/pipeline/schemas/test-gap.schema.json +1 -1
  152. package/pipeline/schemas/token-budget.json +12 -18
  153. package/pipeline/schemas/triage-output.schema.json +6 -6
  154. package/pipeline/scripts/README.md +3 -3
  155. package/pipeline/scripts/_code-graph.mjs +2 -2
  156. package/pipeline/scripts/_run-paths.mjs +2 -2
  157. package/pipeline/scripts/_smoke-root.sh +1 -1
  158. package/pipeline/scripts/aggregate-metrics.mjs +1 -1
  159. package/pipeline/scripts/build-references.mjs +2 -2
  160. package/pipeline/scripts/bulk-read.sh +10 -1
  161. package/pipeline/scripts/capture-flush.sh +8 -8
  162. package/pipeline/scripts/capture-resume.sh +3 -3
  163. package/pipeline/scripts/classify-plan-safety.mjs +1 -1
  164. package/pipeline/scripts/cost-table.json +8 -1
  165. package/pipeline/scripts/diff-explain.mjs +1 -1
  166. package/pipeline/scripts/doctor.mjs +3 -3
  167. package/pipeline/scripts/gc-abandoned.sh +3 -3
  168. package/pipeline/scripts/gc-tmp.sh +1 -1
  169. package/pipeline/scripts/gc-worktrees.sh +1 -1
  170. package/pipeline/scripts/gen-facts.mjs +280 -0
  171. package/pipeline/scripts/gen-mode-dispatch.mjs +32 -37
  172. package/pipeline/scripts/gen-ref-toc.mjs +1 -1
  173. package/pipeline/scripts/graph-report.mjs +1 -1
  174. package/pipeline/scripts/jira-attach.sh +1 -1
  175. package/pipeline/scripts/learn-from-transcripts.mjs +1 -1
  176. package/pipeline/scripts/learning-curve.mjs +2 -2
  177. package/pipeline/scripts/log-metric.sh +17 -4
  178. package/pipeline/scripts/memory-save.sh +1 -1
  179. package/pipeline/scripts/migrate-prefs.mjs +22 -5
  180. package/pipeline/scripts/phase-banner.sh +20 -20
  181. package/pipeline/scripts/phase-tracker.sh +12 -12
  182. package/pipeline/scripts/plan-coverage-gate.mjs +2 -2
  183. package/pipeline/scripts/pre-commit-check.sh +30 -1
  184. package/pipeline/scripts/render-agent-log-cost.sh +1 -1
  185. package/pipeline/scripts/render-work-summary.sh +3 -3
  186. package/pipeline/scripts/review-file-filter.mjs +1 -1
  187. package/pipeline/scripts/run-aggregator.mjs +13 -6
  188. package/pipeline/scripts/run-metrics.mjs +1 -1
  189. package/pipeline/scripts/runs-index.mjs +11 -1
  190. package/pipeline/scripts/scan-skills.sh +26 -0
  191. package/pipeline/scripts/smoke-cross-cli-behavior.sh +6 -6
  192. package/pipeline/scripts/smoke-schema-validation.sh +26 -7
  193. package/pipeline/scripts/token-budget-report.mjs +13 -2
  194. package/pipeline/scripts/triage-memory.mjs +2 -2
  195. package/pipeline/scripts/validate-analysis-doc.mjs +274 -43
  196. package/pipeline/scripts/validate-planning.mjs +1 -1
  197. package/pipeline/scripts/validate-reviewer.mjs +1 -1
  198. package/pipeline/scripts/validate-state.mjs +45 -5
  199. package/pipeline/scripts/validate-triage.mjs +3 -3
  200. package/pipeline/scripts/verify-citations.mjs +1 -1
  201. package/pipeline/scripts/worktree-finalize.sh +5 -5
  202. package/pipeline/scripts/write-state.mjs +32 -0
  203. package/pipeline/skills/.skill-manifest.json +38 -22
  204. package/pipeline/skills/.skills-index.json +49 -5
  205. package/pipeline/skills/shared/README.md +10 -6
  206. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +8 -8
  207. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +8 -8
  208. package/pipeline/skills/shared/core/multi-agent/SKILL.md +81 -82
  209. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +3 -3
  210. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +14 -14
  211. package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +5 -5
  212. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +1 -1
  213. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +25 -23
  214. package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +2 -2
  215. package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +2 -2
  216. package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +8 -8
  217. package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +6 -6
  218. package/pipeline/skills/shared/core/multi-agent-model/SKILL.md +71 -0
  219. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +3 -3
  220. package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
  221. package/pipeline/skills/shared/core/multi-agent-resume-local/SKILL.md +7 -7
  222. package/pipeline/skills/shared/core/multi-agent-route-off/SKILL.md +39 -0
  223. package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +76 -0
  224. package/pipeline/skills/shared/core/multi-agent-route-status/SKILL.md +59 -0
  225. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -1
  226. package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +5 -5
  227. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +2 -2
  228. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +6 -5
  229. package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +1 -1
  230. package/pipeline/skills/shared/external/signal-community/SKILL.md +8 -1
  231. package/pipeline/skills/skills-index.md +8 -4
  232. package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +0 -263
  233. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +0 -344
  234. package/pipeline/multi-agent-refs/phases/phase-5-test.md +0 -182
@@ -14,8 +14,8 @@
14
14
  "properties": {
15
15
  "schemaVersion": {
16
16
  "type": "string",
17
- "enum": ["2.0.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0", "2.5.0", "2.6.0"],
18
- "description": "v2.0.0: pre-v3.7. v2.1.0: v3.7+ adds identities[].servicePatMap, platformIdentityRouting, recentGroups, recentBranches, serviceStatus, settings, expanded keychainMapping. v2.2.0: v6.0.0 formalizes v5.7 / v5.8 additions (reportChannels, reportContent with technicalAnalysis, wikiScope, autopilotReportTimeoutSeconds) that had been running as 2.1.0 sub-migrations without a proper version bump. v2.5.0: v14.0.0 adds global.skillConformance (Phase 4 criteria resolution) and declares global.ship.autoFix, which the tail command's spec had referenced as global.finish.autoFix without ever declaring it. v2.6.0: v15.0.0 renames global.ship to global.resumeLocal (/multi-agent:ship -> :resume-local)."
17
+ "enum": ["2.0.0", "2.1.0", "2.2.0", "2.3.0", "2.4.0", "2.5.0", "2.6.0", "2.7.0"],
18
+ "description": "v2.0.0: pre-v3.7. v2.1.0: v3.7+ adds identities[].servicePatMap, platformIdentityRouting, recentGroups, recentBranches, serviceStatus, settings, expanded keychainMapping. v2.2.0: v6.0.0 formalizes v5.7 / v5.8 additions (reportChannels, reportContent with technicalAnalysis, wikiScope, autopilotReportTimeoutSeconds) that had been running as 2.1.0 sub-migrations without a proper version bump. v2.5.0: v14.0.0 adds global.skillConformance (Phase 4 criteria resolution) and declares global.ship.autoFix, which the tail command's spec had referenced as global.finish.autoFix without ever declaring it. v2.6.0: v15.0.0 renames global.ship to global.resumeLocal (/multi-agent:ship -> :resume-local). v2.7.0: v19.0.0 drops the analysis Lite mode (global.analysisPhase.mode keeps a single value 'full') and adds global.modelRouting, which ships disabled."
19
19
  },
20
20
  "global": {
21
21
  "type": "object",
@@ -369,7 +369,7 @@
369
369
  },
370
370
  "multiRepoIntegrationHosts": {
371
371
  "type": "array",
372
- "description": "v5.6.0+. Learn-once registry of host projects that build together with a multi-repo combo (codegen producer → consumer + host integration project). Pipeline checks this registry in Phase 6 before commit; on match, auto-runs the host build. On miss for a ≥2-repo task, prompts the user once and persists the answer. See refs/multi-repo-integration-build.md for the full contract.",
372
+ "description": "v5.6.0+. Learn-once registry of host projects that build together with a multi-repo combo (codegen producer → consumer + host integration project). Pipeline checks this registry in Phase 4 before commit; on match, auto-runs the host build. On miss for a ≥2-repo task, prompts the user once and persists the answer. See refs/multi-repo-integration-build.md for the full contract.",
373
373
  "items": {
374
374
  "type": "object",
375
375
  "additionalProperties": false,
@@ -470,14 +470,14 @@
470
470
  "minimum": 1,
471
471
  "maximum": 20,
472
472
  "default": 5,
473
- "description": "Phase 6 push-must-succeed rebase-retry count before prompting user."
473
+ "description": "Phase 4 push-must-succeed rebase-retry count before prompting user."
474
474
  },
475
475
  "buildRetryMax": {
476
476
  "type": "integer",
477
477
  "minimum": 1,
478
478
  "maximum": 10,
479
479
  "default": 3,
480
- "description": "Phase 3 build retry count before prompting user."
480
+ "description": "Phase 2 build retry count before prompting user."
481
481
  },
482
482
  "serviceStatusCacheSeconds": {
483
483
  "type": "integer",
@@ -506,12 +506,12 @@
506
506
  "pushMustSucceed": {
507
507
  "type": "boolean",
508
508
  "default": true,
509
- "description": "Phase 6 policy. When true, commit + push with rebase-retry up to pushRetryMax. When false, single push attempt, pause on fail."
509
+ "description": "Phase 4 policy. When true, commit + push with rebase-retry up to pushRetryMax. When false, single push attempt, pause on fail."
510
510
  },
511
511
  "worktreeAutoRemoveOnPr": {
512
512
  "type": "boolean",
513
513
  "default": true,
514
- "description": "v14.1.0+ - Phase 6 policy. When true, a task's worktree is removed once its PR is open: artefacts (agent-state, triage output, .pipeline/, build+test logs) are salvaged into the log dir first, then `git worktree remove` runs. The BRANCH is kept and is NOT checked out, so the user's own HEAD and uncommitted work are untouched. Default true because the complaint it answers is forgetting to clean up, and every destructive path is gated: a worktree with real uncommitted changes, an unpushed HEAD, --local mode, or a cwd inside the worktree all skip with a reason. Set false to keep worktrees until /multi-agent:kill or :garbage-collect."
514
+ "description": "v14.1.0+ - Phase 4 policy. When true, a task's worktree is removed once its PR is open: artefacts (agent-state, triage output, .pipeline/, build+test logs) are salvaged into the log dir first, then `git worktree remove` runs. The BRANCH is kept and is NOT checked out, so the user's own HEAD and uncommitted work are untouched. Default true because the complaint it answers is forgetting to clean up, and every destructive path is gated: a worktree with real uncommitted changes, an unpushed HEAD, --local mode, or a cwd inside the worktree all skip with a reason. Set false to keep worktrees until /multi-agent:kill or :garbage-collect."
515
515
  }
516
516
  }
517
517
  },
@@ -560,7 +560,7 @@
560
560
  "fableEnabled": {
561
561
  "type": "boolean",
562
562
  "default": false,
563
- "description": "Whether the fable rung is available at all on Claude Code. Ships OFF: the top rung is the most expensive thing a run can reach, and a cost control that is on by default is not a control. false makes every persona that declares preferredModel: fable dispatch on opus from the first call, with no dispatch attempt on fable and no error to recover from - a cost control, not a fallback. Claude Code only: Copilot CLI does not offer Fable 5, and on Codex CLI the fable rung means gpt-5.6 @ xhigh, which this switch deliberately does not touch. Turning it off also collapses the Phase 4 Claude Code reviewer panel from three to two (Reviewer 1 lands on opus, which Reviewer 2 already holds), and consensus.reviewerCount records 2."
563
+ "description": "Whether the fable rung is available at all on Claude Code. Ships OFF: the top rung is the most expensive thing a run can reach, and a cost control that is on by default is not a control. false makes every persona that declares preferredModel: fable dispatch on opus from the first call, with no dispatch attempt on fable and no error to recover from - a cost control, not a fallback. Claude Code only: Copilot CLI does not offer Fable 5, and on Codex CLI the fable rung means gpt-5.6 @ xhigh, which this switch deliberately does not touch. Turning it off also collapses the Phase 3 Claude Code reviewer panel from three to two (Reviewer 1 lands on opus, which Reviewer 2 already holds), and consensus.reviewerCount records 2."
564
564
  },
565
565
  "onDispatchError": {
566
566
  "type": "boolean",
@@ -569,6 +569,50 @@
569
569
  }
570
570
  }
571
571
  },
572
+ "modelRouting": {
573
+ "type": "object",
574
+ "description": "Policy-driven model selection. Ships DISABLED and changes no dispatch behaviour while enabled is false. Full contract and the reason `scope` has no host-session member: pipeline/schemas/route-config.schema.json. Written by /multi-agent:route-on, cleared of its on-state (not its rules) by /multi-agent:route-off, reported by /multi-agent:route-status.",
575
+ "additionalProperties": false,
576
+ "required": ["enabled"],
577
+ "properties": {
578
+ "enabled": {
579
+ "type": "boolean",
580
+ "default": false,
581
+ "description": "Master switch. Ships false."
582
+ },
583
+ "strategy": {
584
+ "type": "string",
585
+ "enum": ["manual", "task-fit", "cost-ceiling"],
586
+ "default": "manual"
587
+ },
588
+ "scope": {
589
+ "type": "array",
590
+ "default": ["subagent"],
591
+ "uniqueItems": true,
592
+ "items": {
593
+ "type": "string",
594
+ "enum": ["subagent", "bulk-read", "research"]
595
+ },
596
+ "description": "No host-session member, deliberately: rewriting the host's base URL would route the user's whole session, not just this pipeline's calls."
597
+ },
598
+ "rules": {
599
+ "type": "array",
600
+ "default": [],
601
+ "items": {
602
+ "type": "object"
603
+ }
604
+ },
605
+ "budgetCeilingUsd": {
606
+ "type": ["number", "null"],
607
+ "default": null,
608
+ "minimum": 0
609
+ },
610
+ "recordDecisions": {
611
+ "type": "boolean",
612
+ "default": true
613
+ }
614
+ }
615
+ },
572
616
  "hosts": {
573
617
  "type": "object",
574
618
  "additionalProperties": false,
@@ -665,12 +709,12 @@
665
709
  "fortify": {
666
710
  "type": "object",
667
711
  "additionalProperties": false,
668
- "description": "v15.14+ - Fortify SSC behaviour. The host and the API token live in global.hosts.fortify and global.keychainMapping.fortify; this object holds the two things that are neither. Phase 4 Gate 5 read `fortify.alwaysCheck` from the moment it shipped, but global was closed to additional properties and this object did not exist, so setting it failed validation and the gate could only ever run off a referenced URL.",
712
+ "description": "v15.14+ - Fortify SSC behaviour. The host and the API token live in global.hosts.fortify and global.keychainMapping.fortify; this object holds the two things that are neither. Phase 3 Gate 5 read `fortify.alwaysCheck` from the moment it shipped, but global was closed to additional properties and this object did not exist, so setting it failed validation and the gate could only ever run off a referenced URL.",
669
713
  "properties": {
670
714
  "alwaysCheck": {
671
715
  "type": "boolean",
672
716
  "default": false,
673
- "description": "Run the Phase 4 Fortify gate on every run, not only when the task referenced a finding. Needs versionIds to know what to scan."
717
+ "description": "Run the Phase 3 Fortify gate on every run, not only when the task referenced a finding. Needs versionIds to know what to scan."
674
718
  },
675
719
  "versionIds": {
676
720
  "type": "array",
@@ -685,7 +729,7 @@
685
729
  "reportChannels": {
686
730
  "type": "object",
687
731
  "additionalProperties": false,
688
- "description": "v5.7+ - Phase 7 / /multi-agent:channels kanal seçimi default'ları. Multi-select menüde tick'li gelecek kanallar. Her kanal bağımsız boolean. Autopilot Phase 7'de ALWAYS pauses (30-min timeout) - bu değerler sadece menünün önceden seçili halini belirler.",
732
+ "description": "v5.7+ - Phase 5 / /multi-agent:channels kanal seçimi default'ları. Multi-select menüde tick'li gelecek kanallar. Her kanal bağımsız boolean. Autopilot Phase 5'de ALWAYS pauses (30-min timeout) - bu değerler sadece menünün önceden seçili halini belirler.",
689
733
  "properties": {
690
734
  "pr": {
691
735
  "type": "boolean",
@@ -718,7 +762,7 @@
718
762
  "reportContent": {
719
763
  "type": "object",
720
764
  "additionalProperties": false,
721
- "description": "v5.7+ - Phase 7 / /multi-agent:channels içerik seçimi default'ları. Multi-select menüde tick'li gelecek content source'ları.",
765
+ "description": "v5.7+ - Phase 5 / /multi-agent:channels içerik seçimi default'ları. Multi-select menüde tick'li gelecek content source'ları.",
722
766
  "properties": {
723
767
  "normalAnalysis": {
724
768
  "type": "boolean",
@@ -728,7 +772,7 @@
728
772
  "technicalAnalysis": {
729
773
  "type": "boolean",
730
774
  "default": false,
731
- "description": "Changes (değişen dosyalar gruplanıp ne/neden), Architecture (structural decisions), Dependencies (yeni import/framework/paket). PR body'deki 'Technical Details' bölümünün özeti; user'ın kanal seçimi PR içermediği durumlarda (ör. sadece Jira/Confluence) teknik içerik aktarmak istiyorsa devreye girer. Source: Phase 2 planning + Phase 3 dev log + PR diff stat."
775
+ "description": "Changes (değişen dosyalar gruplanıp ne/neden), Architecture (structural decisions), Dependencies (yeni import/framework/paket). PR body'deki 'Technical Details' bölümünün özeti; user'ın kanal seçimi PR içermediği durumlarda (ör. sadece Jira/Confluence) teknik içerik aktarmak istiyorsa devreye girer. Source: Phase 1 planning + Phase 2 dev log + PR diff stat."
732
776
  },
733
777
  "testScenarios": {
734
778
  "type": "boolean",
@@ -753,7 +797,7 @@
753
797
  "workSummary": {
754
798
  "type": "boolean",
755
799
  "default": false,
756
- "description": "v7.1.0+ - Executive 'Work Done' summary block. Distills the whole pipeline run into a single-screen section: task + branch + base + PR number, scope delivered (✅/⏳ per Phase 2 task), changed files with +/- counts (capped at 20 rows), review outcome (accepted/deferred/rejected counts + approved flag), and a one-line phase tick strip (0 Init ✅ · 1 Analysis ✅ · ...). Source: `agent-state.json` + `phase-tracker.json` + `git diff --numstat` between `baseBranch`...HEAD. Consumed by `render-work-summary.sh`. Greyed out if no state file exists for the task. Opt-in - off by default so baseline PR body stays unchanged."
800
+ "description": "v7.1.0+ - Executive 'Work Done' summary block. Distills the whole pipeline run into a single-screen section: task + branch + base + PR number, scope delivered (✅/⏳ per Phase 1 task), changed files with +/- counts (capped at 20 rows), review outcome (accepted/deferred/rejected counts + approved flag), and a one-line phase tick strip (0 Init ✅ · 1 Analysis ✅ · ...). Source: `agent-state.json` + `phase-tracker.json` + `git diff --numstat` between `baseBranch`...HEAD. Consumed by `render-work-summary.sh`. Greyed out if no state file exists for the task. Opt-in - off by default so baseline PR body stays unchanged."
757
801
  }
758
802
  },
759
803
  "default": {
@@ -771,7 +815,7 @@
771
815
  "default": 1800,
772
816
  "minimum": 60,
773
817
  "maximum": 7200,
774
- "description": "v5.7+ - Phase 7'de autopilot always-pause menüsünde kullanıcı cevap vermezse session'ı sonlandırma süresi (saniye). Default 1800 (30 dk). Timeout'ta external delivery aborted, internal capture (agent-log, telemetry, knowledge) yine çalışır, session /multi-agent:resume ile devam ettirilebilir."
818
+ "description": "v5.7+ - Phase 5'de autopilot always-pause menüsünde kullanıcı cevap vermezse session'ı sonlandırma süresi (saniye). Default 1800 (30 dk). Timeout'ta external delivery aborted, internal capture (agent-log, telemetry, knowledge) yine çalışır, session /multi-agent:resume ile devam ettirilebilir."
775
819
  },
776
820
  "wikiScope": {
777
821
  "type": "array",
@@ -814,7 +858,7 @@
814
858
  "triageCrossCheck": {
815
859
  "type": "object",
816
860
  "additionalProperties": false,
817
- "description": "Optional second-opinion check on Phase 4 triage decisions. When enabled, a configurable percentage of triage outputs are re-classified by Sonnet and the diff vs. Opus's verdict is logged for audit. Mitigates the single-point-of-failure risk that Opus triage hallucinates or drifts. Adds latency + cost; default off.",
861
+ "description": "Optional second-opinion check on Phase 3 triage decisions. When enabled, a configurable percentage of triage outputs are re-classified by Sonnet and the diff vs. Opus's verdict is logged for audit. Mitigates the single-point-of-failure risk that Opus triage hallucinates or drifts. Adds latency + cost; default off.",
818
862
  "properties": {
819
863
  "enabled": {
820
864
  "type": "boolean",
@@ -837,19 +881,19 @@
837
881
  "blockOnDisagreement": {
838
882
  "type": "boolean",
839
883
  "default": false,
840
- "description": "If true, a cross-check disagreement pauses Phase 5/6 for human review. If false (default), the disagreement is logged to metrics.jsonl as `triage.cross_check_diff` and the pipeline proceeds with Opus's original verdict."
884
+ "description": "If true, a cross-check disagreement pauses Phase 3/4 for human review. If false (default), the disagreement is logged to metrics.jsonl as `triage.cross_check_diff` and the pipeline proceeds with Opus's original verdict."
841
885
  }
842
886
  }
843
887
  },
844
888
  "testBaseline": {
845
889
  "type": "object",
846
890
  "additionalProperties": false,
847
- "description": "Phase 0 test baseline. When enabled, Phase 0 runs the SAME test command Phase 4 Gate 3 uses and records which tests were already failing before this run touched anything, so Phase 4 stops attributing an inherited red suite to the current work. Three outcomes are stored, never two: green, red (with the failing set when it can be parsed, otherwise the log path alone), or unknown when the command is absent or the time cap was hit. Off by default because on iOS the run costs a full xcodebuild test before any work starts. Pattern source: obra/superpowers using-git-worktrees Step 3 'Verify Clean Baseline', extended from ask-the-user to a stored set Phase 4 can subtract.",
891
+ "description": "Phase 0 test baseline. When enabled, Phase 0 runs the SAME test command Phase 3 Gate 3 uses and records which tests were already failing before this run touched anything, so Phase 3 stops attributing an inherited red suite to the current work. Three outcomes are stored, never two: green, red (with the failing set when it can be parsed, otherwise the log path alone), or unknown when the command is absent or the time cap was hit. Off by default because on iOS the run costs a full xcodebuild test before any work starts. Pattern source: obra/superpowers using-git-worktrees Step 3 'Verify Clean Baseline', extended from ask-the-user to a stored set Phase 3 can subtract.",
848
892
  "properties": {
849
893
  "enabled": {
850
894
  "type": "boolean",
851
895
  "default": false,
852
- "description": "Master switch. Off by default - a baseline run costs one full test suite before Phase 3 starts."
896
+ "description": "Master switch. Off by default - a baseline run costs one full test suite before Phase 2 starts."
853
897
  },
854
898
  "timeoutSeconds": {
855
899
  "type": "integer",
@@ -863,11 +907,11 @@
863
907
  "reviewDisagreementRound": {
864
908
  "type": "boolean",
865
909
  "default": false,
866
- "description": "v6.1.0+ - Phase 4 Step 2.5 rebuttal round. When reviewers disagree (mixed blocker/approved verdict), each reviewer is re-prompted with the others' opposing arguments for one additional round before triage. Lifts signal quality on ambiguous findings at ~1× Step 2 token cost. Off by default - flip for security-critical or release-branch reviews."
910
+ "description": "v6.1.0+ - Phase 3 Step 2.5 rebuttal round. When reviewers disagree (mixed blocker/approved verdict), each reviewer is re-prompted with the others' opposing arguments for one additional round before triage. Lifts signal quality on ambiguous findings at ~1× Step 2 token cost. Off by default - flip for security-critical or release-branch reviews."
867
911
  },
868
912
  "analysisProfiles": {
869
913
  "type": "array",
870
- "description": "v16.6+ - which analysis standards the /multi-agent:analysis Step 1b picker offers (Locked 32). Listing one value auto-resolves the step instead of asking a question whose answer is already settled. Omitted means both are offered.",
914
+ "description": "v16.6+ - which analysis standards the /multi-agent:analysis Step 1b picker offers (Locked 31). Listing one value auto-resolves the step instead of asking a question whose answer is already settled. Omitted means both are offered.",
871
915
  "items": {
872
916
  "type": "string",
873
917
  "enum": ["global", "corporate"]
@@ -933,7 +977,7 @@
933
977
  "verifyByTest": {
934
978
  "type": "object",
935
979
  "additionalProperties": false,
936
- "description": "v10.8+ - Phase 4 Step 3.7 verify-by-test. When enabled, accepted BLOCKING findings are empirically validated before the Phase 3 rework loop: one verifier agent writes a minimal repro test per finding and runs only that test. Confirmed findings hand their failing test to Phase 3 as the RED step; non-reproducible findings are downgraded to deferred under evidence-gate. Only blocking findings are ever verified (fixed behavior, not a knob). Adds one model call plus up to maxFindings single-test runs per iteration with accepted blockers; default off. Flip on for security-critical work, release branches, or repos with noisy reviewers. Full spec: refs/features/verify-by-test.md.",
980
+ "description": "v10.8+ - Phase 3 Step 3.7 verify-by-test. When enabled, accepted BLOCKING findings are empirically validated before the Phase 3 rework loop: one verifier agent writes a minimal repro test per finding and runs only that test. Confirmed findings hand their failing test to Phase 3 as the RED step; non-reproducible findings are downgraded to deferred under evidence-gate. Only blocking findings are ever verified (fixed behavior, not a knob). Adds one model call plus up to maxFindings single-test runs per iteration with accepted blockers; default off. Flip on for security-critical work, release branches, or repos with noisy reviewers. Full spec: refs/features/verify-by-test.md.",
937
981
  "properties": {
938
982
  "enabled": {
939
983
  "type": "boolean",
@@ -1035,14 +1079,14 @@
1035
1079
  "minimum": 1,
1036
1080
  "maximum": 3,
1037
1081
  "default": 3,
1038
- "description": "Phase 4 -> Phase 3 rework cycles before trigger 3 trips. Bounded above by the Phase 3 retryCount hard-kill."
1082
+ "description": "Phase 3 -> Phase 2 rework cycles before trigger 3 trips. Bounded above by the Phase 2 retryCount hard-kill."
1039
1083
  }
1040
1084
  }
1041
1085
  },
1042
1086
  "testStability": {
1043
1087
  "type": "object",
1044
1088
  "additionalProperties": false,
1045
- "description": "v16.20+ - a test that passes only on retry is a flake signal, not a pass. Phase 3 runs new and changed tests repeatCount times before GREEN; disagreeing outcomes block and are recorded as test.flake_signal.",
1089
+ "description": "v16.20+ - a test that passes only on retry is a flake signal, not a pass. Phase 2 runs new and changed tests repeatCount times before GREEN; disagreeing outcomes block and are recorded as test.flake_signal.",
1046
1090
  "properties": {
1047
1091
  "repeatCount": {
1048
1092
  "type": "integer",
@@ -1056,7 +1100,7 @@
1056
1100
  "review": {
1057
1101
  "type": "object",
1058
1102
  "additionalProperties": false,
1059
- "description": "v8.6+ - Standalone /multi-agent:review knobs. Only affects the post-pr-review.sh path (PR-mode comment posting); does not change Phase 4 reviewer dispatch inside the full pipeline.",
1103
+ "description": "v8.6+ - Standalone /multi-agent:review knobs. Only affects the post-pr-review.sh path (PR-mode comment posting); does not change Phase 3 reviewer dispatch inside the full pipeline.",
1060
1104
  "properties": {
1061
1105
  "dedupeInlineComments": {
1062
1106
  "type": "boolean",
@@ -1068,7 +1112,7 @@
1068
1112
  "shadowGit": {
1069
1113
  "type": "object",
1070
1114
  "additionalProperties": false,
1071
- "description": "v8.6+ - Cline-style per-tool-call shadow Git checkpoints. A separate git repo under ~/.claude/state/shadow-git/<task-id>/.git/ snapshots the worktree at each Phase 3 step boundary (per Plan Todo) and optionally after each Edit/Write/MultiEdit/Bash mutation. The shadow lives outside the project's real .git so semantic commits stay clean. Pattern source: Cline checkpoints (https://docs.cline.bot/features/checkpoints). Off by default - adds a per-step git commit on top of the existing TDD loop; flip on for risky refactors where sub-phase rollback is worth ~50ms per snapshot.",
1115
+ "description": "v8.6+ - Cline-style per-tool-call shadow Git checkpoints. A separate git repo under ~/.claude/state/shadow-git/<task-id>/.git/ snapshots the worktree at each Phase 2 step boundary (per Plan Todo) and optionally after each Edit/Write/MultiEdit/Bash mutation. The shadow lives outside the project's real .git so semantic commits stay clean. Pattern source: Cline checkpoints (https://docs.cline.bot/features/checkpoints). Off by default - adds a per-step git commit on top of the existing TDD loop; flip on for risky refactors where sub-phase rollback is worth ~50ms per snapshot.",
1072
1116
  "properties": {
1073
1117
  "enabled": {
1074
1118
  "type": "boolean",
@@ -1093,12 +1137,12 @@
1093
1137
  "planTodos": {
1094
1138
  "type": "object",
1095
1139
  "additionalProperties": false,
1096
- "description": "v8.6+ - Plan-as-live-Todo-list. Phase 2 emits agent-state.plan.todos[] conforming to pipeline/schemas/plan-todos.schema.json; Phase 3 iterates step-by-step via pipeline/lib/plan-todos.sh next/start/complete; Phase 7 renders the rollup into agent-log.md and the PR body. The plan is broken into a live, structured Todo list. Off by default - opt in to add status-transition writes per Phase 3 step in exchange for sub-step visibility + per-step notes.",
1140
+ "description": "v8.6+ - Plan-as-live-Todo-list. Phase 2 emits agent-state.plan.todos[] conforming to pipeline/schemas/plan-todos.schema.json; Phase 3 iterates step-by-step via pipeline/lib/plan-todos.sh next/start/complete; Phase 5 renders the rollup into agent-log.md and the PR body. The plan is broken into a live, structured Todo list. Off by default - opt in to add status-transition writes per Phase 3 step in exchange for sub-step visibility + per-step notes.",
1097
1141
  "properties": {
1098
1142
  "enabled": {
1099
1143
  "type": "boolean",
1100
1144
  "default": false,
1101
- "description": "Master switch. When true, Phase 2 Step 4.5 emits plan.todos[] and Phase 3 / 7 read from it."
1145
+ "description": "Master switch. When true, Phase 1 Step 11 emits plan.todos[] and Phase 2 / 5 read from it."
1102
1146
  }
1103
1147
  }
1104
1148
  },
@@ -1221,9 +1265,9 @@
1221
1265
  "properties": {
1222
1266
  "mode": {
1223
1267
  "type": "string",
1224
- "enum": ["auto", "full", "lite"],
1225
- "default": "auto",
1226
- "description": "Section depth. auto picks lite for a bugfix or chore with no Figma reference and full otherwise; full and lite pin it. Layer selection (Analysis / Technical / Development) is a separate axis asked at intake."
1268
+ "enum": ["full"],
1269
+ "default": "full",
1270
+ "description": "Retained with a single value so a preferences file that sets it stays valid. Section depth is no longer a mode: Lite was removed in v19.0.0 because it chose sections from a fixed list while Locked 2 chooses them from evidence, and the two disagreed in both directions. Sections render when they have evidence and are dropped when they do not. The `auto` and `lite` values are rewritten to `full` by the 2.6.0-to-2.7.0 migration."
1227
1271
  },
1228
1272
  "forceFull": {
1229
1273
  "type": "boolean",
@@ -1302,12 +1346,12 @@
1302
1346
  "repoMap": {
1303
1347
  "type": "object",
1304
1348
  "additionalProperties": false,
1305
- "description": "v8.6+ - Aider-style token-budgeted repo map injection. When enabled, the orchestrator runs pipeline/scripts/repo-map.mjs BEFORE Phase 1 (Analysis) and BEFORE Phase 4 (Review) and injects the resulting markdown as ${REPO_MAP} into the reviewer/analyser prompts. Deterministic - no embeddings, no network. Pattern source: https://aider.chat/docs/repomap.html. Off by default (introduces a ~150-300ms repo scan + repo-shaped prompt growth); flip on to lower per-call token cost on follow-up exploration phases.",
1349
+ "description": "v8.6+ - Aider-style token-budgeted repo map injection. When enabled, the orchestrator runs pipeline/scripts/repo-map.mjs BEFORE Phase 1 (Plan) and BEFORE Phase 3 (Review) and injects the resulting markdown as ${REPO_MAP} into the reviewer/analyser prompts. Deterministic - no embeddings, no network. Pattern source: https://aider.chat/docs/repomap.html. Off by default (introduces a ~150-300ms repo scan + repo-shaped prompt growth); flip on to lower per-call token cost on follow-up exploration phases.",
1306
1350
  "properties": {
1307
1351
  "enabled": {
1308
1352
  "type": "boolean",
1309
1353
  "default": false,
1310
- "description": "Master switch. When true, Phase 1 and Phase 4 receive ${REPO_MAP} as additional context. When false, both phases run with only the diff + their normal prompt shell."
1354
+ "description": "Master switch. When true, Phase 1 and Phase 3 receive ${REPO_MAP} as additional context. When false, both phases run with only the diff + their normal prompt shell."
1311
1355
  },
1312
1356
  "tokenBudget": {
1313
1357
  "type": "integer",
@@ -1336,17 +1380,17 @@
1336
1380
  "codeGraph": {
1337
1381
  "type": "object",
1338
1382
  "additionalProperties": false,
1339
- "description": "v16.1+ - deterministic, LLM-free code graph (symbols, imports, references) built by pipeline/scripts/graph-build.mjs into ~/.claude/knowledge/<project>/code-graph.json. Phase 1 Step 2.6 queries it to narrow the Explore starting set; Phase 7 Step 3 refreshes it after the branch changed code. Zero API cost, zero runtime dependencies (ADR-0004), read-only on the repo. Off by default: with it off the pipeline behaves exactly as it did before. Measured on a 4,300-file Swift app at a fixed 30k retrieval budget, it roughly doubled coverage at under half the token cost on domain-word searches, and was marginally worse than plain grep when the task already names an exact symbol.",
1383
+ "description": "v16.1+ - deterministic, LLM-free code graph (symbols, imports, references) built by pipeline/scripts/graph-build.mjs into ~/.claude/knowledge/<project>/code-graph.json. Phase 1 Step 2.6 queries it to narrow the Explore starting set; Phase 5 Step 3 refreshes it after the branch changed code. Zero API cost, zero runtime dependencies (ADR-0004), read-only on the repo. Off by default: with it off the pipeline behaves exactly as it did before. Measured on a 4,300-file Swift app at a fixed 30k retrieval budget, it roughly doubled coverage at under half the token cost on domain-word searches, and was marginally worse than plain grep when the task already names an exact symbol.",
1340
1384
  "properties": {
1341
1385
  "enabled": {
1342
1386
  "type": "boolean",
1343
1387
  "default": false,
1344
- "description": "Master switch. When false, Phase 1 Step 2.6 and the Phase 7 refresh are skipped entirely and no graph file is written."
1388
+ "description": "Master switch. When false, Phase 1 Step 2.6 and the Phase 5 refresh are skipped entirely and no graph file is written."
1345
1389
  },
1346
1390
  "autoRefresh": {
1347
1391
  "type": "boolean",
1348
1392
  "default": true,
1349
- "description": "Rebuild the graph in Phase 7 after the branch changed code. When false, the graph only refreshes when someone asks for it via /multi-agent:graph."
1393
+ "description": "Rebuild the graph in Phase 5 after the branch changed code. When false, the graph only refreshes when someone asks for it via /multi-agent:graph."
1350
1394
  },
1351
1395
  "maxNodes": {
1352
1396
  "type": "integer",
@@ -1367,12 +1411,12 @@
1367
1411
  "devCritic": {
1368
1412
  "type": "object",
1369
1413
  "additionalProperties": false,
1370
- "description": "v8.6+ - Phase 3.5 evaluator-optimizer. After the Dev generator's last edit and BEFORE Phase 4 reviewers, dispatch agents/dev-critic.md (Sonnet by default) to run deterministic gates (build/lint/test/secrets) + the platform checklist (rules/*.md). Max 2 critic iterations, then escalate. Catches gate failures and checklist violations that would otherwise burn 2-3 Phase 4 reviewer calls + Opus triage. Off by default - introduces 1× Sonnet call per Dev iteration; flip on for feature work, security-touching paths, or multi-file refactors. Source: Anthropic 'Building Effective Agents' (Dec 2024) evaluator-optimizer pattern.",
1414
+ "description": "v8.6+ - Phase 2.5 evaluator-optimizer. After the Dev generator's last edit and BEFORE Phase 3 reviewers, dispatch agents/dev-critic.md (Sonnet by default) to run deterministic gates (build/lint/test/secrets) + the platform checklist (rules/*.md). Max 2 critic iterations, then escalate. Catches gate failures and checklist violations that would otherwise burn 2-3 Phase 3 reviewer calls + Opus triage. Off by default - introduces 1× Sonnet call per Dev iteration; flip on for feature work, security-touching paths, or multi-file refactors. Source: Anthropic 'Building Effective Agents' (Dec 2024) evaluator-optimizer pattern.",
1371
1415
  "properties": {
1372
1416
  "enabled": {
1373
1417
  "type": "boolean",
1374
1418
  "default": false,
1375
- "description": "Master switch. When true, Phase 3 dispatches dev-critic after the generator's last edit; when false, Phase 3 hands off directly to Phase 4."
1419
+ "description": "Master switch. When true, Phase 2 dispatches dev-critic after the generator's last edit; when false, Phase 2 hands off directly to Phase 3."
1376
1420
  },
1377
1421
  "maxIterations": {
1378
1422
  "type": "integer",
@@ -1398,12 +1442,12 @@
1398
1442
  "diffRiskAdvisory": {
1399
1443
  "type": "boolean",
1400
1444
  "default": true,
1401
- "description": "v8.3+ - Phase 4 Step 1.75 advisory diff risk scoring. When enabled, `pipeline/scripts/diff-risk-score.mjs` runs before reviewer dispatch and the top-N risk-ranked files are injected into each reviewer's prompt as a priority hint (security paths, public API surfaces, untested source changes, schema migrations). Heuristic, deterministic, no LLM cost. Default ON - the run is sub-second and never gates the pipeline. Flip to false to skip the script and the prompt injection entirely."
1445
+ "description": "v8.3+ - Phase 3 Step 1.75 advisory diff risk scoring. When enabled, `pipeline/scripts/diff-risk-score.mjs` runs before reviewer dispatch and the top-N risk-ranked files are injected into each reviewer's prompt as a priority hint (security paths, public API surfaces, untested source changes, schema migrations). Heuristic, deterministic, no LLM cost. Default ON - the run is sub-second and never gates the pipeline. Flip to false to skip the script and the prompt injection entirely."
1402
1446
  },
1403
1447
  "reviewScopeGate": {
1404
1448
  "type": "boolean",
1405
1449
  "default": true,
1406
- "description": "v12.8+ - Phase 4 Step 1.77 reviewer-scope gate. Decides the reviewer count from the deterministic diff-risk report via `pipeline/scripts/review-scope.mjs`: a diff under 20 lines of churn with max_score < 3.0 and no security_path / migration / public_api / no_test_change / test_lines_removed signal runs ONE reviewer instead of the full CLI-aware set (2 on Claude Code, 3 on Copilot CLI). No LLM. Fails safe in one direction only - any error, empty report or validator rejection resolves to the full set, because skipping a reviewer trades coverage for cost. Set false to force the full set on every diff.",
1450
+ "description": "v12.8+ - Phase 3 Step 1.77 reviewer-scope gate. Decides the reviewer count from the deterministic diff-risk report via `pipeline/scripts/review-scope.mjs`: a diff under 20 lines of churn with max_score < 3.0 and no security_path / migration / public_api / no_test_change / test_lines_removed signal runs ONE reviewer instead of the full CLI-aware set (2 on Claude Code, 3 on Copilot CLI). No LLM. Fails safe in one direction only - any error, empty report or validator rejection resolves to the full set, because skipping a reviewer trades coverage for cost. Set false to force the full set on every diff.",
1407
1451
  "$comment": "Shipped inert for a release: the script existed, was unit- and smoke-tested, and no phase doc referenced it, so every diff paid for the full reviewer set. Wired in Step 1.77; smoke-gate-wiring.sh keeps it reachable."
1408
1452
  },
1409
1453
  "jiraContext": {
@@ -1435,17 +1479,17 @@
1435
1479
  "priorArtEnrichment": {
1436
1480
  "type": "object",
1437
1481
  "additionalProperties": false,
1438
- "description": "v8.3+ - Per-repo triage memory layer. When enabled, Phase 7 ingests every triage output's accepted/deferred/rejected rows into ~/.claude/memory/multi-agent/<repo-slug>/triage-corpus.jsonl (idempotent), and Phase 4 triage queries the corpus for similar past findings to inject as context. Per-repo isolation - never cross-leaks between projects.",
1482
+ "description": "v8.3+ - Per-repo triage memory layer. When enabled, Phase 5 ingests every triage output's accepted/deferred/rejected rows into ~/.claude/memory/multi-agent/<repo-slug>/triage-corpus.jsonl (idempotent), and Phase 3 triage queries the corpus for similar past findings to inject as context. Per-repo isolation - never cross-leaks between projects.",
1439
1483
  "properties": {
1440
1484
  "enabled": {
1441
1485
  "type": "boolean",
1442
1486
  "default": true,
1443
- "description": "Master switch for the lookup side. When false, Phase 4 triage runs without prior-art injection. Ingest still runs unless ingestOnComplete is also flipped."
1487
+ "description": "Master switch for the lookup side. When false, Phase 3 triage runs without prior-art injection. Ingest still runs unless ingestOnComplete is also flipped."
1444
1488
  },
1445
1489
  "ingestOnComplete": {
1446
1490
  "type": "boolean",
1447
1491
  "default": true,
1448
- "description": "When false, Phase 7 skips the corpus append. Use to keep an existing corpus frozen while still benefiting from lookups against it."
1492
+ "description": "When false, Phase 5 skips the corpus append. Use to keep an existing corpus frozen while still benefiting from lookups against it."
1449
1493
  },
1450
1494
  "topN": {
1451
1495
  "type": "integer",
@@ -1464,12 +1508,12 @@
1464
1508
  "learningsLedger": {
1465
1509
  "type": "object",
1466
1510
  "additionalProperties": false,
1467
- "description": "v9.3+ - Per-repo persistent LEARNINGS ledger (pipeline/scripts/learnings-ledger.mjs), stored next to triage-corpus at ~/.claude/memory/multi-agent/<repo-slug>/learnings-ledger.jsonl. Holds durable architectural facts, conventions, and explicitly rejected review preferences. A compact brief is injected into Phase 1 analysis and Phase 4 triage so agents stop re-discovering structure and reviewers stop re-flagging rejected feedback (the most-cited cold-boot-amnesia complaint). Phase 7 distills each run's rejected findings into the ledger. Per-repo isolated; never cross-leaks.",
1511
+ "description": "v9.3+ - Per-repo persistent LEARNINGS ledger (pipeline/scripts/learnings-ledger.mjs), stored next to triage-corpus at ~/.claude/memory/multi-agent/<repo-slug>/learnings-ledger.jsonl. Holds durable architectural facts, conventions, and explicitly rejected review preferences. A compact brief is injected into Phase 1 analysis and Phase 3 triage so agents stop re-discovering structure and reviewers stop re-flagging rejected feedback (the most-cited cold-boot-amnesia complaint). Phase 5 distills each run's rejected findings into the ledger. Per-repo isolated; never cross-leaks.",
1468
1512
  "properties": {
1469
1513
  "enabled": {
1470
1514
  "type": "boolean",
1471
1515
  "default": true,
1472
- "description": "Master switch. When false, no brief is injected and Phase 7 does not append to the ledger."
1516
+ "description": "Master switch. When false, no brief is injected and Phase 5 does not append to the ledger."
1473
1517
  },
1474
1518
  "injectIntoAnalysis": {
1475
1519
  "type": "boolean",
@@ -1479,7 +1523,7 @@
1479
1523
  "injectIntoTriage": {
1480
1524
  "type": "boolean",
1481
1525
  "default": true,
1482
- "description": "Inject the rejected-preference brief into Phase 4 triage so known-rejected suggestions are not re-accepted."
1526
+ "description": "Inject the rejected-preference brief into Phase 3 triage so known-rejected suggestions are not re-accepted."
1483
1527
  },
1484
1528
  "maxBriefEntries": {
1485
1529
  "type": "integer",
@@ -1590,7 +1634,7 @@
1590
1634
  "type": "string"
1591
1635
  },
1592
1636
  "default": ["3"],
1593
- "description": "Phases the gate never blocks in. Phase 3 is the shipped default and removing it breaks development: Claude Code's Edit requires the same file to have been Read first, so a gate that blocks reads while code is being changed blocks the change. The gate is for phases that read to UNDERSTAND."
1637
+ "description": "Phases the gate never blocks in. Phase 2 is the shipped default and removing it breaks development: Claude Code's Edit requires the same file to have been Read first, so a gate that blocks reads while code is being changed blocks the change. The gate is for phases that read to UNDERSTAND."
1594
1638
  },
1595
1639
  "model": {
1596
1640
  "type": "string",
@@ -1624,7 +1668,7 @@
1624
1668
  "testGap": {
1625
1669
  "type": "object",
1626
1670
  "additionalProperties": false,
1627
- "description": "v8.3+ - Phase 5 Step 0 advisory test-gap detector. Walks the diff for newly added public symbols and reports those without a paired test (or test method covering them). Heuristic, deterministic, no LLM cost.",
1671
+ "description": "v8.3+ - Phase 3 Step 0 advisory test-gap detector. Walks the diff for newly added public symbols and reports those without a paired test (or test method covering them). Heuristic, deterministic, no LLM cost.",
1628
1672
  "properties": {
1629
1673
  "enabled": {
1630
1674
  "type": "boolean",
@@ -1640,7 +1684,7 @@
1640
1684
  "type": ["integer", "null"],
1641
1685
  "minimum": 1,
1642
1686
  "default": null,
1643
- "description": "If set, gaps where `important + blocking` count exceeds the threshold are treated as a Phase 4 rework finding (loops back to Phase 3). null = advisory only - Phase 5 prints the report but never gates."
1687
+ "description": "If set, gaps where `important + blocking` count exceeds the threshold are treated as a Phase 3 rework finding (loops back to Phase 2). null = advisory only - Phase 3 prints the report but never gates."
1644
1688
  },
1645
1689
  "promoteSeverity": {
1646
1690
  "type": "boolean",
@@ -1658,12 +1702,12 @@
1658
1702
  "perRepoMemory": {
1659
1703
  "type": "boolean",
1660
1704
  "default": false,
1661
- "description": "v6.2.0+ - Per-repo file-system memory layer. When enabled, Phase 0 reads `$PROJECT_ROOT/.multi-agent/memory/MEMORY.md` (if present) and injects it into the pipeline context, and Phase 7 dispatches a scoped synthesis subagent that may write new memory files to the same directory. Categories: user / feedback / project / reference (same taxonomy as the conversation-level auto-memory). Memory is local to each repo - never synced to remote, never committed to git (pipeline installer adds `.multi-agent/memory/` to `.gitignore`). Off by default - flip when working on a repo long enough that accumulated project context starts paying for itself."
1705
+ "description": "v6.2.0+ - Per-repo file-system memory layer. When enabled, Phase 0 reads `$PROJECT_ROOT/.multi-agent/memory/MEMORY.md` (if present) and injects it into the pipeline context, and Phase 5 dispatches a scoped synthesis subagent that may write new memory files to the same directory. Categories: user / feedback / project / reference (same taxonomy as the conversation-level auto-memory). Memory is local to each repo - never synced to remote, never committed to git (pipeline installer adds `.multi-agent/memory/` to `.gitignore`). Off by default - flip when working on a repo long enough that accumulated project context starts paying for itself."
1662
1706
  },
1663
1707
  "autopilotSafetyGate": {
1664
1708
  "type": "boolean",
1665
1709
  "default": true,
1666
- "description": "v7.0.0+ - Phase 2 autopilot safety classifier. Before autopilot mode consumes the user's approval skip, run `classify-plan-safety.mjs` over the approved plan. If the heuristic score ≥ 50 (e.g. >15 files touched, or security-path touch, or delete-without-test, or schema migration) inject a ONE-TIME pause asking for explicit manual approval - even in autopilot. Default ON because the risk of skipping this gate is asymmetric: a pause on a high-blast-radius plan costs seconds; a silent auto-merge of a bad one costs hours of rollback. Flip to `false` only for tightly-scoped autopilot workflows (e.g. batch figma component iteration) where the task class is known-safe."
1710
+ "description": "v7.0.0+ - Phase 1 autopilot safety classifier. Before autopilot mode consumes the user's approval skip, run `classify-plan-safety.mjs` over the approved plan. If the heuristic score ≥ 50 (e.g. >15 files touched, or security-path touch, or delete-without-test, or schema migration) inject a ONE-TIME pause asking for explicit manual approval - even in autopilot. Default ON because the risk of skipping this gate is asymmetric: a pause on a high-blast-radius plan costs seconds; a silent auto-merge of a bad one costs hours of rollback. Flip to `false` only for tightly-scoped autopilot workflows (e.g. batch figma component iteration) where the task class is known-safe."
1667
1711
  },
1668
1712
  "dynamicSkillLoading": {
1669
1713
  "type": "boolean",
@@ -1870,7 +1914,7 @@
1870
1914
  "skillConformance": {
1871
1915
  "type": "object",
1872
1916
  "additionalProperties": false,
1873
- "description": "v14.0.0+ - Phase 4 Step 1.78 criteria resolution. The stage itself has no on/off key and neither does its exception-expiry check: a run that can switch off its own anti-reward-hacking control cannot be trusted to report a pass (same reasoning as Step 1.76).",
1917
+ "description": "v14.0.0+ - Phase 3 Step 1.78 criteria resolution. The stage itself has no on/off key and neither does its exception-expiry check: a run that can switch off its own anti-reward-hacking control cannot be trusted to report a pass (same reasoning as Step 1.76).",
1874
1918
  "properties": {
1875
1919
  "blockOnCoverageGap": {
1876
1920
  "type": "boolean",
@@ -1899,7 +1943,7 @@
1899
1943
  "enabled": {
1900
1944
  "type": "boolean",
1901
1945
  "default": true,
1902
- "description": "Off disables capture, upload and both render sections. The Phase 6 blocker goes with it."
1946
+ "description": "Off disables capture, upload and both render sections. The Phase 4 blocker goes with it."
1903
1947
  },
1904
1948
  "maxAttachmentMb": {
1905
1949
  "type": "integer",
@@ -1930,7 +1974,7 @@
1930
1974
  "testDepth": {
1931
1975
  "type": "object",
1932
1976
  "additionalProperties": false,
1933
- "description": "How far a run tests by default. The question is asked at intake (Phase 0), not in Phase 5, because Phase 5 is not in the phase set for autopilot or either local mode. Autopilot never asks and reads `default` instead; the run records which rule fired.",
1977
+ "description": "How far a run tests by default. The question is asked at intake (Phase 0), not in the user test, because it is not in the step set for autopilot or either local mode. Autopilot never asks and reads `default` instead; the run records which rule fired.",
1934
1978
  "properties": {
1935
1979
  "default": {
1936
1980
  "type": "string",
@@ -2001,7 +2045,7 @@
2001
2045
  "mcpSurface": {
2002
2046
  "type": "object",
2003
2047
  "additionalProperties": false,
2004
- "description": "v17.6.0+ - how many MCP servers this host has registered. Every registered server's tool list is charged against the context window on EVERY turn, and the user adds them one at a time without ever seeing the running total; our own toolkit contributes 99 tools by itself. `doctor` reports the count, it never disables anything.",
2048
+ "description": "v17.6.0+ - how many MCP servers this host has registered. Every registered server's tool list is charged against the context window on EVERY turn, and the user adds them one at a time without ever seeing the running total; our own toolkit contributes 115 tools by itself. `doctor` reports the count, it never disables anything.",
2005
2049
  "properties": {
2006
2050
  "infoAbove": {
2007
2051
  "type": "integer",
@@ -2024,7 +2068,7 @@
2024
2068
  "testPolicy": {
2025
2069
  "type": "string",
2026
2070
  "enum": ["tdd", "tests-after", "none"],
2027
- "description": "How Phase 3 authors tests in this project: tdd (default; failing test first), tests-after (implementation first, tests authored at the end), none (no unit/UI test authoring; existing tests are kept and run). Asked once by Phase 0 when absent; autopilot defaults to tdd and notes it."
2071
+ "description": "How Phase 2 authors tests in this project: tdd (default; failing test first), tests-after (implementation first, tests authored at the end), none (no unit/UI test authoring; existing tests are kept and run). Asked once by Phase 0 when absent; autopilot defaults to tdd and notes it."
2028
2072
  },
2029
2073
  "defaultReviewers": {
2030
2074
  "type": "array",
@@ -2098,7 +2142,7 @@
2098
2142
  },
2099
2143
  "componentDevWorkflow": {
2100
2144
  "type": "boolean",
2101
- "description": "Project follows the component (Configuration / View / Modifiers) development workflow, so Phase 3 dispatches the component skills instead of the standard TDD flow."
2145
+ "description": "Project follows the component (Configuration / View / Modifiers) development workflow, so Phase 2 dispatches the component skills instead of the standard TDD flow."
2102
2146
  },
2103
2147
  "figmaConfigPath": {
2104
2148
  "type": "string",
@@ -2164,7 +2208,7 @@
2164
2208
  "type": "string"
2165
2209
  },
2166
2210
  "maxItems": 4,
2167
- "description": "Absolute local paths of this project's counterpart app repo - the same product on the other mobile platform. Read by Phase 4's platform-parity cross-check. Learned, not configured: the first run that resolves a counterpart writes it here and every later run reuses it without asking. An entry whose path is gone, or whose marker files no longer resolve to the mirrored stack, is dropped and re-detected rather than trusted. Same shape as webRoots."
2211
+ "description": "Absolute local paths of this project's counterpart app repo - the same product on the other mobile platform. Read by Phase 3's platform-parity cross-check. Learned, not configured: the first run that resolves a counterpart writes it here and every later run reuses it without asking. An entry whose path is gone, or whose marker files no longer resolve to the mirrored stack, is dropped and re-detected rather than trusted. Same shape as webRoots."
2168
2212
  }
2169
2213
  }
2170
2214
  }
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/reviewer-output.schema.json",
4
4
  "version": "1.3.0",
5
- "title": "Multi-Agent Pipeline - Phase 4 reviewer output",
6
- "description": "Contract for a single code-reviewer subagent's JSON output in Phase 4 Step 2. Every host dispatches 3 parallel reviewers; the middle slot is CLI-aware: Claude Code (Fable, Opus, Sonnet); Copilot CLI (Opus, GPT-5.4, Sonnet); Codex CLI dispatches 3 (gpt-5.6 at xhigh, gpt-5.4, gpt-5.6 at medium). Every reviewer must return an object matching this shape before Opus triage merges them. v1.1.0 adds the rule-ID conformance checklist: when the orchestrator supplies a ${CRITERIA} block (Phase 4 Step 1.78), the reviewer must return one conformance row per selected rule ID. Findings alone cannot answer 'was this applied completely' - a reviewer that opened nothing returns the same empty findings array as one that checked everything. v1.2.0 adds the optional per-finding fingerprint (Phase 4 Step 2.1): the stable id a finding keeps across review rounds.",
5
+ "title": "Multi-Agent Pipeline - Phase 3 reviewer output",
6
+ "description": "Contract for a single code-reviewer subagent's JSON output in Phase 4 Step 2. Every host dispatches 3 parallel reviewers; the middle slot is CLI-aware: Claude Code (Fable, Opus, Sonnet); Copilot CLI (Opus, GPT-5.4, Sonnet); Codex CLI dispatches 3 (gpt-5.6 at xhigh, gpt-5.4, gpt-5.6 at medium). Every reviewer must return an object matching this shape before Opus triage merges them. v1.1.0 adds the rule-ID conformance checklist: when the orchestrator supplies a ${CRITERIA} block (Phase 3 Step 1.78), the reviewer must return one conformance row per selected rule ID. Findings alone cannot answer 'was this applied completely' - a reviewer that opened nothing returns the same empty findings array as one that checked everything. v1.2.0 adds the optional per-finding fingerprint (Phase 3 Step 2.1): the stable id a finding keeps across review rounds.",
7
7
  "type": "object",
8
8
  "additionalProperties": false,
9
9
  "required": ["findings", "approved"],
@@ -122,7 +122,7 @@
122
122
  "criteriaSource": {
123
123
  "type": "string",
124
124
  "minLength": 1,
125
- "description": "Which criteria source the rule came from: a registry name, a module-guide path, or 'exception-marker-audit'. Lets Phase 7 attribute findings to the standard that produced them."
125
+ "description": "Which criteria source the rule came from: a registry name, a module-guide path, or 'exception-marker-audit'. Lets Phase 5 attribute findings to the standard that produced them."
126
126
  },
127
127
  "fingerprint": {
128
128
  "type": "string",