@bonesofspring/ai-rules 0.2.23 → 0.2.25

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 (287) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +20 -5
  3. package/bin/cli.js +121 -15
  4. package/bin/mavis-install.js +5 -1
  5. package/bin/opencode-install.js +535 -0
  6. package/package.json +10 -3
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +2 -2
  8. package/presets/_shared/core/meta/preset-layering.md +3 -3
  9. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +1 -1
  10. package/presets/_shared/core/meta/preset-pr-checklist.md +4 -3
  11. package/presets/_shared/core/meta/preset-token-budget.md +3 -0
  12. package/presets/_shared/core/meta/preset-twin-sync.md +16 -0
  13. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +3 -3
  14. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  15. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +3 -0
  17. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +16 -0
  18. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +3 -3
  19. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  20. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  21. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +3 -0
  22. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +16 -0
  23. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +3 -3
  24. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  25. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  26. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +3 -0
  27. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +16 -0
  28. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +3 -3
  29. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  30. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  31. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +3 -0
  32. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +16 -0
  33. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +3 -3
  34. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  35. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  36. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +3 -0
  37. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +16 -0
  38. package/presets/claude/next/REPO_AGENTS.md +34 -8
  39. package/presets/claude/next/agents/build-verifier.md +3 -1
  40. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
  41. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +3 -3
  42. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  43. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  44. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +3 -0
  45. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +16 -0
  46. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +3 -3
  47. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  48. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  49. package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +3 -0
  50. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +16 -0
  51. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +3 -3
  52. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  53. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  54. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +3 -0
  55. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +16 -0
  56. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +3 -3
  57. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  58. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  59. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +3 -0
  60. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +16 -0
  61. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +3 -3
  62. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  63. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +4 -3
  64. package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +3 -0
  65. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +16 -0
  66. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +3 -3
  67. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +1 -1
  68. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +4 -3
  69. package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +3 -0
  70. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +16 -0
  71. package/presets/cursor/go/rules/preset-layering.mdc +3 -3
  72. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +1 -1
  73. package/presets/cursor/go/rules/preset-pr-checklist.mdc +4 -3
  74. package/presets/cursor/go/rules/preset-token-budget.mdc +3 -0
  75. package/presets/cursor/go/rules/preset-twin-sync.mdc +16 -0
  76. package/presets/cursor/ios-swift/rules/preset-layering.mdc +3 -3
  77. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -1
  78. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +4 -3
  79. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +3 -0
  80. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +16 -0
  81. package/presets/cursor/java/rules/preset-layering.mdc +3 -3
  82. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +1 -1
  83. package/presets/cursor/java/rules/preset-pr-checklist.mdc +4 -3
  84. package/presets/cursor/java/rules/preset-token-budget.mdc +3 -0
  85. package/presets/cursor/java/rules/preset-twin-sync.mdc +16 -0
  86. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +3 -3
  87. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +1 -1
  88. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +4 -3
  89. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +3 -0
  90. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +16 -0
  91. package/presets/cursor/next/REPO_AGENTS.md +26 -8
  92. package/presets/cursor/next/agents/build-verifier.md +3 -1
  93. package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
  94. package/presets/cursor/next/rules/preset-layering.mdc +3 -3
  95. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -1
  96. package/presets/cursor/next/rules/preset-pr-checklist.mdc +4 -3
  97. package/presets/cursor/next/rules/preset-token-budget.mdc +3 -0
  98. package/presets/cursor/next/rules/preset-twin-sync.mdc +16 -0
  99. package/presets/cursor/nuxt/rules/preset-layering.mdc +3 -3
  100. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -1
  101. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +4 -3
  102. package/presets/cursor/nuxt/rules/preset-token-budget.mdc +3 -0
  103. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +16 -0
  104. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +3 -3
  105. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +1 -1
  106. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +4 -3
  107. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +3 -0
  108. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +16 -0
  109. package/presets/cursor/php-laravel/rules/preset-layering.mdc +3 -3
  110. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +1 -1
  111. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +4 -3
  112. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +3 -0
  113. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +16 -0
  114. package/presets/cursor/svelte/rules/preset-layering.mdc +3 -3
  115. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -1
  116. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +4 -3
  117. package/presets/cursor/svelte/rules/preset-token-budget.mdc +3 -0
  118. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +16 -0
  119. package/presets/mavis/next/MAVIS.md +1 -0
  120. package/presets/mavis/next/REPO_AGENTS.md +28 -48
  121. package/presets/mavis/next/adapter-map.json +3 -3
  122. package/presets/mavis/next/agents/build-verifier.md +3 -1
  123. package/presets/mavis/next/rules/agent-team-orchestrator.md +2 -2
  124. package/presets/mavis/next/rules/ai-local-overlay.md +1 -1
  125. package/presets/mavis/next/rules/preset-layering.md +3 -3
  126. package/presets/mavis/next/rules/preset-no-cross-stack-leakage.md +1 -1
  127. package/presets/mavis/next/rules/preset-pr-checklist.md +4 -3
  128. package/presets/mavis/next/rules/preset-token-budget.md +3 -0
  129. package/presets/mavis/next/rules/preset-twin-sync.md +16 -0
  130. package/presets/opencode/README.md +61 -0
  131. package/presets/opencode/next/MCP.md +36 -0
  132. package/presets/opencode/next/OPENCODE.md +65 -0
  133. package/presets/opencode/next/README.md +16 -0
  134. package/presets/opencode/next/REPO_AGENTS.md +74 -0
  135. package/presets/opencode/next/adapter-map.json +959 -0
  136. package/presets/opencode/next/agents/README.md +201 -0
  137. package/presets/opencode/next/agents/accessibility-reviewer.md +73 -0
  138. package/presets/opencode/next/agents/api-contract-reviewer.md +69 -0
  139. package/presets/opencode/next/agents/build-verifier.md +124 -0
  140. package/presets/opencode/next/agents/ci-investigator.md +71 -0
  141. package/presets/opencode/next/agents/code-reviewer.md +73 -0
  142. package/presets/opencode/next/agents/codebase-analyzer.md +33 -0
  143. package/presets/opencode/next/agents/debugger.md +88 -0
  144. package/presets/opencode/next/agents/feature-developer.md +109 -0
  145. package/presets/opencode/next/agents/migration-specialist.md +79 -0
  146. package/presets/opencode/next/agents/mockup-reviewer.md +65 -0
  147. package/presets/opencode/next/agents/openspec-author.md +169 -0
  148. package/presets/opencode/next/agents/performance-auditor.md +80 -0
  149. package/presets/opencode/next/agents/playwright-test-generator.md +36 -0
  150. package/presets/opencode/next/agents/playwright-test-healer.md +36 -0
  151. package/presets/opencode/next/agents/playwright-test-planner.md +33 -0
  152. package/presets/opencode/next/agents/qa-tester.md +60 -0
  153. package/presets/opencode/next/agents/security-reviewer.md +66 -0
  154. package/presets/opencode/next/agents/solution-architect.md +80 -0
  155. package/presets/opencode/next/agents/task-analyst.md +178 -0
  156. package/presets/opencode/next/agents/task-router.md +190 -0
  157. package/presets/opencode/next/agents/tech-writer.md +69 -0
  158. package/presets/opencode/next/agents/unit-test-generator.md +39 -0
  159. package/presets/opencode/next/agents/unit-test-healer.md +40 -0
  160. package/presets/opencode/next/agents/unit-test-planner.md +66 -0
  161. package/presets/opencode/next/commands/README.md +49 -0
  162. package/presets/opencode/next/commands/spec-start.md +32 -0
  163. package/presets/opencode/next/commands/task-continue.md +58 -0
  164. package/presets/opencode/next/commands/task.md +58 -0
  165. package/presets/opencode/next/commands/technical-retro.md +88 -0
  166. package/presets/opencode/next/hooks/README.md +22 -0
  167. package/presets/opencode/next/hooks/chain-team-phases.sh +845 -0
  168. package/presets/opencode/next/opencode.json +33 -0
  169. package/presets/opencode/next/rules/README.md +20 -0
  170. package/presets/opencode/next/rules/agent-team-intake.md +11 -0
  171. package/presets/opencode/next/rules/agent-team-orchestrator.md +214 -0
  172. package/presets/opencode/next/rules/ai-local-overlay.md +37 -0
  173. package/presets/opencode/next/rules/anti-sycophancy-discipline.md +23 -0
  174. package/presets/opencode/next/rules/api-services.md +72 -0
  175. package/presets/opencode/next/rules/architecture-boundaries-ui.md +9 -0
  176. package/presets/opencode/next/rules/architecture-boundaries.md +86 -0
  177. package/presets/opencode/next/rules/arrow-functions.md +25 -0
  178. package/presets/opencode/next/rules/code-quality-and-refactoring.md +40 -0
  179. package/presets/opencode/next/rules/code-review-mr.md +40 -0
  180. package/presets/opencode/next/rules/css-property-order-stylelint.md +5 -0
  181. package/presets/opencode/next/rules/design-guidance.md +99 -0
  182. package/presets/opencode/next/rules/feature-delivery-workflow.md +49 -0
  183. package/presets/opencode/next/rules/http-client.md +55 -0
  184. package/presets/opencode/next/rules/layer-barrel-exports.md +68 -0
  185. package/presets/opencode/next/rules/mcp-usage.md +86 -0
  186. package/presets/opencode/next/rules/mockup-review.md +107 -0
  187. package/presets/opencode/next/rules/navigation-router-stack.md +56 -0
  188. package/presets/opencode/next/rules/navigation-router-ui.md +10 -0
  189. package/presets/opencode/next/rules/next-app-core.md +29 -0
  190. package/presets/opencode/next/rules/next-app-router.md +44 -0
  191. package/presets/opencode/next/rules/no-props-spread.md +56 -0
  192. package/presets/opencode/next/rules/no-type-assertion-as-import-export.md +51 -0
  193. package/presets/opencode/next/rules/package-manager.md +11 -0
  194. package/presets/opencode/next/rules/playwright-agents.md +67 -0
  195. package/presets/opencode/next/rules/post-change-lint.md +35 -0
  196. package/presets/opencode/next/rules/preset-layering.md +27 -0
  197. package/presets/opencode/next/rules/preset-no-cross-stack-leakage.md +90 -0
  198. package/presets/opencode/next/rules/preset-pr-checklist.md +36 -0
  199. package/presets/opencode/next/rules/preset-token-budget.md +39 -0
  200. package/presets/opencode/next/rules/preset-twin-sync.md +81 -0
  201. package/presets/opencode/next/rules/product-specs-authoring.md +112 -0
  202. package/presets/opencode/next/rules/product-specs.md +56 -0
  203. package/presets/opencode/next/rules/public-imports.md +50 -0
  204. package/presets/opencode/next/rules/react-a11y-coding.md +31 -0
  205. package/presets/opencode/next/rules/react-next-anti-hallucination.md +60 -0
  206. package/presets/opencode/next/rules/react-ui.md +105 -0
  207. package/presets/opencode/next/rules/reference-features.md +45 -0
  208. package/presets/opencode/next/rules/security-next.md +45 -0
  209. package/presets/opencode/next/rules/store-rtk.md +78 -0
  210. package/presets/opencode/next/rules/technical-retro.md +11 -0
  211. package/presets/opencode/next/rules/tests-e2e-structure.md +72 -0
  212. package/presets/opencode/next/rules/tests-unit.md +72 -0
  213. package/presets/opencode/next/rules/types-jsdoc.md +43 -0
  214. package/presets/opencode/next/rules/ux-design.md +99 -0
  215. package/presets/opencode/next/skills/README.md +21 -0
  216. package/presets/opencode/next/skills/ci-investigation/SKILL.md +44 -0
  217. package/presets/opencode/next/skills/code-review/SKILL.md +44 -0
  218. package/presets/opencode/next/skills/debug-investigation/SKILL.md +59 -0
  219. package/presets/opencode/next/skills/feature-delivery/SKILL.md +39 -0
  220. package/presets/opencode/next/skills/mockup-review/SKILL.md +29 -0
  221. package/presets/opencode/next/skills/playwright-e2e/SKILL.md +33 -0
  222. package/presets/opencode/next/skills/react-performance/SKILL.md +44 -0
  223. package/presets/opencode/next/skills/spec-authoring/SKILL.md +26 -0
  224. package/presets/opencode/next/skills/spec-discovery/SKILL.md +58 -0
  225. package/presets/opencode/next/skills/technical-retro/SKILL.md +54 -0
  226. package/presets/opencode/next/skills/unit-testing/SKILL.md +34 -0
  227. package/presets/opencode/next/skills/ux-design/SKILL.md +36 -0
  228. package/presets/opencode/next/skills/write-adr/SKILL.md +41 -0
  229. package/presets/opencode/next/team/README.md +148 -0
  230. package/presets/opencode/next/team/conventions.md +21 -0
  231. package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +79 -0
  232. package/presets/opencode/next/team/fixtures/bugfix-standard.json +25 -0
  233. package/presets/opencode/next/team/fixtures/feature-full.json +29 -0
  234. package/presets/opencode/next/team/fixtures/feature-light.json +27 -0
  235. package/presets/opencode/next/team/fixtures/feature-with-figma-url.json +17 -0
  236. package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
  237. package/presets/opencode/next/team/fixtures/memlog.example.md +9 -0
  238. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  239. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  240. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  241. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  242. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  243. package/presets/opencode/next/team/fixtures/metrics.example.json +54 -0
  244. package/presets/opencode/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
  245. package/presets/opencode/next/team/fixtures/mockup-review-standalone.json +14 -0
  246. package/presets/opencode/next/team/fixtures/ux-design-standalone.json +15 -0
  247. package/presets/opencode/next/team/tasks/.gitkeep +0 -0
  248. package/presets/opencode/platform-contract.json +131 -0
  249. package/scripts/capture-cli-golden.mjs +5 -1
  250. package/scripts/check-chain-hook-coverage.sh +1 -0
  251. package/scripts/check-opencode-adapter-map.mjs +294 -0
  252. package/scripts/check-opencode-local-overlay.mjs +56 -0
  253. package/scripts/check-opencode-platform-contract.mjs +388 -0
  254. package/scripts/check-opencode-token-budget.mjs +48 -0
  255. package/scripts/check-preset-leakage.sh +30 -1
  256. package/scripts/check-preset-structure.sh +45 -0
  257. package/scripts/check-task-router-intents.sh +4 -4
  258. package/scripts/fixtures/cli-golden/claude/next.json +8 -8
  259. package/scripts/fixtures/cli-golden/cursor/next.json +8 -8
  260. package/scripts/fixtures/cli-golden/mavis/next.json +10 -10
  261. package/scripts/fixtures/cli-golden/opencode/next.json +125 -0
  262. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
  263. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
  264. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
  265. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/OPENCODE.md +1 -0
  266. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/adapter-map.json +26 -0
  267. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/rules/sample.md +2 -0
  268. package/scripts/fixtures/opencode-adapter-map/valid/cursor/AGENTS.md +1 -0
  269. package/scripts/fixtures/opencode-adapter-map/valid/cursor/rules/sample.mdc +2 -0
  270. package/scripts/fixtures/opencode-adapter-map/valid/opencode/OPENCODE.md +1 -0
  271. package/scripts/fixtures/opencode-adapter-map/valid/opencode/adapter-map.json +26 -0
  272. package/scripts/fixtures/opencode-adapter-map/valid/opencode/rules/sample.md +2 -0
  273. package/scripts/fixtures/opencode-platform-contract/invalid-home-destination.json +131 -0
  274. package/scripts/fixtures/opencode-platform-contract/invalid-missing-capability.json +126 -0
  275. package/scripts/fixtures/opencode-platform-contract/invalid-released-unknown-stack.json +133 -0
  276. package/scripts/fixtures/opencode-platform-contract/invalid-unknown-native-path.json +131 -0
  277. package/scripts/fixtures/opencode-platform-contract/invalid-version-pin.json +132 -0
  278. package/scripts/fixtures/opencode-platform-contract/valid.json +131 -0
  279. package/scripts/generate-mavis-next.mjs +4 -101
  280. package/scripts/generate-opencode-next.mjs +730 -0
  281. package/scripts/lib/discover-hooks.mjs +23 -1
  282. package/scripts/sync-dogfood-mavis.sh +90 -0
  283. package/scripts/sync-dogfood-opencode.sh +85 -0
  284. package/scripts/test-agent-task-metrics-hooks.mjs +4 -1
  285. package/scripts/test-chain-team-phases-coverage.mjs +6 -1
  286. package/scripts/test-cli-init-clean.mjs +180 -2
  287. package/scripts/test-opencode-context-budget.mjs +53 -0
@@ -0,0 +1,133 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "opencode",
4
+ "runtimeExecutable": "opencode",
5
+ "sourceRoot": "presets/opencode",
6
+ "managedRoot": ".opencode",
7
+ "releasedStacks": [
8
+ "not-a-stack"
9
+ ],
10
+ "entryFiles": [
11
+ {
12
+ "source": "REPO_AGENTS.md",
13
+ "destination": "AGENTS.md"
14
+ },
15
+ {
16
+ "source": "OPENCODE.md",
17
+ "destination": ".opencode/AGENTS.md"
18
+ }
19
+ ],
20
+ "directoryMappings": [
21
+ {
22
+ "source": "rules",
23
+ "destination": ".opencode/rules"
24
+ },
25
+ {
26
+ "source": "agents",
27
+ "destination": ".opencode/agents"
28
+ },
29
+ {
30
+ "source": "skills",
31
+ "destination": ".opencode/skills"
32
+ },
33
+ {
34
+ "source": "commands",
35
+ "destination": ".opencode/commands"
36
+ },
37
+ {
38
+ "source": "hooks",
39
+ "destination": ".opencode/hooks"
40
+ },
41
+ {
42
+ "source": "team",
43
+ "destination": ".opencode/team"
44
+ }
45
+ ],
46
+ "mcp": {
47
+ "source": "opencode.json",
48
+ "fallbackDestination": "opencode.json",
49
+ "mode": "merge-opencode-json"
50
+ },
51
+ "docsSeed": {
52
+ "source": "presets/_shared/assets/docs-specs",
53
+ "behavior": "absent-only"
54
+ },
55
+ "cleanStrategy": "manifest-owned",
56
+ "nativeCapabilities": {
57
+ "cliVersion": {
58
+ "status": "unknown",
59
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
60
+ "nativePath": null
61
+ },
62
+ "rootAgents": {
63
+ "status": "confirmed",
64
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
65
+ "nativePath": "AGENTS.md"
66
+ },
67
+ "explicitAgentFile": {
68
+ "status": "confirmed",
69
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
70
+ "nativePath": ".opencode/agents"
71
+ },
72
+ "structuredOutput": {
73
+ "status": "unknown",
74
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
75
+ "nativePath": null
76
+ },
77
+ "referencedRule": {
78
+ "status": "confirmed",
79
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
80
+ "nativePath": "AGENTS.md"
81
+ },
82
+ "referencedSkill": {
83
+ "status": "confirmed",
84
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
85
+ "nativePath": ".opencode/skills"
86
+ },
87
+ "freshInit": {
88
+ "status": "unknown",
89
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
90
+ "nativePath": null
91
+ },
92
+ "nativeProjectRules": {
93
+ "status": "no-equivalent",
94
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
95
+ "nativePath": null
96
+ },
97
+ "nativeWorkspaceSkills": {
98
+ "status": "confirmed",
99
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
100
+ "nativePath": ".opencode/skills"
101
+ },
102
+ "nativeWorkspaceAgents": {
103
+ "status": "confirmed",
104
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
105
+ "nativePath": ".opencode/agents"
106
+ },
107
+ "projectMcp": {
108
+ "status": "confirmed",
109
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
110
+ "nativePath": "opencode.json"
111
+ },
112
+ "projectHooks": {
113
+ "status": "unknown",
114
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
115
+ "nativePath": null
116
+ },
117
+ "slashCommands": {
118
+ "status": "confirmed",
119
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
120
+ "nativePath": ".opencode/commands"
121
+ },
122
+ "pluginSkillMcp": {
123
+ "status": "confirmed",
124
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
125
+ "nativePath": "opencode.json"
126
+ },
127
+ "nativeTeam": {
128
+ "status": "partial",
129
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
130
+ "nativePath": ".opencode/team"
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "opencode",
4
+ "runtimeExecutable": "opencode",
5
+ "sourceRoot": "presets/opencode",
6
+ "managedRoot": ".opencode",
7
+ "releasedStacks": [],
8
+ "entryFiles": [
9
+ {
10
+ "source": "REPO_AGENTS.md",
11
+ "destination": "AGENTS.md"
12
+ },
13
+ {
14
+ "source": "OPENCODE.md",
15
+ "destination": ".opencode/AGENTS.md"
16
+ }
17
+ ],
18
+ "directoryMappings": [
19
+ {
20
+ "source": "rules",
21
+ "destination": ".opencode/rules"
22
+ },
23
+ {
24
+ "source": "agents",
25
+ "destination": ".opencode/agents"
26
+ },
27
+ {
28
+ "source": "skills",
29
+ "destination": ".opencode/skills"
30
+ },
31
+ {
32
+ "source": "commands",
33
+ "destination": ".opencode/commands"
34
+ },
35
+ {
36
+ "source": "hooks",
37
+ "destination": ".opencode/hooks"
38
+ },
39
+ {
40
+ "source": "team",
41
+ "destination": ".opencode/team"
42
+ }
43
+ ],
44
+ "mcp": {
45
+ "source": "opencode.json",
46
+ "fallbackDestination": "opencode.json",
47
+ "mode": "merge-opencode-json"
48
+ },
49
+ "docsSeed": {
50
+ "source": "presets/_shared/assets/docs-specs",
51
+ "behavior": "absent-only"
52
+ },
53
+ "cleanStrategy": "manifest-owned",
54
+ "nativeCapabilities": {
55
+ "cliVersion": {
56
+ "status": "unknown",
57
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
58
+ "nativePath": null
59
+ },
60
+ "rootAgents": {
61
+ "status": "confirmed",
62
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
63
+ "nativePath": "AGENTS.md"
64
+ },
65
+ "explicitAgentFile": {
66
+ "status": "confirmed",
67
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
68
+ "nativePath": ".opencode/agents"
69
+ },
70
+ "structuredOutput": {
71
+ "status": "unknown",
72
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
73
+ "nativePath": null
74
+ },
75
+ "referencedRule": {
76
+ "status": "confirmed",
77
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
78
+ "nativePath": "AGENTS.md"
79
+ },
80
+ "referencedSkill": {
81
+ "status": "confirmed",
82
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
83
+ "nativePath": ".opencode/skills"
84
+ },
85
+ "freshInit": {
86
+ "status": "unknown",
87
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
88
+ "nativePath": null
89
+ },
90
+ "nativeProjectRules": {
91
+ "status": "unknown",
92
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
93
+ "nativePath": "docs/imagined-native-rules"
94
+ },
95
+ "nativeWorkspaceSkills": {
96
+ "status": "confirmed",
97
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
98
+ "nativePath": ".opencode/skills"
99
+ },
100
+ "nativeWorkspaceAgents": {
101
+ "status": "confirmed",
102
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
103
+ "nativePath": ".opencode/agents"
104
+ },
105
+ "projectMcp": {
106
+ "status": "confirmed",
107
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
108
+ "nativePath": "opencode.json"
109
+ },
110
+ "projectHooks": {
111
+ "status": "unknown",
112
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
113
+ "nativePath": null
114
+ },
115
+ "slashCommands": {
116
+ "status": "confirmed",
117
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
118
+ "nativePath": ".opencode/commands"
119
+ },
120
+ "pluginSkillMcp": {
121
+ "status": "confirmed",
122
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
123
+ "nativePath": "opencode.json"
124
+ },
125
+ "nativeTeam": {
126
+ "status": "partial",
127
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
128
+ "nativePath": ".opencode/team"
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "opencode",
4
+ "runtimeExecutable": "opencode",
5
+ "sourceRoot": "presets/opencode",
6
+ "managedRoot": ".opencode",
7
+ "releasedStacks": [],
8
+ "entryFiles": [
9
+ {
10
+ "source": "REPO_AGENTS.md",
11
+ "destination": "AGENTS.md"
12
+ },
13
+ {
14
+ "source": "OPENCODE.md",
15
+ "destination": ".opencode/AGENTS.md"
16
+ }
17
+ ],
18
+ "directoryMappings": [
19
+ {
20
+ "source": "rules",
21
+ "destination": ".opencode/rules"
22
+ },
23
+ {
24
+ "source": "agents",
25
+ "destination": ".opencode/agents"
26
+ },
27
+ {
28
+ "source": "skills",
29
+ "destination": ".opencode/skills"
30
+ },
31
+ {
32
+ "source": "commands",
33
+ "destination": ".opencode/commands"
34
+ },
35
+ {
36
+ "source": "hooks",
37
+ "destination": ".opencode/hooks"
38
+ },
39
+ {
40
+ "source": "team",
41
+ "destination": ".opencode/team"
42
+ }
43
+ ],
44
+ "mcp": {
45
+ "source": "opencode.json",
46
+ "fallbackDestination": "opencode.json",
47
+ "mode": "merge-opencode-json"
48
+ },
49
+ "docsSeed": {
50
+ "source": "presets/_shared/assets/docs-specs",
51
+ "behavior": "absent-only"
52
+ },
53
+ "cleanStrategy": "manifest-owned",
54
+ "nativeCapabilities": {
55
+ "cliVersion": {
56
+ "status": "unknown",
57
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
58
+ "nativePath": null
59
+ },
60
+ "rootAgents": {
61
+ "status": "confirmed",
62
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
63
+ "nativePath": "AGENTS.md"
64
+ },
65
+ "explicitAgentFile": {
66
+ "status": "confirmed",
67
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
68
+ "nativePath": ".opencode/agents"
69
+ },
70
+ "structuredOutput": {
71
+ "status": "unknown",
72
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
73
+ "nativePath": null
74
+ },
75
+ "referencedRule": {
76
+ "status": "confirmed",
77
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
78
+ "nativePath": "AGENTS.md"
79
+ },
80
+ "referencedSkill": {
81
+ "status": "confirmed",
82
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
83
+ "nativePath": ".opencode/skills"
84
+ },
85
+ "freshInit": {
86
+ "status": "unknown",
87
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
88
+ "nativePath": null
89
+ },
90
+ "nativeProjectRules": {
91
+ "status": "no-equivalent",
92
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
93
+ "nativePath": null
94
+ },
95
+ "nativeWorkspaceSkills": {
96
+ "status": "confirmed",
97
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
98
+ "nativePath": ".opencode/skills"
99
+ },
100
+ "nativeWorkspaceAgents": {
101
+ "status": "confirmed",
102
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
103
+ "nativePath": ".opencode/agents"
104
+ },
105
+ "projectMcp": {
106
+ "status": "confirmed",
107
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
108
+ "nativePath": "opencode.json"
109
+ },
110
+ "projectHooks": {
111
+ "status": "unknown",
112
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
113
+ "nativePath": null
114
+ },
115
+ "slashCommands": {
116
+ "status": "confirmed",
117
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
118
+ "nativePath": ".opencode/commands"
119
+ },
120
+ "pluginSkillMcp": {
121
+ "status": "confirmed",
122
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
123
+ "nativePath": "opencode.json"
124
+ },
125
+ "nativeTeam": {
126
+ "status": "partial",
127
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
128
+ "nativePath": ".opencode/team"
129
+ }
130
+ },
131
+ "requiredCliVersion": "1.0.0"
132
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "opencode",
4
+ "runtimeExecutable": "opencode",
5
+ "sourceRoot": "presets/opencode",
6
+ "managedRoot": ".opencode",
7
+ "releasedStacks": [],
8
+ "entryFiles": [
9
+ {
10
+ "source": "REPO_AGENTS.md",
11
+ "destination": "AGENTS.md"
12
+ },
13
+ {
14
+ "source": "OPENCODE.md",
15
+ "destination": ".opencode/AGENTS.md"
16
+ }
17
+ ],
18
+ "directoryMappings": [
19
+ {
20
+ "source": "rules",
21
+ "destination": ".opencode/rules"
22
+ },
23
+ {
24
+ "source": "agents",
25
+ "destination": ".opencode/agents"
26
+ },
27
+ {
28
+ "source": "skills",
29
+ "destination": ".opencode/skills"
30
+ },
31
+ {
32
+ "source": "commands",
33
+ "destination": ".opencode/commands"
34
+ },
35
+ {
36
+ "source": "hooks",
37
+ "destination": ".opencode/hooks"
38
+ },
39
+ {
40
+ "source": "team",
41
+ "destination": ".opencode/team"
42
+ }
43
+ ],
44
+ "mcp": {
45
+ "source": "opencode.json",
46
+ "fallbackDestination": "opencode.json",
47
+ "mode": "merge-opencode-json"
48
+ },
49
+ "docsSeed": {
50
+ "source": "presets/_shared/assets/docs-specs",
51
+ "behavior": "absent-only"
52
+ },
53
+ "cleanStrategy": "manifest-owned",
54
+ "nativeCapabilities": {
55
+ "cliVersion": {
56
+ "status": "unknown",
57
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
58
+ "nativePath": null
59
+ },
60
+ "rootAgents": {
61
+ "status": "confirmed",
62
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
63
+ "nativePath": "AGENTS.md"
64
+ },
65
+ "explicitAgentFile": {
66
+ "status": "confirmed",
67
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
68
+ "nativePath": ".opencode/agents"
69
+ },
70
+ "structuredOutput": {
71
+ "status": "unknown",
72
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
73
+ "nativePath": null
74
+ },
75
+ "referencedRule": {
76
+ "status": "confirmed",
77
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
78
+ "nativePath": "AGENTS.md"
79
+ },
80
+ "referencedSkill": {
81
+ "status": "confirmed",
82
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
83
+ "nativePath": ".opencode/skills"
84
+ },
85
+ "freshInit": {
86
+ "status": "unknown",
87
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
88
+ "nativePath": null
89
+ },
90
+ "nativeProjectRules": {
91
+ "status": "no-equivalent",
92
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
93
+ "nativePath": null
94
+ },
95
+ "nativeWorkspaceSkills": {
96
+ "status": "confirmed",
97
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
98
+ "nativePath": ".opencode/skills"
99
+ },
100
+ "nativeWorkspaceAgents": {
101
+ "status": "confirmed",
102
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
103
+ "nativePath": ".opencode/agents"
104
+ },
105
+ "projectMcp": {
106
+ "status": "confirmed",
107
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
108
+ "nativePath": "opencode.json"
109
+ },
110
+ "projectHooks": {
111
+ "status": "unknown",
112
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
113
+ "nativePath": null
114
+ },
115
+ "slashCommands": {
116
+ "status": "confirmed",
117
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
118
+ "nativePath": ".opencode/commands"
119
+ },
120
+ "pluginSkillMcp": {
121
+ "status": "confirmed",
122
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
123
+ "nativePath": "opencode.json"
124
+ },
125
+ "nativeTeam": {
126
+ "status": "partial",
127
+ "evidence": "docs/OPENCODE-COMPATIBILITY.md",
128
+ "nativePath": ".opencode/team"
129
+ }
130
+ }
131
+ }
@@ -231,15 +231,15 @@ function main() {
231
231
 
232
232
  if (source === 'REPO_AGENTS.md') {
233
233
  const target = 'REPO_AGENTS.md';
234
- writeFile(target, buildRepoAgents(sourceText));
234
+ writeFile(target, sourceText);
235
235
  entries.push(
236
236
  entry({
237
237
  source,
238
238
  target,
239
239
  category: 'entry',
240
- disposition: 'transform',
240
+ disposition: 'copy',
241
241
  loadMode: 'root-entry',
242
- reason: 'Root AGENTS.md compatibility floor plus explicit .mavis/AGENTS.md pointer',
242
+ reason: 'Canonical cross-tool root AGENTS.md; identical for all platforms',
243
243
  sourceText,
244
244
  }),
245
245
  );
@@ -407,104 +407,6 @@ function dropLeadingHeading(text) {
407
407
  .replace(/^Short Cursor entry point\.[^\n]*\n+/, '');
408
408
  }
409
409
 
410
- function buildRepoAgents(_sourceText) {
411
- return `# Next.js — agent instructions
412
-
413
- Cross-tool repo-root guide. Tool-specific maps stay under \`.cursor/AGENTS.md\`,
414
- \`.claude/CLAUDE.md\`, and \`.mavis/AGENTS.md\`.
415
-
416
- **.mavis/** is an ai-rules-owned namespace, not a MiniMax-native discovery path.
417
- When this Mavis preset is installed, read \`.mavis/AGENTS.md\` on every turn.
418
- Do not write \`~/.minimax/**\`. Do not mutate
419
- \`.mavis/team/tasks/<slug>/status.json\` or \`metrics.json\` — the chain runner
420
- owns those files.
421
-
422
- ## Cross-tool setup
423
-
424
- - Treat this file as the **shared** entry for any agent (Cursor, Claude Code,
425
- Mavis / MiniMax Code, or other).
426
- - Install:
427
-
428
- \`\`\`bash
429
- npx @bonesofspring/ai-rules init cursor --preset next
430
- npx @bonesofspring/ai-rules init claude --preset next
431
- npx @bonesofspring/ai-rules init mavis --preset next
432
- \`\`\`
433
-
434
- \`init\` overwrites this file from the preset (\`REPO_AGENTS.md\` → \`AGENTS.md\`).
435
- Living gotchas belong in \`team/conventions.md\`, not here.
436
-
437
- ## Mavis compatibility entry
438
-
439
- After install, also read:
440
-
441
- - \`.mavis/AGENTS.md\` — Mavis load map, roles, and procedures
442
- - \`.mavis/rules/next-app-core.md\`
443
- - \`.mavis/rules/package-manager.md\`
444
- - \`.mavis/rules/code-quality-and-refactoring.md\`
445
- - \`.mavis/rules/ai-local-overlay.md\`
446
-
447
- Launch roles with \`mcode exec --file .mavis/agents/<role>.md\`. Start work with
448
- the task procedure in \`.mavis/commands/task.md\`.
449
-
450
- ## Commands (test / lint / build)
451
-
452
- Working directory for app scripts: **\`app/\`**. Detect the package manager from
453
- lockfile / \`packageManager\` (\`package-manager\` rule).
454
-
455
- | Gate | Typical command |
456
- |------|-----------------|
457
- | Lint JS | \`yarn lint:js\` (or project equivalent) from \`app/\` |
458
- | Lint CSS | \`yarn lint:css\` from \`app/\` |
459
- | Unit tests | project unit script under \`app/\` |
460
- | Build | project \`build\` under \`app/\` |
461
-
462
- After code edits: invoke **\`post-change-lint\`** (requestable). Full gate: agent
463
- \`build-verifier\`.
464
-
465
- ## Security basics
466
-
467
- - Do not commit secrets (\`.env\`, tokens, credentials).
468
- - Review destructive git (\`reset --hard\`, force-push) before running; respect
469
- shell hooks.
470
- - Do not weaken CI or skip hooks unless the user explicitly asks.
471
-
472
- ## Tool entry points
473
-
474
- | Tool | Map |
475
- |------|-----|
476
- | Cursor | \`.cursor/AGENTS.md\` (optional if Cursor not installed) |
477
- | Claude Code | \`.claude/CLAUDE.md\` (optional if Claude Code not installed) |
478
- | Mavis | \`.mavis/AGENTS.md\` (optional if Mavis not installed) |
479
-
480
- Rules: \`.cursor/rules/\`, \`.claude/rules/\`, or \`.mavis/rules/\`.
481
- Skills: \`.cursor/skills/\`, \`.claude/skills/\`, or \`.mavis/skills/\`.
482
-
483
- ## Living conventions
484
-
485
- Gotchas, local patterns, and team decisions:
486
- **\`.cursor/team/conventions.md\`**, **\`.claude/team/conventions.md\`**, and/or
487
- **\`.mavis/team/conventions.md\`** (fill after init; not overwritten on every
488
- dogfood sync when already present).
489
-
490
- ## Local overlay (\`.ai.local/\`) — MANDATORY
491
-
492
- A \`.ai.local/\` directory MAY exist at the repo root or at any nesting depth in
493
- monorepos. **All agents MUST read and apply it on every turn.** Rules there
494
- override preset rules; in conflicts, the local rule wins.
495
- \`override: kill <preset-rule-name>\` drops the named preset rule from the
496
- agent's context entirely.
497
-
498
- Plain markdown rules under \`.ai.local/rules/*.md\` are read by the agent with
499
- higher priority than preset rules. Living gotchas live in
500
- \`.ai.local/conventions.md\`.
501
-
502
- Authoring guide: \`docs/LOCAL-OVERLAY.md\` in the \`@bonesofspring/ai-rules\`
503
- package. The \`ai-local-overlay\` rule is the mechanism; this \`MANDATORY\`
504
- section is the reinforcement.
505
- `;
506
- }
507
-
508
410
  function stripInstallSection(body) {
509
411
  const index = body.search(/^## Install\r?\n/m);
510
412
  if (index < 0) {
@@ -533,6 +435,7 @@ under \`.mavis/skills/**\`. This file is ai-rules-owned (\`.mavis/AGENTS.md\`),
533
435
  not a MiniMax-reserved filename.
534
436
 
535
437
  Root \`AGENTS.md\` is the compatibility floor. Read it first, then this file.
438
+ Do not write \`~/.minimax/**\`.
536
439
 
537
440
  ## How to load
538
441