@mmerterden/multi-agent-pipeline 20.44.0 → 21.1.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 (441) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +33 -35
  3. package/README.tr.md +32 -34
  4. package/SECURITY.md +4 -4
  5. package/docs/architecture.md +6 -6
  6. package/docs/ecosystem.md +35 -30
  7. package/docs/facts.json +13 -10
  8. package/docs/features.md +6 -5
  9. package/index.js +1 -1
  10. package/install/_common.mjs +5 -1
  11. package/install/_mcp-register.mjs +80 -5
  12. package/install/_plugin-skills.mjs +1 -1
  13. package/install/_unattended-profile.mjs +12 -3
  14. package/install/claude.mjs +53 -5
  15. package/install/codex.mjs +2 -2
  16. package/install/index.mjs +49 -9
  17. package/install/templates/claude-hooks.json +13 -2
  18. package/install/templates/codex-instructions.md +1 -1
  19. package/install/templates/copilot-instructions.md +7 -7
  20. package/manifest.json +427 -411
  21. package/package.json +4 -4
  22. package/pipeline/agents/plan-critic.md +1 -1
  23. package/pipeline/agents/security-auditor.md +2 -2
  24. package/pipeline/agents/test-gen-analyst.md +1 -1
  25. package/pipeline/commands/archive-guard.md +6 -6
  26. package/pipeline/commands/multi-agent/SKILL.md +23 -2
  27. package/pipeline/commands/multi-agent/address-review/SKILL.md +183 -0
  28. package/pipeline/commands/multi-agent/analysis/SKILL.md +8 -0
  29. package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +8 -0
  30. package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +10 -6
  31. package/pipeline/commands/multi-agent/bug-bash/SKILL.md +1 -1
  32. package/pipeline/commands/multi-agent/channels/SKILL.md +8 -0
  33. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +8 -0
  34. package/pipeline/commands/multi-agent/create-jira/SKILL.md +8 -0
  35. package/pipeline/commands/multi-agent/design-check/SKILL.md +9 -1
  36. package/pipeline/commands/multi-agent/issue/SKILL.md +8 -0
  37. package/pipeline/commands/multi-agent/jira/SKILL.md +8 -0
  38. package/pipeline/commands/multi-agent/kill/SKILL.md +8 -0
  39. package/pipeline/commands/multi-agent/office-off/SKILL.md +3 -4
  40. package/pipeline/commands/multi-agent/office-on/SKILL.md +2 -6
  41. package/pipeline/commands/multi-agent/office-status/SKILL.md +1 -6
  42. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +2 -2
  43. package/pipeline/commands/multi-agent/purge/SKILL.md +8 -0
  44. package/pipeline/commands/multi-agent/refactor/SKILL.md +16 -8
  45. package/pipeline/commands/multi-agent/research/SKILL.md +1 -1
  46. package/pipeline/commands/multi-agent/resume/SKILL.md +8 -0
  47. package/pipeline/commands/multi-agent/review/SKILL.md +8 -0
  48. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +8 -0
  49. package/pipeline/commands/multi-agent/review-issue/SKILL.md +8 -0
  50. package/pipeline/commands/multi-agent/review-jira/SKILL.md +8 -0
  51. package/pipeline/commands/multi-agent/review-priority/SKILL.md +8 -0
  52. package/pipeline/commands/multi-agent/route-on/SKILL.md +1 -1
  53. package/pipeline/commands/multi-agent/routines/SKILL.md +36 -14
  54. package/pipeline/commands/multi-agent/save/SKILL.md +1 -1
  55. package/pipeline/commands/multi-agent/scaffold/SKILL.md +8 -0
  56. package/pipeline/commands/multi-agent/search/SKILL.md +4 -4
  57. package/pipeline/commands/multi-agent/security-review/SKILL.md +9 -4
  58. package/pipeline/commands/multi-agent/setup/SKILL.md +7 -2
  59. package/pipeline/commands/multi-agent/store-ready/SKILL.md +5 -3
  60. package/pipeline/commands/multi-agent/sync/SKILL.md +20 -12
  61. package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
  62. package/pipeline/commands/multi-agent/test-accessibility/SKILL.md +1 -1
  63. package/pipeline/commands/multi-agent/test-dark-mode/SKILL.md +1 -1
  64. package/pipeline/commands/multi-agent/test-dynamic-type/SKILL.md +1 -1
  65. package/pipeline/commands/multi-agent/test-gen/SKILL.md +1 -1
  66. package/pipeline/commands/multi-agent/test-screenshots/SKILL.md +1 -1
  67. package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +1 -1
  68. package/pipeline/commands/multi-agent/uninstall/SKILL.md +3 -3
  69. package/pipeline/commands/multi-agent/update/SKILL.md +12 -4
  70. package/pipeline/commands/sim-test.md +5 -5
  71. package/pipeline/contract/CHANGELOG.md +49 -0
  72. package/pipeline/contract/README.md +34 -29
  73. package/pipeline/contract/build.mjs +0 -5
  74. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  75. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  76. package/pipeline/contract/manifest.json +62 -122
  77. package/pipeline/contract/types/index.d.ts +97 -49
  78. package/pipeline/lib/credential-inventory.sh +3 -2
  79. package/pipeline/lib/cross-repo.mjs +11 -6
  80. package/pipeline/lib/fetch-crashlytics.sh +5 -2
  81. package/pipeline/lib/mcp-rename.mjs +508 -0
  82. package/pipeline/lib/model-dispatch.sh +1 -1
  83. package/pipeline/lib/office-legacy.mjs +207 -0
  84. package/pipeline/lib/outbound-gate.mjs +8 -2
  85. package/pipeline/lib/route-state.sh +2 -2
  86. package/pipeline/lib/routine-secret-scan.mjs +166 -0
  87. package/pipeline/lib/toolkit-llm.sh +12 -10
  88. package/pipeline/lib/unattended.mjs +1 -1
  89. package/pipeline/lib/unattended.sh +1 -1
  90. package/pipeline/lib/untrusted-fence.mjs +1 -1
  91. package/pipeline/lib/usage-endpoint.mjs +32 -0
  92. package/pipeline/lib/usage-token.mjs +76 -0
  93. package/pipeline/multi-agent-refs/_input-parser.md +22 -0
  94. package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
  95. package/pipeline/multi-agent-refs/android-guide.md +2 -2
  96. package/pipeline/multi-agent-refs/audit-guide.md +1 -1
  97. package/pipeline/multi-agent-refs/complaint-analysis/phases.md +1 -1
  98. package/pipeline/multi-agent-refs/cross-cli-contract.md +20 -18
  99. package/pipeline/multi-agent-refs/design-check/build-launch.md +2 -2
  100. package/pipeline/multi-agent-refs/design-check/compare.md +2 -2
  101. package/pipeline/multi-agent-refs/design-check/drive-capture.md +1 -1
  102. package/pipeline/multi-agent-refs/design-check/export.md +1 -1
  103. package/pipeline/multi-agent-refs/design-check/init-inventory.md +2 -2
  104. package/pipeline/multi-agent-refs/design-check/mcp-currency-gate.md +4 -4
  105. package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +1 -1
  106. package/pipeline/multi-agent-refs/features/approach-choice.md +61 -0
  107. package/pipeline/multi-agent-refs/features/build-facts.md +115 -0
  108. package/pipeline/multi-agent-refs/features/code-graph.md +8 -8
  109. package/pipeline/multi-agent-refs/features/code-intelligence.md +5 -5
  110. package/pipeline/multi-agent-refs/features/design-conformance.md +4 -4
  111. package/pipeline/multi-agent-refs/features/doctor.md +43 -4
  112. package/pipeline/multi-agent-refs/features/exploratory-testing.md +1 -1
  113. package/pipeline/multi-agent-refs/features/external-context-injection.md +1 -1
  114. package/pipeline/multi-agent-refs/features/free-models.md +5 -5
  115. package/pipeline/multi-agent-refs/features/office-threat-model.md +9 -32
  116. package/pipeline/multi-agent-refs/features/plan-attachment.md +55 -0
  117. package/pipeline/multi-agent-refs/features/product-context.md +1 -1
  118. package/pipeline/multi-agent-refs/features/root-cause.md +98 -0
  119. package/pipeline/multi-agent-refs/features/routine-sharing.md +196 -0
  120. package/pipeline/multi-agent-refs/features/security-audit.md +3 -3
  121. package/pipeline/multi-agent-refs/features/test-classification.md +2 -2
  122. package/pipeline/multi-agent-refs/features/unattended-gates.md +1 -1
  123. package/pipeline/multi-agent-refs/features/unattended-security.md +8 -23
  124. package/pipeline/multi-agent-refs/features/usage-reporting.md +172 -4
  125. package/pipeline/multi-agent-refs/features/visual-evidence.md +15 -1
  126. package/pipeline/multi-agent-refs/help/en.md +139 -274
  127. package/pipeline/multi-agent-refs/help/tr.md +141 -274
  128. package/pipeline/multi-agent-refs/keychain.md +2 -2
  129. package/pipeline/multi-agent-refs/knowledge.md +4 -4
  130. package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +3 -3
  131. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -0
  132. package/pipeline/multi-agent-refs/outside-the-pipeline.md +2 -2
  133. package/pipeline/multi-agent-refs/phases/modes.md +17 -0
  134. package/pipeline/multi-agent-refs/phases/phase-0-init.md +21 -2
  135. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +14 -9
  136. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +4 -2
  137. package/pipeline/multi-agent-refs/phases/phase-3-review.md +4 -4
  138. package/pipeline/multi-agent-refs/phases/phase-5-report.md +10 -0
  139. package/pipeline/multi-agent-refs/refactor/sweep.md +4 -4
  140. package/pipeline/multi-agent-refs/refactor/toolkit-research.md +1 -1
  141. package/pipeline/multi-agent-refs/research/engine.md +1 -1
  142. package/pipeline/multi-agent-refs/rules.md +2 -2
  143. package/pipeline/multi-agent-refs/setup/app-store-connect.md +2 -2
  144. package/pipeline/multi-agent-refs/setup/firebase.md +3 -2
  145. package/pipeline/multi-agent-refs/setup/google-play.md +1 -1
  146. package/pipeline/multi-agent-refs/setup/token-save-flow.md +3 -2
  147. package/pipeline/multi-agent-refs/store-ready/gate-1-static.md +12 -2
  148. package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +3 -3
  149. package/pipeline/multi-agent-refs/store-ready/gates.md +2 -1
  150. package/pipeline/multi-agent-refs/store-ready/report.md +10 -1
  151. package/pipeline/multi-agent-refs/swiftui-guide.md +2 -2
  152. package/pipeline/multi-agent-refs/sync/codex.md +1 -1
  153. package/pipeline/multi-agent-refs/sync/dev-toolkit.md +5 -5
  154. package/pipeline/multi-agent-refs/sync/overview.md +2 -2
  155. package/pipeline/multi-agent-refs/sync/stack-plugins.md +2 -2
  156. package/pipeline/multi-agent-refs/tracker-contract.md +1 -1
  157. package/pipeline/multi-agent-refs/unattended-contract.md +1 -2
  158. package/pipeline/multi-agent-refs/web-guide.md +2 -2
  159. package/pipeline/office/index.html +645 -144
  160. package/pipeline/office/toolkit.json +1 -1
  161. package/pipeline/preferences-template.json +6 -6
  162. package/pipeline/rules/debugging.md +10 -7
  163. package/pipeline/rules/figma-pipeline.md +2 -2
  164. package/pipeline/rules/outside-the-pipeline.md +1 -1
  165. package/pipeline/rules/tdd.md +4 -7
  166. package/pipeline/schemas/activity-chat.schema.json +1 -1
  167. package/pipeline/schemas/activity-roles.schema.json +1 -1
  168. package/pipeline/schemas/activity.schema.json +1 -1
  169. package/pipeline/schemas/agent-state.schema.json +127 -2
  170. package/pipeline/schemas/analysis-output.schema.json +1 -1
  171. package/pipeline/schemas/answer-request.schema.json +1 -1
  172. package/pipeline/schemas/answer-result.schema.json +1 -1
  173. package/pipeline/schemas/autopilot-config.schema.json +1 -1
  174. package/pipeline/schemas/autopilot-off-request.schema.json +1 -1
  175. package/pipeline/schemas/autopilot-off.schema.json +1 -1
  176. package/pipeline/schemas/autopilot-on-request.schema.json +1 -1
  177. package/pipeline/schemas/autopilot-on.schema.json +1 -1
  178. package/pipeline/schemas/autopilot-status.schema.json +1 -1
  179. package/pipeline/schemas/bug-bash-verification.schema.json +1 -1
  180. package/pipeline/schemas/code-graph.schema.json +1 -1
  181. package/pipeline/schemas/command-parameters.schema.json +1 -1
  182. package/pipeline/schemas/constitution.schema.json +1 -1
  183. package/pipeline/schemas/contract-error.schema.json +6 -13
  184. package/pipeline/schemas/criteria-manifest.schema.json +1 -1
  185. package/pipeline/schemas/design-check-config.schema.json +1 -1
  186. package/pipeline/schemas/diff-risk.schema.json +1 -1
  187. package/pipeline/schemas/disk-clean-request.schema.json +1 -1
  188. package/pipeline/schemas/disk-clean.schema.json +1 -1
  189. package/pipeline/schemas/doctor-report.schema.json +1 -1
  190. package/pipeline/schemas/explore-run.schema.json +1 -1
  191. package/pipeline/schemas/figma-project-config.schema.json +1 -1
  192. package/pipeline/schemas/gc-request.schema.json +1 -1
  193. package/pipeline/schemas/gc.schema.json +1 -1
  194. package/pipeline/schemas/issue-maturity.schema.json +1 -1
  195. package/pipeline/schemas/issues.schema.json +1 -1
  196. package/pipeline/schemas/job-change.schema.json +1 -1
  197. package/pipeline/schemas/job-request.schema.json +1 -1
  198. package/pipeline/schemas/kill-request.schema.json +1 -1
  199. package/pipeline/schemas/kill.schema.json +1 -1
  200. package/pipeline/schemas/launch-plan.schema.json +1 -1
  201. package/pipeline/schemas/launch-request.schema.json +2 -2
  202. package/pipeline/schemas/launch.schema.json +1 -1
  203. package/pipeline/schemas/learnings-ledger.schema.json +1 -1
  204. package/pipeline/schemas/ledger.schema.json +1 -1
  205. package/pipeline/schemas/office-archive.schema.json +2 -2
  206. package/pipeline/schemas/office-credentials.schema.json +1 -1
  207. package/pipeline/schemas/office-jobs.schema.json +1 -1
  208. package/pipeline/schemas/office-memory.schema.json +1 -1
  209. package/pipeline/schemas/office-server-room.schema.json +1 -1
  210. package/pipeline/schemas/office-settings-request.schema.json +1 -1
  211. package/pipeline/schemas/office-settings.schema.json +1 -1
  212. package/pipeline/schemas/permissions.schema.json +1 -1
  213. package/pipeline/schemas/phases.json +4 -4
  214. package/pipeline/schemas/phases.schema.json +1 -1
  215. package/pipeline/schemas/plan-critique.schema.json +1 -1
  216. package/pipeline/schemas/planning-output.schema.json +1 -1
  217. package/pipeline/schemas/pr-reach.schema.json +1 -1
  218. package/pipeline/schemas/pr-request.schema.json +1 -1
  219. package/pipeline/schemas/prefs.schema.json +53 -19
  220. package/pipeline/schemas/product-tree-overlay.schema.json +1 -1
  221. package/pipeline/schemas/product-tree.schema.json +1 -1
  222. package/pipeline/schemas/prs.schema.json +1 -1
  223. package/pipeline/schemas/prune-logs-request.schema.json +1 -1
  224. package/pipeline/schemas/prune-logs.schema.json +1 -1
  225. package/pipeline/schemas/repo-change.schema.json +1 -1
  226. package/pipeline/schemas/repo-profile.schema.json +1 -1
  227. package/pipeline/schemas/repo-request.schema.json +1 -1
  228. package/pipeline/schemas/repos.schema.json +1 -1
  229. package/pipeline/schemas/research-output.schema.json +1 -1
  230. package/pipeline/schemas/resume-request.schema.json +1 -1
  231. package/pipeline/schemas/review-file-exclusions.schema.json +1 -1
  232. package/pipeline/schemas/review-verdict-request.schema.json +1 -1
  233. package/pipeline/schemas/review-verdict.schema.json +1 -1
  234. package/pipeline/schemas/reviewer-output.schema.json +1 -1
  235. package/pipeline/schemas/route-config.schema.json +2 -2
  236. package/pipeline/schemas/routine-delete.schema.json +1 -1
  237. package/pipeline/schemas/routines.schema.json +1 -1
  238. package/pipeline/schemas/run-evidence.schema.json +1 -1
  239. package/pipeline/schemas/run-log.schema.json +1 -1
  240. package/pipeline/schemas/run-questions.schema.json +1 -1
  241. package/pipeline/schemas/run-results.schema.json +1 -1
  242. package/pipeline/schemas/runs-index.schema.json +1 -1
  243. package/pipeline/schemas/scaffold-manifest.schema.json +1 -1
  244. package/pipeline/schemas/scope-check.schema.json +1 -1
  245. package/pipeline/schemas/secret-patterns.schema.json +1 -1
  246. package/pipeline/schemas/security-finding.schema.json +1 -1
  247. package/pipeline/schemas/service-read.schema.json +1 -1
  248. package/pipeline/schemas/shared-routine-import-request.schema.json +43 -0
  249. package/pipeline/schemas/shared-routine-import.schema.json +118 -0
  250. package/pipeline/schemas/shared-routine.schema.json +79 -0
  251. package/pipeline/schemas/shared-routines.schema.json +83 -0
  252. package/pipeline/schemas/skill-catalog.schema.json +1 -1
  253. package/pipeline/schemas/stack-adapters.schema.json +1 -1
  254. package/pipeline/schemas/stack-change.schema.json +1 -1
  255. package/pipeline/schemas/stack-request.schema.json +1 -1
  256. package/pipeline/schemas/stack.schema.json +1 -1
  257. package/pipeline/schemas/steer-request.schema.json +1 -1
  258. package/pipeline/schemas/steer.schema.json +1 -1
  259. package/pipeline/schemas/system-status.schema.json +2 -2
  260. package/pipeline/schemas/test-gap.schema.json +1 -1
  261. package/pipeline/schemas/test-gen-discovery.schema.json +1 -1
  262. package/pipeline/schemas/test-gen-gaps.schema.json +1 -1
  263. package/pipeline/schemas/test-gen-inventory.schema.json +1 -1
  264. package/pipeline/schemas/test-gen-results.schema.json +1 -1
  265. package/pipeline/schemas/token-budget.json +4 -4
  266. package/pipeline/schemas/token-budget.schema.json +1 -1
  267. package/pipeline/schemas/tool-call-request.schema.json +1 -1
  268. package/pipeline/schemas/tool-call.schema.json +1 -1
  269. package/pipeline/schemas/toolkit-path-params.json +112 -2
  270. package/pipeline/schemas/toolkit-path-params.schema.json +2 -2
  271. package/pipeline/schemas/tools.schema.json +2 -2
  272. package/pipeline/schemas/triage-corpus.schema.json +1 -1
  273. package/pipeline/schemas/triage-output.schema.json +1 -1
  274. package/pipeline/schemas/unattended-policy.json +8 -4
  275. package/pipeline/schemas/unattended-policy.schema.json +1 -1
  276. package/pipeline/schemas/unattended-profile.json +8 -6
  277. package/pipeline/schemas/unattended-profile.schema.json +1 -1
  278. package/pipeline/schemas/worktrees.schema.json +1 -1
  279. package/pipeline/scripts/_contract-core.mjs +1 -1
  280. package/pipeline/scripts/_contract-routes-ops.mjs +14 -1
  281. package/pipeline/scripts/_contract-routes-routines.mjs +327 -0
  282. package/pipeline/scripts/_contract-routes-runs.mjs +4 -47
  283. package/pipeline/scripts/_guard-probe.mjs +1 -1
  284. package/pipeline/scripts/_renamed-skills.mjs +20 -8
  285. package/pipeline/scripts/_sibling-root.mjs +1 -1
  286. package/pipeline/scripts/_stack-routing.mjs +3 -0
  287. package/pipeline/scripts/_user_guard_rules.py +22 -7
  288. package/pipeline/scripts/approach-choice.mjs +232 -0
  289. package/pipeline/scripts/autopilot-control.mjs +14 -2
  290. package/pipeline/scripts/autopilot-loop.mjs +16 -1
  291. package/pipeline/scripts/autopilot-runner.mjs +37 -12
  292. package/pipeline/scripts/bulk-read.sh +1 -1
  293. package/pipeline/scripts/contract-server.mjs +68 -147
  294. package/pipeline/scripts/cost-table.json +2 -2
  295. package/pipeline/scripts/doctor.mjs +171 -10
  296. package/pipeline/scripts/feedback-send.mjs +2 -36
  297. package/pipeline/scripts/gate-ledger.mjs +30 -1
  298. package/pipeline/scripts/gen-facts.mjs +21 -1
  299. package/pipeline/scripts/gen-free-hosts.mjs +2 -2
  300. package/pipeline/scripts/gen-mode-dispatch.mjs +11 -7
  301. package/pipeline/scripts/graph-hint.mjs +1 -1
  302. package/pipeline/scripts/health-report.mjs +4 -3
  303. package/pipeline/scripts/job-launch.mjs +1 -1
  304. package/pipeline/scripts/launch-request.mjs +12 -25
  305. package/pipeline/scripts/migrate-prefs.mjs +21 -1
  306. package/pipeline/scripts/office-archive.mjs +1 -2
  307. package/pipeline/scripts/office-control.mjs +17 -92
  308. package/pipeline/scripts/office-server-room.mjs +1 -1
  309. package/pipeline/scripts/phase0-exit-gate.mjs +1 -1
  310. package/pipeline/scripts/plan-attachment.mjs +1082 -0
  311. package/pipeline/scripts/pr-threads.mjs +537 -0
  312. package/pipeline/scripts/pr-write-guard.mjs +139 -0
  313. package/pipeline/scripts/pr-write-guard.sh +34 -0
  314. package/pipeline/scripts/pre-commit-check.sh +4 -0
  315. package/pipeline/scripts/pre-push-check.sh +1 -1
  316. package/pipeline/scripts/probe-evidence-capability.sh +1 -1
  317. package/pipeline/scripts/repo-recommend.mjs +2 -2
  318. package/pipeline/scripts/root-cause-gate.mjs +354 -0
  319. package/pipeline/scripts/routine-registry.mjs +537 -53
  320. package/pipeline/scripts/routine-share.mjs +442 -0
  321. package/pipeline/scripts/runs-index.mjs +1 -1
  322. package/pipeline/scripts/system-status.mjs +8 -2
  323. package/pipeline/scripts/test-classify.mjs +1 -1
  324. package/pipeline/scripts/toolkit-tools.mjs +4 -3
  325. package/pipeline/scripts/unattended_policy.py +18 -5
  326. package/pipeline/scripts/uninstall.mjs +71 -28
  327. package/pipeline/scripts/usage-access.mjs +384 -0
  328. package/pipeline/scripts/usage-identity.mjs +81 -14
  329. package/pipeline/scripts/usage-register.mjs +389 -72
  330. package/pipeline/scripts/usage-report.mjs +124 -11
  331. package/pipeline/scripts/work-items.mjs +1 -1
  332. package/pipeline/scripts/write-store-config.mjs +3 -3
  333. package/pipeline/skills/.skill-manifest.json +79 -71
  334. package/pipeline/skills/.skills-index.json +52 -30
  335. package/pipeline/skills/renamed.json +2 -1
  336. package/pipeline/skills/shared/README.md +14 -12
  337. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +14 -14
  338. package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +1 -1
  339. package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +3 -3
  340. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
  341. package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +1 -1
  342. package/pipeline/skills/shared/core/multi-agent/SKILL.md +14 -4
  343. package/pipeline/skills/shared/core/multi-agent-address-review/SKILL.md +44 -0
  344. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +8 -0
  345. package/pipeline/skills/shared/core/multi-agent-analysis-jira/SKILL.md +8 -0
  346. package/pipeline/skills/shared/core/multi-agent-autopilot-off/SKILL.md +6 -3
  347. package/pipeline/skills/shared/core/multi-agent-bug-bash/SKILL.md +1 -1
  348. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +8 -0
  349. package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +9 -1
  350. package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +8 -0
  351. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +13 -5
  352. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +6 -6
  353. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
  354. package/pipeline/skills/shared/core/multi-agent-issue/SKILL.md +8 -0
  355. package/pipeline/skills/shared/core/multi-agent-jira/SKILL.md +8 -0
  356. package/pipeline/skills/shared/core/multi-agent-kill/SKILL.md +8 -0
  357. package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +2 -2
  358. package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +1 -1
  359. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +2 -4
  360. package/pipeline/skills/shared/core/multi-agent-purge/SKILL.md +8 -0
  361. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +16 -8
  362. package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +2 -2
  363. package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +8 -0
  364. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +8 -0
  365. package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +8 -0
  366. package/pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md +8 -0
  367. package/pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md +8 -0
  368. package/pipeline/skills/shared/core/multi-agent-review-priority/SKILL.md +8 -0
  369. package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +1 -1
  370. package/pipeline/skills/shared/core/multi-agent-routines/SKILL.md +17 -6
  371. package/pipeline/skills/shared/core/multi-agent-save/SKILL.md +3 -3
  372. package/pipeline/skills/shared/core/multi-agent-scaffold/SKILL.md +8 -0
  373. package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +3 -3
  374. package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +6 -5
  375. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +7 -2
  376. package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +20 -8
  377. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +18 -10
  378. package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +5 -3
  379. package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +5 -3
  380. package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +5 -3
  381. package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +5 -3
  382. package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +2 -2
  383. package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +5 -3
  384. package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +7 -4
  385. package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +70 -17
  386. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +2 -2
  387. package/pipeline/skills/shared/external/app-store-review/SKILL.md +1 -1
  388. package/pipeline/skills/shared/external/e2e-testing/SKILL.md +23 -23
  389. package/pipeline/skills/shared/external/e2e-testing/evals/evals.json +1 -1
  390. package/pipeline/skills/shared/external/e2e-testing/references/document-fixtures.md +6 -6
  391. package/pipeline/skills/shared/external/free-llm-apis/SKILL.md +2 -2
  392. package/pipeline/skills/shared/external/handle-request/SKILL.md +1 -1
  393. package/pipeline/skills/shared/external/hig-app-icons/SKILL.md +2 -2
  394. package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +1 -1
  395. package/pipeline/skills/shared/external/humanizer/SKILL.md +48 -6
  396. package/pipeline/skills/shared/external/humanizer/evals/evals.json +13 -0
  397. package/pipeline/skills/shared/external/humanizer/references/turkish.md +88 -0
  398. package/pipeline/skills/shared/external/ios-design-review/SKILL.md +12 -12
  399. package/pipeline/skills/shared/external/ios-design-review/evals/evals.json +1 -1
  400. package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +17 -17
  401. package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +1 -1
  402. package/pipeline/skills/shared/external/ios-simulator-debugging/SKILL.md +5 -5
  403. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +4 -4
  404. package/pipeline/skills/shared/external/release-video/SKILL.md +10 -10
  405. package/pipeline/skills/shared/external/release-video/evals/evals.json +8 -8
  406. package/pipeline/skills/shared/external/reverse-engineer-own-app/SKILL.md +231 -0
  407. package/pipeline/skills/shared/external/reverse-engineer-own-app/evals/evals.json +43 -0
  408. package/pipeline/skills/shared/external/security-review/SKILL.md +2 -2
  409. package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +1 -1
  410. package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +1 -1
  411. package/pipeline/skills/shared/external/short-video-craft/SKILL.md +20 -20
  412. package/pipeline/skills/shared/external/short-video-craft/evals/evals.json +3 -3
  413. package/pipeline/skills/shared/external/short-video-craft/references/generated-defaults.md +2 -2
  414. package/pipeline/skills/shared/external/signal-community/SKILL.md +6 -6
  415. package/pipeline/skills/shared/external/store-screenshots/SKILL.md +252 -0
  416. package/pipeline/skills/shared/external/store-screenshots/evals/evals.json +47 -0
  417. package/pipeline/skills/shared/external/test-result-triage/SKILL.md +4 -4
  418. package/pipeline/skills/shared/external/thesis-writing/SKILL.md +140 -0
  419. package/pipeline/skills/shared/external/thesis-writing/evals/evals.json +40 -0
  420. package/pipeline/skills/shared/external/thesis-writing/references/review-checklist.md +33 -0
  421. package/pipeline/skills/shared/external/thesis-writing/references/turkish-thesis-conventions.md +65 -0
  422. package/pipeline/skills/shared/external/web-testing/SKILL.md +3 -3
  423. package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +13 -13
  424. package/pipeline/skills/skills-index.md +10 -8
  425. package/pipeline/commands/multi-agent/autopilot/SKILL.md +0 -123
  426. package/pipeline/commands/multi-agent/office-pair/SKILL.md +0 -89
  427. package/pipeline/contract/fixtures/error-unsigned.json +0 -5
  428. package/pipeline/lib/office-remote.mjs +0 -228
  429. package/pipeline/lib/qr-code.mjs +0 -386
  430. package/pipeline/lib/web-push.mjs +0 -198
  431. package/pipeline/multi-agent-refs/features/office-remote-protocol.md +0 -319
  432. package/pipeline/multi-agent-refs/features/phone-api.md +0 -306
  433. package/pipeline/schemas/phone-devices.schema.json +0 -61
  434. package/pipeline/schemas/phone-signed-request.schema.json +0 -67
  435. package/pipeline/scripts/_phone-auth.mjs +0 -485
  436. package/pipeline/scripts/office-pair.mjs +0 -459
  437. package/pipeline/scripts/office-push.mjs +0 -613
  438. package/pipeline/scripts/office-remote-client.mjs +0 -490
  439. package/pipeline/scripts/phone-devices.mjs +0 -248
  440. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +0 -62
  441. package/pipeline/skills/shared/core/multi-agent-office-pair/SKILL.md +0 -19
@@ -0,0 +1,327 @@
1
+ /**
2
+ * @file _contract-routes-routines.mjs - contract-server routes for routines
3
+ * other site members shared: the list, one routine with its body, and the
4
+ * two-step import.
5
+ *
6
+ * Every route runs routine-share.mjs as a child process, the same client the
7
+ * terminal commands use, so the usage token is resolved and sent there and
8
+ * never passes through this server. Import installs only the payload the
9
+ * preview showed: the preview carries the description, descriptionTr and
10
+ * argument hint exactly as they become frontmatter (unscrubbed, rendered as
11
+ * text) with the body, its sha256 and the payload digest over all of them;
12
+ * the confirmation carries that sha256 and digest, and routine-share.mjs
13
+ * fetches the routine again and refuses it when either no longer matches.
14
+ * Nothing here runs a routine. An unattended server refuses the import,
15
+ * preview included, since nobody is there to read it.
16
+ *
17
+ * @module pipeline/scripts/_contract-routes-routines
18
+ */
19
+
20
+ import { homedir } from "node:os";
21
+ import { dirname, join } from "node:path";
22
+ import { fileURLToPath } from "node:url";
23
+ import { isUnattended } from "../lib/unattended.mjs";
24
+ import { scrub } from "./_redact.mjs";
25
+ import { spawnAsync } from "./_spawn-async.mjs";
26
+ import { CONTRACT_VERSION as ACTIVITY_VERSION } from "./activity-snapshot.mjs";
27
+ import {
28
+ isValidLocalName,
29
+ listRoutines,
30
+ localNameTaken,
31
+ payloadDigest,
32
+ } from "./routine-registry.mjs";
33
+ import {
34
+ HttpError,
35
+ isToken,
36
+ mintConfirm,
37
+ oneAtATime,
38
+ redeemConfirm,
39
+ requireBody,
40
+ } from "./_contract-core.mjs";
41
+
42
+ const SHARE = join(dirname(fileURLToPath(import.meta.url)), "routine-share.mjs");
43
+ const SHARED_ID = /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/;
44
+ const SHA256 = /^[0-9a-f]{64}$/;
45
+ const REASONS = new Set([
46
+ "no-usage-token",
47
+ "endpoint-not-allowed",
48
+ "unreachable",
49
+ "redirect-refused",
50
+ ]);
51
+
52
+ /** One routine-share.mjs subcommand; its JSON document, ok or a refusal. */
53
+ async function share(args) {
54
+ const r = await spawnAsync(process.execPath, [SHARE, ...args, "--home", homedir()], {
55
+ timeoutMs: 30_000,
56
+ maxBytes: 4 * 1024 * 1024,
57
+ });
58
+ let doc;
59
+ try {
60
+ doc = JSON.parse(r.stdout);
61
+ } catch {
62
+ doc = null;
63
+ }
64
+ if (!doc || typeof doc !== "object" || typeof doc.ok !== "boolean")
65
+ throw new HttpError(502, "upstream-failed", "routine sharing did not finish");
66
+ return doc;
67
+ }
68
+
69
+ /** Why sharing could not answer, as one of a fixed set a page can switch on. */
70
+ function reasonOf(doc) {
71
+ if (REASONS.has(doc.error)) return doc.error;
72
+ if (doc.status === 401 || doc.status === 403) return "unauthorized";
73
+ return "upstream-error";
74
+ }
75
+
76
+ const isNotFound = (doc) =>
77
+ doc.error === "not-found" || doc.error === "invalid-id" || doc.status === 404;
78
+
79
+ function refusal(doc) {
80
+ if (isNotFound(doc)) return new HttpError(404, "not-found", "no such shared routine");
81
+ if (doc.error === "sha-mismatch")
82
+ return new HttpError(502, "upstream-failed", "the shared body does not match its sha256");
83
+ return new HttpError(502, "upstream-failed", `routine sharing refused: ${reasonOf(doc)}`);
84
+ }
85
+
86
+ const text = (v, max) => (typeof v === "string" ? scrub(v).slice(0, max) : "");
87
+ const textOrNull = (v, max) => (typeof v === "string" && v ? scrub(v).slice(0, max) : null);
88
+ const version = (v) => (Number.isInteger(v) && v >= 1 ? v : 1);
89
+
90
+ function summary(r, importedAs) {
91
+ return {
92
+ id: r.id,
93
+ name: String(r.name ?? ""),
94
+ owner: String(r.owner ?? ""),
95
+ version: version(r.version),
96
+ description: text(r.description, 300),
97
+ descriptionTr: textOrNull(r.descriptionTr, 300),
98
+ sha256: SHA256.test(r.sha256) ? r.sha256 : null,
99
+ updatedAt: typeof r.updatedAt === "string" && r.updatedAt ? r.updatedAt : null,
100
+ mine: r.mine === true,
101
+ importedAs,
102
+ };
103
+ }
104
+
105
+ /** GET /v1/routines/shared: what the site shows this machine, without bodies. */
106
+ async function sharedList() {
107
+ const doc = await share(["browse"]);
108
+ if (!doc.ok) {
109
+ return {
110
+ contractVersion: ACTIVITY_VERSION,
111
+ available: false,
112
+ reason: reasonOf(doc),
113
+ routines: [],
114
+ };
115
+ }
116
+ const local = new Map(
117
+ listRoutines(homedir())
118
+ .filter((r) => typeof r?.sharedId === "string")
119
+ .map((r) => [r.sharedId, String(r.name)]),
120
+ );
121
+ const routines = (Array.isArray(doc.routines) ? doc.routines : [])
122
+ .filter((r) => r && typeof r === "object" && SHARED_ID.test(r.id ?? ""))
123
+ .map((r) => summary(r, local.get(r.id) ?? null));
124
+ return { contractVersion: ACTIVITY_VERSION, available: true, routines };
125
+ }
126
+
127
+ function requireId(id) {
128
+ if (!SHARED_ID.test(id)) throw new HttpError(404, "not-found", "no such shared routine");
129
+ return id;
130
+ }
131
+
132
+ const rawOrNull = (v) => (typeof v === "string" && v ? v : null);
133
+
134
+ /**
135
+ * The routine with its body, after routine-share.mjs checked the body's
136
+ * sha256, and the import checks it fails ({code, field}, from payloadIssues).
137
+ * The description, descriptionTr and argument hint are the values import
138
+ * would write, unscrubbed, so what the page shows is what the digest covers.
139
+ */
140
+ async function fetchRoutine(id) {
141
+ const doc = await share(["fetch", "--id", requireId(id)]);
142
+ if (!doc.ok) throw refusal(doc);
143
+ const r = doc.routine ?? {};
144
+ if (typeof r.body !== "string" || !SHA256.test(r.sha256 ?? ""))
145
+ throw new HttpError(502, "upstream-failed", "the shared routine came back incomplete");
146
+ const fields = {
147
+ name: String(r.name ?? ""),
148
+ description: typeof r.description === "string" ? r.description : "",
149
+ descriptionTr: rawOrNull(r.descriptionTr),
150
+ argumentHint: rawOrNull(r.argumentHint),
151
+ body: r.body,
152
+ };
153
+ const digest = payloadDigest(fields);
154
+ if (doc.digest !== digest)
155
+ throw new HttpError(502, "upstream-failed", "the shared routine came back inconsistent");
156
+ const routine = {
157
+ ...summary({ ...r, id }, null),
158
+ ...fields,
159
+ sha256: r.sha256,
160
+ digest,
161
+ };
162
+ return { routine, issues: Array.isArray(doc.issues) ? doc.issues : [] };
163
+ }
164
+
165
+ const withoutImport = ({ importedAs: _i, mine: _m, ...rest }) => rest;
166
+
167
+ /** GET /v1/routines/shared/{id}: the body exactly as import would install it. */
168
+ async function sharedOne({ params }) {
169
+ const { routine } = await fetchRoutine(params.id);
170
+ return {
171
+ contractVersion: ACTIVITY_VERSION,
172
+ routine: withoutImport(routine),
173
+ localNameTaken: isValidLocalName(routine.name) && localNameTaken(homedir(), routine.name),
174
+ };
175
+ }
176
+
177
+ const refusedUnattended = () =>
178
+ new HttpError(
179
+ 409,
180
+ "unattended-refused",
181
+ "an unattended server imports nothing; nobody can confirm",
182
+ );
183
+
184
+ function nameTaken(name) {
185
+ return new HttpError(
186
+ 409,
187
+ "name-taken",
188
+ `a routine or command named ${name} already exists; preview again with another name in as`,
189
+ );
190
+ }
191
+
192
+ async function importPreview(id, body) {
193
+ if (body.sha256 !== undefined || body.digest !== undefined)
194
+ throw new HttpError(
195
+ 400,
196
+ "invalid-body",
197
+ "sha256 and digest belong to the confirmation, not the preview",
198
+ );
199
+ const { routine, issues } = await fetchRoutine(id);
200
+ if (issues.length) {
201
+ const fields = [...new Set(issues.map((i) => text(String(i?.field ?? "payload"), 40)))];
202
+ throw new HttpError(
203
+ 502,
204
+ "upstream-failed",
205
+ `the shared routine fails the import checks: ${fields.join(", ")}`,
206
+ );
207
+ }
208
+ const targetName = body.as ?? routine.name;
209
+ if (!isValidLocalName(targetName))
210
+ throw new HttpError(400, "invalid-body", "that is not a valid local name; send another in as");
211
+ if (localNameTaken(homedir(), targetName)) throw nameTaken(targetName);
212
+ return {
213
+ contractVersion: ACTIVITY_VERSION,
214
+ preview: { ...withoutImport(routine), targetName },
215
+ ...mintConfirm("routine-import", id, {
216
+ sha256: routine.sha256,
217
+ digest: routine.digest,
218
+ as: targetName,
219
+ }),
220
+ };
221
+ }
222
+
223
+ async function importConfirm(id, body) {
224
+ if (body.as !== undefined)
225
+ throw new HttpError(400, "invalid-body", "as belongs to the preview, not the confirmation");
226
+ if (body.sha256 === undefined || body.digest === undefined)
227
+ throw new HttpError(
228
+ 400,
229
+ "invalid-body",
230
+ "the confirmation carries the sha256 and the digest it previewed",
231
+ );
232
+ const previewed = redeemConfirm(body.confirmToken, "routine-import", id);
233
+ if (body.sha256 !== previewed.sha256 || body.digest !== previewed.digest)
234
+ throw new HttpError(
235
+ 409,
236
+ "confirm-mismatch",
237
+ "that is not the sha256 and digest the preview showed",
238
+ );
239
+ const doc = await share([
240
+ "import",
241
+ "--id",
242
+ id,
243
+ "--digest",
244
+ previewed.digest,
245
+ "--sha",
246
+ previewed.sha256,
247
+ "--as",
248
+ previewed.as,
249
+ ]);
250
+ if (!doc.ok) {
251
+ if (doc.error === "collision") throw nameTaken(previewed.as);
252
+ if (doc.error === "changed-since-shown")
253
+ throw new HttpError(
254
+ 409,
255
+ "state-moved",
256
+ "the shared routine changed since the preview (body, description or argument hint); nothing was installed",
257
+ );
258
+ if (doc.error === "invalid")
259
+ throw new HttpError(
260
+ 409,
261
+ "state-moved",
262
+ `the import checks no longer pass; nothing was installed: ${text(doc.detail, 200)}`,
263
+ );
264
+ throw refusal(doc);
265
+ }
266
+ const e = doc.imported ?? {};
267
+ return {
268
+ contractVersion: ACTIVITY_VERSION,
269
+ imported: {
270
+ name: String(e.name ?? previewed.as),
271
+ description: text(e.description, 300),
272
+ source: textOrNull(e.source, 200),
273
+ sha256: previewed.sha256,
274
+ digest: previewed.digest,
275
+ sharedId: id,
276
+ },
277
+ };
278
+ }
279
+
280
+ /**
281
+ * POST /v1/routines/shared/{id}/import. {} or {as} previews: the full body,
282
+ * its sha256, the fields that become frontmatter, the payload digest and the
283
+ * local name it would get, and a token bound to the routine, that sha256,
284
+ * that digest and that name. {confirmToken, sha256, digest} installs it.
285
+ */
286
+ async function sharedImport({ params, body }) {
287
+ requireBody(
288
+ body,
289
+ {
290
+ confirmToken: isToken,
291
+ as: isValidLocalName,
292
+ sha256: (v) => typeof v === "string" && SHA256.test(v),
293
+ digest: (v) => typeof v === "string" && SHA256.test(v),
294
+ },
295
+ "shared-routine-import-request.schema.json",
296
+ );
297
+ if (isUnattended(process.env)) throw refusedUnattended();
298
+ const id = requireId(params.id);
299
+ return body.confirmToken === undefined ? importPreview(id, body) : importConfirm(id, body);
300
+ }
301
+
302
+ /** The shared-routine route entries; contract-server.mjs orders them in its table. */
303
+ export const routineRoutes = {
304
+ sharedList: {
305
+ method: "GET",
306
+ path: "/v1/routines/shared",
307
+ query: [],
308
+ remote: "local-only",
309
+ handle: sharedList,
310
+ },
311
+ sharedOne: {
312
+ method: "GET",
313
+ path: "/v1/routines/shared/{id}",
314
+ query: [],
315
+ remote: "local-only",
316
+ handle: sharedOne,
317
+ },
318
+ sharedImport: {
319
+ method: "POST",
320
+ path: "/v1/routines/shared/{id}/import",
321
+ query: [],
322
+ body: true,
323
+ remote: "local-only",
324
+ risk: "high",
325
+ handle: oneAtATime("routine-import", sharedImport),
326
+ },
327
+ };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @file _contract-routes-runs.mjs - contract-server routes over one run:
3
3
  * list and read runs, launch, answer, log, resume, steer, kill, results and
4
- * evidence, and their phone twins.
4
+ * evidence.
5
5
  *
6
6
  * @module pipeline/scripts/_contract-routes-runs
7
7
  */
@@ -80,11 +80,10 @@ const ANSWER_REFUSAL = {
80
80
  };
81
81
 
82
82
  /**
83
- * POST /v1/launch and /v1/phone/launch. `channel` decides what the input may
84
- * be (launch-request.mjs inputErrors): the phone takes structured references
85
- * only. Either way the repo must be a configured or registered one.
83
+ * POST /v1/launch. The input follows launch-request.mjs inputErrors, and the
84
+ * repo must be a configured or registered one.
86
85
  */
87
- function launchRun({ q, body, redact, channel = "desktop" }) {
86
+ function launchRun({ q, body, redact }) {
88
87
  let repoPath = one(q, "repo");
89
88
  if (!repoPath) throw new HttpError(400, "invalid-query", "repo is required");
90
89
  // A name from GET /v1/repos is accepted too: a browser reads that list
@@ -110,7 +109,6 @@ function launchRun({ q, body, redact, channel = "desktop" }) {
110
109
  repoPath,
111
110
  sessionId,
112
111
  workingTree: workingTreeState(repoPath),
113
- channel,
114
112
  };
115
113
  const dry = planLaunch(args);
116
114
  if (dry.code !== 0) {
@@ -424,45 +422,4 @@ export const runRoutes = {
424
422
  query: [],
425
423
  handle: evidenceRoute,
426
424
  },
427
- phoneList: {
428
- method: "GET",
429
- path: "/v1/phone/runs",
430
- remote: "read",
431
- query: ["group"],
432
- scope: "read",
433
- handle: listRuns,
434
- },
435
- phoneOne: {
436
- method: "GET",
437
- path: "/v1/phone/runs/{id}",
438
- remote: "read",
439
- query: [],
440
- scope: "read",
441
- handle: oneRun,
442
- },
443
- phoneAnswer: {
444
- method: "POST",
445
- path: "/v1/phone/runs/{id}/answer",
446
- remote: "answer",
447
- query: [],
448
- body: true,
449
- scope: "answer",
450
- risk: "low",
451
- handle: answerRun,
452
- },
453
- phoneLaunch: {
454
- method: "POST",
455
- path: "/v1/phone/launch",
456
- remote: "launch",
457
- query: ["repo"],
458
- body: true,
459
- scope: "launch",
460
- risk: "high",
461
- handle: (ctx) => {
462
- if (!ctx.registry.launchEnabled) {
463
- throw new HttpError(403, "launch-disabled", "launch from a phone is not enabled here");
464
- }
465
- return launchRun({ ...ctx, channel: "phone" });
466
- },
467
- },
468
425
  };
@@ -88,7 +88,7 @@ const TOOL_FOR = [
88
88
  [/^Glob$/, "Glob"],
89
89
  [/^Agent$/, "Agent"],
90
90
  [/^Task$/, "Task"],
91
- [/multi-agent-toolkit/, "mcp__multi-agent-toolkit__web_goto"],
91
+ [/^mcp__multi-agent__/, "mcp__multi-agent__web_goto"],
92
92
  [/[Ff]igma/, "mcp__figma__get_design_context"],
93
93
  ];
94
94
 
@@ -25,16 +25,22 @@ const ALIAS_MARKER = "renamed-to:";
25
25
 
26
26
  /**
27
27
  * Read the rename map of a pipeline checkout. A missing file is an empty map.
28
+ * `skills` holds the renames that still ship an alias; `retired` holds renames
29
+ * whose alias is gone, which upstream-overlap-gate.mjs keeps reading because
30
+ * an upstream checkout still names the skill by its old name.
28
31
  * @param {string} pipelineRoot - repo root (the directory holding pipeline/)
29
- * @returns {{removeIn: string, skills: Record<string, string>}}
32
+ * @returns {{removeIn: string, skills: Record<string, string>, retired: Record<string, string>}}
30
33
  */
31
34
  export function loadRenamed(pipelineRoot) {
32
35
  const path = join(pipelineRoot, RENAMED_FILE);
33
- if (!existsSync(path)) return { removeIn: "", skills: {} };
36
+ if (!existsSync(path)) return { removeIn: "", skills: {}, retired: {} };
34
37
  const raw = JSON.parse(readFileSync(path, "utf8"));
35
- const skills =
36
- raw && typeof raw.skills === "object" && !Array.isArray(raw.skills) ? raw.skills : {};
37
- return { removeIn: typeof raw?.removeIn === "string" ? raw.removeIn : "", skills };
38
+ const map = (v) => (v && typeof v === "object" && !Array.isArray(v) ? v : {});
39
+ return {
40
+ removeIn: typeof raw?.removeIn === "string" ? raw.removeIn : "",
41
+ skills: map(raw?.skills),
42
+ retired: map(raw?.retired),
43
+ };
38
44
  }
39
45
 
40
46
  /**
@@ -46,10 +52,16 @@ export function loadRenamed(pipelineRoot) {
46
52
  */
47
53
  export function renamedProblems(renamed, existing, external) {
48
54
  const problems = [];
49
- const entries = Object.entries(renamed.skills);
50
- if (entries.length > 0 && !SEMVER_RE.test(renamed.removeIn)) {
55
+ if (Object.keys(renamed.skills).length > 0 && !SEMVER_RE.test(renamed.removeIn)) {
51
56
  problems.push(`removeIn "${renamed.removeIn}" is not a x.y.z version`);
52
57
  }
58
+ const retired = renamed.retired ?? {};
59
+ for (const oldName of Object.keys(retired)) {
60
+ if (Object.hasOwn(renamed.skills, oldName)) {
61
+ problems.push(`${oldName}: listed in both skills and retired`);
62
+ }
63
+ }
64
+ const entries = [...Object.entries(retired), ...Object.entries(renamed.skills)];
53
65
  for (const [oldName, newName] of entries) {
54
66
  if (!NAME_RE.test(oldName)) problems.push(`old name "${oldName}" is not kebab-case`);
55
67
  if (typeof newName !== "string" || !NAME_RE.test(newName)) {
@@ -65,7 +77,7 @@ export function renamedProblems(renamed, existing, external) {
65
77
  `${oldName}: target ${newName} is not a skill in pipeline/skills/shared/external`,
66
78
  );
67
79
  }
68
- if (Object.hasOwn(renamed.skills, newName)) {
80
+ if (Object.hasOwn(renamed.skills, newName) || Object.hasOwn(retired, newName)) {
69
81
  problems.push(`${oldName}: target ${newName} is itself renamed; point at the final name`);
70
82
  }
71
83
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file _sibling-root.mjs - the directory that holds this repo's sibling
3
- * checkouts (multi-agent-toolkit-mcp, multi-agent-plugins).
3
+ * checkouts (multi-agent-mcp, multi-agent-plugins).
4
4
  *
5
5
  * Siblings sit beside the MAIN checkout. A linked worktree lives inside it, at
6
6
  * `<main>/.worktrees/<name>`, so `<root>/..` from there is `.worktrees/` and no
@@ -40,6 +40,9 @@ export const COMMON_SKILLS = [
40
40
  "disk-cleaner",
41
41
  "release-video",
42
42
  "short-video-craft",
43
+ "reverse-engineer-own-app",
44
+ "thesis-writing",
45
+ "store-screenshots",
43
46
  ];
44
47
 
45
48
  // The analyst plugin is the second always-enabled toolkit. It carries outside
@@ -7,7 +7,7 @@ A rule names a tool, a regular expression and an action:
7
7
 
8
8
  tool Bash, Edit (also NotebookEdit, and MultiEdit on a host that has it
9
9
  and runs the guard on it), Write, Read, or a glob over a toolkit
10
- tool name (mcp__multi-agent-toolkit__web_*)
10
+ tool name (mcp__multi-agent__web_*)
11
11
  match searched (re.search) in the command for Bash, the target path for
12
12
  the file tools (as given, made absolute, and real-pathed), and the
13
13
  tool input as compact sorted JSON for a toolkit tool; a step of
@@ -88,8 +88,19 @@ ACTIONS = ("warn", "ask", "block")
88
88
  SEVERITY = {"warn": 1, "ask": 2, "block": 3}
89
89
  KEYS = {"id", "tool", "match", "action", "reason"}
90
90
  ID_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$")
91
- TOOLKIT_PREFIX = "mcp__multi-agent-toolkit__"
92
- TOOL_RE = re.compile(r"^(?:Bash|Edit|Write|Read|mcp__multi-agent-toolkit__[A-Za-z0-9_*?]{1,80})$")
91
+ TOOLKIT_PREFIX = "mcp__multi-agent__"
92
+ # The server's earlier registration id. A call or a rule under it is read as
93
+ # the same tool under the current id, so a rule written for either name still
94
+ # applies while a host serves the server under the old one.
95
+ LEGACY_TOOLKIT_PREFIX = "mcp__multi-agent-toolkit__"
96
+
97
+
98
+ def current_tool_name(tool):
99
+ """`tool` with the earlier server prefix replaced by the current one."""
100
+ if isinstance(tool, str) and tool.startswith(LEGACY_TOOLKIT_PREFIX):
101
+ return TOOLKIT_PREFIX + tool[len(LEGACY_TOOLKIT_PREFIX):]
102
+ return tool
103
+ TOOL_RE = re.compile(r"^(?:Bash|Edit|Write|Read|mcp__multi-agent__[A-Za-z0-9_*?]{1,80})$")
93
104
  CONTROL = re.compile(r"[\x00-\x1f\x7f]")
94
105
  NAMED_TOOLS = {
95
106
  "Bash": {"Bash"},
@@ -321,8 +332,8 @@ def _rule_problem(raw, seen, index):
321
332
  return "id is missing or not 1-64 letters, digits, dot, dash or underscore"
322
333
  if seen.get(rid, index) != index:
323
334
  return f"rules {seen[rid] + 1} and {index + 1} share the id {rid}; only rule {seen[rid] + 1} is kept"
324
- if not isinstance(raw.get("tool"), str) or not TOOL_RE.match(raw["tool"]):
325
- return "tool is not Bash, Edit, Write, Read or a mcp__multi-agent-toolkit__ glob"
335
+ if not isinstance(raw.get("tool"), str) or not TOOL_RE.match(current_tool_name(raw["tool"])):
336
+ return "tool is not Bash, Edit, Write, Read or a mcp__multi-agent__ glob"
326
337
  if raw.get("action") not in ACTIONS:
327
338
  return "action is not warn, ask or block"
328
339
  reason = raw.get("reason")
@@ -347,7 +358,8 @@ def parse_rules(raw):
347
358
  problem = _rule_problem(item, seen, index)
348
359
  if not problem and index >= MAX_RULES:
349
360
  problem = f"the list is longer than {MAX_RULES} rules"
350
- tool = d.get("tool") if isinstance(d.get("tool"), str) and TOOL_RE.match(d["tool"]) else None
361
+ tool = current_tool_name(d.get("tool"))
362
+ tool = tool if isinstance(tool, str) and TOOL_RE.match(tool) else None
351
363
  action = d.get("action") if d.get("action") in ACTIONS else None
352
364
  out.append({
353
365
  "label": _label(d, index, seen),
@@ -430,6 +442,7 @@ def calls(tool, ti, cwd, depth=0):
430
442
  """(tool name, [texts]) for the call and, for agent_run_steps, each step."""
431
443
  if not isinstance(tool, str) or not isinstance(ti, dict):
432
444
  return []
445
+ tool = current_tool_name(tool)
433
446
  if tool == "Bash":
434
447
  cmd = ti.get("command")
435
448
  return [("Bash", [cmd])] if isinstance(cmd, str) and cmd else []
@@ -448,7 +461,8 @@ def calls(tool, ti, cwd, depth=0):
448
461
  for step in steps:
449
462
  if not isinstance(step, dict) or not isinstance(step.get("tool"), str):
450
463
  continue
451
- sub = step["tool"] if step["tool"].startswith(TOOLKIT_PREFIX) else TOOLKIT_PREFIX + step["tool"]
464
+ sub = current_tool_name(step["tool"])
465
+ sub = sub if sub.startswith(TOOLKIT_PREFIX) else TOOLKIT_PREFIX + sub
452
466
  args = step.get("args") if isinstance(step.get("args"), dict) else {}
453
467
  out.extend(calls(sub, args, cwd, depth + 1))
454
468
  return out
@@ -574,6 +588,7 @@ def ordered(entries):
574
588
 
575
589
  def governed(tool):
576
590
  """Whether a guard rule could apply to this tool at all."""
591
+ tool = current_tool_name(tool)
577
592
  return isinstance(tool, str) and (tool == "Bash" or tool in PATH_TOOLS or tool.startswith(TOOLKIT_PREFIX))
578
593
 
579
594