@uniqbit/mate-core 0.21.1 → 1.0.0-canary.10

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 (467) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/claude-plugin/hooks/hooks.json +32 -1
  3. package/claude-plugin/hooks/workflow-turn.mjs +68 -0
  4. package/opencode-plugin/src/companion.ts +6 -0
  5. package/opencode-plugin/src/server.ts +24 -0
  6. package/package.json +9 -4
  7. package/src/cli/commands/artifact/apply-context.ts +1 -0
  8. package/src/cli/commands/artifact/artifact.ts +16 -0
  9. package/src/cli/commands/artifact/delivery/archive.ts +37 -112
  10. package/src/cli/commands/artifact/delivery/branch-flags.ts +19 -1
  11. package/src/cli/commands/artifact/delivery/environment.ts +30 -90
  12. package/src/cli/commands/artifact/delivery/link.ts +26 -26
  13. package/src/cli/commands/artifact/delivery/output.ts +27 -4
  14. package/src/cli/commands/artifact/delivery/resolve.ts +102 -0
  15. package/src/cli/commands/artifact/delivery/submit.ts +171 -0
  16. package/src/cli/commands/artifact/delivery/take.ts +46 -0
  17. package/src/cli/commands/artifact/extract-repo-name.ts +1 -1
  18. package/src/cli/commands/artifact/finish/command.ts +486 -55
  19. package/src/cli/commands/artifact/finish/engine.ts +87 -69
  20. package/src/cli/commands/artifact/finish/finisher.ts +5 -12
  21. package/src/cli/commands/artifact/finish/git.ts +9 -10
  22. package/src/cli/commands/artifact/finish/openspec.ts +21 -174
  23. package/src/cli/commands/artifact/finish/secret-scan.ts +5 -43
  24. package/src/cli/commands/artifact/finish/worktree-cleanup.ts +57 -7
  25. package/src/cli/commands/artifact/pending/command.ts +187 -10
  26. package/src/cli/commands/artifact/pending/discovery.ts +7 -11
  27. package/src/cli/commands/artifact/project/command.ts +59 -0
  28. package/src/cli/commands/cap/tokensave.ts +2 -2
  29. package/src/cli/commands/companion/hub.ts +11 -6
  30. package/src/cli/commands/companion/link.ts +173 -46
  31. package/src/cli/commands/companion/list.ts +70 -14
  32. package/src/cli/commands/companion/sync.ts +18 -0
  33. package/src/cli/commands/companion/update.ts +4 -3
  34. package/src/cli/commands/doctor.ts +84 -4
  35. package/src/cli/commands/friction.ts +558 -0
  36. package/src/cli/commands/install.ts +9 -4
  37. package/src/cli/commands/plugin/install.ts +82 -35
  38. package/src/cli/commands/studio/companion-add.ts +12 -27
  39. package/src/cli/commands/studio/connection.ts +53 -0
  40. package/src/{lib/factory/outcomes/sessions.ts → cli/commands/studio/live-sessions.ts} +7 -5
  41. package/src/cli/commands/studio/mcp-manager.ts +162 -0
  42. package/src/cli/commands/studio/payload.ts +172 -17
  43. package/src/cli/commands/studio/reports.ts +19 -18
  44. package/src/cli/commands/studio/routes.ts +8 -24
  45. package/src/cli/commands/studio/selection.ts +13 -4
  46. package/src/cli/commands/studio/server.ts +267 -243
  47. package/src/cli/commands/studio/service-host.ts +269 -0
  48. package/src/cli/commands/studio/services.ts +53 -34
  49. package/src/cli/commands/studio/studio-app.ts +1 -0
  50. package/src/cli/commands/studio/terminal.ts +1 -1
  51. package/src/cli/commands/studio/vault.ts +41 -40
  52. package/src/cli/commands/studio/views/model.ts +1 -9
  53. package/src/cli/commands/studio/views/vault/markdown-tree.ts +6 -5
  54. package/src/cli/commands/triage.ts +172 -0
  55. package/src/cli/commands/vscode/release-vsix.json +2 -2
  56. package/src/cli/commands/workflow/workflow.ts +516 -0
  57. package/src/cli/commands/working/cleanup.ts +1 -18
  58. package/src/cli/companion-link-wizard.tsx +158 -91
  59. package/src/cli/install-plan.tsx +3 -0
  60. package/src/cli/main.ts +106 -26
  61. package/src/cli/plugin-commands.ts +6 -1
  62. package/src/cli/repo-list-table.tsx +73 -37
  63. package/src/cli/usage.ts +30 -9
  64. package/src/create-mate.ts +15 -6
  65. package/src/distribution.ts +2 -0
  66. package/src/factory-host.ts +75 -0
  67. package/src/hooks/companion-instructions.ts +19 -8
  68. package/src/hooks/hook-io.ts +3 -1
  69. package/src/hooks/session-banner.ts +25 -0
  70. package/src/hooks/validate-artifact-path.ts +73 -22
  71. package/src/hooks/workflow-turn.ts +219 -0
  72. package/src/index.ts +1 -0
  73. package/src/lib/apply-context/fingerprint.ts +2 -1
  74. package/src/lib/apply-context/protocol.ts +2 -2
  75. package/src/lib/artifact-trailer.ts +27 -0
  76. package/src/lib/change-layout.ts +83 -38
  77. package/src/lib/delivery/branch-template.ts +4 -12
  78. package/src/lib/delivery/checkout.ts +3 -2
  79. package/src/lib/delivery/environment.ts +129 -7
  80. package/src/lib/delivery/merge-git.ts +312 -28
  81. package/src/lib/delivery/overlap.ts +81 -16
  82. package/src/lib/delivery/record-delivery.ts +102 -9
  83. package/src/lib/delivery/record.ts +186 -24
  84. package/src/lib/delivery/refresh.ts +241 -152
  85. package/src/lib/delivery/remote.ts +66 -0
  86. package/src/lib/delivery/repository-access.ts +30 -66
  87. package/src/lib/delivery/stages.ts +83 -50
  88. package/src/lib/delivery/staging/apply-chain.ts +182 -0
  89. package/src/lib/delivery/staging/artifact-type.ts +101 -0
  90. package/src/lib/delivery/staging/declared-type.ts +277 -0
  91. package/src/lib/delivery/staging/linked-merges.ts +175 -0
  92. package/src/lib/delivery/staging/naming.ts +67 -0
  93. package/src/lib/delivery/staging/openspec-type.ts +166 -0
  94. package/src/lib/delivery/staging/pending-edit.ts +291 -0
  95. package/src/lib/delivery/staging/pending.ts +922 -0
  96. package/src/lib/delivery/staging/preflight.ts +239 -0
  97. package/src/lib/delivery/staging/project.ts +512 -0
  98. package/src/lib/delivery/staging/publish.ts +1024 -0
  99. package/src/lib/delivery/staging/refs.ts +258 -0
  100. package/src/lib/delivery/staging/registry.ts +73 -0
  101. package/src/lib/delivery/staging/replay.ts +310 -0
  102. package/src/lib/delivery/staging/requirement-blocks.ts +10 -0
  103. package/src/lib/delivery/staging/resolve.ts +264 -0
  104. package/src/lib/delivery/staging/settle-linked.ts +176 -0
  105. package/src/lib/delivery/staging/submit.ts +1050 -0
  106. package/src/lib/delivery/staging/worktree.ts +130 -0
  107. package/src/lib/delivery/submit-change.ts +569 -0
  108. package/src/lib/friction/describe.ts +42 -0
  109. package/src/lib/friction/fields.ts +60 -0
  110. package/src/lib/friction/mark.ts +194 -0
  111. package/src/lib/friction/view/model.ts +67 -0
  112. package/src/lib/friction/view/read.ts +145 -0
  113. package/src/lib/friction/view/select.ts +54 -0
  114. package/src/lib/git-key.ts +15 -0
  115. package/src/lib/install.ts +2 -0
  116. package/src/lib/mcp-manager/resolve.ts +88 -0
  117. package/src/lib/mcp-manager/store.ts +133 -0
  118. package/src/lib/mcp-manager/types.ts +72 -0
  119. package/src/lib/mcp-manager/validate.ts +242 -0
  120. package/src/lib/openspec-canonical-frontmatter.ts +159 -0
  121. package/src/lib/openspec-cli.ts +10 -5
  122. package/src/lib/orchestrator/adapters/base.ts +31 -20
  123. package/src/lib/orchestrator/adapters/claude.ts +21 -7
  124. package/src/lib/orchestrator/adapters/opencode.ts +4 -0
  125. package/src/lib/orchestrator/companion-git-sync.ts +152 -16
  126. package/src/lib/orchestrator/config-store.ts +30 -7
  127. package/src/lib/orchestrator/engine-floor.ts +16 -4
  128. package/src/lib/orchestrator/engine-guard.ts +7 -1
  129. package/src/lib/orchestrator/framework-context.ts +15 -1
  130. package/src/lib/orchestrator/projection-claude-links.ts +1 -0
  131. package/src/lib/orchestrator/refresh-working-claude-links.ts +1 -0
  132. package/src/lib/orchestrator/repo-local-store.ts +14 -0
  133. package/src/lib/orchestrator/repository-link.ts +80 -52
  134. package/src/lib/orchestrator/root-context.ts +40 -7
  135. package/src/lib/orchestrator/session-prepare.ts +11 -1
  136. package/src/lib/orchestrator/types.ts +4 -0
  137. package/src/lib/orchestrator/umbrella-checkouts.ts +4 -4
  138. package/src/lib/package-paths.ts +23 -15
  139. package/src/lib/prebuilt-workspace-prepare.ts +2 -1
  140. package/src/lib/prebuilt-workspace.ts +1 -0
  141. package/src/lib/session-attribution.ts +3 -7
  142. package/src/lib/session-state.ts +3 -2
  143. package/src/lib/skills-cli.ts +38 -0
  144. package/src/lib/tool-manifest.ts +73 -0
  145. package/src/lib/triage/context.ts +312 -0
  146. package/src/lib/triage/launch.ts +52 -0
  147. package/src/lib/triage/prepare.ts +112 -0
  148. package/src/lib/triage/session.ts +126 -0
  149. package/src/lib/workflow/declaration.ts +6 -0
  150. package/src/lib/workflow/handoff.ts +90 -0
  151. package/src/lib/workflow/hook-trust.ts +108 -0
  152. package/src/lib/workflow/position.ts +524 -0
  153. package/src/lib/workflow/report.ts +79 -0
  154. package/src/lib/workflow/work.ts +106 -0
  155. package/src/lib/workset/factory-local.ts +2 -2
  156. package/src/lib/workset/repositories.ts +2 -2
  157. package/src/lib/workset/stage.ts +4 -2
  158. package/src/lib/workset/stages.ts +64 -4
  159. package/src/lib/workset/worktree.ts +32 -14
  160. package/src/opencode/companion-hooks.ts +63 -14
  161. package/src/opencode/projected-guidance.ts +7 -2
  162. package/src/opencode/turn-hook.ts +241 -0
  163. package/src/playbooks/companion-guidance.ts +7 -4
  164. package/src/plugin-api.ts +48 -0
  165. package/src/runtime/artifact-trailers.ts +63 -0
  166. package/src/runtime/claude-hook-group.ts +2 -0
  167. package/src/runtime/command-arg.ts +15 -0
  168. package/src/runtime/command-friction.ts +97 -0
  169. package/src/runtime/companion-git-state.ts +155 -10
  170. package/src/runtime/companion-git.ts +86 -11
  171. package/src/runtime/companion-guidance.ts +120 -17
  172. package/src/runtime/companion-instructions.ts +1 -1
  173. package/src/runtime/companion-sync.ts +109 -21
  174. package/src/runtime/env-names.ts +2 -2
  175. package/src/runtime/env.ts +7 -6
  176. package/src/runtime/forge-remote.ts +54 -0
  177. package/src/runtime/friction-fingerprint.ts +35 -0
  178. package/src/runtime/friction-log.ts +376 -0
  179. package/src/runtime/friction-recorder.ts +212 -0
  180. package/src/runtime/friction-retention.ts +1 -0
  181. package/src/runtime/friction-state.ts +110 -0
  182. package/src/runtime/friction-switch.ts +26 -0
  183. package/src/runtime/friction-vocabulary.ts +42 -0
  184. package/src/runtime/git-layout.ts +21 -7
  185. package/src/runtime/git-tracked.ts +13 -2
  186. package/src/runtime/json-fields.ts +8 -0
  187. package/src/runtime/pending-records.ts +533 -0
  188. package/src/runtime/projected-guidance.ts +8 -3
  189. package/src/runtime/publication-secret-scan.ts +45 -0
  190. package/src/runtime/secret-patterns.ts +7 -5
  191. package/src/runtime/secret-values.ts +16 -0
  192. package/src/runtime/session-id.ts +24 -0
  193. package/src/runtime/session-prepare-runner.ts +3 -0
  194. package/src/runtime/skill-prefix.ts +75 -0
  195. package/src/runtime/submitted-arrivals.ts +547 -0
  196. package/src/runtime/turn-state.d.mts +14 -0
  197. package/src/runtime/turn-state.mjs +93 -0
  198. package/src/runtime/umbrella-children.ts +52 -0
  199. package/src/runtime/umbrella-folder.ts +31 -3
  200. package/src/runtime/workflow/change-folders.ts +66 -0
  201. package/src/runtime/workflow/declaration.ts +720 -0
  202. package/src/runtime/workflow/globs.ts +85 -0
  203. package/src/runtime/workflow/next-handoff-process.ts +99 -0
  204. package/src/runtime/workflow/turn.ts +311 -0
  205. package/src/runtime/workflow/workflow.ts +262 -0
  206. package/src/studio.ts +113 -23
  207. package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/schema.yaml +3 -3
  208. package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/design.md +1 -1
  209. package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/proposal.md +1 -1
  210. package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/tasks.md +1 -1
  211. package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +7 -3
  212. package/src/templates/capabilities/react-doctor/mate-react-doctor/SKILL.md +28 -0
  213. package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +84 -28
  214. package/src/templates/mate-skills/agents/mate-apply-change/references/openspec-apply-change.md +1 -1
  215. package/src/templates/mate-skills/agents/mate-archive-change/SKILL.md +30 -68
  216. package/src/templates/mate-skills/agents/mate-backfill-spec/SKILL.md +23 -1
  217. package/src/templates/mate-skills/agents/mate-clarify-intent/SKILL.md +39 -8
  218. package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +38 -0
  219. package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +65 -12
  220. package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +28 -0
  221. package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +28 -0
  222. package/src/templates/mate-skills/agents/mate-grilling/SKILL.md +25 -0
  223. package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +28 -0
  224. package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +68 -28
  225. package/src/templates/mate-skills/agents/mate-propose-change/references/mate-revise.md +13 -7
  226. package/src/templates/mate-skills/agents/mate-propose-change/references/openspec-update-change.md +1 -1
  227. package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +136 -86
  228. package/src/templates/mate-skills/agents/mate-publish-artifact/references/openspec.md +111 -100
  229. package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +28 -3
  230. package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +39 -5
  231. package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +138 -0
  232. package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +84 -28
  233. package/src/templates/mate-skills/claude/mate-apply-change/references/openspec-apply-change.md +1 -1
  234. package/src/templates/mate-skills/claude/mate-archive-change/SKILL.md +30 -68
  235. package/src/templates/mate-skills/claude/mate-backfill-spec/SKILL.md +23 -1
  236. package/src/templates/mate-skills/claude/mate-clarify-intent/SKILL.md +39 -8
  237. package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +38 -0
  238. package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +65 -12
  239. package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +28 -0
  240. package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +28 -0
  241. package/src/templates/mate-skills/claude/mate-grilling/SKILL.md +25 -0
  242. package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +28 -0
  243. package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +68 -28
  244. package/src/templates/mate-skills/claude/mate-propose-change/references/mate-revise.md +13 -7
  245. package/src/templates/mate-skills/claude/mate-propose-change/references/openspec-update-change.md +1 -1
  246. package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +136 -86
  247. package/src/templates/mate-skills/claude/mate-publish-artifact/references/openspec.md +111 -100
  248. package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +28 -3
  249. package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +39 -5
  250. package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +138 -0
  251. package/src/templates/mate-skills/openspec-references.ts +3 -2
  252. package/src/templates/triage/PLAYBOOK.md +120 -0
  253. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +678 -170
  254. package/src/tools/setup/capabilities/graphify.ts +23 -1
  255. package/src/tools/setup/capabilities/mcp-manager.ts +73 -0
  256. package/src/tools/setup/capabilities/openspec.ts +54 -15
  257. package/src/tools/setup/capabilities/rtk.ts +47 -94
  258. package/src/tools/setup/capabilities/tokensave.ts +79 -56
  259. package/src/tools/setup/context-services.ts +35 -6
  260. package/src/tools/setup/dynamic-plugins/api.ts +38 -0
  261. package/src/tools/setup/dynamic-plugins/audiences.ts +31 -16
  262. package/src/tools/setup/dynamic-plugins/host.ts +2 -32
  263. package/src/tools/setup/dynamic-plugins/hydrate.ts +32 -14
  264. package/src/tools/setup/dynamic-plugins/install.ts +2 -0
  265. package/src/tools/setup/dynamic-plugins/installed.ts +73 -0
  266. package/src/tools/setup/dynamic-plugins/loader.ts +12 -10
  267. package/src/tools/setup/dynamic-plugins/local.ts +492 -0
  268. package/src/tools/setup/dynamic-plugins/paths.ts +34 -6
  269. package/src/tools/setup/dynamic-plugins/verify.ts +34 -14
  270. package/src/tools/setup/dynamic-plugins/workspaces.ts +21 -12
  271. package/src/tools/setup/engine.ts +75 -4
  272. package/src/tools/setup/mate.ts +28 -1
  273. package/src/tools/setup/package-managers/bun.ts +8 -8
  274. package/src/tools/setup/plugin.ts +28 -1
  275. package/src/tools/setup/plugins/gitignore.ts +45 -12
  276. package/src/tools/setup/plugins/guidance.ts +4 -2
  277. package/src/tools/setup/providers/claude-format.ts +39 -2
  278. package/src/tools/setup/providers/claude-plugin-hooks.ts +18 -0
  279. package/src/tools/setup/providers/claude.ts +56 -6
  280. package/src/tools/setup/providers/opencode-format.ts +13 -3
  281. package/src/tools/setup/providers/opencode.ts +7 -18
  282. package/src/tools/setup/providers/relative-path-warnings.ts +26 -0
  283. package/src/tools/setup/service-registry.ts +69 -0
  284. package/src/tools/setup/service.ts +245 -0
  285. package/src/tools/setup/utils.ts +34 -4
  286. package/src/tools/setup.ts +16 -2
  287. package/studio-dist/client/assets/DialogTitle-B_G47-lk.js +1 -0
  288. package/studio-dist/client/assets/app-0NoFqMou.css +2 -0
  289. package/studio-dist/client/assets/button-D_0295cs.js +1 -0
  290. package/studio-dist/client/assets/cn-Cx_D6I3u.js +1 -0
  291. package/studio-dist/client/assets/combobox-D0iPQP50.js +1 -0
  292. package/studio-dist/client/assets/{companion-view-CrabvxS8.js → companion-view-D3A76MLj.js} +1 -1
  293. package/studio-dist/client/assets/fields-Ctheim1h.js +1 -0
  294. package/studio-dist/client/assets/friction-Cn9n_zBA.js +1 -0
  295. package/studio-dist/client/assets/getting-started-DgoVWbWo.js +1 -0
  296. package/studio-dist/client/assets/{getting-started-D6kgWwWZ.js → getting-started-MmLqvy01.js} +1 -1
  297. package/studio-dist/client/assets/getting-started._topic-DBF0khhz.js +1 -0
  298. package/studio-dist/client/assets/getting-started.index-BRdAVqIh.js +1 -0
  299. package/studio-dist/client/assets/graph-BVRdq46V.js +2 -0
  300. package/studio-dist/client/assets/{graph-canvas-Ba37Y5AE.js → graph-canvas-BNzd-eVb.js} +1 -1
  301. package/studio-dist/client/assets/guides-DY1W9LRs.js +1 -0
  302. package/studio-dist/client/assets/index-CuTIc9yd.js +40 -0
  303. package/studio-dist/client/assets/{markdown-view-BOX6x0rL.js → markdown-view-BqZQkk_k.js} +1 -1
  304. package/studio-dist/client/assets/mcp-CIFxmDs0.js +4 -0
  305. package/studio-dist/client/assets/panel-DafanLQ4.js +1 -0
  306. package/studio-dist/client/assets/plugins._service._view-xSRLxHNM.js +1 -0
  307. package/studio-dist/client/assets/prepaint-C--F50QZ.js +27 -0
  308. package/studio-dist/client/assets/{queries-RvHeXY12.js → queries-ByCoiacy.js} +1 -1
  309. package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
  310. package/studio-dist/client/assets/reports-Diryyked.js +1 -0
  311. package/studio-dist/client/assets/routes-DbRwPd55.js +1 -0
  312. package/studio-dist/client/assets/search-BDKQRwa5.js +1 -0
  313. package/studio-dist/client/assets/select-_9JT3hpU.js +1 -0
  314. package/studio-dist/client/assets/skills-D5a6ybQM.js +1 -0
  315. package/studio-dist/client/assets/{specs-B0ldF_6J.js → specs-COAWUTog.js} +1 -1
  316. package/studio-dist/client/assets/specs-view-9eTn9TcN.js +1 -0
  317. package/studio-dist/client/assets/steps-BS588WAV.js +1 -0
  318. package/studio-dist/client/assets/store-3cffhIO6.js +1 -0
  319. package/studio-dist/client/assets/studio-CG9eioSx.js +100 -0
  320. package/studio-dist/client/assets/studio-queries-BS1yR7Wc.js +2 -0
  321. package/studio-dist/client/assets/{usage-C2QJ_0IZ.js → usage-Ccl4d7w0.js} +15 -15
  322. package/studio-dist/client/assets/useAnchoredPopupScrollLock-D_y83VP7.js +1 -0
  323. package/studio-dist/client/assets/useBlocker-BQOfcu_f.js +1 -0
  324. package/studio-dist/client/assets/useMutation-BDmS2V6y.js +1 -0
  325. package/studio-dist/client/assets/usePopupHandleStore-BcqpNR-F.js +1 -0
  326. package/studio-dist/client/assets/vault-C1tOhQMe.js +1 -0
  327. package/studio-dist/client/assets/warnings-BZ_X1nkO.js +1 -0
  328. package/studio-dist/client/assets/workflow-Cm2fsnly.js +1 -0
  329. package/studio-dist/server/assets/DialogTitle-KSVhF_7V.js +421 -0
  330. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-Bn896ZYj.js → __23tanstack-start-server-fn-resolver-QQnIXyKi.js} +40 -28
  331. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +84 -74
  332. package/studio-dist/server/assets/{button-CgOIVdmD.js → button-C7EMLaX6.js} +229 -5527
  333. package/studio-dist/server/assets/cn-D7uJiH_O.js +5528 -0
  334. package/studio-dist/server/assets/{combobox-DV_s9W0s.js → combobox-Dc4_y20Y.js} +6 -5
  335. package/studio-dist/server/assets/{companion-view-BKVXD3TO.js → companion-view-CrSi37Mb.js} +2 -2
  336. package/studio-dist/server/assets/{companions-C7fctnU9.js → companions-CDSuLqA4.js} +1 -1
  337. package/studio-dist/server/assets/{fields-BbieQTD0.js → fields-BxBN6-Dz.js} +10 -2
  338. package/studio-dist/server/assets/friction-B1K8Kp8r.js +62 -0
  339. package/studio-dist/server/assets/friction-Vl3B6THL.js +943 -0
  340. package/studio-dist/server/assets/{getting-started-CRxMWorQ.js → getting-started-B3lu5W7M.js} +2 -2
  341. package/studio-dist/server/assets/{getting-started._topic-DJKQAzYl.js → getting-started._topic-EYtxZM-Y.js} +2 -2
  342. package/studio-dist/server/assets/{getting-started.index-D84gec1t.js → getting-started.index-CTaXYycH.js} +2 -2
  343. package/studio-dist/server/assets/{graph-DDZzXM1L.js → graph-Bhmk7H8V.js} +1 -1
  344. package/studio-dist/server/assets/{graph-CSje3029.js → graph-D3fXCaKt.js} +8 -8
  345. package/studio-dist/server/assets/{graph-canvas-22bWB5-2.js → graph-canvas-DIvTodML.js} +2 -2
  346. package/studio-dist/server/assets/{guides-IE-19POz.js → guides-BZWFpJl-.js} +1 -1
  347. package/studio-dist/server/assets/{guides-D9dk1Frq.js → guides-CHBkRO6R.js} +1 -1
  348. package/studio-dist/server/assets/{guides.server-vcYRY5wx.js → guides.server-DX9KRkcK.js} +1 -1
  349. package/studio-dist/server/assets/{markdown-view-BR8dJ7aR.js → markdown-view-qrCSkVta.js} +1 -1
  350. package/studio-dist/server/assets/mcp-Ljf4simO.js +1103 -0
  351. package/studio-dist/server/assets/mcp-manager-DohRwmJU.js +50 -0
  352. package/studio-dist/server/assets/{panel-BR_t9iMM.js → panel-CAwz4mKp.js} +6 -4
  353. package/studio-dist/server/assets/plugins._service._view-DUpAo5D_.js +97 -0
  354. package/studio-dist/server/assets/prepaint-BxZ-pU7t.js +45 -0
  355. package/studio-dist/server/assets/{queries-DWoTin-q.js → queries-W4LXzTnT.js} +1 -1
  356. package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
  357. package/studio-dist/server/assets/{reports-CQ9qQ1-n.js → reports-BVNSPHU3.js} +13 -7
  358. package/studio-dist/server/assets/{reports-dYDEoBeq.js → reports-CGG_wRN5.js} +1 -1
  359. package/studio-dist/server/assets/{router-DkRHNTpE.js → router-KH1x6ryF.js} +1039 -1096
  360. package/studio-dist/server/assets/{routes-B6GfOew4.js → routes-Bl90FC4R.js} +333 -38
  361. package/studio-dist/server/assets/search-BjG5f16n.js +110 -0
  362. package/studio-dist/server/assets/{select-Af7Wibii.js → select-B8q9tLbl.js} +5 -4
  363. package/studio-dist/server/assets/{shell-Hq-hXgnT.js → shell-C5emwofr.js} +12 -3
  364. package/studio-dist/server/assets/{skills-B7nEuVbx.js → skills-10l0eCfP.js} +8 -8
  365. package/studio-dist/server/assets/{skills-B_YYL7q8.js → skills-vG6TTvP1.js} +1 -1
  366. package/studio-dist/server/assets/{specs-BpLUFntA.js → specs-C1P2BEao.js} +4 -4
  367. package/studio-dist/server/assets/{specs-view-0peMVd22.js → specs-view-csUBtMWU.js} +10 -10
  368. package/studio-dist/server/assets/{steps-D56DApvK.js → steps-T4wXftgd.js} +88 -45
  369. package/studio-dist/server/assets/store-CWlRjv9s.js +93 -0
  370. package/studio-dist/server/assets/{studio-CAcKp3bM.js → studio-D-ZPWSMv.js} +1567 -59
  371. package/studio-dist/server/assets/{studio-queries-BtRGzDdh.js → studio-queries-DC273ifg.js} +66 -124
  372. package/studio-dist/server/assets/{usage-COdjd1gD.js → usage-CT3IWLJc.js} +13 -30
  373. package/studio-dist/server/assets/{usage-f6pqE1tm.js → usage-D4t_ibR8.js} +1 -1
  374. package/studio-dist/server/assets/{useAnchoredPopupScrollLock-DlBKHRw7.js → useAnchoredPopupScrollLock-BchJDJYg.js} +2 -2
  375. package/studio-dist/server/assets/useBlocker-CQtANHK8.js +111 -0
  376. package/studio-dist/server/assets/{useMutation-DzTZGenE.js → useMutation-0HbcKUsQ.js} +2 -2
  377. package/studio-dist/server/assets/usePopupHandleStore-B3SNGTic.js +26 -0
  378. package/studio-dist/server/assets/{vault-BDuIUq0F.js → vault-BIytrudF.js} +10 -117
  379. package/studio-dist/server/assets/{vault-BVLp6zu3.js → vault-MINXmyXA.js} +1 -1
  380. package/studio-dist/server/assets/{views-flRUr21z.js → views-DrmY_3J5.js} +7 -4
  381. package/studio-dist/server/assets/{warnings-CDy9pdgL.js → warnings-BVZCDbIz.js} +2 -2
  382. package/studio-dist/server/assets/{workflow-D9GKI2EV.js → workflow-DFdqnMtW.js} +57 -50
  383. package/studio-dist/server/server.js +2 -2
  384. package/tool-manifest.yaml +85 -0
  385. package/src/cli/commands/factory/factory.ts +0 -311
  386. package/src/cli/commands/studio/factory-credential.ts +0 -35
  387. package/src/cli/commands/studio/factory-git-tokens.ts +0 -40
  388. package/src/cli/commands/studio/factory-relay.ts +0 -18
  389. package/src/cli/commands/studio/repository-add.ts +0 -116
  390. package/src/cli/commands/studio/workset-session.ts +0 -164
  391. package/src/lib/delivery/archive-change.ts +0 -165
  392. package/src/lib/delivery/forge.ts +0 -279
  393. package/src/lib/delivery/token.ts +0 -24
  394. package/src/lib/factory/attach-client.ts +0 -123
  395. package/src/lib/factory/attach.ts +0 -178
  396. package/src/lib/factory/broker.ts +0 -187
  397. package/src/lib/factory/bun-commands.ts +0 -39
  398. package/src/lib/factory/client.ts +0 -113
  399. package/src/lib/factory/clone-url.ts +0 -39
  400. package/src/lib/factory/command.ts +0 -77
  401. package/src/lib/factory/credential-store.ts +0 -153
  402. package/src/lib/factory/frames.ts +0 -77
  403. package/src/lib/factory/git-auth.ts +0 -61
  404. package/src/lib/factory/git-credential-store.ts +0 -181
  405. package/src/lib/factory/ids.ts +0 -68
  406. package/src/lib/factory/outcomes/actions.ts +0 -130
  407. package/src/lib/factory/outcomes/index.ts +0 -457
  408. package/src/lib/factory/outcomes/lifecycle.ts +0 -212
  409. package/src/lib/factory/outcomes/runs.ts +0 -81
  410. package/src/lib/factory/prepare.ts +0 -55
  411. package/src/lib/factory/pty.ts +0 -103
  412. package/src/lib/factory/runner/companion-context.ts +0 -178
  413. package/src/lib/factory/runner/control.ts +0 -92
  414. package/src/lib/factory/runner/harness-agent.ts +0 -250
  415. package/src/lib/factory/runner/live.ts +0 -159
  416. package/src/lib/factory/runner/questions.ts +0 -22
  417. package/src/lib/factory/runner/rank.ts +0 -26
  418. package/src/lib/factory/runner/run-policy.ts +0 -12
  419. package/src/lib/factory/runner/run.ts +0 -199
  420. package/src/lib/factory/runner/scheduler.ts +0 -498
  421. package/src/lib/factory/runner/state.ts +0 -233
  422. package/src/lib/factory/runner/workflow.ts +0 -546
  423. package/src/lib/factory/runtime.ts +0 -1081
  424. package/src/lib/factory/sandbox.ts +0 -292
  425. package/src/lib/factory/worktree-branch.ts +0 -17
  426. package/src/templates/capabilities/openspec-cap/mate-v1/templates/explore-brief.md +0 -25
  427. package/studio-dist/client/assets/app-D9cw6szy.css +0 -2
  428. package/studio-dist/client/assets/artifacts-WD2ZXYrx.js +0 -1
  429. package/studio-dist/client/assets/button-Br0O1sXw.js +0 -1
  430. package/studio-dist/client/assets/combobox-DA7RAUUZ.js +0 -1
  431. package/studio-dist/client/assets/factory-DGS0E16C.js +0 -6
  432. package/studio-dist/client/assets/fields-6aXBpFhJ.js +0 -1
  433. package/studio-dist/client/assets/getting-started-Clde4w6P.js +0 -1
  434. package/studio-dist/client/assets/getting-started._topic-BiunccbT.js +0 -1
  435. package/studio-dist/client/assets/getting-started.index-DpiNoGw8.js +0 -1
  436. package/studio-dist/client/assets/graph-B_TCBVbu.js +0 -2
  437. package/studio-dist/client/assets/guides-Du_RtJxP.js +0 -1
  438. package/studio-dist/client/assets/index-Df8L1LQa.js +0 -40
  439. package/studio-dist/client/assets/panel-dbmCx7Mx.js +0 -1
  440. package/studio-dist/client/assets/react-3QStrcDO.js +0 -27
  441. package/studio-dist/client/assets/report-url-XRL0x1SY.js +0 -1
  442. package/studio-dist/client/assets/reports-r3IK7Doz.js +0 -1
  443. package/studio-dist/client/assets/routes-C0A5LTFc.js +0 -1
  444. package/studio-dist/client/assets/select-CnaMd617.js +0 -1
  445. package/studio-dist/client/assets/skills-CzjzHpBT.js +0 -1
  446. package/studio-dist/client/assets/specs-view-BnCLA0gW.js +0 -1
  447. package/studio-dist/client/assets/spinner-Dcm3fqK1.js +0 -1
  448. package/studio-dist/client/assets/steps-C0p2N1Pb.js +0 -1
  449. package/studio-dist/client/assets/store-Dw34catY.js +0 -1
  450. package/studio-dist/client/assets/studio-Cpz_HRHp.js +0 -100
  451. package/studio-dist/client/assets/studio-queries-ibmpFo6R.js +0 -2
  452. package/studio-dist/client/assets/useAnchoredPopupScrollLock-Bj-FWb8z.js +0 -1
  453. package/studio-dist/client/assets/useMutation-aAr2uiay.js +0 -1
  454. package/studio-dist/client/assets/vault-BGcxkSIY.js +0 -1
  455. package/studio-dist/client/assets/warnings-R1cE1rLf.js +0 -1
  456. package/studio-dist/client/assets/workflow-C2qTrMDH.js +0 -1
  457. package/studio-dist/server/assets/actions-DYSv-9VV.js +0 -60
  458. package/studio-dist/server/assets/artifacts-DnF9L3dZ.js +0 -216
  459. package/studio-dist/server/assets/factory-C7Ybg0xG.js +0 -3075
  460. package/studio-dist/server/assets/factory-Df5uAHjb.js +0 -116
  461. package/studio-dist/server/assets/react-CdqSUhaL.js +0 -89
  462. package/studio-dist/server/assets/report-url-BUXPcE_8.js +0 -9
  463. package/studio-dist/server/assets/search-BJnWLfkG.js +0 -55
  464. package/studio-dist/server/assets/spinner-CdwJW4VB.js +0 -20
  465. package/studio-dist/server/assets/store-Cs17okNG.js +0 -280
  466. /package/src/lib/{factory/keyed-serial.ts → keyed-serial.ts} +0 -0
  467. /package/src/templates/capabilities/openspec-cap/{mate-v1 → mate-full}/templates/spec.md +0 -0
@@ -143,9 +143,8 @@ exports[`runtime surface golden fixtures setup graphify × claude 2`] = `
143
143
  <linked-repository id="app" />
144
144
  </context>
145
145
  <mandatory-rules>
146
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
146
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
147
147
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
148
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
149
148
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
150
149
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
151
150
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -303,6 +302,58 @@ exports[`runtime surface golden fixtures setup graphify × claude 3`] = `
303
302
  },
304
303
  ],
305
304
  },
305
+ {
306
+ "at": [
307
+ "hooks",
308
+ "UserPromptSubmit",
309
+ ],
310
+ "kind": "list",
311
+ "values": [
312
+ {
313
+ "hooks": [
314
+ {
315
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
316
+ "type": "command",
317
+ },
318
+ ],
319
+ },
320
+ ],
321
+ },
322
+ {
323
+ "at": [
324
+ "hooks",
325
+ "PostToolUse",
326
+ ],
327
+ "kind": "list",
328
+ "values": [
329
+ {
330
+ "hooks": [
331
+ {
332
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
333
+ "type": "command",
334
+ },
335
+ ],
336
+ "matcher": "Skill|Bash",
337
+ },
338
+ ],
339
+ },
340
+ {
341
+ "at": [
342
+ "hooks",
343
+ "Stop",
344
+ ],
345
+ "kind": "list",
346
+ "values": [
347
+ {
348
+ "hooks": [
349
+ {
350
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
351
+ "type": "command",
352
+ },
353
+ ],
354
+ },
355
+ ],
356
+ },
306
357
  {
307
358
  "at": [
308
359
  "env",
@@ -509,9 +560,8 @@ exports[`runtime surface golden fixtures setup graphify × opencode 2`] = `
509
560
  <linked-repository id="$MATE_REPO_ID" />
510
561
  </context>
511
562
  <mandatory-rules>
512
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
563
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
513
564
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
514
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
515
565
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
516
566
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
517
567
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -949,9 +999,8 @@ exports[`runtime surface golden fixtures setup graphify × claude+opencode 2`] =
949
999
  <linked-repository id="app" />
950
1000
  </context>
951
1001
  <mandatory-rules>
952
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
1002
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
953
1003
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
954
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
955
1004
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
956
1005
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
957
1006
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -1017,9 +1066,8 @@ exports[`runtime surface golden fixtures setup graphify × claude+opencode 2`] =
1017
1066
  <linked-repository id="$MATE_REPO_ID" />
1018
1067
  </context>
1019
1068
  <mandatory-rules>
1020
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
1069
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
1021
1070
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
1022
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
1023
1071
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
1024
1072
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
1025
1073
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -1163,6 +1211,58 @@ exports[`runtime surface golden fixtures setup graphify × claude+opencode 3`] =
1163
1211
  },
1164
1212
  ],
1165
1213
  },
1214
+ {
1215
+ "at": [
1216
+ "hooks",
1217
+ "UserPromptSubmit",
1218
+ ],
1219
+ "kind": "list",
1220
+ "values": [
1221
+ {
1222
+ "hooks": [
1223
+ {
1224
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1225
+ "type": "command",
1226
+ },
1227
+ ],
1228
+ },
1229
+ ],
1230
+ },
1231
+ {
1232
+ "at": [
1233
+ "hooks",
1234
+ "PostToolUse",
1235
+ ],
1236
+ "kind": "list",
1237
+ "values": [
1238
+ {
1239
+ "hooks": [
1240
+ {
1241
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1242
+ "type": "command",
1243
+ },
1244
+ ],
1245
+ "matcher": "Skill|Bash",
1246
+ },
1247
+ ],
1248
+ },
1249
+ {
1250
+ "at": [
1251
+ "hooks",
1252
+ "Stop",
1253
+ ],
1254
+ "kind": "list",
1255
+ "values": [
1256
+ {
1257
+ "hooks": [
1258
+ {
1259
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1260
+ "type": "command",
1261
+ },
1262
+ ],
1263
+ },
1264
+ ],
1265
+ },
1166
1266
  {
1167
1267
  "at": [
1168
1268
  "env",
@@ -1661,9 +1761,8 @@ exports[`runtime surface golden fixtures setup tokensave × claude 2`] = `
1661
1761
  <linked-repository id="app" />
1662
1762
  </context>
1663
1763
  <mandatory-rules>
1664
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
1764
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
1665
1765
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
1666
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
1667
1766
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
1668
1767
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
1669
1768
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -1837,6 +1936,14 @@ exports[`runtime surface golden fixtures setup tokensave × claude 3`] = `
1837
1936
  ],
1838
1937
  "kind": "list",
1839
1938
  "values": [
1939
+ {
1940
+ "hooks": [
1941
+ {
1942
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1943
+ "type": "command",
1944
+ },
1945
+ ],
1946
+ },
1840
1947
  {
1841
1948
  "hooks": [
1842
1949
  {
@@ -1850,6 +1957,24 @@ exports[`runtime surface golden fixtures setup tokensave × claude 3`] = `
1850
1957
  },
1851
1958
  ],
1852
1959
  },
1960
+ {
1961
+ "at": [
1962
+ "hooks",
1963
+ "PostToolUse",
1964
+ ],
1965
+ "kind": "list",
1966
+ "values": [
1967
+ {
1968
+ "hooks": [
1969
+ {
1970
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1971
+ "type": "command",
1972
+ },
1973
+ ],
1974
+ "matcher": "Skill|Bash",
1975
+ },
1976
+ ],
1977
+ },
1853
1978
  {
1854
1979
  "at": [
1855
1980
  "hooks",
@@ -1857,6 +1982,14 @@ exports[`runtime surface golden fixtures setup tokensave × claude 3`] = `
1857
1982
  ],
1858
1983
  "kind": "list",
1859
1984
  "values": [
1985
+ {
1986
+ "hooks": [
1987
+ {
1988
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
1989
+ "type": "command",
1990
+ },
1991
+ ],
1992
+ },
1860
1993
  {
1861
1994
  "hooks": [
1862
1995
  {
@@ -2082,9 +2215,8 @@ exports[`runtime surface golden fixtures setup tokensave × opencode 2`] = `
2082
2215
  <linked-repository id="$MATE_REPO_ID" />
2083
2216
  </context>
2084
2217
  <mandatory-rules>
2085
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2218
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2086
2219
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
2087
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
2088
2220
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
2089
2221
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
2090
2222
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -2547,9 +2679,8 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 2`]
2547
2679
  <linked-repository id="app" />
2548
2680
  </context>
2549
2681
  <mandatory-rules>
2550
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2682
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2551
2683
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
2552
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
2553
2684
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
2554
2685
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
2555
2686
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -2609,9 +2740,8 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 2`]
2609
2740
  <linked-repository id="$MATE_REPO_ID" />
2610
2741
  </context>
2611
2742
  <mandatory-rules>
2612
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2743
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
2613
2744
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
2614
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
2615
2745
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
2616
2746
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
2617
2747
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -2774,6 +2904,14 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 3`]
2774
2904
  ],
2775
2905
  "kind": "list",
2776
2906
  "values": [
2907
+ {
2908
+ "hooks": [
2909
+ {
2910
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
2911
+ "type": "command",
2912
+ },
2913
+ ],
2914
+ },
2777
2915
  {
2778
2916
  "hooks": [
2779
2917
  {
@@ -2787,6 +2925,24 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 3`]
2787
2925
  },
2788
2926
  ],
2789
2927
  },
2928
+ {
2929
+ "at": [
2930
+ "hooks",
2931
+ "PostToolUse",
2932
+ ],
2933
+ "kind": "list",
2934
+ "values": [
2935
+ {
2936
+ "hooks": [
2937
+ {
2938
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
2939
+ "type": "command",
2940
+ },
2941
+ ],
2942
+ "matcher": "Skill|Bash",
2943
+ },
2944
+ ],
2945
+ },
2790
2946
  {
2791
2947
  "at": [
2792
2948
  "hooks",
@@ -2794,6 +2950,14 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 3`]
2794
2950
  ],
2795
2951
  "kind": "list",
2796
2952
  "values": [
2953
+ {
2954
+ "hooks": [
2955
+ {
2956
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
2957
+ "type": "command",
2958
+ },
2959
+ ],
2960
+ },
2797
2961
  {
2798
2962
  "hooks": [
2799
2963
  {
@@ -3292,9 +3456,8 @@ exports[`runtime surface golden fixtures setup context-mode × claude 2`] = `
3292
3456
  <linked-repository id="app" />
3293
3457
  </context>
3294
3458
  <mandatory-rules>
3295
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
3459
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
3296
3460
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
3297
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
3298
3461
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
3299
3462
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
3300
3463
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -3443,6 +3606,58 @@ exports[`runtime surface golden fixtures setup context-mode × claude 3`] = `
3443
3606
  },
3444
3607
  ],
3445
3608
  },
3609
+ {
3610
+ "at": [
3611
+ "hooks",
3612
+ "UserPromptSubmit",
3613
+ ],
3614
+ "kind": "list",
3615
+ "values": [
3616
+ {
3617
+ "hooks": [
3618
+ {
3619
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
3620
+ "type": "command",
3621
+ },
3622
+ ],
3623
+ },
3624
+ ],
3625
+ },
3626
+ {
3627
+ "at": [
3628
+ "hooks",
3629
+ "PostToolUse",
3630
+ ],
3631
+ "kind": "list",
3632
+ "values": [
3633
+ {
3634
+ "hooks": [
3635
+ {
3636
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
3637
+ "type": "command",
3638
+ },
3639
+ ],
3640
+ "matcher": "Skill|Bash",
3641
+ },
3642
+ ],
3643
+ },
3644
+ {
3645
+ "at": [
3646
+ "hooks",
3647
+ "Stop",
3648
+ ],
3649
+ "kind": "list",
3650
+ "values": [
3651
+ {
3652
+ "hooks": [
3653
+ {
3654
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
3655
+ "type": "command",
3656
+ },
3657
+ ],
3658
+ },
3659
+ ],
3660
+ },
3446
3661
  {
3447
3662
  "at": [
3448
3663
  "env",
@@ -3626,9 +3841,8 @@ exports[`runtime surface golden fixtures setup context-mode × opencode 2`] = `
3626
3841
  <linked-repository id="$MATE_REPO_ID" />
3627
3842
  </context>
3628
3843
  <mandatory-rules>
3629
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
3844
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
3630
3845
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
3631
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
3632
3846
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
3633
3847
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
3634
3848
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -4026,9 +4240,8 @@ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 2
4026
4240
  <linked-repository id="app" />
4027
4241
  </context>
4028
4242
  <mandatory-rules>
4029
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4243
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4030
4244
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
4031
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
4032
4245
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
4033
4246
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
4034
4247
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -4074,9 +4287,8 @@ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 2
4074
4287
  <linked-repository id="$MATE_REPO_ID" />
4075
4288
  </context>
4076
4289
  <mandatory-rules>
4077
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4290
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4078
4291
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
4079
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
4080
4292
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
4081
4293
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
4082
4294
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -4220,6 +4432,58 @@ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 3
4220
4432
  },
4221
4433
  ],
4222
4434
  },
4435
+ {
4436
+ "at": [
4437
+ "hooks",
4438
+ "UserPromptSubmit",
4439
+ ],
4440
+ "kind": "list",
4441
+ "values": [
4442
+ {
4443
+ "hooks": [
4444
+ {
4445
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
4446
+ "type": "command",
4447
+ },
4448
+ ],
4449
+ },
4450
+ ],
4451
+ },
4452
+ {
4453
+ "at": [
4454
+ "hooks",
4455
+ "PostToolUse",
4456
+ ],
4457
+ "kind": "list",
4458
+ "values": [
4459
+ {
4460
+ "hooks": [
4461
+ {
4462
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
4463
+ "type": "command",
4464
+ },
4465
+ ],
4466
+ "matcher": "Skill|Bash",
4467
+ },
4468
+ ],
4469
+ },
4470
+ {
4471
+ "at": [
4472
+ "hooks",
4473
+ "Stop",
4474
+ ],
4475
+ "kind": "list",
4476
+ "values": [
4477
+ {
4478
+ "hooks": [
4479
+ {
4480
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
4481
+ "type": "command",
4482
+ },
4483
+ ],
4484
+ },
4485
+ ],
4486
+ },
4223
4487
  {
4224
4488
  "at": [
4225
4489
  "env",
@@ -4638,7 +4902,7 @@ exports[`runtime surface golden fixtures setup react-doctor × claude 1`] = `
4638
4902
  },
4639
4903
  },
4640
4904
  "claudeSkills": {
4641
- "mate-react-doctor/SKILL.md": "2ecf137679df",
4905
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
4642
4906
  "mate-react-doctor/references/explain.md": "86754a7e5436",
4643
4907
  },
4644
4908
  "opencodeConfig": null,
@@ -4672,9 +4936,8 @@ exports[`runtime surface golden fixtures setup react-doctor × claude 2`] = `
4672
4936
  <linked-repository id="app" />
4673
4937
  </context>
4674
4938
  <mandatory-rules>
4675
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4939
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
4676
4940
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
4677
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
4678
4941
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
4679
4942
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
4680
4943
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -4821,6 +5084,58 @@ exports[`runtime surface golden fixtures setup react-doctor × claude 3`] = `
4821
5084
  },
4822
5085
  ],
4823
5086
  },
5087
+ {
5088
+ "at": [
5089
+ "hooks",
5090
+ "UserPromptSubmit",
5091
+ ],
5092
+ "kind": "list",
5093
+ "values": [
5094
+ {
5095
+ "hooks": [
5096
+ {
5097
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5098
+ "type": "command",
5099
+ },
5100
+ ],
5101
+ },
5102
+ ],
5103
+ },
5104
+ {
5105
+ "at": [
5106
+ "hooks",
5107
+ "PostToolUse",
5108
+ ],
5109
+ "kind": "list",
5110
+ "values": [
5111
+ {
5112
+ "hooks": [
5113
+ {
5114
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5115
+ "type": "command",
5116
+ },
5117
+ ],
5118
+ "matcher": "Skill|Bash",
5119
+ },
5120
+ ],
5121
+ },
5122
+ {
5123
+ "at": [
5124
+ "hooks",
5125
+ "Stop",
5126
+ ],
5127
+ "kind": "list",
5128
+ "values": [
5129
+ {
5130
+ "hooks": [
5131
+ {
5132
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5133
+ "type": "command",
5134
+ },
5135
+ ],
5136
+ },
5137
+ ],
5138
+ },
4824
5139
  {
4825
5140
  "at": [
4826
5141
  "env",
@@ -4962,7 +5277,7 @@ exports[`runtime surface golden fixtures setup react-doctor × opencode 1`] = `
4962
5277
  "opencodeSkills": {},
4963
5278
  "opencodeTui": null,
4964
5279
  "sharedSkills": {
4965
- "mate-react-doctor/SKILL.md": "2ecf137679df",
5280
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
4966
5281
  "mate-react-doctor/references/explain.md": "86754a7e5436",
4967
5282
  },
4968
5283
  }
@@ -4996,9 +5311,8 @@ exports[`runtime surface golden fixtures setup react-doctor × opencode 2`] = `
4996
5311
  <linked-repository id="$MATE_REPO_ID" />
4997
5312
  </context>
4998
5313
  <mandatory-rules>
4999
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5314
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5000
5315
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
5001
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
5002
5316
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
5003
5317
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
5004
5318
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -5337,7 +5651,7 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1
5337
5651
  },
5338
5652
  },
5339
5653
  "claudeSkills": {
5340
- "mate-react-doctor/SKILL.md": "2ecf137679df",
5654
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
5341
5655
  "mate-react-doctor/references/explain.md": "86754a7e5436",
5342
5656
  },
5343
5657
  "opencodeConfig": {
@@ -5361,7 +5675,7 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1
5361
5675
  "opencodeSkills": {},
5362
5676
  "opencodeTui": null,
5363
5677
  "sharedSkills": {
5364
- "mate-react-doctor/SKILL.md": "2ecf137679df",
5678
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
5365
5679
  "mate-react-doctor/references/explain.md": "86754a7e5436",
5366
5680
  },
5367
5681
  }
@@ -5390,9 +5704,8 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 2
5390
5704
  <linked-repository id="app" />
5391
5705
  </context>
5392
5706
  <mandatory-rules>
5393
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5707
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5394
5708
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
5395
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
5396
5709
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
5397
5710
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
5398
5711
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -5436,9 +5749,8 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 2
5436
5749
  <linked-repository id="$MATE_REPO_ID" />
5437
5750
  </context>
5438
5751
  <mandatory-rules>
5439
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5752
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
5440
5753
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
5441
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
5442
5754
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
5443
5755
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
5444
5756
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -5582,6 +5894,58 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 3
5582
5894
  },
5583
5895
  ],
5584
5896
  },
5897
+ {
5898
+ "at": [
5899
+ "hooks",
5900
+ "UserPromptSubmit",
5901
+ ],
5902
+ "kind": "list",
5903
+ "values": [
5904
+ {
5905
+ "hooks": [
5906
+ {
5907
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5908
+ "type": "command",
5909
+ },
5910
+ ],
5911
+ },
5912
+ ],
5913
+ },
5914
+ {
5915
+ "at": [
5916
+ "hooks",
5917
+ "PostToolUse",
5918
+ ],
5919
+ "kind": "list",
5920
+ "values": [
5921
+ {
5922
+ "hooks": [
5923
+ {
5924
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5925
+ "type": "command",
5926
+ },
5927
+ ],
5928
+ "matcher": "Skill|Bash",
5929
+ },
5930
+ ],
5931
+ },
5932
+ {
5933
+ "at": [
5934
+ "hooks",
5935
+ "Stop",
5936
+ ],
5937
+ "kind": "list",
5938
+ "values": [
5939
+ {
5940
+ "hooks": [
5941
+ {
5942
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
5943
+ "type": "command",
5944
+ },
5945
+ ],
5946
+ },
5947
+ ],
5948
+ },
5585
5949
  {
5586
5950
  "at": [
5587
5951
  "env",
@@ -5970,6 +6334,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
5970
6334
  "Skill(mate-publish-artifact)",
5971
6335
  "Skill(mate-show-me)",
5972
6336
  "Skill(mate-simplify-code)",
6337
+ "Skill(mate-submit-change)",
5973
6338
  ],
5974
6339
  "ask": [
5975
6340
  "Edit(/<root>/companion/.mate/config/framework.yaml)",
@@ -6014,30 +6379,31 @@ exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
6014
6379
  },
6015
6380
  },
6016
6381
  "claudeSkills": {
6017
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
6382
+ "mate-apply-change/SKILL.md": "340456564b7f",
6018
6383
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
6019
- "mate-apply-change/references/openspec-apply-change.md": "d11b6fc25bf4",
6020
- "mate-archive-change/SKILL.md": "a231ddabb438",
6021
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
6022
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
6023
- "mate-create-report/SKILL.md": "b4d92b44719a",
6024
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
6384
+ "mate-apply-change/references/openspec-apply-change.md": "fa61cbd0bc83",
6385
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
6386
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
6387
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
6388
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
6389
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
6025
6390
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
6026
6391
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
6027
- "mate-explore-change/SKILL.md": "773339a07db8",
6392
+ "mate-explore-change/SKILL.md": "f41800334a80",
6028
6393
  "mate-explore-change/references/openspec-explore.md": "3cf63d55e3d2",
6029
- "mate-grill-me/SKILL.md": "ab55b002ba24",
6030
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
6031
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
6032
- "mate-interview-me/SKILL.md": "b48d9804c423",
6033
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
6034
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
6394
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
6395
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
6396
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
6397
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
6398
+ "mate-propose-change/SKILL.md": "a94163171ac9",
6399
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
6035
6400
  "mate-propose-change/references/openspec-propose.md": "dbd00207ffa4",
6036
- "mate-propose-change/references/openspec-update-change.md": "678af6ec1889",
6037
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
6038
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
6039
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
6040
- "mate-simplify-code/SKILL.md": "3620932bd724",
6401
+ "mate-propose-change/references/openspec-update-change.md": "0b0f6dee9f1e",
6402
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
6403
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
6404
+ "mate-show-me/SKILL.md": "263dceace1b6",
6405
+ "mate-simplify-code/SKILL.md": "ede560857729",
6406
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
6041
6407
  },
6042
6408
  "opencodeConfig": null,
6043
6409
  "opencodePlugins": {},
@@ -6070,9 +6436,8 @@ exports[`runtime surface golden fixtures setup openspec × claude 2`] = `
6070
6436
  <linked-repository id="app" />
6071
6437
  </context>
6072
6438
  <mandatory-rules>
6073
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6439
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6074
6440
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
6075
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
6076
6441
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
6077
6442
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
6078
6443
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -6080,7 +6445,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 2`] = `
6080
6445
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: <wrapper-bin>/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
6081
6446
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
6082
6447
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
6083
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
6448
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
6084
6449
  </mandatory-rules>
6085
6450
  </companion-policy>"
6086
6451
  ,
@@ -6221,6 +6586,58 @@ exports[`runtime surface golden fixtures setup openspec × claude 3`] = `
6221
6586
  },
6222
6587
  ],
6223
6588
  },
6589
+ {
6590
+ "at": [
6591
+ "hooks",
6592
+ "UserPromptSubmit",
6593
+ ],
6594
+ "kind": "list",
6595
+ "values": [
6596
+ {
6597
+ "hooks": [
6598
+ {
6599
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
6600
+ "type": "command",
6601
+ },
6602
+ ],
6603
+ },
6604
+ ],
6605
+ },
6606
+ {
6607
+ "at": [
6608
+ "hooks",
6609
+ "PostToolUse",
6610
+ ],
6611
+ "kind": "list",
6612
+ "values": [
6613
+ {
6614
+ "hooks": [
6615
+ {
6616
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
6617
+ "type": "command",
6618
+ },
6619
+ ],
6620
+ "matcher": "Skill|Bash",
6621
+ },
6622
+ ],
6623
+ },
6624
+ {
6625
+ "at": [
6626
+ "hooks",
6627
+ "Stop",
6628
+ ],
6629
+ "kind": "list",
6630
+ "values": [
6631
+ {
6632
+ "hooks": [
6633
+ {
6634
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
6635
+ "type": "command",
6636
+ },
6637
+ ],
6638
+ },
6639
+ ],
6640
+ },
6224
6641
  {
6225
6642
  "at": [
6226
6643
  "env",
@@ -6243,6 +6660,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 3`] = `
6243
6660
  "Skill(mate-explore-change)",
6244
6661
  "Skill(mate-propose-change)",
6245
6662
  "Skill(mate-apply-change)",
6663
+ "Skill(mate-submit-change)",
6246
6664
  "Skill(mate-archive-change)",
6247
6665
  "Skill(mate-publish-artifact)",
6248
6666
  "Skill(mate-backfill-spec)",
@@ -6377,30 +6795,31 @@ exports[`runtime surface golden fixtures setup openspec × opencode 1`] = `
6377
6795
  "opencodeSkills": {},
6378
6796
  "opencodeTui": null,
6379
6797
  "sharedSkills": {
6380
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
6798
+ "mate-apply-change/SKILL.md": "340456564b7f",
6381
6799
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
6382
- "mate-apply-change/references/openspec-apply-change.md": "de22021f4daa",
6383
- "mate-archive-change/SKILL.md": "a231ddabb438",
6384
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
6385
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
6386
- "mate-create-report/SKILL.md": "b4d92b44719a",
6387
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
6800
+ "mate-apply-change/references/openspec-apply-change.md": "c132265690b4",
6801
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
6802
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
6803
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
6804
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
6805
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
6388
6806
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
6389
6807
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
6390
- "mate-explore-change/SKILL.md": "773339a07db8",
6808
+ "mate-explore-change/SKILL.md": "f41800334a80",
6391
6809
  "mate-explore-change/references/openspec-explore.md": "5bfcc2eefbd8",
6392
- "mate-grill-me/SKILL.md": "ab55b002ba24",
6393
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
6394
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
6395
- "mate-interview-me/SKILL.md": "b48d9804c423",
6396
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
6397
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
6810
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
6811
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
6812
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
6813
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
6814
+ "mate-propose-change/SKILL.md": "a94163171ac9",
6815
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
6398
6816
  "mate-propose-change/references/openspec-propose.md": "c1f1d1291283",
6399
- "mate-propose-change/references/openspec-update-change.md": "cdb8d6c17526",
6400
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
6401
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
6402
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
6403
- "mate-simplify-code/SKILL.md": "3620932bd724",
6817
+ "mate-propose-change/references/openspec-update-change.md": "098ef729c37f",
6818
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
6819
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
6820
+ "mate-show-me/SKILL.md": "263dceace1b6",
6821
+ "mate-simplify-code/SKILL.md": "ede560857729",
6822
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
6404
6823
  },
6405
6824
  }
6406
6825
  `;
@@ -6433,9 +6852,8 @@ exports[`runtime surface golden fixtures setup openspec × opencode 2`] = `
6433
6852
  <linked-repository id="$MATE_REPO_ID" />
6434
6853
  </context>
6435
6854
  <mandatory-rules>
6436
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6855
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6437
6856
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
6438
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
6439
6857
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
6440
6858
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
6441
6859
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -6443,7 +6861,7 @@ exports[`runtime surface golden fixtures setup openspec × opencode 2`] = `
6443
6861
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: $MATE_WRAPPER_BIN_PATH/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
6444
6862
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
6445
6863
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
6446
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
6864
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
6447
6865
  </mandatory-rules>
6448
6866
  </companion-policy>"
6449
6867
  ,
@@ -6747,6 +7165,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
6747
7165
  "Skill(mate-publish-artifact)",
6748
7166
  "Skill(mate-show-me)",
6749
7167
  "Skill(mate-simplify-code)",
7168
+ "Skill(mate-submit-change)",
6750
7169
  ],
6751
7170
  "ask": [
6752
7171
  "Edit(/<root>/companion/.mate/config/framework.yaml)",
@@ -6791,30 +7210,31 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
6791
7210
  },
6792
7211
  },
6793
7212
  "claudeSkills": {
6794
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
7213
+ "mate-apply-change/SKILL.md": "340456564b7f",
6795
7214
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
6796
- "mate-apply-change/references/openspec-apply-change.md": "d11b6fc25bf4",
6797
- "mate-archive-change/SKILL.md": "a231ddabb438",
6798
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
6799
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
6800
- "mate-create-report/SKILL.md": "b4d92b44719a",
6801
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
7215
+ "mate-apply-change/references/openspec-apply-change.md": "fa61cbd0bc83",
7216
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
7217
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
7218
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
7219
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
7220
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
6802
7221
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
6803
7222
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
6804
- "mate-explore-change/SKILL.md": "773339a07db8",
7223
+ "mate-explore-change/SKILL.md": "f41800334a80",
6805
7224
  "mate-explore-change/references/openspec-explore.md": "3cf63d55e3d2",
6806
- "mate-grill-me/SKILL.md": "ab55b002ba24",
6807
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
6808
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
6809
- "mate-interview-me/SKILL.md": "b48d9804c423",
6810
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
6811
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
7225
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
7226
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
7227
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
7228
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
7229
+ "mate-propose-change/SKILL.md": "a94163171ac9",
7230
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
6812
7231
  "mate-propose-change/references/openspec-propose.md": "dbd00207ffa4",
6813
- "mate-propose-change/references/openspec-update-change.md": "678af6ec1889",
6814
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
6815
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
6816
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
6817
- "mate-simplify-code/SKILL.md": "3620932bd724",
7232
+ "mate-propose-change/references/openspec-update-change.md": "0b0f6dee9f1e",
7233
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
7234
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
7235
+ "mate-show-me/SKILL.md": "263dceace1b6",
7236
+ "mate-simplify-code/SKILL.md": "ede560857729",
7237
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
6818
7238
  },
6819
7239
  "opencodeConfig": {
6820
7240
  "$schema": "https://opencode.ai/config.json",
@@ -6837,30 +7257,31 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
6837
7257
  "opencodeSkills": {},
6838
7258
  "opencodeTui": null,
6839
7259
  "sharedSkills": {
6840
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
7260
+ "mate-apply-change/SKILL.md": "340456564b7f",
6841
7261
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
6842
- "mate-apply-change/references/openspec-apply-change.md": "de22021f4daa",
6843
- "mate-archive-change/SKILL.md": "a231ddabb438",
6844
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
6845
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
6846
- "mate-create-report/SKILL.md": "b4d92b44719a",
6847
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
7262
+ "mate-apply-change/references/openspec-apply-change.md": "c132265690b4",
7263
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
7264
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
7265
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
7266
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
7267
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
6848
7268
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
6849
7269
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
6850
- "mate-explore-change/SKILL.md": "773339a07db8",
7270
+ "mate-explore-change/SKILL.md": "f41800334a80",
6851
7271
  "mate-explore-change/references/openspec-explore.md": "5bfcc2eefbd8",
6852
- "mate-grill-me/SKILL.md": "ab55b002ba24",
6853
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
6854
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
6855
- "mate-interview-me/SKILL.md": "b48d9804c423",
6856
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
6857
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
7272
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
7273
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
7274
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
7275
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
7276
+ "mate-propose-change/SKILL.md": "a94163171ac9",
7277
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
6858
7278
  "mate-propose-change/references/openspec-propose.md": "c1f1d1291283",
6859
- "mate-propose-change/references/openspec-update-change.md": "cdb8d6c17526",
6860
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
6861
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
6862
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
6863
- "mate-simplify-code/SKILL.md": "3620932bd724",
7279
+ "mate-propose-change/references/openspec-update-change.md": "098ef729c37f",
7280
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
7281
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
7282
+ "mate-show-me/SKILL.md": "263dceace1b6",
7283
+ "mate-simplify-code/SKILL.md": "ede560857729",
7284
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
6864
7285
  },
6865
7286
  }
6866
7287
  `;
@@ -6888,9 +7309,8 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
6888
7309
  <linked-repository id="app" />
6889
7310
  </context>
6890
7311
  <mandatory-rules>
6891
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
7312
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6892
7313
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
6893
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
6894
7314
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
6895
7315
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
6896
7316
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -6898,7 +7318,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
6898
7318
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: <wrapper-bin>/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
6899
7319
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
6900
7320
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
6901
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
7321
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
6902
7322
  </mandatory-rules>
6903
7323
  </companion-policy>"
6904
7324
  ,
@@ -6936,9 +7356,8 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
6936
7356
  <linked-repository id="$MATE_REPO_ID" />
6937
7357
  </context>
6938
7358
  <mandatory-rules>
6939
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
7359
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
6940
7360
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
6941
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
6942
7361
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
6943
7362
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
6944
7363
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -6946,7 +7365,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
6946
7365
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: $MATE_WRAPPER_BIN_PATH/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
6947
7366
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
6948
7367
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
6949
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
7368
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
6950
7369
  </mandatory-rules>
6951
7370
  </companion-policy>"
6952
7371
  ,
@@ -7084,6 +7503,58 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 3`] =
7084
7503
  },
7085
7504
  ],
7086
7505
  },
7506
+ {
7507
+ "at": [
7508
+ "hooks",
7509
+ "UserPromptSubmit",
7510
+ ],
7511
+ "kind": "list",
7512
+ "values": [
7513
+ {
7514
+ "hooks": [
7515
+ {
7516
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
7517
+ "type": "command",
7518
+ },
7519
+ ],
7520
+ },
7521
+ ],
7522
+ },
7523
+ {
7524
+ "at": [
7525
+ "hooks",
7526
+ "PostToolUse",
7527
+ ],
7528
+ "kind": "list",
7529
+ "values": [
7530
+ {
7531
+ "hooks": [
7532
+ {
7533
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
7534
+ "type": "command",
7535
+ },
7536
+ ],
7537
+ "matcher": "Skill|Bash",
7538
+ },
7539
+ ],
7540
+ },
7541
+ {
7542
+ "at": [
7543
+ "hooks",
7544
+ "Stop",
7545
+ ],
7546
+ "kind": "list",
7547
+ "values": [
7548
+ {
7549
+ "hooks": [
7550
+ {
7551
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
7552
+ "type": "command",
7553
+ },
7554
+ ],
7555
+ },
7556
+ ],
7557
+ },
7087
7558
  {
7088
7559
  "at": [
7089
7560
  "env",
@@ -7106,6 +7577,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 3`] =
7106
7577
  "Skill(mate-explore-change)",
7107
7578
  "Skill(mate-propose-change)",
7108
7579
  "Skill(mate-apply-change)",
7580
+ "Skill(mate-submit-change)",
7109
7581
  "Skill(mate-archive-change)",
7110
7582
  "Skill(mate-publish-artifact)",
7111
7583
  "Skill(mate-backfill-spec)",
@@ -7560,6 +8032,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
7560
8032
  "Skill(mate-react-doctor)",
7561
8033
  "Skill(mate-show-me)",
7562
8034
  "Skill(mate-simplify-code)",
8035
+ "Skill(mate-submit-change)",
7563
8036
  "mcp__plugin_context-mode_context-mode__*",
7564
8037
  "mcp__tokensave__*",
7565
8038
  ],
@@ -7621,32 +8094,33 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
7621
8094
  "Outputs land in $GRAPHIFY_OUT by default.
7622
8095
  "
7623
8096
  ,
7624
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
8097
+ "mate-apply-change/SKILL.md": "340456564b7f",
7625
8098
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
7626
- "mate-apply-change/references/openspec-apply-change.md": "d11b6fc25bf4",
7627
- "mate-archive-change/SKILL.md": "a231ddabb438",
7628
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
7629
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
7630
- "mate-create-report/SKILL.md": "b4d92b44719a",
7631
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
8099
+ "mate-apply-change/references/openspec-apply-change.md": "fa61cbd0bc83",
8100
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
8101
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
8102
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
8103
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
8104
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
7632
8105
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
7633
8106
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
7634
- "mate-explore-change/SKILL.md": "773339a07db8",
8107
+ "mate-explore-change/SKILL.md": "f41800334a80",
7635
8108
  "mate-explore-change/references/openspec-explore.md": "3cf63d55e3d2",
7636
- "mate-grill-me/SKILL.md": "ab55b002ba24",
7637
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
7638
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
7639
- "mate-interview-me/SKILL.md": "b48d9804c423",
7640
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
7641
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
8109
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
8110
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
8111
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
8112
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
8113
+ "mate-propose-change/SKILL.md": "a94163171ac9",
8114
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
7642
8115
  "mate-propose-change/references/openspec-propose.md": "dbd00207ffa4",
7643
- "mate-propose-change/references/openspec-update-change.md": "678af6ec1889",
7644
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
7645
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
7646
- "mate-react-doctor/SKILL.md": "2ecf137679df",
8116
+ "mate-propose-change/references/openspec-update-change.md": "0b0f6dee9f1e",
8117
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
8118
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
8119
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
7647
8120
  "mate-react-doctor/references/explain.md": "86754a7e5436",
7648
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
7649
- "mate-simplify-code/SKILL.md": "3620932bd724",
8121
+ "mate-show-me/SKILL.md": "263dceace1b6",
8122
+ "mate-simplify-code/SKILL.md": "ede560857729",
8123
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
7650
8124
  },
7651
8125
  "opencodeConfig": {
7652
8126
  "$schema": "https://opencode.ai/config.json",
@@ -7705,32 +8179,33 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
7705
8179
  },
7706
8180
  "opencodeTui": null,
7707
8181
  "sharedSkills": {
7708
- "mate-apply-change/SKILL.md": "2e50a18e43e4",
8182
+ "mate-apply-change/SKILL.md": "340456564b7f",
7709
8183
  "mate-apply-change/references/mate-compact-apply.md": "3f20c80a4d78",
7710
- "mate-apply-change/references/openspec-apply-change.md": "de22021f4daa",
7711
- "mate-archive-change/SKILL.md": "a231ddabb438",
7712
- "mate-backfill-spec/SKILL.md": "d07cd4a60169",
7713
- "mate-clarify-intent/SKILL.md": "a2e38ae50f05",
7714
- "mate-create-report/SKILL.md": "b4d92b44719a",
7715
- "mate-domain-modeling/SKILL.md": "722d0e5a972d",
8184
+ "mate-apply-change/references/openspec-apply-change.md": "c132265690b4",
8185
+ "mate-archive-change/SKILL.md": "873bf06b5e57",
8186
+ "mate-backfill-spec/SKILL.md": "c79288929dea",
8187
+ "mate-clarify-intent/SKILL.md": "abaa8ee3b3b5",
8188
+ "mate-create-report/SKILL.md": "0fb49a040d6c",
8189
+ "mate-domain-modeling/SKILL.md": "5b9f27e88a6c",
7716
8190
  "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
7717
8191
  "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
7718
- "mate-explore-change/SKILL.md": "773339a07db8",
8192
+ "mate-explore-change/SKILL.md": "f41800334a80",
7719
8193
  "mate-explore-change/references/openspec-explore.md": "5bfcc2eefbd8",
7720
- "mate-grill-me/SKILL.md": "ab55b002ba24",
7721
- "mate-grill-with-docs/SKILL.md": "b542b610c484",
7722
- "mate-grilling/SKILL.md": "f37ff4dd9b6d",
7723
- "mate-interview-me/SKILL.md": "b48d9804c423",
7724
- "mate-propose-change/SKILL.md": "82f83a32a9a9",
7725
- "mate-propose-change/references/mate-revise.md": "fab04cde133f",
8194
+ "mate-grill-me/SKILL.md": "6d713f1240ca",
8195
+ "mate-grill-with-docs/SKILL.md": "682f2d8123ac",
8196
+ "mate-grilling/SKILL.md": "0e14a416f8a3",
8197
+ "mate-interview-me/SKILL.md": "c35ec1f14f79",
8198
+ "mate-propose-change/SKILL.md": "a94163171ac9",
8199
+ "mate-propose-change/references/mate-revise.md": "1f90002ee95d",
7726
8200
  "mate-propose-change/references/openspec-propose.md": "c1f1d1291283",
7727
- "mate-propose-change/references/openspec-update-change.md": "cdb8d6c17526",
7728
- "mate-publish-artifact/SKILL.md": "1daa076a037a",
7729
- "mate-publish-artifact/references/openspec.md": "d004aed5cf3f",
7730
- "mate-react-doctor/SKILL.md": "2ecf137679df",
8201
+ "mate-propose-change/references/openspec-update-change.md": "098ef729c37f",
8202
+ "mate-publish-artifact/SKILL.md": "2cf1844c8b5e",
8203
+ "mate-publish-artifact/references/openspec.md": "83196c70960c",
8204
+ "mate-react-doctor/SKILL.md": "ec2ac7fb877c",
7731
8205
  "mate-react-doctor/references/explain.md": "86754a7e5436",
7732
- "mate-show-me/SKILL.md": "ad2c0acd4aef",
7733
- "mate-simplify-code/SKILL.md": "3620932bd724",
8206
+ "mate-show-me/SKILL.md": "263dceace1b6",
8207
+ "mate-simplify-code/SKILL.md": "ede560857729",
8208
+ "mate-submit-change/SKILL.md": "97ce8f1dc43d",
7734
8209
  },
7735
8210
  }
7736
8211
  `;
@@ -7758,9 +8233,8 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
7758
8233
  <linked-repository id="app" />
7759
8234
  </context>
7760
8235
  <mandatory-rules>
7761
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
8236
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to <root>/companion, NEVER <root>/working, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
7762
8237
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
7763
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
7764
8238
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
7765
8239
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against <root>/working and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under <root>/companion.</rule>
7766
8240
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -7768,7 +8242,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
7768
8242
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: <wrapper-bin>/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
7769
8243
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
7770
8244
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
7771
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
8245
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
7772
8246
  </mandatory-rules>
7773
8247
  </companion-policy>
7774
8248
 
@@ -7830,9 +8304,8 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
7830
8304
  <linked-repository id="$MATE_REPO_ID" />
7831
8305
  </context>
7832
8306
  <mandatory-rules>
7833
- <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH. Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
8307
+ <rule id="artifact-location" severity="critical">Agent artifacts MUST go to $MATE_ARTIFACT_PATH, NEVER $MATE_REPO_PATH, which holds product code (README, docs, source, tests). Artifacts include plans, specs, ADRs, todos, notes, handoffs, reasoning docs, and scratch files.</rule>
7834
8308
  <rule id="pre-write-classification" severity="critical">Before ANY write, classify the target as product-code or agent-artifact. If unsure, treat it as agent-artifact.</rule>
7835
- <rule id="product-code-location" severity="critical">Product code (README, docs, source, tests) belongs in the working-repository path; agent artifacts in the companion-repository path.</rule>
7836
8309
  <rule id="local-artifact-exception" severity="critical">Write an artifact in the working repository only when its exact path is gitignored AND intentionally local-only.</rule>
7837
8310
  <rule id="guardrail" severity="critical">Bad artifact writes to the working repository are rejected. The guardrail resolves relative paths against $MATE_REPO_PATH and does not follow cd, so write artifacts, including shell redirects and tee, with absolute paths under $MATE_ARTIFACT_PATH.</rule>
7838
8311
  <rule id="companion-multi-repository" severity="critical">This Companion Repository may serve multiple Working Repositories; the working-repository path is this session's single primary Working Repository (the product-code plane), not the full set. The Companion Repository is the shared artifact and context plane.</rule>
@@ -7840,7 +8313,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
7840
8313
  <rule id="wrapper-only-cli-execution" severity="critical">For every CLI declared in cli-tools, invoke the exact path in its invokeAs attribute. Correct: $MATE_WRAPPER_BIN_PATH/openspec status ... . Incorrect: openspec status ... . Do not run bare openspec or graphify commands and do not rely on PATH, aliases, or shell functions. If the exact wrapper path is unavailable, stop and report it.</rule>
7841
8314
  <rule id="secret-handling" severity="critical">Never read, print, copy, or write secret files (.env, .env.*, keys, certificates, credential files such as .npmrc or .netrc) or secret values. To learn which variables exist, read only the example files (.env.example, .env.sample, .env.template, .env.dist). Refer to a secret by its variable name only. Do not print environment variables that may hold secrets. When a secret must be set or rotated, ask the user to do it instead of writing it yourself. Guarded calls are blocked; the companion's framework.yaml secrets block is the user's switch, not yours.</rule>
7842
8315
  <rule id="openspec-scope" severity="critical">In OpenSpec, the frontmatter repository identifies the Working Repository; areas are repository-relative paths within that repository. Canonical specs use repository plus flat areas; change artifacts use paired scopes entries. In a monorepo, an Area normally stops at the package root. A cross-repository change may declare multiple scopes, but each resulting spec remains owned by one repository, and each requirement must bind its Area explicitly.</rule>
7843
- <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is local and publishes nothing. Publish only through the mate-publish-artifact skill, whose sanctioned command is mate artifact publish "<name>" --json: only after an explicit user selection and confirmation of the commit, tag, and push, and only for an archive whose delivery branch is merged; never hand-commit or hand-tag one. Publish never archives and never applies delta specs itself: archiving is a precondition (mate-archive-change, allowed before the merge), and publishing a still-active change is an error. Publish refuses to run anywhere but the companion's default branch.</rule>
8316
+ <rule id="openspec-publish" severity="critical">Submit publishes nothing: it pushes an OpenSpec change folder (state: submitted) to the inbox mate/inbox to await its merge. A submitted change is not the truth: only publication lands it on the companion's default branch. openspec/specs/ is current; mate artifact project "<name>" shows the unpublished outcome. mate artifact pending --json --no-merge-check lists them with author, touched requirements, ref and path; read one (git show <ref>:<path>/<file>) only where it touches your work or the user names it; implement or revise one only when the user names it: mate artifact take "<name>" brings it into the checkout when it is missing there, then resubmit it with mate-submit-change. Publish only through mate-publish-artifact (mate artifact publish "<name>" --json), after the user selects and confirms the commit and push, for a Delivery Group whose delivery branch is merged. It creates no tag. Never hand-commit or hand-tag one. Publish archives submitted changes and never submits: submitting is a precondition (mate-submit-change, before the merge).</rule>
7844
8317
  </mandatory-rules>
7845
8318
  </companion-policy>"
7846
8319
  ,
@@ -7997,6 +8470,14 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
7997
8470
  ],
7998
8471
  "kind": "list",
7999
8472
  "values": [
8473
+ {
8474
+ "hooks": [
8475
+ {
8476
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
8477
+ "type": "command",
8478
+ },
8479
+ ],
8480
+ },
8000
8481
  {
8001
8482
  "hooks": [
8002
8483
  {
@@ -8010,6 +8491,24 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
8010
8491
  },
8011
8492
  ],
8012
8493
  },
8494
+ {
8495
+ "at": [
8496
+ "hooks",
8497
+ "PostToolUse",
8498
+ ],
8499
+ "kind": "list",
8500
+ "values": [
8501
+ {
8502
+ "hooks": [
8503
+ {
8504
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
8505
+ "type": "command",
8506
+ },
8507
+ ],
8508
+ "matcher": "Skill|Bash",
8509
+ },
8510
+ ],
8511
+ },
8013
8512
  {
8014
8513
  "at": [
8015
8514
  "hooks",
@@ -8017,6 +8516,14 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
8017
8516
  ],
8018
8517
  "kind": "list",
8019
8518
  "values": [
8519
+ {
8520
+ "hooks": [
8521
+ {
8522
+ "command": "node "<runtime-claude-plugin>/hooks/workflow-turn.mjs" --projected",
8523
+ "type": "command",
8524
+ },
8525
+ ],
8526
+ },
8020
8527
  {
8021
8528
  "hooks": [
8022
8529
  {
@@ -8052,6 +8559,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
8052
8559
  "Skill(mate-explore-change)",
8053
8560
  "Skill(mate-propose-change)",
8054
8561
  "Skill(mate-apply-change)",
8562
+ "Skill(mate-submit-change)",
8055
8563
  "Skill(mate-archive-change)",
8056
8564
  "Skill(mate-publish-artifact)",
8057
8565
  "Skill(mate-backfill-spec)",