@mmerterden/multi-agent-pipeline 14.2.1 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +118 -6
  2. package/README.md +20 -9
  3. package/README.tr.md +150 -0
  4. package/docs/FIGMA_PIPELINE.md +3 -3
  5. package/docs/adr/0006-skills-core-external-split.md +1 -1
  6. package/docs/adr/0009-claude-stack-skills-plugin-only.md +31 -0
  7. package/docs/adr/README.md +1 -0
  8. package/docs/architecture.md +24 -9
  9. package/docs/ecosystem.md +237 -0
  10. package/docs/features.md +5 -5
  11. package/index.js +2 -0
  12. package/install/_codex-agents.mjs +11 -2
  13. package/install/_common.mjs +65 -1
  14. package/install/_dev-only-files.mjs +0 -1
  15. package/install/_platform-filter.mjs +73 -7
  16. package/install/_plugin-skills.mjs +33 -8
  17. package/install/claude.mjs +144 -59
  18. package/install/codex.mjs +37 -7
  19. package/install/copilot.mjs +36 -11
  20. package/install/index.mjs +6 -2
  21. package/install/templates/codex-instructions.md +1 -1
  22. package/install/templates/copilot-instructions.md +15 -12
  23. package/package.json +1 -2
  24. package/pipeline/commands/multi-agent/SKILL.md +4 -2
  25. package/pipeline/commands/multi-agent/analysis/SKILL.md +5 -5
  26. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +2 -2
  27. package/pipeline/commands/multi-agent/autopilot/SKILL.md +6 -2
  28. package/pipeline/commands/multi-agent/build-optimize/SKILL.md +9 -9
  29. package/pipeline/commands/multi-agent/channels/SKILL.md +16 -5
  30. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +186 -0
  31. package/pipeline/commands/multi-agent/create-jira/SKILL.md +4 -4
  32. package/pipeline/commands/multi-agent/dev/SKILL.md +10 -23
  33. package/pipeline/commands/multi-agent/dev-autopilot/SKILL.md +10 -2
  34. package/pipeline/commands/multi-agent/dev-local/SKILL.md +10 -24
  35. package/pipeline/commands/multi-agent/dev-local-autopilot/SKILL.md +10 -3
  36. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
  37. package/pipeline/commands/multi-agent/help/SKILL.md +19 -4
  38. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +2 -2
  39. package/pipeline/commands/multi-agent/jira/SKILL.md +13 -2
  40. package/pipeline/commands/multi-agent/language/SKILL.md +1 -1
  41. package/pipeline/commands/multi-agent/local/SKILL.md +6 -2
  42. package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +6 -2
  43. package/pipeline/commands/multi-agent/log/SKILL.md +7 -1
  44. package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +81 -0
  45. package/pipeline/commands/multi-agent/resume/SKILL.md +1 -1
  46. package/pipeline/commands/multi-agent/{ship → resume-local}/SKILL.md +13 -9
  47. package/pipeline/commands/multi-agent/setup/SKILL.md +5 -5
  48. package/pipeline/commands/multi-agent/stack/SKILL.md +55 -43
  49. package/pipeline/commands/multi-agent/store-ready/SKILL.md +3 -3
  50. package/pipeline/commands/multi-agent/sync/SKILL.md +18 -11
  51. package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +1 -1
  52. package/pipeline/commands/multi-agent/uninstall/SKILL.md +2 -0
  53. package/pipeline/commands/multi-agent/update/SKILL.md +1 -1
  54. package/pipeline/lib/extract-conventions.sh +44 -15
  55. package/pipeline/lib/fetch-figma-annotations.sh +8 -1
  56. package/pipeline/lib/fetch-fortify.sh +23 -8
  57. package/pipeline/lib/figma-screenshot.sh +11 -1
  58. package/pipeline/lib/issue-fetcher.sh +77 -10
  59. package/pipeline/lib/md2confluence-v3.py +16 -2
  60. package/pipeline/lib/parse-complaints.sh +306 -0
  61. package/pipeline/lib/plan-todos.sh +5 -2
  62. package/pipeline/lib/post-pr-review.sh +8 -6
  63. package/pipeline/lib/shadow-git.sh +50 -9
  64. package/pipeline/lib/submodule-detector.sh +8 -1
  65. package/pipeline/multi-agent-refs/_input-parser.md +1 -1
  66. package/pipeline/multi-agent-refs/channels/confluence.md +3 -0
  67. package/pipeline/multi-agent-refs/channels/issue-comment.md +2 -2
  68. package/pipeline/multi-agent-refs/channels/jira.md +13 -2
  69. package/pipeline/multi-agent-refs/channels/pr-review-actions.md +1 -1
  70. package/pipeline/multi-agent-refs/channels/pr.md +20 -0
  71. package/pipeline/multi-agent-refs/channels/wiki.md +4 -4
  72. package/pipeline/multi-agent-refs/complaint-analysis-template.md +99 -0
  73. package/pipeline/multi-agent-refs/component-dispatch.md +6 -6
  74. package/pipeline/multi-agent-refs/cross-cli-contract.md +16 -16
  75. package/pipeline/multi-agent-refs/features/external-context-injection.md +1 -1
  76. package/pipeline/multi-agent-refs/features/stack-skill-routing.md +5 -5
  77. package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
  78. package/pipeline/multi-agent-refs/generate-issue.md +3 -3
  79. package/pipeline/multi-agent-refs/issue-jira-triad.md +3 -3
  80. package/pipeline/multi-agent-refs/payload-contracts.md +67 -0
  81. package/pipeline/multi-agent-refs/phases/modes.md +20 -0
  82. package/pipeline/multi-agent-refs/phases/phase-0-init.md +2 -2
  83. package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +7 -7
  84. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +5 -5
  85. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +3 -3
  86. package/pipeline/multi-agent-refs/phases/phase-4-review.md +12 -12
  87. package/pipeline/multi-agent-refs/phases/phase-5-test.md +1 -1
  88. package/pipeline/multi-agent-refs/phases/phase-6-commit.md +8 -40
  89. package/pipeline/multi-agent-refs/phases/phase-7-report.md +5 -3
  90. package/pipeline/multi-agent-refs/phases.md +6 -0
  91. package/pipeline/multi-agent-refs/rules.md +2 -0
  92. package/pipeline/multi-agent-refs/tracker-contract.md +1 -1
  93. package/pipeline/multi-agent-refs/wiki-capture.md +2 -2
  94. package/pipeline/preferences-template.json +13 -5
  95. package/pipeline/rules/figma-pipeline.md +2 -2
  96. package/pipeline/schemas/agent-state.schema.json +1 -1
  97. package/pipeline/schemas/complaint-analysis-spec.schema.json +216 -0
  98. package/pipeline/schemas/migrations/prefs-2.5.0-to-2.6.0.mjs +46 -0
  99. package/pipeline/schemas/prefs.schema.json +277 -67
  100. package/pipeline/schemas/token-budget.json +2 -2
  101. package/pipeline/scripts/_stack-routing.mjs +79 -0
  102. package/pipeline/scripts/audit-log-rotate.sh +14 -1
  103. package/pipeline/scripts/build-skills-index.mjs +11 -0
  104. package/pipeline/scripts/build-stack-plugins.mjs +35 -60
  105. package/pipeline/scripts/check-derived-drift.mjs +65 -29
  106. package/pipeline/scripts/diff-explain.mjs +41 -3
  107. package/pipeline/scripts/diff-risk-score.mjs +72 -8
  108. package/pipeline/scripts/gc-worktrees.sh +4 -1
  109. package/pipeline/scripts/gen-mode-dispatch.mjs +1 -1
  110. package/pipeline/scripts/gen-skills-index.mjs +1 -1
  111. package/pipeline/scripts/learning-curve.mjs +8 -2
  112. package/pipeline/scripts/match-skills.mjs +8 -2
  113. package/pipeline/scripts/migrate-prefs.mjs +28 -20
  114. package/pipeline/scripts/output-quality-check.sh +15 -4
  115. package/pipeline/scripts/phase-tracker.sh +33 -12
  116. package/pipeline/scripts/phase0-exit-gate.mjs +3 -2
  117. package/pipeline/scripts/pre-commit-check.sh +69 -22
  118. package/pipeline/scripts/render-agent-log-cost.sh +8 -3
  119. package/pipeline/scripts/render-cost-summary.sh +42 -22
  120. package/pipeline/scripts/render-work-summary.sh +47 -13
  121. package/pipeline/scripts/review-scope.mjs +1 -1
  122. package/pipeline/scripts/run-aggregator.mjs +43 -14
  123. package/pipeline/scripts/scan-agent-config.sh +1 -1
  124. package/pipeline/scripts/skill-conformance.mjs +165 -30
  125. package/pipeline/scripts/smoke-cross-cli-behavior.sh +1 -1
  126. package/pipeline/scripts/smoke-schema-validation.sh +5 -1
  127. package/pipeline/scripts/test-gap-rules/android.json +25 -0
  128. package/pipeline/scripts/test-gap-rules/ios.json +34 -0
  129. package/pipeline/scripts/test-gap-rules/node.json +29 -0
  130. package/pipeline/scripts/test-gap-rules/python.json +25 -0
  131. package/pipeline/scripts/test-gap-scan.mjs +45 -6
  132. package/pipeline/scripts/uninstall.mjs +196 -14
  133. package/pipeline/scripts/update-issue-progress.sh +12 -16
  134. package/pipeline/scripts/validate-complaint-doc.mjs +229 -0
  135. package/pipeline/scripts/validate-reviewer.mjs +9 -3
  136. package/pipeline/scripts/worktree-finalize.sh +23 -2
  137. package/pipeline/skills/.skill-manifest.json +156 -108
  138. package/pipeline/skills/.skills-index.json +459 -13
  139. package/pipeline/skills/shared/README.md +15 -11
  140. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +1 -1
  141. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +4 -0
  142. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
  143. package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +49 -0
  144. package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +1 -1
  145. package/pipeline/skills/shared/core/multi-agent-dev/SKILL.md +4 -17
  146. package/pipeline/skills/shared/core/multi-agent-dev-autopilot/SKILL.md +8 -0
  147. package/pipeline/skills/shared/core/multi-agent-dev-local/SKILL.md +5 -18
  148. package/pipeline/skills/shared/core/multi-agent-dev-local-autopilot/SKILL.md +8 -0
  149. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +2 -2
  150. package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +1 -1
  151. package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +4 -0
  152. package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +4 -0
  153. package/pipeline/skills/shared/core/multi-agent-prune-prompts/SKILL.md +83 -0
  154. package/pipeline/skills/shared/core/{multi-agent-ship → multi-agent-resume-local}/SKILL.md +10 -6
  155. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +79 -22
  156. package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +1 -1
  157. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -8
  158. package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +1 -1
  159. package/pipeline/skills/shared/external/ios-coding-standard/modules/_TEMPLATE.yml +2 -2
  160. package/pipeline/skills/shared/external/ios-coding-standard/references/rules.yml +368 -33
  161. package/pipeline/skills/shared/external/ios-coding-standard/references/swiftlint.draft.yml +1 -2
  162. package/pipeline/skills/shared/external/ios-coding-standard/scripts/check_structure.py +765 -0
  163. package/pipeline/skills/shared/external/ios-module-structure/SKILL.md +75 -0
  164. package/pipeline/skills/shared/external/ios-module-structure/modules/_TEMPLATE.yml +131 -0
  165. package/pipeline/skills/shared/external/ios-module-structure/references/rules.yml +559 -0
  166. package/pipeline/skills/shared/external/ios-module-structure/scripts/check_structure.py +765 -0
  167. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +302 -0
  168. package/pipeline/skills/shared/external/localization-reuse-map/example-mapping.json +187 -0
  169. package/pipeline/skills/shared/external/localization-reuse-map/reference/format-and-output.md +156 -0
  170. package/pipeline/skills/shared/external/localization-reuse-map/reference/publish-and-snapshot.md +108 -0
  171. package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +176 -0
  172. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-artifact.py +865 -0
  173. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-spreadsheet.py +335 -0
  174. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-annotations.py +344 -0
  175. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-legacy-labels.py +130 -0
  176. package/pipeline/skills/shared/external/localization-reuse-map/scripts/publish-confluence.py +264 -0
  177. package/pipeline/skills/shared/external/localization-reuse-map/scripts/render-key-shots.py +298 -0
  178. package/pipeline/skills/shared/external/localization-reuse-map/scripts/render-overlay.py +529 -0
  179. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-legacy-values.py +187 -0
  180. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-new-values.py +171 -0
  181. package/pipeline/skills/shared/external/localization-reuse-map/scripts/scan-screen-keys.py +184 -0
  182. package/pipeline/skills/shared/external/localization-reuse-map/scripts/snapshot-resources.sh +26 -0
  183. package/pipeline/skills/shared/external/localization-reuse-map/scripts/verify-map.py +173 -0
  184. package/pipeline/skills/skills-index.md +9 -5
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time. Proposes up to 3 source-labeled answer candidates per row (from evidence / from repo / AI reasoned), merges the chosen answer into the target body section, and updates the doc in place with a Section 23 changelog bump. Companion to /multi-agent:analysis - same Locked decisions apply (citation discipline, humanizer punctuation, no MCP, no auto-commit). Optional sibling propagation for per-platform file sets. Use when an analysis document's open questions and risks need answering row by row before development starts."
2
+ description: "Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time: up to 3 source-labeled answer candidates per row (evidence / repo / AI reasoned), chosen answer merged into the target section, doc updated in place with a changelog bump. Same locked decisions as /multi-agent:analysis. Use when an analysis document's open questions need answering before development starts."
3
3
  description-tr: "Analiz v3 dokümanının Bölüm 20 Riskler ve Açık Sorular satırlarını tek tek çözer. Satır başına en fazla 3 kaynak-etiketli cevap adayı önerir (kanıttan / repodan / AI çıkarımı), seçilen cevabı ilgili gövde bölümüne işler ve dokümanı Bölüm 23 changelog artışıyla yerinde günceller. /multi-agent:analysis'in eşlikçisi - aynı Kilitli kararlar geçerli (alıntı disiplini, humanizer noktalama, MCP yok, otomatik commit yok). Platform bazlı dosya setleri için isteğe bağlı kardeş yayılımı."
4
4
  argument-hint: "[path/to/analysis/<feature>-<platform>.md] [--autonomous]"
5
5
  ---
@@ -121,7 +121,7 @@ For each open row in source order:
121
121
  | `$HOME/.claude/multi-agent-refs/analysis-template.md` | Section 20 / Section 23 table contracts, front-matter shape, omission re-flow |
122
122
  | `$HOME/.claude/multi-agent-refs/conventions-defaults.md` | `convention-fallback` default values per platform |
123
123
  | `~/.claude/lib/extract-conventions.sh` | fresh single-field extraction for convention-fallback candidates |
124
- | `$HOME/.claude/skills/humanizer/SKILL.md` | tone reference for longer merged fragments (short fragments only need the punctuation gate) |
124
+ | `ai-common-toolkit:humanizer` | tone reference for longer merged fragments (short fragments only need the punctuation gate) |
125
125
 
126
126
  ## Notes
127
127
 
@@ -8,7 +8,7 @@ argument-hint: '"task" - issue URL, Jira ID, free-text, or #id (for resume)'
8
8
 
9
9
  **Input**: $ARGUMENTS
10
10
 
11
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` and external payloads stay English. Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
11
+ > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` `label`/`header` stay English, but its `question` and option `description`s render in `outputLanguage`; external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
12
12
 
13
13
  Run the task end-to-end with no confirmations.
14
14
 
@@ -49,6 +49,10 @@ Run the task end-to-end with no confirmations.
49
49
  2. **Set the autopilot flag** - write `"autopilot": true` to `agent-state.json`
50
50
  3. **Launch the multi-agent pipeline** - every confirmation is skipped
51
51
  4. **On error** - after 3 failed retries, pause and ask the user
52
+ ## Required: outward-facing payload contracts
53
+
54
+ Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
55
+
52
56
  ## Required: Phase Tracker Contract
53
57
 
54
58
  **The phase tracker is mandatory** - the agent cannot skip it. Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md).
@@ -72,7 +76,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
72
76
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
73
77
 
74
78
  # After every LLM call (every CLI):
75
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
79
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
76
80
  ```
77
81
 
78
82
  ### Visual channel - Claude Code (native TaskList widget, required)
@@ -40,7 +40,7 @@ Before dispatch, fail fast on non-iOS repos. Detect iOS context via the standard
40
40
 
41
41
  3. **Dispatch** to `xcode-build-orchestrator` via the Skill tool:
42
42
  ```
43
- Skill(skill="xcode-build-orchestrator", args="")
43
+ Skill(skill="ai-ios-toolkit:xcode-build-orchestrator", args="")
44
44
  ```
45
45
  The orchestrator's Phase 1 (Analyze) runs `xcode-build-benchmark`, the three specialist analyzers, and writes `.build-benchmark/optimization-plan.md`. No project files are modified during Phase 1.
46
46
 
@@ -48,7 +48,7 @@ Before dispatch, fail fast on non-iOS repos. Detect iOS context via the standard
48
48
 
49
49
  5. **Phase 2 (apply + verify)** is initiated by the user. The wrapper does not auto-execute Phase 2 because the upstream contract requires explicit approval via the checkboxes in the plan file. When the user signals "implement the approved items", the wrapper dispatches to `xcode-build-fixer`:
50
50
  ```
51
- Skill(skill="xcode-build-fixer", args="")
51
+ Skill(skill="ai-ios-toolkit:xcode-build-fixer", args="")
52
52
  ```
53
53
  The fixer applies only the approved changes and re-benchmarks for wall-clock delta verification.
54
54
 
@@ -62,13 +62,13 @@ Before dispatch, fail fast on non-iOS repos. Detect iOS context via the standard
62
62
 
63
63
  | Path | Reason |
64
64
  |------|--------|
65
- | `$HOME/.claude/skills/xcode-build-orchestrator/SKILL.md` | The orchestrator this wrapper dispatches to |
66
- | `$HOME/.claude/skills/xcode-build-benchmark/SKILL.md` | Baseline timing |
67
- | `$HOME/.claude/skills/xcode-compilation-analyzer/SKILL.md` | Swift compile hotspots |
68
- | `$HOME/.claude/skills/xcode-project-analyzer/SKILL.md` | Build settings / script phases / parallelism |
69
- | `$HOME/.claude/skills/spm-build-analysis/SKILL.md` | SPM graph + plugins |
70
- | `$HOME/.claude/skills/xcode-build-fixer/SKILL.md` | Apply approved fixes + re-benchmark |
71
- | `$HOME/.claude/skills/NOTICE-xcode-build-skills.md` | MIT attribution + upstream pin |
65
+ | `ai-ios-toolkit:xcode-build-orchestrator` | The orchestrator this wrapper dispatches to |
66
+ | `ai-ios-toolkit:xcode-build-benchmark` | Baseline timing |
67
+ | `ai-ios-toolkit:xcode-compilation-analyzer` | Swift compile hotspots |
68
+ | `ai-ios-toolkit:xcode-project-analyzer` | Build settings / script phases / parallelism |
69
+ | `ai-ios-toolkit:spm-build-analysis` | SPM graph + plugins |
70
+ | `ai-ios-toolkit:xcode-build-fixer` | Apply approved fixes + re-benchmark |
71
+ | ai-ios-toolkit plugin NOTICE (xcode build skills) | MIT attribution + upstream pin |
72
72
 
73
73
  ## Notes
74
74
 
@@ -138,7 +138,7 @@ Then 3b renders:
138
138
  - "Teknik analiz" unselectable if no Phase 2 planning log AND no PR diff available. Reason: `"(no technical source - need Phase 2 plan or PR diff)"`.
139
139
  - "Auto-diff" unselectable if no PR found. Reason: `"(no PR linked to this target)"`.
140
140
  - "Manuel not" always available.
141
- - "Cost özeti" unselectable if `phase-tracker.sh status <id>` returns no token tallies AND no `otel-spans.jsonl` exists for the task. Reason: `"(no tracker data - set MULTI_AGENT_OTEL_SPANS=1 or enable token tracking)"`.
141
+ - "Cost özeti" unselectable if `phase-tracker.sh cost total` prints `-` (no priced token tallies; there is no `status` action) AND no `otel-spans.jsonl` exists for the task. Reason: `"(no tracker data - set MULTI_AGENT_OTEL_SPANS=1 or enable token tracking)"`.
142
142
  - "Yapılan iş özeti" unselectable if no `agent-state.json` exists for the task (post-hoc call with `--branch` + `--base-branch` flags restores partial availability). Reason: `"(no agent-state.json for {taskId})"`. **Auto-ticked** when Step 3a preview was shown - user can still uncheck before confirming the menu.
143
143
 
144
144
  **Defaults (first run):** PR + Jira ticked, Confluence + Wiki unticked. Content: auto-diff if pipeline log missing; otherwise normal-analiz + test-senaryoları.
@@ -246,7 +246,7 @@ Emitted only when `reportContent.workSummary === true` and at least one of (`age
246
246
  2. **Scope delivered** - Phase 2 `planTodos[]` / `tasks[]` rendered as `✅` (status=done) or `⏳` (anything else) rows. Task id + title shown; `(deferred - rationale)` appended if the task's `status` is `"deferred"`.
247
247
  3. **Changed files** - `git -C $WORKTREE diff --numstat $baseBranch...HEAD`. Shows `` `path` (+add / -del) `` per row, capped at 20 with a `_... +N more files not shown_` footer when exceeded. Total adds/dels + file count in section header.
248
248
  4. **Review outcome** - from `reviewConsensus` (pre-v6.1) or `phases["4"].triage`: `{accepted} accepted · {deferred} deferred · {rejected} rejected · approved={bool}`. Hidden entirely when all three buckets are empty (normal for `--dev` / `dev-autopilot` runs that skip Phase 4).
249
- 5. **Phase tick strip** - single line from `phase-tracker.json`: `0 Init ✅ · 1 Analysis ✅ · 2 Planning ✅ · 3 Dev ✅ · 4 Review ✅ · 5 Test ⏭ · 6 Commit ✅ · 7 Report ▶`. Marks: `✅` completed · `▶` in_progress · `❌` failed · `⏭` skipped · `·` pending.
249
+ 5. **Phase tick strip** - single line from the tracker state (`render-work-summary.sh` resolves worktree/artifacts copies, then `$HOME/.claude/logs/multi-agent/{taskId}/tracker-state.json`): `0 Init ✅ · 1 Analysis ✅ · 2 Planning ✅ · 3 Dev ✅ · 4 Review ✅ · 5 Test ⏭ · 6 Commit ✅ · 7 Report ▶`. Marks: `✅` completed · `▶` in_progress · `❌` failed · `⏭` skipped · `·` pending.
250
250
 
251
251
  **Output template:**
252
252
 
@@ -276,7 +276,7 @@ Emitted only when `reportContent.workSummary === true` and at least one of (`age
276
276
 
277
277
  Emitted only when `reportContent.costSummary === true` and tracker data is available. Source of truth is `phase-tracker.sh`:
278
278
 
279
- 1. **Token tallies per phase** - read `.worktrees/{taskPath}/phase-tracker.json` (written by `phase-tracker.sh update` / `tokens` actions). If present, each phase row has `{tokens_in, tokens_out}`.
279
+ 1. **Token tallies per phase** - `render-cost-summary.sh <taskId>` resolves the tracker JSON itself: worktree candidates (`.worktrees/{taskPath}/phase-tracker.json`) first, then the standard location `$HOME/.claude/logs/multi-agent/{taskId}/tracker-state.json` that `phase-tracker.sh` actually writes. Each phase row carries `{tokens_in, tokens_out}`.
280
280
  2. **Fallback to OTel spans** - if tracker JSON has no token columns but `otel-spans.jsonl` exists (set `MULTI_AGENT_OTEL_SPANS=1` beforehand), aggregate `phase.tokens` spans by phase ID.
281
281
  3. **USD estimate** - uses a static price table in `$HOME/.claude/scripts/cost-table.json` (model → $/Mtok_in, $/Mtok_out). Missing model → show ` - ` for USD, never block.
282
282
 
@@ -310,7 +310,18 @@ Skipped in exactly two cases:
310
310
  | Autopilot (`state.autopilot === true` or `MULTI_AGENT_AUTOPILOT=1`) | Explicit consent for side-effect creation - posts directly with prefs/flag selections, zero interaction |
311
311
  | `--dry-run` | Already prints without posting; a question would be redundant |
312
312
 
313
- **Preview render** (one block per selected channel, final body after humanizer - shown in readable Markdown, channel-specific markup conversion happens after approval):
313
+ **Preview render** (one block per selected channel, final body after humanizer - shown in readable Markdown, channel-specific markup conversion happens after approval).
314
+
315
+ Conversion is per-channel and two of the four channels have none. Do not reach for "the" conversion table - there is no single one:
316
+
317
+ | Channel | Conversion after approval | Table |
318
+ |---|---|---|
319
+ | PR description | **none** - posted as Markdown, verbatim | GitHub / Bitbucket / GitLab all render Markdown; see `channels/pr.md` "Markup dialect" |
320
+ | GitHub issue comment | **none** - posted as Markdown, verbatim | - |
321
+ | Jira comment | markdown → Jira wiki markup | `channels/jira.md` "Wiki markup conversion" |
322
+ | Confluence page | markdown → storage format | `channels/confluence.md` "Body conversion" |
323
+
324
+ Applying the Jira table to the PR body is the recurring failure of this step: it is the only *text* markup table in the doc set, so it reads as the default. It is not. A PR body containing `h2.`, `{{code}}`, or `#`-numbered lists shipped raw wiki markup to a Markdown surface.
314
325
 
315
326
  ```
316
327
  ── PR description ({repoName} #{prNumber}, replace) ─────────
@@ -390,7 +401,7 @@ Full contract: [`$HOME/.claude/multi-agent-refs/channels/confluence.md`]($HOME/.
390
401
 
391
402
  **Wiki → Jira comment auto-link** (triad contract, preserved from v5.6): when the Wiki adapter writes pages AND `state.jiraId` is set AND `prefs.global.wikiToJiraComment === true`, also post a humanizer-passed summary of the wiki pages (component name + variant count + wiki URL) as an additional Jira comment on the same issue. Independent of the main Jira channel's comment - both can coexist. Full contract in `$HOME/.claude/multi-agent-refs/issue-jira-triad.md`.
392
403
 
393
- **If preconditions met (Case A):** scope multi-select prompt (Main page / iOS sub-page / Screenshots / Index updates / Other); adapter dispatched to the plugin skill `ai-ios-engineering-toolkit:figma-component-wiki` (or `ai-android-engineering-toolkit:figma-component-wiki`).
404
+ **If preconditions met (Case A):** scope multi-select prompt (Main page / iOS sub-page / Screenshots / Index updates / Other); adapter dispatched to the plugin skill `ai-ios-toolkit:figma-component-wiki` (or `ai-android-toolkit:figma-component-wiki`).
394
405
 
395
406
  Full contract: [`$HOME/.claude/multi-agent-refs/channels/wiki.md`]($HOME/.claude/multi-agent-refs/channels/wiki.md) - all four `figma-config.wiki.mode` adapters (submodule / in-repo / github-wiki / separate-repo), full Case A scope menu, screenshot quadrant gate.
396
407
 
@@ -0,0 +1,186 @@
1
+ ---
2
+ description: "Customer-complaint triage. Ingests complaints (paste, csv/xlsx/txt/json file, Jira issue, Confluence URL), fetches Graylog evidence per trx/conversation id, correlates read-only against the selected client + BFF repos; per complaint: client/bff root cause + fix plan + dev prompt, or core routing recommendation, or insufficient-evidence. Report only, no dev chaining. Use when customer-reported errors need layer triage."
3
+ description-tr: "Müşteri şikayeti / müşteri kaynaklı hata triyajı. Şikayetleri alır (serbest metin, csv/xlsx/txt/json dosya, Jira issue, Confluence URL), trxId/conversationId ile Graylog kanıtı çeker, seçilen client + BFF repolarıyla salt-okunur eşleştirir ve her şikayeti sınıflandırır: client / bff (bizim sorumluluğumuz, kök neden analizi) veya core (core ekibine yönlendirme önerisi) veya insufficient-evidence. Rapor üretip durur - branch, worktree, commit, PR veya dev zinciri yok."
4
+ argument-hint: "[\"<run-name>\"] [--file <path>] [<jira-id | jira-url | confluence-url> ...]"
5
+ ---
6
+
7
+ # multi-agent complaint-analysis - Customer Complaint Triage
8
+
9
+ **Input**: $ARGUMENTS (optional run name, optional `--file <path>`, optional Jira ids / Jira URLs / Confluence URLs; remaining free text is treated as pasted complaints)
10
+
11
+ Triage of customer-reported errors across the layers the team owns (client apps + BFFs). Per complaint: Graylog log evidence by trx/conversation id, read-only repo correlation, and a verdict. **Core failures get a routing recommendation, never a fix analysis.**
12
+
13
+ **Side-effect contract**: may write a local markdown report, post a Confluence page, or add a Jira comment/description - but **never** creates branches, worktrees, commits, or PRs. Stops at the report.
14
+
15
+ > **Language**: Per `$HOME/.claude/multi-agent-refs/rules.md` Language Application matrix - instruction prose stays English. `AskUserQuestion.label` and `header` stay English. `question` and `description` follow `outputLanguage`. The report body follows `outputLanguage`; Graylog excerpts, verdict tokens, and external payload metadata stay English.
16
+
17
+ ## Locked decisions (do not re-ask)
18
+
19
+ 1. **Graylog is primary evidence (deliberate departure).** `features/external-context-injection.md` declares Graylog advisory-only for the dev pipeline; in THIS command Graylog IS the evidence backbone. A per-complaint fetch failure still never halts the run, but that complaint's verdict is capped at `insufficient-evidence` - never fabricated.
20
+ 2. **Ids are never guessed.** A complaint with no trxId and no convId enters the Phase 0 Step 5 confirmation loop: the user supplies the id(s) or explicitly marks the complaint `skip-graylog`. Empty submit is not consent (`feedback_no-inferred-defaults-from-empty-answer`); re-ask.
21
+ 3. **Read-only ops command.** No worktree, branch, commit, PR, or dev chaining. Report + Stop.
22
+ 4. **Redaction before any output.** Complaint text is redacted at intake (`parse-complaints.sh`, default on). Jira / Confluence-sourced complaint text passes through the same redaction (`--stdin` mode) after fetch. Raw PII never enters state, drafts, or any dispatch target.
23
+ 5. **Core is a residual classification, not a repo.** Verdict `core` produces a routing recommendation only - no fix analysis, no core-repo grepping, no core code speculation.
24
+ 6. **Layer mapping is user-confirmed.** Name-based layer inference (Step 3b) is a proposal; the confirmation table must be approved before Phase 1.
25
+ 7. **Output default = Local file.** The Phase 4.5 picker keeps `Local file` pre-selected; Confluence and Jira are never default-selected.
26
+ 8. **Humanizer punctuation policy is non-negotiable.** No em-dash, en-dash, ellipsis, curly quotes, or section sign in any emitted text. Turkish diacritics are preserved verbatim - never ASCII-fold the prose.
27
+ 9. **Language split.** Report body follows `outputLanguage`; verdict tokens (`client:ios`, `bff:mobile-bff`, `core`, `insufficient-evidence`), Graylog evidence excerpts, and Confluence/Jira payload metadata stay English.
28
+ 10. **Verdict citation discipline.** Every `client`/`bff` verdict cites at least one Graylog message (timestamp + source) AND one repo evidence row (`file:line`). Anything less is `insufficient-evidence`. Every `core` verdict cites the Graylog message that names the upstream service.
29
+ 11. **One complaint batch per run.** Mixed batches spanning unrelated products are user error: surface it and ask to split.
30
+ 12. **No auto-commit.** The local report is written to the working tree; the user commits it themselves if they want.
31
+ 13. **Client/bff verdicts carry a development handoff.** Every `client`/`bff` verdict renders a fix plan grounded in the EXISTING architecture (the `repoEvidence[]` files are the reference: name the concrete files/components to touch, reuse-first, no invented structures) plus a ready-to-run dev prompt (English, one fenced block, `/multi-agent:dev`-compatible). The handoff is part of the report - this command still never runs dev itself (Locked 3). Core and insufficient-evidence verdicts never get a fix plan (Locked 5).
32
+
33
+ ## Steps
34
+
35
+ ### Phase 0 - Intake
36
+
37
+ Sequential `AskUserQuestion` chain, answers land under `state.complaintSpec.*` (schema: `$HOME/.claude/schemas/complaint-analysis-spec.schema.json`). Step narration per `$HOME/.claude/multi-agent-refs/picker-contract.md`: print `<localized: "Step <i>/<n>: <what this step decides>">` before each picker; auto-resolved steps still print their breadcrumb.
38
+
39
+ #### Step 0 - Language resolution (BLOCKING)
40
+
41
+ Read `prefs.global.outputLanguage` (`tr` or `en`, default `tr`) before the first picker. Every `<localized: "...">` marker in this file is rendered in that language, never emitted literally.
42
+
43
+ #### Step 1 - Run name
44
+
45
+ From `$ARGUMENTS` quoted string if present, else default `complaints-<YYYYMMDD>` (announce, do not ask). Result: `state.complaintSpec.runName`.
46
+
47
+ #### Step 2 - Account picker
48
+
49
+ Reuse `$HOME/.claude/multi-agent-refs/_account-picker.md`. Needed for Graylog-adjacent Jira/Confluence fetches and dispatch; skipped only when the run is fully local (no Jira/Confluence input, local output only) - then `account: null`.
50
+
51
+ #### Step 3 - Repo multi-select
52
+
53
+ Reuse `$HOME/.claude/multi-agent-refs/_repo-picker.md` (multi-select via `~/.claude/lib/repo-cache.sh`). Guidance line in the question: <localized: "Select the client and BFF repos your team owns (e.g. ios / android / web / mobile-bff / web-bff). Core services are NOT selected - core is a triage outcome, not a repo.">
54
+
55
+ #### Step 3b - Layer tagging (single confirmation table)
56
+
57
+ Infer a layer per selected repo from its name (`ios|iphone` -> ios, `android` -> android, `web(?!.*bff)` -> web, `mobile.?bff|bff.?mobile` -> mobile-bff, `web.?bff|bff.?web` -> web-bff, else other). Present ONE AskUserQuestion with the full `repo -> layer` table in the question body: options `Approve mapping` / `Override rows`. On override, one follow-up per rejected row with the 6 layer options. Result: `state.complaintSpec.repos[] = {name, layer, localPath?, provider?}` (Locked 6).
58
+
59
+ #### Step 4 - Complaint input (multi-source)
60
+
61
+ Classify every `$ARGUMENTS` remainder and any pasted input via `~/.claude/lib/context-link-extractor.sh`, then collect per source type. If nothing was supplied, ask: <localized: "Paste the complaints, or give a file path (csv / xlsx / txt / json), a Jira issue, or a Confluence URL. Mixed input is fine.">
62
+
63
+ | Source | Ingestion |
64
+ |---|---|
65
+ | File path (`--file` or detected) | `~/.claude/lib/parse-complaints.sh --file <path>` (format auto-detected; exit 5 = xlsx degrade -> surface `degradeReason`, ask for a CSV export path, re-run) |
66
+ | Pasted free text | `parse-complaints.sh --stdin` (splits blocks, pre-fills ids via the shared label set) |
67
+ | Jira id / URL | Fetch issue summary + description + comments via Jira REST (account token); concatenate as text blocks, pipe through `parse-complaints.sh --stdin` (Locked 4) |
68
+ | Confluence URL | `~/.claude/lib/fetch-confluence.sh <url>`; page body paragraphs/table rows become text blocks, piped through `parse-complaints.sh --stdin` |
69
+
70
+ Merge all outputs into one list, re-numbering ids `C-01..C-NN`. Result: `state.complaintSpec.input` + `state.complaintSpec.complaints[]`.
71
+
72
+ #### Step 5 - Id confirmation loop (Locked 2)
73
+
74
+ Render the parsed table (id, redacted excerpt <= 80 chars, trxId, convId, platformHint) to the user. For every complaint missing BOTH ids, one AskUserQuestion: <localized: "Complaint <id> has no trx/conversation id. Supply one, or skip Graylog for it?"> with options `Skip Graylog for this complaint` (-> `skipGraylog: true`) and Other for the id (`trx:<value>` / `conv:<value>`). Empty submit re-asks. Set `phase: "fetching_graylog"`.
75
+
76
+ ### Phase 1 - Graylog evidence fan-out
77
+
78
+ For each complaint with at least one id and `skipGraylog: false`:
79
+
80
+ ```bash
81
+ ~/.claude/lib/fetch-graylog.sh --trx <trxId> --conv <convId> # pass whichever exist
82
+ ```
83
+
84
+ Record per complaint: `graylog: {status: ok|degraded|skipped, totalResults, degradeReason}` plus the top messages (timestamp, source, level, message excerpt) kept in working context for Phase 2/3. Failure handling:
85
+
86
+ - Exit 0 with `degraded: true` -> `status: degraded`, keep the reason, continue.
87
+ - Exit 2 / 3 / 6 (credential / auth / host) -> per `$HOME/.claude/multi-agent-refs/keychain.md` non-critical rule: warn ONCE (`WARN: Graylog unavailable (<reason>); remaining complaints proceed without log evidence.`), mark this and all remaining fetches `status: degraded`, continue. Never halt (Locked 1).
88
+ - `skipGraylog: true` -> `status: skipped`.
89
+
90
+ Set `phase: "correlating_repos"`.
91
+
92
+ ### Phase 2 - Repo evidence correlation (read-only)
93
+
94
+ From each complaint's Graylog messages extract candidate signals: endpoint paths, error codes, exception class names, distinctive message templates, and the `source` service name. Then grep the selected repos (skip dirs: `.build`, `DerivedData`, `Pods`, `node_modules`, `.next`, `build/`, `.gradle`, `vendor/`):
95
+
96
+ ```bash
97
+ grep -rn --include='*.swift' --include='*.kt' --include='*.ts' --include='*.tsx' --include='*.js' --include='*.java' -E "<signal>" "$REPO_PATH"
98
+ ```
99
+
100
+ Bucket hits per complaint as `repoEvidence[] = {repo, layer, file, line, signal, matchKind: direct|partial}` (`direct` = exact endpoint/error-code/template match; `partial` = fuzzy/name-only). Grep only - no convention extraction, no Figma, no Swagger. Complaints with `status: degraded|skipped` still get a text-similarity pass (grep the complaint's distinctive nouns/error phrases), tagged `partial`. Set `phase: "triaging"`.
101
+
102
+ ### Phase 3 - Triage classification
103
+
104
+ Per complaint, in order:
105
+
106
+ | Condition | Verdict |
107
+ |---|---|
108
+ | Graylog error originates in an owned layer: signal matched `direct` in a selected repo, OR the failing `source` maps to an owned BFF | `client:<ios|android|web>` or `bff:<mobile-bff|web-bff>` + root-cause rationale + citations (Locked 10) |
109
+ | Graylog shows the failure downstream of owned layers: `source` is an unowned core service, 5xx from an upstream nobody selected owns, no repo match | `core` + routing recommendation (below) |
110
+ | No/degraded Graylog AND no direct repo signal | `insufficient-evidence` + open question row |
111
+
112
+ **Routing recommendation** (core only, Locked 5): `{suspectedService: <Graylog source>, endpoint, errorCode, evidenceExcerpt (EN, redacted), suggestedQueue: prefs.projects[<project>].routing.coreTeamLabel ?? null, confidence}`.
113
+
114
+ Verdict shape: `verdict: {category, layer, confidence: high|medium|low, rationale}`. Ambiguous client-vs-bff attribution lowers `confidence`, never invents evidence.
115
+
116
+ **Development handoff (client/bff only, Locked 13)**: for each `client`/`bff` verdict, derive from the `repoEvidence[]` rows:
117
+
118
+ - **Fix plan**: 2-5 numbered steps referencing the existing architecture by `file:line` - which service/view/handler to change, what to reuse (reuse-first: prefer extending the cited components over adding new ones), which tests to add. No speculative rewrites.
119
+ - **Dev prompt**: one fenced English block the user can paste into `/multi-agent:dev` (or a Jira description): complaint summary, root cause, the cited files, the fix plan steps, and the acceptance check. Include the complaint id (`[C-NN]`) for traceability.
120
+
121
+ Set `phase: "drafting"`.
122
+
123
+ ### Phase 4 - Draft, humanize, buffer
124
+
125
+ 1. Render the report per `$HOME/.claude/multi-agent-refs/complaint-analysis-template.md` (8 fixed sections; single-language body in `outputLanguage`; verdict tokens English per Locked 9) to `/tmp/complaint-analysis-<run-slug>-<UTC-iso8601>/report.md`. Store `outputs.draftDir`.
126
+ 2. **Humanizer pass (MANDATORY: actually invoke the `ai-common-toolkit:humanizer` skill; the punctuation grep alone does NOT satisfy this)** with `language: <tr|en>`, `tone: technical-explanatory`, `stripFancyPunctuation: true`. Diacritics preserved (Locked 8).
127
+ 3. Punctuation gate: `grep -P '[\x{2013}\x{2014}\x{2026}\x{201C}\x{201D}\x{2018}\x{2019}\x{00A7}]'` over the draft returns zero matches.
128
+ 4. Show the draft path + size to the user. Set `phase: "awaiting_output_decision"`.
129
+
130
+ ### Phase 4.5 - Output destination picker
131
+
132
+ AskUserQuestion (multiSelect=true), `Local file` pre-selected (Locked 7):
133
+
134
+ ```
135
+ header: "Output"
136
+ question: <localized: "Where should the triage report be written?">
137
+ options:
138
+ - label: "Local file" (description: complaints/<run-name>.md in the primary repo's working tree)
139
+ - label: "Confluence page"
140
+ - label: "Jira"
141
+ ```
142
+
143
+ Follow-ups: Confluence -> ask parent page (Other, LRU recents from `prefs.projects[<project>].confluenceUrls`); Jira -> pick from Step 4 Jira ids if any, else ask via Other. Result: `outputs.destinations[]`. Set `phase: "dispatching"`.
144
+
145
+ ### Phase 5 - Validate, dispatch, report. Stop.
146
+
147
+ **Pre-dispatch gate (BLOCKING)**: `node $HOME/.claude/scripts/validate-complaint-doc.mjs <draft>` - front-matter, required sections, verdict tokens per triage row, routing entry per core verdict, punctuation, redaction-leak scan. Any ERROR blocks dispatch: fix the draft, re-validate.
148
+
149
+ | Target | Action |
150
+ |---|---|
151
+ | Local | `cp` the draft to `complaints/<run-name>.md` in the primary repo's working tree. **No commit** (Locked 12). |
152
+ | Confluence | Re-humanize with `formal-stakeholder` tone; post one page under the chosen parent via `$HOME/.claude/multi-agent-refs/channels/confluence.md` + `~/.claude/lib/md2confluence-v3.py`. |
153
+ | Jira | Re-humanize with `informal-technical` tone; markdown -> wiki markup per `$HOME/.claude/multi-agent-refs/channels/jira.md`; post as a comment on the chosen issue (never close/transition the issue). |
154
+
155
+ Then print the summary in `outputLanguage`: complaint count, verdict counts (`X client / Y bff / Z core / W insufficient-evidence`), degraded services, output paths/URLs. When any `core` verdict exists, add: <localized: "N complaint(s) route to the core team - see the routing section before forwarding.">
156
+
157
+ **Stop. Do not chain into `/multi-agent:dev`. Do not open a worktree. Do not create a branch.** Set `phase: "done"`.
158
+
159
+ ### Resume contract
160
+
161
+ `state.complaintSpec.phase`: `intake | fetching_graylog | correlating_repos | triaging | drafting | awaiting_output_decision | dispatching | reporting | done`.
162
+
163
+ `/multi-agent:resume` at `awaiting_output_decision`: if `outputs.draftDir` still holds `report.md`, jump to Phase 4.5; if gone, re-render Phase 4 from state (evidence is retained). Earlier phases resume at their own boundary; Graylog results already in state are never re-fetched.
164
+
165
+ ## Reusable refs
166
+
167
+ | Path | Reason |
168
+ |---|---|
169
+ | `~/.claude/lib/parse-complaints.sh` | Phase 0 Step 4 normalization + redaction (all formats + stdin) |
170
+ | `~/.claude/lib/context-link-extractor.sh` | Phase 0 Step 4 input classifier (jira / confluence / graylog id labels) |
171
+ | `~/.claude/lib/fetch-graylog.sh` | Phase 1 log evidence (`--trx` / `--conv`) |
172
+ | `~/.claude/lib/fetch-confluence.sh` | Phase 0 Step 4 Confluence-sourced complaints |
173
+ | `$HOME/.claude/multi-agent-refs/_account-picker.md`, `_repo-picker.md`, `picker-contract.md` | Phase 0 pickers |
174
+ | `$HOME/.claude/multi-agent-refs/keychain.md` | Phase 1 non-critical credential handling |
175
+ | `$HOME/.claude/multi-agent-refs/complaint-analysis-template.md` | Phase 4 report template (8 sections) |
176
+ | `ai-common-toolkit:humanizer` | Phase 4 tone pass |
177
+ | `$HOME/.claude/scripts/validate-complaint-doc.mjs` | Phase 5 pre-dispatch gate |
178
+ | `$HOME/.claude/multi-agent-refs/channels/confluence.md`, `channels/jira.md`, `~/.claude/lib/md2confluence-v3.py` | Phase 5 dispatch |
179
+ | `$HOME/.claude/schemas/complaint-analysis-spec.schema.json` | State contract |
180
+
181
+ ## Notes
182
+
183
+ - Fully generic: hosts come from `prefs.global.hosts.*`, tokens from `prefs.global.keychainMapping.*`; no company name, host, or real repo name in this file.
184
+ - `prefs.projects[<project>].routing.coreTeamLabel` is optional; when unset, `suggestedQueue` renders as `-` and the routing entry still stands.
185
+ - If Confluence / Jira dispatch returns 401 / 403, surface the error and offer the Local fallback (the draft stays on disk).
186
+ - The `complaints/` directory is not gitignored; the user commits manually if desired.
@@ -10,11 +10,11 @@ argument-hint: "[\"<free-text description>\"] [figma-url] [swagger-url] - all
10
10
 
11
11
  Creates exactly one Jira issue, and only after explicit approval. The issue type (Task / Bug / Story) is asked at the start of every run. No branches, no commits, no worktrees, no pipeline chaining. The draft learns the target project's conventions from its recent same-type issues (summary format, labels, components, priority norms, test-scenario style) and offers active-sprint placement when a sprint is running.
12
12
 
13
- > **Language**: instruction prose here is English. AskUserQuestion `question`/`description` and the issue content (summary + description) follow `prefs.global.outputLanguage` - an intentional exception to the "external payloads stay English" default, because the issue is authored for the user's team. `label`/`header` stay English.
13
+ > **Language**: instruction prose here is English. AskUserQuestion `question`/`description` and the issue content (summary + description) follow `prefs.global.outputLanguage`, like every other user-facing payload body (`rules.md` matrix). `label`/`header` stay English.
14
14
 
15
15
  ## Issue types
16
16
 
17
- Type is chosen at step [3/11] via AskUserQuestion (never inferred silently). Each type has a standard template baseline; sections auto-size (see `$HOME/.claude/multi-agent-refs/generate-issue.md` for the full A/C matrix and inclusion rules).
17
+ Type is chosen at step [3/12] via AskUserQuestion (never inferred silently). Each type has a standard template baseline; sections auto-size (see `$HOME/.claude/multi-agent-refs/generate-issue.md` for the full A/C matrix and inclusion rules).
18
18
 
19
19
  | Type | Always-present sections | Conditional sections (included only when their trigger is present) |
20
20
  |---|---|---|
@@ -24,11 +24,11 @@ Type is chosen at step [3/11] via AskUserQuestion (never inferred silently). Eac
24
24
 
25
25
  ## Flow
26
26
 
27
- Read `$HOME/.claude/multi-agent-refs/generate-issue.md` and execute the 11-step shared flow. Non-negotiables restated:
27
+ Read `$HOME/.claude/multi-agent-refs/generate-issue.md` and execute the 12-step shared flow. Non-negotiables restated:
28
28
 
29
29
  - Ask the user (AskUserQuestion) for the issue type first, then about every genuinely unknown field - component, epic, priority, labels, assignee, sprint vs backlog, required custom fields.
30
30
  - A conditional section renders only when its trigger is present (Figma URL, pasted screenshot/log, Swagger URL/contract, real Notes content). No empty placeholder headings; content the user did not supply and mining could not derive is never invented.
31
- - Step [8/11] full preview + approval gate always runs. `Approve` / `Edit` (loop) / `Cancel`. No bypass exists.
31
+ - Step [9/12] full preview + approval gate always runs. `Approve` / `Edit` (loop) / `Cancel`. No bypass exists.
32
32
 
33
33
  ## Error paths
34
34
 
@@ -13,7 +13,7 @@ description-tr: "Hızlı geliştirme modu: Init → Dev (Opus) → Review → Te
13
13
  > 2. **`prefs.global.outputLanguage` is user-selectable** - applies to (a) every conversational line the agent writes back, and (b) every user-facing external payload: PR description body, Jira comment, Confluence body, Wiki body.
14
14
  >
15
15
  > Regardless of `outputLanguage`, these stay English (interop / convention):
16
- > - `AskUserQuestion` labels and descriptions (UI contract)
16
+ > - `AskUserQuestion` `label` + `header` only (UI contract) - the `question` and each option's `description` follow `outputLanguage`; a picker whose question is English on a Turkish run is a bug, not the contract
17
17
  > - Commit message subject/body (git convention)
18
18
  > - Branch names (`feature/`, `bugfix/`, ...)
19
19
  > - Code identifiers, file paths, log lines
@@ -215,6 +215,14 @@ That is the whole list. Phase 0 (Init full picker), Phase 4 (Review), Phase 5 (U
215
215
  | Phase 5 User Test | ✅ | ✅ (same) |
216
216
  | Phase 7 channels (Jira / Confluence / PR / Wiki) | ✅ | ✅ (same) |
217
217
  | Duration | ~10-15 min | ~7-10 min |
218
+ ## Intake warnings (`--dev` family)
219
+
220
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
221
+
222
+ ## Required: outward-facing payload contracts
223
+
224
+ Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
225
+
218
226
  ## Required: Phase Tracker Contract
219
227
 
220
228
  **The phase tracker is mandatory** - the agent cannot skip it. Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md).
@@ -236,7 +244,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
236
244
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
237
245
 
238
246
  # After every LLM call (every CLI):
239
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
247
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
240
248
  ```
241
249
 
242
250
  ### Visual channel - Claude Code (native TaskList widget, required)
@@ -279,24 +287,3 @@ bash $HOME/.claude/scripts/phase-tracker.sh render
279
287
  ```
280
288
 
281
289
  Do NOT call TaskCreate on these CLIs - the tool does not exist and the call fails.
282
-
283
- ## Analysis doc supplied to a fast mode (warn before starting)
284
-
285
- The `--dev` family skips Phase 1 (Analysis) and Phase 2 (Planning) by design. So when
286
- the input references an analysis document - a Confluence URL, a local analysis file,
287
- or the user says "I ran analysis for this" - there is **no phase that turns it into a
288
- plan**. The doc becomes raw context for one Dev pass, and work comes out ordered by
289
- whatever the model read first: the bottom of the dependency chain lands, the screen
290
- wiring does not.
291
-
292
- Say so before starting, once, and offer the choice:
293
-
294
- ```
295
- This mode skips Analysis and Planning, so the analysis document will not be turned
296
- into a task breakdown. For analysis-driven screen work, /multi-agent or
297
- /multi-agent:local run both phases.
298
- 1. Continue with --dev (doc as context only)
299
- 2. Switch to the full pipeline
300
- ```
301
-
302
- Autopilot picks 1 and logs the warning rather than asking.
@@ -7,7 +7,7 @@ description-tr: "En hızlı mod: Dev (Opus) + Autopilot. Init → Dev → Review
7
7
 
8
8
  **Input**: $ARGUMENTS
9
9
 
10
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` and external payloads stay English. Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
10
+ > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` `label`/`header` stay English, but its `question` and option `description`s render in `outputLanguage`; external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
11
11
 
12
12
  Dev mode + Autopilot combined: a 4-phase pipeline with no confirmations, end-to-end autonomous.
13
13
 
@@ -59,6 +59,14 @@ Phase 7: Report → short terminal summary
59
59
  | Review | Parallel + triage (CLI-aware) | Parallel + triage (CLI-aware) | Parallel + triage (CLI-aware) | **Parallel + triage, auto-fix** |
60
60
  | Blocking finding | Fix loop, then ask | Fix loop, then ask | Auto-fix, breaker at 3 | **Auto-fix, breaker at 3** |
61
61
  | Estimated duration | ~12 min | ~7 min | ~10 min | **~5 min** |
62
+ ## Intake warnings (`--dev` family)
63
+
64
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
65
+
66
+ ## Required: outward-facing payload contracts
67
+
68
+ Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
69
+
62
70
  ## Required: Phase Tracker Contract
63
71
 
64
72
  **The phase tracker is mandatory** - the agent cannot skip it. Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md).
@@ -82,7 +90,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
82
90
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
83
91
 
84
92
  # After every LLM call (every CLI):
85
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
93
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
86
94
  ```
87
95
 
88
96
  ### Visual channel - Claude Code (native TaskList widget, required)
@@ -6,7 +6,7 @@ allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdat
6
6
 
7
7
  # multi-agent dev-local - Fast + Local
8
8
 
9
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` and external payloads stay English. Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
9
+ > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` `label`/`header` stay English, but its `question` and option `description`s render in `outputLanguage`; external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
10
10
 
11
11
  Dedicated form of the `--dev` + `--local` combination. A 4-phase fast pipeline (no worktree).
12
12
 
@@ -22,7 +22,6 @@ Phase 7: Report → Jira / Wiki + log + knowledge/memory
22
22
 
23
23
  `--dev local` skips Phase 1 (Analysis), Phase 2 (Planning + Approval Gate), and Phase 5 (User Test - local/autopilot variants skip the interactive test gate). It differs from `--dev` on two axes: no git worktree is created (development happens directly on the current branch in `$PROJECT_ROOT`), and the interactive User Test phase is skipped. **Review is not skipped** - Phase 4 runs its gates, resolves the criteria the dev phase was supposed to honour, reviews in parallel and triages, and accepted blocking findings return to Phase 3 (3-iteration cap).
24
24
 
25
- > **Already have work on the branch?** For changes developed outside the pipeline, or by hand, run [`/multi-agent:ship`](../ship/SKILL.md) on that branch: it puts the existing diff through the same review, adds a build+test success gate, opens the PR and posts the Jira technical-analysis + test-scenario comment - without re-developing.
26
25
 
27
26
  ## When to use it
28
27
 
@@ -52,7 +51,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
52
51
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
53
52
 
54
53
  # After every LLM call (every CLI):
55
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
54
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
56
55
  ```
57
56
 
58
57
  ### Visual channel - Claude Code (native TaskList widget, required)
@@ -105,30 +104,17 @@ Routes to the orchestrator with `--dev --local` flags. Apply the `$HOME/.claude/
105
104
  - Phase 6: commit + push + PR (the local checkout prompt is natural in local mode - you're already there; no worktree removal needed, code is already in `$PROJECT_ROOT`)
106
105
  - Phase 7: report + channels (same as `--dev`)
107
106
 
108
- ## Examples
107
+ ## Intake warnings (`--dev` family)
109
108
 
110
- ```bash
111
- /multi-agent:dev-local "PROJ-12345" # Jira
112
- /multi-agent:dev-local "Bug: LoginView dark mode" # Free-text
113
- ```
109
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
114
110
 
115
- ## Analysis doc supplied to a fast mode (warn before starting)
111
+ ## Required: outward-facing payload contracts
116
112
 
117
- The `--dev` family skips Phase 1 (Analysis) and Phase 2 (Planning) by design. So when
118
- the input references an analysis document - a Confluence URL, a local analysis file,
119
- or the user says "I ran analysis for this" - there is **no phase that turns it into a
120
- plan**. The doc becomes raw context for one Dev pass, and work comes out ordered by
121
- whatever the model read first: the bottom of the dependency chain lands, the screen
122
- wiring does not.
113
+ Skipping Analysis and Planning does not shorten the payload contracts. Before writing anything outward-facing, load `$HOME/.claude/multi-agent-refs/payload-contracts.md` - the canonical list of what to read for the PR body, the Jira comment, and the closing report, plus the markup dialect per surface. Improvising a payload shape from memory is the single most common failure of the fast modes.
123
114
 
124
- Say so before starting, once, and offer the choice:
115
+ ## Examples
125
116
 
117
+ ```bash
118
+ /multi-agent:dev-local "PROJ-12345" # Jira
119
+ /multi-agent:dev-local "Bug: LoginView dark mode" # Free-text
126
120
  ```
127
- This mode skips Analysis and Planning, so the analysis document will not be turned
128
- into a task breakdown. For analysis-driven screen work, /multi-agent or
129
- /multi-agent:local run both phases.
130
- 1. Continue with --dev (doc as context only)
131
- 2. Switch to the full pipeline
132
- ```
133
-
134
- Autopilot picks 1 and logs the warning rather than asking.
@@ -6,7 +6,7 @@ allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdat
6
6
 
7
7
  # multi-agent dev-local-autopilot - Fastest + Local
8
8
 
9
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` and external payloads stay English. Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
9
+ > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` `label`/`header` stay English, but its `question` and option `description`s render in `outputLanguage`; external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
10
10
 
11
11
  The triple `--dev` + `--local` + `autopilot` - the fastest form available. Zero confirmations, NO worktree.
12
12
 
@@ -38,7 +38,6 @@ Phase 1 (Analysis), Phase 2 (Planning + Approval Gate) and Phase 5 (User Test) a
38
38
 
39
39
  Routes to the orchestrator with `--dev --local autopilot` flags. The pipeline contract matches [`dev-autopilot/SKILL.md`](../dev-autopilot/SKILL.md) exactly, with Phase 0 Step 8 (worktree creation) skipped.
40
40
 
41
- > **Already have work on the branch?** For a diff that exists without a pipeline run behind it, [`/multi-agent:ship`](../ship/SKILL.md) applies the same review plus a build+test gate before the PR.
42
41
 
43
42
  ## Examples
44
43
 
@@ -46,6 +45,14 @@ Routes to the orchestrator with `--dev --local autopilot` flags. The pipeline co
46
45
  /multi-agent:dev-local-autopilot "PROJ-12345" # Jira
47
46
  /multi-agent:dev-local-autopilot "Add retry to HomeNetworking" # Free-text
48
47
  ```
48
+ ## Intake warnings (`--dev` family)
49
+
50
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
51
+
52
+ ## Required: outward-facing payload contracts
53
+
54
+ Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
55
+
49
56
  ## Required: Phase Tracker Contract
50
57
 
51
58
  **The phase tracker is mandatory** - the agent cannot skip it. Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md).
@@ -71,7 +78,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
71
78
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
72
79
 
73
80
  # After every LLM call (every CLI):
74
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
81
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
75
82
  ```
76
83
 
77
84
  ### Visual channel - Claude Code (native TaskList widget, required)
@@ -62,7 +62,7 @@ deletes nothing until you confirm.
62
62
  residue in the index (`.worktrees/{id}` recorded as a "Subproject commit"
63
63
  entry by a pre-guard `git add -A`), and a missing `.worktrees/` line in
64
64
  `.git/info/exclude`. Registered, healthy worktrees are NEVER touched -
65
- those belong to `/multi-agent:ship` / `/multi-agent:kill`.
65
+ those belong to `/multi-agent:resume-local` / `/multi-agent:kill`.
66
66
 
67
67
  - Output says `nothing to do` -> skip silently, no question.
68
68
  - Otherwise surface a second `AskUserQuestion` (in `outputLanguage`):