@bonesofspring/ai-rules 0.2.26 → 0.2.27

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 (874) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -1
  4. package/bin/cli.js +262 -44
  5. package/bin/lib/safe-path.js +93 -0
  6. package/bin/lib/seed-ai-local-team.js +5 -0
  7. package/bin/mavis-install.js +35 -8
  8. package/bin/opencode-install.js +34 -11
  9. package/docs/LOCAL-OVERLAY.md +186 -0
  10. package/docs/MAVIS-COMPATIBILITY.md +174 -0
  11. package/docs/MAVIS.md +120 -0
  12. package/docs/OPENCODE-COMPATIBILITY.md +54 -0
  13. package/docs/OPENCODE.md +123 -0
  14. package/docs/PRESET-CONTRIBUTION.md +431 -0
  15. package/docs/PRESET-ENGLISH-STYLE.md +91 -0
  16. package/docs/specs/INDEX.md +9 -0
  17. package/docs/specs/_templates/feature.md +32 -0
  18. package/docs/specs/_templates/page.md +47 -0
  19. package/package.json +6 -1
  20. package/presets/_shared/core/meta/preset-layering.md +1 -1
  21. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  22. package/presets/_shared/core/meta/preset-token-budget.md +10 -10
  23. package/presets/_shared/core/quality/code-quality-and-refactoring.md +6 -0
  24. package/presets/claude/android-kotlin/agents/build-verifier.md +2 -2
  25. package/presets/claude/android-kotlin/commands/task.md +1 -1
  26. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +32 -3
  27. package/presets/claude/android-kotlin/hooks/examples/README.md +5 -3
  28. package/presets/claude/android-kotlin/hooks/examples/test-on-save.example.sh +6 -4
  29. package/presets/claude/android-kotlin/rules/README.md +1 -1
  30. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +6 -0
  31. package/presets/claude/android-kotlin/rules/tooling-and-review/mcp-usage.md +1 -1
  32. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +2 -2
  33. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  34. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  35. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +11 -11
  36. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +1 -1
  37. package/presets/claude/android-kotlin/rules/ui-and-accessibility/compose.md +2 -0
  38. package/presets/claude/go/CLAUDE.md +1 -1
  39. package/presets/claude/go/agents/build-verifier.md +1 -1
  40. package/presets/claude/go/commands/task.md +1 -1
  41. package/presets/claude/go/hooks/chain-team-phases.sh +32 -3
  42. package/presets/claude/go/hooks/examples/README.md +5 -3
  43. package/presets/claude/go/rules/README.md +1 -1
  44. package/presets/claude/go/rules/api-and-data/adapters-driven.md +3 -3
  45. package/presets/claude/go/rules/api-and-data/adapters-driving.md +2 -2
  46. package/presets/claude/go/rules/api-and-data/api-grpc.md +2 -2
  47. package/presets/claude/go/rules/api-and-data/api-http.md +3 -3
  48. package/presets/claude/go/rules/api-and-data/messaging-adapters.md +1 -1
  49. package/presets/claude/go/rules/api-and-data/persistence-adapters.md +2 -2
  50. package/presets/claude/go/rules/architecture/application-usecases.md +1 -1
  51. package/presets/claude/go/rules/architecture/domain-layer.md +1 -1
  52. package/presets/claude/go/rules/architecture/feature-delivery.md +1 -1
  53. package/presets/claude/go/rules/architecture/ports-interfaces.md +2 -2
  54. package/presets/claude/go/rules/stack/go-conventions.md +1 -1
  55. package/presets/claude/go/rules/testing/e2e.md +2 -2
  56. package/presets/claude/go/rules/testing/integration.md +2 -2
  57. package/presets/claude/go/rules/testing/unit.md +1 -1
  58. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
  59. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  60. package/presets/claude/go/rules/tooling-and-review/code-quality.md +6 -0
  61. package/presets/claude/go/rules/tooling-and-review/code-review.md +1 -1
  62. package/presets/claude/go/rules/tooling-and-review/go-tooling.md +1 -1
  63. package/presets/claude/go/rules/tooling-and-review/mcp-usage.md +1 -1
  64. package/presets/claude/go/rules/tooling-and-review/post-change-test.md +1 -1
  65. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  66. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  67. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +10 -10
  68. package/presets/claude/go/rules/tooling-and-review/security-go.md +3 -3
  69. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +1 -1
  70. package/presets/claude/ios-swift/agents/build-verifier.md +3 -3
  71. package/presets/claude/ios-swift/commands/task.md +1 -1
  72. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +32 -3
  73. package/presets/claude/ios-swift/hooks/examples/README.md +5 -3
  74. package/presets/claude/ios-swift/rules/README.md +1 -1
  75. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +3 -3
  76. package/presets/claude/ios-swift/rules/architecture/reference-features.md +1 -1
  77. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +6 -0
  78. package/presets/claude/ios-swift/rules/tooling-and-review/mcp-usage.md +1 -1
  79. package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +2 -2
  80. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +2 -2
  81. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  82. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  83. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +11 -11
  84. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +1 -1
  85. package/presets/claude/ios-swift/rules/ui-and-accessibility/swiftui.md +7 -0
  86. package/presets/claude/java/CLAUDE.md +2 -2
  87. package/presets/claude/java/agents/build-verifier.md +1 -1
  88. package/presets/claude/java/commands/task.md +1 -1
  89. package/presets/claude/java/hooks/chain-team-phases.sh +32 -3
  90. package/presets/claude/java/hooks/examples/README.md +5 -3
  91. package/presets/claude/java/rules/README.md +1 -1
  92. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  93. package/presets/claude/java/rules/tooling-and-review/code-quality.md +6 -0
  94. package/presets/claude/java/rules/tooling-and-review/mcp-usage.md +1 -1
  95. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
  96. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  97. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +10 -10
  98. package/presets/claude/mcp-ts/CLAUDE.md +1 -1
  99. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  100. package/presets/claude/mcp-ts/commands/task.md +1 -1
  101. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +32 -3
  102. package/presets/claude/mcp-ts/rules/README.md +1 -1
  103. package/presets/claude/mcp-ts/rules/api-and-data/mcp-auth-secrets.md +4 -4
  104. package/presets/claude/mcp-ts/rules/api-and-data/mcp-contract-testing.md +2 -2
  105. package/presets/claude/mcp-ts/rules/api-and-data/mcp-tool-design.md +1 -1
  106. package/presets/claude/mcp-ts/rules/api-and-data/mcp-transport-packaging.md +2 -2
  107. package/presets/claude/mcp-ts/rules/architecture/mcp-server-boundaries.md +1 -1
  108. package/presets/claude/mcp-ts/rules/testing/unit.md +2 -2
  109. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-sycophancy-discipline.md +2 -2
  110. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +6 -0
  111. package/presets/claude/mcp-ts/rules/tooling-and-review/mcp-ts-tooling.md +3 -3
  112. package/presets/claude/mcp-ts/rules/tooling-and-review/post-change-test.md +1 -1
  113. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
  114. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  115. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +10 -10
  116. package/presets/claude/mcp-ts/rules/tooling-and-review/security-mcp.md +1 -1
  117. package/presets/claude/next/README.md +1 -1
  118. package/presets/claude/next/agents/build-verifier.md +2 -2
  119. package/presets/claude/next/commands/task.md +1 -1
  120. package/presets/claude/next/hooks/chain-team-phases.sh +32 -3
  121. package/presets/claude/next/hooks/examples/README.md +5 -3
  122. package/presets/claude/next/rules/README.md +1 -1
  123. package/presets/claude/next/rules/api-and-data/api-services.md +6 -4
  124. package/presets/claude/next/rules/api-and-data/store-rtk.md +6 -5
  125. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +4 -0
  126. package/presets/claude/next/rules/architecture/reference-features.md +1 -1
  127. package/presets/claude/next/rules/stack/next-app-core.md +2 -1
  128. package/presets/claude/next/rules/testing/tests-unit.md +1 -0
  129. package/presets/claude/next/rules/tooling-and-review/code-quality.md +6 -0
  130. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +2 -2
  131. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  132. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  133. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +11 -11
  134. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +1 -1
  135. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +37 -1
  136. package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  137. package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  138. package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  139. package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  140. package/presets/claude/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  141. package/presets/claude/next/team/fixtures/metrics.example.json +54 -0
  142. package/presets/claude/nuxt/agents/build-verifier.md +2 -2
  143. package/presets/claude/nuxt/commands/task.md +1 -1
  144. package/presets/claude/nuxt/hooks/chain-team-phases.sh +32 -3
  145. package/presets/claude/nuxt/hooks/examples/README.md +5 -3
  146. package/presets/claude/nuxt/hooks/examples/format-edited.example.sh +8 -7
  147. package/presets/claude/nuxt/hooks/examples/test-on-save.example.sh +8 -3
  148. package/presets/claude/nuxt/rules/README.md +1 -1
  149. package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +1 -1
  150. package/presets/claude/nuxt/rules/architecture/reference-features.md +1 -1
  151. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +6 -0
  152. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +2 -2
  153. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  154. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  155. package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +11 -11
  156. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +1 -1
  157. package/presets/claude/nuxt/rules/ui-and-accessibility/vue-ui.md +7 -0
  158. package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  159. package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  160. package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  161. package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  162. package/presets/claude/nuxt/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  163. package/presets/claude/nuxt/team/fixtures/metrics.example.json +54 -0
  164. package/presets/claude/php-hexagonal/CLAUDE.md +2 -2
  165. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  166. package/presets/claude/php-hexagonal/commands/task.md +1 -1
  167. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +32 -3
  168. package/presets/claude/php-hexagonal/hooks/examples/README.md +5 -3
  169. package/presets/claude/php-hexagonal/rules/README.md +1 -1
  170. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  171. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +6 -0
  172. package/presets/claude/php-hexagonal/rules/tooling-and-review/mcp-usage.md +1 -1
  173. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +1 -1
  174. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  175. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +10 -10
  176. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  177. package/presets/claude/php-laravel/commands/task.md +1 -1
  178. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +32 -3
  179. package/presets/claude/php-laravel/hooks/examples/README.md +5 -3
  180. package/presets/claude/php-laravel/rules/README.md +1 -1
  181. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  182. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +6 -0
  183. package/presets/claude/php-laravel/rules/tooling-and-review/mcp-usage.md +1 -1
  184. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +1 -1
  185. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  186. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +10 -10
  187. package/presets/claude/svelte/agents/build-verifier.md +2 -2
  188. package/presets/claude/svelte/commands/task.md +1 -1
  189. package/presets/claude/svelte/hooks/chain-team-phases.sh +32 -3
  190. package/presets/claude/svelte/hooks/examples/README.md +5 -3
  191. package/presets/claude/svelte/rules/README.md +1 -1
  192. package/presets/claude/svelte/rules/api-and-data/store-svelte.md +1 -1
  193. package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +1 -1
  194. package/presets/claude/svelte/rules/architecture/reference-features.md +1 -1
  195. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +6 -0
  196. package/presets/claude/svelte/rules/tooling-and-review/mcp-usage.md +1 -1
  197. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +2 -2
  198. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  199. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  200. package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +11 -11
  201. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +1 -1
  202. package/presets/claude/svelte/rules/ui-and-accessibility/no-rest-props-spread.md +1 -1
  203. package/presets/claude/svelte/rules/ui-and-accessibility/svelte-ui.md +7 -0
  204. package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  205. package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  206. package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  207. package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  208. package/presets/claude/svelte/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  209. package/presets/claude/svelte/team/fixtures/metrics.example.json +54 -0
  210. package/presets/cursor/android-kotlin/agents/build-verifier.md +2 -2
  211. package/presets/cursor/android-kotlin/commands/task.md +1 -1
  212. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +32 -3
  213. package/presets/cursor/android-kotlin/hooks/examples/test-on-save.example.sh +6 -4
  214. package/presets/cursor/android-kotlin/rules/README.md +1 -1
  215. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +6 -0
  216. package/presets/cursor/android-kotlin/rules/compose-ui.mdc +2 -0
  217. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +2 -2
  218. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +1 -1
  219. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
  220. package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +11 -11
  221. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +1 -1
  222. package/presets/cursor/go/README.md +1 -1
  223. package/presets/cursor/go/agents/build-verifier.md +1 -1
  224. package/presets/cursor/go/commands/task.md +1 -1
  225. package/presets/cursor/go/hooks/chain-team-phases.sh +32 -3
  226. package/presets/cursor/go/rules/README.md +2 -2
  227. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +6 -0
  228. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  229. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  230. package/presets/cursor/go/rules/preset-token-budget.mdc +10 -10
  231. package/presets/cursor/ios-swift/README.md +1 -1
  232. package/presets/cursor/ios-swift/agents/build-verifier.md +3 -3
  233. package/presets/cursor/ios-swift/commands/task.md +1 -1
  234. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +32 -3
  235. package/presets/cursor/ios-swift/rules/README.md +2 -2
  236. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +6 -0
  237. package/presets/cursor/ios-swift/rules/preset-layering.mdc +2 -2
  238. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -1
  239. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
  240. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +11 -11
  241. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +1 -1
  242. package/presets/cursor/ios-swift/rules/reference-features.mdc +1 -1
  243. package/presets/cursor/ios-swift/rules/swiftui-ui.mdc +7 -0
  244. package/presets/cursor/java/AGENTS.md +1 -1
  245. package/presets/cursor/java/agents/build-verifier.md +1 -1
  246. package/presets/cursor/java/commands/task.md +1 -1
  247. package/presets/cursor/java/hooks/chain-team-phases.sh +32 -3
  248. package/presets/cursor/java/rules/README.md +2 -2
  249. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +1 -1
  250. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +6 -0
  251. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  252. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  253. package/presets/cursor/java/rules/preset-token-budget.mdc +10 -10
  254. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  255. package/presets/cursor/mcp-ts/commands/task.md +1 -1
  256. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +32 -3
  257. package/presets/cursor/mcp-ts/rules/README.md +2 -2
  258. package/presets/cursor/mcp-ts/rules/anti-sycophancy-discipline.mdc +2 -2
  259. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +6 -0
  260. package/presets/cursor/mcp-ts/rules/mcp-auth-secrets.mdc +4 -4
  261. package/presets/cursor/mcp-ts/rules/mcp-contract-testing.mdc +2 -2
  262. package/presets/cursor/mcp-ts/rules/mcp-server-boundaries.mdc +1 -1
  263. package/presets/cursor/mcp-ts/rules/mcp-tool-design.mdc +1 -1
  264. package/presets/cursor/mcp-ts/rules/mcp-transport-packaging.mdc +2 -2
  265. package/presets/cursor/mcp-ts/rules/mcp-ts-tooling.mdc +3 -3
  266. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
  267. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
  268. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +10 -10
  269. package/presets/cursor/mcp-ts/rules/security-mcp.mdc +1 -1
  270. package/presets/cursor/mcp-ts/rules/tests-unit.mdc +2 -2
  271. package/presets/cursor/next/README.md +2 -2
  272. package/presets/cursor/next/agents/build-verifier.md +2 -2
  273. package/presets/cursor/next/commands/task.md +1 -1
  274. package/presets/cursor/next/hooks/chain-team-phases.sh +32 -3
  275. package/presets/cursor/next/rules/README.md +1 -1
  276. package/presets/cursor/next/rules/api-services.mdc +6 -4
  277. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +6 -0
  278. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +4 -0
  279. package/presets/cursor/next/rules/next-app-core.mdc +2 -1
  280. package/presets/cursor/next/rules/preset-layering.mdc +2 -2
  281. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -1
  282. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
  283. package/presets/cursor/next/rules/preset-token-budget.mdc +11 -11
  284. package/presets/cursor/next/rules/preset-twin-sync.mdc +1 -1
  285. package/presets/cursor/next/rules/react-ui.mdc +37 -1
  286. package/presets/cursor/next/rules/reference-features.mdc +1 -1
  287. package/presets/cursor/next/rules/store-rtk.mdc +6 -5
  288. package/presets/cursor/next/rules/tests-unit.mdc +1 -0
  289. package/presets/cursor/nuxt/README.md +1 -1
  290. package/presets/cursor/nuxt/agents/build-verifier.md +2 -2
  291. package/presets/cursor/nuxt/commands/task.md +1 -1
  292. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +32 -3
  293. package/presets/cursor/nuxt/hooks/examples/format-edited.example.sh +8 -7
  294. package/presets/cursor/nuxt/hooks/examples/test-on-save.example.sh +8 -3
  295. package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +1 -1
  296. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +6 -0
  297. package/presets/cursor/nuxt/rules/design-guidance.mdc +1 -1
  298. package/presets/cursor/nuxt/rules/layer-barrel-exports.mdc +1 -1
  299. package/presets/cursor/nuxt/rules/preset-layering.mdc +2 -2
  300. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -1
  301. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
  302. package/presets/cursor/nuxt/rules/preset-token-budget.mdc +11 -11
  303. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +1 -1
  304. package/presets/cursor/nuxt/rules/reference-features.mdc +1 -1
  305. package/presets/cursor/nuxt/rules/vue-ui.mdc +7 -0
  306. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  307. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  308. package/presets/cursor/php-hexagonal/commands/task.md +1 -1
  309. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +32 -3
  310. package/presets/cursor/php-hexagonal/rules/README.md +2 -2
  311. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +1 -1
  312. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +6 -0
  313. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +1 -1
  314. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
  315. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +10 -10
  316. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  317. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  318. package/presets/cursor/php-laravel/commands/task.md +1 -1
  319. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +32 -3
  320. package/presets/cursor/php-laravel/rules/README.md +2 -2
  321. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +1 -1
  322. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +6 -0
  323. package/presets/cursor/php-laravel/rules/preset-layering.mdc +1 -1
  324. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
  325. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +10 -10
  326. package/presets/cursor/svelte/README.md +1 -1
  327. package/presets/cursor/svelte/agents/build-verifier.md +2 -2
  328. package/presets/cursor/svelte/commands/task.md +1 -1
  329. package/presets/cursor/svelte/hooks/chain-team-phases.sh +32 -3
  330. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +6 -0
  331. package/presets/cursor/svelte/rules/layer-barrel-exports.mdc +1 -1
  332. package/presets/cursor/svelte/rules/preset-layering.mdc +2 -2
  333. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -1
  334. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
  335. package/presets/cursor/svelte/rules/preset-token-budget.mdc +11 -11
  336. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +1 -1
  337. package/presets/cursor/svelte/rules/reference-features.mdc +1 -1
  338. package/presets/cursor/svelte/rules/svelte-ui.mdc +7 -0
  339. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  340. package/presets/mavis/android-kotlin/agents/build-verifier.md +2 -2
  341. package/presets/mavis/android-kotlin/commands/spec-start.md +2 -2
  342. package/presets/mavis/android-kotlin/commands/task.md +6 -6
  343. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +32 -3
  344. package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +14 -0
  345. package/presets/mavis/android-kotlin/rules/code-review-mr.md +39 -0
  346. package/presets/mavis/android-kotlin/rules/compose-ui.md +2 -0
  347. package/presets/mavis/android-kotlin/rules/design-guidance.md +5 -0
  348. package/presets/mavis/android-kotlin/rules/mcp-usage.md +8 -0
  349. package/presets/mavis/android-kotlin/rules/mockup-review.md +4 -0
  350. package/presets/mavis/android-kotlin/rules/preset-layering.md +1 -1
  351. package/presets/mavis/android-kotlin/rules/preset-no-cross-stack-leakage.md +4 -0
  352. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +1 -1
  353. package/presets/mavis/android-kotlin/rules/preset-token-budget.md +10 -10
  354. package/presets/mavis/android-kotlin/rules/product-specs-authoring.md +6 -0
  355. package/presets/mavis/android-kotlin/rules/product-specs.md +5 -0
  356. package/presets/mavis/android-kotlin/rules/ux-design.md +4 -0
  357. package/presets/mavis/android-kotlin/skills/debug-investigation/SKILL.md +39 -0
  358. package/presets/mavis/go/adapter-map.json +1 -1
  359. package/presets/mavis/go/agents/build-verifier.md +1 -1
  360. package/presets/mavis/go/commands/spec-start.md +2 -2
  361. package/presets/mavis/go/commands/task.md +6 -6
  362. package/presets/mavis/go/hooks/chain-team-phases.sh +32 -3
  363. package/presets/mavis/go/rules/agent-team-intake.md +4 -0
  364. package/presets/mavis/go/rules/code-quality-and-refactoring.md +15 -0
  365. package/presets/mavis/go/rules/code-review-mr.md +7 -0
  366. package/presets/mavis/go/rules/design-guidance.md +5 -0
  367. package/presets/mavis/go/rules/mcp-usage.md +7 -0
  368. package/presets/mavis/go/rules/preset-layering.md +1 -1
  369. package/presets/mavis/go/rules/preset-pr-checklist.md +1 -1
  370. package/presets/mavis/go/rules/preset-token-budget.md +10 -10
  371. package/presets/mavis/go/rules/product-specs-authoring.md +6 -0
  372. package/presets/mavis/go/rules/product-specs.md +6 -0
  373. package/presets/mavis/go/skills/debug-investigation/SKILL.md +20 -0
  374. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  375. package/presets/mavis/ios-swift/agents/build-verifier.md +3 -3
  376. package/presets/mavis/ios-swift/commands/spec-start.md +2 -2
  377. package/presets/mavis/ios-swift/commands/task.md +6 -6
  378. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +32 -3
  379. package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +14 -0
  380. package/presets/mavis/ios-swift/rules/code-review-mr.md +39 -0
  381. package/presets/mavis/ios-swift/rules/design-guidance.md +5 -0
  382. package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +66 -0
  383. package/presets/mavis/ios-swift/rules/mcp-usage.md +8 -0
  384. package/presets/mavis/ios-swift/rules/mockup-review.md +4 -0
  385. package/presets/mavis/ios-swift/rules/preset-layering.md +1 -1
  386. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +1 -1
  387. package/presets/mavis/ios-swift/rules/preset-token-budget.md +10 -10
  388. package/presets/mavis/ios-swift/rules/product-specs-authoring.md +6 -0
  389. package/presets/mavis/ios-swift/rules/product-specs.md +5 -0
  390. package/presets/mavis/ios-swift/rules/reference-features.md +49 -0
  391. package/presets/mavis/ios-swift/rules/swiftui-ui.md +7 -0
  392. package/presets/mavis/ios-swift/rules/ux-design.md +4 -0
  393. package/presets/mavis/ios-swift/skills/debug-investigation/SKILL.md +39 -0
  394. package/presets/mavis/java/adapter-map.json +1 -1
  395. package/presets/mavis/java/agents/build-verifier.md +1 -1
  396. package/presets/mavis/java/commands/spec-start.md +2 -2
  397. package/presets/mavis/java/commands/task.md +6 -6
  398. package/presets/mavis/java/hooks/chain-team-phases.sh +32 -3
  399. package/presets/mavis/java/rules/agent-team-intake.md +4 -0
  400. package/presets/mavis/java/rules/code-quality-and-refactoring.md +15 -0
  401. package/presets/mavis/java/rules/code-review-mr.md +9 -0
  402. package/presets/mavis/java/rules/design-guidance.md +6 -0
  403. package/presets/mavis/java/rules/mcp-usage.md +6 -0
  404. package/presets/mavis/java/rules/preset-layering.md +1 -1
  405. package/presets/mavis/java/rules/preset-pr-checklist.md +1 -1
  406. package/presets/mavis/java/rules/preset-token-budget.md +10 -10
  407. package/presets/mavis/java/rules/product-specs-authoring.md +6 -0
  408. package/presets/mavis/java/rules/product-specs.md +6 -0
  409. package/presets/mavis/java/skills/debug-investigation/SKILL.md +20 -0
  410. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  411. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  412. package/presets/mavis/mcp-ts/commands/spec-start.md +2 -2
  413. package/presets/mavis/mcp-ts/commands/task.md +6 -6
  414. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +32 -3
  415. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +5 -0
  416. package/presets/mavis/mcp-ts/rules/anti-sycophancy-discipline.md +4 -0
  417. package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +15 -0
  418. package/presets/mavis/mcp-ts/rules/code-review-mr.md +6 -0
  419. package/presets/mavis/mcp-ts/rules/design-guidance.md +5 -0
  420. package/presets/mavis/mcp-ts/rules/mcp-usage.md +7 -0
  421. package/presets/mavis/mcp-ts/rules/preset-layering.md +1 -1
  422. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +1 -1
  423. package/presets/mavis/mcp-ts/rules/preset-token-budget.md +10 -10
  424. package/presets/mavis/mcp-ts/rules/product-specs-authoring.md +6 -0
  425. package/presets/mavis/mcp-ts/rules/product-specs.md +6 -0
  426. package/presets/mavis/mcp-ts/skills/debug-investigation/SKILL.md +15 -0
  427. package/presets/mavis/next/adapter-map.json +1 -1
  428. package/presets/mavis/next/agents/build-verifier.md +2 -2
  429. package/presets/mavis/next/commands/spec-start.md +2 -2
  430. package/presets/mavis/next/commands/task.md +6 -6
  431. package/presets/mavis/next/hooks/chain-team-phases.sh +32 -3
  432. package/presets/mavis/next/rules/api-services.md +6 -4
  433. package/presets/mavis/next/rules/code-quality-and-refactoring.md +13 -0
  434. package/presets/mavis/next/rules/code-review-mr.md +13 -0
  435. package/presets/mavis/next/rules/design-guidance.md +5 -0
  436. package/presets/mavis/next/rules/feature-delivery-workflow.md +85 -0
  437. package/presets/mavis/next/rules/mcp-usage.md +9 -0
  438. package/presets/mavis/next/rules/mockup-review.md +4 -0
  439. package/presets/mavis/next/rules/next-app-core.md +2 -1
  440. package/presets/mavis/next/rules/preset-layering.md +1 -1
  441. package/presets/mavis/next/rules/preset-pr-checklist.md +1 -1
  442. package/presets/mavis/next/rules/preset-token-budget.md +10 -10
  443. package/presets/mavis/next/rules/product-specs-authoring.md +6 -0
  444. package/presets/mavis/next/rules/product-specs.md +6 -0
  445. package/presets/mavis/next/rules/react-ui.md +37 -1
  446. package/presets/mavis/next/rules/reference-features.md +36 -0
  447. package/presets/mavis/next/rules/store-rtk.md +6 -5
  448. package/presets/mavis/next/rules/tests-e2e-structure.md +15 -0
  449. package/presets/mavis/next/rules/tests-unit.md +33 -0
  450. package/presets/mavis/next/rules/ux-design.md +4 -0
  451. package/presets/mavis/next/skills/debug-investigation/SKILL.md +28 -0
  452. package/presets/mavis/nuxt/adapter-map.json +1 -1
  453. package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
  454. package/presets/mavis/nuxt/commands/spec-start.md +2 -2
  455. package/presets/mavis/nuxt/commands/task.md +6 -6
  456. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +32 -3
  457. package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +13 -0
  458. package/presets/mavis/nuxt/rules/code-review-mr.md +13 -0
  459. package/presets/mavis/nuxt/rules/design-guidance.md +5 -0
  460. package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +82 -0
  461. package/presets/mavis/nuxt/rules/mcp-usage.md +9 -0
  462. package/presets/mavis/nuxt/rules/mockup-review.md +4 -0
  463. package/presets/mavis/nuxt/rules/preset-layering.md +1 -1
  464. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +1 -1
  465. package/presets/mavis/nuxt/rules/preset-token-budget.md +10 -10
  466. package/presets/mavis/nuxt/rules/product-specs-authoring.md +6 -0
  467. package/presets/mavis/nuxt/rules/product-specs.md +5 -0
  468. package/presets/mavis/nuxt/rules/reference-features.md +36 -0
  469. package/presets/mavis/nuxt/rules/tests-e2e-structure.md +16 -0
  470. package/presets/mavis/nuxt/rules/tests-unit.md +11 -0
  471. package/presets/mavis/nuxt/rules/ux-design.md +4 -0
  472. package/presets/mavis/nuxt/rules/vue-ui.md +7 -0
  473. package/presets/mavis/nuxt/skills/debug-investigation/SKILL.md +30 -0
  474. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  475. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  476. package/presets/mavis/php-hexagonal/commands/spec-start.md +2 -2
  477. package/presets/mavis/php-hexagonal/commands/task.md +6 -6
  478. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +32 -3
  479. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +4 -0
  480. package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +15 -0
  481. package/presets/mavis/php-hexagonal/rules/code-review-mr.md +9 -0
  482. package/presets/mavis/php-hexagonal/rules/design-guidance.md +6 -0
  483. package/presets/mavis/php-hexagonal/rules/mcp-usage.md +6 -0
  484. package/presets/mavis/php-hexagonal/rules/preset-layering.md +1 -1
  485. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +1 -1
  486. package/presets/mavis/php-hexagonal/rules/preset-token-budget.md +10 -10
  487. package/presets/mavis/php-hexagonal/rules/product-specs-authoring.md +6 -0
  488. package/presets/mavis/php-hexagonal/rules/product-specs.md +6 -0
  489. package/presets/mavis/php-hexagonal/skills/debug-investigation/SKILL.md +20 -0
  490. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  491. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  492. package/presets/mavis/php-laravel/commands/spec-start.md +2 -2
  493. package/presets/mavis/php-laravel/commands/task.md +6 -6
  494. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +32 -3
  495. package/presets/mavis/php-laravel/rules/agent-team-intake.md +4 -0
  496. package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +15 -0
  497. package/presets/mavis/php-laravel/rules/code-review-mr.md +10 -0
  498. package/presets/mavis/php-laravel/rules/design-guidance.md +6 -0
  499. package/presets/mavis/php-laravel/rules/mcp-usage.md +6 -0
  500. package/presets/mavis/php-laravel/rules/preset-layering.md +1 -1
  501. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +1 -1
  502. package/presets/mavis/php-laravel/rules/preset-token-budget.md +10 -10
  503. package/presets/mavis/php-laravel/rules/product-specs-authoring.md +6 -0
  504. package/presets/mavis/php-laravel/rules/product-specs.md +6 -0
  505. package/presets/mavis/php-laravel/skills/debug-investigation/SKILL.md +20 -0
  506. package/presets/mavis/svelte/adapter-map.json +1 -1
  507. package/presets/mavis/svelte/agents/build-verifier.md +2 -2
  508. package/presets/mavis/svelte/commands/spec-start.md +2 -2
  509. package/presets/mavis/svelte/commands/task.md +6 -6
  510. package/presets/mavis/svelte/hooks/chain-team-phases.sh +32 -3
  511. package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +13 -0
  512. package/presets/mavis/svelte/rules/code-review-mr.md +13 -0
  513. package/presets/mavis/svelte/rules/design-guidance.md +5 -0
  514. package/presets/mavis/svelte/rules/feature-delivery-workflow.md +54 -0
  515. package/presets/mavis/svelte/rules/mcp-usage.md +9 -0
  516. package/presets/mavis/svelte/rules/mockup-review.md +4 -0
  517. package/presets/mavis/svelte/rules/preset-layering.md +1 -1
  518. package/presets/mavis/svelte/rules/preset-pr-checklist.md +1 -1
  519. package/presets/mavis/svelte/rules/preset-token-budget.md +10 -10
  520. package/presets/mavis/svelte/rules/product-specs-authoring.md +6 -0
  521. package/presets/mavis/svelte/rules/product-specs.md +5 -0
  522. package/presets/mavis/svelte/rules/reference-features.md +37 -0
  523. package/presets/mavis/svelte/rules/svelte-ui.md +7 -0
  524. package/presets/mavis/svelte/rules/tests-e2e-structure.md +16 -0
  525. package/presets/mavis/svelte/rules/tests-unit.md +11 -0
  526. package/presets/mavis/svelte/rules/ux-design.md +4 -0
  527. package/presets/mavis/svelte/skills/debug-investigation/SKILL.md +30 -0
  528. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  529. package/presets/opencode/android-kotlin/agents/build-verifier.md +2 -2
  530. package/presets/opencode/android-kotlin/commands/spec-start.md +1 -1
  531. package/presets/opencode/android-kotlin/commands/task-continue.md +1 -1
  532. package/presets/opencode/android-kotlin/commands/task.md +1 -1
  533. package/presets/opencode/android-kotlin/commands/technical-retro.md +1 -1
  534. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +32 -3
  535. package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +14 -0
  536. package/presets/opencode/android-kotlin/rules/code-review-mr.md +39 -0
  537. package/presets/opencode/android-kotlin/rules/compose-ui.md +2 -0
  538. package/presets/opencode/android-kotlin/rules/design-guidance.md +5 -0
  539. package/presets/opencode/android-kotlin/rules/mcp-usage.md +8 -0
  540. package/presets/opencode/android-kotlin/rules/mockup-review.md +4 -0
  541. package/presets/opencode/android-kotlin/rules/preset-layering.md +1 -1
  542. package/presets/opencode/android-kotlin/rules/preset-no-cross-stack-leakage.md +4 -0
  543. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +1 -1
  544. package/presets/opencode/android-kotlin/rules/preset-token-budget.md +10 -10
  545. package/presets/opencode/android-kotlin/rules/product-specs-authoring.md +6 -0
  546. package/presets/opencode/android-kotlin/rules/product-specs.md +5 -0
  547. package/presets/opencode/android-kotlin/rules/ux-design.md +4 -0
  548. package/presets/opencode/android-kotlin/skills/ci-investigation/SKILL.md +1 -1
  549. package/presets/opencode/android-kotlin/skills/code-review/SKILL.md +1 -1
  550. package/presets/opencode/android-kotlin/skills/debug-investigation/SKILL.md +1 -1
  551. package/presets/opencode/android-kotlin/skills/feature-delivery/SKILL.md +1 -1
  552. package/presets/opencode/android-kotlin/skills/instrumentation-ui-e2e/SKILL.md +1 -1
  553. package/presets/opencode/android-kotlin/skills/mockup-review/SKILL.md +1 -1
  554. package/presets/opencode/android-kotlin/skills/spec-authoring/SKILL.md +1 -1
  555. package/presets/opencode/android-kotlin/skills/spec-discovery/SKILL.md +1 -1
  556. package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +1 -1
  557. package/presets/opencode/android-kotlin/skills/unit-testing/SKILL.md +1 -1
  558. package/presets/opencode/android-kotlin/skills/ux-design/SKILL.md +1 -1
  559. package/presets/opencode/android-kotlin/skills/write-adr/SKILL.md +1 -1
  560. package/presets/opencode/go/adapter-map.json +1 -1
  561. package/presets/opencode/go/agents/build-verifier.md +1 -1
  562. package/presets/opencode/go/commands/spec-start.md +1 -1
  563. package/presets/opencode/go/commands/task-continue.md +1 -1
  564. package/presets/opencode/go/commands/task.md +1 -1
  565. package/presets/opencode/go/commands/technical-retro.md +1 -1
  566. package/presets/opencode/go/hooks/chain-team-phases.sh +32 -3
  567. package/presets/opencode/go/rules/agent-team-intake.md +4 -0
  568. package/presets/opencode/go/rules/code-quality-and-refactoring.md +15 -0
  569. package/presets/opencode/go/rules/code-review-mr.md +7 -0
  570. package/presets/opencode/go/rules/design-guidance.md +5 -0
  571. package/presets/opencode/go/rules/mcp-usage.md +7 -0
  572. package/presets/opencode/go/rules/preset-layering.md +1 -1
  573. package/presets/opencode/go/rules/preset-pr-checklist.md +1 -1
  574. package/presets/opencode/go/rules/preset-token-budget.md +10 -10
  575. package/presets/opencode/go/rules/product-specs-authoring.md +6 -0
  576. package/presets/opencode/go/rules/product-specs.md +6 -0
  577. package/presets/opencode/go/skills/ci-investigation/SKILL.md +1 -1
  578. package/presets/opencode/go/skills/code-review/SKILL.md +1 -1
  579. package/presets/opencode/go/skills/debug-investigation/SKILL.md +1 -1
  580. package/presets/opencode/go/skills/feature-delivery/SKILL.md +1 -1
  581. package/presets/opencode/go/skills/integration-testing/SKILL.md +1 -1
  582. package/presets/opencode/go/skills/spec-authoring/SKILL.md +1 -1
  583. package/presets/opencode/go/skills/spec-discovery/SKILL.md +1 -1
  584. package/presets/opencode/go/skills/technical-retro/SKILL.md +1 -1
  585. package/presets/opencode/go/skills/unit-testing/SKILL.md +1 -1
  586. package/presets/opencode/go/skills/write-adr/SKILL.md +1 -1
  587. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  588. package/presets/opencode/ios-swift/agents/build-verifier.md +3 -3
  589. package/presets/opencode/ios-swift/commands/spec-start.md +1 -1
  590. package/presets/opencode/ios-swift/commands/task-continue.md +1 -1
  591. package/presets/opencode/ios-swift/commands/task.md +1 -1
  592. package/presets/opencode/ios-swift/commands/technical-retro.md +1 -1
  593. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +32 -3
  594. package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +14 -0
  595. package/presets/opencode/ios-swift/rules/code-review-mr.md +39 -0
  596. package/presets/opencode/ios-swift/rules/design-guidance.md +5 -0
  597. package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +66 -0
  598. package/presets/opencode/ios-swift/rules/mcp-usage.md +8 -0
  599. package/presets/opencode/ios-swift/rules/mockup-review.md +4 -0
  600. package/presets/opencode/ios-swift/rules/preset-layering.md +1 -1
  601. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +1 -1
  602. package/presets/opencode/ios-swift/rules/preset-token-budget.md +10 -10
  603. package/presets/opencode/ios-swift/rules/product-specs-authoring.md +6 -0
  604. package/presets/opencode/ios-swift/rules/product-specs.md +5 -0
  605. package/presets/opencode/ios-swift/rules/reference-features.md +49 -0
  606. package/presets/opencode/ios-swift/rules/swiftui-ui.md +7 -0
  607. package/presets/opencode/ios-swift/rules/ux-design.md +4 -0
  608. package/presets/opencode/ios-swift/skills/ci-investigation/SKILL.md +1 -1
  609. package/presets/opencode/ios-swift/skills/code-review/SKILL.md +1 -1
  610. package/presets/opencode/ios-swift/skills/debug-investigation/SKILL.md +1 -1
  611. package/presets/opencode/ios-swift/skills/feature-delivery/SKILL.md +1 -1
  612. package/presets/opencode/ios-swift/skills/mockup-review/SKILL.md +1 -1
  613. package/presets/opencode/ios-swift/skills/spec-authoring/SKILL.md +1 -1
  614. package/presets/opencode/ios-swift/skills/spec-discovery/SKILL.md +1 -1
  615. package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +1 -1
  616. package/presets/opencode/ios-swift/skills/unit-testing/SKILL.md +1 -1
  617. package/presets/opencode/ios-swift/skills/ux-design/SKILL.md +1 -1
  618. package/presets/opencode/ios-swift/skills/write-adr/SKILL.md +1 -1
  619. package/presets/opencode/ios-swift/skills/xcuitest-e2e/SKILL.md +1 -1
  620. package/presets/opencode/java/adapter-map.json +1 -1
  621. package/presets/opencode/java/agents/build-verifier.md +1 -1
  622. package/presets/opencode/java/commands/spec-start.md +1 -1
  623. package/presets/opencode/java/commands/task-continue.md +1 -1
  624. package/presets/opencode/java/commands/task.md +1 -1
  625. package/presets/opencode/java/commands/technical-retro.md +1 -1
  626. package/presets/opencode/java/hooks/chain-team-phases.sh +32 -3
  627. package/presets/opencode/java/rules/agent-team-intake.md +4 -0
  628. package/presets/opencode/java/rules/code-quality-and-refactoring.md +15 -0
  629. package/presets/opencode/java/rules/code-review-mr.md +9 -0
  630. package/presets/opencode/java/rules/design-guidance.md +6 -0
  631. package/presets/opencode/java/rules/mcp-usage.md +6 -0
  632. package/presets/opencode/java/rules/preset-layering.md +1 -1
  633. package/presets/opencode/java/rules/preset-pr-checklist.md +1 -1
  634. package/presets/opencode/java/rules/preset-token-budget.md +10 -10
  635. package/presets/opencode/java/rules/product-specs-authoring.md +6 -0
  636. package/presets/opencode/java/rules/product-specs.md +6 -0
  637. package/presets/opencode/java/skills/ci-investigation/SKILL.md +1 -1
  638. package/presets/opencode/java/skills/code-review/SKILL.md +1 -1
  639. package/presets/opencode/java/skills/debug-investigation/SKILL.md +1 -1
  640. package/presets/opencode/java/skills/feature-delivery/SKILL.md +1 -1
  641. package/presets/opencode/java/skills/integration-testing/SKILL.md +1 -1
  642. package/presets/opencode/java/skills/spec-authoring/SKILL.md +1 -1
  643. package/presets/opencode/java/skills/spec-discovery/SKILL.md +1 -1
  644. package/presets/opencode/java/skills/technical-retro/SKILL.md +1 -1
  645. package/presets/opencode/java/skills/unit-testing/SKILL.md +1 -1
  646. package/presets/opencode/java/skills/write-adr/SKILL.md +1 -1
  647. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  648. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  649. package/presets/opencode/mcp-ts/commands/spec-start.md +1 -1
  650. package/presets/opencode/mcp-ts/commands/task-continue.md +1 -1
  651. package/presets/opencode/mcp-ts/commands/task.md +1 -1
  652. package/presets/opencode/mcp-ts/commands/technical-retro.md +1 -1
  653. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +32 -3
  654. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +5 -0
  655. package/presets/opencode/mcp-ts/rules/anti-sycophancy-discipline.md +4 -0
  656. package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +15 -0
  657. package/presets/opencode/mcp-ts/rules/code-review-mr.md +6 -0
  658. package/presets/opencode/mcp-ts/rules/design-guidance.md +5 -0
  659. package/presets/opencode/mcp-ts/rules/mcp-usage.md +7 -0
  660. package/presets/opencode/mcp-ts/rules/preset-layering.md +1 -1
  661. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +1 -1
  662. package/presets/opencode/mcp-ts/rules/preset-token-budget.md +10 -10
  663. package/presets/opencode/mcp-ts/rules/product-specs-authoring.md +6 -0
  664. package/presets/opencode/mcp-ts/rules/product-specs.md +6 -0
  665. package/presets/opencode/mcp-ts/skills/code-review/SKILL.md +1 -1
  666. package/presets/opencode/mcp-ts/skills/debug-investigation/SKILL.md +1 -1
  667. package/presets/opencode/mcp-ts/skills/feature-delivery/SKILL.md +1 -1
  668. package/presets/opencode/mcp-ts/skills/spec-authoring/SKILL.md +1 -1
  669. package/presets/opencode/mcp-ts/skills/spec-discovery/SKILL.md +1 -1
  670. package/presets/opencode/mcp-ts/skills/unit-testing/SKILL.md +1 -1
  671. package/presets/opencode/next/adapter-map.json +1 -1
  672. package/presets/opencode/next/agents/build-verifier.md +2 -2
  673. package/presets/opencode/next/commands/spec-start.md +1 -1
  674. package/presets/opencode/next/commands/task-continue.md +1 -1
  675. package/presets/opencode/next/commands/task.md +1 -1
  676. package/presets/opencode/next/commands/technical-retro.md +1 -1
  677. package/presets/opencode/next/hooks/chain-team-phases.sh +32 -3
  678. package/presets/opencode/next/rules/api-services.md +6 -4
  679. package/presets/opencode/next/rules/code-quality-and-refactoring.md +13 -0
  680. package/presets/opencode/next/rules/code-review-mr.md +13 -0
  681. package/presets/opencode/next/rules/design-guidance.md +5 -0
  682. package/presets/opencode/next/rules/feature-delivery-workflow.md +85 -0
  683. package/presets/opencode/next/rules/mcp-usage.md +9 -0
  684. package/presets/opencode/next/rules/mockup-review.md +4 -0
  685. package/presets/opencode/next/rules/next-app-core.md +2 -1
  686. package/presets/opencode/next/rules/preset-layering.md +1 -1
  687. package/presets/opencode/next/rules/preset-pr-checklist.md +1 -1
  688. package/presets/opencode/next/rules/preset-token-budget.md +10 -10
  689. package/presets/opencode/next/rules/product-specs-authoring.md +6 -0
  690. package/presets/opencode/next/rules/product-specs.md +6 -0
  691. package/presets/opencode/next/rules/react-ui.md +37 -1
  692. package/presets/opencode/next/rules/reference-features.md +36 -0
  693. package/presets/opencode/next/rules/store-rtk.md +6 -5
  694. package/presets/opencode/next/rules/tests-e2e-structure.md +15 -0
  695. package/presets/opencode/next/rules/tests-unit.md +33 -0
  696. package/presets/opencode/next/rules/ux-design.md +4 -0
  697. package/presets/opencode/next/skills/ci-investigation/SKILL.md +1 -1
  698. package/presets/opencode/next/skills/code-review/SKILL.md +1 -1
  699. package/presets/opencode/next/skills/debug-investigation/SKILL.md +1 -1
  700. package/presets/opencode/next/skills/feature-delivery/SKILL.md +1 -1
  701. package/presets/opencode/next/skills/mockup-review/SKILL.md +1 -1
  702. package/presets/opencode/next/skills/playwright-e2e/SKILL.md +1 -1
  703. package/presets/opencode/next/skills/react-performance/SKILL.md +1 -1
  704. package/presets/opencode/next/skills/spec-authoring/SKILL.md +1 -1
  705. package/presets/opencode/next/skills/spec-discovery/SKILL.md +1 -1
  706. package/presets/opencode/next/skills/technical-retro/SKILL.md +1 -1
  707. package/presets/opencode/next/skills/unit-testing/SKILL.md +1 -1
  708. package/presets/opencode/next/skills/ux-design/SKILL.md +1 -1
  709. package/presets/opencode/next/skills/write-adr/SKILL.md +1 -1
  710. package/presets/opencode/nuxt/adapter-map.json +1 -1
  711. package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
  712. package/presets/opencode/nuxt/commands/spec-start.md +1 -1
  713. package/presets/opencode/nuxt/commands/task-continue.md +1 -1
  714. package/presets/opencode/nuxt/commands/task.md +1 -1
  715. package/presets/opencode/nuxt/commands/technical-retro.md +1 -1
  716. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +32 -3
  717. package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +13 -0
  718. package/presets/opencode/nuxt/rules/code-review-mr.md +13 -0
  719. package/presets/opencode/nuxt/rules/design-guidance.md +5 -0
  720. package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +82 -0
  721. package/presets/opencode/nuxt/rules/mcp-usage.md +9 -0
  722. package/presets/opencode/nuxt/rules/mockup-review.md +4 -0
  723. package/presets/opencode/nuxt/rules/preset-layering.md +1 -1
  724. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +1 -1
  725. package/presets/opencode/nuxt/rules/preset-token-budget.md +10 -10
  726. package/presets/opencode/nuxt/rules/product-specs-authoring.md +6 -0
  727. package/presets/opencode/nuxt/rules/product-specs.md +5 -0
  728. package/presets/opencode/nuxt/rules/reference-features.md +36 -0
  729. package/presets/opencode/nuxt/rules/tests-e2e-structure.md +16 -0
  730. package/presets/opencode/nuxt/rules/tests-unit.md +11 -0
  731. package/presets/opencode/nuxt/rules/ux-design.md +4 -0
  732. package/presets/opencode/nuxt/rules/vue-ui.md +7 -0
  733. package/presets/opencode/nuxt/skills/ci-investigation/SKILL.md +1 -1
  734. package/presets/opencode/nuxt/skills/code-review/SKILL.md +1 -1
  735. package/presets/opencode/nuxt/skills/debug-investigation/SKILL.md +1 -1
  736. package/presets/opencode/nuxt/skills/feature-delivery/SKILL.md +1 -1
  737. package/presets/opencode/nuxt/skills/mockup-review/SKILL.md +1 -1
  738. package/presets/opencode/nuxt/skills/playwright-e2e/SKILL.md +1 -1
  739. package/presets/opencode/nuxt/skills/spec-authoring/SKILL.md +1 -1
  740. package/presets/opencode/nuxt/skills/spec-discovery/SKILL.md +1 -1
  741. package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +1 -1
  742. package/presets/opencode/nuxt/skills/unit-testing/SKILL.md +1 -1
  743. package/presets/opencode/nuxt/skills/ux-design/SKILL.md +1 -1
  744. package/presets/opencode/nuxt/skills/vue-performance/SKILL.md +1 -1
  745. package/presets/opencode/nuxt/skills/write-adr/SKILL.md +1 -1
  746. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  747. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  748. package/presets/opencode/php-hexagonal/commands/spec-start.md +1 -1
  749. package/presets/opencode/php-hexagonal/commands/task-continue.md +1 -1
  750. package/presets/opencode/php-hexagonal/commands/task.md +1 -1
  751. package/presets/opencode/php-hexagonal/commands/technical-retro.md +1 -1
  752. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +32 -3
  753. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +4 -0
  754. package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +15 -0
  755. package/presets/opencode/php-hexagonal/rules/code-review-mr.md +9 -0
  756. package/presets/opencode/php-hexagonal/rules/design-guidance.md +6 -0
  757. package/presets/opencode/php-hexagonal/rules/mcp-usage.md +6 -0
  758. package/presets/opencode/php-hexagonal/rules/preset-layering.md +1 -1
  759. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +1 -1
  760. package/presets/opencode/php-hexagonal/rules/preset-token-budget.md +10 -10
  761. package/presets/opencode/php-hexagonal/rules/product-specs-authoring.md +6 -0
  762. package/presets/opencode/php-hexagonal/rules/product-specs.md +6 -0
  763. package/presets/opencode/php-hexagonal/skills/ci-investigation/SKILL.md +1 -1
  764. package/presets/opencode/php-hexagonal/skills/code-review/SKILL.md +1 -1
  765. package/presets/opencode/php-hexagonal/skills/debug-investigation/SKILL.md +1 -1
  766. package/presets/opencode/php-hexagonal/skills/feature-delivery/SKILL.md +1 -1
  767. package/presets/opencode/php-hexagonal/skills/integration-testing/SKILL.md +1 -1
  768. package/presets/opencode/php-hexagonal/skills/spec-authoring/SKILL.md +1 -1
  769. package/presets/opencode/php-hexagonal/skills/spec-discovery/SKILL.md +1 -1
  770. package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
  771. package/presets/opencode/php-hexagonal/skills/unit-testing/SKILL.md +1 -1
  772. package/presets/opencode/php-hexagonal/skills/write-adr/SKILL.md +1 -1
  773. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  774. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  775. package/presets/opencode/php-laravel/commands/spec-start.md +1 -1
  776. package/presets/opencode/php-laravel/commands/task-continue.md +1 -1
  777. package/presets/opencode/php-laravel/commands/task.md +1 -1
  778. package/presets/opencode/php-laravel/commands/technical-retro.md +1 -1
  779. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +32 -3
  780. package/presets/opencode/php-laravel/rules/agent-team-intake.md +4 -0
  781. package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +15 -0
  782. package/presets/opencode/php-laravel/rules/code-review-mr.md +10 -0
  783. package/presets/opencode/php-laravel/rules/design-guidance.md +6 -0
  784. package/presets/opencode/php-laravel/rules/mcp-usage.md +6 -0
  785. package/presets/opencode/php-laravel/rules/preset-layering.md +1 -1
  786. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +1 -1
  787. package/presets/opencode/php-laravel/rules/preset-token-budget.md +10 -10
  788. package/presets/opencode/php-laravel/rules/product-specs-authoring.md +6 -0
  789. package/presets/opencode/php-laravel/rules/product-specs.md +6 -0
  790. package/presets/opencode/php-laravel/skills/ci-investigation/SKILL.md +1 -1
  791. package/presets/opencode/php-laravel/skills/code-review/SKILL.md +1 -1
  792. package/presets/opencode/php-laravel/skills/debug-investigation/SKILL.md +1 -1
  793. package/presets/opencode/php-laravel/skills/feature-delivery/SKILL.md +1 -1
  794. package/presets/opencode/php-laravel/skills/integration-testing/SKILL.md +1 -1
  795. package/presets/opencode/php-laravel/skills/spec-authoring/SKILL.md +1 -1
  796. package/presets/opencode/php-laravel/skills/spec-discovery/SKILL.md +1 -1
  797. package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +1 -1
  798. package/presets/opencode/php-laravel/skills/unit-testing/SKILL.md +1 -1
  799. package/presets/opencode/php-laravel/skills/write-adr/SKILL.md +1 -1
  800. package/presets/opencode/svelte/adapter-map.json +1 -1
  801. package/presets/opencode/svelte/agents/build-verifier.md +2 -2
  802. package/presets/opencode/svelte/commands/spec-start.md +1 -1
  803. package/presets/opencode/svelte/commands/task-continue.md +1 -1
  804. package/presets/opencode/svelte/commands/task.md +1 -1
  805. package/presets/opencode/svelte/commands/technical-retro.md +1 -1
  806. package/presets/opencode/svelte/hooks/chain-team-phases.sh +32 -3
  807. package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +13 -0
  808. package/presets/opencode/svelte/rules/code-review-mr.md +13 -0
  809. package/presets/opencode/svelte/rules/design-guidance.md +5 -0
  810. package/presets/opencode/svelte/rules/feature-delivery-workflow.md +54 -0
  811. package/presets/opencode/svelte/rules/mcp-usage.md +9 -0
  812. package/presets/opencode/svelte/rules/mockup-review.md +4 -0
  813. package/presets/opencode/svelte/rules/preset-layering.md +1 -1
  814. package/presets/opencode/svelte/rules/preset-pr-checklist.md +1 -1
  815. package/presets/opencode/svelte/rules/preset-token-budget.md +10 -10
  816. package/presets/opencode/svelte/rules/product-specs-authoring.md +6 -0
  817. package/presets/opencode/svelte/rules/product-specs.md +5 -0
  818. package/presets/opencode/svelte/rules/reference-features.md +37 -0
  819. package/presets/opencode/svelte/rules/svelte-ui.md +7 -0
  820. package/presets/opencode/svelte/rules/tests-e2e-structure.md +16 -0
  821. package/presets/opencode/svelte/rules/tests-unit.md +11 -0
  822. package/presets/opencode/svelte/rules/ux-design.md +4 -0
  823. package/presets/opencode/svelte/skills/ci-investigation/SKILL.md +1 -1
  824. package/presets/opencode/svelte/skills/code-review/SKILL.md +1 -1
  825. package/presets/opencode/svelte/skills/debug-investigation/SKILL.md +1 -1
  826. package/presets/opencode/svelte/skills/feature-delivery/SKILL.md +1 -1
  827. package/presets/opencode/svelte/skills/mockup-review/SKILL.md +1 -1
  828. package/presets/opencode/svelte/skills/playwright-e2e/SKILL.md +1 -1
  829. package/presets/opencode/svelte/skills/spec-authoring/SKILL.md +1 -1
  830. package/presets/opencode/svelte/skills/spec-discovery/SKILL.md +1 -1
  831. package/presets/opencode/svelte/skills/svelte-performance/SKILL.md +1 -1
  832. package/presets/opencode/svelte/skills/technical-retro/SKILL.md +1 -1
  833. package/presets/opencode/svelte/skills/unit-testing/SKILL.md +1 -1
  834. package/presets/opencode/svelte/skills/ux-design/SKILL.md +1 -1
  835. package/presets/opencode/svelte/skills/write-adr/SKILL.md +1 -1
  836. package/scripts/capture-cli-golden.mjs +8 -5
  837. package/scripts/check-frontmatter.mjs +83 -0
  838. package/scripts/check-generated-drift.mjs +106 -0
  839. package/scripts/check-mavis-token-budget.mjs +1 -1
  840. package/scripts/check-opencode-token-budget.mjs +1 -1
  841. package/scripts/check-preset-structure.sh +27 -0
  842. package/scripts/check-preset-token-budget.sh +16 -17
  843. package/scripts/check-shared-core-drift.sh +10 -5
  844. package/scripts/close-agent-task-human-gate.mjs +6 -4
  845. package/scripts/fixtures/cli-golden/claude/next.json +24 -18
  846. package/scripts/fixtures/cli-golden/cursor/next.json +17 -17
  847. package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +18 -18
  848. package/scripts/fixtures/cli-golden/mavis/go.json +15 -15
  849. package/scripts/fixtures/cli-golden/mavis/ios-swift.json +19 -19
  850. package/scripts/fixtures/cli-golden/mavis/java.json +15 -15
  851. package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +16 -16
  852. package/scripts/fixtures/cli-golden/mavis/next.json +24 -24
  853. package/scripts/fixtures/cli-golden/mavis/nuxt.json +21 -21
  854. package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +15 -15
  855. package/scripts/fixtures/cli-golden/mavis/php-laravel.json +15 -15
  856. package/scripts/fixtures/cli-golden/mavis/svelte.json +21 -21
  857. package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +31 -31
  858. package/scripts/fixtures/cli-golden/opencode/go.json +26 -26
  859. package/scripts/fixtures/cli-golden/opencode/ios-swift.json +32 -32
  860. package/scripts/fixtures/cli-golden/opencode/java.json +26 -26
  861. package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +23 -23
  862. package/scripts/fixtures/cli-golden/opencode/next.json +38 -38
  863. package/scripts/fixtures/cli-golden/opencode/nuxt.json +35 -35
  864. package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +26 -26
  865. package/scripts/fixtures/cli-golden/opencode/php-laravel.json +26 -26
  866. package/scripts/fixtures/cli-golden/opencode/svelte.json +35 -35
  867. package/scripts/lib/generate-adapter-common.mjs +11 -0
  868. package/scripts/lib/generate-mavis-adapter.mjs +20 -10
  869. package/scripts/lib/generate-opencode-adapter.mjs +19 -4
  870. package/scripts/test-agent-task-metrics-hooks.mjs +5 -5
  871. package/scripts/test-chain-team-phases-coverage.mjs +176 -1
  872. package/scripts/test-cli-init-clean.mjs +165 -34
  873. package/scripts/test-mavis-context-budget.mjs +1 -1
  874. package/scripts/test-opencode-context-budget.mjs +1 -1
@@ -4,6 +4,7 @@
4
4
  const crypto = require('crypto');
5
5
  const fs = require('fs');
6
6
  const path = require('path');
7
+ const { assertSafeDest, resolveManagedPath } = require('./lib/safe-path');
7
8
 
8
9
  const MANIFEST_REL = path.join('.opencode', '.ai-rules-install.json');
9
10
  const CONTRACT_REL = path.join('presets', 'opencode', 'platform-contract.json');
@@ -316,6 +317,13 @@ function cmdInitOpencode({ preset, cwdOption, helpers }) {
316
317
  }
317
318
 
318
319
  const managedRoot = path.join(cwd, contract.managedRoot);
320
+ // Refuse to install through a symlinked `.opencode` (or any symlinked ancestor).
321
+ try {
322
+ assertSafeDest(cwd, managedRoot, contract.managedRoot);
323
+ } catch (err) {
324
+ console.error(`init failed: ${err instanceof Error ? err.message : String(err)}`);
325
+ process.exit(1);
326
+ }
319
327
  const rootExisted = fs.existsSync(managedRoot);
320
328
  const docsSpecsDir = path.join(cwd, 'docs', 'specs');
321
329
  const docsSpecsExisted = fs.existsSync(docsSpecsDir);
@@ -472,8 +480,8 @@ function removeEmptyDirs(dir) {
472
480
  function cmdCleanOpencode({ cwdOption, helpers }) {
473
481
  const { resolveTargetCwd, otherToolInstallPresent } = helpers;
474
482
  const cwd = resolveTargetCwd(cwdOption);
475
- const manifestPath = path.join(cwd, MANIFEST_REL);
476
- if (!fs.existsSync(manifestPath)) {
483
+ const manifestPath = resolveManagedPath(cwd, MANIFEST_REL);
484
+ if (!manifestPath || !fs.existsSync(manifestPath)) {
477
485
  console.error(
478
486
  'clean opencode: missing .opencode/.ai-rules-install.json; nothing removed (fail-safe).',
479
487
  );
@@ -500,10 +508,19 @@ function cmdCleanOpencode({ cwdOption, helpers }) {
500
508
  if (rel === MANIFEST_REL) {
501
509
  continue;
502
510
  }
503
- const abs = path.join(cwd, rel);
511
+ // Reject entries that escape cwd or traverse a symlink before touching disk.
512
+ const abs = resolveManagedPath(cwd, rel);
513
+ if (!abs) {
514
+ console.warn(`Ignored unsafe manifest entry ${rel} (outside target or symlinked)`);
515
+ continue;
516
+ }
504
517
  if (!fs.existsSync(abs)) {
505
518
  continue;
506
519
  }
520
+ if (!fs.lstatSync(abs).isFile()) {
521
+ console.warn(`Ignored non-file manifest entry ${rel}`);
522
+ continue;
523
+ }
507
524
  const current = sha256File(abs);
508
525
  if (rel === 'AGENTS.md' && otherToolInstallPresent && otherToolInstallPresent(cwd, '.opencode')) {
509
526
  console.log('Kept shared AGENTS.md (another tool install is still present)');
@@ -518,20 +535,26 @@ function cmdCleanOpencode({ cwdOption, helpers }) {
518
535
  }
519
536
 
520
537
  if (preserved.includes('opencode.json') && Array.isArray(manifest.shippedMcpServerIds)) {
521
- stripShippedMcp(path.join(cwd, 'opencode.json'), manifest.shippedMcpServerIds);
538
+ const mcpAbs = resolveManagedPath(cwd, 'opencode.json');
539
+ if (mcpAbs) {
540
+ stripShippedMcp(mcpAbs, manifest.shippedMcpServerIds);
541
+ }
522
542
  }
523
543
 
524
544
  for (const dirRel of [...(manifest.managedDirectories || [])].sort((a, b) => b.length - a.length)) {
525
- removeEmptyDirs(path.join(cwd, dirRel));
545
+ const dirAbs = resolveManagedPath(cwd, dirRel);
546
+ if (dirAbs) {
547
+ removeEmptyDirs(dirAbs);
548
+ }
526
549
  }
527
550
 
528
551
  fs.unlinkSync(manifestPath);
529
- removeEmptyDirs(path.join(cwd, '.opencode'));
530
- if (
531
- fs.existsSync(path.join(cwd, '.opencode')) &&
532
- fs.readdirSync(path.join(cwd, '.opencode')).length === 0
533
- ) {
534
- fs.rmdirSync(path.join(cwd, '.opencode'));
552
+ const managedRoot = resolveManagedPath(cwd, '.opencode');
553
+ if (managedRoot) {
554
+ removeEmptyDirs(managedRoot);
555
+ if (fs.existsSync(managedRoot) && fs.readdirSync(managedRoot).length === 0) {
556
+ fs.rmdirSync(managedRoot);
557
+ }
535
558
  }
536
559
 
537
560
  console.log(
@@ -0,0 +1,186 @@
1
+ # Local overlay (`.ai.local/`)
2
+
3
+ Consumer-owned rules with priority over `@bonesofspring/ai-rules` presets. Works for **Cursor**, **Claude Code**, **Mavis**, and **OpenCode** from the same files.
4
+
5
+ ## TL;DR
6
+
7
+ Put a `.ai.local/` directory in your repo. Write rules as plain markdown. The `ai-local-overlay` preset rule (installed by `init`) tells the model to read and apply your files **with priority** over preset rules.
8
+
9
+ ```text
10
+ .ai.local/
11
+ ├── rules/
12
+ │ ├── our-stack.md # applied like a rule
13
+ │ └── testing-policy.md # applied like a rule
14
+ ├── conventions.md # living gotchas (highest priority)
15
+ └── team/ # shared agent-team pipeline artifacts (not rules)
16
+ ├── README.md
17
+ ├── fixtures/
18
+ └── tasks/<slug>/
19
+ ```
20
+
21
+ No IDE config, no `@include`, no codegen. Same files work in Cursor, Claude Code, Mavis, and OpenCode.
22
+
23
+ ## How it works
24
+
25
+ 1. `init cursor|claude|mavis|opencode --preset <stack>` (or `init multi`) installs `ai-local-overlay`. Cursor: `alwaysApply: true`. Claude: `paths:` on `**/.ai.local/**`. Mavis/OpenCode: listed as a root-entry rule in `AGENTS.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md`.
26
+ 2. On session start the rule asks the model to probe `.ai.local/` and read every file under `rules/` and `conventions.md`. Do **not** load `team/**` as rules — that tree is the shared `/task` pipeline (Cursor, Claude, Mavis, and OpenCode). `team/` lives only at the **repo root** `.ai.local/team/`, not in nested package overlays.
27
+ 3. If a local rule conflicts with a preset rule, **the local rule wins**.
28
+ 4. **Deeper wins** in monorepos: walk `packages/*/.ai.local/` and apply all levels; the model treats the deepest one as the most recent guidance.
29
+
30
+ ## How to write `.ai.local/rules/*.md`
31
+
32
+ One file = one rule. Plain markdown. **No YAML frontmatter** — the format is shared across IDEs, so each file uses a tiny markdown header for scoping.
33
+
34
+ ### Skeleton
35
+
36
+ ```markdown
37
+ # <Short title>
38
+
39
+ <One-paragraph summary of what this rule is for.>
40
+
41
+ ## When to apply
42
+
43
+ <globs or "always-on">
44
+
45
+ ## Body
46
+
47
+ <The actual rule. Same style as `packages/ai-rules/presets/_shared/core/quality/*.md`: short sections, bullets, code examples.>
48
+
49
+ ## Why
50
+
51
+ <Optional: link to an ADR, issue, or one-line rationale.>
52
+ ```
53
+
54
+ ### `## When to apply` — the only meta you need
55
+
56
+ | You want | Write |
57
+ |---|---|
58
+ | Only on matching files | `globs: app/src/api/**` |
59
+ | On matching files in multiple folders | `globs: app/src/api/**, app/src/types/api/**` |
60
+ | Always (until the context gets crowded) | `glob: always` |
61
+ | Replace a preset rule entirely | `glob: <same as preset>`, body says "use this instead of <preset rule>" |
62
+ | Disable a preset rule | `glob: <same as preset>`, body contains `override: kill <preset-rule-name>` |
63
+
64
+ Lines before `## Body` are removed automatically by the model and used as scope. Everything from `## Body` onward is the rule body.
65
+
66
+ ### What to put in the body
67
+
68
+ - **Start with an imperative opening line.** Models comply better with explicit "do this" than with descriptive prose. Use one of:
69
+ - `Apply this rule on every turn.`
70
+ - `Never do X when Y.`
71
+ - `When X, always do Y.`
72
+ - Match the style of preset rules: short sections, bullets, code examples.
73
+ - Cite the preset rule you're overriding (e.g. "supersedes `code-quality-and-refactoring#principles`").
74
+ - Keep it under ~120 lines. If it grows, split into multiple files.
75
+ - Avoid `any` and unverifiable third-party API references — same discipline as preset rules.
76
+
77
+ ### Mandatory patterns (recommended)
78
+
79
+ If your rule is **always-on** (most local rules are), use this header verbatim so the model treats it as mandatory:
80
+
81
+ ```markdown
82
+ # <Short title>
83
+
84
+ **Apply this rule on every turn. Do not skip.**
85
+
86
+ ## When to apply
87
+
88
+ glob: always
89
+
90
+ ## Body
91
+
92
+ <rule>
93
+ ```
94
+
95
+ The combination of:
96
+ - imperative first paragraph
97
+ - `glob: always`
98
+ - explicit "do not skip"
99
+
100
+ gets the highest compliance in practice. If the rule is **on-demand**, replace `glob: always` with `globs: <comma-separated globs>` and keep the imperative opening.
101
+
102
+ ### Worked example
103
+
104
+ `.ai.local/rules/our-monorepo.md`:
105
+
106
+ ```markdown
107
+ # Our monorepo layout
108
+
109
+ **Apply this rule on every turn when working in `apps/` or `packages/`.**
110
+
111
+ This repo is a pnpm + Turbo monorepo. Apps live in `apps/*`, shared packages in `packages/*`.
112
+
113
+ ## When to apply
114
+
115
+ globs: apps/**/*, packages/**/*
116
+
117
+ ## Body
118
+
119
+ - Use workspace protocol (`workspace:*`) for cross-package dependencies.
120
+ - Do not import from `apps/*` into `packages/*` — packages are leaf-level.
121
+ - Tests: each package owns its own runner; never run `pnpm test` at the root.
122
+ - Migration scripts live in `scripts/migrations/` and must be idempotent.
123
+
124
+ ## Why
125
+
126
+ Decision: monorepo split (ADR-0042). The "apps vs packages" boundary is enforced by ESLint, not by folder names alone.
127
+ ```
128
+
129
+ ## How to write `.ai.local/conventions.md`
130
+
131
+ A single markdown file (no header conventions). Three sections, in this order:
132
+
133
+ ```markdown
134
+ # Local conventions
135
+
136
+ ## Gotchas
137
+
138
+ - <One bullet per non-obvious trap.>
139
+
140
+ ## Patterns
141
+
142
+ - <Local patterns beyond the preset's `reference-features.md`.>
143
+
144
+ ## Decisions
145
+
146
+ - <Short links to ADRs / product choices that affect code.>
147
+ ```
148
+
149
+ This is the **upgrade path** of the old per-tool `.cursor/team/conventions.md` (and Claude/Mavis/OpenCode twins). If both exist, `.ai.local/conventions.md` wins. Pipeline task slugs live in `.ai.local/team/`, not in `conventions.md`.
150
+
151
+ ### Migration backups
152
+
153
+ When `init` relocates a legacy per-tool `team/` directory it copies every entry to `.ai.local/.rollback/legacy-team-<timestamp>/<tool>/` before removing the original. That directory ships its own `.gitignore`, so backups never reach a commit and your root `.gitignore` is left alone.
154
+
155
+ Backups are not pruned automatically. They do not accumulate on their own — once a legacy directory has been drained, later `init` runs find only the pointer `README.md` and back nothing up — but if you repeatedly re-create legacy `team/` directories you will collect one stamped directory per migration. Delete `.ai.local/.rollback/` by hand once you have confirmed the move.
156
+
157
+ ## Monorepos
158
+
159
+ Drop `.ai.local/` at any nesting depth. The model walks from root to leaf and applies all levels; deeper wins.
160
+
161
+ ```text
162
+ .ai.local/ # global: applies everywhere
163
+ packages/web/.ai.local/ # override: only for `packages/web`
164
+ packages/worker/.ai.local/ # override: only for the worker
165
+ ```
166
+
167
+ If the same rule name appears in two levels, the deeper one wins.
168
+
169
+ ## Limitations
170
+
171
+ - Cursor, Claude, Mavis, and OpenCode do **not** natively read `.ai.local/`. The `ai-local-overlay` rule makes the model do it. Reliability is high but not 100%.
172
+ - Changes to `.ai.local/` mid-session require a session restart.
173
+ - "Priority" is **contextual**, not enforced. If the model already internalized a preset rule, the local rule may not fully override it.
174
+ - Local rules consume your context window. Keep them tight.
175
+
176
+ ## When to upgrade to a preset change
177
+
178
+ If you find yourself writing the same `.ai.local` rule across multiple repos, **propose it as a preset rule** in `packages/ai-rules/presets/_shared/core/` (or stack-specific). Local overlay is for repo-specific overrides, not for re-distributing preset rules.
179
+
180
+ ## See also
181
+
182
+ - `packages/ai-rules/presets/cursor/next/rules/ai-local-overlay.mdc`
183
+ - `packages/ai-rules/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md`
184
+ - `packages/ai-rules/presets/mavis/next/rules/ai-local-overlay.md`
185
+ - `packages/ai-rules/presets/opencode/next/rules/ai-local-overlay.md`
186
+ - `packages/ai-rules/docs/PRESET-CONTRIBUTION.md` — for contributing to the preset itself
@@ -0,0 +1,174 @@
1
+ # Mavis compatibility evidence
2
+
3
+ This report separates documented MiniMax Code capabilities from observations
4
+ made by `scripts/probe-mavis-capabilities.mjs`. The probe uses only the supplied
5
+ `--workdir` plus an ephemeral isolated `HOME` for child processes; it does not
6
+ inspect or mutate `~/.minimax/**` or user-global MCP configuration.
7
+
8
+ ## Evidence state
9
+
10
+ - Evidence date: 2026-09-03
11
+ - Probe host: macOS/Darwin 25.5.0 arm64
12
+ - Actual `mcode` CLI version (snapshot, **not a pin**): **0.2.7** via
13
+ `~/.minimax-code/bin/mcode --version`
14
+ - MiniMax Code desktop (snapshot, **not a pin**): **3.0.65 (3.0.65.130)**
15
+ - Logged-in isolated probe: **completed** (`probeStatus: completed`, exit 0).
16
+ Auth was copied into an ephemeral `HOME` (`cli-auth`,
17
+ `local-runtime.auth.json`, `config.yaml`). Operator `~/.minimax` mtime did
18
+ not change. MCP commands were not executed.
19
+ - Probe model for `exec` (this run only): `minimax/MiniMax-M2.7-highspeed`.
20
+ Default unscoped `exec` on this account used `minimax/MiniMax-M3` earlier.
21
+ `--model` requires `provider/model` (optionally `#variant`).
22
+ - Current decision: **capability floor GO** for WP-B. Native discovery, hooks,
23
+ project MCP, slash commands, and `mcode init` (TTY-only) remain fallback.
24
+ - Version policy: do **not** hard-require `3.0.65`, `3.0.65.130`, or `0.2.7`.
25
+
26
+ The package script is intentionally not exposed yet. Run the focused harness
27
+ directly until the probe has succeeded on a supported MiniMax test machine:
28
+
29
+ ```bash
30
+ node scripts/test-probe-mavis-capabilities.mjs
31
+ node scripts/probe-mavis-capabilities.mjs \
32
+ --mcode /absolute/path/to/mcode \
33
+ --workdir /absolute/path/to/new-or-empty-isolated-directory
34
+ ```
35
+
36
+ The work directory must be new or empty. The probe refuses a non-empty
37
+ directory, runs `mcode init` there, copies sentinel inputs into that directory,
38
+ and uses explicit `mcode exec` arguments. Child processes receive an isolated
39
+ `HOME` under the system temp directory so even a misbehaving executable cannot
40
+ write the operator's `~/.minimax/**`.
41
+
42
+ ## Capability matrix
43
+
44
+ Allowed status values are `confirmed`, `partial`, `unknown`, and
45
+ `no-equivalent`. Architecture §1.3 unknowns stay `unknown` until a real `mcode`
46
+ run produces reproducible evidence. Fake-executable results are not used to
47
+ promote a row to `confirmed`.
48
+
49
+ | Capability | Status | Evidence or inspection command | Observation | Selected fallback |
50
+ |---|---|---|---|---|
51
+ | CLI version identification | `confirmed` | `mcode --version` | Prints `0.2.7` | Record in probe JSON; do not pin |
52
+ | Root `AGENTS.md` consumption | `confirmed` | Isolated `mcode exec --output-format json` after fixture `AGENTS.md` | `MAVIS_AGENTS_SENTINEL` returned | Root `AGENTS.md` is the compatibility entry |
53
+ | Explicit role file | `confirmed` | `mcode exec --file agents/probe-agent.md --output-format json` | `MAVIS_AGENT_FILE_SENTINEL` returned | Attach roles with `--file` |
54
+ | Deterministic structured output | `confirmed` | Same `exec` without `--output-schema` | `type=exec.result` JSON wrapper; `--output-schema` file path is rejected (inline object only) and model schema enforcement is unreliable | Parse the `exec.result` wrapper; do not require `--output-schema` for P0–P2 |
55
+ | `mcode init` | `unknown` | `mcode init <workdir>` | Exit 1: interactive mode requires a TTY | Ship `REPO_AGENTS.md` → root `AGENTS.md`; do not depend on `init` |
56
+ | Project rule discovery (no root reference) | `unknown` | `exec` with `rules/probe.md` on disk and no fixture `AGENTS.md` reference | Exec succeeded; rule sentinel absent | Explicit root `AGENTS.md` reference; `.mavis/rules/**` is ai-rules-owned |
57
+ | Project rule discovery (explicit root reference) | `confirmed` | Root `AGENTS.md` references `rules/probe.md` | `MAVIS_RULE_SENTINEL` returned | Explicit reference |
58
+ | Workspace agent discovery | `unknown` | `exec` without `--file` while `agents/probe-agent.md` is on disk | Exec succeeded; agent sentinel absent | Explicit `--file` |
59
+ | Workspace Skill discovery (no root reference) | `unknown` | `exec` with skill on disk and no root reference | Exec succeeded; skill sentinel absent | Explicit root reference |
60
+ | Workspace Skill discovery (explicit root reference) | `confirmed` | Root `AGENTS.md` references `skills/probe/SKILL.md` | `MAVIS_SKILL_SENTINEL` returned | Explicit reference |
61
+ | Plugin Skill format | `confirmed` | Official plugin documentation | `skills/**/SKILL.md` is documented inside plugin packages | Optional plugin packaging remains deferred |
62
+ | Plugin MCP format | `confirmed` | Official plugin and MCP documentation | Plugin `*.mcp.json` is documented | Optional plugin packaging remains deferred |
63
+ | Project-scoped MCP path | `unknown` | Documented inspection only: `mcode mcp list --human`, `mcode mcp tools <server>`, `mcode mcp auth status` | No automated command was run; no global config was read or written | Repo-local `.mavis/mcp.json` staging plus manual import |
64
+ | Project hooks / completion callback | `unknown` | Desktop/manual documentation inspection | No native path or event schema is assumed | Explicit manual/semi-auto chain runner |
65
+ | External `pipeline.json` ingestion | `unknown` | Native Team manual checklist | Not run | File pipeline remains the audit source of truth |
66
+ | File-defined slash commands | `unknown` | Desktop/manual inspection | No registration API is assumed | Natural-language procedure plus explicit `exec --file` |
67
+ | Native Team | `partial` | Official Team documentation | Leader/Worker/Verifier are documented; bridge controls are unverified | Semi-auto file lifecycle |
68
+
69
+ Official documentation used for the confirmed plugin rows and the partial Team
70
+ row:
71
+
72
+ - <https://agent.minimax.io/docs/code/agents/plugins.md>
73
+ - <https://agent.minimax.io/docs/code/agents/mcp.md>
74
+ - <https://agent.minimax.io/docs/code/agents/team.md>
75
+ - <https://agent.minimax.io/docs/techblog/agent-team.md>
76
+
77
+ These references confirm package formats and documented Team roles, not
78
+ project-local discovery, automatic registration, hook APIs, or the deferred
79
+ plugin's runtime behavior.
80
+
81
+ No native MiniMax project path (including `.minimax/rules/` or `.mavis/rules/`
82
+ as a MiniMax convention) is claimed.
83
+
84
+ ## Automated probe contract
85
+
86
+ The JSON document has stable key and capability ordering and no timestamps.
87
+ Commands replace the executable and work directory with `<MCODE>` and
88
+ `<WORKDIR>`. Observations redact:
89
+
90
+ - the supplied executable, work directory, isolated probe `HOME`, and operator
91
+ home paths;
92
+ - bearer values;
93
+ - values labeled as API keys, tokens, secrets, or passwords;
94
+ - user-specific paths ending in `/.minimax`.
95
+
96
+ Every capability includes `status`, `command`, `exitCode`, `observation`, and
97
+ `executed`. Missing or unsupported executables emit evidence with
98
+ `probeStatus: "blocked"` and exit code `2`. A non-empty `--workdir` is refused
99
+ with the same blocked status and does not invoke `mcode`.
100
+
101
+ The automated harness covers:
102
+
103
+ - a nonexistent fresh work directory and a pre-created empty work directory;
104
+ - a non-empty work directory (refused, fixture file preserved);
105
+ - missing and unsupported executables;
106
+ - CLI version capture;
107
+ - native discovery of rules, skills, and agents *without* an explicit root
108
+ `AGENTS.md` reference;
109
+ - root `AGENTS.md`, referenced rule, and referenced Skill sentinels;
110
+ - explicit `mcode exec --file`;
111
+ - structured JSON output with an output schema;
112
+ - deterministic output and secret/path redaction;
113
+ - absence of `~/.minimax/**` writes under an isolated test `HOME` (the fake
114
+ executable writes a canary under `$HOME/.minimax` during `init`; the probe
115
+ overrides `HOME` so the operator/test home stays untouched).
116
+
117
+ ## Manual compatibility checklist
118
+
119
+ Complete this table twice: oldest supported and current stable. Use a new empty
120
+ work directory for every run. Do not treat fake-executable output as a row in
121
+ this table.
122
+
123
+ | Field | Oldest supported | Current stable |
124
+ |---|---|---|
125
+ | Desktop version | pending (do not infer from current) | 3.0.65 (3.0.65.130) — snapshot only, not a floor |
126
+ | `mcode --version` | pending (do not infer from current) | 0.2.7 — snapshot only, not a floor |
127
+ | OS version | pending | darwin 25.5.0 arm64 |
128
+ | Probe JSON evidence path | pending | team `mavis-probe-evidence.json` (2026-09-03) |
129
+ | Root AGENTS sentinel | pending | confirmed |
130
+ | Explicit agent-file sentinel | pending | confirmed |
131
+ | Structured schema output | pending | wrapper JSON confirmed; `--output-schema` not required |
132
+ | Native project rule discovery | pending | unknown (no sentinel without reference) |
133
+ | Native workspace agent discovery | pending | unknown (no sentinel without `--file`) |
134
+ | Native workspace Skill discovery | pending | unknown without reference; referenced skill confirmed |
135
+ | Team Leader/Worker/Verifier | pending | partial (official docs only) |
136
+ | Team pause/resume | pending | pending |
137
+ | Verifier rejection/revision | pending | pending |
138
+ | Stable task/run identity | pending | pending |
139
+ | Completion callback or pollable state | pending | pending |
140
+
141
+ For MCP, record only documentation and UI observations. Do not read, edit, or
142
+ back up `~/.minimax/mcp.json` as part of this compatibility work. The listed
143
+ `mcode mcp` commands are inspection references for later maintainer
144
+ adjudication, not automated probe steps.
145
+
146
+ ## Go / no-go adjudication
147
+
148
+ GO requires all of the following. Versions come from probe JSON for that run
149
+ and are observational. **Do not** compile `3.0.65` / `3.0.65.130` into package
150
+ code or fail CI when the desktop patch changes.
151
+
152
+ 1. root `AGENTS.md` reliably returns its sentinel;
153
+ 2. explicit `mcode exec --file` returns the role sentinel;
154
+ 3. structured output is deterministic enough to parse (`exec.result` wrapper;
155
+ `--output-schema` is optional and not required for P0–P2);
156
+ 4. plugin Skill/MCP format remains confirmed;
157
+ 5. every unknown capability has either empirical confirmation or the fallback
158
+ in the matrix is accepted.
159
+
160
+ Hard no-go triggers:
161
+
162
+ - root `AGENTS.md` is not consumed;
163
+ - explicit `mcode exec --file` cannot execute the role fallback;
164
+ - the tested CLI or desktop version cannot be identified;
165
+ - required evidence can be obtained only by reading or mutating real
166
+ user-global MCP state.
167
+
168
+ **Capability floor GO (2026-09-03).** Isolated logged-in probe completed:
169
+ root `AGENTS.md`, referenced rule/skill, and `--file` role sentinels
170
+ returned; CLI version identified; operator `~/.minimax` mtime unchanged.
171
+ Accepted fallbacks: no native project discovery without explicit
172
+ references; `mcode init` is TTY-only; `--output-schema` is not required;
173
+ project MCP / hooks / slash commands remain unknown. Desktop 3.0.65 and
174
+ CLI 0.2.7 stay snapshots, not pins. WP-B is authorized.
package/docs/MAVIS.md ADDED
@@ -0,0 +1,120 @@
1
+ # Mavis (MiniMax Code) adapter
2
+
3
+ Experimental preset for [MiniMax Code](https://agent.minimax.io/) (`mcode`). Platform id is **`mavis`**. Consumer install root is **`.mavis/`** — an ai-rules-owned namespace, **not** a MiniMax-native discovery path.
4
+
5
+ All **10** installable stacks are in `releasedStacks`: `next`, `nuxt`, `svelte`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`.
6
+
7
+ ## Install
8
+
9
+ From the **target project root** (where `app/` or `package.json` lives):
10
+
11
+ ```bash
12
+ npx @bonesofspring/ai-rules init mavis --preset next
13
+ npx @bonesofspring/ai-rules init mavis --preset nuxt
14
+ ```
15
+
16
+ All four platforms at once: `npx @bonesofspring/ai-rules init multi --preset <stack>`.
17
+
18
+ What lands:
19
+
20
+ | Source (package) | Consumer path |
21
+ |------------------|---------------|
22
+ | `REPO_AGENTS.md` | `./AGENTS.md` (compatibility floor) |
23
+ | `MAVIS.md` | `.mavis/AGENTS.md` (Mavis load map) |
24
+ | `rules/`, `agents/`, `skills/`, `commands/`, `hooks/` | `.mavis/<dir>/` |
25
+ | `team/` | `.ai.local/team/` (shared pipeline artifacts; not `.mavis/team/`) |
26
+ | `mcp.json` | `.mavis/mcp.json` (merge; manual UI import) |
27
+
28
+ Remove only what this install owns:
29
+
30
+ ```bash
31
+ npx @bonesofspring/ai-rules clean mavis
32
+ ```
33
+
34
+ `clean mavis` is **manifest-owned**: unchanged hashes are removed; files you edited stay. Without a valid `.mavis/.ai-rules-install.json`, clean is fail-safe (nothing removed).
35
+
36
+ The CLI **never** writes `~/.minimax/**`.
37
+
38
+ Quad-install with Cursor, Claude, and OpenCode: `init multi --preset next` (or four per-tool inits) copies the **same** root `AGENTS.md`. `clean mavis` leaves that file if another tool install remains. `/task` pipelines are **shared** — artifacts live under `.ai.local/team/` (not removed by `clean`).
39
+
40
+ ## How to run agents
41
+
42
+ Native workspace discovery without an explicit reference is **unconfirmed**. Use explicit paths:
43
+
44
+ ```bash
45
+ # Role
46
+ mcode exec --file .mavis/agents/task-analyst.md --output-format json "<brief>"
47
+
48
+ # Procedure (slash-command equivalent)
49
+ mcode exec --file .mavis/commands/task.md "<task description>"
50
+ ```
51
+
52
+ **Every turn:** read root `AGENTS.md`, then `.mavis/AGENTS.md`, then the essential rules listed there.
53
+
54
+ Parse `mcode exec --output-format json` as the `exec.result` wrapper (see [compatibility](./MAVIS-COMPATIBILITY.md)); `--output-schema` is optional and not required for this preset.
55
+
56
+ ## Task pipeline (semi-auto)
57
+
58
+ File-based orchestration under `.ai.local/team/` mirrors Cursor/Claude:
59
+
60
+ 1. Start work via the task procedure (`.mavis/commands/task.md`) or `task-router` agent.
61
+ 2. Producers write artifacts and upsert `artifact-manifest.json` receipts.
62
+ 3. **Do not** mutate `status.json` / `metrics.json` lifecycle fields from agent prompts — the chain hook owns them.
63
+ 4. After each producer receipt, run the chain runner:
64
+
65
+ ```bash
66
+ printf '%s\n' '{"status":"completed","attemptId":"<from-status.json>"}' \
67
+ | bash .mavis/hooks/chain-team-phases.sh
68
+ ```
69
+
70
+ Human gates pause with `awaitingHumanGate: true` in `status.json`. Resume via `.mavis/commands/task-continue.md` (invokes hook action `end_human_gate`). There is **no** shipped `hooks.json` — project hooks are **unknown** on MiniMax; this is intentional semi-auto fallback.
71
+
72
+ Full team layout: `.ai.local/team/README.md`.
73
+
74
+ ## MCP
75
+
76
+ Preset servers are staged in **`.mavis/mcp.json`** only. Import or enable them in the MiniMax Code UI (project MCP path is **unknown** — do not assume auto-load). Extra local servers survive re-init when the file is valid JSON (same merge rules as Cursor/Claude). See `.mavis/MCP.md` and rule `mcp-usage.md`.
77
+
78
+ ## Capability summary
79
+
80
+ Honest labels from WP-A probe. Full matrix: [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md).
81
+
82
+ | Area | Status | What we do |
83
+ |------|--------|------------|
84
+ | Root `AGENTS.md` | **confirmed** | Compatibility entry; reference rules/skills explicitly |
85
+ | `mcode exec --file` | **confirmed** | Attach agents/commands |
86
+ | Referenced rule/skill | **confirmed** | When root entry points at `.mavis/rules/` or `.mavis/skills/` |
87
+ | Structured JSON output | **confirmed** | Parse `exec.result` wrapper |
88
+ | Project rules/agents/skills (no reference) | **unknown** | Explicit paths only |
89
+ | `mcode init` | **unknown** | TTY-only; use `ai-rules init mavis` |
90
+ | Project MCP auto-load | **unknown** | `.mavis/mcp.json` + manual import |
91
+ | Project hooks / slash commands | **unknown** | Manual chain + `exec --file` |
92
+ | Native Team lifecycle | **partial** | File pipeline is SoT; hook is single lifecycle writer |
93
+
94
+ Desktop/CLI versions in the compatibility doc are **operator snapshots**, not package pins.
95
+
96
+ ## Local overlay
97
+
98
+ `.ai.local/rules/*.md` at repo root (or monorepo parents) override preset rules. See [`LOCAL-OVERLAY.md`](./LOCAL-OVERLAY.md).
99
+
100
+ ## Maintainer docs
101
+
102
+ | Doc | Purpose |
103
+ |-----|---------|
104
+ | [`presets/mavis/README.md`](../presets/mavis/README.md) | Source tree, contract, validation scripts |
105
+ | [`presets/mavis/platform-contract.json`](../presets/mavis/platform-contract.json) | `releasedStacks`, paths, capability statuses |
106
+ | [`MAVIS-COMPATIBILITY.md`](./MAVIS-COMPATIBILITY.md) | Probe evidence and go/no-go |
107
+ | [`PRESET-CONTRIBUTION.md`](./PRESET-CONTRIBUTION.md) | Sibling adapter authoring |
108
+
109
+ Validate after preset edits:
110
+
111
+ ```bash
112
+ cd packages/ai-rules
113
+ bash scripts/check-preset-structure.sh
114
+ node scripts/check-mavis-platform-contract.mjs --self-test
115
+ node scripts/check-mavis-adapter-map.mjs --self-test
116
+ ```
117
+
118
+ ## Released stacks
119
+
120
+ `init mavis --preset <stack>` and `init multi --preset <stack>` install Mavis for every stack in `presets/mavis/platform-contract.json` `releasedStacks` (all 10). Per-stack always-on rules live in `scripts/lib/stack-platform-profiles.mjs`. Derive with `node scripts/generate-mavis.mjs --stack <stack>` from Cursor SoT — never from Claude.
@@ -0,0 +1,54 @@
1
+ # OpenCode compatibility evidence
2
+
3
+ This report separates **official OpenCode documentation** from a live isolated CLI probe. A logged-in `opencode` probe has **not** been run yet. Do not promote a row to `confirmed` from guesswork. Rows marked **confirmed (docs)** cite first-party docs; they are not a substitute for an isolated exec probe.
4
+
5
+ ## Evidence state
6
+
7
+ - Evidence date: 2026-09-07
8
+ - Probe host: n/a (docs-only floor)
9
+ - Isolated `opencode` exec probe: **not run**
10
+ - Current decision: **docs floor GO** for all 10 released stacks (`next`, `nuxt`, `svelte`, `ios-swift`, `android-kotlin`, `go`, `java`, `mcp-ts`, `php-hexagonal`, `php-laravel`). Glob-rules, `instructions` V2 resolution, and plugin-hooks stay fallback.
11
+ - Version policy: do **not** pin OpenCode CLI or TUI versions in `platform-contract.json`.
12
+
13
+ Official docs used:
14
+
15
+ - [Rules / AGENTS.md](https://opencode.ai/docs/rules/)
16
+ - [Agents](https://opencode.ai/docs/agents/)
17
+ - [Skills](https://opencode.ai/docs/skills/)
18
+ - [Commands](https://opencode.ai/docs/commands/)
19
+ - [MCP](https://opencode.ai/docs/mcp-servers/)
20
+ - [Plugins](https://opencode.ai/docs/plugins/)
21
+
22
+ ## Capability matrix
23
+
24
+ Allowed status values are `confirmed`, `partial`, `unknown`, and `no-equivalent`. `unknown` / `no-equivalent` must not declare `nativePath`.
25
+
26
+ | Capability | Status | Evidence | Observation | Selected fallback |
27
+ |---|---|---|---|---|
28
+ | CLI version identification | `unknown` | no isolated `opencode --version` | Not probed | Do not pin |
29
+ | Root `AGENTS.md` consumption | `confirmed` | opencode.ai/docs/rules | Native project instructions | Root `AGENTS.md` is the always-on entry |
30
+ | Explicit role file | `confirmed` | opencode.ai/docs/agents | `.opencode/agents/<name>.md` | Native `@name` / Task |
31
+ | Deterministic structured output | `unknown` | no probe | — | Do not require a JSON schema from agents |
32
+ | `opencode` `/init` | `unknown` | docs describe `/init`; not used by this package | TTY / interactive | Use `ai-rules init opencode` |
33
+ | Project rule discovery (no reference) | `no-equivalent` | no `.opencode/rules` alwaysApply/globs engine | `.mdc` globs do not exist | Lazy `Read` from `AGENTS.md` catalog |
34
+ | Project rule discovery (explicit root reference) | `confirmed` | docs “Referencing External Files” | Agent can `Read` listed paths | Essential four rules in `AGENTS.md` |
35
+ | Workspace agent discovery | `confirmed` | opencode.ai/docs/agents | `.opencode/agents/` | Native |
36
+ | Workspace Skill discovery | `confirmed` | opencode.ai/docs/skills | `.opencode/skills/<name>/SKILL.md` | Native `skill` tool |
37
+ | Project MCP | `confirmed` | opencode.ai/docs/mcp-servers | `opencode.json` `mcp` | Merge on init |
38
+ | Project hooks (`hooks.json`) | `unknown` | plugins exist; this preset does not ship them | No `subagentStop` analog | Manual `chain-team-phases.sh` |
39
+ | Slash commands | `confirmed` | opencode.ai/docs/commands | `.opencode/commands/<name>.md` | Native `/task` |
40
+ | Plugin / skill / MCP combo | `confirmed` | skills + mcp docs | MCP inflates context | Gate unused servers in operator config |
41
+ | Native Team lifecycle | `partial` | file pipeline is ai-rules SoT | No native team runtime | Hook owns `status.json` / `metrics.json` |
42
+ | `opencode.json` `instructions` globs | `unknown` | V1 docs load globs; V2 may not resolve | Do not depend on this field | `AGENTS.md` + explicit Read |
43
+
44
+ ## What we do not claim
45
+
46
+ - Cursor `alwaysApply` / `globs` on OpenCode
47
+ - Claude topic-folder twins as the OpenCode source
48
+ - Auto-registration of `hooks.json` or a TypeScript plugin in v1
49
+ - `init opencode --dry-run` / manifest preview (v1 is apply + rollback only)
50
+ - Writes to `~/.config/opencode/**` or `~/.opencode/**`
51
+
52
+ ## Follow-up probe (optional)
53
+
54
+ When a maintainer has a logged-in OpenCode CLI, add an isolated probe (empty workdir, ephemeral `HOME`) and update this matrix. Until then, docs-confirmed rows stay labelled as such in [`OPENCODE.md`](./OPENCODE.md).