@mmerterden/multi-agent-pipeline 20.37.0 → 20.38.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 (469) hide show
  1. package/CHANGELOG.md +123 -49
  2. package/README.md +12 -10
  3. package/README.tr.md +12 -10
  4. package/docs/adr/0006-skills-core-external-split.md +5 -5
  5. package/docs/adr/0010-own-code-graph.md +6 -7
  6. package/docs/adr/0013-lsp-code-intelligence.md +6 -8
  7. package/docs/adr/0017-change-impact-from-the-graph.md +4 -5
  8. package/docs/adr/0018-cross-repo-links-not-a-global-graph.md +1 -1
  9. package/docs/adr/README.md +1 -1
  10. package/docs/ecosystem.md +53 -41
  11. package/docs/facts.json +15 -13
  12. package/docs/features.md +2 -2
  13. package/docs/recovery-guide.md +1 -1
  14. package/install/_dev-only-files.mjs +3 -0
  15. package/install/_platform-filter.mjs +1 -23
  16. package/install/catalog-history.json +1 -1
  17. package/install/claude.mjs +8 -1
  18. package/install/codex.mjs +0 -2
  19. package/install/copilot.mjs +0 -2
  20. package/install/templates/claude-hooks.json +47 -1
  21. package/manifest.json +455 -332
  22. package/package.json +5 -2
  23. package/pipeline/agents/security-auditor.md +58 -6
  24. package/pipeline/commands/multi-agent/build-optimize/SKILL.md +1 -2
  25. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +1 -1
  26. package/pipeline/commands/multi-agent/design-check/SKILL.md +1 -1
  27. package/pipeline/commands/multi-agent/graph/SKILL.md +12 -3
  28. package/pipeline/commands/multi-agent/manual-test/SKILL.md +12 -7
  29. package/pipeline/commands/multi-agent/research/SKILL.md +2 -2
  30. package/pipeline/commands/multi-agent/search/SKILL.md +10 -1
  31. package/pipeline/commands/multi-agent/security-review/SKILL.md +4 -0
  32. package/pipeline/commands/multi-agent/setup/SKILL.md +1 -0
  33. package/pipeline/commands/multi-agent/stack/SKILL.md +8 -0
  34. package/pipeline/commands/multi-agent/store-ready/SKILL.md +1 -1
  35. package/pipeline/commands/sim-test.md +34 -1
  36. package/pipeline/lib/context-budget.mjs +103 -0
  37. package/pipeline/lib/credential-inventory.sh +2 -3
  38. package/pipeline/lib/identifier-scan.mjs +145 -0
  39. package/pipeline/lib/outbound-gate.mjs +28 -1
  40. package/pipeline/lib/unattended-profile-check.mjs +13 -4
  41. package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
  42. package/pipeline/multi-agent-refs/analysis/redesign.md +17 -3
  43. package/pipeline/multi-agent-refs/analysis-template-corporate.md +8 -4
  44. package/pipeline/multi-agent-refs/analysis-template.md +7 -5
  45. package/pipeline/multi-agent-refs/audit-guide.md +20 -0
  46. package/pipeline/multi-agent-refs/complaint-analysis/phases.md +1 -0
  47. package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +1 -1
  48. package/pipeline/multi-agent-refs/features/code-graph.md +25 -0
  49. package/pipeline/multi-agent-refs/features/commit-multi-repo.md +63 -0
  50. package/pipeline/multi-agent-refs/features/design-conformance.md +20 -4
  51. package/pipeline/multi-agent-refs/features/dev-multi-repo.md +51 -0
  52. package/pipeline/multi-agent-refs/features/free-models.md +10 -3
  53. package/pipeline/multi-agent-refs/features/research.md +4 -3
  54. package/pipeline/multi-agent-refs/features/security-audit.md +25 -3
  55. package/pipeline/multi-agent-refs/features/test-gap.md +40 -0
  56. package/pipeline/multi-agent-refs/features/unattended-security.md +20 -0
  57. package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
  58. package/pipeline/multi-agent-refs/help/en.md +15 -9
  59. package/pipeline/multi-agent-refs/help/tr.md +15 -9
  60. package/pipeline/multi-agent-refs/knowledge.md +17 -0
  61. package/pipeline/multi-agent-refs/orchestrator/phase-3-user-test.md +12 -9
  62. package/pipeline/multi-agent-refs/outside-the-pipeline.md +9 -0
  63. package/pipeline/multi-agent-refs/phases/log-format.md +5 -0
  64. package/pipeline/multi-agent-refs/phases/operations.md +3 -5
  65. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
  66. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +8 -47
  67. package/pipeline/multi-agent-refs/phases/phase-3-review.md +21 -65
  68. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +9 -59
  69. package/pipeline/multi-agent-refs/phases/phase-5-report.md +0 -31
  70. package/pipeline/multi-agent-refs/picker-contract.md +1 -1
  71. package/pipeline/multi-agent-refs/research/engine.md +2 -1
  72. package/pipeline/multi-agent-refs/rules.md +1 -1
  73. package/pipeline/multi-agent-refs/setup/free-models.md +10 -0
  74. package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +15 -0
  75. package/pipeline/multi-agent-refs/web-guide.md +2 -1
  76. package/pipeline/office/index.html +8 -9
  77. package/pipeline/office/toolkit.json +1 -1
  78. package/pipeline/rules/figma-pipeline.md +6 -3
  79. package/pipeline/rules/outside-the-pipeline.md +1 -1
  80. package/pipeline/schemas/learnings-ledger.schema.json +7 -2
  81. package/pipeline/schemas/prefs.schema.json +17 -4
  82. package/pipeline/schemas/reviewer-output.schema.json +113 -5
  83. package/pipeline/schemas/secret-patterns.json +49 -0
  84. package/pipeline/schemas/security-finding.schema.json +49 -5
  85. package/pipeline/scripts/_code-graph.mjs +3 -3
  86. package/pipeline/scripts/_graph-analysis.mjs +51 -0
  87. package/pipeline/scripts/_memory-policy.mjs +37 -7
  88. package/pipeline/scripts/_secret-scan.mjs +1 -1
  89. package/pipeline/scripts/_skill-practices.mjs +178 -0
  90. package/pipeline/scripts/_stack-routing.mjs +1 -0
  91. package/pipeline/scripts/autopilot-runner.mjs +8 -3
  92. package/pipeline/scripts/build-stack-plugins.mjs +8 -44
  93. package/pipeline/scripts/capture-resume.sh +19 -0
  94. package/pipeline/scripts/checkpoint-fold.sh +59 -0
  95. package/pipeline/scripts/file-context.mjs +306 -70
  96. package/pipeline/scripts/gate-ledger.mjs +1 -1
  97. package/pipeline/scripts/gen-skills-index.mjs +1 -1
  98. package/pipeline/scripts/graph-hint.mjs +197 -0
  99. package/pipeline/scripts/graph-hint.sh +20 -0
  100. package/pipeline/scripts/graph-query.mjs +306 -11
  101. package/pipeline/scripts/graph-report.mjs +29 -1
  102. package/pipeline/scripts/learnings-ledger.mjs +71 -15
  103. package/pipeline/scripts/note-agent-event.mjs +160 -0
  104. package/pipeline/scripts/note-agent-event.sh +19 -0
  105. package/pipeline/scripts/office-control.mjs +41 -15
  106. package/pipeline/scripts/offload-ref.sh +1 -1
  107. package/pipeline/scripts/parity-score.mjs +139 -0
  108. package/pipeline/scripts/pre-commit-check.sh +25 -4
  109. package/pipeline/scripts/pre-push-check.sh +3 -0
  110. package/pipeline/scripts/repo-recommend.mjs +321 -0
  111. package/pipeline/scripts/rework-rulings.mjs +5 -3
  112. package/pipeline/scripts/scan-agent-config.sh +1 -2
  113. package/pipeline/scripts/scope-check-gate.mjs +15 -2
  114. package/pipeline/scripts/security-evidence-gate.mjs +282 -0
  115. package/pipeline/scripts/unattended_policy.py +3 -2
  116. package/pipeline/scripts/user-test-handoff.sh +203 -0
  117. package/pipeline/scripts/validate-analysis-doc.mjs +17 -1
  118. package/pipeline/scripts/validate-planning.mjs +5 -3
  119. package/pipeline/scripts/validate-triage.mjs +2 -1
  120. package/pipeline/scripts/write-state.mjs +13 -4
  121. package/pipeline/skills/.skill-manifest.json +73 -69
  122. package/pipeline/skills/shared/README.md +41 -40
  123. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +6 -6
  124. package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +1 -1
  125. package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +1 -1
  126. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
  127. package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +1 -1
  128. package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
  129. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +0 -1
  130. package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +1 -1
  131. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +5 -5
  132. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +10 -0
  133. package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +12 -7
  134. package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +2 -2
  135. package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +9 -0
  136. package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +3 -2
  137. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -0
  138. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +8 -0
  139. package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +4 -3
  140. package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +1 -1
  141. package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +1 -1
  142. package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +1 -1
  143. package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +1 -1
  144. package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +1 -1
  145. package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +1 -1
  146. package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +2 -2
  147. package/pipeline/skills/shared/external/accessibility-compliance-accessibility-audit/evals/evals.json +44 -0
  148. package/pipeline/skills/shared/external/agent-introspection-debugging/evals/evals.json +42 -0
  149. package/pipeline/skills/shared/external/android-architecture/SKILL.md +1 -1
  150. package/pipeline/skills/shared/external/android-architecture/evals/evals.json +45 -0
  151. package/pipeline/skills/shared/external/android-build-quality-gates/evals/evals.json +45 -0
  152. package/pipeline/skills/shared/external/android-datastore/evals/evals.json +45 -0
  153. package/pipeline/skills/shared/external/android-design-tokens-codegen/evals/evals.json +43 -0
  154. package/pipeline/skills/shared/external/android-jetpack-compose-expert/evals/evals.json +43 -0
  155. package/pipeline/skills/shared/external/android-mvi-viewmodel/evals/evals.json +45 -0
  156. package/pipeline/skills/shared/external/android-performance/SKILL.md +1 -1
  157. package/pipeline/skills/shared/external/android-performance/evals/evals.json +44 -0
  158. package/pipeline/skills/shared/external/android-security/SKILL.md +1 -1
  159. package/pipeline/skills/shared/external/android-security/evals/evals.json +45 -0
  160. package/pipeline/skills/shared/external/api-patterns/evals/evals.json +43 -0
  161. package/pipeline/skills/shared/external/api-security-best-practices/evals/evals.json +44 -0
  162. package/pipeline/skills/shared/external/app-store-changelog/SKILL.md +65 -49
  163. package/pipeline/skills/shared/external/app-store-changelog/evals/evals.json +40 -0
  164. package/pipeline/skills/shared/external/app-store-changelog/references/release-notes-guidelines.md +64 -34
  165. package/pipeline/skills/shared/external/app-store-changelog/scripts/collect_release_changes.sh +21 -23
  166. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +4 -1
  167. package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -0
  168. package/pipeline/skills/shared/external/architecture/evals/evals.json +42 -0
  169. package/pipeline/skills/shared/external/backlog/evals/evals.json +42 -0
  170. package/pipeline/skills/shared/external/ci-cd-pipelines/evals/evals.json +44 -0
  171. package/pipeline/skills/shared/external/clean-code/evals/evals.json +45 -0
  172. package/pipeline/skills/shared/external/compose-components/SKILL.md +1 -1
  173. package/pipeline/skills/shared/external/compose-components/evals/evals.json +44 -0
  174. package/pipeline/skills/shared/external/compose-navigation/SKILL.md +1 -1
  175. package/pipeline/skills/shared/external/compose-navigation/evals/evals.json +43 -0
  176. package/pipeline/skills/shared/external/compose-testing/SKILL.md +1 -1
  177. package/pipeline/skills/shared/external/compose-testing/evals/evals.json +44 -0
  178. package/pipeline/skills/shared/external/context-compression/evals/evals.json +43 -0
  179. package/pipeline/skills/shared/external/core-data/SKILL.md +1 -1
  180. package/pipeline/skills/shared/external/council/evals/evals.json +41 -0
  181. package/pipeline/skills/shared/external/css-modern/evals/evals.json +44 -0
  182. package/pipeline/skills/shared/external/css-modern/references/code-examples.md +5 -0
  183. package/pipeline/skills/shared/external/database-patterns/evals/evals.json +46 -0
  184. package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +5 -0
  185. package/pipeline/skills/shared/external/debugging-strategies/evals/evals.json +43 -0
  186. package/pipeline/skills/shared/external/docker-expert/evals/evals.json +45 -0
  187. package/pipeline/skills/shared/external/e2e-testing/SKILL.md +21 -21
  188. package/pipeline/skills/shared/external/e2e-testing/evals/evals.json +44 -0
  189. package/pipeline/skills/shared/external/e2e-testing/references/document-fixtures.md +5 -5
  190. package/pipeline/skills/shared/external/evidence-github/evals/evals.json +41 -0
  191. package/pipeline/skills/shared/external/evidence-registry/SKILL.md +1 -1
  192. package/pipeline/skills/shared/external/evidence-registry/evals/evals.json +41 -0
  193. package/pipeline/skills/shared/external/fastapi-pro/evals/evals.json +57 -0
  194. package/pipeline/skills/shared/external/firebase/SKILL.md +132 -54
  195. package/pipeline/skills/shared/external/firebase/evals/evals.json +42 -0
  196. package/pipeline/skills/shared/external/firebase/references/functions-and-products.md +51 -0
  197. package/pipeline/skills/shared/external/firebase/references/security-rules.md +59 -0
  198. package/pipeline/skills/shared/external/fix-review-verdicts/evals/evals.json +57 -0
  199. package/pipeline/skills/shared/external/free-llm-apis/SKILL.md +70 -0
  200. package/pipeline/skills/shared/external/free-llm-apis/evals/evals.json +44 -0
  201. package/pipeline/skills/shared/external/free-llm-apis/references/providers.md +33 -0
  202. package/pipeline/skills/shared/external/github-actions-templates/evals/evals.json +44 -0
  203. package/pipeline/skills/shared/external/gradle-kotlin-dsl/SKILL.md +1 -1
  204. package/pipeline/skills/shared/external/gradle-kotlin-dsl/evals/evals.json +58 -0
  205. package/pipeline/skills/shared/external/handle-request/SKILL.md +2 -2
  206. package/pipeline/skills/shared/external/handle-request/evals/evals.json +44 -0
  207. package/pipeline/skills/shared/external/hig-app-icons/SKILL.md +2 -2
  208. package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +1 -1
  209. package/pipeline/skills/shared/external/hig-components-content/evals/evals.json +43 -0
  210. package/pipeline/skills/shared/external/hig-components-status/evals/evals.json +43 -0
  211. package/pipeline/skills/shared/external/hig-components-system/evals/evals.json +43 -0
  212. package/pipeline/skills/shared/external/hig-inputs/evals/evals.json +44 -0
  213. package/pipeline/skills/shared/external/hig-patterns/evals/evals.json +46 -0
  214. package/pipeline/skills/shared/external/hig-platforms/evals/evals.json +45 -0
  215. package/pipeline/skills/shared/external/hig-technologies/evals/evals.json +44 -0
  216. package/pipeline/skills/shared/external/html-semantic/evals/evals.json +46 -0
  217. package/pipeline/skills/shared/external/humanizer/evals/evals.json +46 -0
  218. package/pipeline/skills/shared/external/ios-coding-standard/evals/evals.json +44 -0
  219. package/pipeline/skills/shared/external/ios-debugger-agent/SKILL.md +91 -52
  220. package/pipeline/skills/shared/external/ios-debugger-agent/evals/evals.json +41 -0
  221. package/pipeline/skills/shared/external/ios-design-review/SKILL.md +12 -12
  222. package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +16 -16
  223. package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +1 -1
  224. package/pipeline/skills/shared/external/ios-iphone-duo/SKILL.md +0 -1
  225. package/pipeline/skills/shared/external/ios-module-structure/evals/evals.json +42 -0
  226. package/pipeline/skills/shared/external/ios-security/SKILL.md +1 -1
  227. package/pipeline/skills/shared/external/ios-security/evals/evals.json +45 -0
  228. package/pipeline/skills/shared/external/kotlin-coroutines-expert/evals/evals.json +43 -0
  229. package/pipeline/skills/shared/external/localization-reuse-map/evals/evals.json +45 -0
  230. package/pipeline/skills/shared/external/macos-menubar-tuist-app/SKILL.md +170 -74
  231. package/pipeline/skills/shared/external/macos-menubar-tuist-app/evals/evals.json +52 -0
  232. package/pipeline/skills/shared/external/macos-spm-app-packaging/SKILL.md +119 -77
  233. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Package.swift +5 -5
  234. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/MyApp.swift +24 -0
  235. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/version.env +2 -0
  236. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/build_icon.sh +46 -39
  237. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/compile_and_run.sh +70 -49
  238. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/launch.sh +24 -17
  239. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/make_appcast.sh +74 -59
  240. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh +201 -170
  241. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +50 -42
  242. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +65 -35
  243. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/version.env +2 -0
  244. package/pipeline/skills/shared/external/macos-spm-app-packaging/evals/evals.json +45 -0
  245. package/pipeline/skills/shared/external/macos-spm-app-packaging/references/packaging.md +49 -17
  246. package/pipeline/skills/shared/external/macos-spm-app-packaging/references/release.md +48 -23
  247. package/pipeline/skills/shared/external/macos-spm-app-packaging/references/scaffold.md +74 -44
  248. package/pipeline/skills/shared/external/monorepo-architect/evals/evals.json +45 -0
  249. package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +14 -3
  250. package/pipeline/skills/shared/external/nextjs-app-router/evals/evals.json +43 -0
  251. package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +3 -0
  252. package/pipeline/skills/shared/external/nodejs-backend-patterns/evals/evals.json +45 -0
  253. package/pipeline/skills/shared/external/observability-engineer/evals/evals.json +45 -0
  254. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +10 -0
  255. package/pipeline/skills/shared/external/photos-camera-media/evals/evals.json +45 -0
  256. package/pipeline/skills/shared/external/play-store-review/evals/evals.json +45 -0
  257. package/pipeline/skills/shared/external/python-patterns/evals/evals.json +46 -0
  258. package/pipeline/skills/shared/external/react-best-practices/evals/evals.json +43 -0
  259. package/pipeline/skills/shared/external/rest-api-design/evals/evals.json +46 -0
  260. package/pipeline/skills/shared/external/retrofit-networking/SKILL.md +1 -1
  261. package/pipeline/skills/shared/external/retrofit-networking/evals/evals.json +43 -0
  262. package/pipeline/skills/shared/external/room-database/SKILL.md +1 -1
  263. package/pipeline/skills/shared/external/room-database/evals/evals.json +43 -0
  264. package/pipeline/skills/shared/external/scenario-gap-analysis/SKILL.md +1 -1
  265. package/pipeline/skills/shared/external/scenario-gap-analysis/evals/evals.json +43 -0
  266. package/pipeline/skills/shared/external/search-first/evals/evals.json +42 -0
  267. package/pipeline/skills/shared/external/security-review/SKILL.md +14 -3
  268. package/pipeline/skills/shared/external/security-review/evals/evals.json +48 -0
  269. package/pipeline/skills/shared/external/security-review/references/agentic-systems.md +93 -0
  270. package/pipeline/skills/shared/external/security-review/references/firebase-rules.md +100 -0
  271. package/pipeline/skills/shared/external/security-review/references/graphql.md +82 -0
  272. package/pipeline/skills/shared/external/security-review/references/llm-prompt-injection.md +93 -0
  273. package/pipeline/skills/shared/external/security-review/references/oauth-oidc.md +100 -0
  274. package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +1 -1
  275. package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +1 -1
  276. package/pipeline/skills/shared/external/security-review/references/supabase.md +73 -0
  277. package/pipeline/skills/shared/external/signal-community/SKILL.md +29 -10
  278. package/pipeline/skills/shared/external/signal-community/evals/evals.json +42 -0
  279. package/pipeline/skills/shared/external/skill-creator/evals/evals.json +43 -0
  280. package/pipeline/skills/shared/external/skill-creator/template.md +1 -3
  281. package/pipeline/skills/shared/external/spm-build-analysis/SKILL.md +80 -61
  282. package/pipeline/skills/shared/external/spm-build-analysis/evals/evals.json +56 -0
  283. package/pipeline/skills/shared/external/spm-build-analysis/references/build-optimization-sources.md +83 -133
  284. package/pipeline/skills/shared/external/spm-build-analysis/references/recommendation-format.md +41 -40
  285. package/pipeline/skills/shared/external/spm-build-analysis/references/spm-analysis-checks.md +89 -87
  286. package/pipeline/skills/shared/external/spm-build-analysis/scripts/check_spm_pins.py +90 -85
  287. package/pipeline/skills/shared/external/swift-concurrency-expert/SKILL.md +78 -69
  288. package/pipeline/skills/shared/external/swift-concurrency-expert/evals/evals.json +54 -0
  289. package/pipeline/skills/shared/external/swift-concurrency-expert/references/approachable-concurrency.md +52 -48
  290. package/pipeline/skills/shared/external/swift-concurrency-expert/references/swift-6-2-concurrency.md +118 -184
  291. package/pipeline/skills/shared/external/swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md +68 -22
  292. package/pipeline/skills/shared/external/swift-concurrency-pro/SKILL.md +117 -94
  293. package/pipeline/skills/shared/external/swift-concurrency-pro/evals/evals.json +57 -0
  294. package/pipeline/skills/shared/external/swift-concurrency-pro/references/actors.md +102 -97
  295. package/pipeline/skills/shared/external/swift-concurrency-pro/references/async-streams.md +36 -37
  296. package/pipeline/skills/shared/external/swift-concurrency-pro/references/bridging.md +82 -34
  297. package/pipeline/skills/shared/external/swift-concurrency-pro/references/bug-patterns.md +90 -52
  298. package/pipeline/skills/shared/external/swift-concurrency-pro/references/cancellation.md +55 -55
  299. package/pipeline/skills/shared/external/swift-concurrency-pro/references/diagnostics.md +66 -43
  300. package/pipeline/skills/shared/external/swift-concurrency-pro/references/hotspots.md +39 -23
  301. package/pipeline/skills/shared/external/swift-concurrency-pro/references/interop.md +66 -68
  302. package/pipeline/skills/shared/external/swift-concurrency-pro/references/new-features.md +152 -131
  303. package/pipeline/skills/shared/external/swift-concurrency-pro/references/structured.md +60 -57
  304. package/pipeline/skills/shared/external/swift-concurrency-pro/references/testing.md +131 -118
  305. package/pipeline/skills/shared/external/swift-concurrency-pro/references/unstructured.md +37 -29
  306. package/pipeline/skills/shared/external/swift-formatstyle/evals/evals.json +43 -0
  307. package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +77 -58
  308. package/pipeline/skills/shared/external/swift-testing-pro/evals/evals.json +59 -0
  309. package/pipeline/skills/shared/external/swift-testing-pro/references/async-tests.md +139 -144
  310. package/pipeline/skills/shared/external/swift-testing-pro/references/core-rules.md +90 -28
  311. package/pipeline/skills/shared/external/swift-testing-pro/references/migrating-from-xctest.md +38 -21
  312. package/pipeline/skills/shared/external/swift-testing-pro/references/new-features.md +139 -156
  313. package/pipeline/skills/shared/external/swift-testing-pro/references/writing-better-tests.md +173 -147
  314. package/pipeline/skills/shared/external/swiftdata-pro/SKILL.md +75 -59
  315. package/pipeline/skills/shared/external/swiftdata-pro/evals/evals.json +50 -0
  316. package/pipeline/skills/shared/external/swiftdata-pro/references/cloudkit.md +34 -7
  317. package/pipeline/skills/shared/external/swiftdata-pro/references/indexing.md +20 -14
  318. package/pipeline/skills/shared/external/swiftdata-pro/references/inheritance.md +127 -0
  319. package/pipeline/skills/shared/external/swiftdata-pro/references/model-rules.md +141 -0
  320. package/pipeline/skills/shared/external/swiftdata-pro/references/predicates.md +37 -44
  321. package/pipeline/skills/shared/external/swiftlint/evals/evals.json +44 -0
  322. package/pipeline/skills/shared/external/swiftui-expert-skill/SKILL.md +89 -88
  323. package/pipeline/skills/shared/external/swiftui-expert-skill/evals/evals.json +55 -0
  324. package/pipeline/skills/shared/external/swiftui-expert-skill/references/accessibility-patterns.md +104 -122
  325. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-advanced.md +73 -93
  326. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-basics.md +144 -169
  327. package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-transitions.md +122 -133
  328. package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts-accessibility.md +141 -99
  329. package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts.md +273 -333
  330. package/pipeline/skills/shared/external/swiftui-expert-skill/references/image-optimization.md +105 -128
  331. package/pipeline/skills/shared/external/swiftui-expert-skill/references/latest-apis.md +199 -312
  332. package/pipeline/skills/shared/external/swiftui-expert-skill/references/layout-best-practices.md +129 -169
  333. package/pipeline/skills/shared/external/swiftui-expert-skill/references/liquid-glass.md +17 -30
  334. package/pipeline/skills/shared/external/swiftui-expert-skill/references/list-patterns.md +198 -258
  335. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-scenes.md +145 -218
  336. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-views.md +150 -249
  337. package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-window-styling.md +109 -208
  338. package/pipeline/skills/shared/external/swiftui-expert-skill/references/performance-patterns.md +225 -271
  339. package/pipeline/skills/shared/external/swiftui-expert-skill/references/scroll-patterns.md +117 -210
  340. package/pipeline/skills/shared/external/swiftui-expert-skill/references/sheet-navigation-patterns.md +171 -237
  341. package/pipeline/skills/shared/external/swiftui-expert-skill/references/state-management.md +196 -260
  342. package/pipeline/skills/shared/external/swiftui-expert-skill/references/view-structure.md +167 -230
  343. package/pipeline/skills/shared/external/swiftui-gestures/evals/evals.json +43 -0
  344. package/pipeline/skills/shared/external/swiftui-layout-components/evals/evals.json +43 -0
  345. package/pipeline/skills/shared/external/swiftui-navigation/evals/evals.json +44 -0
  346. package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +1 -2
  347. package/pipeline/skills/shared/external/swiftui-patterns/evals/evals.json +43 -0
  348. package/pipeline/skills/shared/external/swiftui-performance/evals/evals.json +44 -0
  349. package/pipeline/skills/shared/external/swiftui-performance-audit/SKILL.md +71 -79
  350. package/pipeline/skills/shared/external/swiftui-performance-audit/evals/evals.json +55 -0
  351. package/pipeline/skills/shared/external/swiftui-performance-audit/references/audit-layout.md +50 -0
  352. package/pipeline/skills/shared/external/swiftui-performance-audit/references/capture-checklist.md +51 -0
  353. package/pipeline/skills/shared/external/swiftui-performance-audit/references/hangs.md +34 -0
  354. package/pipeline/skills/shared/external/swiftui-performance-audit/references/instruments-guide.md +68 -0
  355. package/pipeline/skills/shared/external/swiftui-performance-audit/references/smell-catalog.md +191 -0
  356. package/pipeline/skills/shared/external/swiftui-performance-audit/references/update-model.md +69 -0
  357. package/pipeline/skills/shared/external/swiftui-pro/SKILL.md +65 -63
  358. package/pipeline/skills/shared/external/swiftui-pro/evals/evals.json +45 -0
  359. package/pipeline/skills/shared/external/swiftui-pro/references/accessibility.md +40 -13
  360. package/pipeline/skills/shared/external/swiftui-pro/references/api.md +74 -29
  361. package/pipeline/skills/shared/external/swiftui-pro/references/data.md +44 -24
  362. package/pipeline/skills/shared/external/swiftui-pro/references/design.md +45 -31
  363. package/pipeline/skills/shared/external/swiftui-pro/references/hygiene.md +17 -8
  364. package/pipeline/skills/shared/external/swiftui-pro/references/navigation.md +19 -9
  365. package/pipeline/skills/shared/external/swiftui-pro/references/performance.md +50 -34
  366. package/pipeline/skills/shared/external/swiftui-pro/references/swift.md +73 -45
  367. package/pipeline/skills/shared/external/swiftui-pro/references/views.md +48 -23
  368. package/pipeline/skills/shared/external/swiftui-ui-patterns/SKILL.md +89 -83
  369. package/pipeline/skills/shared/external/swiftui-ui-patterns/evals/evals.json +44 -0
  370. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/app-wiring.md +119 -114
  371. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/async-state.md +76 -61
  372. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/components-index.md +63 -46
  373. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/controls.md +32 -31
  374. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/deeplinks.md +49 -38
  375. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/focus.md +77 -49
  376. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/form.md +61 -44
  377. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/grids.md +40 -42
  378. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/input-toolbar.md +44 -31
  379. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/lightweight-clients.md +90 -64
  380. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/list.md +48 -49
  381. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/loading-placeholders.md +36 -25
  382. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/macos-settings.md +30 -30
  383. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/matched-transitions.md +49 -32
  384. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/media.md +49 -41
  385. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/menu-bar.md +52 -48
  386. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/navigationstack.md +119 -104
  387. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/overlay.md +30 -27
  388. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/performance.md +33 -31
  389. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/previews.md +27 -27
  390. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scroll-reveal.md +79 -86
  391. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scrollview.md +47 -40
  392. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/searchable.md +55 -40
  393. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/sheets.md +113 -84
  394. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/split-views.md +37 -34
  395. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/tabview.md +75 -75
  396. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/theming.md +37 -32
  397. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/title-menus.md +41 -51
  398. package/pipeline/skills/shared/external/swiftui-ui-patterns/references/top-bar.md +46 -30
  399. package/pipeline/skills/shared/external/swiftui-uikit-interop/evals/evals.json +44 -0
  400. package/pipeline/skills/shared/external/swiftui-view-refactor/SKILL.md +152 -121
  401. package/pipeline/skills/shared/external/swiftui-view-refactor/evals/evals.json +56 -0
  402. package/pipeline/skills/shared/external/swiftui-view-refactor/references/mv-patterns.md +107 -98
  403. package/pipeline/skills/shared/external/swiftui-webkit/evals/evals.json +44 -0
  404. package/pipeline/skills/shared/external/tailwind-css/evals/evals.json +43 -0
  405. package/pipeline/skills/shared/external/test-result-triage/SKILL.md +2 -2
  406. package/pipeline/skills/shared/external/test-result-triage/evals/evals.json +44 -0
  407. package/pipeline/skills/shared/external/testing-backend/evals/evals.json +42 -0
  408. package/pipeline/skills/shared/external/tipkit/evals/evals.json +44 -0
  409. package/pipeline/skills/shared/external/typescript-patterns/evals/evals.json +42 -0
  410. package/pipeline/skills/shared/external/valven-rules/evals/evals.json +44 -0
  411. package/pipeline/skills/shared/external/vision-framework/evals/evals.json +44 -0
  412. package/pipeline/skills/shared/external/vue-composition/evals/evals.json +42 -0
  413. package/pipeline/skills/shared/external/weatherkit/evals/evals.json +42 -0
  414. package/pipeline/skills/shared/external/web-accessibility/evals/evals.json +43 -0
  415. package/pipeline/skills/shared/external/web-performance/evals/evals.json +44 -0
  416. package/pipeline/skills/shared/external/web-testing/SKILL.md +2 -2
  417. package/pipeline/skills/shared/external/web-testing/evals/evals.json +43 -0
  418. package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +2 -2
  419. package/pipeline/skills/shared/external/widgetkit/evals/evals.json +44 -0
  420. package/pipeline/skills/shared/external/xcode-build-benchmark/SKILL.md +61 -55
  421. package/pipeline/skills/shared/external/xcode-build-benchmark/evals/evals.json +42 -0
  422. package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmark-artifacts.md +69 -67
  423. package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmarking-workflow.md +39 -47
  424. package/pipeline/skills/shared/external/xcode-build-benchmark/schemas/build-benchmark.schema.json +72 -154
  425. package/pipeline/skills/shared/external/xcode-build-benchmark/scripts/benchmark_builds.py +207 -245
  426. package/pipeline/skills/shared/external/xcode-build-fixer/SKILL.md +145 -139
  427. package/pipeline/skills/shared/external/xcode-build-fixer/evals/evals.json +54 -0
  428. package/pipeline/skills/shared/external/xcode-build-fixer/references/build-settings-best-practices.md +81 -175
  429. package/pipeline/skills/shared/external/xcode-build-fixer/references/fix-patterns.md +188 -143
  430. package/pipeline/skills/shared/external/xcode-build-fixer/references/recommendation-format.md +41 -40
  431. package/pipeline/skills/shared/external/xcode-build-fixer/scripts/benchmark_builds.py +207 -245
  432. package/pipeline/skills/shared/external/xcode-build-orchestrator/SKILL.md +107 -98
  433. package/pipeline/skills/shared/external/xcode-build-orchestrator/evals/evals.json +54 -0
  434. package/pipeline/skills/shared/external/xcode-build-orchestrator/references/benchmark-artifacts.md +69 -67
  435. package/pipeline/skills/shared/external/xcode-build-orchestrator/references/build-settings-best-practices.md +81 -175
  436. package/pipeline/skills/shared/external/xcode-build-orchestrator/references/orchestration-report-template.md +81 -69
  437. package/pipeline/skills/shared/external/xcode-build-orchestrator/references/recommendation-format.md +41 -40
  438. package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/benchmark_builds.py +207 -245
  439. package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/diagnose_compilation.py +155 -210
  440. package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/generate_optimization_report.py +355 -480
  441. package/pipeline/skills/shared/external/xcode-compilation-analyzer/SKILL.md +70 -69
  442. package/pipeline/skills/shared/external/xcode-compilation-analyzer/evals/evals.json +54 -0
  443. package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/build-optimization-sources.md +83 -133
  444. package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/code-compilation-checks.md +85 -73
  445. package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/recommendation-format.md +41 -40
  446. package/pipeline/skills/shared/external/xcode-compilation-analyzer/scripts/diagnose_compilation.py +155 -210
  447. package/pipeline/skills/shared/external/xcode-project-analyzer/SKILL.md +54 -52
  448. package/pipeline/skills/shared/external/xcode-project-analyzer/evals/evals.json +54 -0
  449. package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-optimization-sources.md +83 -133
  450. package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-settings-best-practices.md +81 -175
  451. package/pipeline/skills/shared/external/xcode-project-analyzer/references/project-audit-checks.md +115 -83
  452. package/pipeline/skills/shared/external/xcode-project-analyzer/references/recommendation-format.md +41 -40
  453. package/pipeline/scripts/_notices.mjs +0 -171
  454. package/pipeline/skills/shared/external/NOTICE-avdlee-swiftui-agent-skill.md +0 -48
  455. package/pipeline/skills/shared/external/NOTICE-dimillian-skills.md +0 -63
  456. package/pipeline/skills/shared/external/NOTICE-paul-hudson-skills.md +0 -54
  457. package/pipeline/skills/shared/external/NOTICE-vibeship-spawner-skills.md +0 -203
  458. package/pipeline/skills/shared/external/NOTICE-xcode-build-skills.md +0 -60
  459. package/pipeline/skills/shared/external/ios-iphone-duo/NOTICE.md +0 -53
  460. package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/main.swift +0 -11
  461. package/pipeline/skills/shared/external/swiftdata-pro/references/class-inheritance.md +0 -104
  462. package/pipeline/skills/shared/external/swiftdata-pro/references/core-rules.md +0 -20
  463. package/pipeline/skills/shared/external/swiftui-performance-audit/references/code-smells.md +0 -158
  464. package/pipeline/skills/shared/external/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +0 -46
  465. package/pipeline/skills/shared/external/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +0 -29
  466. package/pipeline/skills/shared/external/swiftui-performance-audit/references/profiling-intake.md +0 -44
  467. package/pipeline/skills/shared/external/swiftui-performance-audit/references/report-template.md +0 -47
  468. package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +0 -33
  469. package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +0 -52
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * identifier-scan.mjs - find a forbidden name written inside an identifier.
4
+ *
5
+ * A word-bounded regex such as `\bAcmeCorp` misses `OriginalAcmeCorpEmbed`,
6
+ * because the name starts mid-word. This splits every identifier-shaped token
7
+ * (letters, digits, `_`, `-`) on camelCase / PascalCase / acronym / digit /
8
+ * underscore / hyphen boundaries and looks for each forbidden word sequence as
9
+ * consecutive lowercase parts. Plain single words are left to the regex scans:
10
+ * only a token that splits into two or more parts is checked here, which keeps
11
+ * an ordinary English word from matching a short name.
12
+ *
13
+ * Usage:
14
+ * identifier-scan.mjs --root <dir> --words "first second,third" [--exclude name,...]
15
+ * (words: comma-separated sequences, each a space-separated list of parts)
16
+ * Symlinks are skipped, never followed, so a broken link or a loop cannot stop
17
+ * the walk.
18
+ * Exit: 0 clean, 1 at least one hit (printed as path:line identifier), 2 usage
19
+ * or a scan that failed.
20
+ *
21
+ * @module pipeline/lib/identifier-scan
22
+ */
23
+
24
+ import { lstatSync, readdirSync, readFileSync } from "node:fs";
25
+ import { join, relative } from "node:path";
26
+ import { invokedDirectly } from "./invoked-directly.mjs";
27
+
28
+ export function identifierParts(token) {
29
+ return String(token)
30
+ .replace(/([a-z])([A-Z])/g, "$1 $2")
31
+ .replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2")
32
+ .replace(/([A-Za-z])([0-9])/g, "$1 $2")
33
+ .replace(/([0-9])([A-Za-z])/g, "$1 $2")
34
+ .split(/[\s_-]+/)
35
+ .filter(Boolean)
36
+ .map((p) => p.toLowerCase());
37
+ }
38
+
39
+ function containsSequence(parts, seq) {
40
+ for (let i = 0; i + seq.length <= parts.length; i++) {
41
+ let ok = true;
42
+ for (let j = 0; j < seq.length; j++) {
43
+ if (parts[i + j] !== seq[j]) {
44
+ ok = false;
45
+ break;
46
+ }
47
+ }
48
+ if (ok) return true;
49
+ }
50
+ return false;
51
+ }
52
+
53
+ export function findInText(text, sequences) {
54
+ const hits = [];
55
+ String(text)
56
+ .split("\n")
57
+ .forEach((line, i) => {
58
+ for (const m of line.matchAll(/[A-Za-z0-9][A-Za-z0-9_-]*[A-Za-z0-9]/g)) {
59
+ const parts = identifierParts(m[0]);
60
+ if (parts.length < 2) continue;
61
+ const seq = sequences.find((s) => containsSequence(parts, s));
62
+ if (seq) hits.push({ line: i + 1, identifier: m[0], sequence: seq.join(" ") });
63
+ }
64
+ });
65
+ return hits;
66
+ }
67
+
68
+ const SKIP_DIRS = new Set([
69
+ ".git",
70
+ "node_modules",
71
+ ".worktrees",
72
+ ".claude",
73
+ ".next",
74
+ "coverage",
75
+ ".c8_output",
76
+ "DerivedData",
77
+ ]);
78
+ const BINARY = /\.(png|jpe?g|gif|webp|ico|pdf|zip|gz|tgz|woff2?|ttf|otf|mp4|mov|wasm)$/i;
79
+
80
+ function walk(dir, exclude, out = []) {
81
+ for (const name of readdirSync(dir)) {
82
+ if (exclude.has(name)) continue;
83
+ const full = join(dir, name);
84
+ let st;
85
+ try {
86
+ st = lstatSync(full);
87
+ } catch {
88
+ continue;
89
+ }
90
+ if (st.isSymbolicLink()) continue;
91
+ if (st.isDirectory()) {
92
+ if (!SKIP_DIRS.has(name)) walk(full, exclude, out);
93
+ } else if (st.isFile() && !BINARY.test(name) && st.size < 2_000_000) {
94
+ out.push(full);
95
+ }
96
+ }
97
+ return out;
98
+ }
99
+
100
+ function main(argv) {
101
+ let root = null;
102
+ let words = null;
103
+ const exclude = new Set();
104
+ for (let i = 0; i < argv.length; i++) {
105
+ if (argv[i] === "--root" && argv[i + 1]) root = argv[++i];
106
+ else if (argv[i] === "--words" && argv[i + 1]) words = argv[++i];
107
+ else if (argv[i] === "--exclude" && argv[i + 1]) {
108
+ for (const n of argv[++i].split(",")) if (n.trim()) exclude.add(n.trim());
109
+ } else {
110
+ console.error(`identifier-scan: unknown argument ${argv[i]}`);
111
+ return 2;
112
+ }
113
+ }
114
+ if (!root || !words) {
115
+ console.error('usage: identifier-scan.mjs --root <dir> --words "a b,c" [--exclude name,...]');
116
+ return 2;
117
+ }
118
+ const sequences = words
119
+ .split(",")
120
+ .map((w) => w.trim().toLowerCase().split(/\s+/).filter(Boolean))
121
+ .filter((s) => s.length);
122
+ const hits = [];
123
+ for (const file of walk(root, exclude)) {
124
+ let text;
125
+ try {
126
+ text = readFileSync(file, "utf8");
127
+ } catch {
128
+ continue;
129
+ }
130
+ for (const h of findInText(text, sequences)) {
131
+ hits.push(`${relative(root, file)}:${h.line} ${h.identifier}`);
132
+ }
133
+ }
134
+ for (const h of hits) console.log(h);
135
+ return hits.length ? 1 : 0;
136
+ }
137
+
138
+ if (invokedDirectly(import.meta.url)) {
139
+ try {
140
+ process.exitCode = main(process.argv.slice(2));
141
+ } catch (err) {
142
+ console.error(`identifier-scan: ${err?.message ?? err}`);
143
+ process.exitCode = 2;
144
+ }
145
+ }
@@ -84,6 +84,29 @@ export const RULES = [
84
84
  { name: "huggingface-token", certain: true, re: /\bhf_[A-Za-z0-9]{30,}\b/g },
85
85
  { name: "groq-key", certain: true, re: /\bgsk_[A-Za-z0-9]{40,}\b/g },
86
86
  { name: "openrouter-key", certain: true, re: /\bsk-or-v1-[A-Za-z0-9]{40,}\b/g },
87
+ {
88
+ name: "slack-app-token",
89
+ certain: true,
90
+ re: /\bxapp-\d+-[A-Za-z0-9]{8,}-\d{8,}-[A-Za-z0-9]{32,}\b/g,
91
+ },
92
+ {
93
+ name: "sendgrid-key",
94
+ certain: true,
95
+ re: /\bSG\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]{43}(?![\w-])/g,
96
+ },
97
+ { name: "twilio-api-key", certain: true, re: /(?<![A-Za-z0-9_])SK[0-9a-f]{32}(?![A-Za-z0-9_])/g },
98
+ // The AWS secret key and session token carry no prefix; the name they are
99
+ // assigned to is the signal, and the value class keeps out `${VAR}` and `<placeholder>`.
100
+ {
101
+ name: "aws-secret-access-key",
102
+ certain: true,
103
+ re: /aws_?secret_?access_?key["']?\s*[:=]\s*["']?[A-Za-z0-9/+=]{40}(?![A-Za-z0-9/+=])/gi,
104
+ },
105
+ {
106
+ name: "aws-session-token",
107
+ certain: true,
108
+ re: /aws_?session_?token["']?\s*[:=]\s*["']?[A-Za-z0-9/+=]{100,}/gi,
109
+ },
87
110
  {
88
111
  name: "service-account-json",
89
112
  certain: true,
@@ -94,7 +117,11 @@ export const RULES = [
94
117
  certain: true,
95
118
  re: /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,
96
119
  },
97
- { name: "private-key-block", certain: true, re: /-----BEGIN [A-Z ]*PRIVATE KEY-----/g },
120
+ {
121
+ name: "private-key-block",
122
+ certain: true,
123
+ re: /-----BEGIN [A-Z0-9 ]*PRIVATE KEY(?: BLOCK)?-----/g,
124
+ },
98
125
  // A URL carrying credentials. This is the one that leaks by accident most
99
126
  // often: a `git remote -v` pasted into a comment.
100
127
  {
@@ -23,15 +23,24 @@ import { join } from "node:path";
23
23
  const PREFS_HOST_KEYS = ["jira", "confluence", "bitbucket"];
24
24
 
25
25
  // The free-model hosts a sandboxed bulk-read may reach once route-on --free is
26
- // on: Groq alone under the default no-training policy, all five with
27
- // allowTraining. A local Ollama needs no host; allowLocalBinding covers it.
28
- const FREE_HOSTS_NO_TRAINING = ["api.groq.com"];
29
- const FREE_HOSTS_ANY = [
26
+ // on, one per chain-eligible provider in the toolkit's tools/llm catalog:
27
+ // providers whose dataUse is no-training under the default policy, every
28
+ // chain-eligible remote provider with allowTraining. A local Ollama needs no
29
+ // host; allowLocalBinding covers it. test/free-hosts.test.mjs holds these lists
30
+ // to the catalog when the toolkit is checked out beside this repo.
31
+ export const FREE_HOSTS_NO_TRAINING = ["api.groq.com", "api.cloudflare.com"];
32
+ export const FREE_HOSTS_ANY = [
30
33
  "api.groq.com",
31
34
  "api.mistral.ai",
32
35
  "generativelanguage.googleapis.com",
33
36
  "openrouter.ai",
34
37
  "api.z.ai",
38
+ "integrate.api.nvidia.com",
39
+ "api.cloudflare.com",
40
+ "oai.endpoints.kepler.ai.cloud.ovh.net",
41
+ "ai-gateway.kilo.ai",
42
+ "api.llm7.io",
43
+ "api.aionlabs.ai",
35
44
  ];
36
45
 
37
46
  /**
@@ -83,5 +83,5 @@ behind.
83
83
  33. **References are built from the evidence record, not written.** Section 21 is emitted by `$HOME/.claude/scripts/build-references.mjs` from `state.analysisSpec.evidence.*` in both profiles. Each row carries a precision anchor in its `Sürüm / Ref` column - Figma node id, Confluence `pageId` plus page version, the commit SHA a repo was read at, the Swagger spec version - because a reference with no anchor points at a moving target. Each row carries an `Erişim / Access` cell: a declared source that could not be fetched still gets a row reading `erişilemedi (<reason>)`, since a silently dropped source reads to the next person as a source that never existed. User statements from the conversation that no fetched source contains are recorded as `Serbest metin` rows, quoted verbatim, with the decision they settled. **Coverage gate**: every entry in `evidence.figma[]`, `confluence[]`, `jira[]`, `swagger[]`, `repo[]`, `standards[]`, `firebase[]`, `documents[]`, `outside[]`, `freeText[]` and every entry in `evidence.fetchErrors[]` must appear as a row, and every row must map to an evidence entry. A source that shaped the document but is missing from References fails the dispatch gate; so does an invented row with no evidence behind it.
84
84
  34. **Stack-optional render.** Platform and repo selection are optional. When `state.analysisSpec.platforms[]` is empty, the run still completes: the analysis layers that do not need a target repository render in full - Part A and Part B in the corporate profile, Sections 1-12 and 16-17 in the global profile - and only the development layer is dropped (corporate Part C; global Sections 13, 14, 15) along with the Pass B projection, since there are no conventions to project onto. A Section 20 row records that the development analysis awaits a repo selection. **The channel split survives the missing repo.** Channels are derived from the evidence instead of repo stack tags (`intake.md` Step 3 carries the signal table) and one document is emitted per derived channel - `mobile`, `web`, or both. A phone screen and a browser screen carry different requirements before anyone has picked a repository; the split (Locked 9) exists to carry that difference and only its *projection* half needs conventions. `mobile` stays one channel rather than iOS plus Android, since without conventions nothing tells the two apart. Evidence with no interface at all yields a single channel-agnostic `<feature>.md`. Files land under `~/Desktop/multiAgentAnalysis/<feature-name>/`, named `<feature>-<channel>.md` (or `<feature>.md` for the channel-agnostic case): the repo-relative `analysis/` path has nothing to be relative to without a repo, and the current working directory is never used, since for a repo-less run it is arbitrary. Desktop because the document is a deliverable to open and hand over; `multiAgentAnalysis` because a generic name collides with whatever else is there. The Phase 3.5 picker shows the resolved path and takes an override through its Other input. A requirements document is useful before a repository is chosen.
85
85
  35. **The document is reviewed before it is published.** A deterministic validator checks structure, not content: a channel nobody searched for, an open question about a frame nobody opened, and an unowned `EKLENECEK` marker all pass it, and every one is what a reader catches on the first pass. Phase 3.2 runs `phases/phase-3-review.md` Step 0 (strict validator, the host's three-reviewer set, triage) on the draft before the destination is chosen: a finding is cheap while nothing is written. Reviewers are subagents holding `analysis/review.md`, never the context that wrote the document, which cannot notice a search it never thought to run. A blocking finding returns to Phase 2b with dispatch closed and never becomes an open question, since "the document is wrong" is not something to ask the reader; capped at two returns. Phase 3.3 sorts every remaining gap into searched-and-closed, asked-and-answered, or `AS-NN`; an unstamped gap fails the dispatch gate. Autopilot runs both; only the asking degrades, into rows stamped `autopilot: could not ask`.
86
- 36. **A redesign records v1 before it plans v2.** `options.redesign` is an opt-in on the `options.uiTests` axis, never a third `mode` value: `mode` says how many sections, `redesign` says which content, and a `mode: redesign` would switch off the Full-mode traceability, Test Plan and rule-to-test gates in exactly the documents that need them. It adds three sub-sections and no top-level section: current behaviour with `CB-<slug>-NN` ids and `repo/file:line` citations, the v1 to v2 endpoint mapping, and a difference list over a closed status vocabulary. Every `Missing` and `Partial` owes a Section 20 row by `AS-NN`, and a `CB-` id in one table but not the other fails in both directions - a behaviour that is in the code and on nobody's difference list is what a redesign loses and production finds. Evidence and certainty are derived from `repoEvidence`, never graded by the writer (Locked 24, same reason), and `options.redesign` is an `evidence_digest` input. Contract and the eight checks: `analysis/redesign.md`, loaded only on a redesign run.
86
+ 36. **A redesign records v1 before it plans v2.** `options.redesign` is an opt-in on the `options.uiTests` axis, never a third `mode` value: `mode` says how many sections, `redesign` says which content, and a `mode: redesign` would switch off the Full-mode traceability, Test Plan and rule-to-test gates in exactly the documents that need them. It adds three sub-sections and no top-level section: current behaviour with `CB-<slug>-NN` ids and `repo/file:line` citations, the v1 to v2 endpoint mapping, and a difference list over a closed status vocabulary. Every `Missing` and `Partial` owes a Section 20 row by `AS-NN`, and a `CB-` id in one table but not the other fails in both directions - a behaviour that is in the code and on nobody's difference list is what a redesign loses and production finds. Evidence and certainty are derived from `repoEvidence`, never graded by the writer (Locked 24, same reason), and `options.redesign` is an `evidence_digest` input. Contract and the nine checks: `analysis/redesign.md`, loaded only on a redesign run.
87
87
  37. **A custom outline replaces the template, not the checks.** `profile: custom` with `outline: <path>` makes the outline's headings the required sections; universal checks still run and template-specific ones report `skipped: custom profile`, never ok.
@@ -4,7 +4,7 @@
4
4
  - [What the mode is for](#what-the-mode-is-for)
5
5
  - [Why it is an option and not a mode](#why-it-is-an-option-and-not-a-mode)
6
6
  - [The three artefacts](#the-three-artefacts)
7
- - [The eight checks](#the-eight-checks)
7
+ - [The nine checks](#the-nine-checks)
8
8
  - [The cache, and the silent failure to avoid](#the-cache-and-the-silent-failure-to-avoid)
9
9
  <!-- /toc -->
10
10
 
@@ -95,7 +95,20 @@ English token.
95
95
  Section 20 row by `AS-NN`. That is the reason the mode exists: a behaviour that
96
96
  v2 drops without a decision is exactly the thing that gets found in production.
97
97
 
98
- ## The eight checks
98
+ Every row also carries a priority, `must`, `should` or `could`, and the table is
99
+ followed by one parity line that `parity-score.mjs` computes from the rows:
100
+
101
+ ```bash
102
+ node "$HOME/.claude/scripts/parity-score.mjs" <analysis.md>
103
+ # Parity: 86.7 (must 4/5) - not shippable: a missing must row is CB-login-04
104
+ ```
105
+
106
+ Weights are must 3, should 2, could 1; `Moved` counts in full, `Partial` half,
107
+ `Missing` nothing; `New` and `Out of scope` are not scored. A `must` row that is
108
+ not fully `Moved` makes the redesign not shippable whatever the number is. Paste
109
+ the line as printed: the validator recomputes it and fails a line that disagrees.
110
+
111
+ ## The nine checks
99
112
 
100
113
  All in `validate-analysis-doc.mjs`, all live only when the front-matter says
101
114
  `redesign: true`.
@@ -106,6 +119,7 @@ All in `validate-analysis-doc.mjs`, all live only when the front-matter says
106
119
  | a row has no `file:line` and is not marked `uncertain` | ERROR | An unmarked guess. Prose can only ask an author to mark it; this finds the row that was not marked |
107
120
  | evidence is `cross-cutting` only, yet `confirmed` | WARN | A legitimate rule in a shared module reads this way, so it must not block - but Phase 4 runs `--strict`, so it blocks in review |
108
121
  | a status value outside the vocabulary | ERROR | A controlled vocabulary decaying into free text |
122
+ | a row with no priority, or a parity line missing or not equal to the computed one | ERROR | A score typed by hand instead of derived from the rows |
109
123
  | a `Missing` or `Partial` row with no Section 20 counterpart | ERROR | The reason the mode exists |
110
124
  | a `CB-` id in one table and not the other, both directions | ERROR | A behaviour that is in the code and on nobody's difference list: the thing that disappears in a redesign and is found in production |
111
125
  | the endpoint table's column count, then a half-written row | ERROR | A renderer that adds a column silently disabling the row checks |
@@ -118,5 +132,5 @@ repoEvidence || conventions`, with a 24-hour TTL. `options.redesign` **is a
118
132
  digest input**. Without it, a redesign started within a day of a normal run on
119
133
  the same feature hits that run's cache, skips Phase 1b entirely, and renders a
120
134
  redesign document whose current-behaviour table is empty - at which point all
121
- eight checks above pass over nothing. This is the most likely quiet failure in
135
+ nine checks above pass over nothing. This is the most likely quiet failure in
122
136
  the whole mode, and one digest input is the whole fix.
@@ -164,11 +164,15 @@ reason 2.1 and 2.2 are separate; if it is empty, one of them was not done.>
164
164
 
165
165
  <Only under `redesign: true`. Every `CB-` row from 2.1.1 appears here once with a status:
166
166
  Moved / Taşındı, Partial / Kısmi, Missing / Yok, New / Yeni, Out of scope / Kapsam dışı.
167
- Partial and Missing rows name the `AS-NN` that decides them.>
167
+ Partial and Missing rows name the `AS-NN` that decides them. Every row carries a priority
168
+ (must / should / could), and the parity line under the table is the output of
169
+ `parity-score.mjs`, pasted as printed.>
168
170
 
169
- | Id | Durum | Nerede | AS-NN |
170
- |---|---|---|---|
171
- | CB-<slug>-01 | Moved / Taşındı | <section> | - |
171
+ | Id | Durum | Nerede | AS-NN | Öncelik / Priority |
172
+ |---|---|---|---|---|
173
+ | CB-<slug>-01 | Moved / Taşındı | <section> | - | must |
174
+
175
+ Parity: 100 (must 1/1) - shippable
172
176
 
173
177
  ### 2.4 Kısıtlar, Varsayımlar, Bağımlılıklar
174
178
 
@@ -510,13 +510,15 @@ List every HTTP status code one by one.
510
510
 
511
511
  ### 9.5 Fark Listesi / Difference List (OPTIONAL)
512
512
 
513
- `redesign: true` only. One row per `CB-` id, both directions checked. Closed status vocabulary - `Moved`, `Partial`, `Missing`, `New`, `Out of scope` - in a bilingual cell like Section 20's `Açık / Open`. Every `Missing` and `Partial` owes a Section 20 row by `AS-NN`.
513
+ `redesign: true` only. One row per `CB-` id, both directions checked. Closed status vocabulary - `Moved`, `Partial`, `Missing`, `New`, `Out of scope` - in a bilingual cell like Section 20's `Açık / Open`. Every `Missing` and `Partial` owes a Section 20 row by `AS-NN`. Every row carries a priority (`must` / `should` / `could`); the parity line under the table is the output of `parity-score.mjs`, pasted as printed.
514
514
 
515
515
  ```markdown
516
- | Id | Durum / Status | Nereye / Where | AS-NN |
517
- |---|---|---|---|
518
- | CB-<slug>-01 | Taşındı / Moved | 4.2 | - |
519
- | CB-<slug>-02 | Eksik / Missing | - | AS-03 |
516
+ | Id | Durum / Status | Nereye / Where | AS-NN | Öncelik / Priority |
517
+ |---|---|---|---|---|
518
+ | CB-<slug>-01 | Taşındı / Moved | 4.2 | - | must |
519
+ | CB-<slug>-02 | Eksik / Missing | - | AS-03 | should |
520
+
521
+ Parity: 60 (must 1/1) - shippable
520
522
  ```
521
523
 
522
524
  ## 10. Lokalizasyon Anahtarları / Localization Keys
@@ -1,6 +1,7 @@
1
1
  ## Audit & Quality Tools Guide
2
2
 
3
3
  <!-- toc -->
4
+ - [Audit & Quality Tools Guide](#audit-quality-tools-guide)
4
5
  - [Trigger Model](#trigger-model)
5
6
  - [iOS Accessibility Audit](#ios-accessibility-audit)
6
7
  - [Android Accessibility Audit](#android-accessibility-audit)
@@ -10,6 +11,9 @@
10
11
  - [Android APK Audit (Play Store Compliance)](#android-apk-audit-play-store-compliance)
11
12
  - [Integration with Pipeline Phases](#integration-with-pipeline-phases)
12
13
  - [Graceful Degradation](#graceful-degradation)
14
+ - [Phase 3 evidence flows](#phase-3-evidence-flows)
15
+ - [UI flow video, when Phase 2 produced none](#ui-flow-video-when-phase-2-produced-none)
16
+ - [Snapshot regression flow (optional)](#snapshot-regression-flow-optional)
13
17
  <!-- /toc -->
14
18
 
15
19
  Standalone audit commands - runs directly via Bash, **no MCP server dependency**. These are the same checks that multi-agent-toolkit-mcp provides as MCP tools, but embedded here as pipeline skills.
@@ -250,3 +254,19 @@ unzip -l "$APK" 2>/dev/null | grep "classes.*\.dex" | wc -l
250
254
  - No Android SDK → skip Android audits, log "Android SDK not available"
251
255
  - No booted simulator → skip accessibility audit, log "No running simulator"
252
256
  - Audits are **enhancements**, never blockers for the pipeline flow
257
+
258
+ ## Phase 3 evidence flows
259
+
260
+ Read from `phases/phase-3-review.md` "Automated Device Checks".
261
+
262
+ ### UI flow video, when Phase 2 produced none
263
+
264
+ Phase 2 Step 3.55 is the primary host and runs in every mode. Phase 3 is the richer one where it exists: the device is up and a person is watching, so the flow is one somebody confirmed. It adds, never replaces.
265
+
266
+ Run only when `visualEvidence.required` and `visualEvidence.video.file` is empty: re-check the device with `$HOME/.claude/scripts/probe-evidence-capability.sh --only device`, then `$HOME/.claude/scripts/capture-evidence.sh video start` -> drive the flow (`run-ui-tests.sh run`, or the Phase 3 scenarios by hand) -> `video stop` -> `fit`. The cap is `visualEvidence.maxVideoSeconds`, read through `capture-evidence.sh limits` so one value serves both. Update `videoTier` and `videoTierReason` with what ran.
267
+
268
+ When the intake answer was `unit` there is no recording here either: overriding it in a phase the user may not be watching makes the question decorative.
269
+
270
+ ### Snapshot regression flow (optional)
271
+
272
+ When the task changes a stable component, capture a screenshot before the change (baseline) and after (current), then call `ios_visual_diff({baseline, current, max_diff_pct: 1.0})`. Threshold can be relaxed for animated / non-deterministic regions - keep `max_diff_pct ≤ 1.0` for static layouts.
@@ -60,6 +60,7 @@ Classify every `$ARGUMENTS` remainder and any pasted input via `~/.claude/lib/co
60
60
  | Pasted free text | `parse-complaints.sh --stdin` (splits blocks, pre-fills ids via the shared label set) |
61
61
  | Jira id / URL | Fetch issue summary + description + comments via Jira REST (account token); concatenate as text blocks, pipe through `parse-complaints.sh --stdin` (Locked 4) |
62
62
  | Confluence URL | `~/.claude/lib/fetch-confluence.sh <url>`; page body paragraphs/table rows become text blocks, piped through `parse-complaints.sh --stdin` |
63
+ | Store reviews (optional: an App Store / Google Play review export, or the user asks for the app's store reviews) | Rows from `mcp__multi-agent-toolkit__store_asc_reviews` / `mcp__multi-agent-toolkit__store_play_reviews` when that store is onboarded, else the export file. Optionally rank them first with `mcp__multi-agent-toolkit__store_review_themes` (`reviews`: the rows or the whole tool result; optional `themes`, `months`, `minPerTheme`): each non-thin theme becomes one text block (label + its verbatim quotes + review ids), and `unthemedNegative[]` rows stay individual blocks. Pipe the blocks through `parse-complaints.sh --stdin` (Locked 4). A review carries no trx/conversation id, so Step 5 asks once per block, not once per review |
63
64
 
64
65
  Merge all outputs into one list, re-numbering ids `C-01..C-NN`. Result: `state.complaintSpec.input` + `state.complaintSpec.complaints[]`.
65
66
 
@@ -51,7 +51,7 @@ State shape: `state.circuitBreaker = {tripped, trigger, detail, checkpoint: {pha
51
51
 
52
52
  Autopilot's contract is "no interaction on the happy path." The circuit-breaker fires only off the happy path, where continuing unattended is the *less* safe choice: repeating a proven-broken action, or spending past a ceiling the user set, is not autonomy, it is a runaway. Halting with a precise reason is cheaper than the tokens (and trust) a silent loop burns.
53
53
 
54
- Inspired by autonomous-loop operators that gate on explicit stop conditions (no-progress, identical-stack-trace repetition, cost drift, conflict blocking), adapted to this pipeline's phase/rework/state model.
54
+ The stop conditions are explicit (no progress, identical stack-trace repetition, cost drift, conflict blocking) and read from this pipeline's phase, rework and state model.
55
55
 
56
56
  ## The runner-level breaker (a different failure, a different layer)
57
57
 
@@ -9,6 +9,7 @@
9
9
  - [Phase 5 Step 3 - refresh after the branch changed code](#phase-5-step-3---refresh-after-the-branch-changed-code)
10
10
  - [What the report answers that a file-level view cannot](#what-the-report-answers-that-a-file-level-view-cannot)
11
11
  - [The graph is drawable, and one place already asks for it](#the-graph-is-drawable-and-one-place-already-asks-for-it)
12
+ - [The same graph through the toolkit](#the-same-graph-through-the-toolkit)
12
13
  <!-- /toc -->
13
14
 
14
15
  A deterministic, LLM-free map of what a repo declares and what refers to what,
@@ -218,3 +219,27 @@ records the gap and writes the prose alone; it never hand-draws a replacement.
218
219
  Jira is not a target: its renderer turns the fence into a literal
219
220
  `{code:mermaid}` block. Confluence renders it through the `ac:name="mermaid"`
220
221
  macro when the space carries the plugin (`channels/confluence.md`).
222
+
223
+ ### The same graph through the toolkit
224
+
225
+ The toolkit reads the same `~/.claude/knowledge/<project>/code-graph.json` over
226
+ MCP, so an agent without a shell (a read-only reviewer, a Copilot or Codex
227
+ session) gets the graph too. `project` is the directory name under
228
+ `~/.claude/knowledge/`; `mcp__multi-agent-toolkit__graph_projects` lists them.
229
+
230
+ | Need | Tool | Script equivalent |
231
+ |---|---|---|
232
+ | Starting file set for a question | `mcp__multi-agent-toolkit__graph_query` (`project`, `query`, optional `budget`) | `graph-query.mjs` |
233
+ | One node and its edges | `mcp__multi-agent-toolkit__graph_node` (`project`, `id` or `name`) | none |
234
+ | Dependents or dependencies | `mcp__multi-agent-toolkit__graph_neighbors` (`project`, `id`, optional `direction`, `kinds`, `depth`, `limit`) | `graph-affected.mjs` |
235
+ | How two nodes connect | `mcp__multi-agent-toolkit__graph_path` (`project`, `from`, `to`, optional `kinds`, `maxDepth`, `directed`) | `graph-query.mjs --path` |
236
+ | Is the graph sane and current | `mcp__multi-agent-toolkit__graph_stats` (`project`): counts by kind, age in days, base commit, whether the stats header agrees with the arrays | `graph-report.mjs --status` |
237
+ | Hubs a change will ripple through | `mcp__multi-agent-toolkit__graph_hubs` (`project`, optional `kinds`, `nodeKind`, `limit`) | the report's hubs section |
238
+ | Clusters and cross-cluster links | `mcp__multi-agent-toolkit__graph_cluster` (`project`, optional `node`, `limit`, `surprising`) | the report's clusters and surprising connections |
239
+
240
+ Phase 1 Step 2.6 still runs the scripts, because it also builds and validates.
241
+ The tools are for reading a graph that already passed `validate-code-graph.mjs`:
242
+ before a plan touches a file, `graph_cluster` with `node` set to it and
243
+ `surprising: true` names the cross-cluster edges worth a second look, and
244
+ `graph_hubs` says whether the file is one of the few everything depends on.
245
+ A `graph_stats` age or base commit that disagrees with HEAD means refresh first.
@@ -0,0 +1,63 @@
1
+ # Phase 4 Commit - Multi-Repo Mode
2
+
3
+ > Loaded on demand from `phases/phase-4-commit.md`. Conditional on
4
+ > `state.projects[].length > 1`; a single-repo run never needs it. The
5
+ > Push-must-succeed policy stays in the phase doc because every run uses it.
6
+
7
+ Active when `state.projects[].length > 1`. The single-repo flow in the phase doc is preserved verbatim - multi-repo is an extension, not a replacement.
8
+
9
+ ## Per-repo commit (shared message, per-repo scope)
10
+
11
+ For each repo in `state.projects[]` (sequentially, in dependency order from Phase 1):
12
+
13
+ 1. `cd "$WT_PATH"` - switch into the repo's worktree.
14
+ 2. Build the commit message using the **shared subject** + **per-repo scope** rule:
15
+ ```
16
+ {type}({repo-scope}): {shared subject} [{tracker-id}]
17
+
18
+ Part of multi-repo change - see sibling PR(s) in repo `{other repo names}`.
19
+ ```
20
+ `repo-scope` is the repo's short name (e.g. `common`, `uicomponents`). The subject and `[tracker-id]` are identical across all repos.
21
+ 3. Fold this repo's checkpoint commits first: `bash $HOME/.claude/scripts/checkpoint-fold.sh --repo "$WT_PATH" --task "{tracker-id}" --base "$BASE_BRANCH"`. Then `git add` (specific files only - same rules as the single-repo staging step, item 4 of the Standard path in `phases/phase-4-commit.md` Step 2)
22
+ 4. `git -C "$WT_PATH" commit -m "$MESSAGE"` (heredoc body) - using identity already pinned in Phase 0 Step 8.
23
+ 5. Capture `state.projects[i].commit = {"sha": "<sha>"}`.
24
+
25
+ Push each repo through the Push-must-succeed policy in `phases/phase-4-commit.md`, then continue here.
26
+
27
+ ## Per-repo PR with cross-links
28
+
29
+ After all repos are pushed, open PRs sequentially, one per `state.projects[]` entry, each through its remote's usual path (gh / Bitbucket REST) with the per-stack body template (Standard / UI Component / etc). Append to each body:
30
+
31
+ ```
32
+ ## Sibling PRs (multi-repo task)
33
+ This PR is part of a multi-repo change. Sibling PRs (review together):
34
+ - <url of each PR opened before this one>
35
+ ```
36
+
37
+ After the last PR opens, `update_sibling_links`: go back to the first N-1 PRs and add the sibling URLs that were not yet known when they were created.
38
+
39
+ **Then finalize each repo's worktree**, serially and only now - `update_sibling_links` updates one PR per repo and the loop `cd`s per repo, so removing repo 1's worktree mid-loop breaks 2..N. Run `worktree-finalize.sh` once per repo with that repo's `--worktree` / `--project-root` / `--project`; each skips or removes independently.
40
+
41
+ `update_sibling_links` does an UPDATE call per PR (Bitbucket: the `channels/pr.md` PUT payload, current `version`; GitHub: `gh pr edit --body-file`). Idempotent.
42
+
43
+ ## GitHub issue body - list all PRs
44
+
45
+ Step 10's "Issue body update" extends to multi-repo: instead of a single `### Pull Requests` line, write one row per repo:
46
+
47
+ ```
48
+ ### Pull Requests
49
+ - **common:** {pr-1-url}
50
+ - **uicomponents:** {pr-2-url}
51
+ ```
52
+
53
+ Match the existing template's table/list shape - do not introduce new markers (per existing single-repo rule).
54
+
55
+ ## `recentGroups` update on success
56
+
57
+ After ALL repos in the task have `pushStatus ∈ {"pushed", "rebase-pushed"}`:
58
+
59
+ 1. Find the matching `recentGroups[]` entry by **order-independent compare** of `repos` array (sort + JSON.stringify).
60
+ 2. If found: `entry.count += 1`, `entry.lastUsed = ISO timestamp`, bump to front of array (LRU).
61
+ 3. If not found: prepend a new entry `{ label: <auto-generated>, repos: [...], count: 1, lastUsed: ... }`. Cap the array at 10 (drop oldest).
62
+
63
+ A task ending with one or more `pushStatus === "skipped"` repos does NOT bump `recentGroups` count - only fully-successful multi-repo tasks earn LRU bumps.
@@ -223,8 +223,12 @@ loading, empty, error, success.
223
223
  > content, the same validation result. A capture in the wrong state is redone,
224
224
  > not compared.
225
225
 
226
- **22. Accessibility** `[A11Y]` - contrast at least 4.5:1 computed from sampled
227
- colours, tap target at least 44x44pt / 48x48dp from the accessibility tree,
226
+ **22. Accessibility** `[A11Y]` - contrast measured, never judged by eye: pass
227
+ each sampled text or icon colour pair to `mcp__multi-agent-toolkit__design_contrast_check`
228
+ (`fg`, `bg`, `size`: `normal`, `large` or `ui`), or the project's colour tokens
229
+ (`tokens` as an object or a JSON path, optional `pairs`, `themes`) to check every
230
+ theme at once. A pair is a pass only at AA (4.5:1 normal text, 3:1 large text and
231
+ UI); the reported ratio and `failingAA` count go into the finding. Tap target at least 44x44pt / 48x48dp from the accessibility tree,
228
232
  screen-reader label present and meaningful plus a meaningful hint, correct
229
233
  traits, an accessibility identifier on each element a user can interact with, and
230
234
  a logical focus order. Whether to also audit scaled text sizes depends on the project: a
@@ -238,10 +242,22 @@ navigation bar treatment, ripple.
238
242
  **24. Dark appearance** `[CAPTURE+]` - capture a second image in the dark
239
243
  appearance and re-run groups 3 to 9 against the dark design frame. Background,
240
244
  text, icon, border, shadow, divider and gradient all adapt; no colour stuck at
241
- its light value; contrast preserved.
245
+ its light value; contrast preserved (item 22's tool, `themes: ["dark"]`). The
246
+ theme must not move anything: `mcp__multi-agent-toolkit__ios_visual_diff` with
247
+ `mode: "layout"` (light capture as `baseline`, dark as `current`; it takes any two
248
+ PNGs, Android included) scores structure and ignores colour, so a result below
249
+ `min_score` (default 90) and its `regions` are content the theme moved. Against
250
+ the dark design frame itself, `mcp__multi-agent-toolkit__design_visual_compare` with
251
+ `mode: "layout"` gives the same structural score across the device and frame
252
+ widths, before the pixel compare.
242
253
 
243
254
  **25. RTL and localization** - `[CAPTURE+]` a mirrored-locale capture: layout
244
- mirrored, leading and trailing swapped, directional icons flipped; `[MEASURE]` no
255
+ mirrored, leading and trailing swapped, directional icons flipped. To measure
256
+ the mirroring, flip the left-to-right capture (`sips --flip horizontal <ltr.png>
257
+ --out <ltr-flipped.png>`) and compare it with the RTL capture through
258
+ `mcp__multi-agent-toolkit__ios_visual_diff` `mode: "layout"`; its `regions` point at
259
+ what did not mirror, and are read against the screenshot, since translated text
260
+ also changes edges; `[MEASURE]` no
245
261
  hardcoded strings, every user-visible string from a localization key; a raw or
246
262
  undefined key rendered on screen (the design shows copy, the implementation shows
247
263
  `Screen.SomeKey`) reported in its own localization section; `[CAPTURE+]` a
@@ -0,0 +1,51 @@
1
+ # Phase 2 Dev - Multi-Repo Mode
2
+
3
+ > Loaded on demand from `phases/phase-2-dev.md`. Conditional on
4
+ > `state.projects[].length > 1` (set by Phase 0 multi-select); a single-repo run
5
+ > never needs it. Token forwarding and the build-log offload stay in the phase
6
+ > doc because every run uses them.
7
+
8
+ Active when `state.projects[].length > 1`. The single-repo flow in the phase doc is preserved verbatim - this file adds the deltas.
9
+
10
+ **Todo tagging**: Phase 1 plan items in multi-repo mode carry a `repo` field naming the target project root. The dev agent uses this tag to dispatch each todo:
11
+
12
+ ```json
13
+ {
14
+ "id": "T-3",
15
+ "title": "Add tokenResolver public API",
16
+ "repo": "common", // ← matches state.projects[i].name
17
+ "files": ["Sources/Common/TokenResolver.swift"],
18
+ "tdd": { "test": "...", "code": "..." }
19
+ }
20
+ ```
21
+
22
+ If a todo has no `repo` tag in multi-repo mode → log warning + ask user, do not auto-pick.
23
+
24
+ **Per-todo worktree switch**: Before each todo's TDD cycle, resolve `WT_PATH = state.projects[ findIndex(name === todo.repo) ].worktreePath` and run **all** subsequent commands with `git -C "$WT_PATH"` and `cd "$WT_PATH"` for build/test. Identity (`user.name`/`user.email`) was already pinned per worktree by Phase 0 Step 8 - no re-config needed here.
25
+
26
+ **Status update (single ticket, multi-repo)**: The Jira/GitHub issue is shared across all repos in the group - call the status-update API exactly **once per todo** (not once per repo per todo). The post-mutation verify rule still applies.
27
+
28
+ **Build serialization**:
29
+ - Xcode worktrees still share `BUILD_LOCK = /tmp/claude-xcodebuild.lock` - multi-repo just means more callers contending for the same lock; the existing `mkdir`-based queue handles it correctly.
30
+ - Non-Xcode repos may build in parallel across worktrees - but ONLY when builds are independent. If repo B's build depends on repo A's freshly-published artifact (e.g. SPM local path dependency), serialize them in dependency order. Plan items declare dependencies via Phase 1's `dependsOn` field; multi-repo dispatch respects that order.
31
+
32
+ **Failure isolation**: A build/test failure in one repo's worktree must NOT silently leave the other repos in a half-built state. On failure:
33
+ 1. Capture the failure into `state.projects[i].buildStatus = { ok: false, attempts: N, lastError: "..." }`
34
+ 2. The ENTIRE Phase 2 retries within that repo's worktree (max 3, same as single-repo)
35
+ 3. After 3 attempts, escalate; do NOT proceed to Phase 3 with any unbuilt repo
36
+
37
+ **Recording a pass (default-FAIL evidence gate):** before setting `buildStatus.ok = true`, the build output must be tee'd to a log and that log must substantiate the success - a zero exit code alone is not trusted. Run the evidence gate; on exit 1, do NOT record a pass:
38
+ ```bash
39
+ <build-command> 2>&1 | tee "{worktreePath}/.build.log" \
40
+ | bash $HOME/.claude/scripts/offload-ref.sh --phase 2 --label build --root "$WORKTREE"
41
+ node $HOME/.claude/scripts/evidence-gate.mjs --claim build --status passed --evidence "$WORKTREE/.build.log"
42
+ ```
43
+ Non-zero from the gate: the build pass is unverified, so treat it as a failure and keep `buildStatus.ok=false`.
44
+ This closes the gap where an agent records "built" without ever producing build output.
45
+ The offload pipe is explained in the phase doc ("Why the pipe").
46
+
47
+ **Telemetry**: Per-repo metrics in addition to per-task metrics:
48
+ ```bash
49
+ $HOME/.claude/scripts/log-metric.sh "$TASK_ID" 2 build.completed repo=common duration_ms=$D status=ok
50
+ $HOME/.claude/scripts/log-metric.sh "$TASK_ID" 2 build.completed repo=uicomponents duration_ms=$D status=ok
51
+ ```
@@ -20,8 +20,8 @@ both on.
20
20
  ## Turning it on
21
21
 
22
22
  ```bash
23
- bash "$HOME/.claude/lib/route-state.sh" on --free # Groq and a local Ollama only
24
- bash "$HOME/.claude/lib/route-state.sh" on --free --allow-training # also Mistral, Gemini, OpenRouter free, Z.AI
23
+ bash "$HOME/.claude/lib/route-state.sh" on --free # no-training providers (Groq, Cloudflare) and a local Ollama
24
+ bash "$HOME/.claude/lib/route-state.sh" on --free --allow-training # also every other chain-eligible provider in the catalog
25
25
  ```
26
26
 
27
27
  `--free` sets `modelRouting.free.enabled`, adds `bulk-read` and `delegate` to
@@ -34,7 +34,14 @@ free and verified, tasks handed back to Claude, and the tokens kept off Claude.
34
34
  `--probe` sends each provider one tiny request.
35
35
 
36
36
  **Data policy.** `allowTraining: false` (the default) keeps text to providers
37
- whose free tier does not train on prompts (Groq) and a local Ollama.
37
+ whose free tier does not train on prompts (Groq, Cloudflare Workers AI) and a
38
+ local Ollama. The provider list is data: the toolkit's `tools/llm/catalog/`
39
+ carries each provider's base URL, data use, commercial terms, sign-up friction
40
+ and a source quote per fact, and `mcp__multi-agent-toolkit__llm_providers`
41
+ reports it.
42
+ Choosing or adding a provider, or reading an `ESCALATE_TO_CLAUDE` result, goes
43
+ through the `ai-common-toolkit:free-llm-apis` skill, which carries the same
44
+ catalog with its terms and the chain's fallback order.
38
45
  `--allow-training` adds free tiers that may train on prompts or whose data use
39
46
  is not stated. Corporate source, tickets and logs belong under the default.
40
47
 
@@ -24,7 +24,7 @@ result and decides. The engine is `research/engine.md`.
24
24
 
25
25
  | Run | What happens |
26
26
  |---|---|
27
- | Attended, not autopilot | Nothing automatic. `/multi-agent:research <id>` is a command a person runs; it asks one gap at a time. `research-gate.mjs` in gate mode is a no-op (`smoke-gates-interactive-noop.sh`) |
27
+ | Attended, not autopilot | Nothing automatic. `/multi-agent:research <id>` is a command a person runs; it asks one gap at a time. `research-gate.mjs` in gate mode is a no-op (`smoke-gates-interactive-noop.sh`). The external-signal tools are opt-in on the toolkit: `research_community` needs `research-community` in `MCP_TOOLKIT_CAPS`, `media_transcript` needs `media-remote`, `social_read` needs `social` |
28
28
  | Gates active (`MULTI_AGENT_UNATTENDED=1` or `state.autopilot`) | `research-gate.mjs` records its verdict and parks or re-opens the run |
29
29
  | The autopilot runner | A parked run is routed to research before it is left awaiting an answer (below) |
30
30
 
@@ -42,8 +42,9 @@ The continuous-mode runner, step 5c, while the item is still claimed:
42
42
  user test and a failed verification are a person's call and are never
43
43
  researched.
44
44
  2. A research session: `/multi-agent:research <id> --autonomous --state <path>`,
45
- launched with `--disallowedTools` naming `research_ask`, `research_search`
46
- and `WebSearch` (`RESEARCH_DENIED_TOOLS`). It writes
45
+ launched with `--disallowedTools` naming `research_ask`, `research_search`,
46
+ `research_community`, `social_read`, `media_transcript` and `WebSearch`
47
+ (`RESEARCH_DENIED_TOOLS`). It writes
47
48
  `<state dir>/research/{context.json,research.json,research.md}`.
48
49
  3. The runner, not the session, runs `research-gate.mjs --state <path> --json`
49
50
  with the unattended environment.