@mmerterden/multi-agent-pipeline 17.6.0 → 19.0.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 (272) hide show
  1. package/CHANGELOG.md +310 -0
  2. package/README.md +76 -18
  3. package/README.tr.md +55 -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/0011-dormant-ci.md +25 -1
  9. package/docs/adr/0014-six-phase-consolidation.md +134 -0
  10. package/docs/adr/README.md +2 -1
  11. package/docs/architecture.md +37 -38
  12. package/docs/best-practices.md +1 -1
  13. package/docs/ecosystem.md +37 -26
  14. package/docs/engineering.md +1 -1
  15. package/docs/facts.json +45 -0
  16. package/docs/features.md +54 -53
  17. package/docs/performance.md +5 -5
  18. package/docs/recovery-guide.md +9 -9
  19. package/docs/server-readiness.md +188 -0
  20. package/docs/token-budget-history.md +3 -1
  21. package/index.js +18 -3
  22. package/install/_codex-agents.mjs +1 -1
  23. package/install/_common.mjs +42 -17
  24. package/install/_dev-only-files.mjs +8 -0
  25. package/install/_unattended-profile.mjs +113 -0
  26. package/install/index.mjs +48 -0
  27. package/install/templates/claude-hooks.json +1 -1
  28. package/install/templates/codex-instructions.md +1 -1
  29. package/install/templates/copilot-instructions.md +28 -28
  30. package/manifest.json +1065 -0
  31. package/package.json +6 -3
  32. package/pipeline/agents/dev-critic.md +3 -3
  33. package/pipeline/commands/figma-to-swiftui.md +1 -1
  34. package/pipeline/commands/multi-agent/SKILL.md +8 -8
  35. package/pipeline/commands/multi-agent/analysis/SKILL.md +9 -9
  36. package/pipeline/commands/multi-agent/autopilot/SKILL.md +7 -7
  37. package/pipeline/commands/multi-agent/channels/SKILL.md +15 -15
  38. package/pipeline/commands/multi-agent/diff-explain/SKILL.md +6 -6
  39. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
  40. package/pipeline/commands/multi-agent/graph/SKILL.md +1 -1
  41. package/pipeline/commands/multi-agent/help/SKILL.md +62 -62
  42. package/pipeline/commands/multi-agent/language/SKILL.md +2 -2
  43. package/pipeline/commands/multi-agent/local/SKILL.md +11 -11
  44. package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +13 -13
  45. package/pipeline/commands/multi-agent/log/SKILL.md +2 -2
  46. package/pipeline/commands/multi-agent/manual-test/SKILL.md +9 -9
  47. package/pipeline/commands/multi-agent/model/SKILL.md +69 -0
  48. package/pipeline/commands/multi-agent/refactor/SKILL.md +3 -3
  49. package/pipeline/commands/multi-agent/resume/SKILL.md +4 -4
  50. package/pipeline/commands/multi-agent/resume-local/SKILL.md +19 -17
  51. package/pipeline/commands/multi-agent/review/SKILL.md +1 -1
  52. package/pipeline/commands/multi-agent/route-off/SKILL.md +36 -0
  53. package/pipeline/commands/multi-agent/route-on/SKILL.md +74 -0
  54. package/pipeline/commands/multi-agent/route-status/SKILL.md +56 -0
  55. package/pipeline/commands/multi-agent/setup/SKILL.md +2 -2
  56. package/pipeline/commands/multi-agent/status/SKILL.md +54 -23
  57. package/pipeline/commands/multi-agent/steer/SKILL.md +2 -2
  58. package/pipeline/commands/multi-agent/sync/SKILL.md +12 -13
  59. package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
  60. package/pipeline/lib/_jira-auth.sh +8 -0
  61. package/pipeline/lib/analysis-jira-write.sh +32 -0
  62. package/pipeline/lib/ask-choice.sh +13 -2
  63. package/pipeline/lib/autopilot-state.sh +8 -0
  64. package/pipeline/lib/credential-inventory.sh +1 -1
  65. package/pipeline/lib/fatal.mjs +129 -0
  66. package/pipeline/lib/fetch-fortify.sh +1 -1
  67. package/pipeline/lib/figma-mcp-refresh.sh +18 -0
  68. package/pipeline/lib/figma-screenshot.sh +18 -0
  69. package/pipeline/lib/invoked-directly.mjs +43 -0
  70. package/pipeline/lib/jira-publish.sh +42 -0
  71. package/pipeline/lib/md2confluence-v3.py +47 -0
  72. package/pipeline/lib/model-rung.sh +142 -0
  73. package/pipeline/lib/outbound-gate.mjs +175 -0
  74. package/pipeline/lib/phase-schema.mjs +88 -0
  75. package/pipeline/lib/plan-todos.sh +32 -11
  76. package/pipeline/lib/post-pr-review.sh +77 -8
  77. package/pipeline/lib/repo-hygiene.sh +8 -3
  78. package/pipeline/lib/require-jq.sh +40 -0
  79. package/pipeline/lib/route-state.sh +161 -0
  80. package/pipeline/lib/run-paths.sh +335 -0
  81. package/pipeline/multi-agent-refs/_account-picker.md +1 -1
  82. package/pipeline/multi-agent-refs/_dev-context.md +1 -1
  83. package/pipeline/multi-agent-refs/_input-parser.md +1 -1
  84. package/pipeline/multi-agent-refs/analysis/evidence.md +0 -9
  85. package/pipeline/multi-agent-refs/analysis/intake.md +1 -1
  86. package/pipeline/multi-agent-refs/analysis/locked.md +21 -22
  87. package/pipeline/multi-agent-refs/analysis/render.md +1 -1
  88. package/pipeline/multi-agent-refs/analysis/synthesis.md +12 -6
  89. package/pipeline/multi-agent-refs/android-guide.md +1 -1
  90. package/pipeline/multi-agent-refs/audit-guide.md +13 -13
  91. package/pipeline/multi-agent-refs/channels/issue-comment.md +2 -2
  92. package/pipeline/multi-agent-refs/channels/jira.md +3 -3
  93. package/pipeline/multi-agent-refs/channels/pr.md +4 -4
  94. package/pipeline/multi-agent-refs/channels/wiki.md +1 -1
  95. package/pipeline/multi-agent-refs/component-dispatch.md +3 -3
  96. package/pipeline/multi-agent-refs/cross-cli-contract.md +31 -6
  97. package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +74 -4
  98. package/pipeline/multi-agent-refs/features/code-graph.md +5 -5
  99. package/pipeline/multi-agent-refs/features/cost-analysis.md +93 -0
  100. package/pipeline/multi-agent-refs/features/design-conformance.md +1 -1
  101. package/pipeline/multi-agent-refs/features/dev-critic.md +3 -3
  102. package/pipeline/multi-agent-refs/features/doctor.md +47 -2
  103. package/pipeline/multi-agent-refs/features/external-context-injection.md +3 -3
  104. package/pipeline/multi-agent-refs/features/maturity-followup.md +3 -3
  105. package/pipeline/multi-agent-refs/features/model-fallback.md +5 -5
  106. package/pipeline/multi-agent-refs/features/plan-todos.md +1 -1
  107. package/pipeline/multi-agent-refs/features/repo-map.md +1 -1
  108. package/pipeline/multi-agent-refs/features/review-delta.md +3 -3
  109. package/pipeline/multi-agent-refs/features/review-multi-repo.md +1 -1
  110. package/pipeline/multi-agent-refs/features/scope-check.md +4 -4
  111. package/pipeline/multi-agent-refs/features/skill-conformance.md +2 -2
  112. package/pipeline/multi-agent-refs/features/stack-skill-routing.md +1 -1
  113. package/pipeline/multi-agent-refs/features/verify-by-test.md +4 -4
  114. package/pipeline/multi-agent-refs/features/verify.md +83 -0
  115. package/pipeline/multi-agent-refs/features/visual-evidence.md +19 -19
  116. package/pipeline/multi-agent-refs/features/worktree-finalize.md +6 -6
  117. package/pipeline/multi-agent-refs/issue-jira-triad.md +10 -10
  118. package/pipeline/multi-agent-refs/knowledge.md +11 -11
  119. package/pipeline/multi-agent-refs/multi-repo-integration-build.md +13 -13
  120. package/pipeline/multi-agent-refs/payload-contracts.md +8 -8
  121. package/pipeline/multi-agent-refs/phases/log-format.md +10 -10
  122. package/pipeline/multi-agent-refs/phases/modes.md +30 -30
  123. package/pipeline/multi-agent-refs/phases/operations.md +21 -10
  124. package/pipeline/multi-agent-refs/phases/phase-0-init.md +25 -25
  125. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +599 -0
  126. package/pipeline/multi-agent-refs/phases/{phase-3-dev.md → phase-2-dev.md} +129 -49
  127. package/pipeline/multi-agent-refs/phases/{phase-4-review.md → phase-3-review.md} +225 -107
  128. package/pipeline/multi-agent-refs/phases/{phase-6-commit.md → phase-4-commit.md} +23 -23
  129. package/pipeline/multi-agent-refs/phases/{phase-7-report.md → phase-5-report.md} +29 -29
  130. package/pipeline/multi-agent-refs/phases.md +44 -48
  131. package/pipeline/multi-agent-refs/picker-contract.md +1 -1
  132. package/pipeline/multi-agent-refs/progress-contract.md +6 -6
  133. package/pipeline/multi-agent-refs/readiness-review.md +1 -1
  134. package/pipeline/multi-agent-refs/rules.md +7 -7
  135. package/pipeline/multi-agent-refs/swiftui-guide.md +2 -2
  136. package/pipeline/multi-agent-refs/tracker-contract.md +31 -32
  137. package/pipeline/multi-agent-refs/unattended-contract.md +129 -0
  138. package/pipeline/multi-agent-refs/wiki-capture.md +14 -14
  139. package/pipeline/preferences-template.json +9 -1
  140. package/pipeline/rules/outside-the-pipeline.md +1 -1
  141. package/pipeline/schemas/agent-state.schema.json +50 -50
  142. package/pipeline/schemas/analysis-output.schema.json +2 -2
  143. package/pipeline/schemas/autopilot-config.schema.json +1 -1
  144. package/pipeline/schemas/code-graph.schema.json +1 -1
  145. package/pipeline/schemas/criteria-manifest.schema.json +1 -1
  146. package/pipeline/schemas/dev-critic-output.schema.json +1 -1
  147. package/pipeline/schemas/diff-risk.schema.json +1 -1
  148. package/pipeline/schemas/migrations/prefs-2.4.0-to-2.5.0.mjs +2 -2
  149. package/pipeline/schemas/migrations/prefs-2.6.0-to-2.7.0.mjs +31 -0
  150. package/pipeline/schemas/migrations/state-2.1.0-to-2.2.0.mjs +129 -0
  151. package/pipeline/schemas/phases.json +105 -0
  152. package/pipeline/schemas/plan-todos.schema.json +5 -5
  153. package/pipeline/schemas/planning-output.schema.json +1 -1
  154. package/pipeline/schemas/prefs.schema.json +100 -56
  155. package/pipeline/schemas/reviewer-output.schema.json +3 -3
  156. package/pipeline/schemas/route-config.schema.json +74 -0
  157. package/pipeline/schemas/scope-check.schema.json +1 -1
  158. package/pipeline/schemas/test-gap.schema.json +1 -1
  159. package/pipeline/schemas/token-budget.json +12 -18
  160. package/pipeline/schemas/triage-output.schema.json +6 -6
  161. package/pipeline/scripts/README.md +3 -3
  162. package/pipeline/scripts/_code-graph.mjs +2 -2
  163. package/pipeline/scripts/_run-paths.mjs +372 -0
  164. package/pipeline/scripts/_smoke-root.sh +1 -1
  165. package/pipeline/scripts/aggregate-metrics.mjs +65 -65
  166. package/pipeline/scripts/autopilot-arming.mjs +2 -1
  167. package/pipeline/scripts/autopilot-intake.mjs +2 -1
  168. package/pipeline/scripts/autopilot-runner.mjs +206 -2
  169. package/pipeline/scripts/build-references.mjs +2 -1
  170. package/pipeline/scripts/build-stack-plugins.mjs +10 -2
  171. package/pipeline/scripts/capture-evidence.sh +7 -2
  172. package/pipeline/scripts/capture-flush.sh +8 -8
  173. package/pipeline/scripts/capture-resume.sh +3 -3
  174. package/pipeline/scripts/classify-plan-safety.mjs +3 -2
  175. package/pipeline/scripts/cost-analyze.mjs +600 -0
  176. package/pipeline/scripts/cost-budget-check.mjs +4 -12
  177. package/pipeline/scripts/council-view.mjs +2 -1
  178. package/pipeline/scripts/crush-json.mjs +2 -1
  179. package/pipeline/scripts/diff-explain.mjs +7 -10
  180. package/pipeline/scripts/diff-risk-score.mjs +2 -1
  181. package/pipeline/scripts/doctor.mjs +140 -6
  182. package/pipeline/scripts/evidence-gate.mjs +9 -3
  183. package/pipeline/scripts/feedback-send.mjs +12 -2
  184. package/pipeline/scripts/gc-abandoned.sh +32 -16
  185. package/pipeline/scripts/gc-tmp.sh +1 -1
  186. package/pipeline/scripts/gc-worktrees.sh +12 -5
  187. package/pipeline/scripts/gen-facts.mjs +175 -0
  188. package/pipeline/scripts/gen-mode-dispatch.mjs +32 -37
  189. package/pipeline/scripts/gen-ref-toc.mjs +1 -1
  190. package/pipeline/scripts/github-ssh-setup.sh +64 -7
  191. package/pipeline/scripts/graph-mermaid.mjs +4 -2
  192. package/pipeline/scripts/graph-report.mjs +1 -1
  193. package/pipeline/scripts/jira-attach.sh +1 -1
  194. package/pipeline/scripts/keychain-save.sh +101 -30
  195. package/pipeline/scripts/learn-from-transcripts.mjs +3 -2
  196. package/pipeline/scripts/learning-curve.mjs +36 -31
  197. package/pipeline/scripts/log-metric.sh +17 -4
  198. package/pipeline/scripts/make-manifest.mjs +199 -0
  199. package/pipeline/scripts/memory-save.sh +1 -1
  200. package/pipeline/scripts/migrate-prefs.mjs +24 -6
  201. package/pipeline/scripts/migrate-state.mjs +94 -4
  202. package/pipeline/scripts/phase-banner.sh +26 -22
  203. package/pipeline/scripts/phase-tracker.sh +48 -10
  204. package/pipeline/scripts/plan-coverage-gate.mjs +8 -4
  205. package/pipeline/scripts/pre-commit-check.sh +7 -0
  206. package/pipeline/scripts/pre-push-check.sh +7 -0
  207. package/pipeline/scripts/purge.sh +23 -6
  208. package/pipeline/scripts/render-agent-log-cost.sh +10 -3
  209. package/pipeline/scripts/render-cost-summary.sh +9 -2
  210. package/pipeline/scripts/render-work-summary.sh +14 -7
  211. package/pipeline/scripts/review-file-filter.mjs +5 -3
  212. package/pipeline/scripts/review-scope.mjs +2 -1
  213. package/pipeline/scripts/routine-registry.mjs +2 -1
  214. package/pipeline/scripts/run-aggregator.mjs +26 -20
  215. package/pipeline/scripts/run-metrics.mjs +4 -2
  216. package/pipeline/scripts/runs-index.mjs +353 -0
  217. package/pipeline/scripts/scorecard-snapshot.mjs +178 -0
  218. package/pipeline/scripts/search-logs.sh +18 -0
  219. package/pipeline/scripts/smoke-cross-cli-behavior.sh +6 -6
  220. package/pipeline/scripts/smoke-schema-validation.sh +26 -7
  221. package/pipeline/scripts/test-gap-scan.mjs +2 -1
  222. package/pipeline/scripts/test-integrity-gate.mjs +2 -1
  223. package/pipeline/scripts/token-budget-report.mjs +13 -2
  224. package/pipeline/scripts/triage-memory.mjs +2 -2
  225. package/pipeline/scripts/update-issue-progress.sh +56 -7
  226. package/pipeline/scripts/usage-report.mjs +12 -1
  227. package/pipeline/scripts/validate-analysis-doc.mjs +75 -18
  228. package/pipeline/scripts/validate-code-graph.mjs +6 -3
  229. package/pipeline/scripts/validate-complaint-doc.mjs +2 -1
  230. package/pipeline/scripts/validate-diff-risk.mjs +6 -3
  231. package/pipeline/scripts/validate-planning.mjs +1 -1
  232. package/pipeline/scripts/validate-reviewer.mjs +1 -1
  233. package/pipeline/scripts/validate-state.mjs +45 -5
  234. package/pipeline/scripts/validate-test-gap.mjs +6 -3
  235. package/pipeline/scripts/validate-triage.mjs +6 -4
  236. package/pipeline/scripts/verify-citations.mjs +4 -2
  237. package/pipeline/scripts/verify.mjs +327 -0
  238. package/pipeline/scripts/worktree-finalize.sh +18 -9
  239. package/pipeline/scripts/write-state.mjs +154 -15
  240. package/pipeline/skills/.skill-manifest.json +37 -21
  241. package/pipeline/skills/.skills-index.json +104 -5
  242. package/pipeline/skills/shared/README.md +15 -6
  243. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +2 -2
  244. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +2 -2
  245. package/pipeline/skills/shared/core/multi-agent/SKILL.md +69 -71
  246. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +3 -3
  247. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +14 -14
  248. package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +5 -5
  249. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +1 -1
  250. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +25 -23
  251. package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +2 -2
  252. package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +2 -2
  253. package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +8 -8
  254. package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +6 -6
  255. package/pipeline/skills/shared/core/multi-agent-model/SKILL.md +71 -0
  256. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +3 -3
  257. package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
  258. package/pipeline/skills/shared/core/multi-agent-resume-local/SKILL.md +7 -7
  259. package/pipeline/skills/shared/core/multi-agent-route-off/SKILL.md +39 -0
  260. package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +76 -0
  261. package/pipeline/skills/shared/core/multi-agent-route-status/SKILL.md +59 -0
  262. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -1
  263. package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +35 -11
  264. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +2 -2
  265. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +6 -5
  266. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh +4 -1
  267. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +4 -1
  268. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +2 -1
  269. package/pipeline/skills/skills-index.md +13 -4
  270. package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +0 -263
  271. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +0 -344
  272. package/pipeline/multi-agent-refs/phases/phase-5-test.md +0 -182
@@ -1,6 +1,6 @@
1
1
  # 5. Lazy-loaded phase docs with per-phase token budget
2
2
 
3
- **Status:** Accepted · 2025
3
+ **Status:** Accepted · 2025 · amended by [ADR-0014](./0014-six-phase-consolidation.md)
4
4
 
5
5
  ## Context
6
6
 
@@ -36,6 +36,16 @@ Current budgets (v3.5.0):
36
36
 
37
37
  Total phase doc budget: 14,300 tokens across 8 phases, loaded incrementally.
38
38
 
39
+ > **Amended by [ADR-0014](./0014-six-phase-consolidation.md) (v19.0.0).** There
40
+ > are six phase docs now, not eight, and the numbers above are the v3.5.0 ones
41
+ > rather than the current ceilings. They are left as written because an ADR
42
+ > records what was decided, not what is true today. The mechanism this ADR
43
+ > establishes is unchanged and still load-bearing: one document per phase,
44
+ > loaded on entry, with a committed ceiling `smoke-token-budget.sh` enforces.
45
+ > The live ceilings are in `pipeline/schemas/token-budget.json` and the phase
46
+ > list itself in `pipeline/schemas/phases.json`, which is the duplication
47
+ > ADR-0014 removed - restating either here would recreate it.
48
+
39
49
  ## Consequences
40
50
 
41
51
  Positive:
@@ -1,6 +1,7 @@
1
1
  # 8. Installer modularization + secret-leak defense
2
2
 
3
3
  **Status:** Accepted · 2026-04-27 (v8.0.0)
4
+ > **Phase numbers below are the eight-phase ones.** [ADR-0014](./0014-six-phase-consolidation.md) renumbered the contract in v19.0.0 (the producer/consumer phase docs it names were renumbered). The decision this ADR records is unchanged; only the labels moved, and they are left as written because an ADR records what was decided.
4
5
 
5
6
  > **Amended v10.7.0:** the `_adapters.mjs` module and its third-party adapter dispatch were removed when the pipeline narrowed to Claude Code + Copilot CLI (see ADR 0007). `install/` now ships **8** modules, not 9; the module list below records the v8.0.0 decision as it shipped at the time.
6
7
 
@@ -1,6 +1,7 @@
1
1
  # 10. Our own code graph, not a forked one
2
2
 
3
3
  **Status:** Accepted · 2026-08-28
4
+ > **Phase numbers below are the eight-phase ones.** [ADR-0014](./0014-six-phase-consolidation.md) renumbered the contract in v19.0.0 (`phase-1-analysis.md` is now `phase-1-plan.md` and Phase 7 Report is now Phase 5). The decision this ADR records is unchanged; only the labels moved, and they are left as written because an ADR records what was decided.
4
5
 
5
6
  ## Context
6
7
 
@@ -1,6 +1,6 @@
1
1
  # 11. CI stays in the repository but dormant; the pre-push gate is primary
2
2
 
3
- **Status:** Accepted · 2026-08-31 · amended 2026-09-13
3
+ **Status:** Accepted · 2026-08-31 · amended 2026-09-13 · amended 2026-09-17
4
4
 
5
5
  > **Amendment, 2026-09-13 (ADR-0012, macOS only).** Linux and Windows support
6
6
  > was removed. `package.json` now declares `os: ["darwin"]`, which npm enforces
@@ -91,6 +91,30 @@ gate already covers everything except the three items listed above.
91
91
  only macOS, disappears when the laptop is closed, and a self-hosted runner on a
92
92
  public repository executes code from any fork's pull request.
93
93
 
94
+ > **Amendment, 2026-09-17.** Two of those three reasons have moved.
95
+ >
96
+ > "Covers only macOS" stopped being a cost when ADR-0012 removed the other
97
+ > platforms: macOS is now the only target, so a macOS-only runner covers all of
98
+ > it.
99
+ >
100
+ > The fork argument is weaker than it was but is NOT gone, and the difference is
101
+ > worth stating precisely because the plan that revisited this got it wrong.
102
+ > The repository is private, which is the important half. It is not
103
+ > fork-free: measured on 2026-09-17 it has **one fork**, owned by another
104
+ > account. GitHub requires approval before a fork's pull request runs a
105
+ > workflow, so the exposure is gated - but the gate is a setting and an
106
+ > approval given by reflex puts that code on the runner, with the runner's
107
+ > keychain.
108
+ >
109
+ > "Disappears when the laptop is closed" is the reason this is still not the
110
+ > default. It becomes a real option only on a machine that stays awake, which
111
+ > is what `docs/server-readiness.md` describes and why that page is a
112
+ > prerequisite rather than a companion.
113
+ >
114
+ > The decision is unchanged: CI stays dormant and the pre-push gate stays
115
+ > primary. What changed is that a self-hosted runner is now a supported option
116
+ > for someone who has read that page, rather than a rejected one.
117
+
94
118
  **Delete the workflows.** Honest but lossy. The files encode which steps matter
95
119
  and in what order, and the possible issue-triggered direction would have to
96
120
  rebuild them from nothing.
@@ -0,0 +1,134 @@
1
+ # 14. Six phases, because two of the eight were doing the same work twice
2
+
3
+ **Status:** Accepted · 2026-09-18 · amends [ADR-0005](./0005-lazy-phase-docs.md)
4
+
5
+ Three further ADRs carry the old numbers in their bodies and now carry a pointer
6
+ back here instead of being rewritten: [ADR-0002](./0002-instruction-driven-flag.md)
7
+ (Phase 6 commit truth table), [ADR-0008](./0008-installer-modularization-and-secret-leak-defense.md)
8
+ (producer/consumer phase docs) and [ADR-0010](./0010-own-code-graph.md)
9
+ (`phase-1-analysis.md`, Phase 7 refresh). [ADR-0007](./0007-multi-tool-adapter-framework.md)
10
+ is Superseded and needs none.
11
+
12
+ ## Context
13
+
14
+ The pipeline shipped an eight-phase contract (0 Init, 1 Analysis, 2 Planning,
15
+ 3 Dev, 4 Review, 5 Test, 6 Commit, 7 Report) from v1 until v18. Two seams in
16
+ it were doing redundant work, and both were visible in the repo rather than
17
+ inferred.
18
+
19
+ **The build ran twice.** Phase 2 Dev built the project and tee'd the log
20
+ (`phase-2-dev.md:177-182`, up to three attempts). Phase 3 Review opened by
21
+ building it again (`phase-3-review.md:19-20`). Both logs fed the same evidence
22
+ gate. Nothing consumed the difference between them - the second build existed
23
+ because Review was written to be runnable standalone, not because the first
24
+ build was untrusted.
25
+
26
+ **Analysis and Planning were already one unit.** The depth picker never chose
27
+ between them: `agent-state.schema.json` described `onlyDevelop` as "Short
28
+ pipeline - phases 1 and 2 are skipped", and `features/skill-conformance.md`
29
+ opened an entire section with "Dev-mode substitutes (Phases 1 and 2 never
30
+ ran)". Two phase numbers, one decision, in every mode that had a choice.
31
+
32
+ A third fact shaped the mapping rather than motivating it: the phase count
33
+ appeared in 91 places across 40 files and **no gate held any of them**. The
34
+ command count (56) was guarded in seven files, the jq count was guarded, the
35
+ persona count was guarded. The phase count was not. A renumbering could have
36
+ left the whole tree stale and the suite would have stayed green.
37
+
38
+ ## Decision
39
+
40
+ Six phases. The mapping:
41
+
42
+ | Was | Is | Name | What changed |
43
+ |---|---|---|---|
44
+ | 0 Init | **0** | Init | Nothing |
45
+ | 1 Analysis + 2 Planning | **1** | Plan | One doc, one exit gate |
46
+ | 3 Dev + 4 Review Stage 1 | **2** | Dev | Verify became Dev's exit gate; the build runs once |
47
+ | 4 Review (Stage 2-3) + 5 Test | **3** | Review | The user test moved inside Review |
48
+ | 6 Commit | **4** | Commit | Nothing |
49
+ | 7 Report | **5** | Report | Nothing |
50
+
51
+ Analysis folds into Plan rather than into Init because of the token budget,
52
+ not preference. Init is 733 lines with a 13,400-token ceiling, already the
53
+ largest doc; adding Analysis would have put it near 18,000 and
54
+ `smoke-token-budget.sh` would have rejected it. Folded into Planning instead,
55
+ the merged doc lands under Init's existing ceiling.
56
+
57
+ Three supporting decisions came with it:
58
+
59
+ **`pipeline/schemas/phases.json` is the contract.** The phase list previously
60
+ existed as eight independent copies, none derived from another. It is now one
61
+ file that `gen-mode-dispatch.mjs`, `runs-index.mjs`, `log-metric.sh` and the
62
+ token budget read, and that `smoke-phase-contract.sh` holds every remaining
63
+ copy to. Comparison thresholds that used to be literals (`phase >= 6` for
64
+ "waiting on you", the Short-run boundary) are named fields in it.
65
+
66
+ **`smoke-no-mcp-in-dev-phases.sh` keeps its `phase >= 2` threshold, and the
67
+ gate now asserts that it is unchanged.** Figma MCP was reachable only in
68
+ Analysis (1); Analysis is now inside Plan (1). The permitted set `{0, 1}` is
69
+ identical either way. The threshold surviving a renumbering is a result of the
70
+ mapping, not an oversight, and an edit that "corrects" it would widen MCP
71
+ access - so the assertion is written as a gate rather than a comment.
72
+
73
+ **`metrics.jsonl` gets a generation marker, not a rewrite.** The file is
74
+ append-only and `phase: 3` means Dev in a pre-v19 row and Review in a post-v19
75
+ one. Every line written from v19.0.0 on carries `phaseSchema: 2`; a line
76
+ without the field is generation 1. `pipeline/lib/phase-schema.mjs` resolves
77
+ both, and the two aggregators that compared phase numbers to literals
78
+ (`token-budget-report.mjs`, `run-aggregator.mjs`) go through it. The file held
79
+ four rows at the time of the change, so migrating history was not worth doing;
80
+ adding the field was, because the next renumbering will not find four rows.
81
+
82
+ ## Consequences
83
+
84
+ Positive:
85
+
86
+ - One build per run instead of two. Phase 3 Review inherits `.build.log` and
87
+ `.test.log` from Phase 2 and runs the evidence gate against them.
88
+ - The phase count is guarded. `smoke-phase-contract.sh` derives it from
89
+ `phases.json` and checks the generator's output, the token budget, the state
90
+ schema bounds, every shipped surface that states a count, the progress
91
+ fractions in sample output, and the named thresholds. It fails on a
92
+ deliberately wrong contract - verified both ways.
93
+ - `state-2.1.0-to-2.2.0.mjs` is the first migration that rewrites phase
94
+ numbers, and it repairs four defects the live corpus already carried. The
95
+ 62-file corpus went from 52 valid to 62.
96
+
97
+ Negative:
98
+
99
+ - Two source phases can collide onto one target key in `state.phases{}`. The
100
+ merge rule (furthest-along status, max `retryCount`, union of `files[]`,
101
+ earliest start, latest finish) is a judgement call, and `retryCount` takes
102
+ the max specifically because the schema caps it at 3 and a sum would emit an
103
+ invalid state.
104
+ - Historical `agent-log.md` files keep their old phase names. They are dated
105
+ human documents and are correct as written; only new runs use new names.
106
+ - Phase 3 Review is now the largest doc in the set. Stage 1 left it and the
107
+ user test entered it, and the net is growth. Its ceiling was re-measured
108
+ after the merge rather than summed from the old two, because
109
+ `smoke-token-budget.sh` rejects a ceiling more than 25% above the
110
+ measurement - summing would have shipped a stale ceiling by construction.
111
+
112
+ ## Alternatives Considered
113
+
114
+ **Fold Analysis into Init.** Rejected on the token budget, as above. The
115
+ semantic argument pointed the same way: `onlyDevelop` already treated Analysis
116
+ and Planning as one unit, and never grouped Analysis with Init.
117
+
118
+ **Keep six phases, hide the empty tiles in the tracker.** Rejected: this is
119
+ cosmetic. The double build is a contract problem, not a display problem, and
120
+ hiding tiles would leave it running while making it harder to see.
121
+
122
+ **Fold Report into Commit.** Rejected. `ROADMAP.md` records the Phase 5
123
+ approval requirement as a permanent design line: Jira, Confluence, wiki and PR
124
+ bodies are externally visible, and content sent in the wrong tone leaks to the
125
+ team. Merging Report into Commit would put that approval gate inside a phase
126
+ that autopilot runs without interaction.
127
+
128
+ **Drop the user test entirely.** Rejected. `phase-3-review.md` produces
129
+ structured evidence that Phase 4 consumes; it is a real output, not a pause.
130
+ It moved inside Review and kept its behaviour, including its waiting state.
131
+
132
+ **Renumber without a contract file.** Rejected - this is what created the
133
+ problem being fixed. Eight hand edits to eight independent copies is the
134
+ mechanism by which the ninth copy gets missed.
@@ -14,7 +14,7 @@ Format: lightly adapted from [Michael Nygard's ADR template](https://cognitect.c
14
14
  | [0002](./0002-instruction-driven-flag.md) | instructionDriven flag as explicit pipeline fork | Accepted |
15
15
  | [0003](./0003-unified-shared-skills.md) | Unified `skills/shared/` for Claude Code + Copilot | Accepted (amended v5.3.3) |
16
16
  | [0004](./0004-zero-dependency-philosophy.md) | Keep the package zero-runtime-deps | Accepted |
17
- | [0005](./0005-lazy-phase-docs.md) | Lazy-loaded phase docs with per-phase token budget | Accepted |
17
+ | [0005](./0005-lazy-phase-docs.md) | Lazy-loaded phase docs with per-phase token budget | Accepted (amended by 0014: eight phase docs became six) |
18
18
  | [0006](./0006-skills-core-external-split.md) | `shared/core/` vs `shared/external/` source org | Accepted |
19
19
  | [0007](./0007-multi-tool-adapter-framework.md) | Multi-tool adapter framework + token-preserving uninstall | Superseded by v10.7.0 (adapters removed; Claude Code + Copilot CLI only) |
20
20
  | [0008](./0008-installer-modularization-and-secret-leak-defense.md) | Installer modularization + secret-leak defense | Accepted (amended v10.7.0: adapter module removed) |
@@ -23,6 +23,7 @@ Format: lightly adapted from [Michael Nygard's ADR template](https://cognitect.c
23
23
  | [0011](./0011-dormant-ci.md) | CI dormant in-repo; pre-push gate is primary | Accepted |
24
24
  | [0012](./0012-macos-only.md) | macOS only; Linux and Windows support removed | Accepted |
25
25
  | [0013](./0013-lsp-code-intelligence.md) | A language server for the answers regex cannot give | Accepted |
26
+ | [0014](./0014-six-phase-consolidation.md) | Six phases, because two of the eight were doing the same work twice | Accepted |
26
27
 
27
28
  ## Writing a New ADR
28
29
 
@@ -1,53 +1,49 @@
1
1
  # Architecture
2
2
 
3
- ## 8-Phase Pipeline Flow (0-7)
3
+ ## 6-Phase Pipeline Flow (0-5)
4
4
 
5
5
  ```mermaid
6
6
  graph TD
7
7
  INPUT["🎯 Input<br/>(Issue # / Jira URL / free text)"]
8
8
  P0["Phase 0: Init<br/>Project detect, worktree, branch, identity"]
9
- P1["Phase 1: Analysis<br/>Codebase scan (parallel Explore agents)"]
10
- P2["Phase 2: Planning<br/>Task breakdown, architecture review"]
11
- P3["Phase 3: Dev<br/>TDD: RED → GREEN → REFACTOR"]
12
- P4["Phase 4: Review<br/>Parallel + Fable triage<br/>(3 reviewers per host: Claude Code Fable + Opus + Sonnet · Copilot GPT-5.4 + Opus + Sonnet)"]
13
- P5["Phase 5: Test<br/>Optional manual testing"]
14
- P6["Phase 6: Commit<br/>Git commit, PR creation"]
15
- P7["Phase 7: Report<br/>Jira · Wiki+Figma · Confluence · Log · Knowledge"]
9
+ P1["Phase 1: Plan<br/>Codebase scan (parallel Explore agents),<br/>task breakdown, architecture review, Plan Approval Gate"]
10
+ P2["Phase 2: Dev<br/>TDD: RED → GREEN → REFACTOR<br/>Verify exit gate: build · lint · tests · secrets"]
11
+ P3["Phase 3: Review<br/>Parallel + Fable triage, then the optional user test<br/>(3 reviewers per host: Claude Code Fable + Opus + Sonnet · Copilot GPT-5.4 + Opus + Sonnet)"]
12
+ P4["Phase 4: Commit<br/>Git commit, PR creation"]
13
+ P5["Phase 5: Report<br/>Jira · Wiki+Figma · Confluence · Log · Knowledge"]
16
14
 
17
15
  INPUT --> P0
18
16
  P0 --> P1
19
17
  P1 --> P2
20
- P2 --> P3
21
- P3 --> P4
22
- P4 -->|approved| P5
23
- P4 -->|fix needed| P3
24
- P5 --> P6
25
- P6 --> P7
18
+ P2 -->|build + test logs| P3
19
+ P3 -->|approved| P4
20
+ P3 -->|fix needed| P2
21
+ P4 --> P5
26
22
 
27
23
  style INPUT fill:#f9f,stroke:#333
28
- style P3 fill:#ffd,stroke:#333
29
- style P4 fill:#dff,stroke:#333
30
- style P7 fill:#a855f7,stroke:#333,color:#fff
24
+ style P2 fill:#ffd,stroke:#333
25
+ style P3 fill:#dff,stroke:#333
26
+ style P5 fill:#a855f7,stroke:#333,color:#fff
31
27
  ```
32
28
 
33
29
  ## Operating Modes
34
30
 
35
31
  ```mermaid
36
32
  graph LR
37
- subgraph Normal ["Normal (Full 8-phase)"]
38
- N0[Init] --> N1[Analysis] --> N2[Planning] --> N3[Dev] --> N4[Review] --> N5[Test] --> N6[Commit] --> N7[Report]
33
+ subgraph Normal ["Normal (Full 6-phase)"]
34
+ N0[Init] --> N1[Plan] --> N2[Dev] --> N3[Review] --> N4[Commit] --> N5[Report]
39
35
  end
40
36
 
41
37
  subgraph Dev ["Short depth (picker, Opus)"]
42
- D0[Init] --> D3[Dev<br/>Opus] --> D4[Review] --> D5[Test] --> D6[Commit] --> D7[Report]
38
+ D0[Init] --> D2[Dev<br/>Opus] --> D3[Review] --> D4[Commit] --> D5[Report]
43
39
  end
44
40
 
45
41
  subgraph Autopilot ["Autopilot (skip confirmations)"]
46
- A0[Init] --> A1[Analysis] --> A2[Planning] --> A3[Dev] --> A4[Review] --> A6[Commit] --> A7[Report]
42
+ A0[Init] --> A1[Plan] --> A2[Dev] --> A3[Review] --> A4[Commit] --> A5[Report]
47
43
  end
48
44
  ```
49
45
 
50
- ## Review Architecture (Phase 4)
46
+ ## Review Architecture (Phase 3)
51
47
 
52
48
  ```mermaid
53
49
  graph TD
@@ -61,24 +57,24 @@ graph TD
61
57
  GPT --> TRIAGE
62
58
  SON --> TRIAGE
63
59
 
64
- TRIAGE -->|PASS| P5["Phase 5: Test"]
65
- TRIAGE -->|FIX_REQUIRED| P3["Phase 3: Dev (retry ≤3x)"]
60
+ TRIAGE -->|PASS| P4["Phase 4: Commit"]
61
+ TRIAGE -->|FIX_REQUIRED| P2["Phase 2: Dev (retry ≤3x)"]
66
62
 
67
63
  style TRIAGE fill:#ffd,stroke:#333
68
64
  style P3 fill:#fdd,stroke:#333
69
65
  style P5 fill:#dfd,stroke:#333
70
66
  ```
71
67
 
72
- ## Figma SubPhase Integration (Phase 3)
68
+ ## Figma SubPhase Integration (Phase 2)
73
69
 
74
- When a task is classified `component`, Phase 3 dispatches to the marketplace component plugin (`ai-<platform>-toolkit`) via the Skill tool. Component skills are not bundled in this repo; the subphases below describe the flow the plugin skill runs internally:
70
+ When a task is classified `component`, Phase 2 dispatches to the marketplace component plugin (`ai-<platform>-toolkit`) via the Skill tool. Component skills are not bundled in this repo; the subphases below describe the flow the plugin skill runs internally:
75
71
 
76
72
  ```mermaid
77
73
  graph TD
78
- P3["Phase 3: Dev"]
74
+ P2["Phase 2: Dev"]
79
75
 
80
- P3 -->|figmaConfigPath set| FIGMA
81
- P3 -->|default| TDD["Standard TDD<br/>RED → GREEN → REFACTOR"]
76
+ P2 -->|figmaConfigPath set| FIGMA
77
+ P2 -->|default| TDD["Standard TDD<br/>RED → GREEN → REFACTOR"]
82
78
 
83
79
  subgraph FIGMA ["Figma Pipeline (17 SubPhases)"]
84
80
  direction TB
@@ -117,7 +113,7 @@ graph TB
117
113
  end
118
114
 
119
115
  subgraph "Pipeline Specs"
120
- CMD[commands/<br/>56 command files]
116
+ CMD[commands/<br/>60 command files]
121
117
  AGT[agents/<br/>8 agent personas]
122
118
  RUL[rules/<br/>12 domain rules]
123
119
  PHS[multi-agent-refs/phases/<br/>phase specs + contracts]
@@ -147,15 +143,18 @@ User Input → Phase 0 (Init)
147
143
  ↓
148
144
  agent-state.json (created)
149
145
  ↓
150
- Phase 1-2 (Analysis + Planning)
146
+ Phase 1 (Plan: analysis + breakdown + approval gate)
151
147
  ↓
152
- Phase 3 (Dev) ←──── retry loop (max 3x)
153
- ↓ ↑
154
- Phase 4 (Review) ────────┘ (if fix needed)
148
+ Phase 2 (Dev) ←──────── retry loop (max 3x)
149
+ ↓ ↑
150
+ Verify exit gate │
151
+ build · lint · tests · secrets
152
+ ↓ .build.log + .test.log │
153
+ Phase 3 (Review + user test) ┘ (if fix needed)
155
154
  ↓
156
- Phase 5-6 (Test + Commit)
155
+ Phase 4 (Commit → push → PR)
157
156
  ↓
158
- Phase 7 REPORT (Jira → Wiki+Figma → Confluence → Log → Knowledge)
157
+ Phase 5 REPORT (Jira → Wiki+Figma → Confluence → Log → Knowledge)
159
158
  ↓
160
159
  agent-log.md + agent-state.json (final)
161
160
  ```
@@ -170,7 +169,7 @@ revisions of this diagram - Codex CLI and the two independently-shipped repos
170
169
  graph TD
171
170
  CC["Claude Code<br/>(source of truth)"]
172
171
  COP["Copilot CLI<br/>(instructions + 56 skills)"]
173
- COD["Codex CLI<br/>(1 router skill + 56 refs)"]
172
+ COD["Codex CLI<br/>(1 router skill + 60 refs)"]
174
173
  REPO["Pipeline Repo<br/>(npm package)"]
175
174
  WEB["Website"]
176
175
  PLUGREPO["multi-agent-plugins<br/>(5 stack plugins, own repo)"]
@@ -190,5 +189,5 @@ graph TD
190
189
  ```
191
190
 
192
191
  Full detail on how these three repos compose at install time and at run time -
193
- including the Phase 3 → plugin dispatch contract and the Phase 5 → multi-agent-toolkit MCP
192
+ including the Phase 2 → plugin dispatch contract and the Phase 3 → multi-agent-toolkit MCP
194
193
  contract - lives in [`docs/ecosystem.md`](./ecosystem.md).
@@ -55,7 +55,7 @@ Applied in Phase 3:
55
55
  | Phase 1 → 2 | Analysis complete, no unanswered questions | Planning |
56
56
  | Phase 3 → 4 | Build passes, lint clean, tests green | Review |
57
57
  | Phase 4 → 6 | All blocking findings resolved | Commit |
58
- | Phase 6 → 7 | Push successful, PR created | Report |
58
+ | Phase 4 → 7 | Push successful, PR created | Report |
59
59
 
60
60
  ## 6. 3-Iteration Hard Kill (original)
61
61
 
package/docs/ecosystem.md CHANGED
@@ -5,20 +5,20 @@ separately, wired together at install time and at run time:
5
5
 
6
6
  | Repo | What it owns | Ships as |
7
7
  |---|---|---|
8
- | **`multi-agent-pipeline`** (this repo) | Orchestration: the 8-phase flow, the 56 slash commands, quality gates, review/triage, cross-CLI parity | npm package (`@mmerterden/multi-agent-pipeline`), installs itself onto Claude Code / Copilot CLI / Codex CLI |
8
+ | **`multi-agent-pipeline`** (this repo) | Orchestration: the 6-phase flow, the 60 slash commands, quality gates, review/triage, cross-CLI parity | npm package (`@mmerterden/multi-agent-pipeline`), installs itself onto Claude Code / Copilot CLI / Codex CLI |
9
9
  | **`multi-agent-plugins`** | Stack knowledge: per-platform component/lifecycle skills (iOS, Android, Frontend, Backend) + shared knowledge | Claude Code marketplace, 5 independently-versioned plugins |
10
- | **`multi-agent-toolkit-mcp`** | The pipeline's hands on devices and browsers: 80 MCP tools across 6 categories (simulator/emulator control, accessibility audit, store compliance, web automation, Figma-vs-mock design audit, an agent-DSL batch runner) | npm package, registered as a standard stdio MCP server on every host |
10
+ | **`multi-agent-toolkit-mcp`** | The pipeline's hands on devices and browsers: 99 MCP tools across 10 categories (simulator/emulator control, memory, crash diagnostics, accessibility audit, store compliance, web automation, Figma-vs-mock design audit, code intelligence, wallet passes, an agent-DSL batch runner) | npm package, registered as a standard stdio MCP server on every host |
11
11
 
12
12
  None of the three depends on the others at the code level. They compose through two
13
- narrow contracts: the **Skill tool** (pipeline → plugin, at Phase 3) and the **MCP
14
- protocol** (pipeline skills → multi-agent-toolkit, at Phase 5 / design-check / store-ready).
13
+ narrow contracts: the **Skill tool** (pipeline → plugin, at Phase 2) and the **MCP
14
+ protocol** (pipeline skills → multi-agent-toolkit, at Phase 3 / design-check / store-ready).
15
15
  Either can be swapped or removed without touching the other two's source.
16
16
 
17
17
  ```mermaid
18
18
  graph LR
19
19
  subgraph PIPE ["multi-agent-pipeline (orchestrator)"]
20
20
  direction TB
21
- PHASES["8 phases · 56 commands"]
21
+ PHASES["6 phases · 60 commands"]
22
22
  GATES["deterministic gates + review triage"]
23
23
  end
24
24
 
@@ -34,17 +34,21 @@ graph LR
34
34
 
35
35
  subgraph DTK ["multi-agent-toolkit-mcp (device/browser hands)"]
36
36
  direction TB
37
- DEV["Device Control (58)"]
38
- A11Y["Accessibility Audit (2)"]
37
+ DEV["Device Control (59)"]
38
+ MEM["Memory (2)"]
39
+ CRASH["Crash Diagnostics (2)"]
40
+ A11Y["Accessibility Audit (3)"]
39
41
  STORE["Store Compliance (5)"]
40
42
  WEB["Web Automation (8)"]
41
43
  DESIGN["Design Audit (6)"]
42
- AGENTDSL["Agent DSL (1)"]
44
+ CODE["Code Intelligence (8)"]
45
+ PASS["Wallet Passes (4)"]
46
+ AGENTDSL["Agent DSL (2)"]
43
47
  end
44
48
 
45
- PHASES -->|"Phase 3: Skill tool<br/>taskType===component"| PLUG
46
- PHASES -->|"Phase 5 / design-check /<br/>store-ready: MCP tool calls"| DTK
47
- GATES -.->|"Phase 4 Security Auditor"| STORE
49
+ PHASES -->|"Phase 2: Skill tool<br/>taskType===component"| PLUG
50
+ PHASES -->|"Phase 3 / design-check /<br/>store-ready: MCP tool calls"| DTK
51
+ GATES -.->|"Phase 3 Security Auditor"| STORE
48
52
 
49
53
  style PIPE fill:#ffd,stroke:#333
50
54
  style PLUG fill:#dfd,stroke:#333
@@ -64,8 +68,8 @@ only those:
64
68
  graph TD
65
69
  CC["Claude Code<br/>~/.claude/commands/multi-agent/<br/>(source of truth)"]
66
70
 
67
- CC -->|"Step 2: copy + reformat<br/>56 sub-command skills"| COP["Copilot CLI<br/>~/.copilot/skills/"]
68
- CC -->|"Step 2b: transform<br/>(install.js --codex)"| COD["Codex CLI<br/>1 router skill + 56 refs<br/>+ 8 agent TOML"]
71
+ CC -->|"Step 2: copy + reformat<br/>60 sub-command skills"| COP["Copilot CLI<br/>~/.copilot/skills/"]
72
+ CC -->|"Step 2b: transform<br/>(install.js --codex)"| COD["Codex CLI<br/>1 router skill + 60 refs<br/>+ 8 agent TOML"]
69
73
  CC -->|"Step 3: genericize<br/>(strip personal data)"| REPO["multi-agent-pipeline repo<br/>pipeline/"]
70
74
  CC -->|"Step 4: version + feature sync"| WEB["Website<br/>projects.ts / i18n.tsx"]
71
75
 
@@ -131,7 +135,7 @@ graph TD
131
135
 
132
136
  A skill counted in more than one platform plugin (a cross-stack knowledge skill
133
137
  plus, say, an iOS-specific one) is why the plugins' skill counts sum to more than
134
- the 151-skill source: `ai-common` skills are vendored into every stack plugin's
138
+ the 153-skill source: `ai-common` skills are vendored into every stack plugin's
135
139
  `knowledge/`, not deduplicated across them. Versioning is per-plugin and
136
140
  patch-only from this generator - a repo enabling only `ai-ios-toolkit`
137
141
  never pulls an Android-only change.
@@ -153,7 +157,7 @@ measurements behind this table):
153
157
 
154
158
  | | Claude Code | Copilot CLI | Codex CLI |
155
159
  |---|---|---|---|
156
- | **Pipeline commands** | 56 slash-command skills, native | 56 skills, `multi-agent-{cmd}` naming, copied in | 1 router skill (`multi-agent`) + 56 command specs as reference files - Codex silently truncates its skills block past a few dozen entries, so sub-commands are not peer skills here |
160
+ | **Pipeline commands** | 60 slash-command skills, native | 56 skills, `multi-agent-{cmd}` naming, copied in | 1 router skill (`multi-agent`) + 60 command specs as reference files - Codex silently truncates its skills block past a few dozen entries, so sub-commands are not peer skills here |
157
161
  | **Stack plugins** | Marketplace plugin, loaded natively, resolved by `.claude/settings.json` enabled-list | Enabled plugin's authored skills copied flat into `~/.copilot/skills/`; `knowledge/` **not** re-copied (already delivered via `shared/external`) | Copied as reference files under `~/.codex/multi-agent-refs/skills/`, plugin-prefixed on name clash (e.g. `architecture` → `ai-ios-toolkit-architecture`) |
158
162
  | **Component dispatch (Phase 3)** | Marketplace plugin's `create-component`/`create-screen` skill via the Skill tool | No plugin loader - the enabled stack plugin's authored skills (incl. `create-component`) are copied flat into `~/.copilot/skills/` at install time (the old frozen `figma-*` copies are pruned, they were never a fallback) | Not part of the enforced parity axis; classification + state-shape must match, skill *inventory* does not |
159
163
  | **multi-agent-toolkit-mcp** | `claude mcp add multi-agent-toolkit -- npx -y @mmerterden/multi-agent-toolkit-mcp` | `copilot mcp add multi-agent-toolkit -- npx -y @mmerterden/multi-agent-toolkit-mcp` | `codex mcp add multi-agent-toolkit -- npx -y @mmerterden/multi-agent-toolkit-mcp` (skipped with a warning if `codex` isn't on `PATH`) |
@@ -171,32 +175,31 @@ other:
171
175
 
172
176
  ```mermaid
173
177
  graph TD
174
- START["Task running: Phase 3 (Dev)"]
178
+ START["Task running: Phase 2 (Dev)"]
175
179
  START -->|"taskType !== component"| TDD["Standard TDD loop<br/>(pipeline's own code)"]
176
180
  START -->|"taskType === component<br/>+ figmaUrl present"| VALIDATE["ai-ios-toolkit:figma-validate<br/>(registry, Code Connect, token compliance)"]
177
181
  VALIDATE -->|pass| DISPATCH["Skill tool →<br/>create-component / create-screen<br/>/ evolve-component (dual-name fallback)"]
178
- VALIDATE -->|fail| HALT1["halt Phase 3, surface why"]
179
- DISPATCH --> REPORT1["plugin returns build/test status →<br/>dispatch layer writes state.phases['3'].subphases[]"]
182
+ VALIDATE -->|fail| HALT1["halt Phase 2, surface why"]
183
+ DISPATCH --> REPORT1["plugin returns build/test status →<br/>dispatch layer writes state.phases['2'].subphases[]"]
180
184
 
181
- REPORT1 --> P4["Phase 4: Review"]
182
- P4 --> P5["Phase 5: Test"]
185
+ REPORT1 --> P3["Phase 3: Review + user test"]
183
186
 
184
- P5 -->|"UI bug hunt / manual-test /<br/>design-check / store-ready"| MCP["MCP tool call over stdio<br/>e.g. ios_xcodebuild, design_visual_compare,<br/>ios_app_store_audit"]
187
+ P3 -->|"UI bug hunt / manual-test /<br/>design-check / store-ready"| MCP["MCP tool call over stdio<br/>e.g. ios_xcodebuild, design_visual_compare,<br/>ios_app_store_audit"]
185
188
  MCP --> DTKPROC["multi-agent-toolkit-mcp process<br/>(npx @mmerterden/multi-agent-toolkit-mcp)"]
186
- DTKPROC -->|"result: screenshot / xcresult ID /<br/>18-rule audit verdict"| P5
189
+ DTKPROC -->|"result: screenshot / xcresult ID /<br/>18-rule audit verdict"| P3
187
190
 
188
191
  style DISPATCH fill:#dfd,stroke:#333
189
192
  style MCP fill:#dff,stroke:#333
190
193
  style HALT1 fill:#fdd,stroke:#333
191
194
  ```
192
195
 
193
- **Phase 3 → plugin** is a one-shot delegation: the plugin skill does its own
196
+ **Phase 2 → plugin** is a one-shot delegation: the plugin skill does its own
194
197
  lifecycle (test → code → build → wiki) and reports back a coarse
195
198
  `component-build` result; the pipeline does not re-implement any of that logic, and
196
199
  a plugin failure counts against the pipeline's own retry cap (`retryCount === 3` →
197
200
  hard stop, per `component-dispatch.md`).
198
201
 
199
- **Phase 5 (and design-check / store-ready) → multi-agent-toolkit** is a long-lived MCP
202
+ **Phase 3 (and design-check / store-ready) → multi-agent-toolkit** is a long-lived MCP
200
203
  session, not a one-shot call: the same stdio server process answers many tool
201
204
  calls across a phase (boot simulator once, then screenshot/tap/screenshot/tap...).
202
205
  Several pipeline skills pin a **minimum toolkit version** for a specific tool -
@@ -206,7 +209,13 @@ e.g. `apple-archive-compliance` requires `ios_app_store_audit` from
206
209
  that drops or renames a tool a pipeline skill depends on is a **major** bump, by
207
210
  that step's own contract).
208
211
 
209
- ### multi-agent-toolkit-mcp's tools, by category (87 at the toolkit README's last count; the pipeline says "80+" elsewhere so the number does not go stale with every toolkit release)
212
+ ### multi-agent-toolkit-mcp's tools, by category
213
+
214
+ 99 tools in 10 categories, counted from the server's own `tools/list` response at
215
+ toolkit 3.12.0 rather than from a README. The table stood at 87 across 8
216
+ categories for several releases because Code Intelligence and Wallet Passes
217
+ shipped without anyone adding their rows, and nothing here was checked against
218
+ the server - which is why the count now names its source.
210
219
 
211
220
  | Category | Tools | Primary pipeline consumers |
212
221
  |---|---|---|
@@ -214,10 +223,12 @@ that step's own contract).
214
223
  | Memory | 2 (`ios_leaks`, `android_meminfo`) | none yet; available outside the pipeline |
215
224
  | Crash Diagnostics | 2 (`ios_list_crashes`, `android_list_crashes`) | `/multi-agent:test` full scenario (end-of-run crash sweep), outside-the-pipeline sessions |
216
225
  | Accessibility Audit | 3 (`ios_accessibility_audit`, `android_accessibility_audit`, `ios_accessibility_audit_deep`) | `/multi-agent:test` accessibility scenario, `test-accessibility` |
217
- | Store Compliance | 5 | `store-ready`, `testflight-validation`, `apple-archive-compliance` skill, Phase 4 Security Auditor |
226
+ | Store Compliance | 5 | `store-ready`, `testflight-validation`, `apple-archive-compliance` skill, Phase 3 Security Auditor |
218
227
  | Web Automation | 8 | frontend-stack UI testing (via `test`) |
219
228
  | Design Audit | 6 | `design-check` (mock-mode vs Figma conformance) |
220
229
  | Autonomous Agent DSL | 2 (`agent_run_steps`, `agent_query_output`) | any skill that needs a scripted multi-step device flow in one round trip |
230
+ | Code Intelligence | 8 (`code_definition`, `code_references`, `code_hover`, `code_diagnostics`, `code_document_symbols`, `code_workspace_symbols`, `code_index_status`, `code_server_reset`) | `/multi-agent:refactor`, Phase 3 reviewers needing a real symbol graph rather than grep |
231
+ | Wallet Passes | 4 (`pass_build`, `pass_validate`, `pass_inspect`, `pass_certificates`) | pass-kit work outside the pipeline; no pipeline phase consumes them |
221
232
 
222
233
  ---
223
234
 
@@ -26,7 +26,7 @@ Every loop in the pipeline has a deterministic exit condition and a hard iterati
26
26
 
27
27
  ## Context management
28
28
 
29
- - **Token-budgeted phase docs**: every phase document has a per-file and total token budget enforced by a smoke gate (`token-budget.json`). Growth is compressed first; budgets are recalibrated only when real contract text lands. This keeps the orchestrator's working context lean across an 8-phase run.
29
+ - **Token-budgeted phase docs**: every phase document has a per-file and total token budget enforced by a smoke gate (`token-budget.json`). Growth is compressed first; budgets are recalibrated only when real contract text lands. This keeps the orchestrator's working context lean across a 6-phase run.
30
30
  - **Lazy loading**: only the active phase's document is in context; references load on demand.
31
31
  - **Structured handoff blocks**: at every phase boundary the orchestrator appends a Done / Remaining / Decisions / Open findings / Next block to the run log - written from state it already holds, no extra model call. Resume and post-compaction re-entry read the latest handoff plus the state file, never the conversation history.
32
32
  - **Proactive compaction**: past ~50% context usage the run compacts itself and re-grounds from durable artifacts instead of waiting for lossy auto-compaction.
@@ -0,0 +1,45 @@
1
+ {
2
+ "$comment": "Generated by pipeline/scripts/gen-facts.mjs. Do not hand-edit: the site reads this, and a number edited here instead of at its source is the drift this file removes.",
3
+ "generatedAt": "2026-09-17",
4
+ "version": "19.0.0",
5
+ "phaseSchema": 2,
6
+ "phases": [
7
+ {
8
+ "id": 0,
9
+ "name": "Init"
10
+ },
11
+ {
12
+ "id": 1,
13
+ "name": "Plan"
14
+ },
15
+ {
16
+ "id": 2,
17
+ "name": "Dev"
18
+ },
19
+ {
20
+ "id": 3,
21
+ "name": "Review"
22
+ },
23
+ {
24
+ "id": 4,
25
+ "name": "Commit"
26
+ },
27
+ {
28
+ "id": 5,
29
+ "name": "Report"
30
+ }
31
+ ],
32
+ "phaseCount": 6,
33
+ "modes": {
34
+ "full": [0, 1, 2, 3, 4, 5],
35
+ "autopilot": [0, 1, 2, 3, 4, 5],
36
+ "local": [0, 1, 2, 3, 4, 5],
37
+ "local-autopilot": [0, 1, 2, 3, 4, 5],
38
+ "full-local": [0, 1, 2, 3, 4, 5],
39
+ "analysis": [0, 1, 3, 4, 5]
40
+ },
41
+ "commandCount": 60,
42
+ "skillCount": 153,
43
+ "toolCount": 99,
44
+ "toolkitVersion": "3.12.0"
45
+ }