@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
@@ -30,6 +30,13 @@ shorten the time to first productive PR, or close a real risk?"
30
30
  Render assistant-facing prose in `outputLanguage`. External payloads (branch names, plan file,
31
31
  dev task) stay English.
32
32
 
33
+ Procedure detail, read when the phase starts:
34
+
35
+ ```
36
+ $HOME/.claude/multi-agent-refs/ios-coding-standard/resolve-and-scan.md (Phases 2 and 3)
37
+ $HOME/.claude/multi-agent-refs/ios-coding-standard/plan.md (Phase 4)
38
+ ```
39
+
33
40
  ---
34
41
 
35
42
  ## Phase 1 - Discover and pick the module
@@ -40,9 +47,7 @@ dev task) stay English.
40
47
  `Features/`, `Core/`, `Common/`, top-level module dirs) one level deep, then two if empty.
41
48
  3. Record per module: name · path · Swift files · lines · governance docs present · SPM targets.
42
49
  Keep this **module registry** for the whole run - `MOD-*` greps every import against it.
43
- Classify each module's role, because the role decides which dependency edges are legal:
44
- **feature** · **core/common** · **seam** (cross-module contracts/bridges/navigation) ·
45
- **composition root** (legitimately knows every module).
50
+ Classify each module's role: **feature** · **core/common** · **seam** · **composition root**.
46
51
  4. If `$ARGUMENTS` resolves to a module, skip the prompt. Otherwise `AskUserQuestion`
47
52
  (single-select, `outputLanguage`), documented modules first, each option showing file/line
48
53
  counts and `docs: yes/no`. If the list exceeds the question limit, group the smallest into an
@@ -51,189 +56,43 @@ dev task) stay English.
51
56
 
52
57
  ## Phase 2 - Resolve what applies to THIS module
53
58
 
54
- ### 2a. The registry is the standard - in-module prose docs are NOT consulted
55
-
56
- The skill's `references/rules.yml` (+ a project `modules/<Module>.yml` overlay) is the single source of truth. **Do not read, cite, or
57
- derive rules from a module's own `*-CLAUDE.md`, `docs/` set or any other in-repo prose.** They are
58
- being retired precisely so there is one place a rule can live; consulting them re-creates the
59
- split this command exists to remove. If such a file exists and contradicts the registry, that is a
60
- finding against the file, not against the code.
61
-
62
- The only in-repo inputs are **code and manifests**: sources, tests, `Package.swift`, `Info.plist`,
63
- the specs the generator reads, and the module registry from Phase 1.
64
-
65
- ### 2b. Per-module overlay, then inference
66
-
67
- 1. **`modules/<Module>.yml`** beside the project's own config carries what code cannot state: the vocabulary
68
- bindings, the module's role, prohibitions that currently have **zero** instances, deliberate
69
- carve-outs, name locks, and the real verification command. Registry-backed, so its findings may
70
- be `blocking`.
71
- *Why prohibitions need to be written down:* inference reads dominant patterns, and a rule
72
- obeyed everywhere has no counter-example to infer from. A ban at 100% compliance is invisible
73
- to a scan - it survives only if the overlay states it.
74
- 2. **Repo-level rules** (root `CLAUDE.md`, contributing docs) apply to every module.
75
- 3. **The module's own dominant pattern is its de-facto convention.** Count variants per dimension;
76
- the minority instances are the finding. Internal consistency beats conformity to a sibling.
77
- 4. No majority (even split, single instance) → not a finding. Record an Open Question.
78
-
79
- Findings from step 3 are tagged `inferred` and capped at **suggestion**. Only registry- or
80
- overlay-backed rules may be `blocking`.
81
-
82
- **When the overlay is missing**, generate a draft from code evidence, print it for confirmation,
83
- and mark every slot it could not derive - a frozen UI target, a name lock, a carve-out and an
84
- operational constraint all look like ordinary code from the outside. Do not guess them; list them
85
- as Open Questions.
86
-
87
- ### 2c. Vocabulary
88
-
89
- Bind each slot to a real symbol by grepping the module, then the reference module. **An unbound
90
- slot disables its rules** - never invent a name, never import a sibling's.
91
-
92
- `HandlerName` · `EventParam` · `CoordinatorType` · `ResultType` / `ErrorType` / `ErrorFactory` ·
93
- `DIResolver` / `DIConfigurator` · `RequestModelSuffix` / `ResponseModelSuffix` / `TransportSuffix` ·
94
- `MapperShape` · `SafeEnumProtocol` / `UnknownCase` · `CopySurface` · `AnalyticsSurface` ·
95
- `A11yIdentifierSource` · `GeneratedServiceRoot` · `SharedComponentsDir` / `SharedEntitiesDir` ·
96
- `MicroComponentLibrary` · `FrozenUITarget` · `DesignTokenNamespaces` · `CalendarDayHelper` ·
97
- `LoggerAPI` · `FileHeaderShape` · `ScreenRoot` · `ScreenRoleSuffixes` · `AsyncStyle` ·
98
- `CompositionRoot` · `SeamLayer` · `ModuleEntrySurface` · `ConcurrencyPosture` · `LintToolchain` ·
99
- `CredentialStore` (the module's Keychain wrapper, if any).
100
-
101
- Print the resolved table before scanning so a wrong binding is caught early.
102
-
103
- ### 2d. Sensitive-data inventory - required before any SEC rule runs
104
-
105
- The `SEC-*` rules are written against the **data classes** in `references/rules.yml →
106
- sensitive_data_classes`, never against one module's field names. Resolve the module's concrete
107
- instances of each class: grep entities, request/response models, storage calls and analytics
108
- events for the values the module actually handles, and map each to its class.
109
-
110
- Produce the inventory as a table - **class · concrete symbols · where it enters · required
111
- lifetime (transient / survives-restart / survives-reinstall) · where it is actually stored ·
112
- where it is logged · where it leaves (network, analytics, pasteboard, another module)**.
113
-
114
- The **lifetime column is the one that decides SEC-01**, and it is filled by walking
115
- `references/rules.yml → persistence_decision`, not by looking at what the code currently does. Compare it
116
- against the storage column and report both mismatches:
117
- - required transient but persisted anywhere (including the Keychain) → **over-persistence**;
118
- - required to survive a restart but stored outside the Keychain → **under-protection**.
119
-
120
- Then generate the SEC lint patterns *from this inventory*, so the checks match this module's real
121
- vocabulary. A class with no instance here yields no finding; a symbol you cannot classify, or one
122
- whose required lifetime nobody can state, is an Open Question, not a silent pass.
123
-
124
- This table is a deliverable in its own right, independent of whether any violation is found.
59
+ - **The registry is the standard.** `references/rules.yml` (+ a project `modules/<Module>.yml`
60
+ overlay) is the single source of truth. **Do not read, cite, or derive rules from a module's own
61
+ `*-CLAUDE.md`, `docs/` set or any other in-repo prose.** A file that contradicts the registry is a
62
+ finding against the file. The only in-repo inputs are code and manifests.
63
+ - **Overlay, then inference.** Overlay- and registry-backed findings may be `blocking`; findings
64
+ inferred from the module's dominant pattern are tagged `inferred` and capped at **suggestion**.
65
+ No majority → Open Question, not a finding. A missing overlay gets a draft from code evidence,
66
+ printed for confirmation, with every slot it could not derive listed as an Open Question.
67
+ - **Vocabulary.** Bind each slot to a real symbol by grepping. **An unbound slot disables its
68
+ rules** - never invent a name, never import a sibling's. Print the resolved table before scanning.
69
+ - **Sensitive-data inventory, required before any SEC rule runs.** Map the module's real symbols to
70
+ `sensitive_data_classes`; the lifetime column, filled from `persistence_decision`, decides
71
+ SEC-01. A symbol you cannot classify is an Open Question, not a silent pass.
125
72
 
126
73
  ## Phase 3 - Scan
127
74
 
128
- Apply the rules in `references/rules.yml` that survived Phase 2 binding, plus the module's own `validation`
129
- gate. Tag every finding: **rule ID · severity · source (`registry` / `doc` / `inferred`) ·
130
- onboarding impact (high/medium/low)**.
131
-
132
- ### Coverage gate - on disk, not in memory
133
-
134
- Before scanning, write `.<module>-audit-coverage.tsv` to the scratch dir: one row per target
135
- (every screen under `ScreenRoot`, every shared component, every entity, every file in every
136
- target) with columns `path · status · rules-applied`. Mark rows as you go.
137
-
138
- - Each target is **audited** or **explicitly skipped with a reason** (generated, fixture,
139
- vendored). No third state.
140
- - **The run is incomplete while any row is unmarked** - and the file, not a claim, is the proof.
141
- Chunk the module if it is too large for one pass; the checklist survives a context reset.
142
- - No sampling. A partial audit reported as complete certifies the unscanned screens as clean.
75
+ Apply the rules that survived Phase 2 binding, plus the module's own `validation` gate. Tag every
76
+ finding: **rule ID · severity · source (`registry` / `doc` / `inferred`) · onboarding impact**.
143
77
 
144
- ### Grep hygiene
145
-
146
- Registry `mechanism` patterns are line-based and match doc comments. Filter
147
- `^[[:space:]]*//` - BSD grep does not understand `\s`, so a `\s*//` filter silently lets `/// ...`
148
- through - then open each surviving hit and confirm it is real code. Report pre-filter and
149
- post-verification counts separately; a table padded with comment matches destroys trust.
150
-
151
- ### Judgement rules need evidence, not assertion
152
-
153
- For any rule marked `enforcement: judgement`, a finding must carry the measurement its `check`
154
- names - a reference count, a call-site count, a consumer count, a file list. **No count, no
155
- finding.** This is what keeps a subjective rule from becoming an opinion.
156
-
157
- Every judgement rule has a worked ✗/✓ pair in `EXAMPLES.md`, keyed by ID. Cite it in the finding's
158
- proposed fix rather than re-describing the shape - the developer applying the fix should be
159
- reading the same picture the audit used.
160
-
161
- ### Module-specific overrides
162
-
163
- The module's own docs win over the registry, including where they contradict a sibling module.
164
- Never apply one module's dialect to another. List every override honoured, so the reader sees why
165
- a registry rule was not raised.
78
+ - **Coverage gate on disk**: `.<module>-audit-coverage.tsv`, one row per target, each **audited**
79
+ or **explicitly skipped with a reason**. The run is incomplete while any row is unmarked. No
80
+ sampling.
81
+ - **Grep hygiene**: filter comment lines, confirm every hit, report pre-filter and verified counts.
82
+ - **Judgement rules**: no count, no finding; cite the `EXAMPLES.md` pair by ID.
166
83
 
167
84
  ## Phase 4 - Produce the plan
168
85
 
169
86
  No findings → report compliant and stop. Otherwise write
170
87
  `<ModulePath>/ios-coding-standard-plan-<module>.md` (or the repo's scratch/docs dir if the module
171
- tree must stay clean), containing, in order:
172
-
173
- 1. **Coverage ledger** - total targets · audited · skipped with reasons. Not 100% accounted for
174
- means the plan is not deliverable.
175
- 2. **Summary** - counts by severity and source, resolved vocabulary, branch to create.
176
- 3. **Sensitive-data inventory** (Phase 2d) - first, because it is the highest-risk content.
177
- 4. **Screen × role matrix** `[STRUCT-02]` - screens as rows, manifest roles as columns, cells
178
- `✓ / missing / misplaced`. The structural map a newcomer reads first.
179
- 5. **Type placement table** `[STRUCT-05]` - type · location · consumer count · correct tier ·
180
- move required. Paired with the nested-type list `[STRUCT-01]`: owner · nested type · kind ·
181
- reference count · verdict.
182
- 6. **Visibility report** `[VIS-01, VIS-02]` - over-exposed declarations per file, non-final
183
- classes with no subclass.
184
- 7. **Boundary report** `[MOD-*]` - import graph (allowed vs forbidden, with coupling depth) ·
185
- manifest graph (declared vs legal for the role, plus dead edges) · **removability delta**
186
- ("removing X touches N files: ...") · inbound test (tests compile with no sibling present).
187
- 8. **Testability seam report** `[TEST-*]` - types reaching for the environment, logic requiring a
188
- view to execute, doubles whose signatures have drifted.
189
- 9. **Change-cost probe** `[FLEX-*]` - pick two plausible upcoming changes (a new variant of an
190
- existing screen; a new field on a shared entity) and state what each costs in files today.
191
- 10. **Findings table** - rule ID · `file:line` · current state · proposed fix · severity · source ·
192
- onboarding impact.
193
- 11. **Per-file work** - grouped per file, blocking → important → suggestion; within a severity,
194
- highest onboarding impact first.
195
- 12. **Behaviour-preservation guard** - splitting files, adding MARKs, extracting extensions and
196
- moving types must not change behaviour. Anything requiring a behaviour change (a missing
197
- analytics event, a wrong result type, a timezone fix, a storage migration) goes in a
198
- **separate group**, reviewed and tested on its own, never inside a mechanical split commit.
199
- 13. **Tooling delegation & the ratchet** - the section that decides whether any of this survives.
200
- - Classify each applied rule by its registry `enforcement`. For every `lint` / `format` /
201
- `scan` rule, state the concrete mechanism and whether that toolchain exists in the repo
202
- (`LintToolchain`). **When it does not exist, saying so is a finding**, ranked above most
203
- individual violations it would have caught.
204
- - Recommend **baseline-and-ratchet, never big-bang**: grandfather existing violations, surface
205
- only new ones, drain the backlog behind a green build. Order the plan the same way - stop
206
- the bleeding, then clean up.
207
- - Custom lint rule identifiers **are** the registry IDs (`sec_01_no_plaintext_persistence`,
208
- `mod_01_no_sibling_import`) so a violation points straight at the rule entry.
209
- - **Linting is local-only by decision** - the skill's `references/lint-local.sh` with `references/swiftlint.draft.yml`, config
210
- and baseline kept outside the repository; no committed config, no build phase, no CI job.
211
- State this honestly in the plan rather than describing a gate that does not exist: a
212
- pre-PR habit catches less than a wall, so the residual risk is real and belongs in the
213
- report. Adopting it project-wide remains an open decision - record it as one so it stays
214
- visible instead of quietly lapsing.
215
- - Never imply the audit substitutes for the linter, or the linter for a gate. The audit finds
216
- the debt once; the linter keeps a developer honest; only a gate stops it returning.
217
- 14. **Numeric exit criteria** - target and today's measured value side by side: lint violations
218
- per 1k lines (<1) · public-surface ratio, public declarations ÷ externally consumed symbols
219
- (≈1) · forbidden cross-module imports (0) · removability delta · files over threshold and
220
- files >120 lines with no sectioning (0) · screens missing a manifest role (0) · escape-hatch
221
- count `[CONC-03]` (flat or falling) · exception-marker count (flat or falling) · dead code (0)
222
- · screens with logic and no mirrored tests (0) · unclassified sensitive symbols (0).
223
- 15. **Exception ledger** - every `// standard:exception(<ID>)` in the module: rule · reason ·
224
- expiry · expired yes/no.
225
- 16. **Open Questions** - Phase 2b dimensions with no majority, and unclassifiable symbols.
226
- 17. **Suggested commit slicing** - one commit per file-group / concern.
227
- 18. **Scope guard** - only this module is touched; definition of done is the module's own
228
- verification path.
88
+ tree must stay clean) with the 18 sections of `plan.md`, in order. Hard rules from it:
229
89
 
230
- Then write a **separate one-page onboarding summary** beside the plan, aimed at a developer
231
- joining next week rather than at whoever does the remediation: the ten always/never lines
232
- specialised to this module, the screen file manifest, the placement ladder, the sensitive-data
233
- classes in play, and the verification command. Nobody learns a codebase from a 40-finding audit -
234
- this page is the actual deliverable, and the audit is how you earn the right to write it
235
- accurately. Derive it from `references/STANDARD.md section 0`, do not re-invent it.
90
+ - A coverage ledger short of 100% accounted for means the plan is not deliverable.
91
+ - Behaviour changes go in a **separate group**, never inside a mechanical split commit.
92
+ - Linting is **local-only by decision**; never describe a gate that does not exist, and never imply
93
+ the audit substitutes for the linter or the linter for a gate.
236
94
 
95
+ Then write the one-page onboarding summary beside the plan (`plan.md`, "Onboarding summary").
237
96
  Show a concise version of the plan to the user too.
238
97
 
239
98
  ## Phase 5 - Hand off
@@ -252,11 +111,9 @@ verifies, and commits only when asked. This routine ends at the handoff.
252
111
 
253
112
  ## Notes
254
113
 
255
- - **Verification reality is per-module - establish it, do not assume it.** Some targets cannot be
256
- compiled from the CLI (asset symbol generation, UIKit-dependent packages, a dependency failing
257
- earlier in the graph); there, verification is Xcode and a manifest dump validates the manifest
258
- only. Never trust a piped build's exit code - a pipe reports the tail's status. Record the
259
- module's actual verification command in the plan.
114
+ - **Verification reality is per-module - establish it, do not assume it.** Never trust a piped
115
+ build's exit code. Record the module's actual verification command in the plan
116
+ (`resolve-and-scan.md`, "Verification reality").
260
117
  - One module per run. Several modules means several runs and several plans, never one
261
118
  cross-module churn commit.
262
119
  - If the audit wants a rule the registry lacks, add it to the skill's `references/rules.yml` as `status: proposed` with a
@@ -14,7 +14,7 @@ confirm: none
14
14
 
15
15
  **Input**: $ARGUMENTS
16
16
 
17
- Fully interactive. Only one optional flag: `autopilot`.
17
+ Fully interactive; one optional flag: `autopilot`.
18
18
 
19
19
  ## Flow
20
20
 
@@ -56,35 +56,20 @@ printf 'Authorization: Bearer %s\n' "$TOKEN" | curl -s -H @- \
56
56
  2. `status` → "In Progress" > "In Review" > "To Do" > others
57
57
  3. `created` → newest first
58
58
 
59
- **Format** (priority badge prefix, status suffix):
60
- ```
61
- [3/4] Pick issue (24 found, priority-sorted):
62
- > [Blocker] PROJ-12345 - Login crash on iOS 17 (In Progress)
63
- [Critical] PROJ-12340 - Payment fails for refunds (In Review)
64
- [High] PROJ-12338 - Dark mode polish (To Do)
65
- [Medium] PROJ-12330 - Add empty state (To Do)
66
- [ - ] PROJ-12300 - Refactor LoginViewModel (To Do)
67
- ```
59
+ **Format**: priority badge prefix, status suffix. Example list and the
60
+ maturity shape: `$HOME/.claude/multi-agent-refs/jira/picker-detail.md`; read it
61
+ before rendering the list.
68
62
 
69
63
  - AskUserQuestion (multiSelect=false)
70
64
  - Output: selected `KEY` (e.g. `PROJ-12345`)
71
65
 
72
- > **Rule**: Sort by priority for visibility, but don't force the user. No "P1 must come first" coercion - just signal.
66
+ > **Rule**: the sort signals priority; it never forces a pick.
73
67
 
74
68
  ### [3.5/4] Maturity check (auto)
75
69
 
76
- After issue selection, inspect `maturity` from `~/.claude/lib/issue-fetcher.sh`:
70
+ After issue selection, inspect `maturity` (`score`, `blockers`, `warnings`, `summary`) from `~/.claude/lib/issue-fetcher.sh`.
77
71
 
78
- ```jsonc
79
- "maturity": {
80
- "score": 0..100,
81
- "blockers": ["status_closed", "already_resolved", "description_empty"],
82
- "warnings": ["short_description", "no_repro_steps", "no_acceptance_criteria", "description_empty_parent_available"],
83
- "summary": "..."
84
- }
85
- ```
86
-
87
- > **Empty description → parent candidate**: development sub-tasks are often filed with no description of their own, with the real requirements on the parent issue. Before scoring, `issue-fetcher.sh` fetches the issue's `parent` (single hop, no chasing the parent's parent). If the issue's own description is empty and the parent's isn't, it does **not** auto-substitute - it exposes `descriptor.parentKey` + `descriptor.parentDescription` as a candidate and adds `description_empty_parent_available` to `warnings` (not `blockers`) instead of the plain `description_empty` blocker. If the parent is also empty or unreachable, `description_empty` still blocks exactly as before.
72
+ > **Empty description → parent candidate**: the fetcher never auto-substitutes a parent's description; it offers it as `description_empty_parent_available` (a warning). How the candidate is found: `jira/picker-detail.md`.
88
73
  >
89
74
  > When `description_empty_parent_available` is present, ask a tailored question instead of the generic "Continue?" below:
90
75
  > - `question` (outputLanguage): "Bu issue'nun (`{KEY}`) açıklaması boş, ama parent'ın (`{parentKey}`) açıklaması var. Parent'ın açıklamasından devam edilsin mi?" / "This issue's (`{KEY}`) description is empty, but its parent (`{parentKey}`) has one. Continue using the parent's description?" - show a short excerpt of `parentDescription` for context.
@@ -94,7 +79,7 @@ After issue selection, inspect `maturity` from `~/.claude/lib/issue-fetcher.sh`:
94
79
  > - **Decline** → same as a `description_empty` blocker: halt, advise fixing the issue's own description.
95
80
  > - **Autopilot**: auto-accepts "Use parent's description" (same "warnings auto-continue" rule as any other warning), logs the auto-accept + parent key to `agent-log.md`.
96
81
  >
97
- > **Sibling sub-tasks**: the fetcher also reads the parent's other sub-tasks into `descriptor.relatedIssues[]`. Show them as their own labelled block, never substituted into `description`. When the issue's description and the parent's are both empty but a sibling has content, `description_empty_sibling_available` replaces the `description_empty` blocker - same question, sibling key. Contract: `$HOME/.claude/multi-agent-refs/features/jira-context.md`.
82
+ > **Sibling sub-tasks**: the fetcher also reads the parent's other sub-tasks into `descriptor.relatedIssues[]`. Show them as their own labelled block, never substituted into `description`. Both descriptions empty but a sibling has content: `description_empty_sibling_available` replaces the blocker - same question, sibling key. Contract: `$HOME/.claude/multi-agent-refs/features/jira-context.md`.
98
83
 
99
84
  | Outcome | Behavior |
100
85
  |---|---|
@@ -111,14 +96,12 @@ with a summary; an autopilot run with `prefs.global.maturityFollowup.autopilotCo
111
96
  on posts ONE comment on the item asking for what is missing, then halts on the circuit
112
97
  breaker with `state.waitingFor = "maturity"` so `resume` re-enters THIS step with the item
113
98
  re-fetched. Both defaults keep today's behaviour: the comment is off, the halt is the halt.
114
- An edit is a reason to re-check, never proof the gap closed - the check re-runs on the new
115
- content, and only a DIFFERENT gap set ever earns a second comment. Read the item's existing
116
- comments FIRST and derive the prior ask from the newest one of ours (`priorFromComments`):
117
- a scan is a new run with a fresh state file, so state alone would make every scan a first ask.
99
+ Only a DIFFERENT gap set ever earns a second comment; read the item's existing comments
100
+ first (`priorFromComments`, detail in `jira/picker-detail.md`).
118
101
 
119
- > **Resolution check**: If Jira `resolution` is set (`Fixed`, `Done`, `Won't Do`, `Resolved`...), `already_resolved` is added - the issue was closed already. To reopen, clear `resolution` in Jira first.
102
+ > **Resolution check**: any set Jira `resolution` (`Fixed`, `Done`, `Won't Do`...) adds `already_resolved`. To reopen, clear `resolution` in Jira first.
120
103
 
121
- > **fixVersions**: When `descriptor.fixVersions` is non-empty (e.g. `["v1.48.0"]`) and a matching `release/v1.48.0` branch exists in `prefs.projects[*].branches`, suggest that branch. Otherwise fall back to `develop`/cwd current.
104
+ > **fixVersions**: When `descriptor.fixVersions` is non-empty and a matching `release/<version>` branch exists in `prefs.projects[*].branches`, suggest that branch. Otherwise fall back to `develop`/cwd current.
122
105
 
123
106
  The fetcher renders `maturity.summary` in `prefs.global.outputLanguage`; every other descriptor field is machine-readable and stays English.
124
107
 
@@ -128,21 +111,9 @@ The fetcher renders `maturity.summary` in `prefs.global.outputLanguage`; every o
128
111
 
129
112
  ## Pipeline launch
130
113
 
131
- 1. **Write picker state** to `/tmp/multi-agent-picker-{taskId}.json`:
132
- ```json
133
- {
134
- "taskId":"PROJ-12345-{timestamp}",
135
- "shortId":<int>,
136
- "branch":"<feature|bugfix>/PROJ-12345",
137
- "baseBranch":"develop",
138
- "issueRef":{...},
139
- "primary":{"name":"...","cloneUrl":"...","provider":"github|bitbucket"},
140
- "extras":[{...}],
141
- "worktreeRoot":"~/.worktrees/PROJ-12345-{timestamp}",
142
- "commitType":"<feat|fix>",
143
- "identity":{"name":"...","email":"..."}
144
- }
145
- ```
114
+ 1. **Write picker state** to `/tmp/multi-agent-picker-{taskId}.json` (`taskId`,
115
+ `shortId`, `branch`, `baseBranch`, `issueRef`, `primary`, `extras`,
116
+ `worktreeRoot`, `commitType`, `identity`; full shape in `jira/picker-detail.md`).
146
117
 
147
118
  2. **Bridge to agent-state.json v2.1.0** - picker → Phase 0:
148
119
  ```bash
@@ -155,8 +126,7 @@ The fetcher renders `maturity.summary` in `prefs.global.outputLanguage`; every o
155
126
  ~/.claude/lib/multi-repo-pipeline.sh prepare /tmp/multi-agent-picker-{taskId}.json
156
127
  ```
157
128
 
158
- 4. **Phase 0 entry** - pipeline reads the bridged `agent-state.json` and skips
159
- redundant Jira/GitHub fetches.
129
+ 4. **Phase 0 entry** - reads the bridged `agent-state.json`, no refetch.
160
130
 
161
131
  `autopilot` arg → start with `MULTI_AGENT_AUTOPILOT=1`.
162
132
 
@@ -21,12 +21,13 @@ Lets you switch to the task branch for manual testing in Xcode before the PR is
21
21
  2. **Check state** - the task must have completed Phase 2 (Dev) or later
22
22
  - Phase < 3 → "No code yet, run `resume #N` first"
23
23
 
24
- 3. **Remove the worktree and switch to the branch**:
24
+ 3. **Hand the branch over**. Make the WIP commit yourself (Standard path item 3 of Phase 4 Step 2 folds it back), then let the script hold the run artefacts and the main repo's current branch, remove the worktree and check the branch out. `{worktree-path}` and `{jiraId}` come from the task's state (`worktreePath`, `jiraId`):
25
25
  ```bash
26
- cd {project-root}
27
- git worktree remove .worktrees/{JIRA-KEY}-{id} 2>/dev/null
28
- git checkout {branch-name}
26
+ git -C "{worktree-path}" add -A
27
+ git -C "{worktree-path}" diff --cached --quiet || git -C "{worktree-path}" commit -m "WIP: {jiraId} - changes for user test"
28
+ bash $HOME/.claude/scripts/user-test-handoff.sh checkout --task "{jiraId}" --worktree "{worktree-path}" --root "{project-root}" --branch "{branch-name}"
29
29
  ```
30
+ A refused commit stops here with nothing moved. Script exits: 3 the main repo has uncommitted changes; 5 the worktree or a submodule holds uncommitted, unpushed or stashed work (a submodule with no remote needs one added); both move nothing. 6 a handoff is already held, or git refused part way: run `restore` below (if it answers 7, nothing had moved). 1 the worktree is not on the branch.
30
31
 
31
32
  Then mark the tracker as waiting (this CONTINUES the task's existing `tracker-state.json`; never `init` here - see `$HOME/.claude/multi-agent-refs/tracker-contract.md` "Continuation runs"). On Claude Code in a fresh session, first rebuild the TaskList from state per the same contract:
32
33
  ```bash
@@ -49,12 +50,16 @@ Lets you switch to the task branch for manual testing in Xcode before the PR is
49
50
  ❌ "fix: ..." → recreate the worktree and apply the fix
50
51
  ```
51
52
 
52
- 5. **Wait for the user's reply**
53
+ 5. **Wait for the user's reply**, then hand the branch back before acting on it:
54
+ ```bash
55
+ bash $HOME/.claude/scripts/user-test-handoff.sh restore --task "{jiraId}" --worktree "{worktree-path}" --root "{project-root}" --branch "{branch-name}"
56
+ ```
57
+ Exit 3: the user edited files on the branch in the main repo. Ask them to `git stash`, run `restore` again, then `git -C "{worktree-path}" stash pop`; a commit made there instead would stop Phase 4 from folding the checkpoints. Exit 6: the main repo could not leave the branch (an untracked file in the way) or the worktree could not be re-added; the message names the cause, the hold is kept, and `restore` runs again once it is cleared. Exit 7: nothing was held, so the worktree was never removed.
53
58
 
54
59
  6. **Branch on the answer**:
55
60
  - **OK** → first write `$WORKTREE/.pipeline/manual-test.json` (one entry per acceptance criterion from the analysis doc test plan, the plan tasks, or the user's own words):
56
61
  ```json
57
62
  {"criteria":[{"spec":"<quote>","source":"analysis 15.2 | plan task 3 | user","observed":"<what was seen>","verdict":"pass|fail|not-tested","reason":"<required when not-tested>","screenshot":"<path or null>"}],"verdict":"passed|failed"}
58
63
  ```
59
- then run `node $HOME/.claude/scripts/evidence-gate.mjs --claim manual --status passed --evidence "$WORKTREE/.pipeline/manual-test.json"`, adding `--require-screenshot` when `state.visualEvidence.required` is true (a passing criterion then has to name a screenshot that is actually on disk). Exit 1 means the "ok" is not accepted: name the criterion that is missing evidence and wait for the next reply. Exit 0 → `phase-tracker.sh update 3 completed` + `phase-tracker.sh meta 3 Result "local test passed (user)"`, recreate the worktree, continue to Phase 4. Full contract: `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` step 5, whose "UI flow video, when Phase 2 produced none" block applies here too: invoked standalone, this command is the only phase that ran, so if `visualEvidence.required` is set and `visualEvidence.video.file` is empty, the recording has to happen here or nowhere.
60
- - **Fix needed** → `phase-tracker.sh now 3 "applying fix: <summary>"`, recreate the worktree, apply the fix
64
+ then run `node $HOME/.claude/scripts/evidence-gate.mjs --claim manual --status passed --evidence "$WORKTREE/.pipeline/manual-test.json"`, adding `--require-screenshot` when `state.visualEvidence.required` is true (a passing criterion then has to name a screenshot that is actually on disk). Exit 1 means the "ok" is not accepted: name the criterion that is missing evidence and wait for the next reply. Exit 0 → `phase-tracker.sh update 3 completed` + `phase-tracker.sh meta 3 Result "local test passed (user)"`, continue to Phase 4. Full contract: `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` step 5. The UI flow video rule in `$HOME/.claude/multi-agent-refs/audit-guide.md` "Phase 3 evidence flows" applies here too: invoked standalone, this command is the only phase that ran, so if `visualEvidence.required` is set and `visualEvidence.video.file` is empty, the recording has to happen here or nowhere.
65
+ - **Fix needed** → `phase-tracker.sh now 3 "applying fix: <summary>"`, apply the fix in the restored worktree