@mmerterden/multi-agent-pipeline 20.39.1 → 20.41.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 (470) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/README.md +28 -10
  3. package/README.tr.md +26 -9
  4. package/docs/FIGMA_PIPELINE.md +1 -1
  5. package/docs/adr/0019-product-tree.md +143 -0
  6. package/docs/adr/README.md +1 -0
  7. package/docs/ecosystem.md +14 -14
  8. package/docs/facts.json +7 -7
  9. package/docs/features.md +10 -4
  10. package/index.js +13 -2
  11. package/install/_common.mjs +0 -126
  12. package/install/_dev-only-files.mjs +1 -0
  13. package/install/_managed-block.mjs +5 -18
  14. package/install/_unattended-profile.mjs +200 -30
  15. package/install/claude.mjs +39 -40
  16. package/install/codex.mjs +2 -1
  17. package/install/copilot.mjs +1 -23
  18. package/install/index.mjs +195 -54
  19. package/install/templates/claude-hooks.json +34 -1
  20. package/manifest.json +473 -396
  21. package/package.json +3 -2
  22. package/pipeline/agents/code-reviewer.md +1 -1
  23. package/pipeline/commands/multi-agent/SKILL.md +1 -1
  24. package/pipeline/commands/multi-agent/analysis/SKILL.md +1 -1
  25. package/pipeline/commands/multi-agent/autopilot/SKILL.md +3 -3
  26. package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +15 -13
  27. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +7 -5
  28. package/pipeline/commands/multi-agent/health/SKILL.md +6 -4
  29. package/pipeline/commands/multi-agent/office-on/SKILL.md +2 -3
  30. package/pipeline/commands/multi-agent/office-pair/SKILL.md +23 -0
  31. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +1 -1
  32. package/pipeline/contract/CHANGELOG.md +27 -0
  33. package/pipeline/contract/README.md +2 -0
  34. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  35. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  36. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  37. package/pipeline/contract/fixtures/launch-plan.json +1 -1
  38. package/pipeline/contract/manifest.json +28 -2
  39. package/pipeline/contract/types/index.d.ts +182 -5
  40. package/pipeline/lib/agent-model-sync.mjs +2 -4
  41. package/pipeline/lib/args.mjs +194 -0
  42. package/pipeline/lib/autopilot-activation.sh +1 -1
  43. package/pipeline/lib/autopilot-state.sh +1 -1
  44. package/pipeline/lib/bg-launch.mjs +3 -3
  45. package/pipeline/lib/classify-intent.sh +9 -9
  46. package/pipeline/lib/claude-sessions.mjs +74 -5
  47. package/pipeline/lib/cli-help.mjs +80 -0
  48. package/pipeline/lib/context-budget.mjs +5 -42
  49. package/pipeline/lib/credential-inventory.sh +23 -4
  50. package/pipeline/lib/credential-resolve.mjs +8 -12
  51. package/pipeline/lib/credential-store.sh +1 -1
  52. package/pipeline/lib/cross-repo.mjs +61 -0
  53. package/pipeline/lib/extract-conventions.sh +27 -27
  54. package/pipeline/lib/fetch-figma-annotations.sh +1 -1
  55. package/pipeline/lib/free-hosts.generated.mjs +22 -0
  56. package/pipeline/lib/glob-match.mjs +189 -0
  57. package/pipeline/lib/health-messages.mjs +351 -0
  58. package/pipeline/lib/hook-registration.mjs +5 -0
  59. package/pipeline/lib/identifier-scan.mjs +22 -11
  60. package/pipeline/lib/jira-family-write.sh +3 -3
  61. package/pipeline/lib/jira-publish.sh +1 -1
  62. package/pipeline/lib/json-file-lock.mjs +24 -23
  63. package/pipeline/lib/mcp-config-audit.mjs +1479 -0
  64. package/pipeline/lib/md2confluence-v3.py +12 -4
  65. package/pipeline/lib/outbound-gate.mjs +8 -70
  66. package/pipeline/lib/owned-path-gate.mjs +6 -180
  67. package/pipeline/lib/plan-todos.sh +1 -1
  68. package/pipeline/lib/plugin-skill-roots.mjs +45 -1
  69. package/pipeline/lib/pr-request-location.mjs +3 -3
  70. package/pipeline/lib/prefs-value.mjs +122 -21
  71. package/pipeline/lib/regular-file.mjs +11 -6
  72. package/pipeline/lib/repo-profile-derive.mjs +138 -65
  73. package/pipeline/lib/repo-profile-root.mjs +52 -0
  74. package/pipeline/lib/repo-profile.mjs +5 -38
  75. package/pipeline/lib/review-watch.sh +1 -1
  76. package/pipeline/lib/run-worktree.mjs +147 -0
  77. package/pipeline/lib/run-writable.sh +85 -0
  78. package/pipeline/lib/safe-write.mjs +542 -0
  79. package/pipeline/lib/secret-patterns.generated.mjs +249 -0
  80. package/pipeline/lib/shadow-git.sh +1 -1
  81. package/pipeline/lib/slug.mjs +118 -0
  82. package/pipeline/lib/tdd-evidence.mjs +13 -13
  83. package/pipeline/lib/tiered-budget.mjs +87 -0
  84. package/pipeline/lib/unattended-profile-check.mjs +75 -31
  85. package/pipeline/lib/unattended-tool-homes.mjs +1407 -0
  86. package/pipeline/lib/untrusted-fence.mjs +65 -0
  87. package/pipeline/lib/untrusted.mjs +13 -25
  88. package/pipeline/lib/user-facing.mjs +3 -5
  89. package/pipeline/lib/vercel-deploy.sh +2 -2
  90. package/pipeline/lib/web-push.mjs +198 -0
  91. package/pipeline/multi-agent-refs/analysis/locked.md +6 -6
  92. package/pipeline/multi-agent-refs/analysis/review.md +23 -1
  93. package/pipeline/multi-agent-refs/analysis-template.md +3 -3
  94. package/pipeline/multi-agent-refs/conventions-defaults.md +2 -2
  95. package/pipeline/multi-agent-refs/features/autopilot-operations.md +10 -7
  96. package/pipeline/multi-agent-refs/features/code-graph.md +11 -1
  97. package/pipeline/multi-agent-refs/features/constitution.md +3 -3
  98. package/pipeline/multi-agent-refs/features/doctor.md +38 -2
  99. package/pipeline/multi-agent-refs/features/external-context-injection.md +1 -1
  100. package/pipeline/multi-agent-refs/features/office-remote-protocol.md +152 -1
  101. package/pipeline/multi-agent-refs/features/office-threat-model.md +1 -1
  102. package/pipeline/multi-agent-refs/features/phone-api.md +1 -1
  103. package/pipeline/multi-agent-refs/features/plan-critic.md +3 -3
  104. package/pipeline/multi-agent-refs/features/product-tree.md +68 -0
  105. package/pipeline/multi-agent-refs/features/repo-profile.md +2 -2
  106. package/pipeline/multi-agent-refs/features/review-decision.md +21 -8
  107. package/pipeline/multi-agent-refs/features/scaffold.md +1 -1
  108. package/pipeline/multi-agent-refs/features/unattended-gates.md +3 -3
  109. package/pipeline/multi-agent-refs/features/unattended-security.md +574 -23
  110. package/pipeline/multi-agent-refs/features/usage-reporting.md +91 -0
  111. package/pipeline/multi-agent-refs/garbage-collect/phases.md +3 -1
  112. package/pipeline/multi-agent-refs/help/en.md +3 -2
  113. package/pipeline/multi-agent-refs/help/tr.md +8 -7
  114. package/pipeline/multi-agent-refs/keychain.md +1 -0
  115. package/pipeline/multi-agent-refs/knowledge.md +59 -0
  116. package/pipeline/multi-agent-refs/orchestrator/skill-loading.md +1 -1
  117. package/pipeline/multi-agent-refs/outside-the-pipeline.md +1 -0
  118. package/pipeline/multi-agent-refs/phases/phase-0-init.md +4 -0
  119. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -0
  120. package/pipeline/multi-agent-refs/phases/phase-3-review.md +4 -3
  121. package/pipeline/multi-agent-refs/phases/phase-5-report.md +8 -4
  122. package/pipeline/multi-agent-refs/phases.md +1 -1
  123. package/pipeline/multi-agent-refs/sync/stack-plugins.md +1 -1
  124. package/pipeline/multi-agent-refs/test-gen/stages.md +1 -1
  125. package/pipeline/multi-agent-refs/tracker-contract.md +2 -2
  126. package/pipeline/multi-agent-refs/unattended-contract.md +1 -1
  127. package/pipeline/office/assets/app_icon_180.png +0 -0
  128. package/pipeline/office/assets/app_icon_192.png +0 -0
  129. package/pipeline/office/assets/app_icon_512.png +0 -0
  130. package/pipeline/office/index.html +508 -6
  131. package/pipeline/office/toolkit.json +1 -1
  132. package/pipeline/preferences-template.json +3 -1
  133. package/pipeline/rules/figma-pipeline.md +1 -1
  134. package/pipeline/rules/outside-the-pipeline.md +3 -3
  135. package/pipeline/schemas/agent-state.schema.json +1 -1
  136. package/pipeline/schemas/analysis-spec.schema.json +1 -1
  137. package/pipeline/schemas/autopilot-config.schema.json +1 -1
  138. package/pipeline/schemas/autopilot-off-request.schema.json +1 -1
  139. package/pipeline/schemas/autopilot-off.schema.json +8 -2
  140. package/pipeline/schemas/dev-critic-output.schema.json +1 -1
  141. package/pipeline/schemas/launch.json +6 -6
  142. package/pipeline/schemas/learnings-ledger.schema.json +43 -2
  143. package/pipeline/schemas/office-archive.schema.json +265 -0
  144. package/pipeline/schemas/office-server-room.schema.json +283 -0
  145. package/pipeline/schemas/prefs.schema.json +100 -1
  146. package/pipeline/schemas/product-tree-overlay.schema.json +57 -0
  147. package/pipeline/schemas/product-tree.schema.json +136 -0
  148. package/pipeline/schemas/runs-index.schema.json +1 -1
  149. package/pipeline/schemas/secret-patterns.json +257 -1
  150. package/pipeline/schemas/secret-patterns.schema.json +25 -4
  151. package/pipeline/schemas/toolkit-path-params.json +1077 -0
  152. package/pipeline/schemas/toolkit-path-params.schema.json +36 -0
  153. package/pipeline/schemas/unattended-policy.json +10 -1
  154. package/pipeline/schemas/unattended-policy.schema.json +4 -0
  155. package/pipeline/schemas/unattended-profile.json +93 -4
  156. package/pipeline/schemas/unattended-profile.schema.json +10 -0
  157. package/pipeline/scripts/_active-run.mjs +6 -3
  158. package/pipeline/scripts/_analysis-doc-diagrams.mjs +115 -0
  159. package/pipeline/scripts/_analysis-doc-markers.mjs +252 -0
  160. package/pipeline/scripts/_analysis-doc-redesign.mjs +160 -0
  161. package/pipeline/scripts/_analysis-doc-rules.mjs +191 -0
  162. package/pipeline/scripts/_analysis-doc-shapes.mjs +196 -0
  163. package/pipeline/scripts/_analysis-doc-structure.mjs +313 -0
  164. package/pipeline/scripts/_autopilot-ops.mjs +12 -3
  165. package/pipeline/scripts/_contract-core.mjs +282 -0
  166. package/pipeline/scripts/_contract-office-page.mjs +108 -0
  167. package/pipeline/scripts/_contract-routes-catalog.mjs +84 -0
  168. package/pipeline/scripts/_contract-routes-office.mjs +133 -0
  169. package/pipeline/scripts/_contract-routes-ops.mjs +538 -0
  170. package/pipeline/scripts/_contract-routes-repos.mjs +270 -0
  171. package/pipeline/scripts/_contract-routes-runs.mjs +468 -0
  172. package/pipeline/scripts/_contract-routes-work.mjs +255 -0
  173. package/pipeline/scripts/_eval-stats.mjs +182 -0
  174. package/pipeline/scripts/_guard_rules.py +130 -1
  175. package/pipeline/scripts/_learnings-promotion.mjs +229 -0
  176. package/pipeline/scripts/_lint-suppression.mjs +1067 -0
  177. package/pipeline/scripts/_locate.mjs +539 -0
  178. package/pipeline/scripts/_memory-policy.mjs +253 -40
  179. package/pipeline/scripts/_product-tree-extract.mjs +761 -0
  180. package/pipeline/scripts/_product-tree.mjs +923 -0
  181. package/pipeline/scripts/_renamed-skills.mjs +11 -2
  182. package/pipeline/scripts/_retrieval.mjs +15 -8
  183. package/pipeline/scripts/_secret-scan.mjs +8 -2
  184. package/pipeline/scripts/_stack-adapter.mjs +28 -19
  185. package/pipeline/scripts/_stack-routing.mjs +1 -0
  186. package/pipeline/scripts/_test-gaming.mjs +44 -6
  187. package/pipeline/scripts/_unified-diff.mjs +2 -2
  188. package/pipeline/scripts/_user_guard_rules.py +744 -0
  189. package/pipeline/scripts/activity-snapshot.mjs +36 -15
  190. package/pipeline/scripts/agent-guard.py +61 -5
  191. package/pipeline/scripts/agent-guard.sh +8 -1
  192. package/pipeline/scripts/analysis-conform-coverage.mjs +3 -0
  193. package/pipeline/scripts/analysis-sources.mjs +3 -0
  194. package/pipeline/scripts/analysis-story-tree.mjs +6 -5
  195. package/pipeline/scripts/analysis-tickets-writeback.mjs +7 -0
  196. package/pipeline/scripts/anonymize-findings.mjs +1 -1
  197. package/pipeline/scripts/answer-check.mjs +3 -0
  198. package/pipeline/scripts/answer-question.mjs +22 -9
  199. package/pipeline/scripts/argv-secret-scan.mjs +3 -0
  200. package/pipeline/scripts/audit-log.sh +22 -2
  201. package/pipeline/scripts/autopilot-arming.mjs +6 -5
  202. package/pipeline/scripts/autopilot-awake.mjs +3 -0
  203. package/pipeline/scripts/autopilot-control.mjs +31 -34
  204. package/pipeline/scripts/autopilot-intake.mjs +3 -0
  205. package/pipeline/scripts/autopilot-publish.mjs +34 -13
  206. package/pipeline/scripts/autopilot-runner.mjs +289 -86
  207. package/pipeline/scripts/autopilot-status.sh +1 -1
  208. package/pipeline/scripts/base-branch-candidates.mjs +7 -0
  209. package/pipeline/scripts/bug-bash.mjs +3 -0
  210. package/pipeline/scripts/build-references.mjs +3 -0
  211. package/pipeline/scripts/build-skills-index.mjs +16 -5
  212. package/pipeline/scripts/build-stack-plugins.mjs +3 -0
  213. package/pipeline/scripts/bulk-read.sh +1 -1
  214. package/pipeline/scripts/capture-evidence.sh +1 -1
  215. package/pipeline/scripts/capture-flush.sh +52 -2
  216. package/pipeline/scripts/check-derived-drift.mjs +5 -2
  217. package/pipeline/scripts/classify-plan-safety.mjs +7 -0
  218. package/pipeline/scripts/commands.mjs +21 -11
  219. package/pipeline/scripts/confirm-command.mjs +3 -0
  220. package/pipeline/scripts/confluence-readback.mjs +3 -0
  221. package/pipeline/scripts/constitution.mjs +6 -13
  222. package/pipeline/scripts/contract-server.mjs +710 -2317
  223. package/pipeline/scripts/cost-analyze.mjs +8 -18
  224. package/pipeline/scripts/cost-budget-check.mjs +4 -15
  225. package/pipeline/scripts/council-view.mjs +3 -0
  226. package/pipeline/scripts/crush-json.mjs +3 -0
  227. package/pipeline/scripts/debt-ledger.mjs +12 -37
  228. package/pipeline/scripts/decisions-log.mjs +14 -8
  229. package/pipeline/scripts/diff-explain.mjs +8 -16
  230. package/pipeline/scripts/diff-risk-score.mjs +5 -15
  231. package/pipeline/scripts/doctor.mjs +204 -12
  232. package/pipeline/scripts/edit-syntax-gate.mjs +5 -10
  233. package/pipeline/scripts/estimate.mjs +5 -10
  234. package/pipeline/scripts/evidence-gate.mjs +5 -21
  235. package/pipeline/scripts/explore-findings.mjs +3 -0
  236. package/pipeline/scripts/feedback-send.mjs +5 -6
  237. package/pipeline/scripts/file-context.mjs +20 -22
  238. package/pipeline/scripts/find-polluter.mjs +29 -17
  239. package/pipeline/scripts/finding-fingerprint.mjs +22 -9
  240. package/pipeline/scripts/gate-ledger.mjs +25 -21
  241. package/pipeline/scripts/gc-abandoned.sh +143 -40
  242. package/pipeline/scripts/gc-plan.mjs +8 -1
  243. package/pipeline/scripts/gc-refs.sh +4 -4
  244. package/pipeline/scripts/gc-tmp.sh +3 -3
  245. package/pipeline/scripts/gc-worktrees.sh +4 -4
  246. package/pipeline/scripts/gen-facts.mjs +3 -0
  247. package/pipeline/scripts/gen-free-hosts.mjs +132 -0
  248. package/pipeline/scripts/gen-mode-dispatch.mjs +11 -3
  249. package/pipeline/scripts/gen-secret-patterns.mjs +263 -0
  250. package/pipeline/scripts/gen-skills-index.mjs +11 -1
  251. package/pipeline/scripts/graph-affected.mjs +3 -0
  252. package/pipeline/scripts/graph-build.mjs +6 -18
  253. package/pipeline/scripts/graph-confirm.mjs +3 -0
  254. package/pipeline/scripts/graph-hint.mjs +13 -19
  255. package/pipeline/scripts/graph-links.mjs +3 -0
  256. package/pipeline/scripts/graph-mermaid.mjs +3 -0
  257. package/pipeline/scripts/graph-query.mjs +260 -17
  258. package/pipeline/scripts/handle-diff-audit.mjs +20 -12
  259. package/pipeline/scripts/health-report.mjs +201 -158
  260. package/pipeline/scripts/host-hooks.mjs +3 -0
  261. package/pipeline/scripts/issues.mjs +26 -11
  262. package/pipeline/scripts/jira-family.mjs +14 -23
  263. package/pipeline/scripts/jira-search.sh +1 -1
  264. package/pipeline/scripts/jira-wiki-escape.mjs +10 -0
  265. package/pipeline/scripts/job-launch.mjs +107 -8
  266. package/pipeline/scripts/launch-request.mjs +6 -2
  267. package/pipeline/scripts/learn-from-transcripts.mjs +14 -25
  268. package/pipeline/scripts/learnings-ledger.mjs +766 -113
  269. package/pipeline/scripts/localize-commands.mjs +7 -0
  270. package/pipeline/scripts/log-metric.sh +26 -8
  271. package/pipeline/scripts/match-skills.mjs +7 -0
  272. package/pipeline/scripts/mcp-config-audit.mjs +130 -0
  273. package/pipeline/scripts/migrate-prefs.mjs +34 -21
  274. package/pipeline/scripts/migrate-state.mjs +3 -0
  275. package/pipeline/scripts/mutation-probe.mjs +51 -32
  276. package/pipeline/scripts/note-agent-event.mjs +7 -14
  277. package/pipeline/scripts/note-mcp-failure.mjs +356 -0
  278. package/pipeline/scripts/note-mcp-failure.sh +19 -0
  279. package/pipeline/scripts/note-skill-use.mjs +343 -0
  280. package/pipeline/scripts/note-skill-use.sh +19 -0
  281. package/pipeline/scripts/observations.mjs +17 -16
  282. package/pipeline/scripts/office-archive.mjs +280 -0
  283. package/pipeline/scripts/office-build.mjs +117 -8
  284. package/pipeline/scripts/office-control.mjs +7 -3
  285. package/pipeline/scripts/office-credentials.mjs +3 -0
  286. package/pipeline/scripts/office-ledger.mjs +3 -0
  287. package/pipeline/scripts/office-memory.mjs +10 -4
  288. package/pipeline/scripts/office-pair.mjs +24 -3
  289. package/pipeline/scripts/office-prune.mjs +3 -0
  290. package/pipeline/scripts/office-push.mjs +613 -0
  291. package/pipeline/scripts/office-remote-client.mjs +30 -3
  292. package/pipeline/scripts/office-server-room.mjs +435 -0
  293. package/pipeline/scripts/office-settings.mjs +4 -4
  294. package/pipeline/scripts/office-webapp.mjs +59 -0
  295. package/pipeline/scripts/offload-ref.sh +1 -1
  296. package/pipeline/scripts/open-questions-gate.mjs +25 -12
  297. package/pipeline/scripts/output-quality-check.sh +1 -1
  298. package/pipeline/scripts/owned-path-gate.mjs +22 -11
  299. package/pipeline/scripts/package-manager.mjs +7 -0
  300. package/pipeline/scripts/parity-score.mjs +3 -0
  301. package/pipeline/scripts/persona-walk-anchors.mjs +443 -0
  302. package/pipeline/scripts/phase-tracker.sh +179 -35
  303. package/pipeline/scripts/phase0-exit-gate.mjs +4 -1
  304. package/pipeline/scripts/phone-devices.mjs +32 -16
  305. package/pipeline/scripts/plan-complexity.mjs +17 -13
  306. package/pipeline/scripts/plan-coverage-gate.mjs +3 -2
  307. package/pipeline/scripts/plan-critique-gate.mjs +22 -12
  308. package/pipeline/scripts/plan-remote-links.mjs +18 -11
  309. package/pipeline/scripts/plugin-refresh.sh +1 -1
  310. package/pipeline/scripts/pr-request.mjs +3 -0
  311. package/pipeline/scripts/pr-timeline.mjs +13 -9
  312. package/pipeline/scripts/pre-commit-check.sh +175 -124
  313. package/pipeline/scripts/pre-push-check.sh +12 -0
  314. package/pipeline/scripts/probe-evidence-capability.sh +1 -1
  315. package/pipeline/scripts/probe-store-key.mjs +33 -15
  316. package/pipeline/scripts/product-context.mjs +25 -26
  317. package/pipeline/scripts/product-tree-eval.mjs +685 -0
  318. package/pipeline/scripts/product-tree.mjs +544 -0
  319. package/pipeline/scripts/prune-logs.sh +4 -4
  320. package/pipeline/scripts/purge.sh +2 -2
  321. package/pipeline/scripts/record-phase.mjs +19 -9
  322. package/pipeline/scripts/release-notes.mjs +3 -0
  323. package/pipeline/scripts/render-flow-run.mjs +48 -32
  324. package/pipeline/scripts/render-jira-evidence.mjs +18 -11
  325. package/pipeline/scripts/render-work-summary.sh +1 -1
  326. package/pipeline/scripts/repo-map.mjs +35 -20
  327. package/pipeline/scripts/repo-profile.mjs +21 -21
  328. package/pipeline/scripts/repo-recommend.mjs +22 -9
  329. package/pipeline/scripts/research-gate.mjs +20 -12
  330. package/pipeline/scripts/review-decision-gate.mjs +209 -33
  331. package/pipeline/scripts/review-delta.mjs +36 -15
  332. package/pipeline/scripts/review-file-filter.mjs +3 -0
  333. package/pipeline/scripts/review-scope.mjs +3 -0
  334. package/pipeline/scripts/rework-base.mjs +3 -0
  335. package/pipeline/scripts/rework-escalation.mjs +25 -20
  336. package/pipeline/scripts/rework-rulings.mjs +3 -0
  337. package/pipeline/scripts/routine-registry.mjs +27 -20
  338. package/pipeline/scripts/run-aggregator.mjs +15 -16
  339. package/pipeline/scripts/run-commit-check.mjs +3 -0
  340. package/pipeline/scripts/run-kill.mjs +6 -14
  341. package/pipeline/scripts/run-log.mjs +32 -15
  342. package/pipeline/scripts/run-metrics.mjs +7 -0
  343. package/pipeline/scripts/run-results.mjs +3 -0
  344. package/pipeline/scripts/run-scope-guard.mjs +3 -0
  345. package/pipeline/scripts/run-stop-guard.mjs +15 -9
  346. package/pipeline/scripts/run-write.mjs +400 -0
  347. package/pipeline/scripts/runs-index.mjs +22 -15
  348. package/pipeline/scripts/scaffold-gate.mjs +26 -9
  349. package/pipeline/scripts/scan-agent-config.sh +39 -11
  350. package/pipeline/scripts/scan-skills.sh +17 -6
  351. package/pipeline/scripts/scenario-audit.mjs +3 -0
  352. package/pipeline/scripts/scope-check-gate.mjs +21 -11
  353. package/pipeline/scripts/search-logs.sh +1 -1
  354. package/pipeline/scripts/security-evidence-gate.mjs +23 -12
  355. package/pipeline/scripts/service-read.mjs +6 -9
  356. package/pipeline/scripts/skill-candidates.mjs +3 -0
  357. package/pipeline/scripts/skill-conformance.mjs +29 -15
  358. package/pipeline/scripts/skill-siblings.mjs +34 -4
  359. package/pipeline/scripts/skill-usage.mjs +379 -0
  360. package/pipeline/scripts/smoke-schema-validation.sh +1 -1
  361. package/pipeline/scripts/spec-consistency-gate.mjs +22 -12
  362. package/pipeline/scripts/stack-toggle.mjs +3 -0
  363. package/pipeline/scripts/status-overview.mjs +2 -2
  364. package/pipeline/scripts/steer-run.mjs +3 -0
  365. package/pipeline/scripts/symbol-existence-gate.mjs +22 -14
  366. package/pipeline/scripts/sync-skill-copies.mjs +141 -0
  367. package/pipeline/scripts/system-status.mjs +3 -0
  368. package/pipeline/scripts/task-mirror.mjs +59 -22
  369. package/pipeline/scripts/test-classify.mjs +15 -10
  370. package/pipeline/scripts/test-gap-scan.mjs +5 -15
  371. package/pipeline/scripts/test-gen-gate.mjs +19 -10
  372. package/pipeline/scripts/test-gen-state.mjs +16 -15
  373. package/pipeline/scripts/test-integrity-gate.mjs +113 -16
  374. package/pipeline/scripts/test-stability-gate.mjs +3 -0
  375. package/pipeline/scripts/test-strength.mjs +39 -18
  376. package/pipeline/scripts/test-summary.mjs +24 -16
  377. package/pipeline/scripts/token-budget-report.mjs +18 -8
  378. package/pipeline/scripts/toolkit-tools.mjs +19 -4
  379. package/pipeline/scripts/transcript-index.mjs +38 -18
  380. package/pipeline/scripts/triage-memory.mjs +20 -59
  381. package/pipeline/scripts/unattended_policy.py +1828 -27
  382. package/pipeline/scripts/uninstall.mjs +120 -13
  383. package/pipeline/scripts/update-check.sh +1 -1
  384. package/pipeline/scripts/update-issue-progress.sh +6 -6
  385. package/pipeline/scripts/usage-identity.mjs +18 -7
  386. package/pipeline/scripts/usage-register-beacon.mjs +3 -0
  387. package/pipeline/scripts/usage-register.mjs +21 -12
  388. package/pipeline/scripts/usage-report.mjs +27 -11
  389. package/pipeline/scripts/user-test-handoff.sh +1 -1
  390. package/pipeline/scripts/validate-analysis-doc.mjs +163 -1240
  391. package/pipeline/scripts/validate-analysis.mjs +7 -0
  392. package/pipeline/scripts/validate-code-graph.mjs +7 -0
  393. package/pipeline/scripts/validate-complaint-doc.mjs +3 -0
  394. package/pipeline/scripts/validate-diff-risk.mjs +7 -0
  395. package/pipeline/scripts/validate-planning.mjs +3 -0
  396. package/pipeline/scripts/validate-reviewer.mjs +7 -0
  397. package/pipeline/scripts/validate-state.mjs +7 -0
  398. package/pipeline/scripts/validate-test-gap.mjs +7 -0
  399. package/pipeline/scripts/validate-triage.mjs +7 -0
  400. package/pipeline/scripts/valven-gate.mjs +14 -14
  401. package/pipeline/scripts/valven-port.mjs +14 -13
  402. package/pipeline/scripts/valven-split.mjs +14 -13
  403. package/pipeline/scripts/verify-citations.mjs +13 -14
  404. package/pipeline/scripts/verify.mjs +3 -0
  405. package/pipeline/scripts/work-items.mjs +5 -5
  406. package/pipeline/scripts/worktree-finalize.sh +3 -3
  407. package/pipeline/scripts/worktree-prepare-all.mjs +3 -0
  408. package/pipeline/scripts/worktrees.mjs +3 -0
  409. package/pipeline/scripts/write-state.mjs +33 -23
  410. package/pipeline/scripts/write-store-config.mjs +5 -1
  411. package/pipeline/skills/.skill-manifest.json +48 -44
  412. package/pipeline/skills/.skills-index.json +44 -33
  413. package/pipeline/skills/shared/README.md +35 -34
  414. package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +1 -1
  415. package/pipeline/skills/shared/core/multi-agent-autopilot-off/SKILL.md +15 -13
  416. package/pipeline/skills/shared/core/multi-agent-health/SKILL.md +6 -2
  417. package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +1 -1
  418. package/pipeline/skills/shared/external/agent-introspection-debugging/SKILL.md +1 -6
  419. package/pipeline/skills/shared/external/android-performance/SKILL.md +1 -1
  420. package/pipeline/skills/shared/external/app-clips/SKILL.md +1 -1
  421. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +1 -1
  422. package/pipeline/skills/shared/external/app-store-release-notes/SKILL.md +1 -1
  423. package/pipeline/skills/shared/external/app-store-release-notes/evals/trigger-eval.json +11 -0
  424. package/pipeline/skills/shared/external/app-store-review/SKILL.md +1 -1
  425. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +1 -1
  426. package/pipeline/skills/shared/external/avkit/SKILL.md +1 -1
  427. package/pipeline/skills/shared/external/backlog/SKILL.md +1 -1
  428. package/pipeline/skills/shared/external/context-compression/SKILL.md +1 -1
  429. package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +1 -1
  430. package/pipeline/skills/shared/external/core-data/SKILL.md +1 -1
  431. package/pipeline/skills/shared/external/council/SKILL.md +1 -6
  432. package/pipeline/skills/shared/external/e2e-testing/SKILL.md +1 -9
  433. package/pipeline/skills/shared/external/fix-review-verdicts/SKILL.md +3 -0
  434. package/pipeline/skills/shared/external/humanizer/SKILL.md +1 -5
  435. package/pipeline/skills/shared/external/ios-coding-standard/references/lint-local.sh +1 -1
  436. package/pipeline/skills/shared/external/ios-localization/SKILL.md +1 -1
  437. package/pipeline/skills/shared/external/ios-security/SKILL.md +1 -1
  438. package/pipeline/skills/shared/external/ios-simulator/SKILL.md +1 -1
  439. package/pipeline/skills/shared/external/kotlin-coroutines-expert/references/patterns.md +1 -1
  440. package/pipeline/skills/shared/external/live-activities/SKILL.md +1 -1
  441. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +1 -1
  442. package/pipeline/skills/shared/external/macos-app-distribution/SKILL.md +1 -1
  443. package/pipeline/skills/shared/external/macos-app-distribution/evals/trigger-eval.json +10 -0
  444. package/pipeline/skills/shared/external/macos-menubar-utility/SKILL.md +1 -1
  445. package/pipeline/skills/shared/external/macos-menubar-utility/evals/trigger-eval.json +10 -0
  446. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +1 -1
  447. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +1 -1
  448. package/pipeline/skills/shared/external/push-notifications/SKILL.md +1 -1
  449. package/pipeline/skills/shared/external/search-first/SKILL.md +1 -6
  450. package/pipeline/skills/shared/external/skill-creator/SKILL.md +1 -1
  451. package/pipeline/skills/shared/external/spec-persona-walk/SKILL.md +118 -0
  452. package/pipeline/skills/shared/external/spec-persona-walk/evals/evals.json +50 -0
  453. package/pipeline/skills/shared/external/spec-persona-walk/scripts/persona-walk-anchors.mjs +443 -0
  454. package/pipeline/skills/shared/external/storekit/SKILL.md +1 -1
  455. package/pipeline/skills/shared/external/swift-concurrency-fix/SKILL.md +1 -1
  456. package/pipeline/skills/shared/external/swift-concurrency-fix/evals/trigger-eval.json +11 -0
  457. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +1 -1
  458. package/pipeline/skills/shared/external/swift-testing/SKILL.md +1 -1
  459. package/pipeline/skills/shared/external/swift-testing-review/SKILL.md +1 -1
  460. package/pipeline/skills/shared/external/swift-testing-review/evals/trigger-eval.json +11 -0
  461. package/pipeline/skills/shared/external/swiftdata/SKILL.md +1 -1
  462. package/pipeline/skills/shared/external/swiftdata-review/SKILL.md +1 -1
  463. package/pipeline/skills/shared/external/swiftdata-review/evals/trigger-eval.json +11 -0
  464. package/pipeline/skills/shared/external/swiftui-glass-effects/SKILL.md +1 -1
  465. package/pipeline/skills/shared/external/tailwind-styling/SKILL.md +1 -1
  466. package/pipeline/skills/shared/external/tailwind-styling/evals/trigger-eval.json +11 -0
  467. package/pipeline/skills/shared/external/vision-framework/SKILL.md +1 -1
  468. package/pipeline/skills/shared/external/widgetkit/SKILL.md +1 -1
  469. package/pipeline/skills/skill-copies.json +47 -0
  470. package/pipeline/skills/skills-index.md +33 -32
package/CHANGELOG.md CHANGED
@@ -16,6 +16,171 @@ Internal file-layout changes that don't affect the slash-command surface are sti
16
16
 
17
17
  ## [Unreleased]
18
18
 
19
+ ## [20.41.0] - 2026-11-03
20
+
21
+ ### Added
22
+
23
+ - Global learnings. `learnings-ledger.mjs promote --candidates [--json]` lists learnings that recur in two or more repositories: entries of the same kind whose statements score at or above 0.5 on word-pair shingle similarity, high confidence only. Superseded entries, entries marked `dead_end` or `corrected`, and repositories in `memory.excludeProjects` are left out. Each candidate shows its repositories, entry ids and score. It runs on request only; nothing promotes automatically.
24
+ - `learnings-ledger.mjs promote --accept <P:id>` appends one candidate, with its source ids, to the global ledger `~/.claude/memory/multi-agent/_global/learnings-ledger.jsonl` after a y/N confirmation at a terminal; end of input at the question writes nothing and exits 2. `promote --retract <G:id> --reason "..."` takes a global learning back in every repository, and `feedback --id G:<id> --outcome dead_end|corrected` hides it in one repository. All three exit 3 in an unattended or autopilot run and when stdin is not a terminal, and agent-guard asks before an agent runs any of them and refuses them unattended.
25
+ - `brief` and `profile` include global entries marked `(global)` with a `G:` pointer (`show --id G:<id>`), at every tier. Global entries hold at most a third of the block and are ordered by date among the repository's own. They are left out in excluded repositories, in their source repositories, in repositories that already hold the same learning, and in a repository that hid them. A global row with an empty statement, or a retraction without an id, is skipped. A repo slug that folds onto a name starting with `_`, or resolves to the global ledger's folder, is refused, so no repository command can write the global ledger.
26
+ - Office: the memory archive (`GET /v1/archive`) has a `global` shelf for promoted learnings. Neither `/v1/archive` nor `/v1/memory` lists a folder whose name starts with `_` as a repository.
27
+ - `/multi-agent:review-analysis` gains an opt-in persona walk (`review.personaWalk.enabled`, default off). At most four personas derived from the document walk its flows and report missing states, unhandled errors, accessibility gaps and conflicting rules.
28
+ - `persona-walk-anchors.mjs` drops every persona-walk finding whose section or quote anchor is not in the document. A quote must sit in one paragraph and is matched across emphasis, code marks and link syntax; it may land above the first numbered heading or in an unnumbered document. Section ids may be bold or follow "Section" or "Bölüm", and a numbered heading nested under a numbered section whose number it does not extend belongs to that section. Fences close only on their own marker, and fenced code is never quotable. A conflicting-rule finding needs anchors in different sections or different paragraphs, and two quotes count only when they differ. A walk is refused past 200 findings, a finding past 8 anchors, and a document over 4 MB; the document and the walk must be regular files, opened without blocking.
29
+ - New `spec-persona-walk` skill in ai-common-toolkit, which ships the anchor checker.
30
+ - `eval-persona-walk.mjs` measures the walk on a seeded-defect corpus in invented domains: recall, precision, anchor-valid rate and recall per kind. Each planted gap is credited to one finding; kept findings are split into matched, duplicates and false positives, and duplicates lower precision. The scorer check runs in `npm test`; the model run is opt-in behind the live-eval cost gate. The bar for turning the walk on is in `pipeline/eval/README.md`.
31
+ - `graph-query.mjs --tier quick|panorama|deep` and `learnings-ledger.mjs brief|profile --tier` answer in a fixed character budget (1500, 6000, 12000), fitted by `fitToBudget` in `lib/tiered-budget.mjs`. `--tier=<t>` is accepted, an unknown tier exits 64, and the graph-query tier header shows at most 120 characters of the question. Output without `--tier` is unchanged.
32
+ - `note-mcp-failure.sh`, registered by install (PostToolUseFailure on `mcp__.*`), counts failed MCP calls per server and tool in `~/.claude/logs/multi-agent/mcp-failures.jsonl`. It records only server, tool, time and a closed error class, chosen from the JSON-RPC code first, then a message that opens with "invalid" or "validation", then an HTTP status (a bare three-digit number counts only after HTTP, status or a request line, or before a reason phrase), then wording. `denied` covers permission refusals only. Off with `mcpFailures.enabled: false` or `usageLog.optOut: true`, and while the preferences file exists but does not parse. `note-mcp-failure.mjs summary` prints "server-side failures of N failed calls" per server.
33
+ - Doctor check `mcp-failures`: INFO for a server with 5 or more server-side failures in 24 hours. Invalid input, denied and interrupted calls do not count.
34
+ - `eval-tool-order.mjs` (maintainer, opt-in) reports how often local sessions followed three documented tool orders, as rates only. A session counts as a pipeline run when it is named by `--run` or started a run-starting command from the command catalog; `help`, `status` and other helpers do not count.
35
+ - `prefs.global.guardRules`: user-defined agent-guard rules (tool, regex, `warn`/`ask`/`block`, reason). They only make the guard stricter, and unattended an `ask` is a `block`. A pattern with a back-reference, or one that does not compile, is invalid. The rest match under a 1-second budget in the guard's own process: `block` rules first, then `ask`, then `warn`, each with its own share of the time left. Messages name the rule id and reason, never the matched text.
36
+ - A guard rule that gives no answer (out of time, not reached before the budget ran out, or input past 65,536 characters with no match in its head and tail) refuses unattended and asks attended when it is an `ask` or `block` rule. A preferences file that does not parse, or a `guardRules` that is not a list, applies no rule: unattended it refuses every call a rule could govern when the file names `guardRules`, and attended each such call carries a note. With prompts off, an ask on Edit, Write or a toolkit tool prints the exact `confirm-command.mjs` key: the tool, the path and a sha256 of the input. A `warn` or `ask` message is added to a built-in ask's prompt.
37
+ - Doctor check `guard-rules`: reports invalid rules by id (an invalid `block` rule refuses its tool unattended; a duplicate id names both positions), names a rule with a slow shape as INFO, and reports rules whose tool has no agent-guard registration (a `Read` rule under the default hooks, or the `NotebookEdit` half of an `Edit` rule) and a preferences file or `guardRules` value it cannot read.
38
+ - `product-tree.mjs` builds a screen layer over the code graph without a model (screens, routes, flows, localized strings, endpoints, tests) for SwiftUI, Compose (Navigation 2 and 3) and Next.js / react-router. Programmatic navigation is counted and listed per stack when it cannot be resolved. Subcommands: `build`, `locate`, `show`, an evidence-checked `propose`, and person-only `agree` / `reject`.
39
+ - Product tree input handling: the build reads only regular files inside the repository (no symlinks, devices or FIFOs) up to 2 MB, decodes UTF-16 strings files, and runs git with the repository's fsmonitor, hooks, external diff and pager turned off. A root that is a git top level takes the main repository's name, so a linked worktree shares its repository's tree, project and exclusion. `locate` and `show` print one untrusted-data block or nothing, with the no-match note on stderr, and `locate` measures its budget on the fenced text, so it stays within `--max-chars`. Both `--json` outputs strip control characters from every string. `build`, `locate`, `show` and `propose` skip repositories in `memory.excludeProjects`.
40
+ - Product tree overlay: proposal evidence must resolve, symlinks followed, to a line of a regular file inside the repository, and `--parent` must name a node or a proposal. `--name` and `--note` lose control characters before a proposal is written. Proposing the same thing again keeps a person's earlier `agree` or `reject`. agent-guard asks before any `agree` or `reject` through `product-tree.mjs` (flags before the subcommand, a variable in its place, or a renamed copy run through node or directly) and before a shell write into the overlay, compared casefolded and after resolving a symlink, and refuses a file tool aimed at `product-tree-overlay.jsonl`, attended and unattended.
41
+ - `product-tree-eval.mjs` mines bug-fix commits, rebuilds graph and tree at each fix's parent, splits by time, tunes only on the older half, and reports Acc@k, recall@k, MRR, an exact McNemar test (summed in log space, so it holds past 1023 discordant pairs) and bootstrap intervals. It reads repository files under the same rules as the build and keeps non-ASCII paths.
42
+ - `prefs.global.productTree` (off by default). When on, Phase 0 builds the tree when it is missing or behind HEAD and locates the task, and Phase 1 injects the subtree, capped by `fitToBudget` at `productTree.maxChars` (default 6000) characters.
43
+
44
+ ### Changed
45
+
46
+ - `/multi-agent:review-analysis` verdicts always print a G (persona walk) row: its count, or `off` when `review.personaWalk.enabled` is false.
47
+ - The learnings near-duplicate check, like the new promotion measure, treats curly apostrophes, every n't form, "cannot" and Turkish -me/-ma verb negation as negations, past, reported past and imperative forms whose suffix vowel follows the stem included, and reads words of any script whole.
48
+ - The learnings-ledger schema accepts `source: promotion`, `promoted_from` and `retracts` on global ledger rows.
49
+ - Doctor's hook-registration check counts a non-empty `guardRules` as needing `agent-guard.sh`.
50
+ - Shorter descriptions for `backlog`, `localization-reuse-map`, `storekit` and `swiftdata`, so the skill description surface stays under 96000 bytes.
51
+
52
+ ### Fixed
53
+
54
+ - Confluence pages: an image inside a table cell renders at 240 px wide (`TABLE_IMAGE_WIDTH` in `md2confluence-v3.py`) instead of the 720 px page width, unless its own title names a width (`"width=400"`); images outside tables keep the page width.
55
+
56
+ ### Security
57
+
58
+ - The skill-usage log and the MCP failure log share one append and rotation path through safe-write, each log under its own lock. A FIFO, link or directory at the log path drops the row instead of redirecting it, throwing or holding the hook. A writer that finds the rotation lock held waits briefly for the rotation, and a log still full afterwards, or one whose `.1` is a directory, drops the row, so neither log grows past its 1 MiB cap. The MCP summary reads only regular files.
59
+ - Learnings: statements, rationales and scopes lose C0 and C1 control characters when added and when printed, so an escape sequence cannot hide what a person approves. A repository folder that is a symlink, or whose real name starts with `_`, is refused. Ledger and feedback files are opened without following a link or blocking, must be regular files, and are read up to 16 MiB from the newest end.
60
+
61
+ ### Docs
62
+
63
+ - ADR-0019 (Accepted, ships off, M0 verdict NO-GO): on 230 held-out bug fixes the product tree did not beat graph-only ranking (recall@10 46.5% against 47.1%, McNemar p = 1.0). It and the product tree page say the guard asks before an `agree`, a `reject` or a shell write into the overlay and refuses a file tool aimed at it.
64
+ - README: "Hooks per host" lists `note-mcp-failure.sh`, and "Your own guard rules" documents `guardRules`.
65
+ - Help lists Global Learnings under Key Features, with `--retract` and feedback on a `G:` id, in English and Turkish.
66
+ - `usage-reporting.md` section 10 and the hooks template say each local log rotates under its own lock, and give the MCP failure classifier's order with the `invalid` / `validation` opening read before an HTTP status.
67
+ - `docs/ecosystem.md` no longer carries hand-typed plugin skill counts and versions.
68
+
69
+ ## [20.40.0] - 2026-11-03
70
+
71
+ ### Added
72
+
73
+ - Office: a control panel station in the server room. It lists every Claude Code session with its current work, last step, tokens in, out and cached, estimated cost and duration; today's tokens and estimated cost per model; and six health lights (doctor, hooks, toolkit, last gate, recurring error-ledger tags, autopilot). The lights and today's totals come from `health-report.mjs`'s JSON, never probed and reused for two minutes; the server racks on the floor carry a light that turns red, blinking, when any health section is red. New local-only route `GET /v1/server-room` (`office-server-room.mjs --json`), contract 1.10.0.
74
+ - Office: a memory archive station in the archive room. Per repository it shows the newest decisions with their rationale, security notes and learnings from the learnings ledger (entries their feedback retired are left out and counted, as `brief` and `profile` leave them out), and the hubs, clusters, surprising connections and questions of the code graph report when one exists. Every text is redacted and cut short. New route `GET /v1/archive` (`office-archive.mjs --json`), local-only like `/v1/memory` and `/v1/server-room`; a test holds that the phone route family has no verb for any of the three, that a device signature opens none of them and that the remote client never forwards them.
75
+ - Office: installable as a web app (Add to Dock on the Mac, Add to Home Screen in Safari). The server serves a manifest at `/office/manifest.webmanifest` (standalone, the HUD colour, the page language), the page links it with an `apple-touch-icon` and the Safari meta tags, and the layout keeps clear of every safe-area inset. The 180, 192 and 512 pixel icons are drawn by `office-build.mjs` from the first character sheet and held to it by `--check`. The panel CSP gains only `manifest-src 'self'`; every link stays under `/office/`. There is no service worker, so nothing is cached and a launch still needs a fresh code from `/multi-agent:office-on`.
76
+ - Office Web Push: a paired phone can be notified that a question is waiting or that a run finished, and nothing more. The machine client sends one padded code, encrypted per RFC 8291 with a VAPID token (RFC 8292) signed on `node:crypto` (`lib/web-push.mjs`), straight to the push service; the subscription reaches the machine only as a sealed, passkey-bound phone verb (`office-push.mjs`). Off until `office-pair.mjs push on <device>`; `push keygen` keeps the VAPID key in the Keychain as `office_push_vapid`; revoking a device deletes its subscription; rate-limited and audited in `remote-frames.jsonl`. See `features/office-remote-protocol.md`, Web Push.
77
+ - `/multi-agent:health --lang en|tr`: the text report renders in the given language, else `outputLanguage`, else English. Every section of `--json` carries `message {id, params}` beside its English `reason`, from the catalogue in `lib/health-messages.mjs`; the office server-room lights render the same catalogue in the page's language.
78
+ - `smoke-pipefail-early-exit.sh`: fails on a pipe into `grep -q` (one line or a continuation), on a capture ending in `head` or `grep -m` whose status is chained, and on `head` or `grep -m` behind a pipe in a `set -e` smoke.
79
+ - `test/unattended_policy_properties.py` (stdlib, fixed seed, run by `test/unattended-policy-properties.test.mjs`): random toolkit calls built from the declaration, checking writes and reads inside and outside the allowed locations, unknown tools, undeclared arguments, `..`, `./`, `//`, trailing slashes, `~` and `$HOME`, letter case on darwin, and real symlinks.
80
+ - `lib/glob-match.mjs`: the owned-path glob matcher as a leaf module with no pipeline imports; `owned-path-gate.mjs` re-exports it. `test/lib-import-graph.test.mjs` fails on any static import cycle among `pipeline/lib` and the `scripts/_*` helpers.
81
+ - `lib/cli-help.mjs`: every script CLI answers `-h` and `--help` with its usage and exit 0, and prints only its leading comment block, never a generated block below it.
82
+ - `MULTI_AGENT_CROSS_REPO_REQUIRED=1` makes `gen-free-hosts.mjs --check` and `gen-toolkit-path-params.mjs --check` fail when no toolkit checkout is found; both name the checkout, branch and commit they compared. `pre-push-check.sh` sets it, and `MULTI_AGENT_TOOLKIT_DIR` overrides the lookup.
83
+ - `smoke-pack-contents.sh` diffs the exact packed file list against `pipeline/scripts/fixtures/pack-files.txt` and reports a `files[]` negation that matches nothing as inert.
84
+ - Shared libs `lib/args.mjs`, `lib/slug.mjs` and `lib/prefs-value.mjs` hold the flag parsing, slug and preferences lookups, and `test/shared-lib-ratchet.test.mjs` fails on a new hand-rolled copy (43 argv loops and 2 preferences paths are listed as pending migration).
85
+ - `sync-skill-copies.mjs` keeps every file shared across skills (`skill-copies.json`) in one source; `npm test` runs its `--check`.
86
+ - The review's test-gaming scan reports a `lint-suppression` shape: an added inline suppression (`swiftlint:disable`, `swift-format-ignore`, `eslint-disable`, `@ts-ignore`, `@ts-expect-error`, `biome-ignore`, `@Suppress`/`@SuppressWarnings`, `ktlint-disable`, `# noqa`, `# type: ignore`, `# pylint: disable`, `# pyright: ignore`, `//nolint`, `#[allow(`, `rubocop:disable`), matched per language in comments only, is blocking, or important when the line states its reason. A loosened lint config (SwiftLint, ESLint, golangci, detekt, RuboCop, ruff/pylint/flake8 sections, ktlint `.editorconfig`, `.swiftformat`) is flagged too: a rule turned off, downgraded or removed, a disable list grown, or a threshold raised.
87
+ - `learnings-ledger.mjs add --supersedes <id>` (repeatable or a comma list, at most five) records the earlier entries a new one replaces without rewriting the append-only ledger. It refuses an unknown id, an entry recorded after now, the entry itself and a link that closes a cycle. `brief` and `profile` leave a superseded entry out, `timeline` rows and `show` give `superseded_by`, and `stats` counts `superseded`. The office memory archive leaves superseded entries out and counts them separately from retired ones.
88
+ - Skill calls are counted in a local log (`~/.claude/logs/multi-agent/skill-usage.jsonl`): skill name, outcome, time, host and repository folder name, plus a format version; never arguments, prompts or output. One writer rotates the log at a time, under a lock, so two hooks firing together never lose the older generation. `skill-usage.mjs summary [--days N] [--json]` shows per-skill counts, the installed skills not called in the window and where the log starts (`coverageStart`, `coversWindow`); `prune-candidates [--days N]` lists the unseen ones with their last use and names none while the log is younger than the window. The installed list holds every skill of every plugin the multi-agent-plugins marketplace lists, at any depth under the plugin's `skills/`, named `<plugin>:<folder>`; rename aliases are left out and a call under an old name counts for the new one; everything under `~/.claude/commands` is reported as not observable and is never a candidate, because a typed slash command makes no Skill tool call. Nothing is deleted. The office server room shows the skills used in the last 30 days, locally only. Off with `skillUsage.enabled: false` or `usageLog.optOut: true`.
89
+ - `pipeline/lib/mcp-config-audit.mjs` classifies each MCP server's launch selector offline as pinned, floating, mutable, local, remote or unknown (npx and other package runners, git specs, uvx and pipx, container images, go run, deno, remote URLs) and reports literal secrets in env, headers, arguments or URLs with the value masked. JSON, JSONC and TOML `mcp_servers` are read without a dependency. The toolkit's new `security_mcp_config_audit` uses the same module.
90
+
91
+ ### Changed
92
+
93
+ - `pipeline/lib/repo-profile.mjs` and `repo-profile-derive.mjs` no longer import each other: the schema version and `mainRepoRoot` live in the leaf module `repo-profile-root.mjs`, which both import. `repo-profile.mjs` re-exports both names, so callers are unchanged.
94
+ - `validate-analysis-doc.mjs` runs its checks as 27 named functions from a table in report order (33 report rows); the checks live in six `_analysis-doc-*.mjs` modules next to it (structure, markers, diagrams, rules, redesign, shapes). Output and exit codes are unchanged, pinned by `test/validate-analysis-doc-golden.test.mjs` over 94 documents. `smoke-validate-analysis-doc.sh` and `smoke-locked-citations.sh` read the modules along with the validator.
95
+ - `contract-server.mjs` is the server core only: it checks a request in the security-model order through named entry points and looks the route up in `ROUTES`, a table of entries defined in six per-family modules (`_contract-routes-runs`, `-catalog`, `-repos`, `-ops`, `-office`, `-work`), with the shared pieces in `_contract-core.mjs` and the panel page in `_contract-office-page.mjs`. The served surface is unchanged: `ROUTES` keeps its order and fields, every export stays, and `test/contract-server-golden.test.mjs` pins every request across every route, method, entry point and refusal. `smoke-office-single-source.sh` reads the route modules along with the server.
96
+ - The office panel's script is split by concern into `pipeline/office-src/app/` (strings, core helpers and the API, floor, HUD and windows, activity data, one file per group of station panels, the company, the demo, start). `office-build.mjs` concatenates them in the order `APP_MODULES` lists into the same single inline script; each module names what it shares through `/* global */` and `/* exported */` lines, which the build leaves out of the page. The page runs the same code as before.
97
+ - The unattended guard confines toolkit parameters from the toolkit's own declaration instead of guessing from names. `pipeline/schemas/toolkit-path-params.json` lists, per tool, the parameters it writes to and the paths it reads, generated from the toolkit's `tool-manifest.json` (3.29.0) by `pipeline/scripts/gen-toolkit-path-params.mjs`; `npm test` runs its `--check` against a sibling toolkit checkout and skips with a message when there is none. A declared write is checked against the protected paths and the credential stores, a declared read against the credential stores, `$HOME` itself and the host roots. So `document_pdf_inspect.path` may read a file under a repo's `.claude/`, while `web_trace.path` and `ios_xcodebuild.derived_data_path` are checked as writes. Any path-named argument a tool does not declare, and every one on a tool missing from the file, is still checked as a write. For a tool the declaration does not list, every argument string that looks like a path (absolute, `~`, `$HOME` or climbing with `..`) is read-checked; on a declared tool, a path-looking string in an argument the declaration does not list is read-checked unless a text-like key names it (`TOOLKIT_TEXT_KEYS`), so a certificate or render path the declaration missed cannot reach a credential store, and the pass-kit signing files are declared reads. An object or a list in a declared read that also takes inline data is judged by the path-looking strings inside it, so `security_evidence_check` and `security_sarif_export` findings, `design_contrast_check` tokens and a `coverage_gap` inventory run unattended. `doctor --probe` warns when the served toolkit version differs from the declaration's `toolkitVersion`.
98
+ - Unattended credential denies: a toolkit write can no longer target `~/.aws`, `~/Library/Keychains` or `~/.docker/config.json`, and a toolkit read can no longer reach those, `~/.ssh`, `~/.gnupg`, `~/.netrc`, `~/.git-credentials` or the host roots. The unattended profile and the toolkit guard also deny reads of `~/.kube`, `~/.config/gcloud`, `~/.azure`, `~/.config/op`, `~/.terraform.d`, `~/.pypirc`, `~/Library/Cookies` and the Chrome, Firefox and Safari profiles under `~/Library/Application Support` (a `Read()` deny, a sandbox `denyRead` entry and the guard's read check). The guard's credential-store list, the profile's `Read()` denies, the sandbox `denyRead` list and `MCP_TOOLKIT_INDEX_DENY` cover `~/.android/adbkey`, `~/.appstoreconnect`, `~/.private_keys`, `~/private_keys`, `~/.config/configstore`, `~/.config/github-copilot`, `~/.local/share/gh`, `~/.zsh_history`, `~/.bash_history`, `~/.gradle/gradle.properties` and the Edge, Brave, Arc, VS Code and Vercel CLI folders under `~/Library/Application Support`. The index deny list is the guard's list plus the contract server and office directories, pinned in every `launch.json` shape and forced on the office's toolkit child; a parity test fails when one drifts. Existing installs pick up the new denies through `tightenUnattendedProfile`. The sandbox also denies reads of all of `~/.gradle` (credentials, init scripts, the configuration cache key store, daemon state) and of `~/.local/share/gh`: the profile points `XDG_DATA_HOME` at `~/.multi-agent-unattended-homes/xdg-data`, rebuilt before each launch as links to the operator's data entries without gh, and each run gets its own Gradle home under `~/.multi-agent-unattended`, set per launch and removed after the run, into which it downloads its dependencies, Gradle distribution and JDK toolchains; no Gradle cache is shared with a run. The sandbox no longer allows writes to `~/.gradle`, and every install records the mirrored data directory in `~/.claude/multi-agent-unattended.tool-homes.json`. Gradle builds that need credentials from `~/.gradle/gradle.properties`, and gh extensions, are not available unattended, and `~/.gradle/init.gradle(.kts)` are denied for writes. As a second layer `check_bash` refuses Bash reads of either path, globs over-approximated, shell options that widen globs, local web servers and recursive or archiving reads (`grep -r`, `rg`, `tar`, `cp -R`, `zip -r`, `fd -x`, `pax -w`, `7z a`, a home-rooted `find` into `cpio`) rooted at `$HOME` or above; the Gradle `properties` task is refused. A grep or rg pattern and option values are not read as roots, and `$(pwd)`, `$(git rev-parse --show-toplevel)` and unset variables are accepted as roots.
99
+ - Every secret detector (commit hook, outbound gate, agent-config and skill scanners, memory-store rejoin prefixes) is generated from `secret-patterns.json` by `gen-secret-patterns.mjs`; `npm test` runs its `--check`. Block messages name each pattern by its generated label (a `ghp_` token is reported as a GitHub token).
100
+ - The free-model sandbox hosts are generated from the toolkit's provider catalog by `gen-free-hosts.mjs` into `lib/free-hosts.generated.mjs`; `npm test` runs its `--check`.
101
+ - Eight knowledge skills have sharper trigger descriptions, each naming when to use it and which sibling skill to use instead: `app-store-release-notes`, `swift-testing-review`, `swiftdata-review`, `macos-menubar-utility`, `macos-app-distribution`, `swift-concurrency-fix`, `swiftui-glass-effects`, `tailwind-styling`. The descriptions of `app-store-review` and `skill-creator` are shorter, and twenty-three skill descriptions are single-line and shorter. The always-on description surface counts block-scalar descriptions by their text, and its budget is 96000 bytes.
102
+ - The untrusted-data fence takes extra attributes on its opening line.
103
+ - Every contract route declares its remote tier, and the server refuses to load a route without one; the resolved tiers are unchanged. `officeLang` lives in `_contract-core.mjs`, so route modules depend only on the core.
104
+ - Scripts read the preferences override variable name from `PREFS_ENV` in `lib/prefs-value.mjs`.
105
+ - The health gate line shows local time ("2 Nov 09:34", "2 Kasım 09:34'te"); `--json` keeps the ISO value. `health-report.mjs` usage errors say what was wrong (unknown language, unknown flag, missing `--lang` value) in the output language, and `--lang=<code>` is accepted.
106
+ - The server room's doctor light no longer counts hook warnings the hooks light already shows, so the rack agrees with the health report.
107
+ - Doctor and the credential inventory mark `office_push_vapid` as generated and name `office-pair.mjs push keygen` as its remedy instead of setup; `migrate-prefs` adds its keychain mapping slot on upgraded installs.
108
+ - Turkish office and health wording: informal address throughout, one term (Otopilot) for the mode, and clearer rack, archive and runner lines. The office page's tab title and Home Screen name follow the page language.
109
+ - Installer output drops internal tags, uses the colon command form (`/multi-agent:setup`), says "Preferences already exist", and an upgrade prints what it upgraded from and to.
110
+ - Uninstall stops the office server and the remote client before removing files, names the kept `office_push_vapid` key and the paired devices, removes them only under `--all-data`, words a dry run as what it would do, and plans MCP removal only on hosts that are installed.
111
+ - `office-build.mjs` prints its usage for `--help` and refuses unknown arguments before writing anything.
112
+ - READMEs describe the server room panel, the memory archive, installing the office page as an app and phone notifications; the office-pair row mentions `push`, the health row `--lang` and the last gate.
113
+ - The config-hygiene scan (`scan-agent-config.sh`) judges MCP launch selectors through `mcp-config-audit.mjs` instead of flagging every `npx -y`: floating or mutable selectors and plain-http servers are MEDIUM, a literal secret is HIGH and its value is never printed, and a pinned launch is not reported. Outside MCP configs a bare `npx` is reported only with `-y`, `--yes` or `-p`.
114
+ - `constitution.mjs` exports `LINT_FILES`, so the constitution and the test-gaming scan agree on which files are lint configuration.
115
+ - `gen-fact-marks.mjs` also reads `pipeline/rules`, so the MCP tool count in `outside-the-pipeline.md` is rendered from `docs/facts.json`.
116
+ - 41 CLI scripts and the Claude Code and Codex installers read arguments through `lib/args.mjs` and the preferences path through `lib/prefs-value.mjs`, with unchanged flags, messages and exit codes. `lib/args.mjs` gains an `onArg` hook for checks made in argv order. `match-skills.mjs` and `package-manager.mjs` keep their own loops because they run copied without `lib/`.
117
+
118
+ ### Fixed
119
+
120
+ - Unattended guard: `ios_xcodebuild` `extra_args` is split as the shell will and each path flag's value is checked (`-project`, `-workspace`, `-xctestrun`, `-exportOptionsPlist` as reads; `-derivedDataPath`, `-resultBundlePath`, `-archivePath`, `-exportPath`, `-clonedSourcePackagesDirPath`, `-packageCachePath`, `-resultStreamPath`, `-testProductsPath` as writes). An unknown flag ending in `Path` or `Dir`, a missing value, `-xcconfig`, `-toolchain` and an uppercase build-setting override are refused, and so are glob characters, `~`, quotes, shell characters and any character outside printable ASCII, space and tab anywhere in `extra_args`, so neither a pattern such as `-xcconfi?` nor a U+FEFF separator can turn into a refused flag after the check. The string is split on space and tab only, as the toolkit splits it; the list form gets the same path checks. Unattended, `extra_args` follows an allowlist of xcodebuild flags and refuses `=`, padded list entries and flag entries holding a space. The list form accepts Swift test identifiers with parentheses and repeated `-destination` entries, and the test-enumeration flags and `-skipUnavailableActions` are allowed.
121
+ - Unattended guard: a refused toolkit write into a credential store says the run does not write it, not that it does not read it.
122
+ - `pre-commit-check.sh`: staged and unstaged scans read diffs with `--text --no-ext-diff --no-textconv` and the repository's attributes neutralised, so a key in a `-diff` or `binary` file, behind a textconv or behind `diff.external` is scanned. Staged files are decided from the index: a key staged and then deleted or overwritten in the working tree is scanned, binary content (numstat `-`) is scanned whole from the index blob, and NULs no longer turn added lines into "Binary file matches". The range scan's attribute override uses `attr.tree`; its `--attr-source` diff-tree option was a usage error that sent every file to the whole-blob fallback.
123
+ - `pre-commit-check.sh` reads its secret and git-command matches, and the non-ASCII test before the look-alike fold, from here-strings, so under `pipefail` a secret near the top of a large staged file is no longer scanned clean when `grep -q` exits early, and SIGPIPE no longer skips the fold. The same applies to the skill scanner, the issue-progress comment check, the worktree lists, the `launchctl`, `simctl`, `firebase` and marketplace probes, and intent classification; the same early-exit pipes are gone from every shipped shell script, and `smoke-pipefail-early-exit.sh` now scans every `.sh` under `pipeline/`, not only the smokes.
124
+ - Office push: `push keygen --rotate` writes only when the probe says the key is readable or missing, never over a locked or unknown one. A refused Keychain write names the store's exit code and first error line (the key cut out) and the next step; a malformed or unpaired device id points at `phone-devices.mjs list`; `push status` carries a `hint` with the keygen command when there is no key.
125
+ - Web Push: a VAPID private key must be canonical base64url (40 to 43 characters, standard padding allowed), 30 to 32 bytes, and satisfy 1 < d < n; `"AQ"` and keys with characters outside the alphabet are refused instead of loading as another key.
126
+ - `eval-skill-triggers-live.mjs` asks the routing question with the host's skills, plugins and MCP servers turned off (`--disable-slash-commands`, `--strict-mcp-config`). With them on, a model could answer with an installed command or a prefixed tool name that is not in the catalog under test, which scored as a miss.
127
+ - `smoke-bulk-read-free.sh` matches the captured worker output without piping it into `grep -q`. Under `pipefail` that pipe failed a check whenever grep exited on its match before the writer finished (`printf: write error: Broken pipe`), so a loaded machine failed a correct read at random. A check in the smoke fails if such a pipe comes back.
128
+ - An AWS key id (`AKIA`/`ASIA`) that runs on into more key characters is matched by the commit hook, the outbound gate and the agent guard's command-line scan.
129
+ - `ownedPaths` derivation matches how the owned-path gate reads globs: a slash-free pathspec naming a tracked path is read, a tracked file stays a file instead of becoming `<file>/**`, and an exception under a wildcard entry is attached to every entry that covers it.
130
+ - 131 smokes read a pipeline's output without piping it into `grep -q` or `head`, so a match found before the input ends no longer fails the check through SIGPIPE under `pipefail`.
131
+ - `skill-siblings.mjs` and doctor skip a host with no `.pipeline-version`, so a Claude-only install is no longer yellow for Copilot and Codex surfaces that are not installed.
132
+ - `office-archive.mjs` text mode prints a sentence when no repository has anything recorded.
133
+ - `gen-ref-toc.mjs --dir <missing>` and `run-aggregator.mjs --task-dir` with no value print a one-line error and exit 2 instead of a stack trace; `routine-registry.mjs add --name=bar` names the accepted spelling instead of printing undefined.
134
+ - `office-control.mjs` reads paired devices from the phone registry, so its status and `on --json` report the same remote state.
135
+ - The contract golden test seeds its own `TMPDIR` and normalizes the seed's real path, so it no longer depends on the host's pre-push stamp or the macOS `/private` prefix.
136
+ - `swiftdata` names `core-data` in its Not-for clause, so a question about an existing Core Data store routes to `core-data` instead of `swiftdata`.
137
+ - `health-report --lang=--x` stops with "--lang needs a value" instead of never returning.
138
+ - `transcript-index` reads a file named like an `Object.prototype` key (`constructor`, `toString`) as a transcript file, not as a numeric option.
139
+ - The skill-usage hook reads the repository folder from the file system instead of a git child process, so a row keeps its `repo` field under load.
140
+ - The lint-suppression scan runs in linear time on long lines and skips config lines over 4 KB. A scan that throws is reported as `gaming.scanned: false`, `--out` is still written, and Phase 3 Step 1.76 turns a failed or missing test-integrity result into a blocking "gate unavailable" finding.
141
+ - A renamed source file or lint config no longer reports its existing suppressions or rules as new, generated and vendored paths (the review file exclusions) are skipped, and a directive counts only at the start of a comment. Config loosening also covers an added list item with no visible parent (important), entries dropped from `select`, `opt_in_rules` or `extends`, and golangci `disable-all` / `default: none` (blocking); keys pair by section and parent, and `[[array.of.tables]]` ends a section. Directives added: ruff and flake8 file `noqa`, `mypy: ignore-errors`, `@ts-nocheck`, ESLint inline `rule: 0|off`, `@SuppressFBWarnings`, `noinspection`, `CHECKSTYLE:OFF`, and `NOLINT` for C, C++ and Objective-C.
142
+ - The MCP config audit never echoes a secret value: one sanitiser covers every selector, reason and name, an unknown launch names only its launcher and an unparsable URL only its scheme. Secrets are also found in `env` and `VAR=` prefixes, `bash -c` strings, bare `KEY=value` arguments and after `--api-key`-style flags. Its TOML reader cannot write to `Object.prototype`, malformed JSON is reported by line and column only, and echoed strings are capped at 4 KB.
143
+ - MCP selector classification: uvx git specs with a `#subdirectory=` fragment, every value-taking `docker run` option, `npx --loglevel` and `pkg@=1.2.3`. The audit CLI reports an unreadable file as HIGH and keeps going, and `scan-agent-config.sh` reports a failed audit as HIGH.
144
+ - The file-context hook skips superseded ledger entries.
145
+ - Pre-commit reads a staged binary from index stage 0, so a file named like `1:key.bin` is scanned.
146
+ - The install summary says "downgraded" for an older version and names an unreadable previous version instead of printing `null`.
147
+ - The MCP config audit's TOML reader reports a type clash by line only, never with a value from the file, parses literal strings in linear time, and the audit masks token-like URL path segments and `;` parameters.
148
+ - `test-integrity-gate.mjs` removes its `--out` before it runs, so an earlier iteration's file is never read as current, and no longer overflows the stack on a large diff. `review-decision-gate.mjs` treats an unscanned test-integrity result as a gate error, and autopilot never lowers a `gate_error` blocker.
149
+ - Lint-suppression pairing: each removed line excuses one added line, config lines pair only within one file or a renamed pair, so a rule moved into another config file is reported, and a line whose code changed while it kept its suppression is not reported as new. SwiftLint, pylint and clang-tidy `NOLINT` directives are read anywhere in a comment, and a JS/TS regex literal containing `//` no longer hides a directive on the same line.
150
+ - Lint config loosening reads glob, quoted and trailing-comment list items and every rule of an inline ESLint config (`off` blocking, `warn` important). A lowered minimum (`min_length`, `min-public-methods`, `MinNameLength`), a raised report floor (`min-complexity`, `min-len`, `min-occurrences`, `min-confidence`, `min-similarity-lines`, dupl `threshold`) and a golangci issue cap set to 0 (unlimited) are reported; a nested `warning` or `error` whose parent key is neither in the hunk header nor readable is reported as important. Directives after division, a JSX self-closing tag or a postfix operator are read. With `--diff-base` the gate reads a list item's parent key from the working tree when the diff leaves it out.
151
+ - The office skills panel says the usage log is younger than the window, and from which date the unused list means something, instead of an unused count that `prune-candidates` does not back. The server-room contract adds `skills.coversWindow` and `skills.coverageStart`.
152
+ - The install summary orders pre-release versions by semver, so `rc.9 -> rc.10` reads as an upgrade.
153
+ - `review-decision-gate.mjs` no longer trusts `.pipeline/test-integrity.json`, which the run can write. With a diff base (`--diff-base`, else `state.baseBranch`) it re-runs test-integrity itself, uses that result, and puts a blocker that triage dropped back into `accepted[]`; without one, a `test_integrity` blocker stays blocking. An empty `--integrity` file exits 3.
154
+ - The MCP config audit masks path segments, subdomain labels and bare fragment words of 16 or more characters that look random, whatever their characters; names, git refs and full commit SHAs stay readable. Arguments nested deeper than 64 levels give a one-line error instead of a RangeError.
155
+ - The skill-usage hook reads `.git` and `commondir` only when they are regular files of at most 4 KiB, so a FIFO or device there never blocks it.
156
+ - `smoke-npm-scope-pinning.sh` reads a line that is only a string literal as printed text, so a message array holding an install hint is not taken for a call.
157
+ - `test-integrity-gate.mjs --out` must be a regular file inside `--repo`, which must be a git work tree root (default: the cwd's work tree), and is written through a temp file and rename; `review-decision-gate.mjs` reads its re-run from the gate's stdout. Phase 3 Step 1.76 states that an unscanned test-integrity file parks the run.
158
+ - Pipeline output flags (`--out`, `--output`, `--json-out`) are checked as writes by the unattended guard when their value resolves.
159
+ - Unattended tool homes: the data directory lives under `~/.multi-agent-unattended-homes`, which no run can write, and is rebuilt before each launch. The refresh never follows a link, discards through a quarantine with one rename, checks the placed data directory, and never throws on a leftover it cannot remove; concurrent launches no longer fail with EEXIST. Nothing is ever deleted where a run can write it: a directory whose mode stops the rename gets u+rwx after a device and inode check and one retry, else it is left for a later sweep. The quarantine is deleted one directory entry at a time with the budget checked per entry, so removal memory does not grow with a directory's width. Install makes the run root and its four shared directories, and migrates the old `~/.multi-agent-unattended` layout without following links. It writes the data-directory record through a temp file and a rename, records the migration as pending before it starts and clears it only once all of it is gone, and waits while an unattended run may be at work: a session listed with a live process, a parked one, one missing for under a day, or an empty or unrecognised list counts as one. It moves old entries relative to a working directory checked by device and inode. `tightenUnattendedProfile` removes every `GRADLE_` variable from the shared profile.
160
+ - Hooks and launcher code outside the sandbox write a run's state directory, `~/.multi-agent-unattended/logs`, `pr-requests` and the run directory through `lib/safe-write.mjs`: temp files with `O_CREAT|O_EXCL|O_NOFOLLOW` and a random name renamed into place, appends with `O_APPEND|O_NOFOLLOW` and an fstat regular-file check, a link at any component below the run root refused, so a link a run plants beside its state is never written through. Shell scripts that run outside the sandbox (`phase-tracker.sh`, `log-metric.sh`, `audit-log.sh`, `gc-abandoned.sh`) make those writes through `scripts/run-write.mjs`. The publish step reads the PR request with `O_NOFOLLOW` within the run requests directory, and the runner readies the requests directories without following a link.
161
+ - Each unattended run gets a fresh Gradle home, `~/.multi-agent-unattended/run-<session>-<random>/gradle-home`, built where no run writes and holding only `org.gradle.daemon=false` in `gradle.properties`, and is launched with its own settings file, `~/.multi-agent-unattended-homes/launch/<session>.json`: the installed profile with that run directory added to `allowWrite` and `GRADLE_USER_HOME` and `GRADLE_OPTS=-Dorg.gradle.daemon=false` added to `env`. No Gradle cache is shared with a run: each run downloads its dependencies, its Gradle distribution and its JDK toolchains. The shared profile no longer lets a run write `~/.multi-agent-unattended`, only its `logs`, `pr-requests`, `repo-profiles` and `toolkit-index` directories, so a run cannot write another run's home or change the run root. The launch precondition refuses a launch without `MULTI_AGENT_SESSION_ID`, one whose argv `--session-id` differs from it, or one carrying any other `GRADLE_` variable, and accepts exactly that session's file and home. The runner removes the home and file once the session ends, the office sets it aside into the quarantine once the session list it polls shows a job's session ended, and a later launch sweeps the rest: a session listed with a live process keeps its run directory whatever its age, a listed session whose process is gone or one missing from a readable, non-empty list for a day has ended, and anything else goes after 7 days. Removal budgets are 2 s / 200000 entries at launch and 60 s / 2000000 after a run and at install, where the quarantine is also drained. The operator's `GRADLE_OPTS` and other Gradle variables do not reach a run. `~/.multi-agent-unattended-homes` is in `denyWrite` and the Edit denies as a whole.
162
+ - The unattended guard refuses Bash writes into `~/.gradle` and everything under `~/.multi-agent-unattended-homes`, including a link entry itself, and moving or removing a directory above `~/.multi-agent-unattended-homes` or the PR requests directory. It refuses `env -i`, `env -u` of any protected variable (every `MULTI_AGENT_*` included) and `su`, and protects `~/.config/multi-agent-pipeline`, the file `MULTI_AGENT_PREFS` names and `~/.config/multi-agent-toolkit`; the two `~/.config` directories are also in the profile's denyWrite and Edit denies, and moving or removing a directory above any of the three is refused. It reads env long options as GNU does (any unique prefix) and as BSD does (`--X` is `-` followed by X), refuses every long option except `--null`, `--debug`, `--help`, `--version`, `--list-signal-handling` and the three signal options spelled exactly, reads `genv` and `gnuenv` like env with GNU-accurate refusals, refuses `genv`/`gnuenv` `-a` (also in a cluster) as `--argv0` is refused, refuses `env -P`, refuses `env -u` with a name the shell rewrites, and refuses writes under another session's run directory. It judges zsh `emulate -c` like `zsh -c`, refuses `emulate -o <glob option>` and `emulate ksh|sh|bash`, strips `noglob` and `nocorrect`, and refuses `sched`.
163
+ - `lib/safe-write.mjs` accepts a path spelled in another case or Unicode form from the disk (`/users/...`, a wrong-case leaf, NFC to an NFD directory). Anchors and the pinned directory with each parent up to the anchor are compared by device and inode, not by spelling, and a link below the run root is still refused, through an operator's link into the root as well. The earlier working directory is restored by device and inode, falling back to the home directory, so the process is never left in a run's directory.
164
+ - `gc-abandoned.sh` (office gc apply, runner daily report) salvages and marks a run's state through `run-write.mjs abandon`; a run whose state directory holds a link, or whose state resolves outside the run root, is left alone, reported as `refused` with the reason and counted in the summary line. It never runs git inside an unattended run's worktree (state below the run root, `--unattended`, or named in the runner's `worktrees.jsonl`): the run is marked abandoned and the worktree kept as `kept-unattended`, because `git status` and `git stash` run the clean filters the run's own config names. Registration is read from the main repository by an explicit `--git-dir`.
165
+ - `phase-tracker.sh` takes its lock, reads, writes, repoints `.tracker-current` and appends spans through `run-write.mjs` when the tracker is below the unattended run root, under `MULTI_AGENT_UNATTENDED=1`, or with `TRACKER_SAFE_WRITE=1`, which `task-mirror` sets. `mv`'s flag is probed once, and temp names no longer fork `od` and `tr`.
166
+ - The unattended guard refuses `env -a` and `--argv0` under every env name (`env`, `./env`, Homebrew's `gnubin/env`), not only `genv` and `gnuenv`.
167
+ - `log-metric.sh` and `audit-log.sh` append through `run-write.mjs` below the unattended run root, and the audit trail there rotates through `run-write.mjs rotate`, one rename to `audit.jsonl.1` at `AUDIT_ROTATE_AT_BYTES`, keeping two generations.
168
+ - The office sets an ended job's run home aside into the quarantine with one rename instead of deleting it inside the `/v1/activity` request.
169
+ - Prose says "required" instead of "mandatory".
170
+ - `run-write begin` checks its deadline on every pass, reclaims at most three stale locks, and removes a file, FIFO or link planted at `<tracker>.lock`, so it no longer waits forever on one; the task-mirror hook kills `phase-tracker.sh`'s whole process group on its timeout.
171
+ - `ma_under_run_root` resolves a relative path against the working directory and stops at `/`, so a relative `LOGS_ROOT` no longer hangs `log-metric.sh`; a directory that exists but cannot be entered counts as below the run root.
172
+ - `phase-tracker.sh` takes `.tracker-current` below the run root only when it names a `tracker-state.json` below the same log root, reads it and the unlocked state without following a link, and prints the reason run-write gave for a refusal. It reads `mv --version` from a here-string, so the GNU probe no longer fails through SIGPIPE under pipefail.
173
+ - The skill-usage log rotates through safe-write (size, lock and rename), so a link at the log, `.1` or the lock is never followed.
174
+ - `capture-flush.sh` reads an unattended run's triage as a regular JSON file within its run directory and never names the store from the state's `project`.
175
+ - The autopilot runner and `autopilot-control off --now` no longer stash or inspect an unattended run's worktree. The runner removes a retired run's worktree only when its own publish step, in that retirement, returned `pr-opened` or `pushed-awaiting-pr`; a PR or publish outcome the run's state claims is not enough, and a publish step that threw or was skipped keeps the worktree (`keptWorktree` in `attempted.jsonl`). Untracked files in a delivered run's worktree are removed with it, because the publish step's last check covers tracked files only. `autopilot-off --now` (and `POST /v1/autopilot/off`) returns `keptWorktrees`, the worktree of each item it ended. Removal goes through the main repository by `--git-dir`, resolved with `rev-parse --git-common-dir` so a repository that is itself a linked worktree is accepted; `run-kill` removes the same way. A worktree whose run did not deliver stays until it is removed by hand, as does one a run locked or whose `.git` file it rewrote.
176
+ - `run-write.mjs` has `read`, `rotate` and `--within <root>`; without `--within`, a target spelled inside the run root is held to it, so `..` or a link out is refused. Exit 3 names its reason (`link`, `too-large`, `not-a-directory`, `not-a-regular-file`, `exists`, `outside`). `lib/run-worktree.mjs` checks and removes a run's worktree from its main repository without running git inside it.
177
+ - `capture-flush.sh` no longer leaves a temp file behind on every flush of an unattended run: the private triage copy is made once, where the exit trap removes it.
178
+
179
+ ### Removed
180
+
181
+ - `test/fixtures/gen-toolkit-path-params.mjs` and its `toolkit-path-params.json`: the regex guess at the toolkit's write parameters is replaced by the vendored declaration.
182
+ - Upgrade cleanups that every install at the supported floor (20.17.0) has already run, since each has run on every install since 20.3.0 or earlier: the removal of trees no installer writes any more (`~/.claude/eval`, `~/.claude/multi-agent-tasks`, `~/.claude/.multi-agent-state` and the old adapter runtime in `~/.multi-agent`), the scrub of the pre-5.0 `## Multi-Agent Task Orchestrator` and `## Instruction Sync` sections from `copilot-instructions.md`, and the in-place rewrite of an agent-guard hook registered under a `Bash(...)` matcher or the web-tools-only matcher. A directory of those names, or a section under those headings, is now the user's and is left alone; a guard entry under an old matcher still does not count, and the current one is added beside it.
183
+
19
184
  ## [20.39.1] - 2026-11-02
20
185
 
21
186
  ### Removed
package/README.md CHANGED
@@ -262,7 +262,7 @@ The discipline behind all of this - bounded loops, evidence gates, token-budgete
262
262
  | `/multi-agent:sync` | One-shot sync: Claude Code, Copilot CLI, pipeline repo, website, toolkit MCP |
263
263
  | `/multi-agent:update` | Update to the latest published npm release and run migrations |
264
264
  | `/multi-agent:doctor` | Health check of the install: layout, preferences, credentials, hooks, host capabilities; the exit code is the verdict |
265
- | `/multi-agent:health` | One look at the machine: services, toolkit, install, sessions and today's cost, autopilot, office, disk, errors |
265
+ | `/multi-agent:health` | One look at the machine: services, toolkit, install, sessions and today's cost, autopilot, office, disk, the last local gate, errors; `--lang en\|tr` picks the language |
266
266
  | `/multi-agent:uninstall` | Remove the pipeline from every CLI. Keychain tokens always left intact |
267
267
  | `/multi-agent:serve` | Local contract server for a client: 127.0.0.1 only, token, stops when idle |
268
268
  | `/multi-agent:help` | This catalog, in the terminal, in your `outputLanguage` |
@@ -297,7 +297,7 @@ the pipeline merges.
297
297
  - **One outward writer.** The session never pushes. Phase 4 writes a PR request, and the runner, outside the session, re-runs the stack's build and tests itself, re-checks the gate ledger, the secret scan over the commit range and the outbound gate, pushes the branch the run recorded from a clean staging repository, and opens the PR with `gh pr create --draft`. A check that fails leaves the item `verification-failed` with the verdict on disk. On Bitbucket the branch is pushed and a summary written, since there is no draft PR to open. [Unattended security](./pipeline/multi-agent-refs/features/unattended-security.md)
298
298
  - **Operations around a run.** A second launchd agent keeps the Mac awake while the mode is on (`caffeinate -s -i`, plus `-d` if you answer yes to the display question at `autopilot-on`), and each run holds a sleep lock until its tick ends. Every credential a configured repo needs is probed before the schedule is offered and again on every tick, so a locked keychain refuses with the key and the fix. A circuit breaker stops launching after consecutive attempts that produced nothing, `costCeilingUsd` caps spend over a rolling 24 hours, `maxParallelAgents` caps sessions working at once, and once a day the runner writes a cleanup report and, when enabled, a digest. [Autopilot operations](./pipeline/multi-agent-refs/features/autopilot-operations.md)
299
299
  - **A fail-closed guard.** Under the variable, the Bash guard judges a command only when it reduces to simple commands joined by `;`, `&&`, `||` and plain pipes, and refuses anything else unparsed. On what it can parse: no push, PR, issue or tracker write, no Keychain read, no fetch outside the network allowlist, no package install or manifest edit, no write into a protected path. Ticket, page and PR text reaches the model inside untrusted-data delimiters. The permission profile (`install --unattended`) is a second line; the boundary is a separate non-admin macOS user and GitHub rulesets on the default and release branches, which the operator applies. [Unattended security](./pipeline/multi-agent-refs/features/unattended-security.md)
300
- - **Claims are checked, not trusted.** With the quality gates active, a run's claims about the repository are checked before it commits: a localization key or endpoint the change references exists, open analysis questions are answered or park the run, a triage citation quotes the line it cites, a "pre-existing" finding points at a line the diff did not touch, the plan's steps are covered, and a test pass shows a positive executed count read with the stack's own markers (8 stacks: `ios`, `android`, `web`, `backend-node`, `python`, `go`, `rust`, `jvm`) along with a new test that fails without the change. Every verdict goes to a gate ledger, and the commit hook refuses a commit whose mandatory gates did not pass for HEAD. [Unattended gates](./pipeline/multi-agent-refs/features/unattended-gates.md), [stack adapters](./pipeline/multi-agent-refs/features/stack-adapters.md)
300
+ - **Claims are checked, not trusted.** With the quality gates active, a run's claims about the repository are checked before it commits: a localization key or endpoint the change references exists, open analysis questions are answered or park the run, a triage citation quotes the line it cites, a "pre-existing" finding points at a line the diff did not touch, the plan's steps are covered, and a test pass shows a positive executed count read with the stack's own markers (8 stacks: `ios`, `android`, `web`, `backend-node`, `python`, `go`, `rust`, `jvm`) along with a new test that fails without the change. Every verdict goes to a gate ledger, and the commit hook refuses a commit whose required gates did not pass for HEAD. [Unattended gates](./pipeline/multi-agent-refs/features/unattended-gates.md), [stack adapters](./pipeline/multi-agent-refs/features/stack-adapters.md)
301
301
  - **Spec, plan and review discipline.** `/multi-agent:analysis` writes a project constitution (security, accessibility, architecture and licensing rules, each tied to a source), and a spec-consistency gate checks by id that every requirement has a task and a test and that nothing waives a binding rule. Phase 1 ends with one plan-critic round under six lenses (scope, feasibility, security, a cheaper alternative, an unstated input, a decision left to the implementer), answered once and judged by a script. In review, a `blocking` finding stops the run only when two independent reviewers carry it or a failing test shows it; otherwise it is lowered to `important`, never dropped. [Constitution](./pipeline/multi-agent-refs/features/constitution.md), [plan critic](./pipeline/multi-agent-refs/features/plan-critic.md), [review decision](./pipeline/multi-agent-refs/features/review-decision.md)
302
302
  - **A client contract.** Commands and run questions are declared as data. `/multi-agent:serve` starts a localhost HTTP server over the same JSON the CLI prints, and `pipeline/contract/` ships the manifest, TypeScript types and fixtures a client builds against. Four phone routes read redacted runs, answer a parked question with one of its offered options, and, only when switched on, queue a launch; every request carries an Ed25519 signature from an enrolled device. The phone app is a separate project. [Client kit](./pipeline/contract/README.md), [phone API](./pipeline/multi-agent-refs/features/phone-api.md)
303
303
 
@@ -382,6 +382,20 @@ the page with a one-time code; the server runs until `/multi-agent:office-off`.
382
382
  Accounting shows tokens and cost, the manager's office holds autopilot,
383
383
  routines and the settings (output language, the fable rung, model routing),
384
384
  and the orientation room explains the building.
385
+ - **The server room's control panel.** Every Claude Code session with its
386
+ work and spend, today's totals per model, and health lights for doctor,
387
+ hooks, the toolkit, the last local gate, run errors and autopilot; the rack
388
+ sums them.
389
+ - **The memory archive.** The archive room shows what the learning loop holds
390
+ per repository: decisions with their rationale, security notes, learnings,
391
+ and the code graph report's hubs, clusters and questions. It is never offered
392
+ to a phone.
393
+ - **Install the page as an app.** The page carries a web app manifest, so it
394
+ can be added to the Dock (Safari: File, Add to Dock) or to a phone's Home
395
+ Screen. It opens `/office` and works while the server runs.
396
+ - **Phone notifications.** A paired phone can get two notifications with no
397
+ content (a question is waiting, a run finished). `office-pair.mjs push`
398
+ turns them on; see `/multi-agent:office-pair`.
385
399
  - **People take jobs.** Click one, pick a job, confirm. Writes that change the
386
400
  machine are local-only and take two requests. Work that is interactive or
387
401
  changes the installation stays in the terminal, and the commands window says
@@ -389,12 +403,12 @@ the page with a one-time code; the server runs until `/multi-agent:office-off`.
389
403
 
390
404
  ![Repository floors with Development and Analysis rooms, a live analysis and an annex desk](.github/office/rooms.png)
391
405
 
392
- | Command | What it does |
393
- | ---------------------------- | --------------------------------------------------------------- |
394
- | `/multi-agent:office-on` | Start or reuse the server and open the page |
395
- | `/multi-agent:office-status` | Whether it runs, its URL (never the token) and its last actions |
396
- | `/multi-agent:office-pair` | Pair a phone: QR, wait, compare the code, enrol |
397
- | `/multi-agent:office-off` | Stop the server; it runs until you do |
406
+ | Command | What it does |
407
+ | ---------------------------- | ---------------------------------------------------------------------------------- |
408
+ | `/multi-agent:office-on` | Start or reuse the server and open the page |
409
+ | `/multi-agent:office-status` | Whether it runs, its URL (never the token) and its last actions |
410
+ | `/multi-agent:office-pair` | Pair a phone: QR, wait, compare the code, enrol; `push` turns on its notifications |
411
+ | `/multi-agent:office-off` | Stop the server; it runs until you do |
398
412
 
399
413
  Security model: [office threat model](pipeline/multi-agent-refs/features/office-threat-model.md).
400
414
  Phone access is not part of this installation.
@@ -501,7 +515,7 @@ The **secret scan** runs as a `PreToolUse` hook on Claude Code (hard-blocks a co
501
515
  | Hook | Claude Code | Codex CLI | Copilot CLI |
502
516
  | --- | --- | --- | --- |
503
517
  | `pre-commit-check.sh` (secret scan, owned paths, attended build/test evidence, unattended ledger) | PreToolUse `Bash` | none: pre-push check | none: pre-push check |
504
- | `agent-guard.sh` (attribution, force-push, skipped git hooks, argv secrets, closure confirmations, read-only repos, unattended policy) | PreToolUse `Bash`, file edits, fetch and toolkit tools | none | none |
518
+ | `agent-guard.sh` (attribution, force-push, skipped git hooks, argv secrets, closure confirmations, read-only repos, your own `guardRules`, unattended policy) | PreToolUse `Bash`, file edits, fetch and toolkit tools | none | none |
505
519
  | `run-scope-guard.sh` (Figma phase rule, worktree boundary warning) | PreToolUse Figma tools, file edits | none: the phase records its own MCP calls | none |
506
520
  | `run-stop-guard.sh` (no silent stop mid-run) | Stop | none: halts stay the phase's own write | none |
507
521
  | `task-mirror.sh` (native task list into the run tracker, so the office shows it) | PostToolUse `TaskCreate`/`TaskUpdate` | none: the phase calls `phase-tracker.sh task` itself | none: the phase calls `phase-tracker.sh task` itself |
@@ -509,18 +523,22 @@ The **secret scan** runs as a `PreToolUse` hook on Claude Code (hard-blocks a co
509
523
  | `graph-hint.sh` (points a whole-repo identifier search at a current code graph, once per session) | PreToolUse `Grep`/`Glob` | none | none |
510
524
  | `note-agent-event.sh` (a subagent's outcome or a failed tool call, into the session notes) | SubagentStop, PostToolUseFailure | none | none |
511
525
  | `answer-check.sh` (an AskUserQuestion submitted without a choice is asked again, not defaulted) | PostToolUse `AskUserQuestion` | none | none |
526
+ | `note-skill-use.sh` (skill name, outcome, time, host and repo folder name into a local log, so unused skills can be pruned on evidence; never arguments, prompts or output) | PostToolUse / PostToolUseFailure `Skill` | none: Codex reads skill files, no tool call to hook | none: no Copilot hooks are installed |
527
+ | `note-mcp-failure.sh` (server, tool, time and a closed error class of a failed MCP call into a local log, read by doctor's `mcp-failures` check; never arguments, output or error text) | PostToolUseFailure `mcp__.*` | none | none: no Copilot hooks are installed |
512
528
  | `edit-syntax-gate.sh` | PostToolUse file edits | PostToolUse `apply_patch` | none: Copilot discards postToolUse output |
513
529
  | `check-read-size.sh`, capture hooks | registered | none | none |
514
530
 
515
531
  Where a host has no equivalent hook the rule is still in the phase documents; it is a request there, not enforcement.
516
532
 
533
+ **Your own guard rules.** `prefs.global.guardRules` adds rules to `agent-guard.sh`: each names a tool (`Bash`, `Edit`, `Write`, `Read` or a toolkit tool glob), a regex and an action (`warn`, `ask` or `block`). A rule can only make the guard stricter, never allow what it refuses, and unattended an `ask` is a `block`. Messages name the rule id and reason, never the matched text, and `/multi-agent:doctor` (`guard-rules`) reports an invalid rule and one whose tool the guard is not registered on, such as `Read` under the default hooks, warns when the preferences file does not parse (unattended, that refuses every call a rule could govern when the file names `guardRules`), and names a rule whose pattern has a slow shape, which still runs under a 1-second matching budget. [Unattended security](./pipeline/multi-agent-refs/features/unattended-security.md#user-guard-rules)
534
+
517
535
  ## Outside a pipeline run
518
536
 
519
537
  Installing the pipeline is not only useful when you run it. Open an ordinary session and the same three things are available, announced by `rules/outside-the-pipeline.md` which loads with every conversation:
520
538
 
521
539
  - **Services you already onboarded.** The token `setup` mapped is readable now - resolve the logical name through `credential-store.sh` and fetch the issue, the page, the log. **Reads are ordinary work; writes are not.** Posting a Jira comment, editing an issue or opening a PR goes through the pipeline commands, because the rules that make those safe (never auto-close, `Ref:` not `Closes:`, humanizer on outward prose) live there.
522
540
  - **The stack skills `/multi-agent:stack` enabled for the repo.** Each toolkit's own `index` skill routes; the pipeline keeps no copy of that table.
523
- - **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->227<!-- /fact --> tools, most of them for a running app - screen state, crash logs, design comparison, store pre-submission, web scraping and browser test states. Several measure instead of judging by eye: WCAG contrast (`design_contrast_check`), layout shift across themes or a mirrored locale (`ios_visual_diff` with `mode: "layout"`), store listing limits (`store_listing_lint`), review themes with verbatim quotes (`store_review_themes`) and whether security findings cite real lines (`security_evidence_check`, with `security_sarif_export` for code-scanning views). The learnings ledger and the code graph are readable through it too (`learnings_*`, `graph_*`).
541
+ - **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->228<!-- /fact --> tools, most of them for a running app - screen state, crash logs, design comparison, store pre-submission, web scraping and browser test states. Several measure instead of judging by eye: WCAG contrast (`design_contrast_check`), layout shift across themes or a mirrored locale (`ios_visual_diff` with `mode: "layout"`), store listing limits (`store_listing_lint`), review themes with verbatim quotes (`store_review_themes`) and whether security findings cite real lines (`security_evidence_check`, with `security_sarif_export` for code-scanning views). The learnings ledger and the code graph are readable through it too (`learnings_*`, `graph_*`).
524
542
 
525
543
  Uninstall preserves this layer: the tokens, the reader that opens them, the mapping that names them, and the MCP registration. Removing the pipeline should not cost you the credentials you onboarded through it.
526
544
 
package/README.tr.md CHANGED
@@ -261,7 +261,7 @@ Koşunun kendisinde ayarlanabilen tek şey autopilot; geri kalan her şey kendi
261
261
  | `/multi-agent:sync` | Tek atımlık senkron: Claude Code, Copilot CLI, pipeline repo, website, toolkit MCP |
262
262
  | `/multi-agent:update` | npm'deki son yayına günceller ve migration'ları koşar |
263
263
  | `/multi-agent:doctor` | Kurulumun sağlık kontrolü: yerleşim, tercihler, kimlik bilgileri, hook'lar, host yetenekleri; çıkış kodu verdiktin kendisi |
264
- | `/multi-agent:health` | Makineye tek bakış: servisler, toolkit, kurulum, oturumlar ve bugünün maliyeti, autopilot, ofis, disk, hatalar |
264
+ | `/multi-agent:health` | Makineye tek bakış: servisler, toolkit, kurulum, oturumlar ve bugünün maliyeti, otopilot, ofis, disk, son yerel kapı, hatalar; dili `--lang en\|tr` seçer |
265
265
  | `/multi-agent:uninstall` | Pipeline'ı her CLI'dan kaldırır. Keychain token'larına hiç dokunmaz |
266
266
  | `/multi-agent:serve` | İstemci için yerel sözleşme sunucusu: yalnızca 127.0.0.1, token, boşta durur |
267
267
  | `/multi-agent:help` | Bu katalog, terminalde, `outputLanguage`'ine göre |
@@ -382,6 +382,19 @@ başlatır ve sayfayı tek kullanımlık bir kodla açar; sunucu
382
382
  koşuları ve eski koşu loglarını temizler. Muhasebe token ve maliyeti
383
383
  gösterir. Yönetici odasında otopilot, rutinler ve ayarlar (çıktı dili,
384
384
  Fable basamağı, model yönlendirmesi) var. Oryantasyon odası binayı anlatır.
385
+ - **Sunucu odasının kontrol paneli.** Her Claude Code oturumunu işi ve
386
+ harcamasıyla, bugünün model başına toplamlarını ve doctor, hook'lar, toolkit,
387
+ son yerel kapı, koşu hataları ve otopilot için sağlık ışıklarını gösterir;
388
+ kabindeki ışık hepsini tek renkte özetler.
389
+ - **Hafıza arşivi.** Arşiv odası öğrenme döngüsünün her repo için sakladıklarını
390
+ gösterir: gerekçeleriyle kararlar, güvenlik notları, öğrenilenler ve kod
391
+ grafiği raporunun merkezleri, kümeleri ve soruları. Telefona hiç açılmaz.
392
+ - **Sayfayı uygulama olarak kur.** Sayfa bir web uygulaması manifesti taşır;
393
+ Dock'a (Safari: Dosya, Dock'a Ekle) ya da telefonun ana ekranına eklenebilir.
394
+ `/office` adresini açar ve sunucu çalıştığı sürece çalışır.
395
+ - **Telefon bildirimleri.** Eşlenmiş bir telefon içerik taşımayan iki bildirim
396
+ alabilir (bir soru bekliyor, bir koşu bitti). `office-pair.mjs push` bunları
397
+ açar; ayrıntısı `/multi-agent:office-pair` içinde.
385
398
  - **Kişiler iş alır.** Birine tıkla, iş seç, onayla. Makineyi değiştiren
386
399
  yazmalar yalnızca yereldir ve iki istek ister. Etkileşimli ya da kurulumu
387
400
  değiştiren işler terminalde kalır; komutlar penceresi her komut için sebebini
@@ -389,12 +402,12 @@ başlatır ve sayfayı tek kullanımlık bir kodla açar; sunucu
389
402
 
390
403
  ![Geliştirme ve Analiz odalarıyla repo katları, süren bir analiz ve bir şube masası](.github/office/rooms-tr.png)
391
404
 
392
- | Komut | Ne yapar |
393
- | ---------------------------- | -------------------------------------------------------- |
394
- | `/multi-agent:office-on` | Sunucuyu başlatır ya da var olanı kullanır, sayfayı açar |
395
- | `/multi-agent:office-status` | Çalışıyor mu, adresi (token asla) ve son işlemleri |
396
- | `/multi-agent:office-pair` | Telefonu eşle: QR, bekle, kodu karşılaştır, kaydet |
397
- | `/multi-agent:office-off` | Sunucuyu durdurur; sen durdurana kadar çalışır |
405
+ | Komut | Ne yapar |
406
+ | ---------------------------- | ------------------------------------------------------------------------------ |
407
+ | `/multi-agent:office-on` | Sunucuyu başlatır ya da var olanı kullanır, sayfayı açar |
408
+ | `/multi-agent:office-status` | Çalışıyor mu, adresi (token asla) ve son işlemleri |
409
+ | `/multi-agent:office-pair` | Telefonu eşle: QR, bekle, kodu karşılaştır, kaydet; `push` bildirimlerini açar |
410
+ | `/multi-agent:office-off` | Sunucuyu durdurur; sunucu ancak bununla durur. |
398
411
 
399
412
  Güvenlik modeli: [ofis tehdit modeli](pipeline/multi-agent-refs/features/office-threat-model.md).
400
413
  Telefondan erişim bu kurulumun parçası değil.
@@ -502,25 +515,29 @@ triage notu bunu belirtir.
502
515
  | Hook | Claude Code | Codex CLI | Copilot CLI |
503
516
  | --- | --- | --- | --- |
504
517
  | `pre-commit-check.sh` (secret taraması, sahipli yollar, attended build/test kanıtı, unattended defteri) | PreToolUse `Bash` | yok: pre-push kontrolü | yok: pre-push kontrolü |
505
- | `agent-guard.sh` (atıf, force-push, atlanan git hook'ları, argv'de secret, kapanış onayları, salt okunur repolar, unattended politikası) | PreToolUse `Bash`, dosya düzenlemeleri, fetch ve toolkit araçları | yok | yok |
518
+ | `agent-guard.sh` (atıf, force-push, atlanan git hook'ları, argv'de secret, kapanış onayları, salt okunur repolar, kendi `guardRules` kuralların, unattended politikası) | PreToolUse `Bash`, dosya düzenlemeleri, fetch ve toolkit araçları | yok | yok |
506
519
  | `run-scope-guard.sh` (Figma faz kuralı, worktree sınırı uyarısı) | PreToolUse Figma araçları, dosya düzenlemeleri | yok: faz kendi MCP çağrılarını kaydeder | yok |
507
520
  | `run-stop-guard.sh` (koşu ortasında sessizce durmaz) | Stop | yok: duraklama fazın kendi yazımı olarak kalır | yok |
508
521
  | `task-mirror.sh` (terminaldeki görev listesini koşunun takipçisine yazar, ofis de onu gösterir) | PostToolUse `TaskCreate`/`TaskUpdate` | yok: faz `phase-tracker.sh task`'ı kendisi çağırır | yok: faz `phase-tracker.sh task`'ı kendisi çağırır |
509
522
  | `file-context.sh` (okunan ya da aranan dosya hakkında repo hafızasının söylediklerini verir; çıktı 10.000 karakterlik hook sınırına sığdırılır) | PreToolUse `Read`/`Grep`/`Glob`, PostToolUse `Read` | yok | yok |
510
523
  | `graph-hint.sh` (tüm repoda bir tanımlayıcı aranırken güncel kod grafiğini önerir, oturumda bir kez) | PreToolUse `Grep`/`Glob` | yok | yok |
511
524
  | `note-agent-event.sh` (alt ajanın sonucunu ya da başarısız araç çağrısını oturum notlarına yazar) | SubagentStop, PostToolUseFailure | yok | yok |
525
+ | `note-skill-use.sh` (skill adı, sonuç, zaman, host ve repo klasör adı yerel bir loga yazılır; kullanılmayan skill'ler kanıtla ayıklanır; argüman, prompt ve çıktı asla yazılmaz) | PostToolUse / PostToolUseFailure `Skill` | yok: Codex skill dosyalarını okur, yakalanacak araç çağrısı yok | yok: Copilot hook'u kurulmaz |
526
+ | `note-mcp-failure.sh` (başarısız bir MCP çağrısının sunucusu, aracı, zamanı ve hata sınıfı yerel bir loga yazılır, doctor'ın `mcp-failures` kontrolü bunu okur; argüman, çıktı ve hata metni asla yazılmaz) | PostToolUseFailure `mcp__.*` | yok | yok: Copilot hook'u kurulmaz |
512
527
  | `edit-syntax-gate.sh` | PostToolUse dosya düzenlemeleri | PostToolUse `apply_patch` | yok: Copilot postToolUse çıktısını atar |
513
528
  | `check-read-size.sh`, capture hook'ları | kayıtlı | yok | yok |
514
529
 
515
530
  Bir host'ta eşdeğer hook yoksa kural yine faz dokümanlarında durur; orada zorlama değil, bir istektir.
516
531
 
532
+ **Kendi guard kuralların.** `prefs.global.guardRules`, `agent-guard.sh`'a kural ekler: her kural bir araç (`Bash`, `Edit`, `Write`, `Read` ya da bir toolkit araç glob'u), bir regex ve bir eylem (`warn`, `ask` ya da `block`) belirtir. Bir kural guard'ı yalnızca sıkılaştırır, onun reddettiğine asla izin vermez. Gözetimsiz koşuda `ask` bir `block` olur. Mesajlar kuralın id'sini ve gerekçesini verir, eşleşen metni asla yazmaz. Geçersiz bir kuralı ya da aracında guard kayıtlı olmayan bir kuralı (varsayılan hook'larda `Read` gibi) `/multi-agent:doctor` (`guard-rules`) bildirir. Tercih dosyası ayrıştırılamazsa da uyarır; gözetimsiz koşuda bu durum, bir kuralın kapsayabileceği her çağrıyı reddeder. [Gözetimsiz güvenlik](./pipeline/multi-agent-refs/features/unattended-security.md#user-guard-rules)
533
+
517
534
  ## Pipeline koşusu dışında
518
535
 
519
536
  Pipeline'ı kurmak yalnız onu çalıştırdığında işe yaramıyor. Sıradan bir oturum açtığında aynı üç şey elinin altında; her sohbette yüklenen `rules/outside-the-pipeline.md` bunları duyuruyor:
520
537
 
521
538
  - **Zaten onboard ettiğin servisler.** `setup`'ın eşlediği token okunabilir durumda - mantıksal adı `credential-store.sh` ile çöz, issue'yu, sayfayı, logu getir. **Okuma sıradan iş, yazma değil.** Jira yorumu, issue düzenleme ve PR açma pipeline komutlarından geçer, çünkü onları güvenli kılan kurallar (issue asla otomatik kapanmaz, `Closes:` değil `Ref:`, dışa dönük metinde humanizer) orada yaşıyor.
522
539
  - **`/multi-agent:stack`'in bu repo için açtığı stack skilleri.** Yönlendirmeyi her toolkit'in kendi `index` skill'i yapar; pipeline o tablonun kopyasını tutmaz.
523
- - **`multi-agent-toolkit` MCP.** <!-- fact:toolCount -->227<!-- /fact --> araç, çoğu çalışan uygulama için - ekran durumu, crash logu, tasarım karşılaştırma, store ön-kontrolü, web kazıma ve tarayıcı test durumları. Bazı kontrolleri gözle değil ölçümle yapar. WCAG kontrastı `design_contrast_check` ile, tema ya da RTL değişince kayan yerleşim `ios_visual_diff` (`mode: "layout"`) ile ölçülür. Mağaza metni sınırlarını `store_listing_lint` denetler. `store_review_themes` yorumları temalara ayırır ve alıntıyı birebir bırakır. Güvenlik bulgularının gerçek satırlara dayandığını `security_evidence_check` doğrular; `security_sarif_export` kod tarama ekranları için SARIF yazar. Öğrenim kaydı (`learnings_*`) ve kod grafiği (`graph_*`) de buradan okunur.
540
+ - **`multi-agent-toolkit` MCP.** <!-- fact:toolCount -->228<!-- /fact --> araç, çoğu çalışan uygulama için - ekran durumu, crash logu, tasarım karşılaştırma, store ön-kontrolü, web kazıma ve tarayıcı test durumları. Bazı kontrolleri gözle değil ölçümle yapar. WCAG kontrastı `design_contrast_check` ile, tema ya da RTL değişince kayan yerleşim `ios_visual_diff` (`mode: "layout"`) ile ölçülür. Mağaza metni sınırlarını `store_listing_lint` denetler. `store_review_themes` yorumları temalara ayırır ve alıntıyı birebir bırakır. Güvenlik bulgularının gerçek satırlara dayandığını `security_evidence_check` doğrular; `security_sarif_export` kod tarama ekranları için SARIF yazar. Öğrenim kaydı (`learnings_*`) ve kod grafiği (`graph_*`) de buradan okunur.
524
541
 
525
542
  Uninstall bu katmanı korur: token'lar, onları açan okuyucu, adlarını tutan eşleme ve MCP kaydı. Pipeline'ı kaldırmak, onun üzerinden onboard ettiğin credential'ları kaybetmek anlamına gelmemeli.
526
543
 
@@ -11,7 +11,7 @@ End-to-end guide for generating production-ready UI components from Figma design
11
11
  - **Multi-repo aware** - components span multiple repos (tokens in `common`, view in `components`, docs in `wiki`). The orchestrator sequences writes correctly.
12
12
  - **Non-blocking side effects** - wiki generation + Jira sync run as augmentations; failures log and Phase 5 continues.
13
13
  - **Cross-cutting integration skills** - Phase 2 detects content patterns (`figma-form-integration`, `figma-price-integration`, `figma-ui-patterns`) and interaction patterns (`figma-navigation`, `figma-overlays`, `figma-bottom-sheets`) and dispatches the matching skill. All are **native-SwiftUI-first**; a project's own navigation/overlay/sheet system is used only when `figmaConfig.ui.{navigationSystem,overlaySystem,sheetSystem}` declares one (absent → stock SwiftUI: `NavigationStack`, `.alert`/`.sheet(item:)`, `.presentationDetents`). Generic across SwiftUI codebases.
14
- - **Evolve an existing component** - `figma-evolve-component` reconciles a shipped component against current Figma (drift-heal) and additively extends it for a new need, behind a mandatory human gate - distinct from a fresh build, `figma-mend` (rebuild), and `figma-fix` (review bug).
14
+ - **Evolve an existing component** - `figma-evolve-component` reconciles a shipped component against current Figma (drift-heal) and additively extends it for a new need, behind a required human gate - distinct from a fresh build, `figma-mend` (rebuild), and `figma-fix` (review bug).
15
15
 
16
16
  ## How it runs
17
17
 
@@ -0,0 +1,143 @@
1
+ # 19. A product tree over the code graph, measured before it is trusted
2
+
3
+ **Status:** Accepted (ships off; M0 verdict NO-GO) · 2026-11-02 · extends [ADR-0010](./0010-own-code-graph.md)
4
+
5
+ ## Context
6
+
7
+ A bug report is written in the words a person saw: a button label, a screen,
8
+ a step in a flow. The code graph (ADR-0010) knows files and symbols, and it
9
+ scored 63% on questions phrased in domain words against near-perfect scores
10
+ on questions that named a type. The gap is the vocabulary between the two.
11
+
12
+ The proposed answer is a screen layer joined over the graph: localized text,
13
+ string key, route, screen, the files a screen owns, the endpoints it calls,
14
+ the tests that name it. The literature on bug localization (BM25F over
15
+ structured fields, query expansion through UI strings, graph-seeded ranking)
16
+ reports gains from exactly these joins, but on other corpora and with other
17
+ baselines. Before the pipeline relies on such a layer, it has to beat the
18
+ graph it sits on, on bugs it has not been tuned on.
19
+
20
+ ## Decision
21
+
22
+ Build the layer deterministically, keep it local, and gate its use on a
23
+ measurement.
24
+
25
+ - `pipeline/scripts/product-tree.mjs build` derives
26
+ `~/.claude/knowledge/<project>/product-tree.json` (0600, never shipped)
27
+ without a model. SwiftUI: views named Screen, Scene or Page, every
28
+ navigation target (links by destination, closure and value,
29
+ `navigationDestination` over a route enum, sheets, covers, stack roots,
30
+ tabs, scenes) and coordinators that host a view, which become flow nodes.
31
+ Compose: `composable`, `dialog`, `bottomSheet` and Navigation 3 `entry`
32
+ registrations, `@Serializable` route types, start destinations, one hop
33
+ through a wrapper composable. Web: Next.js `app/` and `pages/` routes when a
34
+ `package.json` depends on Next, app router API handlers, react-router tables
35
+ and `<Route>` elements. Strings from `.strings`, `.xcstrings`,
36
+ `strings.xml` and i18n JSON; endpoints from Retrofit annotations, route
37
+ handlers and API-shaped literals; tests by the screen names they contain.
38
+ - Programmatic navigation is counted and each call is resolved only when its
39
+ argument is a literal route or a view constructor. The rest are listed with
40
+ file and line. Coverage is reported per stack, never assumed.
41
+ - `locate` ranks files under three arms that share one implementation with the
42
+ evaluation: BM25F over names, symbols and directories; the same plus query
43
+ expansion through matched UI strings, a UI-string ranking, personalized
44
+ PageRank over the import and reference edges, Turkish-aware folding and
45
+ stemming, and identifier splitting; and the screen layer on top.
46
+ - The model only proposes, with evidence that resolves to a line of a
47
+ regular file inside the repository, into an append-only overlay. Proposing
48
+ the same thing again leaves an earlier decision in place. `agree` and
49
+ `reject` are refused in an unattended run and without a terminal. The
50
+ terminal check stops a piped shell but not an agent that allocates a
51
+ pseudo-terminal, so agent-guard is the layer that asks before an agent's
52
+ `agree` or `reject` and refuses a file tool aimed at the overlay. No
53
+ ranking reads the overlay yet: agreed rows are planned to feed `locate` in
54
+ M2.
55
+ - The repository is untrusted input. The build reads only regular files
56
+ inside the root, up to the same 2 MB limit the evaluation uses, never
57
+ through a symlink; every git call turns off the repository's fsmonitor,
58
+ hooks, external diff, pager, signature checks and gpg programs, and reads
59
+ no global or system config. `locate` and `show` print their result inside
60
+ one untrusted-data block. A repository listed in
61
+ `prefs.global.memory.excludeProjects` gets no tree.
62
+ - `prefs.global.productTree.enabled` defaults to `false`. When on, Phase 0
63
+ locates the task and Phase 1 injects the result, cut by `fitToBudget` to
64
+ `productTree.maxChars` (6,000).
65
+
66
+ ## Measurement
67
+
68
+ This measurement is the M0 gate; M1 is the Phase 0/1 wiring; M2 is derived flows and agreed overlay rows read by locate.
69
+
70
+ `product-tree-eval.mjs` mines bug-fix commits from git history, rebuilds the
71
+ graph and the tree at each fix commit's parent from git objects, ranks files
72
+ for the commit subject (conventional prefix and PR number removed) and scores
73
+ them against the production files the fix modified. Every arm is cut to the
74
+ same 6,000-character budget before scoring. Bugs are split by time per
75
+ repository: ranking settings were grid-searched on the older half only, and
76
+ the verdict is read from the newer half. Bugs whose text already names a file,
77
+ symbol or stack frame are reported apart.
78
+
79
+ Corpus: nine repositories, of which eight yielded qualifying fixes, 60 per
80
+ repository (480 bugs): two Node tooling repositories, three web applications
81
+ (two Next.js, one React single-page app), one Compose app, one SwiftUI macOS
82
+ app and one iOS app that mixes SwiftUI with UIKit.
83
+
84
+ Held-out, domain-text bugs (n = 230), recall@10 with a 95% bootstrap interval:
85
+
86
+ | Arm | Acc@1 | Acc@5 | Acc@10 | R@1 | R@5 | R@10 | MRR | Mean chars |
87
+ | ----- | ----- | ----- | ------ | ----- | ----- | --------------------- | ----- | ---------- |
88
+ | bm25 | 29.1% | 50.4% | 57.4% | 19.5% | 38.6% | 45.7% [40.1, 51.1] | 0.393 | 2,552 |
89
+ | graph | 29.1% | 51.3% | 58.3% | 19.5% | 39.5% | 47.1% [41.3, 52.8] | 0.396 | 4,014 |
90
+ | tree | 27.8% | 50.4% | 57.8% | 19.2% | 39.1% | 46.5% [40.9, 52.3] | 0.382 | 4,038 |
91
+
92
+ Tree against graph: hit@10 discordant pairs 3 (graph only) and 2 (tree only),
93
+ exact McNemar p = 1.0; recall@10 difference -0.6 points, interval
94
+ [-1.5, +0.4]. Per repository the tree arm was lower than the graph arm on
95
+ four of eight (between -1.2 and -2.0 points), equal on three and higher on
96
+ one (+1.7, the SwiftUI macOS app). On the development half the tuned tree arm led
97
+ the graph arm by 0.8 points (46.3% against 45.5%, n = 220), which did not
98
+ survive to the held-out half. The ten held-out bugs that name code scored
99
+ 54.5% under bm25 and graph and 42.0% under the tree.
100
+
101
+ Screen-index coverage at each repository's head: Compose 5 of 6 screens
102
+ reachable, 3 of 4 programmatic calls resolved; SwiftUI macOS 16 of 28
103
+ reachable, 0 of 22 programmatic; the mixed iOS app 45 of 92 reachable, 8 of
104
+ 25 enum routes with a screen, 0 of 286 programmatic calls resolved (almost all
105
+ UIKit pushes and presents of view controllers); web apps reach every screen by
106
+ construction, since a web screen is a route target, and resolved 20% to 40% of
107
+ programmatic navigation calls.
108
+
109
+ **Verdict: NO-GO.** The rule was a recall@10 lift of at least 15 points,
110
+ McNemar p below 0.05 and no repository regressing. None of the three held.
111
+
112
+ ## Consequences
113
+
114
+ - The tree ships off. Nothing in a default run builds or reads it.
115
+ - The non-tree signals (UI-string expansion and boost, PageRank) gave 1.4
116
+ points over plain BM25F on held-out bugs, inside the noise. They are not
117
+ moved into graph-query on this evidence.
118
+ - iOS programmatic navigation is the measured weak point: an app that
119
+ navigates through UIKit coordinators has half its screens unreachable and
120
+ no resolved programmatic call. Flows (M2) cannot be derived for such apps
121
+ from regex alone.
122
+ - Commit subjects are short and written by the developer who fixed the bug;
123
+ they are a weaker proxy for a user's report than issue text. A rerun with
124
+ linked issue bodies, and the optional issue-text-only memorization arm
125
+ (`--issue-text-arm`), is the next measurement before any re-decision.
126
+ - 41.7% of held-out bugs had no changed file in the top 10 under the best
127
+ arm. That is a candidate-recall question; it was not measured past k = 10
128
+ here.
129
+ - The per-bug rows and repository names stay in the harness's report under
130
+ `~/.claude/knowledge/_eval/` (0600); this ADR carries only pooled numbers
131
+ and repository kinds.
132
+
133
+ ## Alternatives considered
134
+
135
+ - **A model-written tree.** Generated repository summaries have lowered agent
136
+ success in published measurements, and a node nobody can re-derive is an
137
+ assertion. The model may propose with evidence; it never writes fact.
138
+ - **Embeddings for the screen match.** Not tried: an embedding model arrives
139
+ as a runtime package or a hosted service, and ADR-0004 keeps runtime
140
+ packages out of the published package. This measurement did not test
141
+ whether they would close the candidate-recall gap; see Consequences.
142
+ - **Shipping on by default on the development-half result.** The 0.8-point
143
+ development lead is the kind of result the time split exists to catch.