@uniqbit/mate-core 0.15.5 → 0.16.0-canary.1

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 (186) hide show
  1. package/claude-plugin/.claude-plugin/plugin.json +2 -2
  2. package/claude-plugin/hooks/hooks.json +3 -6
  3. package/claude-plugin/hooks/session-guidance.mjs +8 -0
  4. package/claude-plugin/hooks/ts-loader.mjs +19 -0
  5. package/package.json +7 -5
  6. package/src/cli/commands/artifact/artifact.ts +19 -3
  7. package/src/cli/commands/artifact/finish/command.ts +183 -57
  8. package/src/cli/commands/artifact/finish/engine.ts +80 -91
  9. package/src/cli/commands/artifact/finish/finisher.ts +26 -33
  10. package/src/cli/commands/artifact/finish/git.ts +34 -23
  11. package/src/cli/commands/artifact/finish/index.ts +9 -3
  12. package/src/cli/commands/artifact/finish/openspec.ts +225 -97
  13. package/src/cli/commands/artifact/pending/command.ts +175 -0
  14. package/src/cli/commands/artifact/pending/discovery.ts +249 -0
  15. package/src/cli/commands/artifact/pending/index.ts +17 -0
  16. package/src/cli/commands/cap/index-cmd.ts +9 -1
  17. package/src/cli/commands/cap/index.ts +2 -6
  18. package/src/cli/commands/cap/tokensave.ts +4 -4
  19. package/src/cli/commands/companion/companion.ts +5 -1
  20. package/src/cli/commands/companion/link.ts +2 -2
  21. package/src/cli/commands/companion/sync.ts +92 -0
  22. package/src/cli/commands/doctor.ts +0 -3
  23. package/src/cli/commands/launch/shared.ts +23 -5
  24. package/src/cli/commands/report/collector.ts +72 -78
  25. package/src/cli/commands/report/contract.ts +40 -1
  26. package/src/cli/commands/report/highlight.ts +27 -0
  27. package/src/cli/commands/report/index.ts +11 -18
  28. package/src/cli/commands/report/renderer.ts +199 -2
  29. package/src/cli/commands/report/types.ts +26 -1
  30. package/src/cli/commands/shared/companion-selection.ts +107 -10
  31. package/src/cli/commands/studio/areas.ts +68 -0
  32. package/src/cli/commands/studio/index.ts +69 -0
  33. package/src/cli/commands/studio/inventory.ts +55 -0
  34. package/src/cli/commands/studio/mate-inventory.ts +43 -0
  35. package/src/cli/commands/studio/openspec-cli.ts +198 -0
  36. package/src/cli/commands/studio/payload.ts +184 -0
  37. package/src/cli/commands/studio/routes.ts +2 -0
  38. package/src/cli/commands/studio/selection.ts +61 -0
  39. package/src/cli/commands/studio/server.ts +201 -0
  40. package/src/cli/commands/studio/snapshot.ts +63 -0
  41. package/src/cli/commands/studio/topology.ts +199 -0
  42. package/src/cli/commands/studio/views/client.ts +197 -0
  43. package/src/cli/commands/studio/views/companion-picker.tsx +91 -0
  44. package/src/cli/commands/studio/views/companion-selector.tsx +90 -0
  45. package/src/cli/commands/studio/views/dashboard/changes.tsx +107 -0
  46. package/src/cli/commands/studio/views/dashboard/index.tsx +19 -0
  47. package/src/cli/commands/studio/views/document.tsx +256 -0
  48. package/src/cli/commands/studio/views/error.tsx +20 -0
  49. package/src/cli/commands/studio/views/model.ts +34 -0
  50. package/src/cli/commands/studio/views/pairings.tsx +38 -0
  51. package/src/cli/commands/studio/views/skills/index.tsx +87 -0
  52. package/src/cli/commands/studio/views/specs/index.tsx +101 -0
  53. package/src/cli/commands/studio/views/styles.ts +389 -0
  54. package/src/cli/commands/studio/views/warnings.tsx +21 -0
  55. package/src/cli/commands/studio/views/workflow/index.tsx +21 -0
  56. package/src/cli/commands/studio/views/workflow/steps.ts +329 -0
  57. package/src/cli/commands/studio/views/workflow/transcript.tsx +190 -0
  58. package/src/cli/commands/unwrap.ts +70 -0
  59. package/src/cli/commands/wrap.ts +164 -0
  60. package/src/cli/main.ts +68 -19
  61. package/src/cli/parse-flags.ts +36 -11
  62. package/src/cli/usage.ts +12 -3
  63. package/src/framework.ts +1 -7
  64. package/src/hooks/session-banner.ts +64 -11
  65. package/src/hooks/session-guidance.ts +40 -0
  66. package/src/hooks/validate-artifact-path.ts +108 -35
  67. package/src/lib/fs-utils.ts +9 -0
  68. package/src/lib/install.ts +33 -0
  69. package/src/lib/orchestrator/adapters/base.ts +14 -125
  70. package/src/lib/orchestrator/adapters/claude.ts +0 -11
  71. package/src/lib/orchestrator/adapters/opencode.ts +2 -32
  72. package/src/lib/orchestrator/companion-git-sync.ts +94 -84
  73. package/src/lib/orchestrator/config-store.ts +2 -21
  74. package/src/lib/orchestrator/editor.ts +12 -22
  75. package/src/lib/orchestrator/framework-context.ts +17 -6
  76. package/src/lib/orchestrator/global-config-store.ts +1 -1
  77. package/src/lib/orchestrator/launcher.ts +97 -7
  78. package/src/lib/orchestrator/opencode-guidance.ts +4 -56
  79. package/src/lib/orchestrator/projection-claude-entry.ts +198 -0
  80. package/src/lib/orchestrator/projection-claude-skills.ts +120 -0
  81. package/src/lib/orchestrator/projection-companion-link.ts +62 -0
  82. package/src/lib/orchestrator/projection-entries.ts +377 -0
  83. package/src/lib/orchestrator/projection-record.ts +56 -0
  84. package/src/lib/orchestrator/projection-runtime-documents.ts +424 -0
  85. package/src/lib/orchestrator/projection-types.ts +169 -0
  86. package/src/lib/orchestrator/repo-local-registry.ts +37 -133
  87. package/src/lib/orchestrator/repo-local-store.ts +96 -0
  88. package/src/lib/orchestrator/setup-compatibilities.ts +1 -9
  89. package/src/lib/orchestrator/types.ts +1 -0
  90. package/src/lib/orchestrator/working-repo-projection.ts +366 -0
  91. package/src/lib/orchestrator/workspace-inventory.ts +1 -1
  92. package/src/lib/package-paths.ts +11 -1
  93. package/src/lib/public-npm.ts +2 -1
  94. package/src/lib/update-checker.ts +15 -9
  95. package/src/opencode/companion-hooks.ts +89 -245
  96. package/src/opencode/companion-policy.ts +35 -10
  97. package/src/opencode/index.ts +1 -0
  98. package/src/opencode/projected-guidance.ts +56 -0
  99. package/src/opencode/tui.tsx +13 -4
  100. package/src/playbooks/companion-guidance.ts +32 -116
  101. package/src/plugins.ts +0 -1
  102. package/src/runtime/companion-git-state.ts +156 -0
  103. package/src/runtime/companion-git.ts +203 -0
  104. package/src/runtime/companion-guidance.ts +222 -0
  105. package/src/runtime/companion-sync.ts +298 -0
  106. package/src/runtime/env-names.ts +30 -0
  107. package/src/runtime/env.ts +67 -35
  108. package/src/runtime/framework.ts +10 -0
  109. package/src/runtime/freshness.ts +58 -0
  110. package/src/runtime/index.ts +104 -0
  111. package/src/runtime/install.ts +30 -0
  112. package/src/runtime/policy.ts +66 -0
  113. package/src/runtime/projected-guidance.ts +45 -0
  114. package/src/runtime/projection.ts +224 -0
  115. package/src/runtime/repo-local.ts +64 -0
  116. package/src/templates/capabilities/openspec-cap/mate-minimal/schema.yaml +56 -0
  117. package/src/templates/capabilities/openspec-cap/mate-minimal/templates/spec.md +48 -0
  118. package/src/templates/capabilities/openspec-cap/mate-minimal/templates/tasks.md +22 -0
  119. package/src/templates/capabilities/openspec-cap/mate-v1/schema.yaml +31 -90
  120. package/src/templates/capabilities/openspec-cap/mate-v1/templates/design.md +3 -0
  121. package/src/templates/capabilities/openspec-cap/mate-v1/templates/explore-brief.md +6 -6
  122. package/src/templates/capabilities/openspec-cap/mate-v1/templates/spec.md +3 -5
  123. package/src/templates/capabilities/openspec-cap/mate-v1/templates/tasks.md +3 -0
  124. package/src/templates/capabilities/openspec-cap/openspec-conventions.yaml +30 -0
  125. package/src/templates/capabilities/react-doctor/claude/hooks/react-doctor.sh +2 -2
  126. package/src/templates/mate-skills/agents/mate-artifact-publish/SKILL.md +185 -0
  127. package/src/templates/mate-skills/agents/mate-artifact-publish/references/openspec.md +227 -0
  128. package/src/templates/mate-skills/agents/mate-domain-modeling/SKILL.md +68 -0
  129. package/src/templates/mate-skills/agents/mate-domain-modeling/references/ADR-FORMAT.md +9 -0
  130. package/src/templates/mate-skills/agents/mate-domain-modeling/references/CONTEXT-FORMAT.md +18 -0
  131. package/src/templates/mate-skills/agents/mate-grill-me/SKILL.md +14 -0
  132. package/src/templates/mate-skills/agents/mate-grill-with-docs/SKILL.md +29 -0
  133. package/src/templates/mate-skills/agents/mate-grilling/SKILL.md +49 -0
  134. package/src/templates/mate-skills/agents/mate-interview-me/SKILL.md +156 -0
  135. package/src/templates/{capabilities/openspec-cap/mate-skills → mate-skills}/agents/mate-openspec-backfill/SKILL.md +4 -2
  136. package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +139 -0
  137. package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +503 -0
  138. package/src/templates/mate-skills/claude/mate-artifact-publish/SKILL.md +185 -0
  139. package/src/templates/mate-skills/claude/mate-artifact-publish/references/openspec.md +227 -0
  140. package/src/templates/mate-skills/claude/mate-domain-modeling/SKILL.md +68 -0
  141. package/src/templates/mate-skills/claude/mate-domain-modeling/references/ADR-FORMAT.md +9 -0
  142. package/src/templates/mate-skills/claude/mate-domain-modeling/references/CONTEXT-FORMAT.md +18 -0
  143. package/src/templates/mate-skills/claude/mate-grill-me/SKILL.md +14 -0
  144. package/src/templates/mate-skills/claude/mate-grill-with-docs/SKILL.md +29 -0
  145. package/src/templates/mate-skills/claude/mate-grilling/SKILL.md +49 -0
  146. package/src/templates/mate-skills/claude/mate-interview-me/SKILL.md +156 -0
  147. package/src/templates/mate-skills/claude/mate-openspec-backfill/SKILL.md +67 -0
  148. package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +139 -0
  149. package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +503 -0
  150. package/src/templates/report-assets/README.md +32 -0
  151. package/src/templates/report-assets/mermaid.LICENSE +21 -0
  152. package/src/templates/report-assets/mermaid.min.js +4376 -0
  153. package/src/templates/root/TEMPLATE_CLAUDE.md +1 -9
  154. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +1476 -197
  155. package/src/tools/setup/capabilities/graphify.ts +16 -7
  156. package/src/tools/setup/capabilities/openspec.ts +63 -56
  157. package/src/tools/setup/capabilities/tokensave.ts +116 -2
  158. package/src/tools/setup/engine.ts +34 -6
  159. package/src/tools/setup/mate.ts +42 -13
  160. package/src/tools/setup/plugin.ts +9 -0
  161. package/src/tools/setup/plugins/guidance.ts +11 -1
  162. package/src/tools/setup/providers/claude-format.ts +49 -4
  163. package/src/tools/setup/providers/claude-plugin-hooks.ts +117 -0
  164. package/src/tools/setup/providers/claude.ts +55 -220
  165. package/src/tools/setup/providers/opencode.ts +41 -14
  166. package/src/tools/setup/runtime-documents.ts +174 -0
  167. package/src/tools/setup/surface-target.ts +50 -0
  168. package/src/tools/setup/working-repo-cleanup.ts +33 -26
  169. package/src/tools/setup/working-repo-local-state.ts +21 -1
  170. package/src/tools/setup.ts +25 -3
  171. package/wrappers/bin/graphify +57 -8
  172. package/wrappers/bin/openspec +50 -3
  173. package/claude-plugin/hooks/artifact-finish-nudge.mjs +0 -8
  174. package/src/cli/commands/cap/headroom.ts +0 -52
  175. package/src/cli/commands/workspace/list.ts +0 -25
  176. package/src/cli/commands/workspace/materialize.ts +0 -46
  177. package/src/cli/commands/workspace/workspace.ts +0 -22
  178. package/src/hooks/artifact-finish-nudge.ts +0 -244
  179. package/src/lib/orchestrator/headroom/proxy.ts +0 -116
  180. package/src/lib/orchestrator/workspace-materialize.ts +0 -80
  181. package/src/templates/capabilities/openspec-cap/mate-skills/agents/mate-artifact-finish/SKILL.md +0 -51
  182. package/src/templates/capabilities/openspec-cap/mate-skills/agents/mate-artifact-finish/references/openspec.md +0 -134
  183. package/src/templates/capabilities/openspec-cap/mate-skills/claude/mate-artifact-finish/SKILL.md +0 -58
  184. package/src/templates/capabilities/openspec-cap/mate-skills/claude/mate-artifact-finish/references/openspec.md +0 -139
  185. package/src/tools/setup/capabilities/headroom.ts +0 -57
  186. /package/src/cli/commands/{workspace → companion}/open.ts +0 -0
@@ -19,15 +19,7 @@ exports[`runtime surface golden fixtures setup graphify × claude 1`] = `
19
19
  "mcpServers": {},
20
20
  },
21
21
  "claudeMd":
22
- "<!-- MATE:COMPANION:START -->
23
-
24
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
25
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
26
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
27
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
28
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
29
-
30
- <!-- MATE:COMPANION:END -->
22
+ "@AGENTS.md
31
23
  "
32
24
  ,
33
25
  "claudeSettingsLocal": {
@@ -141,6 +133,85 @@ exports[`runtime surface golden fixtures setup graphify × claude 2`] = `
141
133
  }
142
134
  `;
143
135
 
136
+ exports[`runtime surface golden fixtures setup graphify × claude 3`] = `
137
+ [
138
+ {
139
+ "path": ".claude/settings.local.json",
140
+ "regions": [
141
+ {
142
+ "at": [
143
+ "hooks",
144
+ "PreToolUse",
145
+ ],
146
+ "kind": "list",
147
+ "values": [
148
+ {
149
+ "hooks": [
150
+ {
151
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
152
+ "type": "command",
153
+ },
154
+ ],
155
+ "matcher": "Write|Edit|MultiEdit|Bash",
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ "at": [
161
+ "hooks",
162
+ "SessionStart",
163
+ ],
164
+ "kind": "list",
165
+ "values": [
166
+ {
167
+ "hooks": [
168
+ {
169
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
170
+ "type": "command",
171
+ },
172
+ ],
173
+ },
174
+ {
175
+ "hooks": [
176
+ {
177
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
178
+ "type": "command",
179
+ },
180
+ ],
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ "at": [
186
+ "env",
187
+ ],
188
+ "entries": {
189
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
190
+ },
191
+ "kind": "map",
192
+ "stripPrefix": "MATE_",
193
+ },
194
+ {
195
+ "at": [
196
+ "permissions",
197
+ "allow",
198
+ ],
199
+ "kind": "list",
200
+ "values": [
201
+ "Bash(mate:*)",
202
+ "Read(<root>/companion/**)",
203
+ "Edit(<root>/companion/**)",
204
+ "Skill(graphify)",
205
+ "Bash(graphify:*)",
206
+ "Bash(mate cap graphify:*)",
207
+ "Bash(<wrapper-bin>/graphify:*)",
208
+ ],
209
+ },
210
+ ],
211
+ },
212
+ ]
213
+ `;
214
+
144
215
  exports[`runtime surface golden fixtures setup graphify × opencode 1`] = `
145
216
  {
146
217
  "agentsMd":
@@ -168,7 +239,7 @@ exports[`runtime surface golden fixtures setup graphify × opencode 1`] = `
168
239
  "reserved": 15000,
169
240
  },
170
241
  "plugin": [
171
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
242
+ "@uniqbit/mate-opencode-plugin@0.15.5",
172
243
  ],
173
244
  "references": {
174
245
  "mate": "..",
@@ -204,7 +275,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
204
275
  "opencodeTui": {
205
276
  "$schema": "https://opencode.ai/tui.json",
206
277
  "plugin": [
207
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
278
+ "@uniqbit/mate-opencode-plugin@0.15.5",
208
279
  ],
209
280
  },
210
281
  }
@@ -281,6 +352,36 @@ exports[`runtime surface golden fixtures setup graphify × opencode 2`] = `
281
352
  }
282
353
  `;
283
354
 
355
+ exports[`runtime surface golden fixtures setup graphify × opencode 3`] = `
356
+ [
357
+ {
358
+ "path": ".opencode/opencode.json",
359
+ "regions": [
360
+ {
361
+ "at": [
362
+ "plugin",
363
+ ],
364
+ "kind": "list",
365
+ "values": [
366
+ "@uniqbit/mate-opencode-plugin@0.15.5",
367
+ ],
368
+ },
369
+ {
370
+ "at": [
371
+ "permission",
372
+ "external_directory",
373
+ ],
374
+ "entries": {
375
+ "<root>/companion": "allow",
376
+ "<root>/companion/**": "allow",
377
+ },
378
+ "kind": "map",
379
+ },
380
+ ],
381
+ },
382
+ ]
383
+ `;
384
+
284
385
  exports[`runtime surface golden fixtures setup graphify × claude+opencode 1`] = `
285
386
  {
286
387
  "agentsMd":
@@ -300,15 +401,7 @@ exports[`runtime surface golden fixtures setup graphify × claude+opencode 1`] =
300
401
  "mcpServers": {},
301
402
  },
302
403
  "claudeMd":
303
- "<!-- MATE:COMPANION:START -->
304
-
305
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
306
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
307
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
308
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
309
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
310
-
311
- <!-- MATE:COMPANION:END -->
404
+ "@AGENTS.md
312
405
  "
313
406
  ,
314
407
  "claudeSettingsLocal": {
@@ -363,7 +456,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
363
456
  "reserved": 15000,
364
457
  },
365
458
  "plugin": [
366
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
459
+ "@uniqbit/mate-opencode-plugin@0.15.5",
367
460
  ],
368
461
  "references": {
369
462
  "mate": "..",
@@ -399,7 +492,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
399
492
  "opencodeTui": {
400
493
  "$schema": "https://opencode.ai/tui.json",
401
494
  "plugin": [
402
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
495
+ "@uniqbit/mate-opencode-plugin@0.15.5",
403
496
  ],
404
497
  },
405
498
  }
@@ -531,6 +624,110 @@ exports[`runtime surface golden fixtures setup graphify × claude+opencode 2`] =
531
624
  }
532
625
  `;
533
626
 
627
+ exports[`runtime surface golden fixtures setup graphify × claude+opencode 3`] = `
628
+ [
629
+ {
630
+ "path": ".claude/settings.local.json",
631
+ "regions": [
632
+ {
633
+ "at": [
634
+ "hooks",
635
+ "PreToolUse",
636
+ ],
637
+ "kind": "list",
638
+ "values": [
639
+ {
640
+ "hooks": [
641
+ {
642
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
643
+ "type": "command",
644
+ },
645
+ ],
646
+ "matcher": "Write|Edit|MultiEdit|Bash",
647
+ },
648
+ ],
649
+ },
650
+ {
651
+ "at": [
652
+ "hooks",
653
+ "SessionStart",
654
+ ],
655
+ "kind": "list",
656
+ "values": [
657
+ {
658
+ "hooks": [
659
+ {
660
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
661
+ "type": "command",
662
+ },
663
+ ],
664
+ },
665
+ {
666
+ "hooks": [
667
+ {
668
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
669
+ "type": "command",
670
+ },
671
+ ],
672
+ },
673
+ ],
674
+ },
675
+ {
676
+ "at": [
677
+ "env",
678
+ ],
679
+ "entries": {
680
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
681
+ },
682
+ "kind": "map",
683
+ "stripPrefix": "MATE_",
684
+ },
685
+ {
686
+ "at": [
687
+ "permissions",
688
+ "allow",
689
+ ],
690
+ "kind": "list",
691
+ "values": [
692
+ "Bash(mate:*)",
693
+ "Read(<root>/companion/**)",
694
+ "Edit(<root>/companion/**)",
695
+ "Skill(graphify)",
696
+ "Bash(graphify:*)",
697
+ "Bash(mate cap graphify:*)",
698
+ "Bash(<wrapper-bin>/graphify:*)",
699
+ ],
700
+ },
701
+ ],
702
+ },
703
+ {
704
+ "path": ".opencode/opencode.json",
705
+ "regions": [
706
+ {
707
+ "at": [
708
+ "plugin",
709
+ ],
710
+ "kind": "list",
711
+ "values": [
712
+ "@uniqbit/mate-opencode-plugin@0.15.5",
713
+ ],
714
+ },
715
+ {
716
+ "at": [
717
+ "permission",
718
+ "external_directory",
719
+ ],
720
+ "entries": {
721
+ "<root>/companion": "allow",
722
+ "<root>/companion/**": "allow",
723
+ },
724
+ "kind": "map",
725
+ },
726
+ ],
727
+ },
728
+ ]
729
+ `;
730
+
534
731
  exports[`runtime surface golden fixtures setup tokensave × claude 1`] = `
535
732
  {
536
733
  "agentsMd":
@@ -557,15 +754,7 @@ exports[`runtime surface golden fixtures setup tokensave × claude 1`] = `
557
754
  },
558
755
  },
559
756
  "claudeMd":
560
- "<!-- MATE:COMPANION:START -->
561
-
562
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
563
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
564
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
565
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
566
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
567
-
568
- <!-- MATE:COMPANION:END -->
757
+ "@AGENTS.md
569
758
  "
570
759
  ,
571
760
  "claudeSettingsLocal": {
@@ -686,6 +875,103 @@ exports[`runtime surface golden fixtures setup tokensave × claude 2`] = `
686
875
  }
687
876
  `;
688
877
 
878
+ exports[`runtime surface golden fixtures setup tokensave × claude 3`] = `
879
+ [
880
+ {
881
+ "path": ".claude/settings.local.json",
882
+ "regions": [
883
+ {
884
+ "at": [
885
+ "hooks",
886
+ "PreToolUse",
887
+ ],
888
+ "kind": "list",
889
+ "values": [
890
+ {
891
+ "hooks": [
892
+ {
893
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
894
+ "type": "command",
895
+ },
896
+ ],
897
+ "matcher": "Write|Edit|MultiEdit|Bash",
898
+ },
899
+ ],
900
+ },
901
+ {
902
+ "at": [
903
+ "hooks",
904
+ "SessionStart",
905
+ ],
906
+ "kind": "list",
907
+ "values": [
908
+ {
909
+ "hooks": [
910
+ {
911
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
912
+ "type": "command",
913
+ },
914
+ ],
915
+ },
916
+ {
917
+ "hooks": [
918
+ {
919
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
920
+ "type": "command",
921
+ },
922
+ ],
923
+ },
924
+ ],
925
+ },
926
+ {
927
+ "at": [
928
+ "env",
929
+ ],
930
+ "entries": {
931
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
932
+ },
933
+ "kind": "map",
934
+ "stripPrefix": "MATE_",
935
+ },
936
+ {
937
+ "at": [
938
+ "permissions",
939
+ "allow",
940
+ ],
941
+ "kind": "list",
942
+ "values": [
943
+ "Bash(mate:*)",
944
+ "Read(<root>/companion/**)",
945
+ "Edit(<root>/companion/**)",
946
+ "mcp__tokensave__*",
947
+ ],
948
+ },
949
+ ],
950
+ },
951
+ {
952
+ "path": "~/.claude.json",
953
+ "regions": [
954
+ {
955
+ "at": [
956
+ "projects",
957
+ "<root>/working",
958
+ "mcpServers",
959
+ ],
960
+ "entries": {
961
+ "tokensave": {
962
+ "args": [
963
+ "serve",
964
+ ],
965
+ "command": "tokensave",
966
+ },
967
+ },
968
+ "kind": "map",
969
+ },
970
+ ],
971
+ },
972
+ ]
973
+ `;
974
+
689
975
  exports[`runtime surface golden fixtures setup tokensave × opencode 1`] = `
690
976
  {
691
977
  "agentsMd":
@@ -723,7 +1009,7 @@ exports[`runtime surface golden fixtures setup tokensave × opencode 1`] = `
723
1009
  },
724
1010
  },
725
1011
  "plugin": [
726
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1012
+ "@uniqbit/mate-opencode-plugin@0.15.5",
727
1013
  ],
728
1014
  "references": {
729
1015
  "mate": "..",
@@ -738,7 +1024,7 @@ exports[`runtime surface golden fixtures setup tokensave × opencode 1`] = `
738
1024
  "opencodeTui": {
739
1025
  "$schema": "https://opencode.ai/tui.json",
740
1026
  "plugin": [
741
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1027
+ "@uniqbit/mate-opencode-plugin@0.15.5",
742
1028
  ],
743
1029
  },
744
1030
  }
@@ -812,6 +1098,52 @@ exports[`runtime surface golden fixtures setup tokensave × opencode 2`] = `
812
1098
  }
813
1099
  `;
814
1100
 
1101
+ exports[`runtime surface golden fixtures setup tokensave × opencode 3`] = `
1102
+ [
1103
+ {
1104
+ "path": ".opencode/opencode.json",
1105
+ "regions": [
1106
+ {
1107
+ "at": [
1108
+ "plugin",
1109
+ ],
1110
+ "kind": "list",
1111
+ "values": [
1112
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1113
+ ],
1114
+ },
1115
+ {
1116
+ "at": [
1117
+ "mcp",
1118
+ ],
1119
+ "entries": {
1120
+ "tokensave": {
1121
+ "command": [
1122
+ "tokensave",
1123
+ "serve",
1124
+ ],
1125
+ "enabled": true,
1126
+ "type": "local",
1127
+ },
1128
+ },
1129
+ "kind": "map",
1130
+ },
1131
+ {
1132
+ "at": [
1133
+ "permission",
1134
+ "external_directory",
1135
+ ],
1136
+ "entries": {
1137
+ "<root>/companion": "allow",
1138
+ "<root>/companion/**": "allow",
1139
+ },
1140
+ "kind": "map",
1141
+ },
1142
+ ],
1143
+ },
1144
+ ]
1145
+ `;
1146
+
815
1147
  exports[`runtime surface golden fixtures setup tokensave × claude+opencode 1`] = `
816
1148
  {
817
1149
  "agentsMd":
@@ -838,15 +1170,7 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 1`]
838
1170
  },
839
1171
  },
840
1172
  "claudeMd":
841
- "<!-- MATE:COMPANION:START -->
842
-
843
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
844
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
845
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
846
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
847
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
848
-
849
- <!-- MATE:COMPANION:END -->
1173
+ "@AGENTS.md
850
1174
  "
851
1175
  ,
852
1176
  "claudeSettingsLocal": {
@@ -921,7 +1245,7 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 1`]
921
1245
  },
922
1246
  },
923
1247
  "plugin": [
924
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1248
+ "@uniqbit/mate-opencode-plugin@0.15.5",
925
1249
  ],
926
1250
  "references": {
927
1251
  "mate": "..",
@@ -936,7 +1260,7 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 1`]
936
1260
  "opencodeTui": {
937
1261
  "$schema": "https://opencode.ai/tui.json",
938
1262
  "plugin": [
939
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1263
+ "@uniqbit/mate-opencode-plugin@0.15.5",
940
1264
  ],
941
1265
  },
942
1266
  }
@@ -1062,6 +1386,144 @@ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 2`]
1062
1386
  }
1063
1387
  `;
1064
1388
 
1389
+ exports[`runtime surface golden fixtures setup tokensave × claude+opencode 3`] = `
1390
+ [
1391
+ {
1392
+ "path": ".claude/settings.local.json",
1393
+ "regions": [
1394
+ {
1395
+ "at": [
1396
+ "hooks",
1397
+ "PreToolUse",
1398
+ ],
1399
+ "kind": "list",
1400
+ "values": [
1401
+ {
1402
+ "hooks": [
1403
+ {
1404
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
1405
+ "type": "command",
1406
+ },
1407
+ ],
1408
+ "matcher": "Write|Edit|MultiEdit|Bash",
1409
+ },
1410
+ ],
1411
+ },
1412
+ {
1413
+ "at": [
1414
+ "hooks",
1415
+ "SessionStart",
1416
+ ],
1417
+ "kind": "list",
1418
+ "values": [
1419
+ {
1420
+ "hooks": [
1421
+ {
1422
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
1423
+ "type": "command",
1424
+ },
1425
+ ],
1426
+ },
1427
+ {
1428
+ "hooks": [
1429
+ {
1430
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
1431
+ "type": "command",
1432
+ },
1433
+ ],
1434
+ },
1435
+ ],
1436
+ },
1437
+ {
1438
+ "at": [
1439
+ "env",
1440
+ ],
1441
+ "entries": {
1442
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
1443
+ },
1444
+ "kind": "map",
1445
+ "stripPrefix": "MATE_",
1446
+ },
1447
+ {
1448
+ "at": [
1449
+ "permissions",
1450
+ "allow",
1451
+ ],
1452
+ "kind": "list",
1453
+ "values": [
1454
+ "Bash(mate:*)",
1455
+ "Read(<root>/companion/**)",
1456
+ "Edit(<root>/companion/**)",
1457
+ "mcp__tokensave__*",
1458
+ ],
1459
+ },
1460
+ ],
1461
+ },
1462
+ {
1463
+ "path": "~/.claude.json",
1464
+ "regions": [
1465
+ {
1466
+ "at": [
1467
+ "projects",
1468
+ "<root>/working",
1469
+ "mcpServers",
1470
+ ],
1471
+ "entries": {
1472
+ "tokensave": {
1473
+ "args": [
1474
+ "serve",
1475
+ ],
1476
+ "command": "tokensave",
1477
+ },
1478
+ },
1479
+ "kind": "map",
1480
+ },
1481
+ ],
1482
+ },
1483
+ {
1484
+ "path": ".opencode/opencode.json",
1485
+ "regions": [
1486
+ {
1487
+ "at": [
1488
+ "plugin",
1489
+ ],
1490
+ "kind": "list",
1491
+ "values": [
1492
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1493
+ ],
1494
+ },
1495
+ {
1496
+ "at": [
1497
+ "mcp",
1498
+ ],
1499
+ "entries": {
1500
+ "tokensave": {
1501
+ "command": [
1502
+ "tokensave",
1503
+ "serve",
1504
+ ],
1505
+ "enabled": true,
1506
+ "type": "local",
1507
+ },
1508
+ },
1509
+ "kind": "map",
1510
+ },
1511
+ {
1512
+ "at": [
1513
+ "permission",
1514
+ "external_directory",
1515
+ ],
1516
+ "entries": {
1517
+ "<root>/companion": "allow",
1518
+ "<root>/companion/**": "allow",
1519
+ },
1520
+ "kind": "map",
1521
+ },
1522
+ ],
1523
+ },
1524
+ ]
1525
+ `;
1526
+
1065
1527
  exports[`runtime surface golden fixtures setup context-mode × claude 1`] = `
1066
1528
  {
1067
1529
  "agentsMd":
@@ -1081,15 +1543,7 @@ exports[`runtime surface golden fixtures setup context-mode × claude 1`] = `
1081
1543
  "mcpServers": {},
1082
1544
  },
1083
1545
  "claudeMd":
1084
- "<!-- MATE:COMPANION:START -->
1085
-
1086
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1087
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1088
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1089
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1090
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1091
-
1092
- <!-- MATE:COMPANION:END -->
1546
+ "@AGENTS.md
1093
1547
  "
1094
1548
  ,
1095
1549
  "claudeSettingsLocal": {
@@ -1163,6 +1617,83 @@ exports[`runtime surface golden fixtures setup context-mode × claude 2`] = `
1163
1617
  }
1164
1618
  `;
1165
1619
 
1620
+ exports[`runtime surface golden fixtures setup context-mode × claude 3`] = `
1621
+ [
1622
+ {
1623
+ "path": ".claude/settings.local.json",
1624
+ "regions": [
1625
+ {
1626
+ "at": [
1627
+ "hooks",
1628
+ "PreToolUse",
1629
+ ],
1630
+ "kind": "list",
1631
+ "values": [
1632
+ {
1633
+ "hooks": [
1634
+ {
1635
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
1636
+ "type": "command",
1637
+ },
1638
+ ],
1639
+ "matcher": "Write|Edit|MultiEdit|Bash",
1640
+ },
1641
+ ],
1642
+ },
1643
+ {
1644
+ "at": [
1645
+ "hooks",
1646
+ "SessionStart",
1647
+ ],
1648
+ "kind": "list",
1649
+ "values": [
1650
+ {
1651
+ "hooks": [
1652
+ {
1653
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
1654
+ "type": "command",
1655
+ },
1656
+ ],
1657
+ },
1658
+ {
1659
+ "hooks": [
1660
+ {
1661
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
1662
+ "type": "command",
1663
+ },
1664
+ ],
1665
+ },
1666
+ ],
1667
+ },
1668
+ {
1669
+ "at": [
1670
+ "env",
1671
+ ],
1672
+ "entries": {
1673
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
1674
+ },
1675
+ "kind": "map",
1676
+ "stripPrefix": "MATE_",
1677
+ },
1678
+ {
1679
+ "at": [
1680
+ "permissions",
1681
+ "allow",
1682
+ ],
1683
+ "kind": "list",
1684
+ "values": [
1685
+ "Bash(mate:*)",
1686
+ "Read(<root>/companion/**)",
1687
+ "Edit(<root>/companion/**)",
1688
+ "Skill(context-mode:context-mode)",
1689
+ "mcp__plugin_context-mode_context-mode__*",
1690
+ ],
1691
+ },
1692
+ ],
1693
+ },
1694
+ ]
1695
+ `;
1696
+
1166
1697
  exports[`runtime surface golden fixtures setup context-mode × opencode 1`] = `
1167
1698
  {
1168
1699
  "agentsMd":
@@ -1198,7 +1729,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1198
1729
  "reserved": 15000,
1199
1730
  },
1200
1731
  "plugin": [
1201
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1732
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1202
1733
  "context-mode@1.0.169",
1203
1734
  ],
1204
1735
  "references": {
@@ -1214,7 +1745,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1214
1745
  "opencodeTui": {
1215
1746
  "$schema": "https://opencode.ai/tui.json",
1216
1747
  "plugin": [
1217
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1748
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1218
1749
  "context-mode@1.0.169",
1219
1750
  ],
1220
1751
  },
@@ -1281,6 +1812,36 @@ exports[`runtime surface golden fixtures setup context-mode × opencode 2`] = `
1281
1812
  }
1282
1813
  `;
1283
1814
 
1815
+ exports[`runtime surface golden fixtures setup context-mode × opencode 3`] = `
1816
+ [
1817
+ {
1818
+ "path": ".opencode/opencode.json",
1819
+ "regions": [
1820
+ {
1821
+ "at": [
1822
+ "plugin",
1823
+ ],
1824
+ "kind": "list",
1825
+ "values": [
1826
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1827
+ ],
1828
+ },
1829
+ {
1830
+ "at": [
1831
+ "permission",
1832
+ "external_directory",
1833
+ ],
1834
+ "entries": {
1835
+ "<root>/companion": "allow",
1836
+ "<root>/companion/**": "allow",
1837
+ },
1838
+ "kind": "map",
1839
+ },
1840
+ ],
1841
+ },
1842
+ ]
1843
+ `;
1844
+
1284
1845
  exports[`runtime surface golden fixtures setup context-mode × claude+opencode 1`] = `
1285
1846
  {
1286
1847
  "agentsMd":
@@ -1308,15 +1869,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1308
1869
  "mcpServers": {},
1309
1870
  },
1310
1871
  "claudeMd":
1311
- "<!-- MATE:COMPANION:START -->
1312
-
1313
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1314
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1315
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1316
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1317
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1318
-
1319
- <!-- MATE:COMPANION:END -->
1872
+ "@AGENTS.md
1320
1873
  "
1321
1874
  ,
1322
1875
  "claudeSettingsLocal": {
@@ -1340,7 +1893,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1340
1893
  "reserved": 15000,
1341
1894
  },
1342
1895
  "plugin": [
1343
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1896
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1344
1897
  "context-mode@1.0.169",
1345
1898
  ],
1346
1899
  "references": {
@@ -1356,7 +1909,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1356
1909
  "opencodeTui": {
1357
1910
  "$schema": "https://opencode.ai/tui.json",
1358
1911
  "plugin": [
1359
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
1912
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1360
1913
  "context-mode@1.0.169",
1361
1914
  ],
1362
1915
  },
@@ -1469,6 +2022,108 @@ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 2
1469
2022
  }
1470
2023
  `;
1471
2024
 
2025
+ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 3`] = `
2026
+ [
2027
+ {
2028
+ "path": ".claude/settings.local.json",
2029
+ "regions": [
2030
+ {
2031
+ "at": [
2032
+ "hooks",
2033
+ "PreToolUse",
2034
+ ],
2035
+ "kind": "list",
2036
+ "values": [
2037
+ {
2038
+ "hooks": [
2039
+ {
2040
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
2041
+ "type": "command",
2042
+ },
2043
+ ],
2044
+ "matcher": "Write|Edit|MultiEdit|Bash",
2045
+ },
2046
+ ],
2047
+ },
2048
+ {
2049
+ "at": [
2050
+ "hooks",
2051
+ "SessionStart",
2052
+ ],
2053
+ "kind": "list",
2054
+ "values": [
2055
+ {
2056
+ "hooks": [
2057
+ {
2058
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
2059
+ "type": "command",
2060
+ },
2061
+ ],
2062
+ },
2063
+ {
2064
+ "hooks": [
2065
+ {
2066
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
2067
+ "type": "command",
2068
+ },
2069
+ ],
2070
+ },
2071
+ ],
2072
+ },
2073
+ {
2074
+ "at": [
2075
+ "env",
2076
+ ],
2077
+ "entries": {
2078
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
2079
+ },
2080
+ "kind": "map",
2081
+ "stripPrefix": "MATE_",
2082
+ },
2083
+ {
2084
+ "at": [
2085
+ "permissions",
2086
+ "allow",
2087
+ ],
2088
+ "kind": "list",
2089
+ "values": [
2090
+ "Bash(mate:*)",
2091
+ "Read(<root>/companion/**)",
2092
+ "Edit(<root>/companion/**)",
2093
+ "Skill(context-mode:context-mode)",
2094
+ "mcp__plugin_context-mode_context-mode__*",
2095
+ ],
2096
+ },
2097
+ ],
2098
+ },
2099
+ {
2100
+ "path": ".opencode/opencode.json",
2101
+ "regions": [
2102
+ {
2103
+ "at": [
2104
+ "plugin",
2105
+ ],
2106
+ "kind": "list",
2107
+ "values": [
2108
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2109
+ ],
2110
+ },
2111
+ {
2112
+ "at": [
2113
+ "permission",
2114
+ "external_directory",
2115
+ ],
2116
+ "entries": {
2117
+ "<root>/companion": "allow",
2118
+ "<root>/companion/**": "allow",
2119
+ },
2120
+ "kind": "map",
2121
+ },
2122
+ ],
2123
+ },
2124
+ ]
2125
+ `;
2126
+
1472
2127
  exports[`runtime surface golden fixtures setup react-doctor × claude 1`] = `
1473
2128
  {
1474
2129
  "agentsMd":
@@ -1484,21 +2139,13 @@ exports[`runtime surface golden fixtures setup react-doctor × claude 1`] = `
1484
2139
  "
1485
2140
  ,
1486
2141
  "claudeHooks": {
1487
- "react-doctor.sh": "e25569935b64",
2142
+ "react-doctor.sh": "a33e1b4ac810",
1488
2143
  },
1489
2144
  "claudeMcpConfig": {
1490
2145
  "mcpServers": {},
1491
2146
  },
1492
2147
  "claudeMd":
1493
- "<!-- MATE:COMPANION:START -->
1494
-
1495
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1496
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1497
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1498
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1499
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1500
-
1501
- <!-- MATE:COMPANION:END -->
2148
+ "@AGENTS.md
1502
2149
  "
1503
2150
  ,
1504
2151
  "claudeSettingsLocal": {
@@ -1599,6 +2246,84 @@ exports[`runtime surface golden fixtures setup react-doctor × claude 2`] = `
1599
2246
  }
1600
2247
  `;
1601
2248
 
2249
+ exports[`runtime surface golden fixtures setup react-doctor × claude 3`] = `
2250
+ [
2251
+ {
2252
+ "path": ".claude/settings.local.json",
2253
+ "regions": [
2254
+ {
2255
+ "at": [
2256
+ "hooks",
2257
+ "PreToolUse",
2258
+ ],
2259
+ "kind": "list",
2260
+ "values": [
2261
+ {
2262
+ "hooks": [
2263
+ {
2264
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
2265
+ "type": "command",
2266
+ },
2267
+ ],
2268
+ "matcher": "Write|Edit|MultiEdit|Bash",
2269
+ },
2270
+ ],
2271
+ },
2272
+ {
2273
+ "at": [
2274
+ "hooks",
2275
+ "SessionStart",
2276
+ ],
2277
+ "kind": "list",
2278
+ "values": [
2279
+ {
2280
+ "hooks": [
2281
+ {
2282
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
2283
+ "type": "command",
2284
+ },
2285
+ ],
2286
+ },
2287
+ {
2288
+ "hooks": [
2289
+ {
2290
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
2291
+ "type": "command",
2292
+ },
2293
+ ],
2294
+ },
2295
+ ],
2296
+ },
2297
+ {
2298
+ "at": [
2299
+ "env",
2300
+ ],
2301
+ "entries": {
2302
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
2303
+ },
2304
+ "kind": "map",
2305
+ "stripPrefix": "MATE_",
2306
+ },
2307
+ {
2308
+ "at": [
2309
+ "permissions",
2310
+ "allow",
2311
+ ],
2312
+ "kind": "list",
2313
+ "values": [
2314
+ "Bash(mate:*)",
2315
+ "Read(<root>/companion/**)",
2316
+ "Edit(<root>/companion/**)",
2317
+ "Skill(react-doctor)",
2318
+ "Bash(npx react-doctor:*)",
2319
+ "Bash(npx react-doctor@latest *)",
2320
+ ],
2321
+ },
2322
+ ],
2323
+ },
2324
+ ]
2325
+ `;
2326
+
1602
2327
  exports[`runtime surface golden fixtures setup react-doctor × opencode 1`] = `
1603
2328
  {
1604
2329
  "agentsMd":
@@ -1626,7 +2351,7 @@ exports[`runtime surface golden fixtures setup react-doctor × opencode 1`] = `
1626
2351
  "reserved": 15000,
1627
2352
  },
1628
2353
  "plugin": [
1629
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
2354
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1630
2355
  ],
1631
2356
  "references": {
1632
2357
  "mate": "..",
@@ -1644,7 +2369,7 @@ exports[`runtime surface golden fixtures setup react-doctor × opencode 1`] = `
1644
2369
  "opencodeTui": {
1645
2370
  "$schema": "https://opencode.ai/tui.json",
1646
2371
  "plugin": [
1647
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
2372
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1648
2373
  ],
1649
2374
  },
1650
2375
  }
@@ -1710,6 +2435,36 @@ exports[`runtime surface golden fixtures setup react-doctor × opencode 2`] = `
1710
2435
  }
1711
2436
  `;
1712
2437
 
2438
+ exports[`runtime surface golden fixtures setup react-doctor × opencode 3`] = `
2439
+ [
2440
+ {
2441
+ "path": ".opencode/opencode.json",
2442
+ "regions": [
2443
+ {
2444
+ "at": [
2445
+ "plugin",
2446
+ ],
2447
+ "kind": "list",
2448
+ "values": [
2449
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2450
+ ],
2451
+ },
2452
+ {
2453
+ "at": [
2454
+ "permission",
2455
+ "external_directory",
2456
+ ],
2457
+ "entries": {
2458
+ "<root>/companion": "allow",
2459
+ "<root>/companion/**": "allow",
2460
+ },
2461
+ "kind": "map",
2462
+ },
2463
+ ],
2464
+ },
2465
+ ]
2466
+ `;
2467
+
1713
2468
  exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1`] = `
1714
2469
  {
1715
2470
  "agentsMd":
@@ -1725,21 +2480,13 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1
1725
2480
  "
1726
2481
  ,
1727
2482
  "claudeHooks": {
1728
- "react-doctor.sh": "e25569935b64",
2483
+ "react-doctor.sh": "a33e1b4ac810",
1729
2484
  },
1730
2485
  "claudeMcpConfig": {
1731
2486
  "mcpServers": {},
1732
2487
  },
1733
2488
  "claudeMd":
1734
- "<!-- MATE:COMPANION:START -->
1735
-
1736
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1737
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1738
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1739
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1740
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1741
-
1742
- <!-- MATE:COMPANION:END -->
2489
+ "@AGENTS.md
1743
2490
  "
1744
2491
  ,
1745
2492
  "claudeSettingsLocal": {
@@ -1792,7 +2539,7 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1
1792
2539
  "reserved": 15000,
1793
2540
  },
1794
2541
  "plugin": [
1795
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
2542
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1796
2543
  ],
1797
2544
  "references": {
1798
2545
  "mate": "..",
@@ -1810,7 +2557,7 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 1
1810
2557
  "opencodeTui": {
1811
2558
  "$schema": "https://opencode.ai/tui.json",
1812
2559
  "plugin": [
1813
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
2560
+ "@uniqbit/mate-opencode-plugin@0.15.5",
1814
2561
  ],
1815
2562
  },
1816
2563
  }
@@ -1920,6 +2667,109 @@ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 2
1920
2667
  }
1921
2668
  `;
1922
2669
 
2670
+ exports[`runtime surface golden fixtures setup react-doctor × claude+opencode 3`] = `
2671
+ [
2672
+ {
2673
+ "path": ".claude/settings.local.json",
2674
+ "regions": [
2675
+ {
2676
+ "at": [
2677
+ "hooks",
2678
+ "PreToolUse",
2679
+ ],
2680
+ "kind": "list",
2681
+ "values": [
2682
+ {
2683
+ "hooks": [
2684
+ {
2685
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
2686
+ "type": "command",
2687
+ },
2688
+ ],
2689
+ "matcher": "Write|Edit|MultiEdit|Bash",
2690
+ },
2691
+ ],
2692
+ },
2693
+ {
2694
+ "at": [
2695
+ "hooks",
2696
+ "SessionStart",
2697
+ ],
2698
+ "kind": "list",
2699
+ "values": [
2700
+ {
2701
+ "hooks": [
2702
+ {
2703
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
2704
+ "type": "command",
2705
+ },
2706
+ ],
2707
+ },
2708
+ {
2709
+ "hooks": [
2710
+ {
2711
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
2712
+ "type": "command",
2713
+ },
2714
+ ],
2715
+ },
2716
+ ],
2717
+ },
2718
+ {
2719
+ "at": [
2720
+ "env",
2721
+ ],
2722
+ "entries": {
2723
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
2724
+ },
2725
+ "kind": "map",
2726
+ "stripPrefix": "MATE_",
2727
+ },
2728
+ {
2729
+ "at": [
2730
+ "permissions",
2731
+ "allow",
2732
+ ],
2733
+ "kind": "list",
2734
+ "values": [
2735
+ "Bash(mate:*)",
2736
+ "Read(<root>/companion/**)",
2737
+ "Edit(<root>/companion/**)",
2738
+ "Skill(react-doctor)",
2739
+ "Bash(npx react-doctor:*)",
2740
+ "Bash(npx react-doctor@latest *)",
2741
+ ],
2742
+ },
2743
+ ],
2744
+ },
2745
+ {
2746
+ "path": ".opencode/opencode.json",
2747
+ "regions": [
2748
+ {
2749
+ "at": [
2750
+ "plugin",
2751
+ ],
2752
+ "kind": "list",
2753
+ "values": [
2754
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2755
+ ],
2756
+ },
2757
+ {
2758
+ "at": [
2759
+ "permission",
2760
+ "external_directory",
2761
+ ],
2762
+ "entries": {
2763
+ "<root>/companion": "allow",
2764
+ "<root>/companion/**": "allow",
2765
+ },
2766
+ "kind": "map",
2767
+ },
2768
+ ],
2769
+ },
2770
+ ]
2771
+ `;
2772
+
1923
2773
  exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
1924
2774
  {
1925
2775
  "agentsMd":
@@ -1939,15 +2789,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
1939
2789
  "mcpServers": {},
1940
2790
  },
1941
2791
  "claudeMd":
1942
- "<!-- MATE:COMPANION:START -->
1943
-
1944
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1945
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1946
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1947
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1948
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1949
-
1950
- <!-- MATE:COMPANION:END -->
2792
+ "@AGENTS.md
1951
2793
  "
1952
2794
  ,
1953
2795
  "claudeSettingsLocal": {
@@ -1960,8 +2802,15 @@ exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
1960
2802
  "Bash(openspec:*)",
1961
2803
  "Edit(<root>/companion/**)",
1962
2804
  "Read(<root>/companion/**)",
1963
- "Skill(mate-artifact-finish)",
2805
+ "Skill(mate-artifact-publish)",
2806
+ "Skill(mate-domain-modeling)",
2807
+ "Skill(mate-grill-me)",
2808
+ "Skill(mate-grill-with-docs)",
2809
+ "Skill(mate-grilling)",
2810
+ "Skill(mate-interview-me)",
1964
2811
  "Skill(mate-openspec-backfill)",
2812
+ "Skill(mate-show-me)",
2813
+ "Skill(mate-simplify-code)",
1965
2814
  "Skill(openspec-apply-change)",
1966
2815
  "Skill(openspec-archive-change)",
1967
2816
  "Skill(openspec-explore)",
@@ -1970,6 +2819,19 @@ exports[`runtime surface golden fixtures setup openspec × claude 1`] = `
1970
2819
  },
1971
2820
  },
1972
2821
  "claudeSkills": {
2822
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
2823
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
2824
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
2825
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
2826
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
2827
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
2828
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
2829
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
2830
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
2831
+ "mate-interview-me/SKILL.md": "a922defdf427",
2832
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
2833
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
2834
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
1973
2835
  "openspec-apply-change/SKILL.md": "b023edd228ab",
1974
2836
  "openspec-archive-change/SKILL.md": "890bada99035",
1975
2837
  "openspec-explore/SKILL.md": "477fdec2cdb0",
@@ -2013,7 +2875,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 2`] = `
2013
2875
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in <root>/working when the exact path is gitignored AND intentionally local-only; otherwise use <root>/companion.</rule>
2014
2876
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2015
2877
  <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>
2016
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
2878
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2017
2879
  </mandatory-rules>
2018
2880
  </companion-policy>"
2019
2881
  ,
@@ -2032,6 +2894,97 @@ exports[`runtime surface golden fixtures setup openspec × claude 2`] = `
2032
2894
  }
2033
2895
  `;
2034
2896
 
2897
+ exports[`runtime surface golden fixtures setup openspec × claude 3`] = `
2898
+ [
2899
+ {
2900
+ "path": ".claude/settings.local.json",
2901
+ "regions": [
2902
+ {
2903
+ "at": [
2904
+ "hooks",
2905
+ "PreToolUse",
2906
+ ],
2907
+ "kind": "list",
2908
+ "values": [
2909
+ {
2910
+ "hooks": [
2911
+ {
2912
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
2913
+ "type": "command",
2914
+ },
2915
+ ],
2916
+ "matcher": "Write|Edit|MultiEdit|Bash",
2917
+ },
2918
+ ],
2919
+ },
2920
+ {
2921
+ "at": [
2922
+ "hooks",
2923
+ "SessionStart",
2924
+ ],
2925
+ "kind": "list",
2926
+ "values": [
2927
+ {
2928
+ "hooks": [
2929
+ {
2930
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
2931
+ "type": "command",
2932
+ },
2933
+ ],
2934
+ },
2935
+ {
2936
+ "hooks": [
2937
+ {
2938
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
2939
+ "type": "command",
2940
+ },
2941
+ ],
2942
+ },
2943
+ ],
2944
+ },
2945
+ {
2946
+ "at": [
2947
+ "env",
2948
+ ],
2949
+ "entries": {
2950
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
2951
+ },
2952
+ "kind": "map",
2953
+ "stripPrefix": "MATE_",
2954
+ },
2955
+ {
2956
+ "at": [
2957
+ "permissions",
2958
+ "allow",
2959
+ ],
2960
+ "kind": "list",
2961
+ "values": [
2962
+ "Bash(mate:*)",
2963
+ "Read(<root>/companion/**)",
2964
+ "Edit(<root>/companion/**)",
2965
+ "Skill(openspec-explore)",
2966
+ "Skill(openspec-propose)",
2967
+ "Skill(openspec-apply-change)",
2968
+ "Skill(openspec-archive-change)",
2969
+ "Skill(mate-artifact-publish)",
2970
+ "Skill(mate-openspec-backfill)",
2971
+ "Skill(mate-interview-me)",
2972
+ "Skill(mate-grill-me)",
2973
+ "Skill(mate-grilling)",
2974
+ "Skill(mate-grill-with-docs)",
2975
+ "Skill(mate-domain-modeling)",
2976
+ "Skill(mate-show-me)",
2977
+ "Skill(mate-simplify-code)",
2978
+ "Bash(openspec:*)",
2979
+ "Bash(mate cap graphify:*)",
2980
+ "Bash(<wrapper-bin>/openspec:*)",
2981
+ ],
2982
+ },
2983
+ ],
2984
+ },
2985
+ ]
2986
+ `;
2987
+
2035
2988
  exports[`runtime surface golden fixtures setup openspec × opencode 1`] = `
2036
2989
  {
2037
2990
  "agentsMd":
@@ -2059,7 +3012,7 @@ exports[`runtime surface golden fixtures setup openspec × opencode 1`] = `
2059
3012
  "reserved": 15000,
2060
3013
  },
2061
3014
  "plugin": [
2062
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3015
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2063
3016
  ],
2064
3017
  "references": {
2065
3018
  "mate": "..",
@@ -2071,6 +3024,19 @@ exports[`runtime surface golden fixtures setup openspec × opencode 1`] = `
2071
3024
  },
2072
3025
  "opencodePlugins": {},
2073
3026
  "opencodeSkills": {
3027
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
3028
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
3029
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
3030
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
3031
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
3032
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
3033
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
3034
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
3035
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
3036
+ "mate-interview-me/SKILL.md": "a922defdf427",
3037
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
3038
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
3039
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
2074
3040
  "openspec-apply-change/SKILL.md": "cb6e43b175c8",
2075
3041
  "openspec-archive-change/SKILL.md": "920c4cc68edf",
2076
3042
  "openspec-explore/SKILL.md": "87d1237e5ffa",
@@ -2079,7 +3045,7 @@ exports[`runtime surface golden fixtures setup openspec × opencode 1`] = `
2079
3045
  "opencodeTui": {
2080
3046
  "$schema": "https://opencode.ai/tui.json",
2081
3047
  "plugin": [
2082
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3048
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2083
3049
  ],
2084
3050
  },
2085
3051
  }
@@ -2118,7 +3084,7 @@ exports[`runtime surface golden fixtures setup openspec × opencode 2`] = `
2118
3084
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in $MATE_REPO_PATH when the exact path is gitignored AND intentionally local-only; otherwise use $MATE_ARTIFACT_PATH.</rule>
2119
3085
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2120
3086
  <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>
2121
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
3087
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2122
3088
  </mandatory-rules>
2123
3089
  </companion-policy>"
2124
3090
  ,
@@ -2146,6 +3112,36 @@ exports[`runtime surface golden fixtures setup openspec × opencode 2`] = `
2146
3112
  }
2147
3113
  `;
2148
3114
 
3115
+ exports[`runtime surface golden fixtures setup openspec × opencode 3`] = `
3116
+ [
3117
+ {
3118
+ "path": ".opencode/opencode.json",
3119
+ "regions": [
3120
+ {
3121
+ "at": [
3122
+ "plugin",
3123
+ ],
3124
+ "kind": "list",
3125
+ "values": [
3126
+ "@uniqbit/mate-opencode-plugin@0.15.5",
3127
+ ],
3128
+ },
3129
+ {
3130
+ "at": [
3131
+ "permission",
3132
+ "external_directory",
3133
+ ],
3134
+ "entries": {
3135
+ "<root>/companion": "allow",
3136
+ "<root>/companion/**": "allow",
3137
+ },
3138
+ "kind": "map",
3139
+ },
3140
+ ],
3141
+ },
3142
+ ]
3143
+ `;
3144
+
2149
3145
  exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] = `
2150
3146
  {
2151
3147
  "agentsMd":
@@ -2165,15 +3161,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2165
3161
  "mcpServers": {},
2166
3162
  },
2167
3163
  "claudeMd":
2168
- "<!-- MATE:COMPANION:START -->
2169
-
2170
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2171
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2172
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2173
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2174
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2175
-
2176
- <!-- MATE:COMPANION:END -->
3164
+ "@AGENTS.md
2177
3165
  "
2178
3166
  ,
2179
3167
  "claudeSettingsLocal": {
@@ -2186,8 +3174,15 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2186
3174
  "Bash(openspec:*)",
2187
3175
  "Edit(<root>/companion/**)",
2188
3176
  "Read(<root>/companion/**)",
2189
- "Skill(mate-artifact-finish)",
3177
+ "Skill(mate-artifact-publish)",
3178
+ "Skill(mate-domain-modeling)",
3179
+ "Skill(mate-grill-me)",
3180
+ "Skill(mate-grill-with-docs)",
3181
+ "Skill(mate-grilling)",
3182
+ "Skill(mate-interview-me)",
2190
3183
  "Skill(mate-openspec-backfill)",
3184
+ "Skill(mate-show-me)",
3185
+ "Skill(mate-simplify-code)",
2191
3186
  "Skill(openspec-apply-change)",
2192
3187
  "Skill(openspec-archive-change)",
2193
3188
  "Skill(openspec-explore)",
@@ -2196,6 +3191,19 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2196
3191
  },
2197
3192
  },
2198
3193
  "claudeSkills": {
3194
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
3195
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
3196
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
3197
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
3198
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
3199
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
3200
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
3201
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
3202
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
3203
+ "mate-interview-me/SKILL.md": "a922defdf427",
3204
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
3205
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
3206
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
2199
3207
  "openspec-apply-change/SKILL.md": "b023edd228ab",
2200
3208
  "openspec-archive-change/SKILL.md": "890bada99035",
2201
3209
  "openspec-explore/SKILL.md": "477fdec2cdb0",
@@ -2209,7 +3217,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2209
3217
  "reserved": 15000,
2210
3218
  },
2211
3219
  "plugin": [
2212
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3220
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2213
3221
  ],
2214
3222
  "references": {
2215
3223
  "mate": "..",
@@ -2221,6 +3229,19 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2221
3229
  },
2222
3230
  "opencodePlugins": {},
2223
3231
  "opencodeSkills": {
3232
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
3233
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
3234
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
3235
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
3236
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
3237
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
3238
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
3239
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
3240
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
3241
+ "mate-interview-me/SKILL.md": "a922defdf427",
3242
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
3243
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
3244
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
2224
3245
  "openspec-apply-change/SKILL.md": "cb6e43b175c8",
2225
3246
  "openspec-archive-change/SKILL.md": "920c4cc68edf",
2226
3247
  "openspec-explore/SKILL.md": "87d1237e5ffa",
@@ -2229,7 +3250,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 1`] =
2229
3250
  "opencodeTui": {
2230
3251
  "$schema": "https://opencode.ai/tui.json",
2231
3252
  "plugin": [
2232
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3253
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2233
3254
  ],
2234
3255
  },
2235
3256
  }
@@ -2266,7 +3287,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
2266
3287
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in <root>/working when the exact path is gitignored AND intentionally local-only; otherwise use <root>/companion.</rule>
2267
3288
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2268
3289
  <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>
2269
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
3290
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2270
3291
  </mandatory-rules>
2271
3292
  </companion-policy>"
2272
3293
  ,
@@ -2313,7 +3334,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
2313
3334
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in $MATE_REPO_PATH when the exact path is gitignored AND intentionally local-only; otherwise use $MATE_ARTIFACT_PATH.</rule>
2314
3335
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2315
3336
  <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>
2316
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
3337
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2317
3338
  </mandatory-rules>
2318
3339
  </companion-policy>"
2319
3340
  ,
@@ -2341,6 +3362,122 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
2341
3362
  }
2342
3363
  `;
2343
3364
 
3365
+ exports[`runtime surface golden fixtures setup openspec × claude+opencode 3`] = `
3366
+ [
3367
+ {
3368
+ "path": ".claude/settings.local.json",
3369
+ "regions": [
3370
+ {
3371
+ "at": [
3372
+ "hooks",
3373
+ "PreToolUse",
3374
+ ],
3375
+ "kind": "list",
3376
+ "values": [
3377
+ {
3378
+ "hooks": [
3379
+ {
3380
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
3381
+ "type": "command",
3382
+ },
3383
+ ],
3384
+ "matcher": "Write|Edit|MultiEdit|Bash",
3385
+ },
3386
+ ],
3387
+ },
3388
+ {
3389
+ "at": [
3390
+ "hooks",
3391
+ "SessionStart",
3392
+ ],
3393
+ "kind": "list",
3394
+ "values": [
3395
+ {
3396
+ "hooks": [
3397
+ {
3398
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
3399
+ "type": "command",
3400
+ },
3401
+ ],
3402
+ },
3403
+ {
3404
+ "hooks": [
3405
+ {
3406
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
3407
+ "type": "command",
3408
+ },
3409
+ ],
3410
+ },
3411
+ ],
3412
+ },
3413
+ {
3414
+ "at": [
3415
+ "env",
3416
+ ],
3417
+ "entries": {
3418
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
3419
+ },
3420
+ "kind": "map",
3421
+ "stripPrefix": "MATE_",
3422
+ },
3423
+ {
3424
+ "at": [
3425
+ "permissions",
3426
+ "allow",
3427
+ ],
3428
+ "kind": "list",
3429
+ "values": [
3430
+ "Bash(mate:*)",
3431
+ "Read(<root>/companion/**)",
3432
+ "Edit(<root>/companion/**)",
3433
+ "Skill(openspec-explore)",
3434
+ "Skill(openspec-propose)",
3435
+ "Skill(openspec-apply-change)",
3436
+ "Skill(openspec-archive-change)",
3437
+ "Skill(mate-artifact-publish)",
3438
+ "Skill(mate-openspec-backfill)",
3439
+ "Skill(mate-interview-me)",
3440
+ "Skill(mate-grill-me)",
3441
+ "Skill(mate-grilling)",
3442
+ "Skill(mate-grill-with-docs)",
3443
+ "Skill(mate-domain-modeling)",
3444
+ "Skill(mate-show-me)",
3445
+ "Skill(mate-simplify-code)",
3446
+ "Bash(openspec:*)",
3447
+ "Bash(mate cap graphify:*)",
3448
+ "Bash(<wrapper-bin>/openspec:*)",
3449
+ ],
3450
+ },
3451
+ ],
3452
+ },
3453
+ {
3454
+ "path": ".opencode/opencode.json",
3455
+ "regions": [
3456
+ {
3457
+ "at": [
3458
+ "plugin",
3459
+ ],
3460
+ "kind": "list",
3461
+ "values": [
3462
+ "@uniqbit/mate-opencode-plugin@0.15.5",
3463
+ ],
3464
+ },
3465
+ {
3466
+ "at": [
3467
+ "permission",
3468
+ "external_directory",
3469
+ ],
3470
+ "entries": {
3471
+ "<root>/companion": "allow",
3472
+ "<root>/companion/**": "allow",
3473
+ },
3474
+ "kind": "map",
3475
+ },
3476
+ ],
3477
+ },
3478
+ ]
3479
+ `;
3480
+
2344
3481
  exports[`runtime surface golden fixtures setup all capabilities × claude+opencode 1`] = `
2345
3482
  {
2346
3483
  "agentsMd":
@@ -2364,7 +3501,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
2364
3501
  "
2365
3502
  ,
2366
3503
  "claudeHooks": {
2367
- "react-doctor.sh": "e25569935b64",
3504
+ "react-doctor.sh": "a33e1b4ac810",
2368
3505
  },
2369
3506
  "claudeMcpConfig": {
2370
3507
  "mcpServers": {
@@ -2377,15 +3514,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
2377
3514
  },
2378
3515
  },
2379
3516
  "claudeMd":
2380
- "<!-- MATE:COMPANION:START -->
2381
-
2382
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2383
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2384
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2385
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2386
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2387
-
2388
- <!-- MATE:COMPANION:END -->
3517
+ "@AGENTS.md
2389
3518
  "
2390
3519
  ,
2391
3520
  "claudeSettingsLocal": {
@@ -2477,8 +3606,15 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
2477
3606
  "Read(<root>/companion/**)",
2478
3607
  "Skill(context-mode:context-mode)",
2479
3608
  "Skill(graphify)",
2480
- "Skill(mate-artifact-finish)",
3609
+ "Skill(mate-artifact-publish)",
3610
+ "Skill(mate-domain-modeling)",
3611
+ "Skill(mate-grill-me)",
3612
+ "Skill(mate-grill-with-docs)",
3613
+ "Skill(mate-grilling)",
3614
+ "Skill(mate-interview-me)",
2481
3615
  "Skill(mate-openspec-backfill)",
3616
+ "Skill(mate-show-me)",
3617
+ "Skill(mate-simplify-code)",
2482
3618
  "Skill(openspec-apply-change)",
2483
3619
  "Skill(openspec-archive-change)",
2484
3620
  "Skill(openspec-explore)",
@@ -2505,6 +3641,19 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2505
3641
  "Outputs land in $GRAPHIFY_OUT by default.
2506
3642
  "
2507
3643
  ,
3644
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
3645
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
3646
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
3647
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
3648
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
3649
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
3650
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
3651
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
3652
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
3653
+ "mate-interview-me/SKILL.md": "a922defdf427",
3654
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
3655
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
3656
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
2508
3657
  "openspec-apply-change/SKILL.md": "b023edd228ab",
2509
3658
  "openspec-archive-change/SKILL.md": "890bada99035",
2510
3659
  "openspec-explore/SKILL.md": "477fdec2cdb0",
@@ -2530,7 +3679,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2530
3679
  },
2531
3680
  },
2532
3681
  "plugin": [
2533
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3682
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2534
3683
  "context-mode@1.0.169",
2535
3684
  ],
2536
3685
  "references": {
@@ -2563,6 +3712,19 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2563
3712
  "Outputs land in $GRAPHIFY_OUT by default.
2564
3713
  "
2565
3714
  ,
3715
+ "mate-artifact-publish/SKILL.md": "6090c6a27d67",
3716
+ "mate-artifact-publish/references/openspec.md": "b5c986ed9bdc",
3717
+ "mate-create-report/SKILL.md": "4dda64fab7b7",
3718
+ "mate-domain-modeling/SKILL.md": "22f1d92b65ce",
3719
+ "mate-domain-modeling/references/ADR-FORMAT.md": "824b87e87d9b",
3720
+ "mate-domain-modeling/references/CONTEXT-FORMAT.md": "172622594277",
3721
+ "mate-grill-me/SKILL.md": "bbccd2654f71",
3722
+ "mate-grill-with-docs/SKILL.md": "d79278237d49",
3723
+ "mate-grilling/SKILL.md": "9fa3fb50cc73",
3724
+ "mate-interview-me/SKILL.md": "a922defdf427",
3725
+ "mate-openspec-backfill/SKILL.md": "fa73daee9951",
3726
+ "mate-show-me/SKILL.md": "3ecf5d44eb45",
3727
+ "mate-simplify-code/SKILL.md": "5dd2abc9571b",
2566
3728
  "openspec-apply-change/SKILL.md": "cb6e43b175c8",
2567
3729
  "openspec-archive-change/SKILL.md": "920c4cc68edf",
2568
3730
  "openspec-explore/SKILL.md": "87d1237e5ffa",
@@ -2573,7 +3735,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2573
3735
  "opencodeTui": {
2574
3736
  "$schema": "https://opencode.ai/tui.json",
2575
3737
  "plugin": [
2576
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
3738
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2577
3739
  "context-mode@1.0.169",
2578
3740
  ],
2579
3741
  },
@@ -2611,7 +3773,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2611
3773
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in <root>/working when the exact path is gitignored AND intentionally local-only; otherwise use <root>/companion.</rule>
2612
3774
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2613
3775
  <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>
2614
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
3776
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2615
3777
  </mandatory-rules>
2616
3778
  </companion-policy>
2617
3779
 
@@ -2682,7 +3844,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2682
3844
  <rule id="local-artifact-exception" severity="critical">Only write artifacts in $MATE_REPO_PATH when the exact path is gitignored AND intentionally local-only; otherwise use $MATE_ARTIFACT_PATH.</rule>
2683
3845
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2684
3846
  <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>
2685
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes by archiving them: the archive triggers a nudge directing you to run mate artifact finish "<name>" --json — if no nudge arrives, invoke that command yourself. It is the only sanctioned completion; never hand-commit or hand-tag a finish. Finishing a still-active change archives it and applies its delta specs itself, so do not pre-apply them to openspec/specs right before finishing. Finishing an already-archived change resumes without re-applying delta specs, so an archive flow that already synced specs (e.g. openspec-sync-specs) composes fine with a finish afterwards.</rule>
3847
+ <rule id="openspec-publish" severity="critical">Archiving an OpenSpec change is a local operation and publishes nothing. Publish through the mate-artifact-publish skill: it lists candidates with mate artifact pending --json, takes an explicit user selection, confirms the commit, tag, and push, then runs mate artifact publish "<name>" --json per selected change. That command is the only sanctioned publication; never hand-commit or hand-tag one. Publishing only publishes an already-archived change: archiving is a precondition, and running publish on a still-active change is an error that names openspec archive as the missing step. Publish never archives and never applies delta specs itself, so archive first — by the archive workflow or an already-synced flow such as openspec-sync-specs — and then publish. Publish also refuses to run anywhere but the companion's default branch.</rule>
2686
3848
  </mandatory-rules>
2687
3849
  </companion-policy>"
2688
3850
  ,
@@ -2710,6 +3872,169 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2710
3872
  }
2711
3873
  `;
2712
3874
 
3875
+ exports[`runtime surface golden fixtures setup all capabilities × claude+opencode 3`] = `
3876
+ [
3877
+ {
3878
+ "path": ".claude/settings.local.json",
3879
+ "regions": [
3880
+ {
3881
+ "at": [
3882
+ "hooks",
3883
+ "PreToolUse",
3884
+ ],
3885
+ "kind": "list",
3886
+ "values": [
3887
+ {
3888
+ "hooks": [
3889
+ {
3890
+ "command": "node "<claude-plugin>/hooks/validate-artifact-path.mjs"",
3891
+ "type": "command",
3892
+ },
3893
+ ],
3894
+ "matcher": "Write|Edit|MultiEdit|Bash",
3895
+ },
3896
+ ],
3897
+ },
3898
+ {
3899
+ "at": [
3900
+ "hooks",
3901
+ "SessionStart",
3902
+ ],
3903
+ "kind": "list",
3904
+ "values": [
3905
+ {
3906
+ "hooks": [
3907
+ {
3908
+ "command": "node "<claude-plugin>/hooks/session-banner.mjs" --projected",
3909
+ "type": "command",
3910
+ },
3911
+ ],
3912
+ },
3913
+ {
3914
+ "hooks": [
3915
+ {
3916
+ "command": "node "<claude-plugin>/hooks/session-guidance.mjs"",
3917
+ "type": "command",
3918
+ },
3919
+ ],
3920
+ },
3921
+ ],
3922
+ },
3923
+ {
3924
+ "at": [
3925
+ "env",
3926
+ ],
3927
+ "entries": {
3928
+ "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
3929
+ },
3930
+ "kind": "map",
3931
+ "stripPrefix": "MATE_",
3932
+ },
3933
+ {
3934
+ "at": [
3935
+ "permissions",
3936
+ "allow",
3937
+ ],
3938
+ "kind": "list",
3939
+ "values": [
3940
+ "Bash(mate:*)",
3941
+ "Read(<root>/companion/**)",
3942
+ "Edit(<root>/companion/**)",
3943
+ "Skill(openspec-explore)",
3944
+ "Skill(openspec-propose)",
3945
+ "Skill(openspec-apply-change)",
3946
+ "Skill(openspec-archive-change)",
3947
+ "Skill(mate-artifact-publish)",
3948
+ "Skill(mate-openspec-backfill)",
3949
+ "Skill(mate-interview-me)",
3950
+ "Skill(mate-grill-me)",
3951
+ "Skill(mate-grilling)",
3952
+ "Skill(mate-grill-with-docs)",
3953
+ "Skill(mate-domain-modeling)",
3954
+ "Skill(mate-show-me)",
3955
+ "Skill(mate-simplify-code)",
3956
+ "Bash(openspec:*)",
3957
+ "Bash(mate cap graphify:*)",
3958
+ "Bash(<wrapper-bin>/openspec:*)",
3959
+ "Skill(react-doctor)",
3960
+ "Bash(npx react-doctor:*)",
3961
+ "Bash(npx react-doctor@latest *)",
3962
+ "mcp__tokensave__*",
3963
+ "Skill(graphify)",
3964
+ "Bash(graphify:*)",
3965
+ "Bash(mate cap graphify:*)",
3966
+ "Bash(<wrapper-bin>/graphify:*)",
3967
+ "Skill(context-mode:context-mode)",
3968
+ "mcp__plugin_context-mode_context-mode__*",
3969
+ ],
3970
+ },
3971
+ ],
3972
+ },
3973
+ {
3974
+ "path": "~/.claude.json",
3975
+ "regions": [
3976
+ {
3977
+ "at": [
3978
+ "projects",
3979
+ "<root>/working",
3980
+ "mcpServers",
3981
+ ],
3982
+ "entries": {
3983
+ "tokensave": {
3984
+ "args": [
3985
+ "serve",
3986
+ ],
3987
+ "command": "tokensave",
3988
+ },
3989
+ },
3990
+ "kind": "map",
3991
+ },
3992
+ ],
3993
+ },
3994
+ {
3995
+ "path": ".opencode/opencode.json",
3996
+ "regions": [
3997
+ {
3998
+ "at": [
3999
+ "plugin",
4000
+ ],
4001
+ "kind": "list",
4002
+ "values": [
4003
+ "@uniqbit/mate-opencode-plugin@0.15.5",
4004
+ ],
4005
+ },
4006
+ {
4007
+ "at": [
4008
+ "mcp",
4009
+ ],
4010
+ "entries": {
4011
+ "tokensave": {
4012
+ "command": [
4013
+ "tokensave",
4014
+ "serve",
4015
+ ],
4016
+ "enabled": true,
4017
+ "type": "local",
4018
+ },
4019
+ },
4020
+ "kind": "map",
4021
+ },
4022
+ {
4023
+ "at": [
4024
+ "permission",
4025
+ "external_directory",
4026
+ ],
4027
+ "entries": {
4028
+ "<root>/companion": "allow",
4029
+ "<root>/companion/**": "allow",
4030
+ },
4031
+ "kind": "map",
4032
+ },
4033
+ ],
4034
+ },
4035
+ ]
4036
+ `;
4037
+
2713
4038
  exports[`runtime surface golden fixtures teardown graphify × claude+opencode 1`] = `
2714
4039
  {
2715
4040
  "agentsMd":
@@ -2729,15 +4054,7 @@ exports[`runtime surface golden fixtures teardown graphify × claude+opencode 1`
2729
4054
  "mcpServers": {},
2730
4055
  },
2731
4056
  "claudeMd":
2732
- "<!-- MATE:COMPANION:START -->
2733
-
2734
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2735
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2736
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2737
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2738
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2739
-
2740
- <!-- MATE:COMPANION:END -->
4057
+ "@AGENTS.md
2741
4058
  "
2742
4059
  ,
2743
4060
  "claudeSettingsLocal": {
@@ -2759,7 +4076,7 @@ exports[`runtime surface golden fixtures teardown graphify × claude+opencode 1`
2759
4076
  "reserved": 15000,
2760
4077
  },
2761
4078
  "plugin": [
2762
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4079
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2763
4080
  ],
2764
4081
  "references": {
2765
4082
  "mate": "..",
@@ -2774,7 +4091,7 @@ exports[`runtime surface golden fixtures teardown graphify × claude+opencode 1`
2774
4091
  "opencodeTui": {
2775
4092
  "$schema": "https://opencode.ai/tui.json",
2776
4093
  "plugin": [
2777
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4094
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2778
4095
  ],
2779
4096
  },
2780
4097
  }
@@ -2799,15 +4116,7 @@ exports[`runtime surface golden fixtures teardown tokensave × claude+opencode 1
2799
4116
  "mcpServers": {},
2800
4117
  },
2801
4118
  "claudeMd":
2802
- "<!-- MATE:COMPANION:START -->
2803
-
2804
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2805
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2806
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2807
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2808
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2809
-
2810
- <!-- MATE:COMPANION:END -->
4119
+ "@AGENTS.md
2811
4120
  "
2812
4121
  ,
2813
4122
  "claudeSettingsLocal": {
@@ -2829,7 +4138,7 @@ exports[`runtime surface golden fixtures teardown tokensave × claude+opencode 1
2829
4138
  "reserved": 15000,
2830
4139
  },
2831
4140
  "plugin": [
2832
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4141
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2833
4142
  ],
2834
4143
  "references": {
2835
4144
  "mate": "..",
@@ -2844,7 +4153,7 @@ exports[`runtime surface golden fixtures teardown tokensave × claude+opencode 1
2844
4153
  "opencodeTui": {
2845
4154
  "$schema": "https://opencode.ai/tui.json",
2846
4155
  "plugin": [
2847
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4156
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2848
4157
  ],
2849
4158
  },
2850
4159
  }
@@ -2870,15 +4179,7 @@ exports[`runtime surface golden fixtures teardown context-mode × claude+opencod
2870
4179
  "mcpServers": {},
2871
4180
  },
2872
4181
  "claudeMd":
2873
- "<!-- MATE:COMPANION:START -->
2874
-
2875
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2876
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2877
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2878
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2879
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2880
-
2881
- <!-- MATE:COMPANION:END -->
4182
+ "@AGENTS.md
2882
4183
  "
2883
4184
  ,
2884
4185
  "claudeSettingsLocal": {
@@ -2900,7 +4201,7 @@ exports[`runtime surface golden fixtures teardown context-mode × claude+opencod
2900
4201
  "reserved": 15000,
2901
4202
  },
2902
4203
  "plugin": [
2903
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4204
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2904
4205
  ],
2905
4206
  "references": {
2906
4207
  "mate": "..",
@@ -2915,7 +4216,7 @@ exports[`runtime surface golden fixtures teardown context-mode × claude+opencod
2915
4216
  "opencodeTui": {
2916
4217
  "$schema": "https://opencode.ai/tui.json",
2917
4218
  "plugin": [
2918
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4219
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2919
4220
  ],
2920
4221
  },
2921
4222
  }
@@ -2940,15 +4241,7 @@ exports[`runtime surface golden fixtures teardown react-doctor × claude+opencod
2940
4241
  "mcpServers": {},
2941
4242
  },
2942
4243
  "claudeMd":
2943
- "<!-- MATE:COMPANION:START -->
2944
-
2945
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2946
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2947
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2948
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2949
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2950
-
2951
- <!-- MATE:COMPANION:END -->
4244
+ "@AGENTS.md
2952
4245
  "
2953
4246
  ,
2954
4247
  "claudeSettingsLocal": {
@@ -2970,7 +4263,7 @@ exports[`runtime surface golden fixtures teardown react-doctor × claude+opencod
2970
4263
  "reserved": 15000,
2971
4264
  },
2972
4265
  "plugin": [
2973
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4266
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2974
4267
  ],
2975
4268
  "references": {
2976
4269
  "mate": "..",
@@ -2985,7 +4278,7 @@ exports[`runtime surface golden fixtures teardown react-doctor × claude+opencod
2985
4278
  "opencodeTui": {
2986
4279
  "$schema": "https://opencode.ai/tui.json",
2987
4280
  "plugin": [
2988
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4281
+ "@uniqbit/mate-opencode-plugin@0.15.5",
2989
4282
  ],
2990
4283
  },
2991
4284
  }
@@ -3010,15 +4303,7 @@ exports[`runtime surface golden fixtures teardown openspec × claude+opencode 1`
3010
4303
  "mcpServers": {},
3011
4304
  },
3012
4305
  "claudeMd":
3013
- "<!-- MATE:COMPANION:START -->
3014
-
3015
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3016
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3017
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3018
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3019
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3020
-
3021
- <!-- MATE:COMPANION:END -->
4306
+ "@AGENTS.md
3022
4307
  "
3023
4308
  ,
3024
4309
  "claudeSettingsLocal": {
@@ -3040,7 +4325,7 @@ exports[`runtime surface golden fixtures teardown openspec × claude+opencode 1`
3040
4325
  "reserved": 15000,
3041
4326
  },
3042
4327
  "plugin": [
3043
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4328
+ "@uniqbit/mate-opencode-plugin@0.15.5",
3044
4329
  ],
3045
4330
  "references": {
3046
4331
  "mate": "..",
@@ -3055,7 +4340,7 @@ exports[`runtime surface golden fixtures teardown openspec × claude+opencode 1`
3055
4340
  "opencodeTui": {
3056
4341
  "$schema": "https://opencode.ai/tui.json",
3057
4342
  "plugin": [
3058
- "@uniqbit/mate-opencode-plugin@0.15.5-canary.0",
4343
+ "@uniqbit/mate-opencode-plugin@0.15.5",
3059
4344
  ],
3060
4345
  },
3061
4346
  }
@@ -3080,15 +4365,7 @@ exports[`runtime surface golden fixtures deselect opencode runtime with graphify
3080
4365
  "mcpServers": {},
3081
4366
  },
3082
4367
  "claudeMd":
3083
- "<!-- MATE:COMPANION:START -->
3084
-
3085
- - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3086
- - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3087
- - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3088
- - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3089
- - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3090
-
3091
- <!-- MATE:COMPANION:END -->
4368
+ "@AGENTS.md
3092
4369
  "
3093
4370
  ,
3094
4371
  "claudeSettingsLocal": {
@@ -3156,6 +4433,7 @@ User notes.
3156
4433
  /.claude/
3157
4434
  /.opencode/
3158
4435
  /.agents/
4436
+ /.mcp.json
3159
4437
  # mate managed: end
3160
4438
  .tokensave/
3161
4439
  "
@@ -3201,6 +4479,7 @@ User notes.
3201
4479
  /.claude/
3202
4480
  /.opencode/
3203
4481
  /.agents/
4482
+ /.mcp.json
3204
4483
  # mate managed: end
3205
4484
  "
3206
4485
  ,