@mmerterden/multi-agent-pipeline 20.33.0 → 20.35.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 (390) hide show
  1. package/CHANGELOG.md +98 -1
  2. package/README.md +3 -1
  3. package/README.tr.md +2 -1
  4. package/docs/adr/0018-cross-repo-links-not-a-global-graph.md +43 -0
  5. package/docs/adr/README.md +2 -1
  6. package/docs/facts.json +5 -4
  7. package/docs/features.md +1 -1
  8. package/install/_dev-only-files.mjs +1 -0
  9. package/install/catalog-history.json +1 -1
  10. package/install/claude.mjs +24 -2
  11. package/install/templates/claude-hooks.json +34 -1
  12. package/manifest.json +393 -339
  13. package/package.json +3 -1
  14. package/pipeline/agents/bulk-reader.md +3 -0
  15. package/pipeline/agents/code-reviewer.md +9 -0
  16. package/pipeline/agents/explorer.md +4 -0
  17. package/pipeline/agents/plan-critic.md +4 -2
  18. package/pipeline/commands/multi-agent/SKILL.md +17 -136
  19. package/pipeline/commands/multi-agent/channels/SKILL.md +16 -298
  20. package/pipeline/commands/multi-agent/graph/SKILL.md +5 -2
  21. package/pipeline/commands/multi-agent/language/SKILL.md +3 -3
  22. package/pipeline/commands/multi-agent/office-on/SKILL.md +7 -3
  23. package/pipeline/commands/multi-agent/office-status/SKILL.md +3 -2
  24. package/pipeline/commands/multi-agent/resume/SKILL.md +8 -22
  25. package/pipeline/commands/multi-agent/review/SKILL.md +7 -131
  26. package/pipeline/commands/multi-agent/setup/SKILL.md +19 -224
  27. package/pipeline/contract/CHANGELOG.md +9 -0
  28. package/pipeline/contract/README.md +6 -2
  29. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  30. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  31. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  32. package/pipeline/contract/manifest.json +14 -1
  33. package/pipeline/contract/types/index.d.ts +24 -2
  34. package/pipeline/lib/json-file-lock.mjs +61 -15
  35. package/pipeline/lib/office-remote.mjs +228 -0
  36. package/pipeline/lib/qr-code.mjs +360 -0
  37. package/pipeline/lib/repo-hygiene.sh +1 -0
  38. package/pipeline/lib/run-completion.mjs +17 -0
  39. package/pipeline/multi-agent-refs/channels/generator.md +146 -0
  40. package/pipeline/multi-agent-refs/channels/issue-comment.md +1 -1
  41. package/pipeline/multi-agent-refs/channels/menu.md +55 -0
  42. package/pipeline/multi-agent-refs/channels/multi-repo.md +6 -0
  43. package/pipeline/multi-agent-refs/channels/preview.md +25 -0
  44. package/pipeline/multi-agent-refs/channels/reference.md +98 -0
  45. package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +1 -1
  46. package/pipeline/multi-agent-refs/features/code-graph.md +27 -0
  47. package/pipeline/multi-agent-refs/features/office-remote-protocol.md +166 -0
  48. package/pipeline/multi-agent-refs/features/office-threat-model.md +2 -2
  49. package/pipeline/multi-agent-refs/features/plan-critic.md +5 -2
  50. package/pipeline/multi-agent-refs/features/review-delta.md +4 -1
  51. package/pipeline/multi-agent-refs/features/scope-check.md +25 -1
  52. package/pipeline/multi-agent-refs/features/verify-by-test.md +10 -0
  53. package/pipeline/multi-agent-refs/keychain.md +7 -0
  54. package/pipeline/multi-agent-refs/knowledge.md +9 -0
  55. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +163 -0
  56. package/pipeline/multi-agent-refs/phases/phase-0-init.md +6 -2
  57. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +8 -10
  58. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +18 -20
  59. package/pipeline/multi-agent-refs/phases/phase-3-review.md +20 -14
  60. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +8 -7
  61. package/pipeline/multi-agent-refs/phases/phase-5-report.md +6 -3
  62. package/pipeline/multi-agent-refs/picker-contract.md +1 -1
  63. package/pipeline/multi-agent-refs/resume/details.md +35 -0
  64. package/pipeline/multi-agent-refs/review/inputs.md +87 -0
  65. package/pipeline/multi-agent-refs/review/module-guides.md +25 -0
  66. package/pipeline/multi-agent-refs/review/valven.md +42 -0
  67. package/pipeline/multi-agent-refs/rules.md +3 -2
  68. package/pipeline/multi-agent-refs/setup/accounts.md +27 -0
  69. package/pipeline/multi-agent-refs/setup/app-store-connect.md +5 -0
  70. package/pipeline/multi-agent-refs/setup/firebase.md +5 -0
  71. package/pipeline/multi-agent-refs/setup/google-play.md +4 -0
  72. package/pipeline/multi-agent-refs/setup/hooks-and-plugins.md +21 -0
  73. package/pipeline/multi-agent-refs/setup/language.md +46 -0
  74. package/pipeline/multi-agent-refs/setup/multi-repo-group.md +51 -0
  75. package/pipeline/multi-agent-refs/setup/summaries.md +63 -0
  76. package/pipeline/multi-agent-refs/setup/token-save-flow.md +51 -0
  77. package/pipeline/multi-agent-refs/tracker-contract.md +1 -1
  78. package/pipeline/office/NOTICE.md +4 -1
  79. package/pipeline/office/assets/char_12.png +0 -0
  80. package/pipeline/office/assets/char_13.png +0 -0
  81. package/pipeline/office/assets/char_14.png +0 -0
  82. package/pipeline/office/assets/char_15.png +0 -0
  83. package/pipeline/office/assets/char_16.png +0 -0
  84. package/pipeline/office/assets/char_17.png +0 -0
  85. package/pipeline/office/assets/char_18.png +0 -0
  86. package/pipeline/office/assets/char_19.png +0 -0
  87. package/pipeline/office/assets/char_20.png +0 -0
  88. package/pipeline/office/assets/char_21.png +0 -0
  89. package/pipeline/office/assets/char_22.png +0 -0
  90. package/pipeline/office/assets/char_23.png +0 -0
  91. package/pipeline/office/assets/char_24.png +0 -0
  92. package/pipeline/office/assets/char_25.png +0 -0
  93. package/pipeline/office/assets/char_26.png +0 -0
  94. package/pipeline/office/assets/char_27.png +0 -0
  95. package/pipeline/office/assets/char_28.png +0 -0
  96. package/pipeline/office/assets/char_29.png +0 -0
  97. package/pipeline/office/assets/char_30.png +0 -0
  98. package/pipeline/office/index.html +304 -55
  99. package/pipeline/office/toolkit.json +1 -1
  100. package/pipeline/rules/response-shape.md +6 -7
  101. package/pipeline/schemas/agent-state.schema.json +36 -0
  102. package/pipeline/schemas/phases.json +4 -4
  103. package/pipeline/schemas/plan-critique.schema.json +9 -2
  104. package/pipeline/schemas/planning-output.schema.json +43 -2
  105. package/pipeline/schemas/pr-reach.schema.json +55 -0
  106. package/pipeline/schemas/prefs.schema.json +37 -8
  107. package/pipeline/schemas/reviewer-output.schema.json +20 -2
  108. package/pipeline/schemas/token-budget.json +4 -4
  109. package/pipeline/schemas/triage-output.schema.json +32 -3
  110. package/pipeline/schemas/unattended-policy.json +2 -1
  111. package/pipeline/scripts/_graph-analysis.mjs +270 -0
  112. package/pipeline/scripts/_guard_rules.py +449 -1
  113. package/pipeline/scripts/_memory-policy.mjs +165 -0
  114. package/pipeline/scripts/_secret-scan.mjs +105 -0
  115. package/pipeline/scripts/_test-gaming.mjs +36 -0
  116. package/pipeline/scripts/_unified-diff.mjs +2 -2
  117. package/pipeline/scripts/agent-guard.py +79 -19
  118. package/pipeline/scripts/anonymize-findings.mjs +99 -0
  119. package/pipeline/scripts/answer-check.mjs +113 -0
  120. package/pipeline/scripts/answer-check.sh +20 -0
  121. package/pipeline/scripts/autopilot-publish.mjs +9 -2
  122. package/pipeline/scripts/capture-flush.sh +12 -2
  123. package/pipeline/scripts/check-read-size.sh +9 -0
  124. package/pipeline/scripts/code-graph-rules/android.json +8 -3
  125. package/pipeline/scripts/contract-server.mjs +71 -16
  126. package/pipeline/scripts/debt-ledger.mjs +323 -0
  127. package/pipeline/scripts/file-context.mjs +261 -0
  128. package/pipeline/scripts/file-context.sh +20 -0
  129. package/pipeline/scripts/gate-ledger.mjs +144 -21
  130. package/pipeline/scripts/graph-links.mjs +230 -0
  131. package/pipeline/scripts/graph-query.mjs +133 -1
  132. package/pipeline/scripts/graph-report.mjs +65 -0
  133. package/pipeline/scripts/learn-from-transcripts.mjs +12 -48
  134. package/pipeline/scripts/learnings-ledger.mjs +143 -24
  135. package/pipeline/scripts/office-build.mjs +276 -5
  136. package/pipeline/scripts/office-control.mjs +70 -10
  137. package/pipeline/scripts/office-pair.mjs +407 -0
  138. package/pipeline/scripts/office-remote-client.mjs +463 -0
  139. package/pipeline/scripts/phase-tracker.sh +8 -0
  140. package/pipeline/scripts/phase0-exit-gate.mjs +40 -37
  141. package/pipeline/scripts/phone-devices.mjs +9 -1
  142. package/pipeline/scripts/plan-critique-gate.mjs +11 -2
  143. package/pipeline/scripts/pre-commit-check.sh +28 -2
  144. package/pipeline/scripts/pre-push-check.sh +6 -12
  145. package/pipeline/scripts/rework-base.mjs +87 -0
  146. package/pipeline/scripts/rework-rulings.mjs +106 -0
  147. package/pipeline/scripts/run-commit-check.mjs +104 -0
  148. package/pipeline/scripts/run-scope-guard.mjs +58 -3
  149. package/pipeline/scripts/run-scope-guard.sh +13 -1
  150. package/pipeline/scripts/scope-check-gate.mjs +213 -2
  151. package/pipeline/scripts/task-mirror.mjs +106 -15
  152. package/pipeline/scripts/task-mirror.sh +3 -2
  153. package/pipeline/scripts/test-stability-gate.mjs +112 -0
  154. package/pipeline/scripts/triage-memory.mjs +64 -37
  155. package/pipeline/scripts/update-check.sh +7 -1
  156. package/pipeline/scripts/update-issue-progress.sh +73 -8
  157. package/pipeline/scripts/validate-planning.mjs +172 -4
  158. package/pipeline/scripts/validate-reviewer.mjs +20 -0
  159. package/pipeline/scripts/validate-triage.mjs +149 -4
  160. package/pipeline/scripts/work-items.mjs +119 -1
  161. package/pipeline/scripts/worktree-prepare-all.mjs +200 -0
  162. package/pipeline/scripts/worktree-prepare.sh +40 -4
  163. package/pipeline/scripts/write-state.mjs +67 -24
  164. package/pipeline/skills/.skill-manifest.json +9 -9
  165. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +5 -5
  166. package/pipeline/skills/shared/core/google-play-compliance/references/rules.yml +1 -1
  167. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +1 -1
  168. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +5 -2
  169. package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +4 -4
  170. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +2 -2
  171. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +2 -0
  172. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +4 -4
  173. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +14 -0
  174. package/pipeline/skills/shared/external/android-architecture/references/patterns.md +6 -0
  175. package/pipeline/skills/shared/external/android-build-quality-gates/references/patterns.md +10 -0
  176. package/pipeline/skills/shared/external/android-datastore/references/patterns.md +11 -0
  177. package/pipeline/skills/shared/external/android-design-tokens-codegen/references/patterns.md +8 -0
  178. package/pipeline/skills/shared/external/android-jetpack-compose-expert/references/patterns.md +6 -0
  179. package/pipeline/skills/shared/external/android-mvi-viewmodel/references/patterns.md +10 -0
  180. package/pipeline/skills/shared/external/android-performance/references/patterns.md +13 -0
  181. package/pipeline/skills/shared/external/android-security/references/patterns.md +16 -0
  182. package/pipeline/skills/shared/external/api-patterns/references/contract-details.md +9 -0
  183. package/pipeline/skills/shared/external/api-security-best-practices/references/abuse-controls.md +12 -0
  184. package/pipeline/skills/shared/external/api-security-best-practices/references/identity-and-access.md +13 -0
  185. package/pipeline/skills/shared/external/api-security-best-practices/references/request-handling.md +12 -0
  186. package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +9 -0
  187. package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +8 -0
  188. package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +10 -0
  189. package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +21 -0
  190. package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +9 -0
  191. package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +7 -0
  192. package/pipeline/skills/shared/external/app-store-review/SKILL.md +2 -2
  193. package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +10 -0
  194. package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +10 -1
  195. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +22 -0
  196. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +17 -0
  197. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +22 -0
  198. package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +17 -0
  199. package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +9 -0
  200. package/pipeline/skills/shared/external/authentication/references/passkeys.md +11 -0
  201. package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +13 -0
  202. package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +9 -0
  203. package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +10 -0
  204. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +15 -0
  205. package/pipeline/skills/shared/external/compose-components/references/patterns.md +7 -0
  206. package/pipeline/skills/shared/external/compose-navigation/references/patterns.md +7 -0
  207. package/pipeline/skills/shared/external/compose-testing/references/patterns.md +15 -0
  208. package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +9 -0
  209. package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +11 -0
  210. package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +10 -0
  211. package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +13 -0
  212. package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +20 -0
  213. package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +16 -0
  214. package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +16 -0
  215. package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +14 -0
  216. package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +13 -0
  217. package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +10 -0
  218. package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +10 -0
  219. package/pipeline/skills/shared/external/fastapi-pro/references/app-structure.md +10 -0
  220. package/pipeline/skills/shared/external/gradle-kotlin-dsl/references/patterns.md +17 -0
  221. package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +12 -0
  222. package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +10 -0
  223. package/pipeline/skills/shared/external/hig-components-content/references/content-views.md +10 -0
  224. package/pipeline/skills/shared/external/hig-components-layout/references/bars-and-tabs.md +11 -0
  225. package/pipeline/skills/shared/external/hig-foundations/references/foundations-detail.md +13 -0
  226. package/pipeline/skills/shared/external/hig-foundations/references/type-color-spacing.md +13 -0
  227. package/pipeline/skills/shared/external/hig-patterns/references/onboarding-and-states.md +11 -0
  228. package/pipeline/skills/shared/external/hig-platforms/references/ipad-layout.md +12 -0
  229. package/pipeline/skills/shared/external/hig-technologies/references/technologies.md +16 -0
  230. package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +9 -0
  231. package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +18 -0
  232. package/pipeline/skills/shared/external/ios-accessibility/references/large-content-and-appearance.md +9 -0
  233. package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +9 -0
  234. package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +7 -0
  235. package/pipeline/skills/shared/external/ios-coding-standard/references/STANDARD.md +13 -0
  236. package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +9 -0
  237. package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +15 -0
  238. package/pipeline/skills/shared/external/ios-haptics/references/core-haptics.md +11 -0
  239. package/pipeline/skills/shared/external/ios-iphone-duo/references/api-map.md +11 -0
  240. package/pipeline/skills/shared/external/ios-iphone-duo/references/fixed-assumptions.md +15 -0
  241. package/pipeline/skills/shared/external/ios-iphone-duo/references/poses-and-panes.md +11 -0
  242. package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +18 -0
  243. package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +19 -0
  244. package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +15 -0
  245. package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +7 -0
  246. package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +8 -0
  247. package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +12 -0
  248. package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +17 -0
  249. package/pipeline/skills/shared/external/ios-security/references/app-review-guidelines.md +8 -0
  250. package/pipeline/skills/shared/external/ios-security/references/cryptokit-advanced.md +14 -0
  251. package/pipeline/skills/shared/external/ios-security/references/file-storage-patterns.md +8 -0
  252. package/pipeline/skills/shared/external/ios-security/references/privacy-manifest.md +9 -0
  253. package/pipeline/skills/shared/external/ios-sf-symbols/references/effects-and-custom-symbols.md +9 -0
  254. package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +13 -0
  255. package/pipeline/skills/shared/external/kotlin-coroutines-expert/references/patterns.md +8 -0
  256. package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +21 -0
  257. package/pipeline/skills/shared/external/localization-reuse-map/reference/format-and-output.md +9 -0
  258. package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +12 -0
  259. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +16 -0
  260. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +21 -0
  261. package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +10 -0
  262. package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +9 -0
  263. package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +12 -0
  264. package/pipeline/skills/shared/external/nodejs-backend-patterns/references/runtime-patterns.md +11 -0
  265. package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +11 -0
  266. package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +18 -0
  267. package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +11 -0
  268. package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +11 -0
  269. package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +15 -0
  270. package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +14 -0
  271. package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +14 -0
  272. package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +14 -0
  273. package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +14 -0
  274. package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +10 -0
  275. package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +12 -0
  276. package/pipeline/skills/shared/external/retrofit-networking/references/patterns.md +14 -0
  277. package/pipeline/skills/shared/external/room-database/references/patterns.md +16 -0
  278. package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +10 -0
  279. package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +10 -0
  280. package/pipeline/skills/shared/external/spm-build-analysis/references/build-optimization-sources.md +14 -0
  281. package/pipeline/skills/shared/external/spm-build-analysis/references/spm-analysis-checks.md +19 -0
  282. package/pipeline/skills/shared/external/storekit/references/core-patterns.md +13 -0
  283. package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +31 -0
  284. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +8 -0
  285. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +9 -0
  286. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +10 -0
  287. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +8 -0
  288. package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +24 -0
  289. package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +8 -0
  290. package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +14 -0
  291. package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +12 -0
  292. package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +10 -0
  293. package/pipeline/skills/shared/external/swift-concurrency-expert/references/swift-6-2-concurrency.md +8 -0
  294. package/pipeline/skills/shared/external/swift-concurrency-pro/references/actors.md +10 -0
  295. package/pipeline/skills/shared/external/swift-concurrency-pro/references/cancellation.md +7 -0
  296. package/pipeline/skills/shared/external/swift-concurrency-pro/references/interop.md +10 -0
  297. package/pipeline/skills/shared/external/swift-concurrency-pro/references/new-features.md +11 -0
  298. package/pipeline/skills/shared/external/swift-concurrency-pro/references/structured.md +9 -0
  299. package/pipeline/skills/shared/external/swift-concurrency-pro/references/testing.md +13 -0
  300. package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +7 -0
  301. package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +14 -0
  302. package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +16 -0
  303. package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +17 -0
  304. package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +19 -0
  305. package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +16 -0
  306. package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +19 -0
  307. package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +18 -0
  308. package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +16 -0
  309. package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +17 -0
  310. package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +17 -0
  311. package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +17 -0
  312. package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +18 -0
  313. package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +21 -0
  314. package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +16 -0
  315. package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +16 -0
  316. package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +9 -0
  317. package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +24 -0
  318. package/pipeline/skills/shared/external/swift-testing-pro/references/async-tests.md +9 -0
  319. package/pipeline/skills/shared/external/swift-testing-pro/references/new-features.md +11 -0
  320. package/pipeline/skills/shared/external/swift-testing-pro/references/writing-better-tests.md +13 -0
  321. package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +8 -0
  322. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +17 -0
  323. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +12 -0
  324. package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +11 -0
  325. package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +7 -0
  326. package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +13 -0
  327. package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +24 -0
  328. package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +12 -0
  329. package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +15 -0
  330. package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +15 -0
  331. package/pipeline/skills/shared/external/swiftui-animation/references/scroll-effects.md +12 -0
  332. package/pipeline/skills/shared/external/swiftui-expert-skill/references/accessibility-patterns.md +11 -0
  333. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-advanced.md +7 -0
  334. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-basics.md +13 -0
  335. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-transitions.md +9 -0
  336. package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts-accessibility.md +9 -0
  337. package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts.md +17 -0
  338. package/pipeline/skills/shared/external/swiftui-expert-skill/references/image-optimization.md +9 -0
  339. package/pipeline/skills/shared/external/swiftui-expert-skill/references/latest-apis.md +10 -0
  340. package/pipeline/skills/shared/external/swiftui-expert-skill/references/layout-best-practices.md +12 -0
  341. package/pipeline/skills/shared/external/swiftui-expert-skill/references/list-patterns.md +12 -0
  342. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-scenes.md +13 -0
  343. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-views.md +12 -0
  344. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-window-styling.md +12 -0
  345. package/pipeline/skills/shared/external/swiftui-expert-skill/references/performance-patterns.md +7 -0
  346. package/pipeline/skills/shared/external/swiftui-expert-skill/references/scroll-patterns.md +9 -0
  347. package/pipeline/skills/shared/external/swiftui-expert-skill/references/sheet-navigation-patterns.md +10 -0
  348. package/pipeline/skills/shared/external/swiftui-expert-skill/references/state-management.md +18 -0
  349. package/pipeline/skills/shared/external/swiftui-expert-skill/references/view-structure.md +16 -0
  350. package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +11 -0
  351. package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +8 -0
  352. package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +14 -0
  353. package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +9 -0
  354. package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +22 -0
  355. package/pipeline/skills/shared/external/swiftui-liquid-glass/references/uikit-glass.md +14 -0
  356. package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +10 -0
  357. package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +10 -0
  358. package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +13 -0
  359. package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +10 -0
  360. package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +14 -0
  361. package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +30 -0
  362. package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +16 -0
  363. package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +11 -0
  364. package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +11 -0
  365. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +10 -0
  366. package/pipeline/skills/shared/external/swiftui-performance-audit/references/code-smells.md +8 -0
  367. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/app-wiring.md +12 -0
  368. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/menu-bar.md +10 -0
  369. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/navigationstack.md +11 -0
  370. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scroll-reveal.md +12 -0
  371. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/sheets.md +14 -0
  372. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/tabview.md +10 -0
  373. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +10 -0
  374. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +13 -0
  375. package/pipeline/skills/shared/external/swiftui-view-refactor/references/mv-patterns.md +12 -0
  376. package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +8 -0
  377. package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +8 -0
  378. package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +14 -0
  379. package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +17 -0
  380. package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +11 -0
  381. package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +11 -0
  382. package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +27 -0
  383. package/pipeline/skills/shared/external/xcode-build-fixer/references/build-settings-best-practices.md +9 -0
  384. package/pipeline/skills/shared/external/xcode-build-fixer/references/fix-patterns.md +7 -0
  385. package/pipeline/skills/shared/external/xcode-build-orchestrator/references/build-settings-best-practices.md +9 -0
  386. package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/build-optimization-sources.md +14 -0
  387. package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/code-compilation-checks.md +8 -0
  388. package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-optimization-sources.md +14 -0
  389. package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-settings-best-practices.md +9 -0
  390. package/pipeline/skills/shared/external/xcode-project-analyzer/references/project-audit-checks.md +13 -0
@@ -0,0 +1,360 @@
1
+ /**
2
+ * qr-code.mjs - a QR Code Model 2 encoder (ISO/IEC 18004), byte mode only.
3
+ *
4
+ * Used by office-pair to show the pairing link on the machine's own screen.
5
+ * Byte mode covers any UTF-8 text; the smallest version that fits the text at
6
+ * the requested error-correction level is chosen, and the mask with the lowest
7
+ * penalty score is applied.
8
+ *
9
+ * Zero runtime dependencies (ADR-0004).
10
+ *
11
+ * @module pipeline/lib/qr-code
12
+ */
13
+
14
+ const ECC_FORMAT_BITS = { L: 1, M: 0, Q: 3, H: 2 };
15
+
16
+ // Per version (index 1..40): error-correction codewords per block, and the
17
+ // number of blocks, for each level (ISO/IEC 18004 table 9).
18
+ const ECC_PER_BLOCK = {
19
+ L: [
20
+ -1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30,
21
+ 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
22
+ ],
23
+ M: [
24
+ -1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28,
25
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
26
+ ],
27
+ Q: [
28
+ -1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30,
29
+ 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30
+ ],
31
+ H: [
32
+ -1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30,
33
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
34
+ ],
35
+ };
36
+ const BLOCKS = {
37
+ L: [
38
+ -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14,
39
+ 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25,
40
+ ],
41
+ M: [
42
+ -1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23,
43
+ 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49,
44
+ ],
45
+ Q: [
46
+ -1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34,
47
+ 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68,
48
+ ],
49
+ H: [
50
+ -1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35,
51
+ 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81,
52
+ ],
53
+ };
54
+
55
+ /** Modules available for data and error correction in a version. */
56
+ export function rawDataModules(version) {
57
+ let n = (16 * version + 128) * version + 64;
58
+ if (version >= 2) {
59
+ const align = Math.floor(version / 7) + 2;
60
+ n -= (25 * align - 10) * align - 55;
61
+ if (version >= 7) n -= 36;
62
+ }
63
+ return n;
64
+ }
65
+
66
+ /** Data codewords of a version at a level. */
67
+ export function dataCodewords(version, ecc) {
68
+ return (
69
+ Math.floor(rawDataModules(version) / 8) - ECC_PER_BLOCK[ecc][version] * BLOCKS[ecc][version]
70
+ );
71
+ }
72
+
73
+ // GF(256) with the QR polynomial x^8 + x^4 + x^3 + x^2 + 1.
74
+ function gfMul(x, y) {
75
+ let z = 0;
76
+ for (let i = 7; i >= 0; i--) {
77
+ z = (z << 1) ^ ((z >>> 7) * 0x11d);
78
+ z ^= ((y >>> i) & 1) * x;
79
+ }
80
+ return z & 0xff;
81
+ }
82
+
83
+ function rsDivisor(degree) {
84
+ const result = new Array(degree).fill(0);
85
+ result[degree - 1] = 1;
86
+ let root = 1;
87
+ for (let i = 0; i < degree; i++) {
88
+ for (let j = 0; j < degree; j++) {
89
+ result[j] = gfMul(result[j], root);
90
+ if (j + 1 < degree) result[j] ^= result[j + 1];
91
+ }
92
+ root = gfMul(root, 0x02);
93
+ }
94
+ return result;
95
+ }
96
+
97
+ /** Reed-Solomon error-correction codewords for one block. */
98
+ export function reedSolomon(data, degree) {
99
+ const divisor = rsDivisor(degree);
100
+ const result = new Array(degree).fill(0);
101
+ for (const b of data) {
102
+ const factor = b ^ result.shift();
103
+ result.push(0);
104
+ divisor.forEach((coef, i) => {
105
+ result[i] ^= gfMul(coef, factor);
106
+ });
107
+ }
108
+ return result;
109
+ }
110
+
111
+ function alignmentPositions(version) {
112
+ if (version === 1) return [];
113
+ const count = Math.floor(version / 7) + 2;
114
+ const size = version * 4 + 17;
115
+ const step = version === 32 ? 26 : Math.ceil((version * 4 + 4) / (count * 2 - 2)) * 2;
116
+ const out = [6];
117
+ for (let pos = size - 7; out.length < count; pos -= step) out.splice(1, 0, pos);
118
+ return out;
119
+ }
120
+
121
+ function bch(value, bits, poly, polyDegree) {
122
+ let rem = value << polyDegree;
123
+ for (let i = bits + polyDegree - 1; i >= polyDegree; i--) {
124
+ if ((rem >>> i) & 1) rem ^= poly << (i - polyDegree);
125
+ }
126
+ return (value << polyDegree) | rem;
127
+ }
128
+
129
+ /** The 15 format bits for a level and mask, already XORed with the fixed mask. */
130
+ export function formatBits(ecc, mask) {
131
+ return bch((ECC_FORMAT_BITS[ecc] << 3) | mask, 5, 0x537, 10) ^ 0x5412;
132
+ }
133
+
134
+ function codewords(bytes, version, ecc) {
135
+ const capacityBits = dataCodewords(version, ecc) * 8;
136
+ const bits = [];
137
+ const put = (value, length) => {
138
+ for (let i = length - 1; i >= 0; i--) bits.push((value >>> i) & 1);
139
+ };
140
+ put(0b0100, 4);
141
+ put(bytes.length, version < 10 ? 8 : 16);
142
+ for (const b of bytes) put(b, 8);
143
+ put(0, Math.min(4, capacityBits - bits.length));
144
+ put(0, (8 - (bits.length % 8)) % 8);
145
+ for (let pad = 0xec; bits.length < capacityBits; pad ^= 0xec ^ 0x11) put(pad, 8);
146
+ const data = [];
147
+ for (let i = 0; i < bits.length; i += 8) {
148
+ data.push(bits.slice(i, i + 8).reduce((a, b) => (a << 1) | b, 0));
149
+ }
150
+
151
+ const blocks = BLOCKS[ecc][version];
152
+ const eccLen = ECC_PER_BLOCK[ecc][version];
153
+ const raw = Math.floor(rawDataModules(version) / 8);
154
+ const shortBlocks = blocks - (raw % blocks);
155
+ const shortLen = Math.floor(raw / blocks);
156
+ const groups = [];
157
+ for (let i = 0, k = 0; i < blocks; i++) {
158
+ const len = shortLen - eccLen + (i < shortBlocks ? 0 : 1);
159
+ const chunk = data.slice(k, k + len);
160
+ k += len;
161
+ groups.push({ data: chunk, ecc: reedSolomon(chunk, eccLen) });
162
+ }
163
+ const out = [];
164
+ for (let i = 0; i <= shortLen - eccLen; i++) {
165
+ for (const g of groups) if (i < g.data.length) out.push(g.data[i]);
166
+ }
167
+ for (let i = 0; i < eccLen; i++) for (const g of groups) out.push(g.ecc[i]);
168
+ return out;
169
+ }
170
+
171
+ const MASKS = [
172
+ (x, y) => (x + y) % 2 === 0,
173
+ (x, y) => y % 2 === 0,
174
+ (x) => x % 3 === 0,
175
+ (x, y) => (x + y) % 3 === 0,
176
+ (x, y) => (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0,
177
+ (x, y) => ((x * y) % 2) + ((x * y) % 3) === 0,
178
+ (x, y) => (((x * y) % 2) + ((x * y) % 3)) % 2 === 0,
179
+ (x, y) => (((x + y) % 2) + ((x * y) % 3)) % 2 === 0,
180
+ ];
181
+
182
+ function baseMatrix(version) {
183
+ const size = version * 4 + 17;
184
+ const dark = Array.from({ length: size }, () => new Array(size).fill(false));
185
+ const fixed = Array.from({ length: size }, () => new Array(size).fill(false));
186
+ const set = (x, y, v) => {
187
+ dark[y][x] = v;
188
+ fixed[y][x] = true;
189
+ };
190
+ for (let i = 0; i < size; i++) {
191
+ set(6, i, i % 2 === 0);
192
+ set(i, 6, i % 2 === 0);
193
+ }
194
+ const finder = (cx, cy) => {
195
+ for (let dy = -4; dy <= 4; dy++) {
196
+ for (let dx = -4; dx <= 4; dx++) {
197
+ const x = cx + dx;
198
+ const y = cy + dy;
199
+ if (x < 0 || y < 0 || x >= size || y >= size) continue;
200
+ const d = Math.max(Math.abs(dx), Math.abs(dy));
201
+ set(x, y, d !== 2 && d !== 4);
202
+ }
203
+ }
204
+ };
205
+ finder(3, 3);
206
+ finder(size - 4, 3);
207
+ finder(3, size - 4);
208
+ const align = alignmentPositions(version);
209
+ for (const ay of align) {
210
+ for (const ax of align) {
211
+ const corner =
212
+ (ax === 6 && ay === 6) || (ax === 6 && ay === size - 7) || (ax === size - 7 && ay === 6);
213
+ if (corner) continue;
214
+ for (let dy = -2; dy <= 2; dy++) {
215
+ for (let dx = -2; dx <= 2; dx++) {
216
+ set(ax + dx, ay + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1);
217
+ }
218
+ }
219
+ }
220
+ }
221
+ for (let i = 0; i < 9; i++) {
222
+ fixed[8][i] = fixed[i][8] = true;
223
+ if (i < 8) fixed[8][size - 1 - i] = fixed[size - 1 - i][8] = true;
224
+ }
225
+ set(8, size - 8, true);
226
+ if (version >= 7) {
227
+ const v = bch(version, 6, 0x1f25, 12);
228
+ for (let i = 0; i < 18; i++) {
229
+ const bit = ((v >>> i) & 1) === 1;
230
+ const a = size - 11 + (i % 3);
231
+ const b = Math.floor(i / 3);
232
+ set(a, b, bit);
233
+ set(b, a, bit);
234
+ }
235
+ }
236
+ return { size, dark, fixed };
237
+ }
238
+
239
+ function drawFormat(dark, size, ecc, mask) {
240
+ const f = formatBits(ecc, mask);
241
+ const bit = (i) => ((f >>> i) & 1) === 1;
242
+ for (let i = 0; i <= 5; i++) dark[i][8] = bit(i);
243
+ dark[7][8] = bit(6);
244
+ dark[8][8] = bit(7);
245
+ dark[8][7] = bit(8);
246
+ for (let i = 9; i < 15; i++) dark[8][14 - i] = bit(i);
247
+ for (let i = 0; i < 8; i++) dark[8][size - 1 - i] = bit(i);
248
+ for (let i = 8; i < 15; i++) dark[size - 15 + i][8] = bit(i);
249
+ dark[size - 8][8] = true;
250
+ }
251
+
252
+ function placeData(dark, fixed, size, words) {
253
+ let i = 0;
254
+ const total = words.length * 8;
255
+ for (let right = size - 1; right >= 1; right -= 2) {
256
+ if (right === 6) right = 5;
257
+ for (let vert = 0; vert < size; vert++) {
258
+ for (let j = 0; j < 2; j++) {
259
+ const x = right - j;
260
+ const upward = ((right + 1) & 2) === 0;
261
+ const y = upward ? size - 1 - vert : vert;
262
+ if (fixed[y][x] || i >= total) continue;
263
+ dark[y][x] = ((words[i >>> 3] >>> (7 - (i & 7))) & 1) === 1;
264
+ i++;
265
+ }
266
+ }
267
+ }
268
+ }
269
+
270
+ /** The ISO penalty score of a finished matrix: runs, 2x2 blocks, finder-like patterns, balance. */
271
+ export function penalty(dark) {
272
+ const size = dark.length;
273
+ let score = 0;
274
+ const lineScore = (get) => {
275
+ let s = 0;
276
+ for (let a = 0; a < size; a++) {
277
+ let run = 1;
278
+ for (let b = 1; b <= size; b++) {
279
+ if (b < size && get(a, b) === get(a, b - 1)) {
280
+ run++;
281
+ } else {
282
+ if (run >= 5) s += run - 2;
283
+ run = 1;
284
+ }
285
+ }
286
+ for (let b = 0; b + 10 < size; b++) {
287
+ const seq = Array.from({ length: 11 }, (_, k) => get(a, b + k));
288
+ const p1 = [1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0];
289
+ const p2 = [0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1];
290
+ if (seq.every((v, k) => v === Boolean(p1[k])) || seq.every((v, k) => v === Boolean(p2[k])))
291
+ s += 40;
292
+ }
293
+ }
294
+ return s;
295
+ };
296
+ score += lineScore((a, b) => dark[a][b]);
297
+ score += lineScore((a, b) => dark[b][a]);
298
+ let darkCount = 0;
299
+ for (let y = 0; y < size; y++) {
300
+ for (let x = 0; x < size; x++) {
301
+ if (dark[y][x]) darkCount++;
302
+ if (
303
+ y + 1 < size &&
304
+ x + 1 < size &&
305
+ dark[y][x] === dark[y][x + 1] &&
306
+ dark[y][x] === dark[y + 1][x] &&
307
+ dark[y][x] === dark[y + 1][x + 1]
308
+ )
309
+ score += 3;
310
+ }
311
+ }
312
+ const total = size * size;
313
+ score += (Math.ceil(Math.abs(darkCount * 20 - total * 10) / total) - 1) * 10;
314
+ return score;
315
+ }
316
+
317
+ /**
318
+ * Encode text as a QR code.
319
+ *
320
+ * @param {string} text
321
+ * @param {{ecc?: "L"|"M"|"Q"|"H", mask?: number}} [opts] mask forces one of 0..7
322
+ * @returns {{version: number, size: number, ecc: string, mask: number, modules: boolean[][]}}
323
+ */
324
+ export function encodeQr(text, { ecc = "M", mask } = {}) {
325
+ if (!ECC_PER_BLOCK[ecc]) throw new Error(`unknown error-correction level ${ecc}`);
326
+ const bytes = [...Buffer.from(String(text), "utf8")];
327
+ let version = 1;
328
+ const fits = (v) => 4 + (v < 10 ? 8 : 16) + bytes.length * 8 <= dataCodewords(v, ecc) * 8;
329
+ while (version <= 40 && !fits(version)) version++;
330
+ if (version > 40) throw new Error("text is too long for a QR code");
331
+ const words = codewords(bytes, version, ecc);
332
+ const { size, dark, fixed } = baseMatrix(version);
333
+ placeData(dark, fixed, size, words);
334
+ const candidates = Number.isInteger(mask) ? [mask] : [0, 1, 2, 3, 4, 5, 6, 7];
335
+ let best = null;
336
+ for (const m of candidates) {
337
+ const grid = dark.map((row, y) => row.map((v, x) => (fixed[y][x] ? v : v !== MASKS[m](x, y))));
338
+ drawFormat(grid, size, ecc, m);
339
+ const score = penalty(grid);
340
+ if (!best || score < best.score) best = { score, grid, mask: m };
341
+ }
342
+ return { version, size, ecc, mask: best.mask, modules: best.grid };
343
+ }
344
+
345
+ /** The code as one SVG path (one unit per module, a four-module quiet zone). */
346
+ export function qrSvg(qr, { scale = 6 } = {}) {
347
+ const q = 4;
348
+ const n = qr.size + q * 2;
349
+ let d = "";
350
+ qr.modules.forEach((row, y) =>
351
+ row.forEach((on, x) => {
352
+ if (on) d += `M${x + q} ${y + q}h1v1h-1z`;
353
+ }),
354
+ );
355
+ return (
356
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}" width="${n * scale}" ` +
357
+ `height="${n * scale}" shape-rendering="crispEdges"><rect width="${n}" height="${n}" ` +
358
+ `fill="#fff"/><path d="${d}" fill="#000"/></svg>`
359
+ );
360
+ }
@@ -41,6 +41,7 @@ MA_HYGIENE_END='# <<< multi-agent pipeline (managed) <<<'
41
41
  ma_hygiene_patterns() {
42
42
  cat <<'PATTERNS'
43
43
  .worktrees/
44
+ .DerivedData/
44
45
  .pipeline/
45
46
  .multi-agent/
46
47
  triage-output.json
@@ -11,6 +11,8 @@
11
11
  * `commit.sha`, a `pr`, a runner `publish` record, a `projects[].commit`
12
12
  * or `projects[].pr`, or an explicit no-commit decision
13
13
  * (`phases["4"].status: "skipped"` with a `notes` reason).
14
+ * A repo commit counts as delivered once its push outcome is recorded
15
+ * (`projects[].pushStatus`) or it has a pull request.
14
16
  * 3. The plan's coverage was judged, unless the mode declares
15
17
  * `commits: false`: a `plan-coverage` entry in `gates[]` with a passing
16
18
  * verdict. plan-coverage-gate.mjs records it attended and unattended.
@@ -101,6 +103,16 @@ export function phase4Evidence(state) {
101
103
  return Boolean(p4 && p4.status === "skipped" && typeof p4.notes === "string" && p4.notes.trim());
102
104
  }
103
105
 
106
+ const PUSH_RECORDED = new Set(["pushed", "rebase-pushed", "skipped"]);
107
+
108
+ /** Repos whose commit has neither a recorded push outcome nor a pull request. */
109
+ export function unpushedRepos(state) {
110
+ const projects = Array.isArray(state.projects) ? state.projects : [];
111
+ return projects
112
+ .filter((p) => p && hasSha(p.commit) && !hasPr(p.pr) && !PUSH_RECORDED.has(p.pushStatus))
113
+ .map((p, i) => p.project || p.name || `#${i + 1}`);
114
+ }
115
+
104
116
  /** True when a passing plan-coverage verdict is in the gate ledger. */
105
117
  export function planCoverageRecorded(state) {
106
118
  const gates = Array.isArray(state.gates) ? state.gates : [];
@@ -138,6 +150,11 @@ export function completionGaps(state) {
138
150
  'no Phase 4 evidence: record commit.sha (or pr), or the no-commit decision as phases["4"] = {status: "skipped", notes: "<why>"}',
139
151
  );
140
152
  }
153
+ for (const name of unpushedRepos(state)) {
154
+ gaps.push(
155
+ `repo ${name} has a commit with no recorded push: set projects[].pushStatus to "pushed" or "rebase-pushed", or "skipped" when the push is left to the user (Phase 4 push policy)`,
156
+ );
157
+ }
141
158
  if (!planCoverageRecorded(state)) {
142
159
  gaps.push(
143
160
  "no passing plan-coverage verdict in gates[]: run plan-coverage-gate.mjs --state <agent-state.json> (Phase 4 Step 0a)",
@@ -0,0 +1,146 @@
1
+ # Channels - Generator (Step 5 section bodies)
2
+
3
+ > Loaded by `channels/SKILL.md` Step 5. The SKILL keeps the Jira-vs-PR body rule, the section-order rule and the target length rule; this file carries the content-option table, the aggregated output template, the store-compliance augmentation, and the work-summary and cost-summary generators. Read it before generating any section body.
4
+
5
+ ## Content options
6
+
7
+ | Content option | Generated section |
8
+ |---|---|
9
+ | Normal analiz | `### Analysis` - impact summary from Phase 1, risks from Phase 4 (pipeline-log source, high-level only) |
10
+ | Teknik analiz | `### Technical Details` - Changes (what/why per file group), Architecture (structural decisions, pattern changes), Dependencies (new imports/frameworks/packages). Source: Phase 1 planning + Phase 2 dev log + `git diff --stat`. **PR and Confluence only** - never rendered into a Jira comment. |
11
+ | Test senaryoları | `### Test Scenarios` - precondition / steps / expected table (4-8 rows), user perspective |
12
+ | Test Koşumu (Xray) | `### Test Koşumu` - Xray Test Execution of the task's UI scenario run (`channels/test-run.md`) |
13
+ | Auto-diff | Old enrich Output Template verbatim - Root Cause / Solution / Changed Files / Test Scenarios |
14
+ | Manuel not | `### Notes` - user-provided paragraph, or LLM-split into subsections if `--message` is plain text and long |
15
+ | Cost özeti | `### Cost Summary` - per-phase token tally + est. USD table. Source: `phase-tracker.sh` phase status + optional OTel spans. See "Cost summary generation" below. |
16
+ | Yapılan iş özeti | `### Work Summary` - executive one-screen summary: task + branch + base + PR, scope delivered (done/[pending] per Phase 2 task), changed files with +/- counts (capped at 20 rows), review outcome (accepted/deferred/rejected + approved), phase tick strip. Source: `agent-state.json` + `phase-tracker.json` + `git diff --numstat base...HEAD`. See "Work summary generation" below. |
17
+
18
+ ## Output template
19
+
20
+ **Output template (aggregated across selected content options):**
21
+
22
+ ```markdown
23
+ ### Analysis ← if "Normal analiz" selected
24
+ {impact summary, risks - from pipeline log, high-level}
25
+
26
+ ### Technical Details ← if "Teknik analiz" selected
27
+ #### Changes
28
+ {Per changed-file-group, what changed + why - from Phase 2 dev log}
29
+ #### Architecture
30
+ {Structural decisions, pattern changes, new file layouts - from Phase 1 plan}
31
+ #### Dependencies
32
+ {New imports / frameworks / packages - from git diff --stat, or "None"}
33
+
34
+ ### Root Cause ← if "Auto-diff" selected
35
+ {single paragraph - from diff}
36
+
37
+ - `path/to/File.ext → funcName`: {why it broke}
38
+
39
+ ### Solution ← if "Auto-diff" selected
40
+ - `path/to/File.ext:LINE-LINE` - {change, one line}
41
+
42
+ ### Changed Files ← if "Auto-diff" selected
43
+ | File | +/- |
44
+ |------|-----|
45
+ | `path/to/File.ext` | +N / -M |
46
+
47
+ ### Test Scenarios ← if "Test senaryoları" OR "Auto-diff" selected
48
+ **1. {what this scenario exercises}**
49
+ 1. {step the tester performs}
50
+ 2. **Expected:** {what they should see}
51
+
52
+ **2. {regression scenario}**
53
+ 1. {step}
54
+ 2. **Expected:** {what should still behave as before}
55
+
56
+ ### Test Koşumu ← if "Test Koşumu (Xray)" selected
57
+
58
+ ### Notes ← if "Manuel not" selected
59
+ {user message}
60
+
61
+ ### Work Summary ← if "Yapılan iş özeti" selected
62
+ {executive scope + files + review + phases block - see "Work summary generation" below}
63
+
64
+ ### Cost Summary ← if "Cost özeti" selected
65
+ {per-phase token + USD table - see "Cost summary generation" below}
66
+
67
+ ### Store compliance ← auto-appended if cached compliance report exists
68
+ {summary line - see below}
69
+
70
+ Ref: {jiraId}
71
+ ```
72
+
73
+ **Store compliance auto-augmentation:**
74
+
75
+ After the content-selected sections are generated, check for a recent compliance report cached from `/multi-agent:test "store-ready"`:
76
+
77
+ ```bash
78
+ # Cache locations (newest wins; expire after 6h to avoid stale cross-branch reports)
79
+ find /tmp -maxdepth 1 -name 'archiveguard-*.json' -o -name 'play-compliance-*.json' \
80
+ -newermt "-6 hours" -print 2>/dev/null | head -1
81
+ ```
82
+
83
+ If a cached report exists AND any of the selected channels is PR / Jira / Confluence, append an auto-summary section:
84
+
85
+ | Blocker count | Appended line |
86
+ |---|---|
87
+ | `errors > 0` | `### Store compliance` + `{N} blocker(s), {M} warning(s) - run /multi-agent:test "store-ready" for the full report.` - per-blocker: `- \`{ruleID}\` - {Apple ITMS / Play ref}: {message}` (capped at 5 rows, rest collapsed to `+N more`) |
88
+ | `errors == 0, warnings > 0` | `### Store compliance` + `[done] No blockers. {M} warning(s) - see /multi-agent:test "store-ready" for detail.` |
89
+ | `errors == 0, warnings == 0` | Skip section entirely - don't pollute PR body |
90
+
91
+ The section references `ruleID` + policy ref from the compliance skill catalogs (`apple-archive-compliance` / `google-play-compliance`) verbatim. No translation - global identifiers stay as-is.
92
+
93
+ If no cached report exists, skip silently - this is augmentation, not a gate.
94
+
95
+ **Work summary generation:**
96
+
97
+ Emitted only when `reportContent.workSummary === true` and at least one of (`agent-state.json`, `--branch` flag) is available. The shell adapter is `$HOME/.claude/scripts/render-work-summary.sh <taskId>`, and that script's own header is the spec for what it emits - task header, scope delivered, changed files, review outcome, phase strip - including the caps and the hidden-when-empty rules. Exit 2 means the state was unreadable: skip the section, do not substitute a hand-written one.
98
+
99
+ **Output template:**
100
+
101
+ ```markdown
102
+ ### Work Summary
103
+ **Task**: `PROJ-1099` | **Branch**: `bugfix/PROJ-1099-dark-mode` | **Base**: `develop` | **PR**: #104
104
+
105
+ #### Scope delivered
106
+ - [done] T1 Add failing dark-mode snapshot test
107
+ - [done] T2 Replace Color.white with design token
108
+
109
+ #### Changed files (3 files · +48 / -12)
110
+ - `Sources/Auth/LoginView.swift` (+24 / -8)
111
+ - `Sources/Auth/LoginViewTests.swift` (+22 / -4)
112
+ - `Sources/DesignSystem/Color+Tokens.swift` (+2 / -0)
113
+
114
+ #### Review outcome
115
+ - 1 accepted · 0 deferred · 0 rejected · approved=true
116
+
117
+ #### Phases
118
+ - 0 Init [done] · 1 Plan [done] · 2 Dev [done] · 3 Review [done] · 4 Commit [done] · 5 Report active
119
+ ```
120
+
121
+ **Post-hoc invocation** (task already finished, agent-state.json may be archived): pass `--branch` + `--base-branch` explicitly - the script still emits task header + changed-files + phases sections (scope + review outcome are state-dependent and will be absent if state is gone).
122
+
123
+ **Cost summary generation:**
124
+
125
+ Emitted only when `reportContent.costSummary === true` and tracker data is available. Source of truth is `phase-tracker.sh`:
126
+
127
+ 1. **Token tallies per phase** - `render-cost-summary.sh <taskId>` resolves the tracker JSON itself: worktree candidates (`.worktrees/{taskPath}/phase-tracker.json`) first, then the standard location `$HOME/.claude/logs/multi-agent/{taskId}/tracker-state.json` that `phase-tracker.sh` actually writes. Each phase row carries `{tokens_in, tokens_out}`.
128
+ 2. **Fallback to OTel spans** - if tracker JSON has no token columns but `otel-spans.jsonl` exists (set `MULTI_AGENT_OTEL_SPANS=1` beforehand), aggregate `phase.tokens` spans by phase ID.
129
+ 3. **USD estimate** - uses a static price table in `$HOME/.claude/scripts/cost-table.json` (model → $/Mtok_in, $/Mtok_out). Missing model → show ` - ` for USD, never block.
130
+
131
+ **Output template:**
132
+
133
+ ```markdown
134
+ ### Cost Summary
135
+ | Phase | Model | Tokens in | Tokens out | Est. USD |
136
+ |-------|-------|-----------|------------|----------|
137
+ | 1. Analysis | opus | 12,480 | 3,210 | $0.42 |
138
+ | 2. Planning | opus | 18,904 | 5,120 | $0.66 |
139
+ | 3. Dev | sonnet | 42,310 | 9,880 | $0.27 |
140
+ | 4. Review | opus | 21,050 | 4,720 | $0.66 |
141
+ | **Total** | | **94,744** | **22,930** | **$2.04** |
142
+ ```
143
+
144
+ Generated by `$HOME/.claude/scripts/render-cost-summary.sh <task-id>` using prices from `$HOME/.claude/scripts/cost-table.json`. The channels adapter shells out to this renderer - doc table is illustrative only, runtime is authoritative.
145
+
146
+ **Precision rules:** tokens as thousand-separated integers. USD rounded to 2 dp (`printf '$%.2f'`). Rows with zero tokens dropped. If total USD is ` - ` (no price for any model), replace the total row USD cell with ` - ` and add a one-line footnote: `*USD unavailable - add model to cost-table.json*`.
@@ -132,7 +132,7 @@ gh issue comment "$ISSUE_NUMBER" --repo "$ORG/$REPO" --body-file /tmp/channels-$
132
132
  bash $HOME/.claude/scripts/update-issue-progress.sh "$TASK_ID"
133
133
  ```
134
134
 
135
- If either call fails, the channel adapter MUST NOT mark the issue channel as completed in `agent-state.json`. The user sees a clear error and can retry.
135
+ If either call fails, the channel adapter MUST NOT mark the issue channel as completed in `agent-state.json`. The user sees a clear error and can retry. The order is enforced: `update-issue-progress.sh` exits 5 and leaves the body unchanged unless the authenticated account has a comment on the issue since `state.startedAt` that carries the `Ref: #N` footer.
136
136
 
137
137
  ## Drift detection
138
138
 
@@ -0,0 +1,55 @@
1
+ # Channels - Menu (Step 2 sources, Step 3a preview, Step 3b picker rules)
2
+
3
+ > Loaded by `channels/SKILL.md` Step 2. The SKILL keeps the step order and the autopilot rule; this file carries the context-source table, the summary-first preview logic, the greyed-out rules and the first-run defaults. Read it before Step 2.
4
+
5
+ ## Step 2 - Context sources
6
+
7
+ Automatic. The generator picks the best-available source:
8
+
9
+ | Source | Available when | Used for |
10
+ |---|---|---|
11
+ | **Pipeline log** | `$HOME/.claude/logs/multi-agent/<project>/<task-id>/agent-log.md` exists AND matches `jiraId` | "Normal analiz" + "Test senaryoları" content options - uses Phase 1/2/4 output verbatim |
12
+ | **PR diff** | PR exists, diff fetchable (`gh pr diff` or Bitbucket `/diff?contextLines=5`) | "Auto-diff summary" content option - old enrich behavior |
13
+ | **Manual message** | `--message` / `--message-file` provided | Replaces both sources - user text is canonical |
14
+
15
+ ## Step 3a - Work Summary preview (summary-first flow)
16
+
17
+ **Runs only when** (a) `agent-state.json` exists for the task AND (b) a Work Summary can be generated (same availability rule as the "Yapılan iş özeti" content row). Purpose: give the user an instant "what did this ship?" answer BEFORE they pick channels. They see the outcome first, then decide where to route it - instead of the reverse.
18
+
19
+ ```bash
20
+ preview=$(bash $HOME/.claude/scripts/render-work-summary.sh "$TASK_ID" 2>/dev/null || true)
21
+ [ -n "$preview" ] && {
22
+ printf '%s\n\n' "$preview"
23
+ # Auto-tick workSummary content row when preview was shown.
24
+ # Users can still untick it in 3b if they don't want to re-send the same
25
+ # block to remote channels (useful when preview was enough for a look).
26
+ content_defaults.workSummary=true
27
+ }
28
+ ```
29
+
30
+ When the preview renders:
31
+ - **workSummary** row in 3b is **auto-ticked** (user can still uncheck).
32
+ - Previous `prefs.global.reportContent.workSummary` value is respected - if the user had explicitly unticked in a prior run, the auto-tick is **suppressed** and the ticked state matches the pref.
33
+
34
+ When the preview does NOT render (no state, or pref explicitly off at global level with no override):
35
+ - Skip 3a silently, go straight to the channels picker. The workSummary row in 3b stays at its pref default (`false`).
36
+
37
+ After the preview prints, 3b renders the two pickers: **Channels** (PR description, Jira comment, Confluence page, Wiki, Board; each unavailable one greyed with its reason) and **Content** (normal analysis, technical analysis, test scenarios, test run, PR auto-diff, manual note, cost summary, work summary).
38
+
39
+ **Why auto-tick:** the user just saw the summary and is most likely sending it; the explicit pref still wins.
40
+
41
+ ## Step 3b - Channel + content picker
42
+
43
+ **Greyed-out rules:**
44
+ - "Wiki" unselectable unless `state.taskType === "component"` AND `figmaConfig.wiki.enabled === true`. If greyed, show reason: `"(no figma-config or taskType != component)"`.
45
+ - "Board" unselectable unless `figmaConfig.board.enabled === true` AND `figmaConfig.board.provider === "github-projects-v2"` AND `figmaConfig.github.projectV2Id` set. If greyed, show reason: `"(no figma-config.board or projectV2Id missing)"`. Default target column: `inReview`.
46
+ - "Normal analiz" + "Test senaryoları" unselectable if no pipeline log found. Reason: `"(no pipeline log for PROJ-12345)"`.
47
+ - "Teknik analiz" unselectable if no Phase 1 planning log AND no PR diff available. Reason: `"(no technical source - need Phase 1 plan or PR diff)"`.
48
+ - "Auto-diff" unselectable if no PR found. Reason: `"(no PR linked to this target)"`.
49
+ - "Manuel not" always available. "Test Koşumu (Xray)": `channels/test-run.md`.
50
+ - "Cost özeti" unselectable if `phase-tracker.sh cost total` prints `-` (no priced token tallies; there is no `status` action) AND no `otel-spans.jsonl` exists for the task. Reason: `"(no tracker data - set MULTI_AGENT_OTEL_SPANS=1 or enable token tracking)"`.
51
+ - "Yapılan iş özeti" unselectable if no `agent-state.json` exists for the task (post-hoc call with `--branch` + `--base-branch` flags restores partial availability). Reason: `"(no agent-state.json for {taskId})"`. **Auto-ticked** when Step 3a preview was shown - user can still uncheck before confirming the menu.
52
+
53
+ **Defaults (first run):** PR + Jira ticked, Confluence + Wiki unticked. Content: auto-diff if pipeline log missing; otherwise normal-analiz + test-senaryoları.
54
+
55
+ Saved to `prefs.global.reportChannels` and `prefs.global.reportContent` - next run uses these as defaults.
@@ -13,3 +13,9 @@
13
13
  **Target enumeration:** `channels-multi-repo.sh targets <state>` returns a JSON array `[{repoName, prUrl, prNumber, isPrimary, crossLinks}]` for the dispatch loop. Single-repo tasks return one entry with empty `crossLinks` - every render-* call falls through to the body unchanged, so the loop is uniform across single-repo and multi-repo paths.
14
14
 
15
15
  **Logging hint:** `channels-multi-repo.sh summary <state>` produces a one-line autopilot log entry (`1 primary (foo) + 2 extras: <url> <url>` or `single-repo task`).
16
+
17
+ ## Target resolution (Step 1)
18
+
19
+ **Multi-repo:** when `agent-state.json` `projects[].length > 1`, Step 1 builds **one target per project**. Each project's PR is resolved via `pr` field in its projects[] entry; if missing, the Jira/Issue link query returns multiple PRs (one per repo) - all are added to `targets[]`. The project at `projects[0]` (or whose name matches `state.project`) is marked `isPrimary: true`; others are `isPrimary: false`.
20
+
21
+ For single-repo tasks, `targets` has exactly one entry. The rest of the flow is target-aware: Step 5 generates one body, Step 7 dispatches to each target, with cross-links (see the dispatch table above).
@@ -0,0 +1,25 @@
1
+ # Channels - Preview render (Step 6)
2
+
3
+ > Loaded by `channels/SKILL.md` Step 6. The SKILL keeps the approval gate, its skip cases, its options and the byte-identical rule; this file carries the per-channel markup conversion, the preview block layout and the secondary-artifact intents. Read it before rendering the Step 6 preview.
4
+
5
+ Conversion is per-channel; two channels have none:
6
+
7
+ | Channel | Conversion after approval | Table |
8
+ |---|---|---|
9
+ | PR description | **none** - posted as Markdown, verbatim | GitHub / Bitbucket / GitLab all render Markdown; see `channels/pr.md` "Markup dialect" |
10
+ | GitHub issue comment | **none** - posted as Markdown, verbatim | - |
11
+ | Jira comment | markdown → Jira wiki markup | `channels/jira.md` "Wiki markup conversion" |
12
+ | Confluence page | markdown → storage format | `channels/confluence.md` "Body conversion" |
13
+
14
+ The Jira table is the only *text* markup table in the doc set and never applies to the PR body: `h2.`, `{{code}}` or `#`-numbered lists render there as raw wiki markup.
15
+
16
+ ```
17
+ ── PR description ({repoName} #{prNumber}, replace) ─────────
18
+ {body}
19
+ ── Jira comment ({jiraId}) ──────────────────────────────────
20
+ {body}
21
+ ── Confluence page ("{title}" under {parentUrl}) ────────────
22
+ {body}
23
+ ```
24
+
25
+ Secondary artifacts ride along as one-line intents at the bottom of the preview: Wiki page list, wiki → Jira triad comment (when Wiki is selected and the triad is active per `$HOME/.claude/multi-agent-refs/issue-jira-triad.md`), Board status move (`{from} → {to}`), GitHub issue comment + Progress-flag sync (Phase 5 Step 1.5 - same gate, see `$HOME/.claude/multi-agent-refs/phases/phase-5-report.md`), test-run candidates to untick (`channels/test-run.md`), the Jira body's `--measure` (`render-jira-evidence.mjs`).