@mmerterden/multi-agent-pipeline 20.35.0 → 20.37.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 (207) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +6 -5
  3. package/README.tr.md +6 -5
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +4 -4
  7. package/install/catalog-history.json +1 -1
  8. package/manifest.json +210 -136
  9. package/package.json +5 -1
  10. package/pipeline/commands/multi-agent/SKILL.md +33 -154
  11. package/pipeline/commands/multi-agent/analysis/SKILL.md +14 -68
  12. package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +5 -8
  13. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +38 -109
  14. package/pipeline/commands/multi-agent/channels/SKILL.md +38 -167
  15. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +37 -144
  16. package/pipeline/commands/multi-agent/design-check/SKILL.md +27 -131
  17. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +22 -48
  18. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +37 -180
  19. package/pipeline/commands/multi-agent/jira/SKILL.md +16 -46
  20. package/pipeline/commands/multi-agent/office-pair/SKILL.md +66 -0
  21. package/pipeline/commands/multi-agent/office-status/SKILL.md +1 -1
  22. package/pipeline/commands/multi-agent/refactor/SKILL.md +23 -184
  23. package/pipeline/commands/multi-agent/resume/SKILL.md +30 -136
  24. package/pipeline/commands/multi-agent/review/SKILL.md +24 -199
  25. package/pipeline/commands/multi-agent/setup/SKILL.md +25 -181
  26. package/pipeline/commands/multi-agent/stack/SKILL.md +9 -53
  27. package/pipeline/commands/multi-agent/status/SKILL.md +13 -2
  28. package/pipeline/commands/multi-agent/store-ready/SKILL.md +27 -226
  29. package/pipeline/commands/multi-agent/sync/SKILL.md +38 -167
  30. package/pipeline/commands/multi-agent/test-gen/SKILL.md +2 -4
  31. package/pipeline/commands/multi-agent/update/SKILL.md +18 -60
  32. package/pipeline/contract/CHANGELOG.md +9 -0
  33. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  34. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  35. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  36. package/pipeline/contract/fixtures/runs-awaiting-question.json +1 -1
  37. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  38. package/pipeline/contract/fixtures/runs-failed.json +1 -1
  39. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +1 -1
  40. package/pipeline/contract/fixtures/runs-pr-opened.json +1 -1
  41. package/pipeline/contract/fixtures/runs-running.json +1 -1
  42. package/pipeline/contract/manifest.json +5 -5
  43. package/pipeline/contract/types/index.d.ts +3 -2
  44. package/pipeline/lib/qr-code.mjs +26 -0
  45. package/pipeline/multi-agent-refs/autopilot-on/details.md +148 -0
  46. package/pipeline/multi-agent-refs/channels/generator.md +14 -0
  47. package/pipeline/multi-agent-refs/channels/preview.md +13 -0
  48. package/pipeline/multi-agent-refs/channels/reference.md +46 -0
  49. package/pipeline/multi-agent-refs/complaint-analysis/phases.md +159 -0
  50. package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -4
  51. package/pipeline/multi-agent-refs/design-check/export.md +1 -0
  52. package/pipeline/multi-agent-refs/design-check/init-inventory.md +1 -1
  53. package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +64 -0
  54. package/pipeline/multi-agent-refs/features/analysis-command-notes.md +53 -0
  55. package/pipeline/multi-agent-refs/garbage-collect/phases.md +60 -0
  56. package/pipeline/multi-agent-refs/help/en.md +1 -0
  57. package/pipeline/multi-agent-refs/help/tr.md +1 -0
  58. package/pipeline/multi-agent-refs/ios-coding-standard/plan.md +71 -0
  59. package/pipeline/multi-agent-refs/ios-coding-standard/resolve-and-scan.md +135 -0
  60. package/pipeline/multi-agent-refs/jira/picker-detail.md +71 -0
  61. package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +88 -0
  62. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +96 -1
  63. package/pipeline/multi-agent-refs/refactor/sweep.md +190 -0
  64. package/pipeline/multi-agent-refs/resume/details.md +115 -2
  65. package/pipeline/multi-agent-refs/review/inputs.md +33 -1
  66. package/pipeline/multi-agent-refs/review/module-guides.md +9 -1
  67. package/pipeline/multi-agent-refs/review/panel.md +75 -0
  68. package/pipeline/multi-agent-refs/review/valven.md +5 -1
  69. package/pipeline/multi-agent-refs/setup/hooks-and-plugins.md +4 -0
  70. package/pipeline/multi-agent-refs/setup/token-save-flow.md +13 -0
  71. package/pipeline/multi-agent-refs/stack/background.md +72 -0
  72. package/pipeline/multi-agent-refs/store-ready/gates.md +139 -0
  73. package/pipeline/multi-agent-refs/store-ready/report.md +40 -2
  74. package/pipeline/multi-agent-refs/sync/office.md +10 -0
  75. package/pipeline/multi-agent-refs/sync/overview.md +61 -0
  76. package/pipeline/multi-agent-refs/sync/repo.md +91 -0
  77. package/pipeline/multi-agent-refs/update/details.md +83 -0
  78. package/pipeline/schemas/runs-index.schema.json +2 -1
  79. package/pipeline/scripts/contract-server.mjs +1 -1
  80. package/pipeline/scripts/office-pair.mjs +40 -9
  81. package/pipeline/scripts/runs-index.mjs +34 -7
  82. package/pipeline/scripts/status-overview.mjs +401 -0
  83. package/pipeline/skills/.skill-manifest.json +69 -65
  84. package/pipeline/skills/.skills-index.json +15 -4
  85. package/pipeline/skills/shared/README.md +4 -3
  86. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +8 -71
  87. package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +67 -0
  88. package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +8 -0
  89. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +11 -73
  90. package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +69 -0
  91. package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +7 -0
  92. package/pipeline/skills/shared/core/google-play-compliance/references/version-history.md +5 -0
  93. package/pipeline/skills/shared/core/multi-agent/SKILL.md +39 -262
  94. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +35 -73
  95. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +37 -337
  96. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +27 -122
  97. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +8 -340
  98. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +37 -180
  99. package/pipeline/skills/shared/core/multi-agent-office-pair/SKILL.md +19 -0
  100. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +1 -1
  101. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +23 -184
  102. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +14 -82
  103. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +25 -277
  104. package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +13 -2
  105. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +75 -219
  106. package/pipeline/skills/shared/external/alarmkit/SKILL.md +11 -162
  107. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-code.md +257 -0
  108. package/pipeline/skills/shared/external/android-architecture/SKILL.md +7 -58
  109. package/pipeline/skills/shared/external/android-architecture/references/code-examples.md +68 -0
  110. package/pipeline/skills/shared/external/app-intents/SKILL.md +3 -45
  111. package/pipeline/skills/shared/external/app-intents/references/code-examples.md +54 -0
  112. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +5 -81
  113. package/pipeline/skills/shared/external/app-store-optimization/references/engagement-and-localization.md +96 -0
  114. package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -112
  115. package/pipeline/skills/shared/external/app-store-review/references/monetization-and-submission.md +138 -0
  116. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +10 -117
  117. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models-code.md +186 -0
  118. package/pipeline/skills/shared/external/authentication/SKILL.md +3 -50
  119. package/pipeline/skills/shared/external/authentication/references/code-examples.md +59 -0
  120. package/pipeline/skills/shared/external/callkit-voip/SKILL.md +3 -84
  121. package/pipeline/skills/shared/external/callkit-voip/references/code-examples.md +93 -0
  122. package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +7 -263
  123. package/pipeline/skills/shared/external/ci-cd-pipelines/references/pipeline-examples.md +281 -0
  124. package/pipeline/skills/shared/external/clean-code/SKILL.md +8 -41
  125. package/pipeline/skills/shared/external/clean-code/references/code-examples.md +56 -0
  126. package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +8 -146
  127. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-code.md +214 -0
  128. package/pipeline/skills/shared/external/compose-components/SKILL.md +6 -80
  129. package/pipeline/skills/shared/external/compose-components/references/code-examples.md +89 -0
  130. package/pipeline/skills/shared/external/compose-navigation/SKILL.md +5 -64
  131. package/pipeline/skills/shared/external/compose-navigation/references/code-examples.md +70 -0
  132. package/pipeline/skills/shared/external/core-data/SKILL.md +9 -157
  133. package/pipeline/skills/shared/external/core-data/references/core-data-code.md +221 -0
  134. package/pipeline/skills/shared/external/core-nfc/SKILL.md +3 -89
  135. package/pipeline/skills/shared/external/core-nfc/references/code-examples.md +98 -0
  136. package/pipeline/skills/shared/external/coreml/SKILL.md +17 -133
  137. package/pipeline/skills/shared/external/coreml/references/coreml-code.md +208 -0
  138. package/pipeline/skills/shared/external/css-modern/SKILL.md +8 -131
  139. package/pipeline/skills/shared/external/css-modern/references/code-examples.md +142 -0
  140. package/pipeline/skills/shared/external/database-patterns/SKILL.md +6 -103
  141. package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +112 -0
  142. package/pipeline/skills/shared/external/html-semantic/SKILL.md +7 -48
  143. package/pipeline/skills/shared/external/html-semantic/references/code-examples.md +54 -0
  144. package/pipeline/skills/shared/external/humanizer/SKILL.md +6 -19
  145. package/pipeline/skills/shared/external/humanizer/references/voice.md +24 -0
  146. package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +13 -170
  147. package/pipeline/skills/shared/external/ios-accessibility/references/assistive-tech-review.md +224 -0
  148. package/pipeline/skills/shared/external/ios-localization/SKILL.md +2 -24
  149. package/pipeline/skills/shared/external/ios-localization/references/code-examples.md +30 -0
  150. package/pipeline/skills/shared/external/ios-networking/SKILL.md +3 -58
  151. package/pipeline/skills/shared/external/ios-networking/references/code-examples.md +67 -0
  152. package/pipeline/skills/shared/external/ios-security/SKILL.md +4 -64
  153. package/pipeline/skills/shared/external/ios-security/references/code-examples.md +74 -0
  154. package/pipeline/skills/shared/external/live-activities/SKILL.md +4 -90
  155. package/pipeline/skills/shared/external/live-activities/references/code-examples.md +108 -0
  156. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +9 -23
  157. package/pipeline/skills/shared/external/localization-reuse-map/references/project-settings.md +22 -0
  158. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +5 -95
  159. package/pipeline/skills/shared/external/mapkit-location/references/code-examples.md +117 -0
  160. package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +7 -106
  161. package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +124 -0
  162. package/pipeline/skills/shared/external/permissionkit/SKILL.md +2 -31
  163. package/pipeline/skills/shared/external/permissionkit/references/code-examples.md +37 -0
  164. package/pipeline/skills/shared/external/play-store-review/SKILL.md +6 -74
  165. package/pipeline/skills/shared/external/play-store-review/references/signing-and-policies.md +83 -0
  166. package/pipeline/skills/shared/external/push-notifications/SKILL.md +8 -125
  167. package/pipeline/skills/shared/external/push-notifications/references/notification-code.md +176 -0
  168. package/pipeline/skills/shared/external/python-patterns/SKILL.md +7 -158
  169. package/pipeline/skills/shared/external/python-patterns/references/python-examples.md +176 -0
  170. package/pipeline/skills/shared/external/rest-api-design/SKILL.md +7 -157
  171. package/pipeline/skills/shared/external/rest-api-design/references/api-examples.md +175 -0
  172. package/pipeline/skills/shared/external/swift-architecture/SKILL.md +11 -230
  173. package/pipeline/skills/shared/external/swift-architecture/references/pattern-examples.md +295 -0
  174. package/pipeline/skills/shared/external/swift-codable/SKILL.md +17 -149
  175. package/pipeline/skills/shared/external/swift-codable/references/codable-recipes.md +207 -0
  176. package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +12 -99
  177. package/pipeline/skills/shared/external/swift-concurrency/references/code-examples.md +100 -0
  178. package/pipeline/skills/shared/external/swift-concurrency/references/swift-6-2-additions.md +18 -0
  179. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +9 -78
  180. package/pipeline/skills/shared/external/swift-formatstyle/references/formatstyle-examples.md +113 -0
  181. package/pipeline/skills/shared/external/swift-language/SKILL.md +3 -56
  182. package/pipeline/skills/shared/external/swift-language/references/code-examples.md +65 -0
  183. package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +1 -0
  184. package/pipeline/skills/shared/external/swiftdata/SKILL.md +6 -122
  185. package/pipeline/skills/shared/external/swiftdata/references/code-examples.md +140 -0
  186. package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +12 -139
  187. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/interop-code.md +198 -0
  188. package/pipeline/skills/shared/external/tailwind-css/SKILL.md +9 -81
  189. package/pipeline/skills/shared/external/tailwind-css/references/code-examples.md +91 -0
  190. package/pipeline/skills/shared/external/testing-backend/SKILL.md +7 -207
  191. package/pipeline/skills/shared/external/testing-backend/references/testing-examples.md +225 -0
  192. package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +8 -89
  193. package/pipeline/skills/shared/external/typescript-patterns/references/code-examples.md +100 -0
  194. package/pipeline/skills/shared/external/vision-framework/SKILL.md +2 -20
  195. package/pipeline/skills/shared/external/vision-framework/references/code-examples.md +26 -0
  196. package/pipeline/skills/shared/external/vue-composition/SKILL.md +7 -169
  197. package/pipeline/skills/shared/external/vue-composition/references/vue-examples.md +187 -0
  198. package/pipeline/skills/shared/external/web-accessibility/SKILL.md +7 -174
  199. package/pipeline/skills/shared/external/web-accessibility/references/a11y-examples.md +192 -0
  200. package/pipeline/skills/shared/external/web-performance/SKILL.md +8 -66
  201. package/pipeline/skills/shared/external/web-performance/references/code-examples.md +77 -0
  202. package/pipeline/skills/shared/external/web-testing/SKILL.md +11 -186
  203. package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +213 -0
  204. package/pipeline/skills/skills-index.md +2 -1
  205. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/format-and-output.md +0 -0
  206. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/publish-and-snapshot.md +0 -0
  207. /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/sources-and-recipes.md +0 -0
@@ -0,0 +1,190 @@
1
+ # Refactor sweep: research, scan, analysis, scoring and plan detail
2
+
3
+ <!-- toc -->
4
+ - [Plan bands](#plan-bands)
5
+ - [Step 0: best-practices research](#step-0-best-practices-research)
6
+ - [Step 0c: why the toolkit is in scope](#step-0c-why-the-toolkit-is-in-scope)
7
+ - [Step 0e: why a backlog band](#step-0e-why-a-backlog-band)
8
+ - [Step 1: scan checklist](#step-1-scan-checklist)
9
+ - [Step 2a: the 10 categories](#step-2a-the-10-categories)
10
+ - [Step 2b: bug hunt](#step-2b-bug-hunt)
11
+ - [Step 3: score table](#step-3-score-table)
12
+ - [Step 4: plan table](#step-4-plan-table)
13
+ - [Step 6: per-item loop](#step-6-per-item-loop)
14
+ - [Step 7: verify commands](#step-7-verify-commands)
15
+ - [Focus filter](#focus-filter)
16
+ <!-- /toc -->
17
+
18
+ Reference for `/multi-agent:refactor`. The command file carries the step skeleton and its hard rules; this file carries the procedures, output tables and catalogs each step points at.
19
+
20
+ ## Plan bands
21
+
22
+ All bands feed the single Step 4 table:
23
+
24
+ - **A - Best-practice**: the best field approaches, adapted so they actually fit this repo.
25
+ - **B - Bug**: real defects found in the code (correctness, security, data-loss, crashes).
26
+ - **C - Improvement**: quality/perf/DX gaps surfaced by the 10-category analysis.
27
+ - **D - Drift**: upstream updates to skills we derived from an external source.
28
+ - **E - Dev-toolkit**: current-practice gaps in the companion multi-agent-toolkit MCP server (the pipeline's device and browser hands), applied in that repo.
29
+ - **F - Run-errors**: recurring real failures the pipeline actually hit across past runs, read from the local run-error ledger. These are lived evidence, not speculation - a failure that recurs across users or tasks is a prioritized improvement area.
30
+ - **G - Backlog**: open observations recorded mid-task (Step 0e).
31
+
32
+ ## Step 0: best-practices research
33
+
34
+ The goal is the best *approaches*, reshaped so they are applicable to THIS project's stack, size, and constraints.
35
+
36
+ 1. **Identify the domain** of the current project (read README + package/build manifests): what kind of project is it (CLI, SDK, app, pipeline, library), what stack, who uses it.
37
+ 2. **Research the best-in-class** for that exact domain. When `ai-analyst-toolkit` is enabled, run the first three bullets through its skills (`evidence-github`, `evidence-registry`, `signal-community`) rather than ad-hoc searching: they carry the query forms and the citation format, and they keep the evidence / signal line straight - a GitHub PR is a fact, a forum thread is one person's experience. Not enabled is a recorded no-op and the manual searches below still apply.
38
+ - **GitHub**: search the domain terms + `stars:>50`; read the top repos' READMEs, architecture docs, CI configs, test layout.
39
+ - **X / Twitter**: search the domain terms + "best practices" / "we switched to" / "lesson learned"; capture what practitioners and tool authors actually recommend right now (WebFetch/WebSearch on `x.com` / `twitter.com` threads).
40
+ - **Reddit**: relevant subreddits for real-world pain points and adopted patterns.
41
+ - **Web**: "<domain> best practices <current-year>", official style guides, and the platform's own guidance.
42
+ 3. **For each candidate approach, record**:
43
+ - what it is, who does it well (source link)
44
+ - the concrete benefit
45
+ - **adaptation**: exactly how it would look in OUR repo (which file/dir/script), and what has to change for it to fit - not a generic "add tests" but "add a flow-assertion helper in `test/helpers/`"
46
+ - effort (Low/Med/High) and impact (Low/Med/High/Critical)
47
+ 4. **Discard** approaches that do not fit our stack, our scale, or our constraints - and say WHY (so the user sees the filter working, not just the survivors).
48
+
49
+ Output (plan band A):
50
+
51
+ ```
52
+ | Source | Approach | Adaptation to our repo | Effort | Impact | In plan? |
53
+ |--------|----------|------------------------|--------|--------|----------|
54
+ | <repo> | <what> | <concrete change here> | Low | High | Yes (P1) |
55
+ | <repo> | <what> | does not fit: <reason> | - | - | No |
56
+ ```
57
+
58
+ Roll the high-impact + low/med-effort survivors into the Step 4 plan as band-A items.
59
+
60
+ ## Step 0c: why the toolkit is in scope
61
+
62
+ The pipeline's hands on devices and browsers are MCP tools served by a companion repo (`multi-agent-toolkit-mcp`): Phase 3 test, `manual-test`, `design-check` and `apple-archive-compliance` all call them, and several pipeline skills declare a minimum toolkit version (see `cross-cli-contract.md`). That repo therefore has to track the MCP field, not just its own README. The procedure is `refactor/toolkit-research.md`.
63
+
64
+ ## Step 0e: why a backlog band
65
+
66
+ Every other band derives its findings from scratch, which is right for a sweep and has one consequence: a friction noticed mid-task is gone by the next run unless it was fixed within the hour. Most are not, because stopping mid-task to fix them is the wrong call. So they are written down when noticed and decided here. Sibling surfaces matter because a command is authored in `commands/`, mirrored into `skills/shared/core/`, and installed again into three host trees, so a fix applied to one copy drifts from the rest with every gate still green.
67
+
68
+ ## Step 1: scan checklist
69
+
70
+ ```
71
+ - file count, LOC (cloc or wc -l)
72
+ - package.json / Package.swift / build.gradle analysis
73
+ - dependency count (runtime vs dev)
74
+ - Is there a CI/CD pipeline? (.github/workflows/, fastlane/, Makefile)
75
+ - Is there test infrastructure? How many tests? Coverage?
76
+ - Is a linter/formatter config in place?
77
+ - Do README, LICENSE, SECURITY.md, CHANGELOG.md exist?
78
+ - Git state: branch count, last commit date, tags
79
+ ```
80
+
81
+ ## Step 2a: the 10 categories
82
+
83
+ | # | Category | What to check |
84
+ |---|----------|---------------|
85
+ | 1 | **Architecture** | Layer separation, modularity, SOLID, dependency direction |
86
+ | 2 | **Code Quality** | Naming, magic numbers, dead code, complexity, DRY |
87
+ | 3 | **Security** | Hardcoded secrets, input validation, Keychain, ATS, ATT |
88
+ | 4 | **Tests** | Coverage, test pyramid, edge cases, mock/stub quality |
89
+ | 5 | **CI/CD** | Build matrix, lint job, release automation, artifact caching |
90
+ | 6 | **Docs** | README quality, JSDoc / Swift docs, API docs, CHANGELOG |
91
+ | 7 | **Performance** | Bundle size, lazy loading, memory leaks, unnecessary re-renders |
92
+ | 8 | **Accessibility** | a11y labels, tap targets, VoiceOver, Dynamic Type |
93
+ | 9 | **Dependency Management** | Outdated deps, vulnerability scan, lockfile, version pinning |
94
+ | 10 | **DevEx** | Onboarding time, script ergonomics, error messages, debug tooling |
95
+
96
+ ## Step 2b: bug hunt
97
+
98
+ Dispatch focused review agents (Agent tool, `code-reviewer` persona where available) over the highest-risk surfaces: recently changed files, error/edge-path handling, concurrency, external input parsing, resource cleanup, off-by-one boundaries. For each candidate defect, record **file:line**, the concrete failure scenario (inputs/state -> wrong output/crash), and severity.
99
+
100
+ Output (plan band B) - every confirmed defect becomes a P0/P1 item:
101
+
102
+ ```
103
+ | # | Severity | File:line | Defect | Failure scenario |
104
+ |---|----------|-----------|--------|------------------|
105
+ | 1 | Blocking | src/x.ts:42 | unchecked nil deref | empty response -> crash |
106
+ ```
107
+
108
+ ## Step 3: score table
109
+
110
+ ```
111
+ +---------------------+-------+
112
+ | Category | Score |
113
+ +---------------------+-------+
114
+ | Architecture | 9/10 |
115
+ | Code Quality | 8/10 |
116
+ | Security | 9/10 |
117
+ | Tests | 7/10 |
118
+ | CI/CD | 8/10 |
119
+ | Docs | 7/10 |
120
+ | Performance | 9/10 |
121
+ | Accessibility | 6/10 |
122
+ | Dependency Mgmt | 8/10 |
123
+ | DevEx | 9/10 |
124
+ +---------------------+-------+
125
+ | TOTAL | 80/100|
126
+ +---------------------+-------+
127
+ ```
128
+
129
+ ## Step 4: plan table
130
+
131
+ ```
132
+ | # | Priority | Band | Category | Item | Impact |
133
+ |---|----------|------|----------|------|--------|
134
+ | 1 | P0 | B | Security | Remove hardcoded API key (src/x:12) | Critical |
135
+ | 2 | P0 | B | Tests | Fix nil-deref on empty response (src/y:42) | High |
136
+ | 3 | P1 | A | CI/CD | Adopt matrix build (adapt: .github/workflows/ci.yml) | Medium |
137
+ | 4 | P1 | D | Skills | Port upstream <plugin> 0.3.0 fixes into <localPath> | Medium |
138
+ | 5 | P1 | E | Toolkit | Add read-only annotations to the multi-agent-toolkit device tools | Medium |
139
+ | 6 | P2 | C | DevEx | Rename npm scripts for consistency | Low |
140
+ ```
141
+
142
+ Priority levels:
143
+
144
+ - **P0**: bugs, security holes, broken functionality - must fix
145
+ - **P1**: clear quality improvement or high-value adopted best-practice / drift port - should be done
146
+ - **P2**: nice-to-have - if time allows
147
+
148
+ ## Step 6: per-item loop
149
+
150
+ 1. For each item:
151
+ - apply the change (for band D, port the upstream diff into `localPath`, then bump that entry's `derivedFromVersion` in preferences)
152
+ - band-E items are applied inside the toolkit repo, never mirrored here: edit there, re-run its gates (`node --check`, the `tools/list` handshake, advertised tool count matching reality), then commit there with that repo's own convention. Publishing is `/multi-agent:sync` Step 3d - do not publish from this step.
153
+ - run the relevant tests
154
+ - on success, move to the next
155
+ - on failure, roll back and notify the user
156
+ 2. After all changes are done: run the full lint + test suite; on success, commit.
157
+
158
+ ## Step 7: verify commands
159
+
160
+ ```bash
161
+ # Lint
162
+ npm run lint 2>/dev/null || swift build 2>/dev/null
163
+
164
+ # Test
165
+ npm test 2>/dev/null || swift test 2>/dev/null || xcodebuild test 2>/dev/null
166
+
167
+ # Result
168
+ echo "Lint: PASS/FAIL"
169
+ echo "Test: PASS/FAIL (X/Y passed)"
170
+ ```
171
+
172
+ If any band-E item was applied, verify the toolkit repo too - syntax check every file it loads, handshake the server and confirm `tools/list` still answers, and confirm the advertised tool counts (README header, `package.json` description) match the count the server reports.
173
+
174
+ ## Focus filter
175
+
176
+ | Input | Focus |
177
+ |-------|-------|
178
+ | `backlog` | Backlog band only (band G, Step 0e) |
179
+ | `bugs` | Bug hunt only (band B) |
180
+ | `best-practices` | Field research + adapted plan only (band A) |
181
+ | `drift` | Upstream derived-skill drift only (band D) |
182
+ | `multi-agent-toolkit` | Companion MCP toolkit research + audit only (band E) |
183
+ | `run-errors` | Run-error ledger only (band F) |
184
+ | `security` | Security analysis only |
185
+ | `tests` | Test coverage and quality only |
186
+ | `performance` | Performance optimisation only |
187
+ | `docs` | Docs only |
188
+ | `ci` | CI/CD pipeline only |
189
+ | `deps` | Dependency updates only |
190
+ | (empty) | Everything (default) |
@@ -1,6 +1,20 @@
1
- # Resume - Single-candidate escape, answer contract, tail phases, tracker continuation
1
+ # Resume - usage, source rows, re-entry, answer contract, tail phases, tracker detail
2
2
 
3
- > Loaded by `resume/SKILL.md`. Read "Single-candidate escape" before Step 1, "Answering a parked question" before Step 5 when `--answer` is given or `waitingFor` is `question`, "Tail phases" before Step 7, and "Continuation path" when a tracker state already exists. The SKILL keeps the routing, the gates and the hard rules. Every picker here follows `$HOME/.claude/multi-agent-refs/picker-contract.md`.
3
+ <!-- toc -->
4
+ - [Single-candidate escape](#single-candidate-escape)
5
+ - [Answering a parked question](#answering-a-parked-question)
6
+ - [Tail phases](#tail-phases)
7
+ - [Continuation path](#continuation-path)
8
+ - [Usage](#usage)
9
+ - [Source rows](#source-rows)
10
+ - [Tracked-run notes](#tracked-run-notes)
11
+ - [Re-entry by waitingFor](#re-entry-by-waitingfor)
12
+ - [Untracked context](#untracked-context)
13
+ - [Tail phase map](#tail-phase-map)
14
+ - [Tracker block](#tracker-block)
15
+ <!-- /toc -->
16
+
17
+ > Loaded by `resume/SKILL.md`. "Usage" holds the invocation examples, when not to use the command and the modes. Read "Single-candidate escape" and "Source rows" before Step 1, "Tracked-run notes" with Steps 2-3, "Re-entry by waitingFor" before Step 5, "Answering a parked question" before Step 5 when `--answer` is given or `waitingFor` is `question`, "Untracked context" with Step 6, "Tail phases", "Tail phase map" and "Tracker block" before Step 7, and "Continuation path" when a tracker state already exists. The SKILL keeps the routing, the gates and the hard rules. Every picker here follows `$HOME/.claude/multi-agent-refs/picker-contract.md`.
4
18
 
5
19
  ## Single-candidate escape
6
20
 
@@ -33,3 +47,102 @@ It accepts only one of `options[].id` (comma-separated ids for a multi-select),
33
47
  ## Continuation path
34
48
 
35
49
  **Continuation path (prior state existed):** (1) if Phase 3 was left `in_progress` with `Now: awaiting local test (user)`, mark it `update 3 completed` + `meta 3 Result "local test done (user)"` before this run's own work (it re-opens Phase 3 with `update 3 in_progress` when the Verify gate runs; elapsed keeps the original `started_at`, which is expected); (2) print ONE line in `outputLanguage` summarizing the inherited history, e.g. `Continuing PROJ-12345: phases 0-3 finished earlier (12m, 38.4k tok, ~$0.74)` (USD via `phase-tracker.sh cost total`); (3) `render`.
50
+
51
+ ## Usage
52
+
53
+ ```bash
54
+ /multi-agent:resume # list everything resumable, pick one
55
+ /multi-agent:resume #2 # a tracked run by task number
56
+ /multi-agent:resume PROJ-12345 # a tracked run by Jira id, or bind the tail to that id
57
+ /multi-agent:resume --base develop # tail path: override the base branch for the diff
58
+ /multi-agent:resume #2 --answer continue # answer the question the run stopped on, then re-enter its step
59
+ /multi-agent:resume autopilot # no gate prompts: auto-fix, auto-PR, auto-comment
60
+ ```
61
+
62
+ A single command covers both directions, so the user does not have to know which case they are in before asking.
63
+
64
+ When NOT to use it:
65
+
66
+ - The change is not written yet - use `/multi-agent`.
67
+ - Only the review is wanted - `/multi-agent:review`. Only the report - `/multi-agent:channels`. Only device UI testing - `/multi-agent:test` / `/multi-agent:manual-test`.
68
+ - The run is abandoned rather than paused - `/multi-agent:kill #N`, or `/multi-agent:garbage-collect --abandoned` for the Phase 0 leftovers.
69
+
70
+ Modes:
71
+
72
+ - **interactive** (default): stops at the Phase 4 gate when there are blocking/important findings; asks before committing/PR when appropriate.
73
+ - **`autopilot`**: no prompts - auto-fix accepted blocking/important findings, auto-commit/push/PR, auto-post the Jira comment.
74
+
75
+ Examples:
76
+
77
+ ```bash
78
+ /multi-agent "PROJ-12345" # a run that stops at the user-test gate
79
+ /multi-agent:resume # ... pick it back up from that gate
80
+
81
+ # ... or, with no run behind it at all:
82
+ # you write the change by hand on bugfix/PROJ-12345-order-filter
83
+ /multi-agent:resume # review + build/test + PR + Jira analysis & test scenarios
84
+ ```
85
+
86
+ ## Source rows
87
+
88
+ Source B is offered only when no Source A run owns the branch, otherwise the same work would be offered twice under two different contracts. Labels carry proper nouns verbatim (task id, branch name). A single row still needs a second option because `AskUserQuestion` refuses a call with fewer than two declared options and discards every question batched with it.
89
+
90
+ ## Tracked-run notes
91
+
92
+ - A worktree removed on purpose (`state.worktreeRemovedAt`) was removed by Phase 4 once the PR opened; the branch is still local and the artefacts live under `state.artifactsPath`. A Phase 5 pause needs no checkout. Ask before moving HEAD because the user may be mid-work on another branch, which is exactly why the removal did not check the branch out.
93
+ - The handoff block carries done / remaining / decisions / open findings and the exact re-entry point (phase + subStep). State is the machine truth; the handoff is the narrative.
94
+
95
+ ## Re-entry by waitingFor
96
+
97
+ A run that stopped mid-phase to ask a human has `currentPhase` pointing at the phase it is still inside, so resuming past it skips the question permanently.
98
+
99
+ | `waitingFor` | Re-entry |
100
+ |---|---|
101
+ | `maturity` | Phase 0, the maturity step, with the item **re-fetched** and re-scored - an edit is a reason to look again, never proof the gap closed (`$HOME/.claude/multi-agent-refs/features/maturity-followup.md`); after a research pass that proceeded, re-scored through `research-gate.mjs --recheck` |
102
+ | `user-channels-choice` | Phase 5, the channels multi-select, with the stored `channelsInput` |
103
+ | `local-test` | Phase 3, the user-test gate, with the checkout the gate was waiting on |
104
+ | `attended-reply` | `currentPhase`, at the step that asked for a typed reply: ask it again |
105
+ | `question` | The step `state.pendingQuestion.stepId` names, after the answer is recorded ("Answering a parked question") |
106
+ | absent or `null` | `currentPhase + 1` (same pipeline as the main multi-agent command) |
107
+
108
+ A `waitingFor` that outlives the question it asked sends every later resume back to the step the user already answered, which is why it is cleared in the same write that records the answer.
109
+
110
+ ## Untracked context
111
+
112
+ 1. **Project + branch:** detect project (cwd), current branch (`git branch --show-current`). No worktree is created; the work is already in this checkout.
113
+ 2. **Base + diff:** as resolved in Step 1. Abort with `ERR: no local work to resume on <branch> vs <base>` if the diff went empty between the question and the answer.
114
+ 3. **Task binding:** Jira id from the argument, else parsed from the branch name (`bugfix/PROJ-XXXX` / `feature/PROJ-XXXX`); `taskType` inferred from the diff (bugfix/feature/refactor/chore) for the report wording. GitHub issue `#N` from branch or argument when present.
115
+ 4. **Prior state (optional):** if a tracker state exists for this branch from an earlier run, load its analysis summary and Jira/issue binding to enrich the report. Never require a prior pipeline run.
116
+ 5. Persist state under `$HOME/.claude/logs/multi-agent/{project}/{taskId}/`, the same location every run uses.
117
+
118
+ ## Tail phase map
119
+
120
+ ```
121
+ Phase 0: Init → project/branch detect, base + diff, Jira id, state (no worktree),
122
+ fable slots resolved: `lib/model-dispatch.sh subagent --persona <reviewer|triage>
123
+ --default fable` (opus while modelFallback.fableEnabled is false)
124
+ Phase 3: Review → the Verify gate first (stack-aware build + existing tests; SUCCESS required), then
125
+ parallel review + triage on the resolved rungs (Fable + Opus + Sonnet and Fable
126
+ triage while the fable rung is on; Opus + Sonnet and Opus triage while it is off)
127
+ Phase 4: Commit → commit remaining local changes + push + open PR if none exists
128
+ Phase 5: Report → technical analysis + Jira comment with test scenarios (channels: Jira / PR / Confluence / Wiki)
129
+ ```
130
+
131
+ The missing Plan Approval Gate is the only case where it is absent for a reason other than `autopilot` having nobody to ask.
132
+
133
+ With the quality gates active the commit hook asks for every required ledger entry, and this path has neither Phase 1 nor Phase 2 to write them, so it writes them itself:
134
+
135
+ - Phase 0 runs `node "$HOME/.claude/scripts/open-questions-gate.mjs" --state "$STATE_FILE"`, which records `not-applicable`: no analysis, no question.
136
+ - The Verify gate runs the Phase 2 exit gates of `features/unattended-gates.md` on the build and test logs it captured, with `--base "$(git merge-base "$BASE" HEAD)"` for `test-strength.mjs` and `symbol-existence-gate.mjs` so the branch's commits count as the change.
137
+ - Phase 4's `plan-coverage-gate.mjs` records `not-applicable`: the run has no Plan phase.
138
+
139
+ ## Tracker block
140
+
141
+ The full tail tracker sequence, with the reason `init` is conditional: a task handed off from the user test inside Phase 3 ("awaiting local test") keeps its full phase 0-2 history (elapsed, tokens, USD), so `init` runs only when no prior state exists, and `add` is idempotent (existing phases keep their history).
142
+
143
+ ```bash
144
+ bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped # every phase boundary
145
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached] # after every LLM call
146
+ ```
147
+
148
+ On Claude Code, capture each `taskId` from `TaskCreate` and persist it via `phase-tracker.sh meta <N> tasklist_id "<taskId>"`, then flip status with `TaskUpdate` at each boundary. Out-of-order TaskCreate scrambles the tile stack. On continuation, rebuild the FULL TaskList from the state file (completed tiles included) in phase order before any `TaskUpdate`, refreshing every `tasklist_id` meta. Copilot CLI / plain shell have no TaskList widget: `phase-tracker.sh render` prints the bordered ANSI phase table as the last tool result.
@@ -1,6 +1,38 @@
1
1
  # Review - PR picker and diff fetch (Steps 1a and 2)
2
2
 
3
- > Loaded by `review/SKILL.md` Steps 1a and 2. The SKILL keeps when each step runs, the autopilot fallback and the per-PR loop; this file carries the list commands, the picker fields and the per-provider fetch commands.
3
+ <!-- toc -->
4
+ - [Step 1 - Parse the input](#step-1---parse-the-input)
5
+ - [Step 1a - No-input PR picker](#step-1a---no-input-pr-picker)
6
+ - [Step 2 - Fetch the diff](#step-2---fetch-the-diff)
7
+ - [Input matrix](#input-matrix)
8
+ <!-- /toc -->
9
+
10
+ > Loaded by `review/SKILL.md` Steps 1, 1a and 2. The SKILL keeps when each step runs, the autopilot fallback and the per-PR loop; this file carries the input parser, the list commands, the picker fields and the per-provider fetch commands.
11
+
12
+ ## Step 1 - Parse the input
13
+
14
+ ```bash
15
+ # Pseudocode - orchestrator implements this:
16
+ input="$ARGUMENTS"
17
+ case "$input" in
18
+ "") kind=pick # interactive: go to Step 1a PR picker; autopilot/no-PRs falls back to branch (see 1a)
19
+ ;;
20
+ https://github.com/*/pull/*) kind=pr; provider=github; org_repo=<extracted>; pr_number=<extracted> ;;
21
+ https://bitbucket.*/projects/*/repos/*/pull-requests/*)
22
+ kind=pr; provider=bitbucket-server
23
+ bb_server_host=<extracted host>
24
+ bb_project_key=<extracted KEY>
25
+ bb_repo_slug=<extracted slug>
26
+ pr_number=<extracted N>
27
+ ;;
28
+ *#[0-9]*) kind=pr; provider=github; org_repo="${input%%#*}"; pr_number="${input##*#}" ;;
29
+ '#'[0-9]*) kind=pr; provider=github; org_repo=$(gh repo view --json nameWithOwner -q .nameWithOwner); pr_number="${input#'#'}" ;;
30
+ [0-9]*) kind=pr; provider=github; org_repo=$(gh repo view --json nameWithOwner -q .nameWithOwner); pr_number="$input" ;;
31
+ *) kind=branch; provider=local; ref="$input" ;;
32
+ esac
33
+ ```
34
+
35
+ Autopilot with no ref goes straight to branch mode (`kind=branch; provider=local; ref=$(git rev-parse --abbrev-ref HEAD)`) so nothing prompts. When `provider=github`, Step 2 also persists `agent-state.review.headCommitSha` - GitHub inline-comment posts (`POST /repos/{o}/{r}/pulls/{n}/comments`) require `commit_id`. Bitbucket Server's anchor API does not.
4
36
 
5
37
  ## Step 1a - No-input PR picker
6
38
 
@@ -1,6 +1,6 @@
1
1
  # Review - Module review guide discovery (Step 2b)
2
2
 
3
- > Loaded by `review/SKILL.md` Step 2b. The SKILL keeps what a guide is, the reviewer-prompt injection and the scope rule; this file carries the discovery walk and the PR-mode probe.
3
+ > Loaded by `review/SKILL.md` Step 2b. The SKILL keeps what a guide is and the scope rule; this file carries the discovery walk, the PR-mode probe and the reviewer-prompt injection block.
4
4
 
5
5
  ```bash
6
6
  # Changed file paths from the patch:
@@ -23,3 +23,11 @@ done < /tmp/multi-agent-review-${TASK_ID}-paths.txt
23
23
  ```
24
24
 
25
25
  Existence checks are resolved against the local checkout when the cwd is the target repo. In PR mode without a local checkout, probe the candidate paths via the provider API instead (`gh api /repos/{o}/{r}/contents/{path}?ref={headSha}` / Bitbucket `GET /projects/{KEY}/repos/{slug}/browse/{path}?at={headSha}`) and fetch the matching files' raw content the same way. No hit → step is a silent no-op.
26
+
27
+ ## Reviewer-prompt injection
28
+
29
+ Persist `agent-state.review.moduleGuides = [<repo-relative paths>]` and inject this block into every reviewer prompt (Step 3):
30
+
31
+ > MODULE REVIEW GUIDES: before reviewing, read each of these guide files. Apply a guide's rules/checklist to every changed file under its directory. Guide violations are findings like any other - triage them by severity.
32
+
33
+ Scope: a guide governs only files under its own directory - a guide found under one module must not be applied to a sibling module's changes in the same PR.
@@ -0,0 +1,75 @@
1
+ # Review - reviewer panels, store compliance, summary and posting (Steps 3, 4, 6, 7)
2
+
3
+ > Loaded by `review/SKILL.md` and the Copilot `multi-agent-review` skill. The SKILL keeps the fable-rung resolution, the decision rule and the posting defaults; this file carries the per-host model panels, the store-compliance triggers, the chat summary template, the post prompt and the provider endpoints.
4
+
5
+ ## Reviewers
6
+
7
+ Every host runs three reviewers; only the second slot differs, because GPT-5.4 exists on Copilot and Codex but not on Claude Code, where Opus fills it.
8
+
9
+ **Claude Code (3 in parallel while the fable rung is on, 2 while it is off):**
10
+ - Agent 1: `claude-fable-5-1` → security + architecture (only when `REVIEW_RUNG` is `fable`)
11
+ - Agent 2: `claude-opus-5-5` → edge cases, alternate perspective
12
+ - Agent 3: `claude-sonnet-5-5` → general quality
13
+
14
+ **Copilot CLI (3 in parallel):**
15
+ - Agent 1: `claude-opus-4.7` → security + architecture (Fable is not offered on Copilot CLI)
16
+ - Agent 2: `gpt-5.4` → edge cases, alternate perspective
17
+ - Agent 3: `claude-sonnet-4.6` → general quality
18
+
19
+ **Codex CLI (3 in parallel, single vendor):**
20
+ - Agent 1: `gpt-5.6` @ `xhigh` → security + architecture
21
+ - Agent 2: `gpt-5.4` @ `high` → edge cases, alternate perspective
22
+ - Agent 3: `gpt-5.6` @ `medium` → general quality
23
+
24
+ When `REVIEW_RUNG` is anything but `fable`, Agent 1 is dropped on Claude Code and the panel is Agent 2 + Agent 3.
25
+
26
+ ## Store compliance
27
+
28
+ | Platform | Trigger files | Catalog |
29
+ |---|---|---|
30
+ | iOS | `**/Info.plist`, `**/PrivacyInfo.xcprivacy`, `**/*.entitlements`, `**/*App.swift`, `**/AppDelegate*.swift`, `**/SceneDelegate*.swift`, `**/project.pbxproj` | `$HOME/.claude/skills/apple-archive-compliance/SKILL.md` - 18 rules + ITMS refs |
31
+ | Android | `**/AndroidManifest.xml`, `**/build.gradle(.kts)`, `**/proguard-rules.pro`, `**/network_security_config.xml` | `$HOME/.claude/skills/google-play-compliance/SKILL.md` - 21 rules + Play policy refs |
32
+
33
+ Each finding gets the `ruleID` from the catalog plus the platform policy ref:
34
+ - iOS: `(apple-archive-compliance / info-plist - Guideline 5.1.1)`
35
+ - Android: `(google-play-compliance / dangerous-permissions - Policy - Permissions)`
36
+
37
+ ## Summary
38
+
39
+ ```
40
+ 🔍 Review Complete · PR #1250 · 3 files +120 -45
41
+ | Model | Verdict | Blocking | Important | Suggestion |
42
+ |----------|-----------|----------|-----------|------------|
43
+ | Fable | approved | 0 | 1 | 3 |
44
+ | Opus | approved | 0 | 2 | 2 |
45
+ | Sonnet | rejected | 1 | 2 | 5 |
46
+
47
+ Consensus: ⚠ DISAGREEMENT - see triage
48
+ ```
49
+
50
+ One row per reviewer that ran: Fable + Opus + Sonnet on Claude Code (Opus + Sonnet while the fable rung is off), Opus + GPT-5.4 + Sonnet on Copilot CLI, the three GPT rows on Codex CLI. The chat is the live conversation; on the PR side, the durable artifacts are inline comments + the review state (Step 7).
51
+
52
+ ## Posting
53
+
54
+ Optional opt-out prompt (interactive mode only; autopilot skips and posts):
55
+
56
+ ```
57
+ question (outputLanguage): "PR #{N} için review action gönderilsin mi?"
58
+ header (English): "Post review"
59
+ options (label + description in outputLanguage; semantics, not literals):
60
+ - option 1 - "Post review": inline comments + Request changes when there are
61
+ findings, Approve when there are none
62
+ - option 2 - "Chat only": leave the PR untouched, the chat summary is enough
63
+ default: option 1
64
+ ```
65
+
66
+ `post-pr-review.sh` reads `agent-state.review.{input, findings, iterationNumber, headCommitSha}`, decides APPROVE vs NEEDS_WORK from the decision rule, posts one inline comment per accepted blocking + important finding (in `outputLanguage`), then sets the review state via the provider's API:
67
+
68
+ | Provider | Inline comment | State |
69
+ |---|---|---|
70
+ | `github` | `gh api -X POST /repos/{o}/{r}/pulls/{n}/comments` (path + line + commit_id) | `gh pr review --approve` / `--request-changes` |
71
+ | `bitbucket-server` | `POST /pull-requests/{n}/comments` with `anchor: { path, line, lineType:"ADDED", fileType:"TO" }` | `PUT /pull-requests/{n}/participants/{user}` body `{"status":"APPROVED"}` or `{"status":"NEEDS_WORK"}` |
72
+
73
+ If a finding's `line` lies outside the diff or `headCommitSha` is missing, the comment falls back to a top-level PR comment with the same body.
74
+
75
+ If the post fails (network, token, harness block), `post-pr-review.sh` exits non-zero and surfaces the failing endpoint on stderr - the chat summary remains the source of truth. The script reads `agent-state.review` and handles finding render, comment posts and review state end-to-end.
@@ -1,6 +1,6 @@
1
1
  # Review - Valven delivery-rule gate (Step 2c)
2
2
 
3
- > Loaded by `review/SKILL.md` Step 2c. The SKILL keeps the not-measured rule and the NEEDS WORK rule; this file carries the per-input gate arguments, the checkout-vs-diff-file choice, and the handling of every rule family. Rule definitions: `$HOME/.claude/multi-agent-refs/features/valven.md`.
3
+ > Loaded by `review/SKILL.md` Step 2c. The SKILL keeps the not-measured rule and the NEEDS WORK rule; this file carries the Step 6 summary lines, the per-input gate arguments, the checkout-vs-diff-file choice, and the handling of every rule family. Rule definitions: `$HOME/.claude/multi-agent-refs/features/valven.md`.
4
4
 
5
5
  ```bash
6
6
  VG_FILE="/tmp/multi-agent-review-${TASK_ID}-valven.json"
@@ -40,3 +40,7 @@ VG_RC=$? # 0 clean, 1 findings, 2 could not run
40
40
  - When `VLV-AGE-01`, `VLV-BEHIND-01` or `VLV-TRACE-03` fires and a checkout exists, put the `valven-port.mjs` plan (same base and head, no `--apply`) in the finding's `fix` as `$HOME/.claude/multi-agent-refs/features/valven.md`, "Old work", lists it.
41
41
  - The registry's judgement rules (`rules:` block: `VLV-SCOPE-02`, `VLV-PRDESC-02`) go into every reviewer prompt in Step 3, with the PR body when one exists. Each reviewer returns a verdict per ID.
42
42
  - `VLV-CYCLE-01..03` are `suggestion` findings with a Valven score and never set NEEDS WORK alone; `VLV-PICKUP-01` is `important` for no reviewer, a `suggestion` for an old draft. Branch input reports them `not-measured`.
43
+
44
+ ## Summary lines
45
+
46
+ Step 6 adds one line under the table: `Valven: <n> finding(s) · <changedLines> lines / <fileCount> files · split: <yes N slices|no>`, plus for a PR `Valven scores: churn · coding · pickup · review` from the report's `scores` (`-` where one is missing).
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## Step 8 - Hook merge rules
6
6
 
7
+ The template carries three blocking `PreToolUse` gates (secret scan, agent-guard, read-size), non-blocking hooks on `PreCompact`, `SessionEnd`, `SessionStart` and `PostToolUse`, and a `Stop` hook (`run-stop-guard.sh`) that holds a session from stopping mid-run. What each does: `$HOME/.claude/multi-agent-refs/picker-contract.md`. Copilot CLI gets no hook: it discards `postToolUse` output as of 1.0.45.
8
+
7
9
  - Ask (picker): "Install the pipeline's hooks into `~/.claude/settings.json`?" Default Yes.
8
10
  - On Yes, deep-merge EVERY event in the template's `hooks` object (merging `PreToolUse` alone drops the capture hooks); keep existing hooks, never duplicate a matcher calling the same script.
9
11
  - Say only the three gates are hookable (no run-specific arguments); the rest are phase-enforced.
@@ -19,3 +21,5 @@ Report `MA_STACK_WHY` with the result. `ai-common-toolkit` and
19
21
  stack-specific. **No marker matched is an answer** - those two, not a guess.
20
22
  A name the marketplace does not carry is dropped with `dropped[]` naming it,
21
23
  so a toolkit that was never shipped is caught before it fails to load.
24
+
25
+ The marketplace repo name (`multi-agent-plugins`) is generic; a different org points `{owner}` at its own fork, and nothing in the pipeline is coupled to a specific account.
@@ -4,6 +4,7 @@
4
4
  - [Token Save Flow (reusable)](#token-save-flow-reusable)
5
5
  - [Step 3.5 - Host Prompt (embedded in Token Save Flow)](#step-35---host-prompt-embedded-in-token-save-flow)
6
6
  - [Step 3.7 - Repository read binding (embedded in Token Save Flow)](#step-37---repository-read-binding-embedded-in-token-save-flow)
7
+ - [Sequential onboarding loop (Step 3)](#sequential-onboarding-loop-step-3)
7
8
  - [Identity learning (Step 3)](#identity-learning-step-3)
8
9
  - [Inline Token Save Pattern](#inline-token-save-pattern)
9
10
  <!-- /toc -->
@@ -226,6 +227,18 @@ Save the answer, lowercased, to `prefs.global.credentialHosts.{logical-key}`
226
227
  (an array of hostnames). Empty leaves the key unbound. `/multi-agent:setup hosts`
227
228
  re-opens it.
228
229
 
230
+ ## Sequential onboarding loop (Step 3)
231
+
232
+ The Step 2 discovery summary is never the end of setup. Immediately after showing it, walk the missing services one by one in the fixed order the setup SKILL lists, and run the Token Save Flow for each.
233
+
234
+ - **One prompt per service.** Never collapse the list into a single "add missing tokens now?" yes/no, and never offer one multi-select covering all services: each service has its own source URL, key name, identity binding and host prompt, so each gets its own Token Save Flow pass.
235
+ - **Each service pass asks, in order: token, author, host, read binding (GitHub, Bitbucket; Step 3.7).** Step A/B collect the secret, Step C binds the git identity (author) - Bitbucket and GitHub included; every saved token gets an author - and Step 3.5 asks the host domain inline for hosted services (jira, confluence, bitbucket, fortify, graylog), plus the Fortify project versions and the optional Graylog test instance. GitHub and Figma skip the host question (fixed domains); `bitbucket_user` skips author binding (username, not a PAT). Never end a service pass with the token saved but the author or a required host unasked.
236
+ - **Skip is per-service.** A Skip answer leaves that service's `keychainMapping` at `null` and the loop continues with the next service. Skips never abort the loop.
237
+ - **`figma` and `figma_mcp` are distinct credentials for distinct tiers: ask both.** Skipping the PAT does not imply skipping MCP, and vice versa. The `figma_mcp` pass opens with a Remote / Local mode question instead of a clipboard paste (`setup/figma.md`): Remote generates a `figu_` OAuth token for the current user, Local wires the PAT-based local server.
238
+ - The loop ends only when every missing service has been asked exactly once; then continue to Step 4 (Verify all).
239
+
240
+ Every token is optional in the sense that every service can be answered with Skip, but the asking is not optional. Phase 0 re-asks at runtime only for tokens the user skipped here.
241
+
229
242
  ## Identity learning (Step 3)
230
243
 
231
244
  Each token save triggers an identity prompt:
@@ -0,0 +1,72 @@
1
+ # stack: background and examples
2
+
3
+ Read by `/multi-agent:stack` when the user asks how stack selection works, what
4
+ an argument enables, or why the plugin map is derived.
5
+
6
+ ## How hosts receive stack skills
7
+
8
+ On Claude Code the marketplace plugins are the ONLY source of stack skills -
9
+ nothing is copied into `~/.claude/skills`. A stack that is not enabled is simply
10
+ absent from the session. Copilot CLI and Codex CLI have no plugin loader; they
11
+ receive a local copy filtered to the enabled stacks at install time, which is why
12
+ the command offers to refresh those copies after a change.
13
+
14
+ Enablement is declarative, per-repo and versioned. There is no SessionStart hook
15
+ and no directory shuffling; the old `stack-swap.sh` mechanic is gone.
16
+
17
+ ## Usage examples
18
+
19
+ ```bash
20
+ /multi-agent:stack # no arg -> native multi-select picker (current state pre-noted)
21
+ /multi-agent:stack ios # SwiftUI toolkit + common
22
+ /multi-agent:stack ios backend # any combination, space-separated
23
+ /multi-agent:stack android # Compose toolkit + common
24
+ /multi-agent:stack mobile # alias: ios + android + common
25
+ /multi-agent:stack backend # Python / Node spec-driven toolkit + common
26
+ /multi-agent:stack web # React / TSX toolkit + common (alias: frontend)
27
+ /multi-agent:stack fullstack # alias: web + backend + common
28
+ /multi-agent:stack all # all four stack toolkits + common
29
+ ```
30
+
31
+ ## Why the map is derived
32
+
33
+ `pluginsForStacks()` in `scripts/_stack-routing.mjs` owns the stack to plugin
34
+ map, and the command carries no copy: every hand-written copy is a chance to get
35
+ the one asymmetry wrong - the detector says `web`, the marketplace ships
36
+ `ai-frontend-toolkit`. To preview what a set of arguments enables:
37
+
38
+ ```bash
39
+ node -e 'import(process.env.HOME+"/.claude/scripts/_stack-routing.mjs").then(m=>{
40
+ const st=process.argv.slice(1).flatMap(a=>m.expandStackArg(a));
41
+ if(!st.length){console.error("Unknown stack. One of: "+m.KNOWN_STACKS.join(" ")+" mobile fullstack all");process.exit(1);}
42
+ const r=m.pluginsForStacks(st);
43
+ if(r.dropped.length) console.error("not in the marketplace, dropped: "+r.dropped.join(" "));
44
+ console.log(r.plugins.join(" "));
45
+ })' "$@"
46
+ ```
47
+
48
+ `ai-common-toolkit` and `ai-analyst-toolkit` are in every answer, including the
49
+ empty one. Multiple args union their sets, and the aliases (`frontend`,
50
+ `mobile`, `fullstack`, `all`) expand in the module so `/multi-agent:stack
51
+ mobile` cannot mean one thing here and another in the installer.
52
+
53
+ The marketplace suffix is appended inside node, not in the shell: `$ON` is a
54
+ single string, and re-splitting it in zsh to suffix each name suffixes the whole
55
+ string, not each word.
56
+
57
+ ## Apple's Xcode skills
58
+
59
+ Apple's skills (`xcode-integration@xcode-apple`, linked by the installer from
60
+ this Mac's Xcode 27.1+ plugin into `~/.claude/xcode-apple-marketplace`) are the
61
+ reference for iPhone Duo and window resizing, SwiftUI, App Intents and the
62
+ accessibility audits, and they are the first route for those iOS tasks.
63
+
64
+ ## What stack-toggle.mjs does
65
+
66
+ `stack-toggle.mjs set` applies the write rules (selection `true`, every other
67
+ stack toolkit `false`, `ai-common-toolkit` and `ai-analyst-toolkit` always
68
+ `true`, retired `ai-*-engineering-toolkit` keys deleted,
69
+ `xcode-integration@xcode-apple` following `ios` when the Apple marketplace is
70
+ linked, every other key kept), writes the file atomically and prints the
71
+ resulting `enabledPlugins`. The office panel's `POST /v1/stack` calls the same
72
+ script.