@mmerterden/multi-agent-pipeline 20.36.0 → 20.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/docs/facts.json +2 -2
  3. package/docs/features.md +1 -1
  4. package/docs/recovery-guide.md +1 -1
  5. package/install/catalog-history.json +1 -1
  6. package/manifest.json +225 -148
  7. package/package.json +1 -1
  8. package/pipeline/commands/multi-agent/SKILL.md +33 -154
  9. package/pipeline/commands/multi-agent/analysis/SKILL.md +14 -68
  10. package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +5 -8
  11. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +38 -109
  12. package/pipeline/commands/multi-agent/channels/SKILL.md +38 -167
  13. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +37 -144
  14. package/pipeline/commands/multi-agent/design-check/SKILL.md +27 -131
  15. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +22 -48
  16. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +37 -180
  17. package/pipeline/commands/multi-agent/jira/SKILL.md +16 -46
  18. package/pipeline/commands/multi-agent/manual-test/SKILL.md +12 -7
  19. package/pipeline/commands/multi-agent/refactor/SKILL.md +23 -184
  20. package/pipeline/commands/multi-agent/resume/SKILL.md +30 -136
  21. package/pipeline/commands/multi-agent/review/SKILL.md +24 -199
  22. package/pipeline/commands/multi-agent/setup/SKILL.md +25 -181
  23. package/pipeline/commands/multi-agent/stack/SKILL.md +9 -53
  24. package/pipeline/commands/multi-agent/status/SKILL.md +13 -2
  25. package/pipeline/commands/multi-agent/store-ready/SKILL.md +27 -226
  26. package/pipeline/commands/multi-agent/sync/SKILL.md +35 -164
  27. package/pipeline/commands/multi-agent/test-gen/SKILL.md +2 -4
  28. package/pipeline/commands/multi-agent/update/SKILL.md +18 -60
  29. package/pipeline/contract/CHANGELOG.md +9 -0
  30. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  31. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  32. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  33. package/pipeline/contract/fixtures/runs-awaiting-question.json +1 -1
  34. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  35. package/pipeline/contract/fixtures/runs-failed.json +1 -1
  36. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +1 -1
  37. package/pipeline/contract/fixtures/runs-pr-opened.json +1 -1
  38. package/pipeline/contract/fixtures/runs-running.json +1 -1
  39. package/pipeline/contract/manifest.json +5 -5
  40. package/pipeline/contract/types/index.d.ts +3 -2
  41. package/pipeline/multi-agent-refs/audit-guide.md +20 -0
  42. package/pipeline/multi-agent-refs/autopilot-on/details.md +148 -0
  43. package/pipeline/multi-agent-refs/channels/generator.md +14 -0
  44. package/pipeline/multi-agent-refs/channels/preview.md +13 -0
  45. package/pipeline/multi-agent-refs/channels/reference.md +46 -0
  46. package/pipeline/multi-agent-refs/complaint-analysis/phases.md +159 -0
  47. package/pipeline/multi-agent-refs/design-check/export.md +1 -0
  48. package/pipeline/multi-agent-refs/design-check/init-inventory.md +1 -1
  49. package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +64 -0
  50. package/pipeline/multi-agent-refs/features/analysis-command-notes.md +53 -0
  51. package/pipeline/multi-agent-refs/features/commit-multi-repo.md +63 -0
  52. package/pipeline/multi-agent-refs/features/dev-multi-repo.md +51 -0
  53. package/pipeline/multi-agent-refs/features/test-gap.md +40 -0
  54. package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
  55. package/pipeline/multi-agent-refs/garbage-collect/phases.md +60 -0
  56. package/pipeline/multi-agent-refs/ios-coding-standard/plan.md +71 -0
  57. package/pipeline/multi-agent-refs/ios-coding-standard/resolve-and-scan.md +135 -0
  58. package/pipeline/multi-agent-refs/jira/picker-detail.md +71 -0
  59. package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +88 -0
  60. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +96 -1
  61. package/pipeline/multi-agent-refs/orchestrator/phase-3-user-test.md +12 -9
  62. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
  63. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +8 -47
  64. package/pipeline/multi-agent-refs/phases/phase-3-review.md +21 -65
  65. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +9 -59
  66. package/pipeline/multi-agent-refs/phases/phase-5-report.md +0 -31
  67. package/pipeline/multi-agent-refs/refactor/sweep.md +190 -0
  68. package/pipeline/multi-agent-refs/resume/details.md +115 -2
  69. package/pipeline/multi-agent-refs/review/inputs.md +33 -1
  70. package/pipeline/multi-agent-refs/review/module-guides.md +9 -1
  71. package/pipeline/multi-agent-refs/review/panel.md +75 -0
  72. package/pipeline/multi-agent-refs/review/valven.md +5 -1
  73. package/pipeline/multi-agent-refs/rules.md +1 -1
  74. package/pipeline/multi-agent-refs/setup/hooks-and-plugins.md +4 -0
  75. package/pipeline/multi-agent-refs/setup/token-save-flow.md +13 -0
  76. package/pipeline/multi-agent-refs/stack/background.md +72 -0
  77. package/pipeline/multi-agent-refs/store-ready/gates.md +139 -0
  78. package/pipeline/multi-agent-refs/store-ready/report.md +40 -2
  79. package/pipeline/multi-agent-refs/sync/office.md +10 -0
  80. package/pipeline/multi-agent-refs/sync/overview.md +61 -0
  81. package/pipeline/multi-agent-refs/sync/repo.md +91 -0
  82. package/pipeline/multi-agent-refs/update/details.md +83 -0
  83. package/pipeline/office/index.html +6 -3
  84. package/pipeline/office/toolkit.json +1 -1
  85. package/pipeline/rules/figma-pipeline.md +6 -3
  86. package/pipeline/schemas/prefs.schema.json +1 -1
  87. package/pipeline/schemas/runs-index.schema.json +2 -1
  88. package/pipeline/scripts/_memory-policy.mjs +27 -5
  89. package/pipeline/scripts/checkpoint-fold.sh +59 -0
  90. package/pipeline/scripts/contract-server.mjs +1 -1
  91. package/pipeline/scripts/gate-ledger.mjs +1 -1
  92. package/pipeline/scripts/office-control.mjs +41 -15
  93. package/pipeline/scripts/offload-ref.sh +1 -1
  94. package/pipeline/scripts/rework-rulings.mjs +5 -3
  95. package/pipeline/scripts/runs-index.mjs +34 -7
  96. package/pipeline/scripts/scope-check-gate.mjs +15 -2
  97. package/pipeline/scripts/status-overview.mjs +401 -0
  98. package/pipeline/scripts/user-test-handoff.sh +203 -0
  99. package/pipeline/scripts/validate-planning.mjs +5 -3
  100. package/pipeline/scripts/validate-triage.mjs +2 -1
  101. package/pipeline/scripts/write-state.mjs +13 -4
  102. package/pipeline/skills/.skill-manifest.json +64 -64
  103. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +7 -70
  104. package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +67 -0
  105. package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +8 -0
  106. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +10 -72
  107. package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +69 -0
  108. package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +7 -0
  109. package/pipeline/skills/shared/core/google-play-compliance/references/version-history.md +5 -0
  110. package/pipeline/skills/shared/core/multi-agent/SKILL.md +39 -262
  111. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +35 -73
  112. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +37 -337
  113. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +27 -122
  114. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +8 -340
  115. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +37 -180
  116. package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +12 -7
  117. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +23 -184
  118. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +14 -82
  119. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +25 -277
  120. package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +13 -2
  121. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +73 -217
  122. package/pipeline/skills/shared/external/alarmkit/SKILL.md +11 -162
  123. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-code.md +257 -0
  124. package/pipeline/skills/shared/external/android-architecture/SKILL.md +7 -58
  125. package/pipeline/skills/shared/external/android-architecture/references/code-examples.md +68 -0
  126. package/pipeline/skills/shared/external/app-intents/SKILL.md +3 -45
  127. package/pipeline/skills/shared/external/app-intents/references/code-examples.md +54 -0
  128. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +5 -81
  129. package/pipeline/skills/shared/external/app-store-optimization/references/engagement-and-localization.md +96 -0
  130. package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -112
  131. package/pipeline/skills/shared/external/app-store-review/references/monetization-and-submission.md +138 -0
  132. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +10 -117
  133. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models-code.md +186 -0
  134. package/pipeline/skills/shared/external/authentication/SKILL.md +3 -50
  135. package/pipeline/skills/shared/external/authentication/references/code-examples.md +59 -0
  136. package/pipeline/skills/shared/external/callkit-voip/SKILL.md +3 -84
  137. package/pipeline/skills/shared/external/callkit-voip/references/code-examples.md +93 -0
  138. package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +7 -263
  139. package/pipeline/skills/shared/external/ci-cd-pipelines/references/pipeline-examples.md +281 -0
  140. package/pipeline/skills/shared/external/clean-code/SKILL.md +8 -41
  141. package/pipeline/skills/shared/external/clean-code/references/code-examples.md +56 -0
  142. package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +8 -146
  143. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-code.md +214 -0
  144. package/pipeline/skills/shared/external/compose-components/SKILL.md +6 -80
  145. package/pipeline/skills/shared/external/compose-components/references/code-examples.md +89 -0
  146. package/pipeline/skills/shared/external/compose-navigation/SKILL.md +5 -64
  147. package/pipeline/skills/shared/external/compose-navigation/references/code-examples.md +70 -0
  148. package/pipeline/skills/shared/external/core-data/SKILL.md +9 -157
  149. package/pipeline/skills/shared/external/core-data/references/core-data-code.md +221 -0
  150. package/pipeline/skills/shared/external/core-nfc/SKILL.md +3 -89
  151. package/pipeline/skills/shared/external/core-nfc/references/code-examples.md +98 -0
  152. package/pipeline/skills/shared/external/coreml/SKILL.md +17 -133
  153. package/pipeline/skills/shared/external/coreml/references/coreml-code.md +208 -0
  154. package/pipeline/skills/shared/external/css-modern/SKILL.md +8 -131
  155. package/pipeline/skills/shared/external/css-modern/references/code-examples.md +142 -0
  156. package/pipeline/skills/shared/external/database-patterns/SKILL.md +6 -103
  157. package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +112 -0
  158. package/pipeline/skills/shared/external/html-semantic/SKILL.md +7 -48
  159. package/pipeline/skills/shared/external/html-semantic/references/code-examples.md +54 -0
  160. package/pipeline/skills/shared/external/humanizer/SKILL.md +6 -19
  161. package/pipeline/skills/shared/external/humanizer/references/voice.md +24 -0
  162. package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +13 -170
  163. package/pipeline/skills/shared/external/ios-accessibility/references/assistive-tech-review.md +224 -0
  164. package/pipeline/skills/shared/external/ios-localization/SKILL.md +2 -24
  165. package/pipeline/skills/shared/external/ios-localization/references/code-examples.md +30 -0
  166. package/pipeline/skills/shared/external/ios-networking/SKILL.md +3 -58
  167. package/pipeline/skills/shared/external/ios-networking/references/code-examples.md +67 -0
  168. package/pipeline/skills/shared/external/ios-security/SKILL.md +4 -64
  169. package/pipeline/skills/shared/external/ios-security/references/code-examples.md +74 -0
  170. package/pipeline/skills/shared/external/live-activities/SKILL.md +4 -90
  171. package/pipeline/skills/shared/external/live-activities/references/code-examples.md +108 -0
  172. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +9 -23
  173. package/pipeline/skills/shared/external/localization-reuse-map/references/project-settings.md +22 -0
  174. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +5 -95
  175. package/pipeline/skills/shared/external/mapkit-location/references/code-examples.md +117 -0
  176. package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +7 -106
  177. package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +124 -0
  178. package/pipeline/skills/shared/external/permissionkit/SKILL.md +2 -31
  179. package/pipeline/skills/shared/external/permissionkit/references/code-examples.md +37 -0
  180. package/pipeline/skills/shared/external/play-store-review/SKILL.md +6 -74
  181. package/pipeline/skills/shared/external/play-store-review/references/signing-and-policies.md +83 -0
  182. package/pipeline/skills/shared/external/push-notifications/SKILL.md +8 -125
  183. package/pipeline/skills/shared/external/push-notifications/references/notification-code.md +176 -0
  184. package/pipeline/skills/shared/external/python-patterns/SKILL.md +7 -158
  185. package/pipeline/skills/shared/external/python-patterns/references/python-examples.md +176 -0
  186. package/pipeline/skills/shared/external/rest-api-design/SKILL.md +7 -157
  187. package/pipeline/skills/shared/external/rest-api-design/references/api-examples.md +175 -0
  188. package/pipeline/skills/shared/external/swift-architecture/SKILL.md +11 -230
  189. package/pipeline/skills/shared/external/swift-architecture/references/pattern-examples.md +295 -0
  190. package/pipeline/skills/shared/external/swift-codable/SKILL.md +17 -149
  191. package/pipeline/skills/shared/external/swift-codable/references/codable-recipes.md +207 -0
  192. package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +12 -99
  193. package/pipeline/skills/shared/external/swift-concurrency/references/code-examples.md +100 -0
  194. package/pipeline/skills/shared/external/swift-concurrency/references/swift-6-2-additions.md +18 -0
  195. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +9 -78
  196. package/pipeline/skills/shared/external/swift-formatstyle/references/formatstyle-examples.md +113 -0
  197. package/pipeline/skills/shared/external/swift-language/SKILL.md +3 -56
  198. package/pipeline/skills/shared/external/swift-language/references/code-examples.md +65 -0
  199. package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +1 -0
  200. package/pipeline/skills/shared/external/swiftdata/SKILL.md +6 -122
  201. package/pipeline/skills/shared/external/swiftdata/references/code-examples.md +140 -0
  202. package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +12 -139
  203. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/interop-code.md +198 -0
  204. package/pipeline/skills/shared/external/tailwind-css/SKILL.md +9 -81
  205. package/pipeline/skills/shared/external/tailwind-css/references/code-examples.md +91 -0
  206. package/pipeline/skills/shared/external/testing-backend/SKILL.md +7 -207
  207. package/pipeline/skills/shared/external/testing-backend/references/testing-examples.md +225 -0
  208. package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +8 -89
  209. package/pipeline/skills/shared/external/typescript-patterns/references/code-examples.md +100 -0
  210. package/pipeline/skills/shared/external/vision-framework/SKILL.md +2 -20
  211. package/pipeline/skills/shared/external/vision-framework/references/code-examples.md +26 -0
  212. package/pipeline/skills/shared/external/vue-composition/SKILL.md +7 -169
  213. package/pipeline/skills/shared/external/vue-composition/references/vue-examples.md +187 -0
  214. package/pipeline/skills/shared/external/web-accessibility/SKILL.md +7 -174
  215. package/pipeline/skills/shared/external/web-accessibility/references/a11y-examples.md +192 -0
  216. package/pipeline/skills/shared/external/web-performance/SKILL.md +8 -66
  217. package/pipeline/skills/shared/external/web-performance/references/code-examples.md +77 -0
  218. package/pipeline/skills/shared/external/web-testing/SKILL.md +11 -186
  219. package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +213 -0
  220. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/format-and-output.md +0 -0
  221. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/publish-and-snapshot.md +0 -0
  222. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/sources-and-recipes.md +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmerterden/multi-agent-pipeline",
3
- "version": "20.36.0",
3
+ "version": "20.37.1",
4
4
  "description": "6-phase AI development pipeline with full orchestration on Claude Code, Copilot CLI and Codex CLI. Analysis, planning, TDD, CLI-aware parallel review with consensus surfacing + Fable triage, default-FAIL evidence gates, secret + intent guards, per-phase cost ledger, persistent learnings memory, wiki generation, commit automation. Token-preserving uninstall.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -9,185 +9,64 @@ allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdat
9
9
 
10
10
  > **Pickers follow** `$HOME/.claude/multi-agent-refs/picker-contract.md`: never a one-option call, and branch on the option selected, not on its text.
11
11
 
12
- > **MUST: Figma MCP is BLOCKING for any task with a Figma reference.** Before any UI synthesis runs in this pipeline (analysis, planning, dev, or rework), call `mcp__claude_ai_Figma__get_design_context` for every referenced frame and use the `CodeConnectSnippet` component name verbatim. Backend-only tasks are exempt. See `$HOME/.claude/multi-agent-refs/rules.md` "User Interaction Discipline" and `$HOME/.claude/rules/figma-pipeline.md` "MUST: Figma MCP-first (BLOCKING)".
12
+ > **MUST: Figma MCP is BLOCKING for any task with a Figma reference.** Before any UI synthesis (analysis, planning, dev, or rework), call `mcp__claude_ai_Figma__get_design_context` for every referenced frame and use the `CodeConnectSnippet` component name verbatim. Backend-only tasks are exempt. See `$HOME/.claude/multi-agent-refs/rules.md` "User Interaction Discipline" and `$HOME/.claude/rules/figma-pipeline.md`.
13
13
 
14
14
  Parse the user input and route to the correct sub-command.
15
15
 
16
16
  **Input**: $ARGUMENTS
17
17
 
18
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` from `$HOME/.claude/multi-agent-preferences.json` and render every conversational line in it. `AskUserQuestion` renders its `question`, option `label`s and option `description`s in `outputLanguage`; only `header` stays English (<=12-char chip); external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
18
+ > **Language (read FIRST)**: before any status output, read `prefs.global.outputLanguage` from `$HOME/.claude/multi-agent-preferences.json` and render every conversational line in it. `AskUserQuestion` `question`, option `label`s and `description`s follow `outputLanguage`; only `header` stays English (<=12-char chip). Identifiers, commit messages and branch names stay English. Contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
19
19
 
20
- ## Canonical Invocation (per CLI)
20
+ ## Invocation and input parsing
21
21
 
22
- Each helper subcommand has its own slash entry: `/multi-agent:<name>` on Claude Code, `/multi-agent-<name>` on Copilot CLI. The space-form (`multi-agent <subcommand>`) is still routed by this dispatcher for backward compatibility, but only the colon / dash forms are surfaced in autocomplete. Table: `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Canonical invocation".
22
+ Each subcommand has its own entry: `/multi-agent:<name>` on Claude Code, `/multi-agent-<name>` on Copilot CLI; the space form is still routed here. Classification lives in `$HOME/.claude/multi-agent-refs/_input-parser.md` (canonical): `#N` / bare number, `repo#N`, GitHub issue URL, Jira URL, bare Jira id, `jira`, `issue`, free text.
23
23
 
24
- ## Input Parsing
25
-
26
- Classification schema lives in `$HOME/.claude/multi-agent-refs/_input-parser.md` - canonical source. Summary:
27
-
28
- | # | Pattern | Type | Picker flow |
29
- |---|---------|------|--------|
30
- | 1 | `#N` or bare `316` | `gh-num` | account → repo (single) → maturity → dev-context |
31
- | 2 | `repo#N` (e.g. `my-app#316`) | `gh-short` | account → maturity → dev-context |
32
- | 3 | `https://github.com/.../issues/N` | `gh-url` | account → maturity → dev-context |
33
- | 4 | `https://{JIRA_HOST}/browse/{JIRA_KEY}-N` | `jira-url` | account → maturity → dev-context |
34
- | 5 | `{JIRA_KEY}-N` (bare) | `jira-id` | account → maturity → dev-context |
35
- | 6 | `jira` | full picker | account → project (multi) → issue → maturity → dev-context |
36
- | 7 | `issue` | full picker | account → repo (multi) → issue → maturity → dev-context |
37
- | 8 | Free-text | `freetext` | account → repo (single) → dev-context (maturity skip) |
38
-
39
- **Rule**: Whatever the type, **account is always asked** (autopilot picks a default). After issue fetch, **maturity check is mandatory** - a blocker asks before it halts, and an autopilot run can be told to ask on the item itself (`$HOME/.claude/multi-agent-refs/features/maturity-followup.md`). Picker `header` renders in English (the 12-char chip); the `question`, each option's `label` and each option's `description` render in `outputLanguage`, per the canonical matrix in `multi-agent-refs/rules.md`.
40
-
41
- Lib scripts (`~/.claude/lib/`):
42
- - `account-resolver.sh` - keychain account inventory
43
- - `issue-fetcher.sh` - Jira/GitHub fetch + maturity scoring
44
- - `repo-cache.sh` - TTL-cached repo list
45
- - `submodule-detector.sh` - `.gitmodules` parse → dev-context suggestions
46
- - `multi-repo-pipeline.sh` - worktree/branch/commit/PR orchestration
24
+ **Rule**: whatever the type, **account is always asked** (autopilot picks a default). After an issue fetch the **maturity check is mandatory**: a blocker asks before it halts, and an autopilot run can ask on the item itself (`$HOME/.claude/multi-agent-refs/features/maturity-followup.md`). Free text skips maturity.
47
25
 
48
26
  ## Routing
49
27
 
50
- | Input Pattern | Action |
51
- |---------------|--------|
52
- | `#N`, `316` | GitHub Issue # - parse, select project, start pipeline |
53
- | `https://github.com/.../issues/N` | GitHub Issue URL - fetch, auto-detect or ask project |
54
- | `https://{JIRA_HOST}/browse/{JIRA_KEY}-XXXXX` | Jira URL - fetch, select project, start pipeline |
55
- | `{JIRA_KEY}-XXXXX` | Jira ID - fetch, select project, start pipeline |
56
- | Free-text | Bug/feature description - select project, start pipeline |
57
- | `jira` | 4-step picker (hesap → proje → issue → dev-context) - `commands/multi-agent/jira/SKILL.md` delegate |
58
- | `issue` | 4-step picker (hesap → repo → issue → dev-context) - `commands/multi-agent/issue/SKILL.md` delegate |
59
- | `status` | List all tasks (scan `$HOME/.claude/logs/multi-agent/`) |
60
- | `log [id]` | Show task log |
61
- | `resume [id]` | Resume paused task |
62
- | `kill [id]` | Delete worktree (logs preserved). Confirm first |
63
- | `clear-logs` | **Superseded - redirect, do not run.** Say so and route to `prune-logs`. It targeted `.worktrees/PROJ-*/agent-log.md`, a path nothing has written to since logs moved to `$HOME/.claude/logs/multi-agent/{project}/{task-id}/`; running it would report deleting nothing as success. |
64
- | `purge` | Worktree + logs + counter - full reset (double confirm) |
65
- | `review [#N\|repo#N\|PR-url\|branch]` | Parallel review of a PR or branch diff; with no input (interactive) lists open GitHub + Bitbucket PRs to multi-select. Posts per-finding inline comments + approve/needs-work on PRs. No worktree. |
66
- | `review-jira [KEY\|url]` | Grade a Jira issue's readiness for the pipeline (scope / AC / repro / design / API / stack), then post the gaps as a Jira comment. Read-only on code. |
67
- | `review-issue [#N\|repo#N\|url]` | Grade a GitHub issue's readiness for the pipeline, then post the gaps as an issue comment. Read-only on code. |
68
- | `analysis ["<feature>"]` | Standalone feature-spec analysis; stops after the document. No worktree, no commits, no dev chain. |
69
- | `complaint-analysis ["<run-name>"] [--file <path>] [<jira-id\|confluence-url> ...]` | Customer-complaint triage to a report and a verdict; read-only on code. No worktree, commits or dev chain. |
70
- | `build-optimize` | iOS-only Xcode build performance wrapper; recommend-first plan. Fail-fast on non-iOS stacks. |
71
- | `channels [PR-url\|#N\|Jira-url\|Jira-id] [--channels pr,jira,confluence,wiki] [--content normal,test,auto-diff,note] [--message "..."]` | Post the task report to multi-select channels with multi-select content; Phase 5 delegates here, also post-hoc. No worktree. |
72
- | `create-jira ["desc"] [figma-url] [swagger-url]` | Create a standards-compliant Jira issue (Task / Bug / Story) with full draft preview + explicit approval before create. No worktree, no commits. |
73
- | `test` or `test [args]` | UI Bug Hunter - screenshot + tap + analyze on booted simulator via MCP (read `$HOME/.claude/commands/sim-test.md`). `/multi-agent:test` also resolves here via the `commands/multi-agent/test/SKILL.md` delegate. |
74
- | `test-dark-mode` · `test-accessibility` · `test-dynamic-type` · `test-screenshots [locale]` | Fixed-scenario aliases for the four parameterless / single-parameter `test` scenarios, so the tag autocompletes instead of having to be quoted. Each delegates to the same `sim-test.md` with its scenario pinned; behaviour is identical to the quoted form, which is not deprecated. |
75
- | `store-ready [repo] [--archive=\|--ipa=\|--aab=\|--apk=] [--skip-sweep]` | Pre-submission store readiness for a built package, iOS and Android, local-only. Validates only, never ships a build. |
76
- | `manual-test [#id]` | Phase 5 standalone Manual Test - checks out the task branch, prints Xcode / SourceTree hints, waits for user verdict (`ok` / `fix: ...`). |
77
- | `design-check [scope]` | Mock-mode vs Figma design audit (iOS / Android, local-only) with a coverage gate. No commits, no CI. |
78
- | `stack [ios\|android\|backend\|mobile\|all]` | Swap skills for next conversation. No arg = show current stack. |
79
- | `language [en\|tr]` | Show or set the assistant `outputLanguage` (explanations and chat replies). `promptLanguage` is locked to `en` and is not toggleable. No arg = show current `outputLanguage`. With `en` or `tr` = set and persist `outputLanguage`. Commits and branch names stay English; PR, Jira and wiki bodies follow it. |
80
- | `setup` | Keychain token + Git Identity onboarding |
81
- | `autopilot` | Skip user confirmations, auto commit/PR |
82
- | No args / `help` | Show usage guide |
83
-
84
- Full action descriptions for the shortened rows (`analysis`, `complaint-analysis`, `build-optimize`, `channels`, `create-jira`, `store-ready`, `design-check`): `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Routing detail".
85
-
86
- ---
28
+ Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Routing and loading tables" whenever a row below is not enough: every row in full, the loading table, guide selection and the lib scripts. After routing, `Read` only the file the action needs.
87
29
 
88
- ## Modular Loading
89
-
90
- This command uses lazy loading for token efficiency. Read the relevant sub-file based on the routed action:
91
-
92
- **File layout:**
93
- - `commands/multi-agent/{cmd}/SKILL.md` → **invocable actions** (each gets its own `/multi-agent:<name>` slash command)
94
- - `$HOME/.claude/multi-agent-refs/**` → **internal references**, read by the main command, never invoked directly. They live outside `commands/` precisely so they never appear in slash-command autocomplete.
95
-
96
- | Route | File to Read |
97
- |-------|-------------|
98
- | Pipeline task (any input type) | `$HOME/.claude/multi-agent-refs/phases.md` + `$HOME/.claude/multi-agent-refs/_account-picker.md` + `_repo-picker.md` + `_dev-context.md` |
99
- | `jira` | `$HOME/.claude/commands/multi-agent/jira/SKILL.md` (4-step picker) |
100
- | `issue` | `$HOME/.claude/commands/multi-agent/issue/SKILL.md` (4-step picker) |
101
- | Direct ID (`{JIRA_KEY}-N`, `#N`, gh URL, repo#N, free-text) | `$HOME/.claude/multi-agent-refs/_input-parser.md` → `_account-picker.md` → `lib/issue-fetcher.sh` (maturity check) → `_dev-context.md` |
102
- | `setup` | `$HOME/.claude/commands/multi-agent/setup/SKILL.md` |
103
- | `help` | `$HOME/.claude/commands/multi-agent/help/SKILL.md` |
104
- | `channels` | `$HOME/.claude/commands/multi-agent/channels/SKILL.md` |
105
- | `sync` | `$HOME/.claude/commands/multi-agent/sync/SKILL.md` |
106
- | `clear-logs` | Handled inline - redirect to `prune-logs`, see the routing note |
107
- | `review` | `$HOME/.claude/commands/multi-agent/review/SKILL.md` |
108
- | `review-jira` | `$HOME/.claude/commands/multi-agent/review-jira/SKILL.md` (loads `$HOME/.claude/multi-agent-refs/readiness-review.md`) |
109
- | `review-issue` | `$HOME/.claude/commands/multi-agent/review-issue/SKILL.md` (loads `$HOME/.claude/multi-agent-refs/readiness-review.md`) |
110
- | `analysis` | `$HOME/.claude/commands/multi-agent/analysis/SKILL.md` |
111
- | `complaint-analysis` | `$HOME/.claude/commands/multi-agent/complaint-analysis/SKILL.md` |
112
- | `build-optimize` | `$HOME/.claude/commands/multi-agent/build-optimize/SKILL.md` |
113
- | `create-jira` | `$HOME/.claude/commands/multi-agent/create-jira/SKILL.md` (loads `$HOME/.claude/multi-agent-refs/generate-issue.md`) |
114
- | `stack` | `$HOME/.claude/commands/multi-agent/stack/SKILL.md` |
115
- | `language` | Handled inline - set/show outputLanguage in preferences |
116
- | SwiftUI component task (iOS) | `$HOME/.claude/multi-agent-refs/swiftui-guide.md` |
117
- | Jetpack Compose task (Android) | `$HOME/.claude/multi-agent-refs/android-guide.md` |
118
- | Backend API task | `$HOME/.claude/multi-agent-refs/backend-guide.md` |
119
- | Web component task | `$HOME/.claude/multi-agent-refs/web-guide.md` |
120
- | Phase 1 or Phase 5 (knowledge) | `$HOME/.claude/multi-agent-refs/knowledge.md` |
121
- | Token lookup needed | `$HOME/.claude/multi-agent-refs/keychain.md` |
122
- | Audit tools (Phase 3) | `$HOME/.claude/multi-agent-refs/audit-guide.md` |
123
- | `test` | `$HOME/.claude/commands/sim-test.md` (colon-form `/multi-agent:test` uses the delegate at `commands/multi-agent/test/SKILL.md`) |
124
- | `test-dark-mode` · `test-accessibility` · `test-dynamic-type` · `test-screenshots` | `$HOME/.claude/commands/sim-test.md`, scenario pinned by the command name (delegates at `commands/multi-agent/test-*/SKILL.md`) |
125
- | `manual-test` | `$HOME/.claude/commands/multi-agent/manual-test/SKILL.md` |
126
- | `design-check` | `$HOME/.claude/commands/multi-agent/design-check/SKILL.md` |
127
-
128
- **Modifier flag** (`autopilot`) and **ops** (`status`, `log`, `resume`, `kill`, `purge`, `review`) are parsed inline by this file - no separate spec files, they compose with the pipeline or do one-shot work.
129
-
130
- **How**: After routing, `Read` the relevant file and follow its instructions. Only load what the current action needs.
131
-
132
- **Guide selection** (auto, based on Phase 1 detected stack):
133
- - iOS detected -> load `swiftui-guide.md`
134
- - Android detected -> load `android-guide.md`
135
- - Python/Node.js/Go detected -> load `backend-guide.md`
136
- - React/Vue/Next.js detected -> load `web-guide.md`
137
- - Multiple stacks -> load all relevant guides
138
-
139
- **Agent definitions** (Phase 1 explorer, Phase 3 reviewer, the three architects, the security auditor, each with its `preferredModel`): `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Agent definitions".
140
-
141
- **Per-persona model routing:** Before each Agent dispatch, the orchestrator reads `preferredModel` from the persona file and exports `CLAUDE_CODE_SUBAGENT_MODEL` (Claude Code) / passes `--model` (Copilot CLI). Precedence: per-dispatch `PHASE_MODEL_OVERRIDE` > a matching `prefs.global.modelRouting` rule (v19.0.0+, consulted only when the phase named no model, and only inside the Anthropic ladder because subagent dispatch belongs to the host) > persona `preferredModel` > `fable` (falls back per `$HOME/.claude/multi-agent-refs/features/model-fallback.md`). Full contract: `skills/shared/core/multi-agent/SKILL.md#agent-dispatch--per-persona-model-routing-v610`. Simple text tasks (summaries, extraction, labels, drafts) ask `model-dispatch.sh delegate --default host` first and use `llm_delegate` on `free`: `$HOME/.claude/multi-agent-refs/features/free-models.md`.
30
+ | Input | Read / do |
31
+ |---|---|
32
+ | Task (Jira id / URL, GitHub `#N` / URL, `repo#N`, free text) | `$HOME/.claude/multi-agent-refs/phases.md` + `_account-picker.md` + `_repo-picker.md` + `_dev-context.md` |
33
+ | `jira` / `issue` | `$HOME/.claude/commands/multi-agent/jira/SKILL.md` / `issue/SKILL.md` (4-step pickers) |
34
+ | `status`, `log [id]`, `resume [id]` | Inline; status scans `$HOME/.claude/logs/multi-agent/` |
35
+ | `kill [id]` / `purge` | Inline. Kill confirms first; purge confirms twice |
36
+ | `clear-logs` | **Superseded - redirect, do not run.** Route to `prune-logs` |
37
+ | `review [#N\|repo#N\|PR-url\|branch]` | `$HOME/.claude/commands/multi-agent/review/SKILL.md` |
38
+ | `review-jira [KEY\|url]` | `$HOME/.claude/commands/multi-agent/review-jira/SKILL.md` |
39
+ | `review-issue [#N\|repo#N\|url]` | `$HOME/.claude/commands/multi-agent/review-issue/SKILL.md` |
40
+ | `create-jira ["desc"] [figma-url] [swagger-url]` | `$HOME/.claude/commands/multi-agent/create-jira/SKILL.md` |
41
+ | `test`, `test-dark-mode`, `test-accessibility`, `test-dynamic-type`, `test-screenshots` | `$HOME/.claude/commands/sim-test.md`, scenario pinned by the name |
42
+ | `language [en\|tr]` | Inline: show or set `outputLanguage` only (`$HOME/.claude/commands/multi-agent/language/SKILL.md`) |
43
+ | Any other subcommand (`setup`, `channels`, `analysis`, `design-check`, `store-ready`, ...) | `$HOME/.claude/commands/multi-agent/<name>/SKILL.md` |
44
+ | `autopilot` | Modifier: skip confirmations, auto commit/PR |
45
+ | No args / `help` | `$HOME/.claude/commands/multi-agent/help/SKILL.md` |
142
46
 
143
- ---
47
+ `jira`, `issue` and the direct-ID path all end in the Interactive Launcher, then Phase 0; account is always asked, the maturity check halts on a blocker, and the dev-context step always runs. Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` before routing any of them: the per-command steps, the Jira empty-description question and the launcher prompts.
144
48
 
145
- ## language Command
49
+ Stack guides load from the Phase 1 detected stack: `swiftui-guide.md` (iOS), `android-guide.md`, `backend-guide.md`, `web-guide.md` under `$HOME/.claude/multi-agent-refs/`; every relevant guide for several stacks.
146
50
 
147
- Toggles only `outputLanguage` (`promptLanguage` is locked to `"en"` - see `$HOME/.claude/multi-agent-refs/rules.md` section "Language Application"). Full spec: `$HOME/.claude/commands/multi-agent/language/SKILL.md`.
51
+ **Review mode** (`review` with no PR): diff `git diff HEAD`, else `origin/{baseBranch}...HEAD`; run the Phase 3 parallel review + Fable triage on it; no worktree, no state file; print the findings.
148
52
 
149
- ---
53
+ ## Agents and model routing
150
54
 
151
- ## jira, issue and Direct-ID Commands
152
-
153
- `jira` delegates to `commands/multi-agent/jira/SKILL.md` and `issue` to `commands/multi-agent/issue/SKILL.md` (4-step pickers); a Jira id, GitHub URL, `repo#N` or free text takes the Direct-ID path. All three end in the Interactive Launcher (branch, mode, autopilot, launch) and then Phase 0. **Account is always asked** (autopilot picks a default), the **maturity check** halts on a blocker and prompts on a warning, and the dev-context step always runs. Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` before routing any of them: the per-command step lists, the Jira empty-description parent / sibling question, and the launcher prompts.
154
-
155
- ---
156
-
157
- ## Review Mode
158
-
159
- When called with `review`:
160
- 1. Detect current branch and project from cwd (or ask)
161
- 2. Get diff: `git diff HEAD` (unstaged + staged)
162
- 3. If no diff, get diff against base branch: `git diff origin/{baseBranch}...HEAD`
163
- 4. Launch Phase 3 review (parallel + Fable triage - 3 reviewers on every host: Fable + Opus + Sonnet on Claude Code, GPT-5.4 + Opus + Sonnet on Copilot CLI) on the diff
164
- 5. No worktree, no state file - lightweight one-shot review
165
- 6. Print findings to terminal
166
-
167
- ---
55
+ Agent definitions: `dispatcher.md` "Agent definitions". Before each Agent dispatch, read `preferredModel` from the persona file and export `CLAUDE_CODE_SUBAGENT_MODEL` (Claude Code) / pass `--model` (Copilot CLI). Precedence: `PHASE_MODEL_OVERRIDE` > a matching `prefs.global.modelRouting` rule (only when the phase named no model, Anthropic ladder only) > persona `preferredModel` > `fable` (fallback: `$HOME/.claude/multi-agent-refs/features/model-fallback.md`). Simple text tasks ask `model-dispatch.sh delegate --default host` first: `$HOME/.claude/multi-agent-refs/features/free-models.md`.
168
56
 
169
57
  ## Rules
170
58
 
171
- **Non-negotiable rules that apply to every phase, every mode.** Full reference at `$HOME/.claude/multi-agent-refs/rules.md` - read before any invocation that writes code, commits, or posts to external systems.
59
+ Read `$HOME/.claude/multi-agent-refs/rules.md` before any invocation that writes code, commits, or posts to external systems.
172
60
 
173
- Quick pointers:
174
61
  - No "Copilot/AI/generated by" attribution. Ever.
175
62
  - No commit without build + review pass.
176
- - Real newlines in external outputs (heredoc + `jq --rawfile` + `curl --data-binary`).
177
- - No HTML entities (`&amp;`, `&lt;`, `&quot;`) in titles, commits, or bodies.
178
- - Every Bitbucket PUT ships `reviewers` + `fromRef` + `toRef` + `draft` (missing fields wipe defaults).
179
- - Commit format: `{type}({scope}): description [{jiraId}|#{shortId}]`.
180
- - Branch: `feature/` or `bugfix/` prefix.
63
+ - Real newlines in external outputs (heredoc + `jq --rawfile` + `curl --data-binary`); no HTML entities (`&amp;`, `&lt;`, `&quot;`) in titles, commits or bodies.
64
+ - Every Bitbucket PUT ships `reviewers` + `fromRef` + `toRef` + `draft`.
65
+ - Commit format: `{type}({scope}): description [{jiraId}|#{shortId}]`; branch `feature/` or `bugfix/`.
181
66
  - 3-iteration hard kill on any retry loop.
182
67
 
183
- Load `$HOME/.claude/multi-agent-refs/rules.md` for the full contract (Swift-specific rules, reviewer policy, secret scan, subagent contract).
184
-
185
68
  ### TaskCreate ordering (strict)
186
69
 
187
- **All TaskCreate calls fire in strict phase-number order BEFORE any TaskUpdate is applied** - this binds the full interactive `/multi-agent` run (all 6 phases) exactly like every mode alias. The native widget renders tiles by creation order, not by phase number; out-of-order calls produce visually scrambled tile stacks. Register every tile in order, then flip status via TaskUpdate when a phase actually starts or short-circuits. Full contract: `$HOME/.claude/multi-agent-refs/tracker-contract.md` section "TaskCreate ordering (strict)".
188
-
189
- ---
190
-
191
- ## Status Display and Global Paths
70
+ **All TaskCreate calls fire in strict phase-number order BEFORE any TaskUpdate is applied**, for the full interactive `/multi-agent` run (all 6 phases) exactly like every mode alias: the widget renders by creation order. Register every tile in order, then flip status when a phase starts or short-circuits. Contract: `$HOME/.claude/multi-agent-refs/tracker-contract.md` "TaskCreate ordering (strict)".
192
71
 
193
- `status` scans `$HOME/.claude/logs/multi-agent/` for `agent-state.json` files across all projects and prints one row per task. Logs and state live under `${LOGS_ROOT:-$HOME/.claude/logs/multi-agent}/{project}/{task-id}/`. Table layout and the full path list: `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Status Display" and "Global Paths".
72
+ Status table and global paths (logs under `${LOGS_ROOT:-$HOME/.claude/logs/multi-agent}/{project}/{task-id}/`): `dispatcher.md` "Status Display" and "Global Paths".
@@ -10,17 +10,11 @@ confirm: none
10
10
 
11
11
  # multi-agent analysis - Feature Spec Analysis (v3)
12
12
 
13
- > **Pickers follow** `$HOME/.claude/multi-agent-refs/picker-contract.md`: never a one-option call, and branch on the option selected, not on its text.
14
- >
15
- > **Background runs** (`MULTI_AGENT_UNATTENDED=1`, no `autopilot`): never ask or default a picker; write `agent-state.json`, park on the question, stop (`$HOME/.claude/multi-agent-refs/picker-contract.md`, Background).
13
+ > **Pickers follow** `$HOME/.claude/multi-agent-refs/picker-contract.md`: never a one-option call; branch on the option selected, not its text. **Background runs** (`MULTI_AGENT_UNATTENDED=1`, no `autopilot`): never ask or default a picker; write `agent-state.json`, park on the question, stop (contract, Background).
16
14
 
17
- This command is **independent** from the orchestrator's Phase 1 analysis (which is a stack/findings detector inside `/multi-agent`). It produces a stakeholder-ready, platform-agnostic feature-spec document - up to 23 sections, trimmed to whatever the evidence supports - before any implementation starts. Each per-platform file is rendered by projecting concept-layer content onto repo-extracted conventions (Pass B).
15
+ Platform-agnostic *development* analysis before any code; not a screen spec. **Side-effect contract**: may write a local markdown file, post a Confluence page, or update a Jira description - but **never** creates branches, worktrees, commits, or PRs. It stops at the document. Prose stays English; `AskUserQuestion` text and the document body follow `outputLanguage`, `header` stays English (`$HOME/.claude/multi-agent-refs/rules.md` Language Application).
18
16
 
19
- **Side-effect contract**: the command may write a local markdown file, post a Confluence page, or update a Jira description - but **never** creates branches, worktrees, commits, or PRs. It stops at the document.
20
-
21
- **Scope (development analysis, not a screen spec)**: this command produces a *development* analysis - what to build, the architecture plan, files to add, the test plan, and which existing components to reuse. It is NOT a design / screen-anatomy specification. The design itself is already produced elsewhere (figma-to-swiftui builds the components and binds them via Code Connect), so the analysis consumes those existing bindings as the source of truth for "what already exists" (see Phase 1b.1) instead of re-deriving the design. Do not grow this command toward exhaustive per-screen layout / gesture / state documentation; keep it development-focused.
22
-
23
- > **Language**: Per `$HOME/.claude/multi-agent-refs/rules.md` Language Application matrix - instruction prose stays English (this file is read as a system prompt). `AskUserQuestion.question`, `.options[].label` and `.options[].description` follow `outputLanguage`; only `header` stays English (<=12-char chip). The emitted analysis document body follows `outputLanguage` (`tr` or `en`).
17
+ Before Phase 0 read `$HOME/.claude/multi-agent-refs/features/analysis-command-notes.md`: scope, the two profiles and templates, stack-optional output, file naming, source-handling notes.
24
18
 
25
19
  ## Gotchas
26
20
 
@@ -29,81 +23,33 @@ This command is **independent** from the orchestrator's Phase 1 analysis (which
29
23
 
30
24
  ## Locked decisions (do not re-ask)
31
25
 
32
- These decisions are settled. Do not surface them as `AskUserQuestion` items, do not re-derive them from context, do not invite the user to override mid-run. If the user explicitly wants one of them changed, treat that as a separate request and update this list.
33
-
34
- The full list of 37, with the category index, lives in `$HOME/.claude/multi-agent-refs/analysis/locked.md`. Read it before the run starts; it is the contract the whole flow is judged against. `/multi-agent:analysis-resolve` inherits the same list.
35
-
36
- Cite a decision as `Locked <n> (<short label>)` so the category is inferable.
26
+ Never surface them as questions, re-derive them or invite an override mid-run. The list of 37 is in `$HOME/.claude/multi-agent-refs/analysis/locked.md`; read it before the run starts, it is the contract the flow is judged against (`/multi-agent:analysis-resolve` inherits it). Cite as `Locked <n> (<short label>)`.
37
27
 
38
28
  ## Input
39
29
 
40
- - `$ARGUMENTS` - optional analysis name (e.g. `"UserProfile"`). If empty, asked at Phase 0 Step 1. Stored internally as `state.analysisSpec.featureName` for backward compatibility.
41
- - `check <doc.md>` / `refresh <doc.md>` - not a name: compare the document with its sources, or redraft from the stale ones. Read `$HOME/.claude/multi-agent-refs/features/analysis-sources.md` and follow it instead of the steps below.
42
- - `conform <doc.md>` - not a name: map an existing document onto a template without changing what it says. Follow `$HOME/.claude/multi-agent-refs/features/analysis-outline.md` instead of the steps below.
43
-
44
- ## Profile
45
-
46
- Phase 0 Step 1b asks which analysis standard the document follows (Locked 31), and the answer selects the template. Both profiles read the same evidence: intake, fetching, repo evidence and convention extraction are shared, so the two cannot drift into two products.
47
-
48
- | Profile | Template | Shape |
49
- |---|---|---|
50
- | `global` (default) | `analysis-template.md` | Development handoff, 23 sections. Business rules with Gherkin acceptance criteria, architecture plan, files to add, test plan. Zero-evidence sections drop (Locked 2). |
51
- | `corporate` | `analysis-template-corporate.md` | Requirements document. `IG -> UC -> FG` spine with three traceability matrices, current and target state with impact analysis, then Technical Analysis and Development Analysis. The Part A backbone always renders, carrying `N/A` or `EKLENECEK` (Locked 32). |
52
-
53
- One run emits one profile. A missing input never blocks either profile: the gap is written as `EKLENECEK` and raised as a Section 20 open question rather than halting the run.
54
-
55
- **Stack is optional** (Locked 34). When no platform is selected the run still completes: everything that does not need a target repository renders in full, and only the development layer plus the Pass B projection are skipped, with a Section 20 row recording why. The output is a single file at `~/Desktop/multiAgentAnalysis/<feature-name>/<feature>.md` instead of one per repo: without a repo there is no working tree for the usual `analysis/` path to be relative to, and the current working directory is never written to. The Phase 3.5 picker shows the resolved path and accepts an override.
56
-
57
- ## Template
58
-
59
- v3 template at `$HOME/.claude/multi-agent-refs/analysis-template.md`. The document renders up to 23 main sections + footer, minus any dropped by the omission table. The analysis doc is a development handoff, so low-signal sections are default-drop: **19 Alternatives** (render only for a real 2+-option architectural decision), **22 Glossary** (render only on request or >5 unfamiliar domain terms), and **18 Rollout** (compact checklist only, dropped when the pipeline's own commit/PR/rollout phase covers it). Sections are chosen from evidence; there is no second mode (ADR-0015, `docs/adr/0015-one-pipeline-no-depth-answer.md` in the pipeline repo). Section omission rule (Locked 2): zero-evidence and default-drop sections omit entirely; a rendered section keeps its canonical template number, so the rendered set has gaps.
60
-
61
- Numbering is plain Arabic numerals: `## 1. Geliştirme Özeti` / `## 1. Summary`, `## 2. Hedefler ve Karşı Hedefler` / `## 2. Goals and Non-Goals`. No special section characters; the section sign codepoint (U+00A7) is banned by `feedback_no-section-sign`.
62
-
63
- The template is platform-agnostic (Locked 22). It speaks in concepts (state holder, view, navigator, use case, repository, DTO, state model, DI register, localization key, accessibility identifier, test method). Pass B (Phase 2b) projects each concept onto the selected platform using `state.analysisSpec.evidence.conventions[<repo>]` extracted at Phase 1c. Every projected cell carries a footnote pointing to its evidence source (Locked 24).
30
+ `$ARGUMENTS`: optional analysis name, else asked at Phase 0. `check|refresh <doc.md>`: follow `$HOME/.claude/multi-agent-refs/features/analysis-sources.md` instead. `conform <doc.md>`: follow `$HOME/.claude/multi-agent-refs/features/analysis-outline.md` instead.
64
31
 
65
32
  ## Steps
66
33
 
67
34
  ### Phase 0 - Intake
68
35
 
69
- First, record the run so its hooks see an analysis run: `S="$HOME/.claude/logs/multi-agent/$TASK_ID"; mkdir -p "$S"; printf '{"taskId":"%s","mode":"analysis","status":"in_progress","currentPhase":0}' "$TASK_ID" | node $HOME/.claude/scripts/write-state.mjs "$S/agent-state.json"`.
70
-
71
- Full picker chain: `$HOME/.claude/multi-agent-refs/analysis/intake.md`. Sequential `AskUserQuestion` steps filling `state.analysisSpec.*`: analysis name, analysis profile, account, platform multi-select, repos per platform, the six-question source batch (Figma / Swagger / Confluence / Jira / Standards / Firebase) and the two coverage opt-ins. Every step prints its breadcrumb.
72
-
73
- ### Phases 1, 1b, 1b.1, 1c - Evidence gathering
74
-
75
- Full contract: `$HOME/.claude/multi-agent-refs/analysis/evidence.md`. Fetches every declared source in parallel (Figma / Swagger / Confluence / Jira / Standards / Firebase), collects the 13-bucket repo evidence, builds the Code Connect index, and extracts the seven convention groups. Output: `state.analysisSpec.evidence.*`. Nothing here writes a document.
76
-
77
- ### Phase 2, 2a, 2b - Two-pass synthesis
78
-
79
- Full contract: `$HOME/.claude/multi-agent-refs/analysis/synthesis.md`. Pass A builds the platform-agnostic concept layer; Phase 2a previews the resolved conventions for approval (Locked 25); Pass B projects each concept onto the selected platform with a footnote per filled cell (Locked 24).
36
+ First, record the run so its hooks see an analysis run: `S="$HOME/.claude/logs/multi-agent/$TASK_ID"; mkdir -p "$S"; printf '{"taskId":"%s","mode":"analysis","status":"in_progress","currentPhase":0}' "$TASK_ID" | node $HOME/.claude/scripts/write-state.mjs "$S/agent-state.json"`. Picker chain: `$HOME/.claude/multi-agent-refs/analysis/intake.md`.
80
37
 
81
- ### Phases 3, 3.2, 3.3, 3.5, 4, 5 - Render, review, publish, report
38
+ ### Phases 1-1c - Evidence
82
39
 
83
- Full contract: `$HOME/.claude/multi-agent-refs/analysis/render.md`. Renders one markdown file per platform, runs the **required** `ai-common-toolkit:humanizer` pass, gates on `validate-analysis-doc.mjs` and on the `build-references.mjs --check` references coverage gate (Locked 33), asks for the output destination, dispatches to Local / Confluence / Jira (a Jira issue receives a comment unless the user explicitly asks for the description, which is never overwritten without a backup and a confirmation), then reports and stops. The humanizer pass and the validator are required in every mode; a document that skipped either is not shippable.
40
+ `$HOME/.claude/multi-agent-refs/analysis/evidence.md`. Writes no document.
84
41
 
85
- ### Resume contract
42
+ ### Phase 2-2b - Synthesis
86
43
 
87
- Full procedure: `$HOME/.claude/multi-agent-refs/analysis/resume.md`. Read it when `/multi-agent:resume` is invoked on an analysis run (`state.analysisSpec.phase` enumeration and the re-entry rule per paused phase; evidence and synthesis already in state are never re-fetched).
44
+ `$HOME/.claude/multi-agent-refs/analysis/synthesis.md` (conventions preview, Locked 25; footnote per cell, Locked 24).
88
45
 
89
- ## Reusable refs
46
+ ### Phases 3-5 - Render, review, publish, report
90
47
 
91
- Full table: `$HOME/.claude/multi-agent-refs/analysis/reusable-refs.md`. Read it when a phase needs a fetcher, extractor, dispatcher, validator or fallback ref and the phase ref does not name its path.
48
+ `$HOME/.claude/multi-agent-refs/analysis/render.md`. The **required** `ai-common-toolkit:humanizer` pass and `validate-analysis-doc.mjs` run in every mode, plus `build-references.mjs --check` (Locked 33); a document that skipped either is not shippable. Jira gets a comment; the description is never overwritten without a backup and a confirmation. Report, then stop.
92
49
 
93
- ## Notes
50
+ ### Resume
94
51
 
95
- - The minimum possible output (per per-platform file) is `1. Scope` + `7. Development Plan` (both always-present).
96
- - If Confluence or Jira POST returns 401 / 403 during Phase 4, surface the error and offer Local fallback (the local drafts in `/tmp/` are still on disk; copying them into the repo working tree is always available).
97
- - The `analysis/` directory is not in `.gitignore`; the user can `git add analysis/` manually. No auto-commit.
98
- - **Per-platform file naming**: `analysis/<feature>-<platform>.md`. The `<platform>` slug is lowercase, one of `ios | android | web | backend` for a repo-backed run, or `mobile | web` for the channels a repo-less run derives from its evidence (Locked 34). `web` is the pre-`web` spelling and is still read back for older state and documents. The `<feature>` slug preserves the user's feature name with whitespace replaced by `-` (e.g. `User Profile` -> `UserProfile` or `Item-Status` depending on input shape; the renderer trims and de-duplicates dashes).
99
- - **Standards binding (the Standards question)**: When `evidence.standards[]` is non-empty, every decision in Section 13 (Architecture Plan, corporate Section 17) must cite the binding source in its 13.7 Standards-binding table. The renderer enforces this by failing render if any architectural decision has no `cite:` reference; the user is prompted to either tighten the source or add a Risk row acknowledging the missing citation.
100
- - **Firebase ingestion (the Firebase question)**: Console URLs are never fetched (auth-gated). Only `:names` and `:schema` inputs feed `evidence.firebase[]`. Section 11 Analytics (corporate Section 13) emits per-platform snippets but the events table itself is shared across all per-platform files (the rules / event vocabulary is one product invariant).
101
- - **Wiki access fallback chain**: Phase 1 `wiki` fetcher tries (a) `git clone .wiki.git`, (b) `gh api repos/.../contents/<file>.md`, (c) raw `WebFetch` of the page URL. Only after all three fail does the entry land in `fetchErrors[]`.
102
- - **Local-file safety**: `local-file` reads are scoped to `~/`, `/Users/`, and the repo's working tree. Paths outside these prefixes are rejected with `WARN: refusing to read <path>; outside allowed roots` to avoid accidental ingestion of unrelated files.
103
- - **Standards vs Confluence vs Document split**: the Confluence question collects feature-specific spec pages and the Document question the same spec delivered as a `.docx` / `.pdf` / `.md` / `.txt` file - both describe what the feature IS and both land in `evidence.documents[]`. The Standards question collects cross-cutting documentation that constrains the development plan (architecture, coding conventions, navigation pattern). A source pasted in more than one of the three is de-duplicated (by URL, or by `realpath` for a local file) and the Standards entry wins, because it retains the binding flag.
104
- - **Workspace coding documentation default**: when the Standards question's option 2 (Auto-detect) is selected, the probe also reads `prefs.projects[<project>].confluenceStandardsParent` (if set) and looks for child pages whose title starts with `Coding`, `Standards`, `Architecture`, or `Navigation`. If that fetch fails with auth, log a hint that the user should host an offline mirror at `prefs.projects[<project>].standardsFile` (canonical local fallback).
105
- - **Mixed paste handling**: the Standards and Firebase Other inputs accept comma-separated mixed entries. Whitespace is trimmed; entries are de-duplicated by canonicalised string (lowercase scheme + host + path for URLs; `realpath` for local files; lowercase exact match for event names).
106
- - **Repo-evidence reuse policy**: Phase 1b's catalogue is consulted by Pass B Section 7 rendering. The `direct-match` tag is the strongest signal; a `same-domain` row becomes an advisory note ("consider adapting existing X in the same feature directory"); `cross-cutting` items become a sentence in the section preamble ("reuse the cross-feature X from Common/"). See Locked decision 11.
52
+ `$HOME/.claude/multi-agent-refs/analysis/resume.md`; state already gathered is never re-fetched. Extra refs: `$HOME/.claude/multi-agent-refs/analysis/reusable-refs.md`.
107
53
 
108
54
  ## Required: Phase Tracker Contract
109
55
 
@@ -104,9 +104,8 @@ reworded:
104
104
  - **Show a node in full**
105
105
  - **Cancel**
106
106
 
107
- A run that could not be checked is allowed. One that looks checked when it was
108
- not is the defect, so the approval has to name it and a plain "Approve" must not
109
- be reachable.
107
+ A plain "Approve" must not be reachable for an unverifiable tree (why:
108
+ `analysis-jira.md`, "An unverifiable run is allowed; looking verified is not").
110
109
 
111
110
  `incomplete` prints its uncovered and invented ids, and any dependency cycle or uncovered prerequisite, before the question. An
112
111
  invented id means the plan cites something the document does not define - treat
@@ -122,12 +121,10 @@ bash "$HOME/.claude/lib/analysis-jira-write.sh" \
122
121
  --plan /tmp/ma-plan.json --project "<KEY>" [--epic "<EPIC>"]
123
122
  ```
124
123
 
125
- It searches by label first and skips what exists. Re-running is safe and is the
126
- intended recovery from any failure: the ledger makes a half-written tree
127
- findable rather than duplicable.
124
+ It searches by label first and skips what exists. Re-running is the recovery
125
+ from any failure (`analysis-jira.md`, "The write is ledgered").
128
126
 
129
- **Never pass `--force`-like flags, and never update an existing node.** Jira has
130
- no backup path for fields other than description.
127
+ **Never pass `--force`-like flags, and never update an existing node.**
131
128
 
132
129
  ### Write the tickets back
133
130