@uniqbit/mate-core 0.15.4-canary.9 → 0.15.4

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 (31) hide show
  1. package/claude-plugin/hooks/artifact-finish-nudge.mjs +5 -3
  2. package/claude-plugin/hooks/session-banner.mjs +5 -3
  3. package/claude-plugin/hooks/ts-loader.mjs +28 -0
  4. package/claude-plugin/hooks/validate-artifact-path.mjs +5 -3
  5. package/package.json +1 -1
  6. package/src/cli/commands/cap/openspec.ts +20 -1
  7. package/src/cli/commands/companion/hub.ts +1 -0
  8. package/src/cli/commands/plugin/install.ts +15 -3
  9. package/src/hooks/artifact-finish-nudge.ts +35 -3
  10. package/src/lib/context-mode-package.ts +1 -1
  11. package/src/lib/orchestrator/companion-git-sync.ts +67 -8
  12. package/src/lib/orchestrator/companion-hub.ts +28 -6
  13. package/src/lib/orchestrator/types.ts +2 -2
  14. package/src/lib/package-paths.ts +1 -0
  15. package/src/opencode/companion-hooks.ts +33 -12
  16. package/src/playbooks/companion-guidance.ts +1 -1
  17. package/src/templates/capabilities/openspec-cap/mate-skills/agents/mate-openspec-backfill/SKILL.md +65 -0
  18. package/src/templates/capabilities/openspec-cap/mate-v1/schema.yaml +1 -0
  19. package/src/templates/root/TEMPLATE_AGENTS.md +2 -0
  20. package/src/templates/root/TEMPLATE_CLAUDE.md +2 -0
  21. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +155 -45
  22. package/src/tools/setup/capabilities/context-mode.ts +9 -0
  23. package/src/tools/setup/capabilities/openspec.ts +11 -0
  24. package/src/tools/setup/dynamic-plugins/hydrate.ts +15 -1
  25. package/src/tools/setup/engine.ts +4 -1
  26. package/src/tools/setup/mate.ts +10 -2
  27. package/src/tools/setup/plugin.ts +26 -2
  28. package/src/tools/setup/plugins/gitignore.ts +7 -4
  29. package/src/tools/setup/providers/claude.ts +53 -8
  30. package/src/tools/setup/providers/opencode.ts +51 -8
  31. package/src/tools/setup.ts +7 -56
@@ -14,8 +14,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
14
14
 
15
15
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
16
16
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
17
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
17
18
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
18
19
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
20
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
19
21
 
20
22
  <!-- MATE:COMPANION:END -->
21
23
  "
@@ -36,10 +38,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
36
38
 
37
39
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
38
40
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
41
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
39
42
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
40
43
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
41
44
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
42
45
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
46
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
43
47
 
44
48
  <!-- MATE:COMPANION:END -->
45
49
  "
@@ -169,8 +173,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
169
173
 
170
174
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
171
175
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
176
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
172
177
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
173
178
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
179
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
174
180
 
175
181
  <!-- MATE:COMPANION:END -->
176
182
  "
@@ -188,7 +194,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
188
194
  "reserved": 15000,
189
195
  },
190
196
  "plugin": [
191
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
197
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
192
198
  ],
193
199
  "references": {
194
200
  "mate": "..",
@@ -224,7 +230,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
224
230
  "opencodeTui": {
225
231
  "$schema": "https://opencode.ai/tui.json",
226
232
  "plugin": [
227
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
233
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
228
234
  ],
229
235
  },
230
236
  }
@@ -315,8 +321,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
315
321
 
316
322
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
317
323
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
324
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
318
325
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
319
326
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
327
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
320
328
 
321
329
  <!-- MATE:COMPANION:END -->
322
330
  "
@@ -337,10 +345,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
337
345
 
338
346
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
339
347
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
348
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
340
349
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
341
350
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
342
351
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
343
352
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
353
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
344
354
 
345
355
  <!-- MATE:COMPANION:END -->
346
356
  "
@@ -397,7 +407,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
397
407
  "reserved": 15000,
398
408
  },
399
409
  "plugin": [
400
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
410
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
401
411
  ],
402
412
  "references": {
403
413
  "mate": "..",
@@ -433,7 +443,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
433
443
  "opencodeTui": {
434
444
  "$schema": "https://opencode.ai/tui.json",
435
445
  "plugin": [
436
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
446
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
437
447
  ],
438
448
  },
439
449
  }
@@ -579,8 +589,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
579
589
 
580
590
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
581
591
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
592
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
582
593
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
583
594
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
595
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
584
596
 
585
597
  <!-- MATE:COMPANION:END -->
586
598
  "
@@ -608,10 +620,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
608
620
 
609
621
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
610
622
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
623
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
611
624
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
612
625
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
613
626
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
614
627
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
628
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
615
629
 
616
630
  <!-- MATE:COMPANION:END -->
617
631
  "
@@ -748,8 +762,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
748
762
 
749
763
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
750
764
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
765
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
751
766
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
752
767
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
768
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
753
769
 
754
770
  <!-- MATE:COMPANION:END -->
755
771
  "
@@ -777,7 +793,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
777
793
  },
778
794
  },
779
795
  "plugin": [
780
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
796
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
781
797
  ],
782
798
  "references": {
783
799
  "mate": "..",
@@ -792,7 +808,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
792
808
  "opencodeTui": {
793
809
  "$schema": "https://opencode.ai/tui.json",
794
810
  "plugin": [
795
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
811
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
796
812
  ],
797
813
  },
798
814
  }
@@ -880,8 +896,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
880
896
 
881
897
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
882
898
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
899
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
883
900
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
884
901
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
902
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
885
903
 
886
904
  <!-- MATE:COMPANION:END -->
887
905
  "
@@ -909,10 +927,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
909
927
 
910
928
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
911
929
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
930
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
912
931
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
913
932
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
914
933
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
915
934
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
935
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
916
936
 
917
937
  <!-- MATE:COMPANION:END -->
918
938
  "
@@ -989,7 +1009,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
989
1009
  },
990
1010
  },
991
1011
  "plugin": [
992
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1012
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
993
1013
  ],
994
1014
  "references": {
995
1015
  "mate": "..",
@@ -1004,7 +1024,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1004
1024
  "opencodeTui": {
1005
1025
  "$schema": "https://opencode.ai/tui.json",
1006
1026
  "plugin": [
1007
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1027
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1008
1028
  ],
1009
1029
  },
1010
1030
  }
@@ -1144,8 +1164,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1144
1164
 
1145
1165
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1146
1166
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1167
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1147
1168
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1148
1169
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1170
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1149
1171
 
1150
1172
  <!-- MATE:COMPANION:END -->
1151
1173
  "
@@ -1166,10 +1188,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1166
1188
 
1167
1189
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1168
1190
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1191
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1169
1192
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
1170
1193
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
1171
1194
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1172
1195
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1196
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1173
1197
 
1174
1198
  <!-- MATE:COMPANION:END -->
1175
1199
  "
@@ -1237,7 +1261,7 @@ exports[`runtime surface golden fixtures setup context-mode × claude 2`] = `
1237
1261
  "--plugin-dir",
1238
1262
  "<claude-plugin>",
1239
1263
  "--plugin-dir",
1240
- "<root>/companion/.mate/dependencies/context-mode/node_modules/context-mode",
1264
+ "<root>/companion/.mate/plugins/.local/node_modules/context-mode",
1241
1265
  ],
1242
1266
  "claudeEnv": {
1243
1267
  "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
@@ -1259,8 +1283,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1259
1283
 
1260
1284
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1261
1285
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1286
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1262
1287
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1263
1288
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1289
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1264
1290
 
1265
1291
  <!-- MATE:COMPANION:END -->
1266
1292
 
@@ -1286,7 +1312,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1286
1312
  "reserved": 15000,
1287
1313
  },
1288
1314
  "plugin": [
1289
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1315
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1290
1316
  "context-mode@1.0.169",
1291
1317
  ],
1292
1318
  "references": {
@@ -1302,7 +1328,7 @@ Canonical Mate policy and any more specific tool-routing instructions remain aut
1302
1328
  "opencodeTui": {
1303
1329
  "$schema": "https://opencode.ai/tui.json",
1304
1330
  "plugin": [
1305
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1331
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1306
1332
  "context-mode@1.0.169",
1307
1333
  ],
1308
1334
  },
@@ -1383,8 +1409,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1383
1409
 
1384
1410
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1385
1411
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1412
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1386
1413
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1387
1414
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1415
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1388
1416
 
1389
1417
  <!-- MATE:COMPANION:END -->
1390
1418
 
@@ -1413,10 +1441,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1413
1441
 
1414
1442
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1415
1443
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1444
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1416
1445
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
1417
1446
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
1418
1447
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1419
1448
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1449
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1420
1450
 
1421
1451
  <!-- MATE:COMPANION:END -->
1422
1452
  "
@@ -1442,7 +1472,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1442
1472
  "reserved": 15000,
1443
1473
  },
1444
1474
  "plugin": [
1445
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1475
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1446
1476
  "context-mode@1.0.169",
1447
1477
  ],
1448
1478
  "references": {
@@ -1458,7 +1488,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1458
1488
  "opencodeTui": {
1459
1489
  "$schema": "https://opencode.ai/tui.json",
1460
1490
  "plugin": [
1461
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1491
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1462
1492
  "context-mode@1.0.169",
1463
1493
  ],
1464
1494
  },
@@ -1508,7 +1538,7 @@ exports[`runtime surface golden fixtures setup context-mode × claude+opencode 2
1508
1538
  "--plugin-dir",
1509
1539
  "<claude-plugin>",
1510
1540
  "--plugin-dir",
1511
- "<root>/companion/.mate/dependencies/context-mode/node_modules/context-mode",
1541
+ "<root>/companion/.mate/plugins/.local/node_modules/context-mode",
1512
1542
  ],
1513
1543
  "claudeEnv": {
1514
1544
  "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
@@ -1585,8 +1615,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1585
1615
 
1586
1616
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1587
1617
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1618
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1588
1619
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1589
1620
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1621
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1590
1622
 
1591
1623
  <!-- MATE:COMPANION:END -->
1592
1624
  "
@@ -1609,10 +1641,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1609
1641
 
1610
1642
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1611
1643
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1644
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1612
1645
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
1613
1646
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
1614
1647
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1615
1648
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1649
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1616
1650
 
1617
1651
  <!-- MATE:COMPANION:END -->
1618
1652
  "
@@ -1729,8 +1763,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1729
1763
 
1730
1764
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1731
1765
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1766
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1732
1767
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1733
1768
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1769
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1734
1770
 
1735
1771
  <!-- MATE:COMPANION:END -->
1736
1772
  "
@@ -1748,7 +1784,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1748
1784
  "reserved": 15000,
1749
1785
  },
1750
1786
  "plugin": [
1751
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1787
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1752
1788
  ],
1753
1789
  "references": {
1754
1790
  "mate": "..",
@@ -1766,7 +1802,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1766
1802
  "opencodeTui": {
1767
1803
  "$schema": "https://opencode.ai/tui.json",
1768
1804
  "plugin": [
1769
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1805
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1770
1806
  ],
1771
1807
  },
1772
1808
  }
@@ -1846,8 +1882,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
1846
1882
 
1847
1883
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1848
1884
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1885
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1849
1886
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1850
1887
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1888
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1851
1889
 
1852
1890
  <!-- MATE:COMPANION:END -->
1853
1891
  "
@@ -1870,10 +1908,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1870
1908
 
1871
1909
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
1872
1910
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
1911
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
1873
1912
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
1874
1913
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
1875
1914
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
1876
1915
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
1916
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
1877
1917
 
1878
1918
  <!-- MATE:COMPANION:END -->
1879
1919
  "
@@ -1928,7 +1968,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1928
1968
  "reserved": 15000,
1929
1969
  },
1930
1970
  "plugin": [
1931
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1971
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1932
1972
  ],
1933
1973
  "references": {
1934
1974
  "mate": "..",
@@ -1946,7 +1986,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
1946
1986
  "opencodeTui": {
1947
1987
  "$schema": "https://opencode.ai/tui.json",
1948
1988
  "plugin": [
1949
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
1989
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
1950
1990
  ],
1951
1991
  },
1952
1992
  }
@@ -2070,8 +2110,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2070
2110
 
2071
2111
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2072
2112
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2113
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2073
2114
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2074
2115
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2116
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2075
2117
 
2076
2118
  <!-- MATE:COMPANION:END -->
2077
2119
  "
@@ -2092,10 +2134,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2092
2134
 
2093
2135
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2094
2136
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2137
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2095
2138
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
2096
2139
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
2097
2140
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2098
2141
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2142
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2099
2143
 
2100
2144
  <!-- MATE:COMPANION:END -->
2101
2145
  "
@@ -2111,6 +2155,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2111
2155
  "Edit(<root>/companion/**)",
2112
2156
  "Read(<root>/companion/**)",
2113
2157
  "Skill(mate-artifact-finish)",
2158
+ "Skill(mate-openspec-backfill)",
2114
2159
  "Skill(openspec-apply-change)",
2115
2160
  "Skill(openspec-archive-change)",
2116
2161
  "Skill(openspec-explore)",
@@ -2162,7 +2207,7 @@ exports[`runtime surface golden fixtures setup openspec × claude 2`] = `
2162
2207
  <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>
2163
2208
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2164
2209
  <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>
2165
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2210
+ <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>
2166
2211
  </mandatory-rules>
2167
2212
  </companion-policy>"
2168
2213
  ,
@@ -2195,8 +2240,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2195
2240
 
2196
2241
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2197
2242
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2243
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2198
2244
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2199
2245
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2246
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2200
2247
 
2201
2248
  <!-- MATE:COMPANION:END -->
2202
2249
  "
@@ -2214,7 +2261,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2214
2261
  "reserved": 15000,
2215
2262
  },
2216
2263
  "plugin": [
2217
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2264
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2218
2265
  ],
2219
2266
  "references": {
2220
2267
  "mate": "..",
@@ -2234,7 +2281,7 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2234
2281
  "opencodeTui": {
2235
2282
  "$schema": "https://opencode.ai/tui.json",
2236
2283
  "plugin": [
2237
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2284
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2238
2285
  ],
2239
2286
  },
2240
2287
  }
@@ -2273,7 +2320,7 @@ exports[`runtime surface golden fixtures setup openspec × opencode 2`] = `
2273
2320
  <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>
2274
2321
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2275
2322
  <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>
2276
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2323
+ <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>
2277
2324
  </mandatory-rules>
2278
2325
  </companion-policy>"
2279
2326
  ,
@@ -2315,8 +2362,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2315
2362
 
2316
2363
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2317
2364
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2365
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2318
2366
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2319
2367
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2368
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2320
2369
 
2321
2370
  <!-- MATE:COMPANION:END -->
2322
2371
  "
@@ -2337,10 +2386,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2337
2386
 
2338
2387
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2339
2388
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2389
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2340
2390
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
2341
2391
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
2342
2392
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2343
2393
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2394
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2344
2395
 
2345
2396
  <!-- MATE:COMPANION:END -->
2346
2397
  "
@@ -2356,6 +2407,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2356
2407
  "Edit(<root>/companion/**)",
2357
2408
  "Read(<root>/companion/**)",
2358
2409
  "Skill(mate-artifact-finish)",
2410
+ "Skill(mate-openspec-backfill)",
2359
2411
  "Skill(openspec-apply-change)",
2360
2412
  "Skill(openspec-archive-change)",
2361
2413
  "Skill(openspec-explore)",
@@ -2377,7 +2429,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2377
2429
  "reserved": 15000,
2378
2430
  },
2379
2431
  "plugin": [
2380
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2432
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2381
2433
  ],
2382
2434
  "references": {
2383
2435
  "mate": "..",
@@ -2397,7 +2449,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2397
2449
  "opencodeTui": {
2398
2450
  "$schema": "https://opencode.ai/tui.json",
2399
2451
  "plugin": [
2400
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2452
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2401
2453
  ],
2402
2454
  },
2403
2455
  }
@@ -2434,7 +2486,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
2434
2486
  <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>
2435
2487
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2436
2488
  <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>
2437
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2489
+ <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>
2438
2490
  </mandatory-rules>
2439
2491
  </companion-policy>"
2440
2492
  ,
@@ -2481,7 +2533,7 @@ exports[`runtime surface golden fixtures setup openspec × claude+opencode 2`] =
2481
2533
  <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>
2482
2534
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2483
2535
  <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>
2484
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2536
+ <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>
2485
2537
  </mandatory-rules>
2486
2538
  </companion-policy>"
2487
2539
  ,
@@ -2523,8 +2575,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2523
2575
 
2524
2576
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2525
2577
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2578
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2526
2579
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2527
2580
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2581
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2528
2582
 
2529
2583
  <!-- MATE:COMPANION:END -->
2530
2584
 
@@ -2562,10 +2616,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2562
2616
 
2563
2617
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2564
2618
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2619
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2565
2620
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
2566
2621
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
2567
2622
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2568
2623
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2624
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2569
2625
 
2570
2626
  <!-- MATE:COMPANION:END -->
2571
2627
  "
@@ -2660,6 +2716,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2660
2716
  "Skill(context-mode:context-mode)",
2661
2717
  "Skill(graphify)",
2662
2718
  "Skill(mate-artifact-finish)",
2719
+ "Skill(mate-openspec-backfill)",
2663
2720
  "Skill(openspec-apply-change)",
2664
2721
  "Skill(openspec-archive-change)",
2665
2722
  "Skill(openspec-explore)",
@@ -2711,7 +2768,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2711
2768
  },
2712
2769
  },
2713
2770
  "plugin": [
2714
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2771
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2715
2772
  "context-mode@1.0.169",
2716
2773
  ],
2717
2774
  "references": {
@@ -2754,7 +2811,7 @@ Write chunks to $GRAPHIFY_OUT and read $GRAPHIFY_OUT later.
2754
2811
  "opencodeTui": {
2755
2812
  "$schema": "https://opencode.ai/tui.json",
2756
2813
  "plugin": [
2757
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
2814
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2758
2815
  "context-mode@1.0.169",
2759
2816
  ],
2760
2817
  },
@@ -2792,7 +2849,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2792
2849
  <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>
2793
2850
  <rule id="guardrail" severity="critical">Bad artifact writes to <root>/working are rejected. Classify correctly first.</rule>
2794
2851
  <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>
2795
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2852
+ <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>
2796
2853
  </mandatory-rules>
2797
2854
  </companion-policy>
2798
2855
 
@@ -2816,7 +2873,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2816
2873
  "--plugin-dir",
2817
2874
  "<claude-plugin>",
2818
2875
  "--plugin-dir",
2819
- "<root>/companion/.mate/dependencies/context-mode/node_modules/context-mode",
2876
+ "<root>/companion/.mate/plugins/.local/node_modules/context-mode",
2820
2877
  ],
2821
2878
  "claudeEnv": {
2822
2879
  "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD": "1",
@@ -2863,7 +2920,7 @@ exports[`runtime surface golden fixtures setup all capabilities × claude+openco
2863
2920
  <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>
2864
2921
  <rule id="guardrail" severity="critical">Bad artifact writes to $MATE_REPO_PATH are rejected. Classify correctly first.</rule>
2865
2922
  <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>
2866
- <rule id="openspec-finish" severity="critical">Finish OpenSpec changes ONLY with: mate artifact finish "<name>" --json — never hand-commit or hand-tag a finish. Finishing a still-active change 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>
2923
+ <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>
2867
2924
  </mandatory-rules>
2868
2925
  </companion-policy>"
2869
2926
  ,
@@ -2905,8 +2962,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2905
2962
 
2906
2963
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2907
2964
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2965
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2908
2966
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2909
2967
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2968
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2910
2969
 
2911
2970
  <!-- MATE:COMPANION:END -->
2912
2971
  "
@@ -2927,10 +2986,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2927
2986
 
2928
2987
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2929
2988
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
2989
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2930
2990
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
2931
2991
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
2932
2992
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2933
2993
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
2994
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2934
2995
 
2935
2996
  <!-- MATE:COMPANION:END -->
2936
2997
  "
@@ -2954,7 +3015,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2954
3015
  "reserved": 15000,
2955
3016
  },
2956
3017
  "plugin": [
2957
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3018
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2958
3019
  ],
2959
3020
  "references": {
2960
3021
  "mate": "..",
@@ -2969,7 +3030,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
2969
3030
  "opencodeTui": {
2970
3031
  "$schema": "https://opencode.ai/tui.json",
2971
3032
  "plugin": [
2972
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3033
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
2973
3034
  ],
2974
3035
  },
2975
3036
  }
@@ -2989,8 +3050,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
2989
3050
 
2990
3051
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
2991
3052
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3053
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
2992
3054
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
2993
3055
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3056
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
2994
3057
 
2995
3058
  <!-- MATE:COMPANION:END -->
2996
3059
  "
@@ -3011,10 +3074,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3011
3074
 
3012
3075
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3013
3076
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3077
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3014
3078
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
3015
3079
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
3016
3080
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3017
3081
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3082
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3018
3083
 
3019
3084
  <!-- MATE:COMPANION:END -->
3020
3085
  "
@@ -3038,7 +3103,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3038
3103
  "reserved": 15000,
3039
3104
  },
3040
3105
  "plugin": [
3041
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3106
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3042
3107
  ],
3043
3108
  "references": {
3044
3109
  "mate": "..",
@@ -3053,7 +3118,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3053
3118
  "opencodeTui": {
3054
3119
  "$schema": "https://opencode.ai/tui.json",
3055
3120
  "plugin": [
3056
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3121
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3057
3122
  ],
3058
3123
  },
3059
3124
  }
@@ -3073,8 +3138,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
3073
3138
 
3074
3139
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3075
3140
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3141
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3076
3142
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3077
3143
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3144
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3078
3145
 
3079
3146
  <!-- MATE:COMPANION:END -->
3080
3147
 
@@ -3096,10 +3163,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3096
3163
 
3097
3164
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3098
3165
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3166
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3099
3167
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
3100
3168
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
3101
3169
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3102
3170
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3171
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3103
3172
 
3104
3173
  <!-- MATE:COMPANION:END -->
3105
3174
  "
@@ -3123,7 +3192,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3123
3192
  "reserved": 15000,
3124
3193
  },
3125
3194
  "plugin": [
3126
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3195
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3127
3196
  ],
3128
3197
  "references": {
3129
3198
  "mate": "..",
@@ -3138,7 +3207,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3138
3207
  "opencodeTui": {
3139
3208
  "$schema": "https://opencode.ai/tui.json",
3140
3209
  "plugin": [
3141
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3210
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3142
3211
  ],
3143
3212
  },
3144
3213
  }
@@ -3158,8 +3227,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
3158
3227
 
3159
3228
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3160
3229
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3230
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3161
3231
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3162
3232
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3233
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3163
3234
 
3164
3235
  <!-- MATE:COMPANION:END -->
3165
3236
  "
@@ -3180,10 +3251,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3180
3251
 
3181
3252
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3182
3253
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3254
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3183
3255
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
3184
3256
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
3185
3257
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3186
3258
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3259
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3187
3260
 
3188
3261
  <!-- MATE:COMPANION:END -->
3189
3262
  "
@@ -3207,7 +3280,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3207
3280
  "reserved": 15000,
3208
3281
  },
3209
3282
  "plugin": [
3210
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3283
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3211
3284
  ],
3212
3285
  "references": {
3213
3286
  "mate": "..",
@@ -3222,7 +3295,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3222
3295
  "opencodeTui": {
3223
3296
  "$schema": "https://opencode.ai/tui.json",
3224
3297
  "plugin": [
3225
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3298
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3226
3299
  ],
3227
3300
  },
3228
3301
  }
@@ -3242,8 +3315,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
3242
3315
 
3243
3316
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3244
3317
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3318
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3245
3319
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3246
3320
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3321
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3247
3322
 
3248
3323
  <!-- MATE:COMPANION:END -->
3249
3324
  "
@@ -3264,10 +3339,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3264
3339
 
3265
3340
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3266
3341
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3342
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3267
3343
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
3268
3344
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
3269
3345
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3270
3346
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3347
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3271
3348
 
3272
3349
  <!-- MATE:COMPANION:END -->
3273
3350
  "
@@ -3291,7 +3368,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3291
3368
  "reserved": 15000,
3292
3369
  },
3293
3370
  "plugin": [
3294
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3371
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3295
3372
  ],
3296
3373
  "references": {
3297
3374
  "mate": "..",
@@ -3306,7 +3383,7 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3306
3383
  "opencodeTui": {
3307
3384
  "$schema": "https://opencode.ai/tui.json",
3308
3385
  "plugin": [
3309
- "@uniqbit/mate-opencode-plugin@0.15.4-canary.8",
3386
+ "@uniqbit/mate-opencode-plugin@0.15.4-canary.11",
3310
3387
  ],
3311
3388
  },
3312
3389
  }
@@ -3326,8 +3403,10 @@ This block is kept for AGENTS.md compatibility and must not restate that policy.
3326
3403
 
3327
3404
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3328
3405
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3406
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3329
3407
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3330
3408
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3409
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3331
3410
 
3332
3411
  <!-- MATE:COMPANION:END -->
3333
3412
  "
@@ -3348,10 +3427,12 @@ This block is kept for Claude/AGENTS.md compatibility and must not restate that
3348
3427
 
3349
3428
  - Use absolute paths when a tool needs a file path. Do not create literal \`$MATE_REPO_PATH\` or \`$MATE_ARTIFACT_PATH\` directories.
3350
3429
  - When reporting information to me, be extremely concise and sacrifice grammar for the sake of concision. Apply this same preference to JSDoc.
3430
+ - Code comments: JSDoc format only (\`/** ... */\`), never \`//\`. Sparse — only non-obvious invariants or constraints, never restated artifact rationale.
3351
3431
  - Claude Code receives \`$MATE_ARTIFACT_PATH\` via \`--add-dir\`; if \`@\` autocomplete does not show companion artifacts, reference them by absolute path.
3352
3432
  - The root \`CLAUDE.md\` in the companion repo is intentional and loaded by Mate. Do not create another project-level \`CLAUDE.md\` in the working repo unless the user explicitly asks for one.
3353
3433
  - Never add a \`Co-Authored-By: <model>\` trailer or model-attribution footer to commit messages.
3354
3434
  - Never commit, push, or open a pull request in the working repo (\`$MATE_REPO_PATH\`) unless the user explicitly asks for it.
3435
+ - Never connect to a database (local or remote), touch live/external systems (deploys, infra), or take destructive/irreversible actions without asking the user first.
3355
3436
 
3356
3437
  <!-- MATE:COMPANION:END -->
3357
3438
  "
@@ -3486,15 +3567,44 @@ User notes.
3486
3567
  }
3487
3568
  `;
3488
3569
 
3489
- exports[`working repo golden fixtures hub roots are refused before any runtime file is written 1`] = `
3570
+ exports[`working repo golden fixtures hub roots set up providers only without companion surfaces 1`] = `
3490
3571
  {
3491
3572
  "agentsMd": null,
3492
3573
  "claudeHooks": {},
3493
- "claudeMcpConfig": null,
3574
+ "claudeMcpConfig": {
3575
+ "mcpServers": {
3576
+ "tokensave": {
3577
+ "args": [
3578
+ "serve",
3579
+ ],
3580
+ "command": "tokensave",
3581
+ },
3582
+ },
3583
+ },
3494
3584
  "claudeMd": null,
3495
- "claudeSettingsLocal": null,
3585
+ "claudeSettingsLocal": {
3586
+ "autoMemoryEnabled": false,
3587
+ "permissions": {
3588
+ "allow": [
3589
+ "Bash(mate:*)",
3590
+ "Edit(<root>/companion/**)",
3591
+ "Read(<root>/companion/**)",
3592
+ ],
3593
+ },
3594
+ },
3496
3595
  "claudeSkills": {},
3497
- "opencodeConfig": null,
3596
+ "opencodeConfig": {
3597
+ "mcp": {
3598
+ "tokensave": {
3599
+ "command": [
3600
+ "tokensave",
3601
+ "serve",
3602
+ ],
3603
+ "enabled": true,
3604
+ "type": "local",
3605
+ },
3606
+ },
3607
+ },
3498
3608
  "opencodePlugins": {},
3499
3609
  "opencodeSkills": {},
3500
3610
  "opencodeTui": null,