@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
@@ -1,6 +1,7 @@
1
1
  ## Audit & Quality Tools Guide
2
2
 
3
3
  <!-- toc -->
4
+ - [Audit & Quality Tools Guide](#audit-quality-tools-guide)
4
5
  - [Trigger Model](#trigger-model)
5
6
  - [iOS Accessibility Audit](#ios-accessibility-audit)
6
7
  - [Android Accessibility Audit](#android-accessibility-audit)
@@ -10,6 +11,9 @@
10
11
  - [Android APK Audit (Play Store Compliance)](#android-apk-audit-play-store-compliance)
11
12
  - [Integration with Pipeline Phases](#integration-with-pipeline-phases)
12
13
  - [Graceful Degradation](#graceful-degradation)
14
+ - [Phase 3 evidence flows](#phase-3-evidence-flows)
15
+ - [UI flow video, when Phase 2 produced none](#ui-flow-video-when-phase-2-produced-none)
16
+ - [Snapshot regression flow (optional)](#snapshot-regression-flow-optional)
13
17
  <!-- /toc -->
14
18
 
15
19
  Standalone audit commands - runs directly via Bash, **no MCP server dependency**. These are the same checks that multi-agent-toolkit-mcp provides as MCP tools, but embedded here as pipeline skills.
@@ -250,3 +254,19 @@ unzip -l "$APK" 2>/dev/null | grep "classes.*\.dex" | wc -l
250
254
  - No Android SDK → skip Android audits, log "Android SDK not available"
251
255
  - No booted simulator → skip accessibility audit, log "No running simulator"
252
256
  - Audits are **enhancements**, never blockers for the pipeline flow
257
+
258
+ ## Phase 3 evidence flows
259
+
260
+ Read from `phases/phase-3-review.md` "Automated Device Checks".
261
+
262
+ ### UI flow video, when Phase 2 produced none
263
+
264
+ Phase 2 Step 3.55 is the primary host and runs in every mode. Phase 3 is the richer one where it exists: the device is up and a person is watching, so the flow is one somebody confirmed. It adds, never replaces.
265
+
266
+ Run only when `visualEvidence.required` and `visualEvidence.video.file` is empty: re-check the device with `$HOME/.claude/scripts/probe-evidence-capability.sh --only device`, then `$HOME/.claude/scripts/capture-evidence.sh video start` -> drive the flow (`run-ui-tests.sh run`, or the Phase 3 scenarios by hand) -> `video stop` -> `fit`. The cap is `visualEvidence.maxVideoSeconds`, read through `capture-evidence.sh limits` so one value serves both. Update `videoTier` and `videoTierReason` with what ran.
267
+
268
+ When the intake answer was `unit` there is no recording here either: overriding it in a phase the user may not be watching makes the question decorative.
269
+
270
+ ### Snapshot regression flow (optional)
271
+
272
+ When the task changes a stable component, capture a screenshot before the change (baseline) and after (current), then call `ios_visual_diff({baseline, current, max_diff_pct: 1.0})`. Threshold can be relaxed for animated / non-deterministic regions - keep `max_diff_pct ≤ 1.0` for static layouts.
@@ -0,0 +1,148 @@
1
+ # autopilot-on: reasoning and detail
2
+
3
+ <!-- toc -->
4
+ - [Why doctor gates arming (step 1)](#why-doctor-gates-arming-step-1)
5
+ - [Why a picker rather than a label alone](#why-a-picker-rather-than-a-label-alone)
6
+ - [Source queries (step 4)](#source-queries-step-4)
7
+ - [Why the JQL is run before saving](#why-the-jql-is-run-before-saving)
8
+ - [Keeping the Mac awake (step 5)](#keeping-the-mac-awake-step-5)
9
+ - [Config keys not written (step 6)](#config-keys-not-written-step-6)
10
+ - [The menu bar indicator (step 7)](#the-menu-bar-indicator-step-7)
11
+ - [Probe warnings (step 8)](#probe-warnings-step-8)
12
+ - [Rendering the plist (step 8)](#rendering-the-plist-step-8)
13
+ - [What `autopilot-control.mjs on` does](#what-autopilot-controlmjs-on-does)
14
+ - [Why the report says what it says (step 9)](#why-the-report-says-what-it-says-step-9)
15
+ <!-- /toc -->
16
+
17
+ Read by `/multi-agent:autopilot-on` when a step needs its reasoning explained,
18
+ when Jira is selected as a source (step 4), or when the probe or launchd reports
19
+ a problem (step 8).
20
+
21
+ ## Why doctor gates arming (step 1)
22
+
23
+ Arming unattended work on an install that `doctor` calls broken produces a queue
24
+ of failures, one per item.
25
+
26
+ ## Why a picker rather than a label alone
27
+
28
+ Push rights usually reach far more repos than you own, many of them other
29
+ people's. A label is a filter; anyone who can open an issue in a repo you happen
30
+ to have push on could add one. The gate is the repo selection, and it is per
31
+ machine.
32
+
33
+ Both halves of the repo list are shown because silently dropping the
34
+ `unavailable` rows looks exactly like a permissions problem, and the user goes
35
+ hunting for a token fault that does not exist.
36
+
37
+ There is no `add-repo` / `remove-repo` command because two entry points to one
38
+ list is two lists; re-running the picker is how repos are added and removed.
39
+
40
+ ## Source queries (step 4)
41
+
42
+ | Source | Query | Extra condition |
43
+ |---|---|---|
44
+ | GitHub | `gh issue list --repo <r> --label <label> --assignee @me --state open` | **assigned to you** (`githubAssignee`, `"*"` for any), so a label an issue form applies is not enough |
45
+ | Jira | `assignee = currentUser() AND labels = "<label>" AND resolution = EMPTY AND status not in (Done, Closed, Cancelled)` | **assigned to you**, so a label somebody else adds is not enough |
46
+
47
+ Two Jira caveats to say out loud when Jira is selected: labels are one global
48
+ namespace across the whole instance and anyone can write them, so on a shared
49
+ instance prefer a qualified name (`agent-queue-<team>`); and the Labels field has
50
+ to be on the edit screen for the issue types in play. An instance where neither
51
+ holds is a `jiraJql` config change - a saved filter, a component - not a
52
+ redesign.
53
+
54
+ ## Why the JQL is run before saving
55
+
56
+ A JQL that returns nothing is not an error and is usually correct on day one
57
+ (nothing is labelled yet), but a JQL that errors is a config that will be silent
58
+ forever - the Labels field missing from an edit screen looks exactly like an
59
+ empty queue from the outside. "0 items, query valid" and "query rejected" are
60
+ reported differently for that reason.
61
+
62
+ ## Keeping the Mac awake (step 5)
63
+
64
+ While the mode is on, a second launchd agent, `com.multi-agent.autopilot-awake`,
65
+ runs `/usr/bin/caffeinate -s -i` from **Start** until `autopilot-off`. Without it
66
+ the machine can sleep between ticks, and launchd does not wake it for the next
67
+ one: the queue stops with nothing to say so. `-s` holds system sleep off on AC
68
+ power; `-i` holds idle sleep off on battery too. Display sleep does not lock the
69
+ keychain; system sleep can, which is the part `-s -i` prevents regardless of the
70
+ display answer.
71
+
72
+ ## Config keys not written (step 6)
73
+
74
+ Keys the schema reserves and nothing reads (`askOnLowMaturity`, `reportStatus`,
75
+ `sendItemKeys`) are not written. A config written by an older version may carry
76
+ `depthRouter` or one of those; the schema still accepts them and nothing reads
77
+ them, so drop them when rewriting the file.
78
+
79
+ ## The menu bar indicator (step 7)
80
+
81
+ Built from source on demand, never shipped as a binary: the package contains only
82
+ text, and a compiled artifact in it would need signing and notarization to be
83
+ distributable. The compiled binary is the one thing an update does not replace,
84
+ so the runner rebuilds it on the first tick after `autopilot-menubar.swift`
85
+ becomes newer than `bin/menubar`. A machine that is already on picks up a new
86
+ indicator without running this command again.
87
+
88
+ ## Probe warnings (step 8)
89
+
90
+ `PROBE_WARNING=` lines do not block: a login keychain that locks on sleep or
91
+ after a timeout is readable now and locked for the tick after the Mac slept,
92
+ which every tick checks again and refuses with the same message.
93
+ `features/autopilot-operations.md` has the probe's rules.
94
+
95
+ ## Rendering the plist (step 8)
96
+
97
+ Run before the Start / Configure only question:
98
+
99
+ ```bash
100
+ . "$HOME/.claude/lib/autopilot-state.sh"
101
+ TPL=$(ma_ap_asset templates/multi-agent-autopilot.plist.template) || {
102
+ echo "BLOCKED: the plist template is not installed on this host - re-run the installer"; exit 1; }
103
+ DEST="$HOME/Library/LaunchAgents/com.multi-agent.autopilot.plist"
104
+ INTERVAL=$(bash "$HOME/.claude/scripts/autopilot-status.sh" --json | jq -r '.scanIntervalSeconds // 120')
105
+ sed -e "s|{{NODE}}|$(command -v node)|g" \
106
+ -e "s|{{TICK}}|$HOME/.claude/scripts/autopilot-runner.mjs|g" \
107
+ -e "s|{{LABEL}}|com.multi-agent.autopilot|g" \
108
+ -e "s|{{ROOT}}|$HOME/.claude/autopilot|g" \
109
+ -e "s|{{INTERVAL}}|$INTERVAL|g" \
110
+ -e "s|{{HOME}}|$HOME|g" \
111
+ -e "s|{{CLAUDE}}|$(command -v claude || true)|g" \
112
+ "$TPL" > "$DEST"
113
+ ```
114
+
115
+ `ma_ap_asset` resolves the template rather than a literal
116
+ `$HOME/.claude/templates/...`, because on a Copilot-only or Codex-only machine
117
+ that tree may not exist. The state root stays shared on purpose - two CLIs on one
118
+ machine must see one queue, not two.
119
+
120
+ `command -v node` rather than the bare word: launchd does not read a login
121
+ shell, so its `PATH` is the short one in the plist's own `EnvironmentVariables`,
122
+ and a Homebrew or nvm node that is not on that path would make every tick fail
123
+ with a message nobody is watching for. `claude` is captured the same way, and
124
+ the plist's `PATH` carries `~/.local/bin` as well, which is where the native
125
+ installer puts it; the runner tries the captured path first, then that `PATH`.
126
+
127
+ ## What `autopilot-control.mjs on` does
128
+
129
+ The same script the office panel's `POST /v1/autopilot/on` calls. It keeps
130
+ exactly the named repos in `config.json`, probes their credentials again
131
+ (`autopilot-arming.mjs probeCredentials`), renders
132
+ `templates/multi-agent-autopilot.plist.template` with its seven placeholders
133
+ (NODE, TICK, LABEL, ROOT, INTERVAL, HOME, CLAUDE), loads it with `launchctl
134
+ bootstrap` (falling back to `load`) and installs the awake agent with the saved
135
+ `awake.display` answer. `--configure-only` saves the selection and installs
136
+ neither.
137
+
138
+ ## Why the report says what it says (step 9)
139
+
140
+ "Configure only" lets the queue be watched with `autopilot-status` for a while
141
+ before anything runs. Both runs are worktrees and per-repo concurrency is 1, so
142
+ the queue skips a repo you are working in rather than competing for
143
+ `.git/index.lock`.
144
+
145
+ Each of the five items is something a user has asked about after the fact.
146
+ launchd loads at **login**, not boot, and that is correct: the login keychain is
147
+ what unlocks the tokens, so a run before login could not reach Jira or GitHub
148
+ anyway.
@@ -1,7 +1,21 @@
1
1
  # Channels - Generator (Step 5 section bodies)
2
2
 
3
+ <!-- toc -->
4
+ - [Jira body versus PR body](#jira-body-versus-pr-body)
5
+ - [Content options](#content-options)
6
+ - [Output template](#output-template)
7
+ <!-- /toc -->
8
+
3
9
  > Loaded by `channels/SKILL.md` Step 5. The SKILL keeps the Jira-vs-PR body rule, the section-order rule and the target length rule; this file carries the content-option table, the aggregated output template, the store-compliance augmentation, and the work-summary and cost-summary generators. Read it before generating any section body.
4
10
 
11
+ ## Jira body versus PR body
12
+
13
+ Jira is read by the person who filed the ticket and by whoever tests it, so its comment carries the four sections `channels/jira.md` fixes - `summary` (`Geliştirme Özeti`), `test_scenarios` (`Test Senaryoları`), `impact` (`Etki Analizi`) and `context_refs` (`Bağlantılar`), plus `test_run` when selected - and nothing else. Technical sections go to the PR and to Confluence, where the reader is a code reviewer. When `jira` is a selected channel, drop the technical sections from its body rather than converting them: the PR link on line 1 is how a Jira reader reaches the detail. No framework-theory paragraphs and no numbered "why this approach" lists in either body.
14
+
15
+ `impact` is not a technical section in disguise. It answers four questions - what was wrong, what was changed, which areas must be tested, what else is affected - in the same plain register as the summary, and it is the part a test lead reads before deciding how wide to test.
16
+
17
+ The content options are sources, not the body's shape. Which sections a PR body carries and in what order is fixed by `channels/pr.md` (`summary` -> `technical` -> `architecture` -> `impact` -> `test_scenarios` -> `test_run` -> `visuals` -> `risk` -> `dependencies` -> `build` -> `related`); the content options choose what gets gathered to fill them. A content option left unselected means a section has no source, not that the section may be reordered or renamed.
18
+
5
19
  ## Content options
6
20
 
7
21
  | Content option | Generated section |
@@ -23,3 +23,16 @@ The Jira table is the only *text* markup table in the doc set and never applies
23
23
  ```
24
24
 
25
25
  Secondary artifacts ride along as one-line intents at the bottom of the preview: Wiki page list, wiki → Jira triad comment (when Wiki is selected and the triad is active per `$HOME/.claude/multi-agent-refs/issue-jira-triad.md`), Board status move (`{from} → {to}`), GitHub issue comment + Progress-flag sync (Phase 5 Step 1.5 - same gate, see `$HOME/.claude/multi-agent-refs/phases/phase-5-report.md`), test-run candidates to untick (`channels/test-run.md`), the Jira body's `--measure` (`render-jira-evidence.mjs`).
26
+
27
+ ## Approval options and skip cases
28
+
29
+ The gate runs after the generator + humanizer and before Step 7 dispatch, in every interactive invocation: menu mode and `--channels` / `--content` flag mode alike (flags pick the targets, they do not waive the content approval). It is skipped only for autopilot (`state.autopilot === true` or `MULTI_AGENT_AUTOPILOT=1`, attended: explicit consent for side-effect creation, posts directly with prefs or flag selections) and `--dry-run` (prints without posting).
30
+
31
+ | Option | Behavior |
32
+ |---|---|
33
+ | `Approve & post` | Step 7 dispatches every previewed body verbatim |
34
+ | `Edit` | Free-text "which channel, what should change", apply, re-render the FULL preview, re-ask (loop, no cap) |
35
+ | `Skip channels` | multiSelect which channels to drop this run, re-render the rest, re-ask |
36
+ | `Cancel` | Abort dispatch entirely; nothing is posted anywhere. Internal capture (agent-log, knowledge) is unaffected |
37
+
38
+ Persisting channel prefs (Step 8) still happens on `Cancel`: selection memory and content approval are independent.
@@ -1,5 +1,17 @@
1
1
  # Channels - Input forms, flags, summary format, error handling, cross-CLI parity, examples
2
2
 
3
+ <!-- toc -->
4
+ - [Input forms](#input-forms)
5
+ - [Flags](#flags)
6
+ - [Step 1 target resolution](#step-1-target-resolution)
7
+ - [Step 4 mode short-circuit](#step-4-mode-short-circuit)
8
+ - [Step 8 summary format](#step-8-summary-format)
9
+ - [Error handling](#error-handling)
10
+ - [Cross-CLI parity](#cross-cli-parity)
11
+ - [Examples](#examples)
12
+ - [Phase 5 delegation contract](#phase-5-delegation-contract)
13
+ <!-- /toc -->
14
+
3
15
  > Loaded by `channels/SKILL.md`. Read the flag table and the error-handling table before Step 1 and whenever a target, a token or a precondition fails; the parity notes and examples are for orientation.
4
16
 
5
17
  ## Input forms
@@ -33,6 +45,27 @@
33
45
  | `--lang=tr\|en\|both` | Output language override (default: `en`; `promptLanguage` is locked to `en`). |
34
46
  | `--ready` | If PR draft, promote to READY after channels dispatch. |
35
47
 
48
+ ## Step 1 target resolution
49
+
50
+ 1. Parse the argument and classify it: Jira-id, Jira-url, PR-url (GitHub or Bitbucket), GitHub-issue-number, or empty (cwd + branch).
51
+ 2. Resolve linked entities:
52
+ - Jira ID: linked PR via the dev-status API (`/rest/dev-status/latest/issue/detail`).
53
+ - PR URL: Jira ID extracted from branch name / title / body using the `{JIRA_KEY}-XXXXX` pattern.
54
+ - GitHub `#N`: resolved against the repo in cwd.
55
+ - Empty: read the git branch, extract the Jira ID, find the linked PR.
56
+ 3. Detect the remote type: `github` (gh CLI) or `bitbucket` (REST).
57
+ 4. Store in runtime state: `{jiraId, targets: [{prUrl, prNumber, remoteType, repoPath, baseBranch, headBranch, repoName, isPrimary}]}`.
58
+
59
+ ## Step 4 mode short-circuit
60
+
61
+ Non-interactive in three cases; the menu is skipped and flag values or prefs are used directly:
62
+
63
+ | Mode | Behavior |
64
+ |---|---|
65
+ | `--channels X,Y` + `--content A,B` flags | Exact flag values, no menu. |
66
+ | `autopilot` (Phase 5 delegate) | Reads `prefs.global.reportChannels` + `prefs.global.reportContent`. Per the Phase 5 autopilot-pause contract, Phase 5 still pauses before calling channels but pre-fills the menu from prefs. A post-hoc call in autopilot mode uses prefs directly. |
67
+ | `--dry-run` | Runs the menu, generates output, prints to stdout, does not post. |
68
+
36
69
  ## Step 8 summary format
37
70
 
38
71
  ```
@@ -96,3 +129,16 @@ Progress emission on Copilot (no native TaskCreate UI): `bash ~/.copilot/scripts
96
129
  → auto-diff from cwd+branch PR + user note combined
97
130
  → posts to default channels (PR + Jira)
98
131
  ```
132
+
133
+ ## Phase 5 delegation contract
134
+
135
+ Phase 5 invokes channels internally instead of running its own Jira / Confluence / Wiki logic:
136
+
137
+ | Who | What |
138
+ |---|---|
139
+ | Phase 5 | Progress tracker (sub-steps 1-3), agent-log finalization (step 4), knowledge + memory capture (step 5), telemetry emission |
140
+ | `channels` | All external delivery: PR description update, Jira comment, Confluence page, Wiki pages |
141
+
142
+ Phase 5 passes a runtime state bundle: `{jiraId, prUrl, remoteType, taskType, figmaConfig, agentState, pipelineLogPath, flowRuns}`. Channels reads these directly and skips Step 1 target resolution.
143
+
144
+ Autopilot: Phase 5 always pauses at the channels menu, the one exception to the autopilot zero-interaction contract. A 30-min timeout ends the session cleanly and the task stays resumable via `/multi-agent:resume`; full contract in `$HOME/.claude/multi-agent-refs/phases/modes.md`. The Step 6 approval gate follows the same split: interactive runs approve the composed bodies before dispatch, autopilot posts directly after the menu resolves.
@@ -0,0 +1,159 @@
1
+ # Complaint analysis - locked decisions, phase procedures and reusable refs
2
+
3
+ <!-- toc -->
4
+ - [Locked decisions](#locked-decisions)
5
+ - [Phase 0](#phase-0)
6
+ - [Phase 1](#phase-1)
7
+ - [Phase 2](#phase-2)
8
+ - [Phase 3](#phase-3)
9
+ - [Phase 4.5](#phase-45)
10
+ - [Phase 5](#phase-5)
11
+ - [Reusable refs](#reusable-refs)
12
+ - [Notes](#notes)
13
+ <!-- /toc -->
14
+
15
+ Reference for `/multi-agent:complaint-analysis`. The command file carries the step order, the hard rules and the stop conditions; this file carries the full locked decisions, the per-phase tables and commands, and the reusable-refs list.
16
+
17
+ ## Locked decisions
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`-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
+ ## Phase 0
34
+
35
+ 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. State schema: `$HOME/.claude/schemas/complaint-analysis-spec.schema.json`.
36
+
37
+ ### Step 1 - Run name
38
+
39
+ From `$ARGUMENTS` quoted string if present, else default `complaints-<YYYYMMDD>` (announce, do not ask). Result: `state.complaintSpec.runName`.
40
+
41
+ ### Step 2 - Account picker
42
+
43
+ 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`.
44
+
45
+ ### Step 3 - Repo multi-select
46
+
47
+ 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.">
48
+
49
+ ### Step 3b - Layer tagging (single confirmation table)
50
+
51
+ 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).
52
+
53
+ ### Step 4 - Complaint input (multi-source)
54
+
55
+ 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.">
56
+
57
+ | Source | Ingestion |
58
+ |---|---|
59
+ | 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) |
60
+ | Pasted free text | `parse-complaints.sh --stdin` (splits blocks, pre-fills ids via the shared label set) |
61
+ | 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) |
62
+ | Confluence URL | `~/.claude/lib/fetch-confluence.sh <url>`; page body paragraphs/table rows become text blocks, piped through `parse-complaints.sh --stdin` |
63
+
64
+ Merge all outputs into one list, re-numbering ids `C-01..C-NN`. Result: `state.complaintSpec.input` + `state.complaintSpec.complaints[]`.
65
+
66
+ ### Step 5 - Id confirmation loop (Locked 2)
67
+
68
+ 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"`.
69
+
70
+ ## Phase 1
71
+
72
+ Environment defaults to `auto`: production first, the test instance (`hosts.graylogTest`) when production returns nothing or is unreachable. A customer complaint is normally a production event, but a tester-minted id only exists on test, and prod-only search reports "no logs" for both cases identically. When the intake itself says which environment a complaint came from, pin it with `--env prod` / `--env test` rather than letting the fallback decide.
73
+
74
+ Record per complaint: `graylog: {status: ok|degraded|skipped, environment, totalResults, degradeReason}` plus the top messages (timestamp, source, level, message excerpt) kept in working context for Phase 2/3. Failure handling:
75
+
76
+ - Exit 0 with `degraded: true` -> `status: degraded`, keep the reason, continue.
77
+ - 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).
78
+ - `skipGraylog: true` -> `status: skipped`.
79
+
80
+ **Always name the environment when citing log evidence.** `source.environment` in the fetcher payload says which instance answered; the same lines mean different things depending on whether a production complaint was corroborated by production logs or only by test ones. A complaint whose only evidence came from test is `insufficient-evidence` for a production claim, not `bff`.
81
+
82
+ ## Phase 2
83
+
84
+ 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/`):
85
+
86
+ ```bash
87
+ grep -rn --include='*.swift' --include='*.kt' --include='*.ts' --include='*.tsx' --include='*.js' --include='*.java' -E "<signal>" "$REPO_PATH"
88
+ ```
89
+
90
+ 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`.
91
+
92
+ ## Phase 3
93
+
94
+ Per complaint, in order:
95
+
96
+ | Condition | Verdict |
97
+ |---|---|
98
+ | 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) |
99
+ | 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) |
100
+ | No/degraded Graylog AND no direct repo signal | `insufficient-evidence` + open question row |
101
+
102
+ **Routing recommendation** (core only, Locked 5): `{suspectedService: <Graylog source>, endpoint, errorCode, evidenceExcerpt (EN, redacted), suggestedQueue: prefs.projects[<project>].routing.coreTeamLabel ?? null, confidence}`.
103
+
104
+ Verdict shape: `verdict: {category, layer, confidence: high|medium|low, rationale}`. Ambiguous client-vs-bff attribution lowers `confidence`, never invents evidence.
105
+
106
+ **Development handoff (client/bff only, Locked 13)**: for each `client`/`bff` verdict, derive from the `repoEvidence[]` rows:
107
+
108
+ - **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.
109
+ - **Dev prompt**: one fenced English block the user can paste into `/multi-agent` (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.
110
+
111
+ ## Phase 4.5
112
+
113
+ AskUserQuestion (multiSelect=true), `Local file` pre-selected (Locked 7):
114
+
115
+ ```
116
+ header: "Output"
117
+ question: <localized: "Where should the triage report be written?">
118
+ options:
119
+ - label: "Local file" (description: complaints/<run-name>.md in the primary repo's working tree)
120
+ - label: "Confluence page"
121
+ - label: "Jira"
122
+ ```
123
+
124
+ 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[]`.
125
+
126
+ ## Phase 5
127
+
128
+ `validate-complaint-doc.mjs` checks front-matter, required sections, verdict tokens per triage row, routing entry per core verdict, punctuation, and a redaction-leak scan.
129
+
130
+ | Target | Action |
131
+ |---|---|
132
+ | Local | `cp` the draft to `complaints/<run-name>.md` in the primary repo's working tree. **No commit** (Locked 12). |
133
+ | 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`. |
134
+ | 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). |
135
+
136
+ 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.">
137
+
138
+ ## Reusable refs
139
+
140
+ | Path | Reason |
141
+ |---|---|
142
+ | `~/.claude/lib/parse-complaints.sh` | Phase 0 Step 4 normalization + redaction (all formats + stdin) |
143
+ | `~/.claude/lib/context-link-extractor.sh` | Phase 0 Step 4 input classifier (jira / confluence / graylog id labels) |
144
+ | `~/.claude/lib/fetch-graylog.sh` | Phase 1 log evidence (`--trx` / `--conv`) |
145
+ | `~/.claude/lib/fetch-confluence.sh` | Phase 0 Step 4 Confluence-sourced complaints |
146
+ | `$HOME/.claude/multi-agent-refs/_account-picker.md`, `_repo-picker.md`, `picker-contract.md` | Phase 0 pickers |
147
+ | `$HOME/.claude/multi-agent-refs/keychain.md` | Phase 1 non-critical credential handling |
148
+ | `$HOME/.claude/multi-agent-refs/complaint-analysis-template.md` | Phase 4 report template (8 sections) |
149
+ | `ai-common-toolkit:humanizer` | Phase 4 tone pass |
150
+ | `ai-analyst-toolkit:signal-community` | Phase 1 corroboration, optional. Advisory only: a matching report outside the company shows the complaint is not one user's device, and lands in the risks section with its link, never as a root cause. |
151
+ | `$HOME/.claude/scripts/validate-complaint-doc.mjs` | Phase 5 pre-dispatch gate |
152
+ | `$HOME/.claude/multi-agent-refs/channels/confluence.md`, `channels/jira.md`, `~/.claude/lib/md2confluence-v3.py` | Phase 5 dispatch |
153
+ | `$HOME/.claude/schemas/complaint-analysis-spec.schema.json` | State contract |
154
+
155
+ ## Notes
156
+
157
+ - `prefs.projects[<project>].routing.coreTeamLabel` is optional; when unset, `suggestedQueue` renders as `-` and the routing entry still stands.
158
+ - If Confluence / Jira dispatch returns 401 / 403, surface the error and offer the Local fallback (the draft stays on disk).
159
+ - The `complaints/` directory is not gitignored; the user commits manually if desired.
@@ -17,6 +17,7 @@
17
17
  notVerified: [ { item, tag, reason } ] } } ] }
18
18
  ```
19
19
 
20
+ - Persist the tool result's `coverage` to `state.designCheck.coverage`. On `gate: "pass"`, report per-variant PASS/FAIL, the findings count and the report paths.
20
21
  - `walk` separates a checked screen from a viewed one. Field definitions live in `features/design-conformance.md`.
21
22
  - Pass ids, not counts: the engine then names each unaccounted target in the report instead of printing an anonymous tally.
22
23
  - `compareSize` and `liveSize` come straight from the `design_visual_compare` result.
@@ -43,7 +43,7 @@ Intersect `$ARGUMENTS` (grammar in SKILL.md) with `inventory.targets`. Persist `
43
43
 
44
44
  ## Step 7 - `--resume`
45
45
 
46
- Read the most recent `~/DesignChecks/{repo}__{module}/*/run-state.json`; the scope becomes that run's targets minus its `covered` and minus its `skipped` entries. Skips carry a reason and are honoured, so a resume covers the genuinely unaudited remainder.
46
+ Read the most recent `~/DesignChecks/{repo}__{module}/*/run-state.json`; the scope becomes that run's targets minus its `covered` and minus its `skipped` entries. Skips carry a reason and are honoured, so a resume covers the genuinely unaudited remainder. No previous run: tell the user and fall back to whole-module scope after confirmation.
47
47
 
48
48
  ## Step 8 - report dir
49
49
 
@@ -0,0 +1,64 @@
1
+ # design-check - scope grammar, requirements, the target ledger and notes
2
+
3
+ Detail behind the command's scope argument, its requirements, the Phase 3 ledger and the Phase 4 gate. The binding rules (halts, confirmation, the coverage gate) stay in the command's SKILL.md; this file carries the grammar and the reasoning.
4
+
5
+ ## Scope grammar (`$ARGUMENTS`)
6
+
7
+ The scope decides which inventory targets (Phase 0 step 5) the run must audit. It never changes how thoroughly each target is audited.
8
+
9
+ | Form | Example | Scope |
10
+ |------|---------|-------|
11
+ | empty / `module` | (no argument) | Every target in the module's inventory |
12
+ | screen name | `order-status` | Every target whose `screen` matches (case/separator-insensitive) |
13
+ | `screen@variant` | `order-status@expired` | One target |
14
+ | target id | `scenario-case:orderstatusoutcome-expired` | One target, exactly |
15
+ | Figma URL(s) | `https://figma.com/design/...?node-id=1-2` | Only the frames those URLs name |
16
+ | `--resume` | `--resume` | The unaudited remainder of the most recent run for this repo + module |
17
+ | combinations | `seat-map summary@semi-success` | Union of the above, space- or newline-separated |
18
+
19
+ A scope that matches no inventory target is an error, not an empty run: print the closest inventory ids and halt.
20
+
21
+ **Whole-module is the default, and it is meant to finish.** The inventory prices each target (`cost: relaunch | in-app`) and batches them into a run `plan`, so a 50-target module is typically about a dozen relaunches rather than fifty: a full audit is one sitting, not a project. Scope exists for resuming an interrupted run and for re-checking one screen after a fix, not for trimming an audit down to what feels affordable. The coverage gate applies to the scoped target set, so a deliberate scoped run is never penalised for out-of-scope targets, and `--resume` closes the remainder.
22
+
23
+ ## Requirements
24
+
25
+ - **iOS**: Xcode + an available Simulator. **Android**: Android SDK + a running emulator / device.
26
+ - **MCP**: the `multi-agent-toolkit` MCP server (>= 2.8.0, for `design_scenario_inventory`, the `design_report` coverage gate, and `design_visual_compare` region alignment). The Figma MCP (`mcp__claude_ai_Figma__*`) must be authenticated; the user supplies the Figma URL.
27
+ - The selected module must be auditable: a **mock mode** (preferred, it can toggle variants) or a **snapshot capture** of the screen's view model. Phase 0 decides which. Neither means the command halts.
28
+
29
+ ## Phase tracker detail
30
+
31
+ Register the five tiles (`0:Init & Gate`, `1:Build & Launch`, `2:Figma`, `3:Drive & Compare`, `4:Report`) with `phase-tracker.sh init` + `add` in strict order before any update. On Claude Code also drive the native TaskList widget: fire all `TaskCreate` calls in phase order (0 to 4) first, persist each `taskId` via `phase-tracker.sh meta <N> tasklist_id`, then flip status with `TaskUpdate` + `phase-tracker.sh update` at every boundary. On Copilot CLI or a plain shell there is no TaskList widget: call `phase-tracker.sh render` after every state change and never call TaskCreate. Full spec: `tracker-contract.md`.
32
+
33
+ ## Why Phase 3 iterates the inventory
34
+
35
+ Phase 3 iterates `state.designCheck.scope.targetIds`, a finite list decided in Phase 0, and ends when every id is resolved, not when the UI stops offering new taps. Tap-walking alone cannot reach a state that needs a different launch argument, scenario case, or typed scenario code, which is how a module's error and edge states go missing.
36
+
37
+ Driving `inventory.plan` batch by batch is what makes full coverage affordable: each batch is one launch, the relaunch target opens a screen, and every in-app target for that screen is flipped while the app sits there, with no relaunch between them.
38
+
39
+ `features/design-conformance.md` owns the per-component catalog, the scope tags, and the three rules that decide whether Phase 3 produced a result or an impression: enumerate first (a blank cell is a fail-to-verify), measure never the token, and converge per component (two consecutive clean attempts, cap 8). The screen is done when every component converged, not when the walk reached the bottom. Every skipped `[DYNAMIC]` / `[CAPTURE+]` item is listed in the report rather than omitted.
40
+
41
+ ## The ledger (Phase 3.5)
42
+
43
+ Every scoped target id ends in exactly one bucket:
44
+
45
+ - **covered**: captured AND compared.
46
+ - **skipped**: with a concrete reason recorded in 3.1 or 3.3. A screen the user declined to map in the 3.3 batch-ask is a skip with reason "no Figma frame supplied". "Requires a scenario / prefix / launch-arg" is not a reason: it describes the work, which is Phase 3's job.
47
+
48
+ `run-state.json` in the Phase 0 report dir holds `{ targetIds, covered, skipped }` so `--resume` can pick up the remainder. An id in neither bucket is a bug in Phase 3, and Phase 4's gate fails the run for it.
49
+
50
+ The `covered.length + skipped.length` versus `scope.targetIds.length` check exists because reaching Phase 4 with a mismatch is the worst of both outcomes: the work is undone AND the run is marked incomplete.
51
+
52
+ ## The report's `walk` block and the gate
53
+
54
+ `walk` (`components`, `converged`, `didNotConverge`, `notVerified`) separates a checked screen from a viewed one: an empty `notVerified` on a run that never captured a dark or mirrored pass is a false clean, so list the skip. Pass ids, not counts.
55
+
56
+ The coverage gate is a last line of defence, not the plan. If it fires, Phase 3 left work undone: drive the missing targets, and only then report. Do not present an incomplete audit as a finished one, and do not bury the miss in a footnote.
57
+
58
+ ## Notes
59
+
60
+ - **Feasibility is real**: a project with no launchable app or no runtime switch cannot be audited. Report that honestly and stop; never substitute a fabricated or partial comparison.
61
+ - **The inventory is the contract**: Phase 0 step 5 decides what "done" means. An audit that visits the linear happy path and lists the rest as "not visited" is the failure mode this command exists to prevent; the gate makes it visible instead of polite.
62
+ - **Chunk with scope, not with silence**: a 50-target module is a legitimate multi-run job. Scope it, finish each run's gate cleanly, and let `--resume` carry the remainder.
63
+ - **"Pixel perfect" is perceptual + geometric**: scale normalized, chrome cropped; findings carry px / pt / hex deltas and a tolerance.
64
+ - The `design_*` engine is project-agnostic; project specifics (mock keys, launch args / targets, node overrides, status-bar crop, coverage floor, Confluence toggle) come from `design-check-config.json` / prefs, never hardcoded.
@@ -0,0 +1,53 @@
1
+ # Analysis command notes: scope, profiles, template, outputs and tracker detail
2
+
3
+ Read by `/multi-agent:analysis` before Phase 0. The command file keeps the step skeleton, the side-effect contract, the gates and the hard rules; this file holds the scope, the profile table, the template rules, output naming and source-handling notes. Every question asked follows `$HOME/.claude/multi-agent-refs/picker-contract.md`. The engine contracts themselves live in the `analysis/` refs the command names.
4
+
5
+ ## Scope
6
+
7
+ 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).
8
+
9
+ 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.
10
+
11
+ ## Profiles
12
+
13
+ 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.
14
+
15
+ | Profile | Template | Shape |
16
+ |---|---|---|
17
+ | `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). |
18
+ | `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). |
19
+
20
+ 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.
21
+
22
+ **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.
23
+
24
+ ## Template
25
+
26
+ 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.
27
+
28
+ 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`.
29
+
30
+ 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).
31
+
32
+ ## Phase summaries
33
+
34
+ - **Phase 0**: 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.
35
+ - **Phases 1 to 1c**: fetch every declared source in parallel, collect the 13-bucket repo evidence, build the Code Connect index, and extract the seven convention groups.
36
+ - **Phases 3 to 5**: render one markdown file per platform, run the humanizer pass, gate on the validator and the references coverage gate, ask for the output destination, dispatch to Local / Confluence / Jira, report and stop.
37
+ - **Resume**: `analysis/resume.md` holds the `state.analysisSpec.phase` enumeration and the re-entry rule per paused phase.
38
+
39
+ ## Notes
40
+
41
+ - The minimum possible output (per per-platform file) is `1. Scope` + `7. Development Plan` (both always-present).
42
+ - 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).
43
+ - The `analysis/` directory is not in `.gitignore`; the user can `git add analysis/` manually. No auto-commit.
44
+ - **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).
45
+ - **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.
46
+ - **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).
47
+ - **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[]`.
48
+ - **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.
49
+ - **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.
50
+ - **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).
51
+ - **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).
52
+ - **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.
53
+