@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,98 @@
1
+ # Channels - Input forms, flags, summary format, error handling, cross-CLI parity, examples
2
+
3
+ > Loaded by `channels/SKILL.md`. Read the flag table and the error-handling table before Step 1 and whenever a target, a token or a precondition fails; the parity notes and examples are for orientation.
4
+
5
+ ## Input forms
6
+
7
+ ```
8
+ /multi-agent:channels # cwd + current branch
9
+ /multi-agent:channels PROJ-12345 # Jira ID
10
+ /multi-agent:channels #42 # GitHub issue/PR number
11
+ /multi-agent:channels https://github.com/<org>/<repo>/pull/N
12
+ /multi-agent:channels https://<bitbucket-host>/projects/.../pull-requests/N
13
+ /multi-agent:channels https://<jira-host>/browse/PROJ-12345
14
+
15
+ /multi-agent:channels PROJ-12345 --channels jira,confluence # non-interactive channel
16
+ /multi-agent:channels PROJ-12345 --content auto-diff # non-interactive content
17
+ /multi-agent:channels PROJ-12345 --message "root: ..." # manual source
18
+ /multi-agent:channels PROJ-12345 --message-file notes.md # manual, long
19
+ /multi-agent:channels PROJ-12345 --dry-run # preview, no POST
20
+ ```
21
+
22
+ ## Flags
23
+
24
+ | Flag | Effect |
25
+ |------|--------|
26
+ | `--channels pr,jira,confluence,wiki` | Non-interactive channel selection (comma list). Skips channel menu. |
27
+ | `--content normal,technical,test,auto-diff,note,test-run` | Non-interactive content selection. Skips content menu. |
28
+ | `--flow-run <runId>[,<runId>...]` | Runs for the test run block (`channels/test-run.md`). |
29
+ | `--message "..."` | Manual mode - use user text as source, no diff read. Forces `content=note`. |
30
+ | `--message-file path` | Manual mode, long message from file. |
31
+ | `--append` | PR description: append instead of replace. |
32
+ | `--dry-run` | Generate, print to stdout, do not POST. |
33
+ | `--lang=tr\|en\|both` | Output language override (default: `en`; `promptLanguage` is locked to `en`). |
34
+ | `--ready` | If PR draft, promote to READY after channels dispatch. |
35
+
36
+ ## Step 8 summary format
37
+
38
+ ```
39
+ channels dispatch complete
40
+ PR description ✓ version 3→4, reviewers 23 preserved
41
+ Jira comment ✓ posted → <jira-url>?focusedCommentId=2484780
42
+ Confluence - skipped: user declined
43
+ Wiki ✓ 3 files via github-wiki adapter
44
+ Board ✓ In Develop → In Review (project #4)
45
+ ```
46
+
47
+ ## Error handling
48
+
49
+ | Condition | Behavior |
50
+ |-----------|----------|
51
+ | No target resolvable | Error, exit 1 |
52
+ | PR not found + Jira selected | Proceed Jira-only, log reason |
53
+ | PR merged/closed | Warn, confirm continue |
54
+ | Author bot / dependabot | Skip entire run |
55
+ | Diff > 2 MB | Ask: skip / top-20-files / cancel |
56
+ | No pipeline log + "Normal analiz" selected | Greyed out at menu; if forced via `--content`, error |
57
+ | Bitbucket PR version mismatch | Refetch once, retry; fail on second mismatch |
58
+ | Jira token missing/expired | Token Save Flow inline; skip on user-skip |
59
+ | Wiki preconditions not met | Case B menu per `$HOME/.claude/multi-agent-refs/wiki-capture.md` |
60
+
61
+ ## Cross-CLI parity
62
+
63
+ | CLI | Command name | Invocation |
64
+ |---|---|---|
65
+ | Claude Code | `/multi-agent:channels` | Slash namespace (colon) |
66
+ | Copilot CLI | `multi-agent-channels` | Top-level command (dash-separated, no namespace support) |
67
+
68
+ Both installations read the same source file (`$HOME/.claude/commands/multi-agent/channels/SKILL.md`) - `install.js --all` copies to:
69
+ - `~/.claude/commands/multi-agent/channels/SKILL.md`
70
+ - `~/.copilot/commands/multi-agent-channels.md`
71
+
72
+ Prompts MUST be byte-identical. `smoke-cross-cli-behavior.sh` asserts this - spacing, brackets, numbering, log-line format.
73
+
74
+ Progress emission on Copilot (no native TaskCreate UI): `bash ~/.copilot/scripts/phase-tracker.sh sub 5 <N> "<step>" <status>` - same shape as Phase 5.
75
+
76
+ ## Examples
77
+
78
+ ```
79
+ /multi-agent:channels
80
+ → resolves from cwd+branch → PROJ-12345 + PR #3433
81
+ → menu: PR ✓ Jira ✓ / Normal analiz ✓ Test senaryoları ✓
82
+ → PR description replaced (v3→4, 23 reviewers preserved)
83
+ → Jira comment posted (id 2484780)
84
+ → Confluence - Wiki -
85
+
86
+ /multi-agent:channels PROJ-12345 --channels confluence --content note --message-file notes.md
87
+ → non-interactive: only Confluence, content from notes.md
88
+ → asks: parent page URL (or recent [1] / [2])
89
+ → page created → https://<host>/pages/12345
90
+
91
+ /multi-agent:channels https://<bitbucket>/.../pull-requests/42 --dry-run
92
+ → resolves → PROJ-67890
93
+ → prints Jira + PR body preview to stdout, no POST
94
+
95
+ /multi-agent:channels --message "root: order id empty, UI silent. fix: length>0 guard in HomeVC.m"
96
+ → auto-diff from cwd+branch PR + user note combined
97
+ → posts to default channels (PR + Jira)
98
+ ```
@@ -32,7 +32,7 @@ Trigger 2 is the key addition over the plain build-retry cap: a build can "fail
32
32
  | Trigger | Evaluated by | Status |
33
33
  |---|---|---|
34
34
  | 2, finding half | `review-delta.mjs` exit 3 at Phase 3 Step 3.8: a blocking/important finding whose `fingerprint` (finding-fingerprint.mjs) stays in the accepted set for `identicalFindingCycles` consecutive rounds | **code** (v16.20.0) |
35
- | 3 | Phase 3 re-entry item 6: the `retryCount === 3` hard-kill records the trip | **code** (v16.20.0) |
35
+ | 3 | Phase 3 re-entry item 6: at `retryCount === 3`, `rework-rulings.mjs` rules on every open finding; the hard-kill, and the trip, happen only when a ruling is `escalate`. All parked: no trip, the run continues to Phase 4 with them as follow-ups | **code** (v16.20.0, rulings 20.34.0) |
36
36
  | 2, build-error half | needs a build-log signature normaliser | documented behaviour, no script yet |
37
37
  | 1 | needs checkpoint-to-checkpoint artifact diffing | documented behaviour, no script yet |
38
38
  | 4 | belongs to `cost-budget-check.mjs` | documented behaviour, no script yet |
@@ -4,6 +4,7 @@
4
4
  - [Phase 1 Step 2.6 - query before dispatching Explore](#phase-1-step-26---query-before-dispatching-explore)
5
5
  - [Impact of a change, not of a name](#impact-of-a-change-not-of-a-name)
6
6
  - [Who implements this](#who-implements-this)
7
+ - [How two symbols connect](#how-two-symbols-connect)
7
8
  - [Confirming with a language server](#confirming-with-a-language-server)
8
9
  - [Phase 5 Step 3 - refresh after the branch changed code](#phase-5-step-3---refresh-after-the-branch-changed-code)
9
10
  - [What the report answers that a file-level view cannot](#what-the-report-answers-that-a-file-level-view-cannot)
@@ -93,6 +94,17 @@ them with every other dependency. Production code never gains an edge to a
93
94
  type a test file declares, so a fake named after a framework type cannot turn
94
95
  into a hub.
95
96
 
97
+ ### How two symbols connect
98
+
99
+ `graph-query.mjs --path <from> <to>` answers with the shortest chain of edges
100
+ between two symbols or files, given by id or by name. An ambiguous name is
101
+ refused with its candidate ids and an unknown one gets its nearest names (exit
102
+ 3), so the answer is never a guess. A module node (an import the repository
103
+ does not declare) can end a path but is never walked through, since it joins
104
+ every file that imports it. On Android, a capitalised `fun` (in practice a
105
+ Compose UI function) is a symbol of kind `composable`, so screens and
106
+ components take part like types.
107
+
96
108
  ### Confirming with a language server
97
109
 
98
110
  The graph joins by name, so a direct dependent can be a file that only uses
@@ -134,6 +146,21 @@ node $HOME/.claude/scripts/validate-code-graph.mjs "$GRAPH_PATH"
134
146
  node $HOME/.claude/scripts/graph-report.mjs --graph "$GRAPH_PATH"
135
147
  ```
136
148
 
149
+ The report adds three whole-graph views (`_graph-analysis.mjs`): import cycles
150
+ (files that import each other, directly or around a loop), clusters of files
151
+ more connected to each other than to the rest (label propagation over imports
152
+ and references, with cohesion = the share of a cluster's edges that stay
153
+ inside), and a short list of questions worth asking before a change, drawn
154
+ from the hubs, the cycles and the strongest links between clusters. All three
155
+ are deterministic, so a changed report means changed code. `graph-report.mjs
156
+ --diff <older graph>` lists what changed between two builds.
157
+
158
+ A run across several repositories (dev-context extras, submodules) joins their
159
+ graphs with `graph-links.mjs build --projects <a,b,...>`: an import of a name
160
+ one repository does not declare is matched against what the others export,
161
+ and `graph-links.mjs affected --project <b>` lists the files elsewhere that
162
+ import b. The graphs are not merged (ADR-0018).
163
+
137
164
  The rebuild costs no API tokens, so it runs every task rather than on a staleness
138
165
  heuristic. A non-zero validator exit keeps the previous graph and logs
139
166
  `knowledge.graph_invalid`; it never fails the run - a stale graph is a degraded
@@ -0,0 +1,166 @@
1
+ # Office remote protocol
2
+
3
+ <!-- toc -->
4
+ - [Parts and trust](#parts-and-trust)
5
+ - [Account](#account)
6
+ - [Pairing](#pairing)
7
+ - [Transport](#transport)
8
+ - [Passkey tiers](#passkey-tiers)
9
+ - [Audit](#audit)
10
+ - [Decisions](#decisions)
11
+ - [To verify on a real phone](#to-verify-on-a-real-phone)
12
+ <!-- /toc -->
13
+
14
+ How a phone reaches the phone routes of the local contract server through a
15
+ relay on the user's site, without the machine opening a port and without the
16
+ relay or the site being able to read a payload or act on their own.
17
+
18
+ The request layer exists and is not changed here: every phone request is signed
19
+ with the device's Ed25519 key (`MA-PHONE-SIG-1`), and `_phone-auth.mjs` checks
20
+ the device, the window, the nonce, the scopes and writes the audit line
21
+ (`phone-api.md`). This document adds what leaving the machine requires: an
22
+ end-to-end layer around those requests, the relay that carries it, pairing that
23
+ enrols the device through the existing registry, and a passkey on top of the
24
+ device signature for the routes that change something.
25
+
26
+ ## Parts and trust
27
+
28
+ | Part | Runs | Holds | Trusted for |
29
+ |---|---|---|---|
30
+ | Phone page | the phone browser, on the site origin (behind the owner session) | the device signing key and the session key pair (non-extractable WebCrypto), a passkey | showing data, asking the user, signing |
31
+ | Site + relay | the user's site (serverless functions + database) | the owner's account, pairing records, ciphertext queues | delivering ciphertext, nothing else |
32
+ | Machine client | the user's machine, started with the office | the machine key pair, the audit of remote frames | decrypting, checking the passkey tier, forwarding to the local server |
33
+ | Local server | the user's machine, 127.0.0.1 only | the device registry, nonces, audit | verifying the device signature and executing phone routes, as today |
34
+
35
+ The relay and its database are treated as compromised: they can drop, delay,
36
+ replay and reorder frames. None of that lets them read a frame, forge a device
37
+ signature or pass the passkey check. The phone page itself is the trust anchor
38
+ on the phone side, as for any web app holding keys: a site that serves a
39
+ modified page can act as the phone. The page therefore loads no third-party
40
+ script, runs under a strict CSP and keeps its keys non-extractable, and the
41
+ machine still applies every check of its own (tiers, routes, counters).
42
+
43
+ ## Account
44
+
45
+ The first release serves the owner's account only and reuses the site's
46
+ existing owner session rather than adding a second login: the phone page and
47
+ every phone relay route require it, and state-changing routes also require a
48
+ same-origin request. The session only lets the phone use the relay for its
49
+ own pairings; it never authorizes an action on the machine, which still
50
+ checks the device signature, the passkey tier and the route itself. Invited
51
+ accounts are a later step.
52
+
53
+ ## Pairing
54
+
55
+ `office-pair.mjs` runs the machine side; every subcommand refuses an
56
+ unattended run. The user runs it in their own terminal (`! node
57
+ ~/.claude/scripts/office-pair.mjs start`), so nothing it shows lands in a
58
+ transcript.
59
+
60
+ 1. `start [--relay <origin>]` creates the machine key pair (P-256) on first
61
+ use and a relay token (256 bits) kept in `<phone dir>/remote.json` (0600),
62
+ a pairing id and a one-time secret (128 bits, valid 10 minutes). The relay
63
+ origin comes from `prefs.global.office.remote.relayUrl` or the flag, never
64
+ from the code; it is https, or http on the loopback. The relay receives the
65
+ pairing id, the machine public key, the expiry and the SHA-256 of the relay
66
+ token, never the token itself.
67
+ 2. The QR code is drawn by the dependency-free encoder in `lib/qr-code.mjs`
68
+ into a 0600 page (`default-src 'none'`) in a 0700 directory and opened in
69
+ the local browser; the secret is never printed. It holds
70
+ `<origin>/office/pair#p=<pairing id>&s=<secret>&k=<machine public key>`.
71
+ A browser never sends the fragment to a server, so the relay neither sees
72
+ the secret nor can swap the machine key.
73
+ 3. The phone, signed in, scans it, creates its Ed25519 device key and its P-256
74
+ session key, registers a passkey (WebAuthn `create`, user verification
75
+ required) and sends, sealed with a key that mixes the ECDH secret with the
76
+ pairing secret: the device name and public key, and the passkey credential
77
+ id, public key (`getPublicKey()`, SPKI), rp id and origin.
78
+ 4. `wait` polls the relay with the token, opens the message, refuses a passkey
79
+ whose origin is not the relay origin or whose rp id is not its host, and
80
+ prints the six-digit code derived from both public keys and a fingerprint
81
+ of the machine key. The phone shows the same code and fingerprint, and
82
+ accepts the pairing only after its user confirms on the phone that both
83
+ match, so a link someone else registered cannot pair the phone with their
84
+ machine.
85
+ 5. `confirm <code>` takes the code as the phone shows it. A mismatch drops the
86
+ pairing (one attempt). A match enrols the device with
87
+ `phone-devices.mjs add` (scopes `read,answer`; `launch` stays a separate
88
+ local switch), stores the session key and passkey beside it, and tells the
89
+ relay to start delivering for the pairing. That call carries the first
90
+ machine-to-phone frame (counter 1), sealed with the pairing's keys, holding
91
+ the device id the phone signs its requests with; the relay cannot alter it.
92
+ 6. Revoke: `phone-devices.mjs revoke <id>` on the machine also drops the
93
+ device's remote keys; the site can stop delivering for a pairing. Either
94
+ alone ends control.
95
+
96
+ ## Transport
97
+
98
+ - The machine client polls the relay over HTTPS (long poll, 25 s) and posts
99
+ responses. No inbound port, no tunnel, no funnel.
100
+ - A frame is `{method, target, headers, body}` (request) or
101
+ `{status, headers, body}` (response), as `phone-api.md` specifies, sealed
102
+ with AES-256-GCM. The keys come from ECDH between the phone session key and
103
+ the machine key, through HKDF-SHA-256 with the pairing id as salt, one key
104
+ per direction; the nonce is a per-direction counter, and a frame whose
105
+ counter does not exceed the last one accepted is dropped.
106
+ - The relay stores `{pairingId, direction, counter, ciphertext, expiresAt}` in
107
+ a table only the service role reaches, and deletes a row on delivery or
108
+ after 10 minutes.
109
+ - The machine client takes a target only in the canonical form the local
110
+ server routes on (no encoded dot segment, backslash or fragment), so the
111
+ tier and the route prefix are judged on the path the server executes. Only
112
+ one client runs at a time (a lock file), and each poll writes its counters
113
+ onto the config as it is on disk, so a revoke made meanwhile is kept.
114
+ - The machine client forwards only targets under `/v1/phone/`, never adds an
115
+ `Authorization` header, and rewrites `Host` to the loopback address; the
116
+ local server's own checks then apply unchanged.
117
+ - Remote is off by default: the client runs only while the office is on and
118
+ a device is paired; `office-off` stops it.
119
+
120
+ ## Passkey tiers
121
+
122
+ The device signature proves which phone sent a request; the passkey proves the
123
+ user was holding it. Each phone route carries a tier from the route table:
124
+
125
+ | Tier | Phone routes | Passkey |
126
+ |---|---|---|
127
+ | read | `GET /v1/phone/runs`, `GET /v1/phone/runs/{id}` | one at session open; the session locks after 5 minutes idle |
128
+ | low | `POST /v1/phone/runs/{id}/answer`, a canned steer | within 2 minutes of the last passkey (configurable down to every time) |
129
+ | high | `POST /v1/phone/launch` and any later route that changes code or writes to a host | every time, bound to the request |
130
+
131
+ For a passkey-bound request the phone sends `X-MA-Passkey` with a WebAuthn
132
+ assertion whose challenge is SHA-256 of the request's canonical signed text.
133
+ The machine verifies, before the request reaches the local server: the rp id
134
+ hash and origin match the paired ones, the user verified flag is set, the
135
+ signature verifies with the paired credential key, and the sign count (when the
136
+ authenticator keeps one) has grown. Steering from the phone is a canned
137
+ template chosen by id and expanded on the machine; free-text steering, widening
138
+ actions (autopilot on, stack, routine delete, host permissions) and merges stay
139
+ desktop routes.
140
+
141
+ ## Audit
142
+
143
+ The local server keeps its per-request audit as today. The machine client adds
144
+ `<phone dir>/remote-frames.jsonl` (0600): time, device, counter,
145
+ target path without query, tier, passkey verdict and the reason of a drop.
146
+ Never a body, a header value or a signature.
147
+
148
+ ## Decisions
149
+
150
+ 1. **The machine client ships in the public pipeline**, inert until
151
+ `office-pair` pairs a device. The relay URL comes from prefs or the pairing
152
+ QR, never from the code.
153
+ 2. **Steering from the phone takes canned templates only**, chosen by id and
154
+ expanded on the machine.
155
+ 3. **The first release serves the owner's account only**; invites follow as a
156
+ separate step.
157
+ 4. **The relay queue is a short-lived table in the site's database**: ciphertext
158
+ only, deleted on delivery or after 10 minutes, service role only.
159
+
160
+ ## To verify on a real phone
161
+
162
+ WebCrypto Ed25519 and non-extractable P-256 keys in the phone's browser,
163
+ `getPublicKey()` on the passkey registration response, and the long-poll
164
+ interval against the site's function time limit. The design falls back to
165
+ P-256 ECDSA for the device key if Ed25519 is missing, which `_phone-auth.mjs`
166
+ would then accept as a second key type.
@@ -50,7 +50,7 @@ not mitigated here.
50
50
  | T4 | Secret exposure through a response | Transcripts are read through `_transcript-tail.mjs`, which never parses api-request records and drops thinking blocks; every string passes the credential redactor and the scrubber; the finished office and chat documents are checked by the outbound gate; seat labels come from allow-listed fields (tool name, file basename, sidecar description), never a command line; credentials are read only by the service scripts and never returned | `smoke-office-privacy.sh`, `smoke-office-security.sh` T4, `test/office-activity.test.mjs` "carries no credential" |
51
51
  | T5 | Path traversal into arbitrary files | Session, agent, run, routine, tool and evidence ids are matched against safe character sets after decoding; transcripts are looked up by name under the projects root only; a screenshot must resolve (real path) inside the run's evidence directory; an analysis document named in run state is read only when its real path is inside the run's log directory, its artifacts or a worktree git lists under the state's projectRoot, and only when it is Markdown or HTML | `smoke-office-security.sh` T5, `test/office-work.test.mjs` "nothing outside its directory", "analysis documents are read only inside the run's roots", "a worktreePath counts only when git lists it" |
52
52
  | T6 | Oversized or malformed input | Bodies are capped at 64 KiB and validated against the route's schema; tool arguments are checked against the tool's inputSchema; launch input goes through `launch-request.mjs` validation only; chat paging is capped at 500 | `smoke-office-security.sh` T6, `office-work.test.mjs` "refuses an unknown tool, invalid arguments and an oversized body" |
53
- | T7 | Resource exhaustion | At most four event streams and 64 connections; a phone request has five seconds to send its body before any signature work; at most 256 confirm tokens, the oldest dropped first; service clients, the work list and autopilot control run as child processes, never blocking the event loop, one at a time per service (429 `busy` for a second one); one snapshot is computed per poll from bounded tail reads; the session list is cached for ten seconds; a server started on its own exits after its idle time and after 8 hours in any case, the one `office-on` starts runs until `office-off`, and both stop on SIGTERM | `smoke-office-security.sh` T7; `office-routes.test.mjs` "connections past the cap are dropped", "never sends its body", "confirm tokens are capped"; `office-work.test.mjs` "a slow service read neither blocks other routes nor runs twice at once" |
53
+ | T7 | Resource exhaustion | At most four event streams and 64 connections; a phone request has five seconds to send its body before any signature work; at most 256 confirm tokens, the oldest dropped first; service clients, the work list and autopilot control run as child processes, never blocking the event loop, one at a time per service (429 `busy` for a second write or service read; a second `GET /v1/prs`, `GET /v1/autopilot` or maturity read of the same issue shares the run in flight, and at most two maturity reads for different issues run at once); one snapshot is computed per poll from bounded tail reads; the session list is cached for ten seconds; a server started on its own exits after its idle time and after 8 hours in any case, the one `office-on` starts runs until `office-off`, and both stop on SIGTERM | `smoke-office-security.sh` T7; `office-routes.test.mjs` "connections past the cap are dropped", "never sends its body", "confirm tokens are capped"; `office-work.test.mjs` "a slow service read neither blocks other routes nor runs twice at once", "maturity checks for different issues run at most two at a time" |
54
54
  | T8 | XSS from hostile transcript or issue text | The panel renders every server string with `textContent` or canvas text; markdown is shown as plain text; server images only as `data:` URLs of image types; the office sprites are same-origin PNGs from `/office/assets/`, which answers only a plain file name (no separator or escape) whose real path is a PNG directly in the installed assets directory, and 404 otherwise; the page language the server stamps comes from a two-value set (`en`, `tr`), whatever the preferences file holds; the page's CSP allows only its per-response nonce for script and style, `connect-src 'self'`, no framing, no base URI, no form action | `smoke-office-page.sh`, `office-routes.test.mjs` "stamps the page language from outputLanguage", "serves a sprite and nothing else under /office/assets/", `office-build.test.mjs`, `smoke-office-runtime.sh` |
55
55
  | T9 | Clickjacking | `frame-ancestors 'none'` on the page and on every API response | `office-routes.test.mjs` "serves the page without a token, with a nonce CSP" |
56
56
  | T10 | An action nobody can account for | Every write leaves one line (who, route, step, status; never a body or token) in `office-actions.jsonl` | `office-routes.test.mjs` "every write leaves a line" |
@@ -66,7 +66,7 @@ not mitigated here.
66
66
  | T20 | A learned statement carrying a secret or a machine path to the page | `GET /v1/memory` returns counts, the code graph's age and size, and the five newest learning statements per repository, each passed through the transcript redactor (provider credential rules, paths and addresses) and cut to 120 characters. Repository names are matched against a safe character set before any file is opened. Read only; `local-only` | `office-routes.test.mjs` "GET /v1/memory reports every shelf, redacted" |
67
67
  | T21 | Machine details through the resource panel | `GET /v1/system` returns numbers only (cores, load, memory, free disk, process counts, log folder size) and two fixed warnings; no path, process argument, user or host name. The schema allows nothing else. The measurement runs as child processes off the event loop, concurrent requests share one measurement, and the log folder size is reused for a minute. Readable from a phone, since it names nothing | `office-routes.test.mjs` "GET /v1/system returns numbers only: no path, user or host name" |
68
68
  | T22 | Old run logs deleted wider than asked, or a live run's log removed | `POST /v1/prune-logs` takes only an age from a fixed set (7, 30 or 90 days) and runs `prune-logs.sh`, the script `/multi-agent:prune-logs` runs: the dry run is the preview; the confirmed step lists the folders again, refuses with `changed` when they differ, and then prunes only the previewed list through `--only-from`, under a token bound to that age and list. The script never touches the audit trail, the metrics corpus or the task counters, refuses a log root that is `/`, the home folder or a git checkout, and spares a folder written in the last minutes and a run that can still be resumed. Tagged `local-only`/`high` | `office-routes.test.mjs` "POST /v1/prune-logs previews, then prunes only on the token" |
69
- | T23 | Pull request listing exposing a token, or the native task mirror writing into another run | Each GitHub account gh is logged in to is asked with `gh auth token` for that host and login; the token travels in `GH_TOKEN` (and `GH_ENTERPRISE_TOKEN` for an Enterprise Server host) for the child process only, never on a command line, in a response or a log. Bitbucket Server is read over https only (a plain-http host is refused unless it is the loopback), redirects are not followed, and the token, read from the credential store with a deadline, travels in the `Authorization` header only; an unreachable host is a reason on that source, not a failure of the list. A redacted answer drops URLs and logins, numbering the accounts instead. The task-mirror hook (PostToolUse on TaskCreate and TaskUpdate) writes only into the run whose recorded session is the calling session, skips phase tiles, never prints, and exits 0 on any input it cannot read | `work-items-prs.test.mjs`, `task-mirror.test.mjs` |
69
+ | T23 | Pull request listing exposing a token, or the native task mirror writing into another run | Each GitHub account gh is logged in to is asked with `gh auth token` for that host and login; the token travels in `GH_TOKEN` (and `GH_ENTERPRISE_TOKEN` for an Enterprise Server host) for the child process only, never on a command line, in a response or a log. Bitbucket Server is read over https only (a plain-http host is refused unless it is the loopback), redirects are not followed, and the token, read from the credential store with a deadline, travels in the `Authorization` header only; an unreachable host is a reason on that source, not a failure of the list. `GET /v1/prs/reach` (local-only) asks gh for the changed file paths of at most 20 GitHub pull requests, three at a time, each with its account's token in the environment; it asks nothing for a repository whose name is not `owner/repo` or that has no graph under `~/.claude/knowledge/<repo name>/`. The paths serve only as keys into the local graph: nothing is read from disk by them and none is returned, only counts. The graph is parsed in a child process, so no other route waits behind it. A redacted answer drops URLs and logins, numbering the accounts instead. The task-mirror hook (PostToolUse on TaskCreate and TaskUpdate) writes only into the run whose recorded session is the calling session, skips phase tiles, never prints, and exits 0 on any input it cannot read | `work-items-prs.test.mjs`, `task-mirror.test.mjs`, `pr-reach.test.mjs`, `office-work.test.mjs` "GET /v1/prs/reach says which pull requests have no graph to measure against" |
70
70
  | T24 | The panel changing a preference wider than the terminal would, or posting addresses to a phone | `POST /v1/settings` takes one of three settings and one of its two values, previews the change and runs, under a token bound to that setting and value, what `/multi-agent:language`, `/multi-agent:model` or `/multi-agent:route-on`/`route-off` runs; route on passes the saved strategy back so only the switch changes, nothing the panel sends can add rules or a free provider, and two changes never run at once. Tagged `local-only`/`high`. Report links: `channelResults` URLs must be https, travel only in the run record's `channelUrls` (local, dropped from a redacted answer) and are shown as text, never followed | `office-routes.test.mjs` "POST /v1/settings changes a switch only on the token, through its script", `runs-index.test.mjs` |
71
71
 
72
72
  ## Residual risks
@@ -53,8 +53,11 @@ CRITIC_RUNG=$(bash "$HOME/.claude/lib/model-dispatch.sh" subagent --persona plan
53
53
  ```
54
54
 
55
55
  It reads the plan, the analysis document(s), the constitution and the worktree,
56
- and writes objections under four lenses: `scope`, `feasibility`, `security`,
57
- `alternative` (a cheaper plan with the same result). Each objection has an id
56
+ and writes objections under six lenses: `scope`, `feasibility`, `security`,
57
+ `alternative` (a cheaper plan with the same result), `unstated-input` (an
58
+ input the spec implies that no task's tests exercise) and `underspecified` (a
59
+ decision a task leaves to its implementer that the analysis or the user should
60
+ make). Each objection has an id
58
61
  (`OBJ-NN`), a lens, a claim, at least one evidence anchor and, when the plan
59
62
  breaks one, a constitution rule id. The orchestrator writes the output to
60
63
  `$WORKTREE/.pipeline/plan-critique.json` (`schemas/plan-critique.schema.json`)
@@ -39,7 +39,8 @@ Phase 2 Step 3.7 wrote `$WORKTREE/.pipeline/scope-check.json` (contract: `featur
39
39
  ```bash
40
40
  SCOPE_JSON="$WORKTREE/.pipeline/scope-check.json"
41
41
  SCOPE_GATE=$(git -C "$WORKTREE" diff --name-only "origin/$BASE_BRANCH"...HEAD \
42
- | node $HOME/.claude/scripts/scope-check-gate.mjs --check "$SCOPE_JSON" --diff-files - --advisory 2>/dev/null)
42
+ | node $HOME/.claude/scripts/scope-check-gate.mjs --check "$SCOPE_JSON" --diff-files - --advisory \
43
+ --repo "$WORKTREE" --patch-range "origin/$BASE_BRANCH...HEAD" 2>/dev/null)
43
44
  ```
44
45
 
45
46
  ```
@@ -48,6 +49,8 @@ Files and the reason the dev gave for touching each:
48
49
  {jq -r '.files[] | "- \(.path): \(.reason)"' "$SCOPE_JSON"}
49
50
  Files in the diff with no stated reason (flag as scope drift if the change is not obviously required):
50
51
  {jq -r '.unjustified[]' <<< "$SCOPE_GATE"}
52
+ Layout-only hunks (whitespace the task did not need; a suggestion at most):
53
+ {jq -r '.formatOnly[]? | "- \(.file) \(.hunk)"' <<< "$SCOPE_GATE"}
51
54
  Deliberately not done (do not raise these as findings; they are known):
52
55
  {jq -r '.notDone[] | "- \(.what) (\(.why))"' "$SCOPE_JSON"}
53
56
  </scope-self-check>
@@ -29,7 +29,31 @@ git -C "$WORKTREE" diff --name-only "origin/$BASE_BRANCH"...HEAD \
29
29
  | node $HOME/.claude/scripts/scope-check-gate.mjs --check "$WORKTREE/.pipeline/scope-check.json" --diff-files -
30
30
  ```
31
31
 
32
- Output `{ok, justified, unjustified[], unlisted[], notDone}`. Exit 1 lists `unjustified[]` (in the diff, no reason or an empty one); `unlisted[]` (in the record, not in the diff) is reported and never fatal. Complete the record once and re-run. A second exit 1 does not block: log `dev.scope_check=incomplete unjustified=<n>` and hand off; Phase 4 receives the gate output inside `<scope-self-check>`, so reviewers see which files arrived without a stated reason. `--advisory` (used by Phase 4) always exits 0. Progress line: ` → checking scope self-check ({n} files, {m} not done)`.
32
+ Output `{ok, justified, unjustified[], unlisted[], notDone}`, plus `formatOnly[]` with `--patch` / `--patch-range` (`patchError` when the diff could not be read). With `--patch <unified diff>` (or `--repo <dir> --patch-range <a>...<b>`, which reads that diff itself), `formatOnly[]` lists hunks whose removed and added lines differ only in whitespace: a reformat of lines the task did not need to touch. It is reported, never fatal, and reviewers see it in `<scope-self-check>`. On a rework pass, `--rejected <triage-output.json> --repo <dir> --rework-base <rev>` (the two come together) adds `rejectedTouched[]` (`rejectedError` when unreadable): each finding triage rejected whose line a hunk of `git diff <rework base>` against the working tree changed, read on the hunk's old side within two lines. Phase 2 acts on accepted findings only, so such a hunk is a fix triage ruled out; it is reported, never fatal. Exit 1 lists `unjustified[]` (in the diff, no reason or an empty one); `unlisted[]` (in the record, not in the diff) is reported and never fatal. Complete the record once and re-run. A second exit 1 does not block: log `dev.scope_check=incomplete unjustified=<n>` and hand off; Phase 4 receives the gate output inside `<scope-self-check>`, so reviewers see which files arrived without a stated reason. `--advisory` (used by Phase 4) always exits 0. Progress line: ` → checking scope self-check ({n} files, {m} not done)`.
33
+
34
+ ## Rework pass
35
+
36
+ Rejected findings carry the line numbers of the tree the review read, and every round rewrites `triage-output.json`, so a rework is compared against that round's own base.
37
+
38
+ 1. Before the first rework edit, record the base: `node $HOME/.claude/scripts/rework-base.mjs record --worktree "$WORKTREE" --iteration "$(jq '.reviewIterations | length' "$STATE_FILE")"`. One file per round, `.pipeline/rework-base-<N>`; a resumed re-entry of the same round keeps the base it started from.
39
+ 2. In Step 3.7, after the normal gate:
40
+
41
+ ```bash
42
+ REWORK_BASE=$(node $HOME/.claude/scripts/rework-base.mjs get --worktree "$WORKTREE" --iteration "$(jq '.reviewIterations | length' "$STATE_FILE")")
43
+ node $HOME/.claude/scripts/scope-check-gate.mjs --check "$WORKTREE/.pipeline/scope-check.json" --diff-files /dev/null --advisory \
44
+ --rejected "$WORKTREE/triage-output.json" --repo "$WORKTREE" --rework-base "$REWORK_BASE"
45
+ ```
46
+
47
+ Each `rejectedTouched[]` entry is an edit to lines triage ruled out: revert that hunk unless an accepted finding needs it, and say which in the record's reason. Log `dev.rework_rejected_touch=<n>`.
48
+
49
+ ## Known limits in the code
50
+
51
+ A limit accepted on purpose is marked at the line, in the file's comment
52
+ style: `shortcut: <the limit>, <when to replace it>`. `notDone[]` says what the
53
+ change left out; the marker says what the code that shipped does not handle
54
+ yet. `debt-ledger.mjs` collects the markers a diff adds into the repo's debt
55
+ list, reviewers do not re-raise a marked limit unless it breaks a requirement
56
+ or a security rule, and the PR description lists them.
33
57
 
34
58
  ## Consumers
35
59
 
@@ -21,6 +21,16 @@
21
21
 
22
22
  Downgrades go to `deferred`, never `rejected`: triage judged the issue real, and deferred items surface in the Phase 5 report for a human eye.
23
23
 
24
+ ## Repeat runs
25
+
26
+ Phase 2's stability rule keeps each run of the new and changed tests as `.pipeline/repeat-<k>.junit.xml` (k = 1..N) and judges them together:
27
+
28
+ ```bash
29
+ node $HOME/.claude/scripts/test-stability-gate.mjs --dir "$WORKTREE/.pipeline" --expect N
30
+ ```
31
+
32
+ Exit 1 means a missing run, a flake (`flaky[]`: outcomes that differ across runs) or a test that failed every time; the step is not GREEN. A runner that writes no JUnit XML (xcodebuild) has each run exported with `xcrun xcresulttool` first, or logs `test.stability=unverifiable` and says so in the Phase 5 report.
33
+
24
34
  ## Red-test handoff to Phase 3
25
35
 
26
36
  `state.reviewIterations[-1].verifyByTest = { attempted, confirmed, downgraded, inconclusive, redTests: [{file, testRef, issue}] }`. On the Phase 3 re-entry, each `redTests[]` entry IS the RED step of the rework TDD cycle for its finding: the reflection prompt instructs "a failing repro test already exists at <testRef>; make it green; do not delete or weaken it." The dev agent must not write a duplicate failing test for those findings.
@@ -1,5 +1,12 @@
1
1
  ## Keychain Token Registry
2
2
 
3
+ <!-- toc -->
4
+ - [Keychain Token Registry](#keychain-token-registry)
5
+ - [Rule 1 - Never prompt for a token *value* mid-run](#rule-1---never-prompt-for-a-token-value-mid-run)
6
+ - [Rule 2 - MUST: never ask the user for what a mapped credential can fetch (BLOCKING)](#rule-2---must-never-ask-the-user-for-what-a-mapped-credential-can-fetch-blocking)
7
+ - [Credential store mechanics](#credential-store-mechanics)
8
+ <!-- /toc -->
9
+
3
10
  > **Pickers follow** `$HOME/.claude/multi-agent-refs/picker-contract.md`: never a one-option call, and branch on the option selected, not on its text.
4
11
 
5
12
  Tokens live in the macOS Keychain. Key names are resolved via **preferences mapping** - never hardcoded.
@@ -81,6 +81,8 @@ Knowledge files grow over time. Maintenance rules:
81
81
  and a rebuild is seconds, so age is the wrong question to ask of it.
82
82
  - `product-context.jsonl` is written by runs of OTHER repositories of the same product (`features/product-context.md`) and keyed by the remote sha it was read at; `product-context.mjs recall` returns a row only while that sha is current, so it needs no age rule
83
83
  - Stale entries are added to the prompt with a "STALE - verify before relying" tag
84
+ - A ledger entry earns or loses weight from the outcomes recorded against it: Phase 5 runs `learnings-ledger.mjs feedback --id <L:id> --outcome useful|dead_end|corrected` for each injected entry the run relied on or found wrong. Corrected, or a dead end at least twice and more often than useful, drops it from `brief` and `profile`; useful at least twice adds a strength that fades with age (`_memory-policy.mjs`). A new entry that repeats an existing one in other words (TF-IDF cosine 0.9 or more, same numbers, same negations) is not added
85
+ - `prefs.global.memory.excludeProjects` lists repo slugs whose ledger, triage corpus and debt list are never written
84
86
  - `prune-logs` does not touch knowledge - only deletes logs and state
85
87
  - `purge` does not touch knowledge either. Today the only removal path is `/multi-agent:uninstall --all-data`, which drops every project's knowledge at once; there is no per-project clear yet
86
88
 
@@ -113,6 +115,13 @@ node "$HOME/.claude/scripts/triage-memory.mjs" timeline --anchor T:<id> --bef
113
115
  node "$HOME/.claude/scripts/learnings-ledger.mjs" timeline --anchor L:<id> --before 3 --after 3
114
116
  ```
115
117
 
118
+ A store too large to rank in one pass (thousands of triage rows) goes through
119
+ the toolkit's full-text index instead of a whole-file read: `context_index` on
120
+ the store's path (`learnings-ledger.mjs path`, `triage-memory.mjs path`), then
121
+ `context_search` for ranked snippets and `context_get` for one passage. The
122
+ index is owner-only and re-indexing an unchanged file is a no-op, so this is
123
+ layer 1 and 3 again over the same rows, not a second copy to keep in step.
124
+
116
125
  ## Skill Injection Strategy
117
126
 
118
127
  When calling sub-agents, inject task-specific context from previous phases: