@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
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * multi-agent-pipeline - 8-phase AI development pipeline
4
+ * multi-agent-pipeline - 6-phase AI development pipeline
5
5
  *
6
6
  * Supports: Claude Code, Copilot CLI
7
7
  * Install: npx @mmerterden/multi-agent-pipeline install
@@ -80,7 +80,7 @@ if (command === "--version" || command === "-v" || command === "version") {
80
80
  await main();
81
81
  } else if (command === "help") {
82
82
  console.log(`
83
- multi-agent-pipeline - 8-phase AI development pipeline
83
+ multi-agent-pipeline - 6-phase AI development pipeline
84
84
 
85
85
  Install:
86
86
  npx @mmerterden/multi-agent-pipeline install Install for Claude Code (default)
@@ -28,7 +28,7 @@ import { ensureDir, ensureRealDir, isDryRun, writeFile } from "./_common.mjs";
28
28
  *
29
29
  * This table resolves a persona's DEFAULT tier, which is not the same thing as
30
30
  * a per-slot override. Phase 4 dispatches Reviewer 3 with an explicit
31
- * `gpt-5.6` @ `medium` (see `phases/phase-4-review.md`, `claude-md-template.md`
31
+ * `gpt-5.6` @ `medium` (see `phases/phase-3-review.md`, `claude-md-template.md`
32
32
  * and `reviewer-output.schema.json`, which all state that value) even though
33
33
  * the persona's own tier is `sonnet` and resolves here to `gpt-5.4`. That is
34
34
  * deliberate: the Codex panel buys its diversity from effort, so two slots
@@ -1,5 +1,5 @@
1
1
  {
2
- "_readme": "Recommended Claude Code hooks for multi-agent-pipeline. Merge the `hooks` object into your ~/.claude/settings.json to make these deterministic, OS-enforced PreToolUse gates real (exit 2 blocks the tool call) rather than prompt-level hopes. Three PreToolUse gates ship here: (1) a staged-diff secret scan on git commit (pre-commit-check.sh); (2) an agent-guard on git commit + git push (agent-guard.sh) that blocks AI/assistant attribution in commit messages and force-push to a protected branch (main/master/develop); (3) a read-size gate on Read and Bash (check-read-size.sh), which inspects Read plus the shell commands that read a file whole (cat/head/tail/sed) and returns immediately for everything else, which routes an oversized read to a cheap worker instead of the caller's own rung. The first two inspect what a run WRITES; the third inspects what it pays to READ, and it is inert until `prefs.global.bulkRead.mode` is set to observe or enforce - so merging this block changes nothing until you opt in. All three are self-contained, fail-open on internal error, never execute the inspected command, and need no run-specific arguments, which is why they are naturally PreToolUse hooks. The other deterministic gates (evidence, consensus, intent, learnings) take run-specific arguments and are phase-enforced by the pipeline instead. Three capture hooks ship alongside them, and they are the reason a killed run no longer loses what it learned: (4) SessionEnd runs capture-flush.sh --if-stale, which writes a run's triage findings and durable learnings into the per-repo stores when the run never reached Phase 7 - previously every persistent write lived in Phase 7, the phase a run is LEAST likely to reach; the same hook runs note-session.sh, which records the mechanical shape of a NON-pipeline session (tools used, commands that failed, calls the user refused) so work done outside a run stops vanishing. (5) PreCompact runs capture-flush.sh - WITHOUT --if-stale, because the staleness test exists so a session exit does not re-flush a run that already finished, while a compaction is the moment un-flushed findings are actually at risk and both writes are idempotent, so the finished case costs two no-op writes. A compaction summarizes the conversation mid-phase: a long Phase 3 or Phase 4 can lose what it established before SessionEnd ever fires, which is the same failure that put the SessionEnd hook here one level down. (6) SessionStart runs capture-resume.sh, which prints at most two lines: an unfinished run and how to resume it, and a stale pipeline-observation queue. No capture hook calls a model, none reads a payload - note-session.sh keeps a command's first word and an exit code, never an argument or any output - and all exit 0 on every path, because a hook that fails a session over bookkeeping is worse than the bookkeeping it protects. multi-agent:setup offers to merge this block.",
2
+ "_readme": "Recommended Claude Code hooks for multi-agent-pipeline. Merge the `hooks` object into your ~/.claude/settings.json to make these deterministic, OS-enforced PreToolUse gates real (exit 2 blocks the tool call) rather than prompt-level hopes. Three PreToolUse gates ship here: (1) a staged-diff secret scan on git commit (pre-commit-check.sh); (2) an agent-guard on git commit + git push (agent-guard.sh) that blocks AI/assistant attribution in commit messages and force-push to a protected branch (main/master/develop); (3) a read-size gate on Read and Bash (check-read-size.sh), which inspects Read plus the shell commands that read a file whole (cat/head/tail/sed) and returns immediately for everything else, which routes an oversized read to a cheap worker instead of the caller's own rung. The first two inspect what a run WRITES; the third inspects what it pays to READ, and it is inert until `prefs.global.bulkRead.mode` is set to observe or enforce - so merging this block changes nothing until you opt in. All three are self-contained, fail-open on internal error, never execute the inspected command, and need no run-specific arguments, which is why they are naturally PreToolUse hooks. The other deterministic gates (evidence, consensus, intent, learnings) take run-specific arguments and are phase-enforced by the pipeline instead. Three capture hooks ship alongside them, and they are the reason a killed run no longer loses what it learned: (4) SessionEnd runs capture-flush.sh --if-stale, which writes a run's triage findings and durable learnings into the per-repo stores when the run never reached Phase 5 - previously every persistent write lived in Phase 5, the phase a run is LEAST likely to reach; the same hook runs note-session.sh, which records the mechanical shape of a NON-pipeline session (tools used, commands that failed, calls the user refused) so work done outside a run stops vanishing. (5) PreCompact runs capture-flush.sh - WITHOUT --if-stale, because the staleness test exists so a session exit does not re-flush a run that already finished, while a compaction is the moment un-flushed findings are actually at risk and both writes are idempotent, so the finished case costs two no-op writes. A compaction summarizes the conversation mid-phase: a long Phase 3 or Phase 4 can lose what it established before SessionEnd ever fires, which is the same failure that put the SessionEnd hook here one level down. (6) SessionStart runs capture-resume.sh, which prints at most two lines: an unfinished run and how to resume it, and a stale pipeline-observation queue. No capture hook calls a model, none reads a payload - note-session.sh keeps a command's first word and an exit code, never an argument or any output - and all exit 0 on every path, because a hook that fails a session over bookkeeping is worse than the bookkeeping it protects. multi-agent:setup offers to merge this block.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
@@ -3,7 +3,7 @@
3
3
  This block is managed by `multi-agent-pipeline`. Edit anything outside it freely;
4
4
  the installer replaces only the span up to the end marker.
5
5
 
6
- The pipeline is an 8-phase development workflow (analysis, planning, TDD dev,
6
+ The pipeline is a 6-phase development workflow (analysis, planning, TDD dev,
7
7
  parallel review + triage, test, commit, report). It is invoked as `/multi-agent`
8
8
  or `$multi-agent`, and the orchestrator spec lives at
9
9
  `$HOME/.codex/skills/multi-agent/SKILL.md`.
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Pipeline Overview
8
8
 
9
- 8-phase development workflow (Phase 0 through Phase 7). Describe your task and follow the phases:
9
+ 6-phase development workflow (Phase 0 through Phase 5). Describe your task and follow the phases:
10
10
 
11
11
  0. **Init** - Project setup, worktree, branch creation, identity binding
12
12
  1. **Analysis** - Stack detection, codebase exploration
@@ -17,8 +17,8 @@
17
17
  cases + cross-provider diversity) + Opus (security + architecture) + Sonnet
18
18
  (quality + correctness), followed by an Opus triage pass. Claude Code: Fable +
19
19
  Opus + Sonnet, followed by a Fable triage pass (GPT-5.4 is not natively
20
- reachable there - the only intentional cross-CLI asymmetry for Phase 4). Triage
21
- filters false-positives and out-of-scope items before looping back to Phase 3.
20
+ reachable there - the only intentional cross-CLI asymmetry for Phase 3). Triage
21
+ filters false-positives and out-of-scope items before looping back to Phase 2.
22
22
  5. **Test** - Optional manual testing + on-demand device audits
23
23
  6. **Commit** - Secret scan · commit · push · PR creation
24
24
  7. **Report** - Jira comment · Wiki + Figma screenshots · Confluence · log · knowledge + memory
@@ -30,7 +30,7 @@
30
30
  - **multi-agent-autopilot**: no confirmations, auto commit/PR, always Full
31
31
  - **multi-agent-local-autopilot**: same, no worktree
32
32
 
33
- Depth is the question, not a command: Full runs all 8 phases, Short is
33
+ Depth is the question, not a command: Full runs all 6 phases, Short is
34
34
  Init -> Dev(Opus) -> Review -> Test -> Commit -> Report. Review is never
35
35
  skipped either way.
36
36
 
@@ -54,18 +54,18 @@ so the user's input pattern stays language-agnostic.
54
54
 
55
55
  ## Sub-Agent Personas
56
56
 
57
- Phase 1 (Analysis) and Phase 4 (Review) dispatch sub-agents for parallel exploration
57
+ Phase 1 (Plan) and Phase 3 (Review) dispatch sub-agents for parallel exploration
58
58
  and review. The persona prompts live at `~/.copilot/agents/*.md` - installed by the
59
59
  pipeline installer alongside the Claude Code equivalents at `~/.claude/agents/`.
60
60
 
61
61
  | Agent | File | Used in |
62
62
  |-------|------|---------|
63
63
  | Explorer | `~/.copilot/agents/explorer.md` | Phase 1 codebase scan (parallel dispatch) |
64
- | Code Reviewer | `~/.copilot/agents/code-reviewer.md` | Phase 4 quality/correctness reviewer |
65
- | iOS Architect | `~/.copilot/agents/ios-architect.md` | Phase 4 iOS architecture review |
66
- | Android Architect | `~/.copilot/agents/android-architect.md` | Phase 4 Android architecture review |
67
- | Backend Architect | `~/.copilot/agents/backend-architect.md` | Phase 4 API/backend review |
68
- | Security Auditor | `~/.copilot/agents/security-auditor.md` | Phase 4 security audit (OWASP-based) |
64
+ | Code Reviewer | `~/.copilot/agents/code-reviewer.md` | Phase 3 quality/correctness reviewer |
65
+ | iOS Architect | `~/.copilot/agents/ios-architect.md` | Phase 3 iOS architecture review |
66
+ | Android Architect | `~/.copilot/agents/android-architect.md` | Phase 3 Android architecture review |
67
+ | Backend Architect | `~/.copilot/agents/backend-architect.md` | Phase 3 API/backend review |
68
+ | Security Auditor | `~/.copilot/agents/security-auditor.md` | Phase 3 security audit (OWASP-based) |
69
69
 
70
70
  Load the matching persona file before dispatching each reviewer - the prompt defines
71
71
  the model's focus area, severity rubric, and output format the triage pass expects.
@@ -77,7 +77,7 @@ but the actual contract is **8 interactive steps** from `refs/phases/phase-0-ini
77
77
  Copilot CLI has no slash-command infrastructure to auto-route through the full ref file,
78
78
  so execute ALL of these explicitly before touching code:
79
79
 
80
- 1. **Bootstrap tracker** - `bash ~/.copilot/scripts/phase-tracker.sh init 8` (once, before Step 0)
80
+ 1. **Bootstrap tracker** - `bash ~/.copilot/scripts/phase-tracker.sh init 6` (once, before Step 0)
81
81
  2. **Load prefs** - read `~/.claude/multi-agent-preferences.json`; warn + stop if setup never ran
82
82
  3. **Parse input** - classify (Jira ID, GitHub URL, free-text) + fetch issue via `gh` / Jira API
83
83
  4. **Select project(s) - single OR multi-repo** - scan `$HOME`, present numbered list,
@@ -125,8 +125,8 @@ bash ~/.copilot/scripts/phase-tracker.sh init "$TASK_ID"
125
125
  bash ~/.copilot/scripts/phase-tracker.sh add 0 Init
126
126
  bash ~/.copilot/scripts/phase-tracker.sh tiles
127
127
 
128
- # Step 7.5, after the depth answer - Full below, Short drops 1:Analysis and 2:Planning:
129
- for p in 1:Analysis 2:Planning 3:Dev 4:Review 5:Test 6:Commit 7:Report; do
128
+ # Step 7.5, after the depth answer - Full below, Short drops 1:Plan:
129
+ for p in 1:Plan 2:Dev 3:Review 4:Commit 5:Report; do
130
130
  bash ~/.copilot/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}"
131
131
  done
132
132
  bash ~/.copilot/scripts/phase-tracker.sh tiles --new
@@ -135,7 +135,7 @@ bash ~/.copilot/scripts/phase-tracker.sh tiles --new
135
135
  # transition to in_progress, completed_at on terminal status (completed/failed/skipped).
136
136
  # Render now shows a 16-char ASCII progress bar + elapsed time + per-phase token
137
137
  # usage + Total footer (v5.5.0):
138
- # Phase 3: Dev ████████████████ 2m 35s · 18.7k tok
138
+ # Phase 2: Dev ████████████████ 2m 35s · 18.7k tok
139
139
  # Total 34.8k tok
140
140
  bash ~/.copilot/scripts/phase-tracker.sh update <N> in_progress
141
141
  bash ~/.copilot/scripts/phase-tracker.sh update <N> completed # or failed / skipped
@@ -162,12 +162,12 @@ LOG_METRIC_FORWARD_TO_TRACKER=1 bash ~/.copilot/scripts/log-metric.sh "$TASK_ID"
162
162
  # v8.3+ - phase model tag (used by render-agent-log-cost.sh):
163
163
  bash ~/.copilot/scripts/phase-tracker.sh model <N> <opus|sonnet|haiku|gpt-5.4>
164
164
 
165
- # Phase 7 sub-step enforcement (v5.4.1) - register all 5 steps up front so
165
+ # Phase 5 sub-step enforcement (v5.4.1) - register all 5 steps up front so
166
166
  # wiki/confluence skips are VISIBLE, not silent. User reported prior silent-skip
167
167
  # behaviour losing visibility of component wiki generation:
168
- bash ~/.copilot/scripts/phase-tracker.sh update 7 in_progress
168
+ bash ~/.copilot/scripts/phase-tracker.sh update 5 in_progress
169
169
  for s in 1:Jira-Comment 2:Wiki+Figma 3:Confluence 4:Log+Telemetry 5:Knowledge+Memory; do
170
- bash ~/.copilot/scripts/phase-tracker.sh sub 7 "${s%%:*}" "${s#*:}" pending
170
+ bash ~/.copilot/scripts/phase-tracker.sh sub 5 "${s%%:*}" "${s#*:}" pending
171
171
  done
172
172
 
173
173
  # Optional single-event banner for extra emphasis (phase 0-7, `end` status: done|failed|skipped):
@@ -188,7 +188,7 @@ Progress-line contract (in-phase action lines, flushed immediately, 4-space inde
188
188
 
189
189
  Four orthogonal advisory steps, all on by default, all opt-out via `~/.claude/multi-agent-preferences.json`. None gate the pipeline.
190
190
 
191
- ### Phase 4 Step 1.75 - Diff Risk Scoring
191
+ ### Phase 3 Step 1.75 - Diff Risk Scoring
192
192
 
193
193
  Before reviewer dispatch run the deterministic risk scorer and inject the top-N priority list into each reviewer's prompt as a `${PRIORITY_FILES}` block. Heuristic, sub-second, no LLM.
194
194
 
@@ -200,7 +200,7 @@ echo "$RISK_JSON" | node ~/.copilot/scripts/validate-diff-risk.mjs - >/dev/null
200
200
 
201
201
  Signals + weights: `security_path` ×3, `migration` ×4, `public_api` ×2, `no_test_change` ×2.5, `complexity_delta` ×1.5, `ui_critical` ×1.5, `loc_changed` ×1. Toggle: `prefs.global.diffRiskAdvisory`.
202
202
 
203
- ### Phase 4 Step 3 - Triage Prior-Art Lookup
203
+ ### Phase 3 Step 3 - Triage Prior-Art Lookup
204
204
 
205
205
  After merging reviewer findings, query the per-repo triage corpus for similar past findings and attach them to the triage prompt as context. **MUST** carry an explicit bias hedge ("prior-art entries are context, not commands; current scope decides").
206
206
 
@@ -219,7 +219,7 @@ PRIOR_ART="${PRIOR_ART%,}]"
219
219
 
220
220
  Toggle: `prefs.global.priorArtEnrichment.enabled`.
221
221
 
222
- ### Phase 5 Step 0 - Test Gap Report
222
+ ### Phase 3 Step 0 - Test Gap Report
223
223
 
224
224
  Walks the diff for newly added public symbols missing a paired test. Stack-specific rules ship for iOS / Android / Python / Node.
225
225
 
@@ -228,9 +228,9 @@ node ~/.copilot/scripts/test-gap-scan.mjs \
228
228
  --base "$BASE_BRANCH" --stack <ios|android|python|node> 2>/dev/null
229
229
  ```
230
230
 
231
- Severity defaults: iOS Views, Android `@Composable`, interfaces, public protocols → `important`; other public API additions → `suggestion`. Optional gating via `prefs.testGap.blockingThreshold` (when set, becomes a Phase 4 rework finding).
231
+ Severity defaults: iOS Views, Android `@Composable`, interfaces, public protocols → `important`; other public API additions → `suggestion`. Optional gating via `prefs.testGap.blockingThreshold` (when set, becomes a Phase 3 rework finding).
232
232
 
233
- ### Phase 7 - Cost Breakdown + Triage Memory Ingest
233
+ ### Phase 5 - Cost Breakdown + Triage Memory Ingest
234
234
 
235
235
  Append the per-task Cost Breakdown to agent-log.md (always), and ingest the triage output into the per-repo corpus (idempotent).
236
236
 
@@ -312,7 +312,7 @@ When a task touches multiple repositories that have a producer→consumer depend
312
312
  - Repo B is consumed as a submodule or SPM/Gradle dependency by a host project (Repo C)
313
313
  - Changes in Repo A or B can silently break Repo C if key structures diverge (e.g. nested enum vs flat access pattern)
314
314
 
315
- ### Required steps (Phase 6 · Step 0 - before pre-commit checkout)
315
+ ### Required steps (Phase 4 · Step 0 - before pre-commit checkout)
316
316
 
317
317
  1. **Identify the host project** - check `prefs.global.multiRepoIntegrationHosts` for a matching `repoSet` combo. If no match, ASK the user once (record the answer to skip re-asking); autopilot refuses to prompt, skips visibly.
318
318
  2. **Update submodules** - refresh each listed submodule path inside `hostPath` to pick up this task's feature branch / merged commits.
@@ -320,8 +320,8 @@ When a task touches multiple repositories that have a producer→consumer depend
320
320
  4. **Build the host scheme/module** - capture error lines from stderr.
321
321
  5. **Evaluate**:
322
322
  - Zero new errors → sub-step `completed`, proceed to commit/PR.
323
- - New errors from our changes → sub-step `failed`, STOP. Offer: return to Phase 3 for auto-fix / pause for manual fix / override with warning.
324
- - Pre-existing errors (unrelated) → document in Phase 7 report and proceed.
323
+ - New errors from our changes → sub-step `failed`, STOP. Offer: return to Phase 2 for auto-fix / pause for manual fix / override with warning.
324
+ - Pre-existing errors (unrelated) → document in the Phase 5 report and proceed.
325
325
 
326
326
  ### Why this exists
327
327
 
@@ -333,11 +333,11 @@ encounter and auto-applies on subsequent runs - no repeated configuration.
333
333
  ### Tracker integration
334
334
 
335
335
  ```bash
336
- # Phase 6 entry - if multi-repo, register the integration-build sub-step:
336
+ # Phase 4 entry - if multi-repo, register the integration-build sub-step:
337
337
  if [ "$(jq '.projects | length' "$STATE_FILE")" -ge 2 ]; then
338
- bash ~/.copilot/scripts/phase-tracker.sh sub 6 0 "Integration build" in_progress
338
+ bash ~/.copilot/scripts/phase-tracker.sh sub 4 0 "Integration build" in_progress
339
339
  # ... run the build per refs/multi-repo-integration-build.md ...
340
- bash ~/.copilot/scripts/phase-tracker.sh sub 6 0 "Integration build" completed
340
+ bash ~/.copilot/scripts/phase-tracker.sh sub 4 0 "Integration build" completed
341
341
  fi
342
342
  ```
343
343