@bonesofspring/ai-rules 0.2.22 → 0.2.24

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 (429) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +10 -2
  3. package/bin/cli.js +56 -9
  4. package/bin/mavis-install.js +441 -0
  5. package/bin/opencode-install.js +531 -0
  6. package/package.json +17 -3
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +2 -2
  8. package/presets/_shared/core/meta/preset-layering.md +3 -3
  9. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +1 -1
  10. package/presets/_shared/core/meta/preset-pr-checklist.md +5 -3
  11. package/presets/_shared/core/meta/preset-token-budget.md +3 -0
  12. package/presets/_shared/core/meta/preset-twin-sync.md +32 -0
  13. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +3 -3
  14. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  15. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +3 -0
  17. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +32 -0
  18. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +3 -3
  19. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  20. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  21. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +3 -0
  22. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +32 -0
  23. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +3 -3
  24. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  25. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  26. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +3 -0
  27. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +32 -0
  28. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +3 -3
  29. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  30. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  31. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +3 -0
  32. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +32 -0
  33. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +3 -3
  34. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  35. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  36. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +3 -0
  37. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +32 -0
  38. package/presets/claude/next/REPO_AGENTS.md +10 -5
  39. package/presets/claude/next/agents/build-verifier.md +3 -1
  40. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
  41. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +3 -3
  42. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  43. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  44. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +3 -0
  45. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +32 -0
  46. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +3 -3
  47. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  48. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  49. package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +3 -0
  50. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +32 -0
  51. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +3 -3
  52. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  53. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  54. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +3 -0
  55. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +32 -0
  56. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +3 -3
  57. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  58. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  59. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +3 -0
  60. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +32 -0
  61. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +3 -3
  62. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
  63. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +5 -3
  64. package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +3 -0
  65. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +32 -0
  66. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +3 -3
  67. package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +1 -1
  68. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +5 -3
  69. package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +3 -0
  70. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +32 -0
  71. package/presets/cursor/go/rules/preset-layering.mdc +3 -3
  72. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +1 -1
  73. package/presets/cursor/go/rules/preset-pr-checklist.mdc +5 -3
  74. package/presets/cursor/go/rules/preset-token-budget.mdc +3 -0
  75. package/presets/cursor/go/rules/preset-twin-sync.mdc +32 -0
  76. package/presets/cursor/ios-swift/rules/preset-layering.mdc +3 -3
  77. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -1
  78. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +5 -3
  79. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +3 -0
  80. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +32 -0
  81. package/presets/cursor/java/rules/preset-layering.mdc +3 -3
  82. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +1 -1
  83. package/presets/cursor/java/rules/preset-pr-checklist.mdc +5 -3
  84. package/presets/cursor/java/rules/preset-token-budget.mdc +3 -0
  85. package/presets/cursor/java/rules/preset-twin-sync.mdc +32 -0
  86. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +3 -3
  87. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +1 -1
  88. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +5 -3
  89. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +3 -0
  90. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +32 -0
  91. package/presets/cursor/next/REPO_AGENTS.md +10 -5
  92. package/presets/cursor/next/agents/build-verifier.md +3 -1
  93. package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
  94. package/presets/cursor/next/rules/preset-layering.mdc +3 -3
  95. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -1
  96. package/presets/cursor/next/rules/preset-pr-checklist.mdc +5 -3
  97. package/presets/cursor/next/rules/preset-token-budget.mdc +3 -0
  98. package/presets/cursor/next/rules/preset-twin-sync.mdc +32 -0
  99. package/presets/cursor/nuxt/rules/preset-layering.mdc +3 -3
  100. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -1
  101. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +5 -3
  102. package/presets/cursor/nuxt/rules/preset-token-budget.mdc +3 -0
  103. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +32 -0
  104. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +3 -3
  105. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +1 -1
  106. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +5 -3
  107. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +3 -0
  108. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +32 -0
  109. package/presets/cursor/php-laravel/rules/preset-layering.mdc +3 -3
  110. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +1 -1
  111. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +5 -3
  112. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +3 -0
  113. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +32 -0
  114. package/presets/cursor/svelte/rules/preset-layering.mdc +3 -3
  115. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -1
  116. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +5 -3
  117. package/presets/cursor/svelte/rules/preset-token-budget.mdc +3 -0
  118. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +32 -0
  119. package/presets/mavis/README.md +60 -0
  120. package/presets/mavis/next/MAVIS.md +67 -0
  121. package/presets/mavis/next/MCP.md +36 -0
  122. package/presets/mavis/next/README.md +15 -0
  123. package/presets/mavis/next/REPO_AGENTS.md +96 -0
  124. package/presets/mavis/next/adapter-map.json +959 -0
  125. package/presets/mavis/next/agents/README.md +206 -0
  126. package/presets/mavis/next/agents/accessibility-reviewer.md +61 -0
  127. package/presets/mavis/next/agents/api-contract-reviewer.md +57 -0
  128. package/presets/mavis/next/agents/build-verifier.md +112 -0
  129. package/presets/mavis/next/agents/ci-investigator.md +63 -0
  130. package/presets/mavis/next/agents/code-reviewer.md +61 -0
  131. package/presets/mavis/next/agents/codebase-analyzer.md +21 -0
  132. package/presets/mavis/next/agents/debugger.md +80 -0
  133. package/presets/mavis/next/agents/feature-developer.md +101 -0
  134. package/presets/mavis/next/agents/migration-specialist.md +67 -0
  135. package/presets/mavis/next/agents/mockup-reviewer.md +53 -0
  136. package/presets/mavis/next/agents/openspec-author.md +157 -0
  137. package/presets/mavis/next/agents/performance-auditor.md +68 -0
  138. package/presets/mavis/next/agents/playwright-test-generator.md +28 -0
  139. package/presets/mavis/next/agents/playwright-test-healer.md +28 -0
  140. package/presets/mavis/next/agents/playwright-test-planner.md +21 -0
  141. package/presets/mavis/next/agents/qa-tester.md +52 -0
  142. package/presets/mavis/next/agents/security-reviewer.md +54 -0
  143. package/presets/mavis/next/agents/solution-architect.md +68 -0
  144. package/presets/mavis/next/agents/task-analyst.md +166 -0
  145. package/presets/mavis/next/agents/task-router.md +178 -0
  146. package/presets/mavis/next/agents/tech-writer.md +57 -0
  147. package/presets/mavis/next/agents/unit-test-generator.md +31 -0
  148. package/presets/mavis/next/agents/unit-test-healer.md +32 -0
  149. package/presets/mavis/next/agents/unit-test-planner.md +54 -0
  150. package/presets/mavis/next/commands/README.md +49 -0
  151. package/presets/mavis/next/commands/spec-start.md +24 -0
  152. package/presets/mavis/next/commands/task-continue.md +50 -0
  153. package/presets/mavis/next/commands/task.md +50 -0
  154. package/presets/mavis/next/commands/technical-retro.md +80 -0
  155. package/presets/mavis/next/hooks/README.md +22 -0
  156. package/presets/mavis/next/hooks/chain-team-phases.sh +845 -0
  157. package/presets/mavis/next/mcp.json +19 -0
  158. package/presets/mavis/next/rules/README.md +16 -0
  159. package/presets/mavis/next/rules/agent-team-intake.md +11 -0
  160. package/presets/mavis/next/rules/agent-team-orchestrator.md +210 -0
  161. package/presets/mavis/next/rules/ai-local-overlay.md +37 -0
  162. package/presets/mavis/next/rules/anti-sycophancy-discipline.md +23 -0
  163. package/presets/mavis/next/rules/api-services.md +72 -0
  164. package/presets/mavis/next/rules/architecture-boundaries-ui.md +9 -0
  165. package/presets/mavis/next/rules/architecture-boundaries.md +86 -0
  166. package/presets/mavis/next/rules/arrow-functions.md +25 -0
  167. package/presets/mavis/next/rules/code-quality-and-refactoring.md +40 -0
  168. package/presets/mavis/next/rules/code-review-mr.md +40 -0
  169. package/presets/mavis/next/rules/css-property-order-stylelint.md +5 -0
  170. package/presets/mavis/next/rules/design-guidance.md +99 -0
  171. package/presets/mavis/next/rules/feature-delivery-workflow.md +49 -0
  172. package/presets/mavis/next/rules/http-client.md +55 -0
  173. package/presets/mavis/next/rules/layer-barrel-exports.md +68 -0
  174. package/presets/mavis/next/rules/mcp-usage.md +86 -0
  175. package/presets/mavis/next/rules/mockup-review.md +107 -0
  176. package/presets/mavis/next/rules/navigation-router-stack.md +56 -0
  177. package/presets/mavis/next/rules/navigation-router-ui.md +10 -0
  178. package/presets/mavis/next/rules/next-app-core.md +29 -0
  179. package/presets/mavis/next/rules/next-app-router.md +44 -0
  180. package/presets/mavis/next/rules/no-props-spread.md +56 -0
  181. package/presets/mavis/next/rules/no-type-assertion-as-import-export.md +51 -0
  182. package/presets/mavis/next/rules/package-manager.md +11 -0
  183. package/presets/mavis/next/rules/playwright-agents.md +67 -0
  184. package/presets/mavis/next/rules/post-change-lint.md +35 -0
  185. package/presets/mavis/next/rules/preset-layering.md +27 -0
  186. package/presets/mavis/next/rules/preset-no-cross-stack-leakage.md +90 -0
  187. package/presets/mavis/next/rules/preset-pr-checklist.md +36 -0
  188. package/presets/mavis/next/rules/preset-token-budget.md +39 -0
  189. package/presets/mavis/next/rules/preset-twin-sync.md +81 -0
  190. package/presets/mavis/next/rules/product-specs-authoring.md +112 -0
  191. package/presets/mavis/next/rules/product-specs.md +56 -0
  192. package/presets/mavis/next/rules/public-imports.md +50 -0
  193. package/presets/mavis/next/rules/react-a11y-coding.md +31 -0
  194. package/presets/mavis/next/rules/react-next-anti-hallucination.md +60 -0
  195. package/presets/mavis/next/rules/react-ui.md +105 -0
  196. package/presets/mavis/next/rules/reference-features.md +45 -0
  197. package/presets/mavis/next/rules/security-next.md +45 -0
  198. package/presets/mavis/next/rules/store-rtk.md +78 -0
  199. package/presets/mavis/next/rules/technical-retro.md +11 -0
  200. package/presets/mavis/next/rules/tests-e2e-structure.md +72 -0
  201. package/presets/mavis/next/rules/tests-unit.md +72 -0
  202. package/presets/mavis/next/rules/types-jsdoc.md +43 -0
  203. package/presets/mavis/next/rules/ux-design.md +99 -0
  204. package/presets/mavis/next/skills/README.md +21 -0
  205. package/presets/mavis/next/skills/ci-investigation/SKILL.md +39 -0
  206. package/presets/mavis/next/skills/code-review/SKILL.md +39 -0
  207. package/presets/mavis/next/skills/debug-investigation/SKILL.md +26 -0
  208. package/presets/mavis/next/skills/feature-delivery/SKILL.md +34 -0
  209. package/presets/mavis/next/skills/mockup-review/SKILL.md +24 -0
  210. package/presets/mavis/next/skills/playwright-e2e/SKILL.md +28 -0
  211. package/presets/mavis/next/skills/react-performance/SKILL.md +39 -0
  212. package/presets/mavis/next/skills/spec-authoring/SKILL.md +21 -0
  213. package/presets/mavis/next/skills/spec-discovery/SKILL.md +53 -0
  214. package/presets/mavis/next/skills/technical-retro/SKILL.md +49 -0
  215. package/presets/mavis/next/skills/unit-testing/SKILL.md +29 -0
  216. package/presets/mavis/next/skills/ux-design/SKILL.md +31 -0
  217. package/presets/mavis/next/skills/write-adr/SKILL.md +36 -0
  218. package/presets/mavis/next/team/README.md +148 -0
  219. package/presets/mavis/next/team/conventions.md +21 -0
  220. package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +79 -0
  221. package/presets/mavis/next/team/fixtures/bugfix-standard.json +25 -0
  222. package/presets/mavis/next/team/fixtures/feature-full.json +29 -0
  223. package/presets/mavis/next/team/fixtures/feature-light.json +27 -0
  224. package/presets/mavis/next/team/fixtures/feature-with-figma-url.json +17 -0
  225. package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
  226. package/presets/mavis/next/team/fixtures/memlog.example.md +9 -0
  227. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  228. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  229. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  230. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  231. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  232. package/presets/mavis/next/team/fixtures/metrics.example.json +54 -0
  233. package/presets/mavis/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
  234. package/presets/mavis/next/team/fixtures/mockup-review-standalone.json +14 -0
  235. package/presets/mavis/next/team/fixtures/ux-design-standalone.json +15 -0
  236. package/presets/mavis/next/team/tasks/.gitkeep +0 -0
  237. package/presets/mavis/platform-contract.json +131 -0
  238. package/presets/opencode/README.md +61 -0
  239. package/presets/opencode/next/MCP.md +36 -0
  240. package/presets/opencode/next/OPENCODE.md +65 -0
  241. package/presets/opencode/next/README.md +16 -0
  242. package/presets/opencode/next/REPO_AGENTS.md +97 -0
  243. package/presets/opencode/next/adapter-map.json +959 -0
  244. package/presets/opencode/next/agents/README.md +201 -0
  245. package/presets/opencode/next/agents/accessibility-reviewer.md +73 -0
  246. package/presets/opencode/next/agents/api-contract-reviewer.md +69 -0
  247. package/presets/opencode/next/agents/build-verifier.md +124 -0
  248. package/presets/opencode/next/agents/ci-investigator.md +71 -0
  249. package/presets/opencode/next/agents/code-reviewer.md +73 -0
  250. package/presets/opencode/next/agents/codebase-analyzer.md +33 -0
  251. package/presets/opencode/next/agents/debugger.md +88 -0
  252. package/presets/opencode/next/agents/feature-developer.md +109 -0
  253. package/presets/opencode/next/agents/migration-specialist.md +79 -0
  254. package/presets/opencode/next/agents/mockup-reviewer.md +65 -0
  255. package/presets/opencode/next/agents/openspec-author.md +169 -0
  256. package/presets/opencode/next/agents/performance-auditor.md +80 -0
  257. package/presets/opencode/next/agents/playwright-test-generator.md +36 -0
  258. package/presets/opencode/next/agents/playwright-test-healer.md +36 -0
  259. package/presets/opencode/next/agents/playwright-test-planner.md +33 -0
  260. package/presets/opencode/next/agents/qa-tester.md +60 -0
  261. package/presets/opencode/next/agents/security-reviewer.md +66 -0
  262. package/presets/opencode/next/agents/solution-architect.md +80 -0
  263. package/presets/opencode/next/agents/task-analyst.md +178 -0
  264. package/presets/opencode/next/agents/task-router.md +190 -0
  265. package/presets/opencode/next/agents/tech-writer.md +69 -0
  266. package/presets/opencode/next/agents/unit-test-generator.md +39 -0
  267. package/presets/opencode/next/agents/unit-test-healer.md +40 -0
  268. package/presets/opencode/next/agents/unit-test-planner.md +66 -0
  269. package/presets/opencode/next/commands/README.md +49 -0
  270. package/presets/opencode/next/commands/spec-start.md +32 -0
  271. package/presets/opencode/next/commands/task-continue.md +58 -0
  272. package/presets/opencode/next/commands/task.md +58 -0
  273. package/presets/opencode/next/commands/technical-retro.md +88 -0
  274. package/presets/opencode/next/hooks/README.md +22 -0
  275. package/presets/opencode/next/hooks/chain-team-phases.sh +845 -0
  276. package/presets/opencode/next/opencode.json +33 -0
  277. package/presets/opencode/next/rules/README.md +20 -0
  278. package/presets/opencode/next/rules/agent-team-intake.md +11 -0
  279. package/presets/opencode/next/rules/agent-team-orchestrator.md +214 -0
  280. package/presets/opencode/next/rules/ai-local-overlay.md +37 -0
  281. package/presets/opencode/next/rules/anti-sycophancy-discipline.md +23 -0
  282. package/presets/opencode/next/rules/api-services.md +72 -0
  283. package/presets/opencode/next/rules/architecture-boundaries-ui.md +9 -0
  284. package/presets/opencode/next/rules/architecture-boundaries.md +86 -0
  285. package/presets/opencode/next/rules/arrow-functions.md +25 -0
  286. package/presets/opencode/next/rules/code-quality-and-refactoring.md +40 -0
  287. package/presets/opencode/next/rules/code-review-mr.md +40 -0
  288. package/presets/opencode/next/rules/css-property-order-stylelint.md +5 -0
  289. package/presets/opencode/next/rules/design-guidance.md +99 -0
  290. package/presets/opencode/next/rules/feature-delivery-workflow.md +49 -0
  291. package/presets/opencode/next/rules/http-client.md +55 -0
  292. package/presets/opencode/next/rules/layer-barrel-exports.md +68 -0
  293. package/presets/opencode/next/rules/mcp-usage.md +86 -0
  294. package/presets/opencode/next/rules/mockup-review.md +107 -0
  295. package/presets/opencode/next/rules/navigation-router-stack.md +56 -0
  296. package/presets/opencode/next/rules/navigation-router-ui.md +10 -0
  297. package/presets/opencode/next/rules/next-app-core.md +29 -0
  298. package/presets/opencode/next/rules/next-app-router.md +44 -0
  299. package/presets/opencode/next/rules/no-props-spread.md +56 -0
  300. package/presets/opencode/next/rules/no-type-assertion-as-import-export.md +51 -0
  301. package/presets/opencode/next/rules/package-manager.md +11 -0
  302. package/presets/opencode/next/rules/playwright-agents.md +67 -0
  303. package/presets/opencode/next/rules/post-change-lint.md +35 -0
  304. package/presets/opencode/next/rules/preset-layering.md +27 -0
  305. package/presets/opencode/next/rules/preset-no-cross-stack-leakage.md +90 -0
  306. package/presets/opencode/next/rules/preset-pr-checklist.md +36 -0
  307. package/presets/opencode/next/rules/preset-token-budget.md +39 -0
  308. package/presets/opencode/next/rules/preset-twin-sync.md +81 -0
  309. package/presets/opencode/next/rules/product-specs-authoring.md +112 -0
  310. package/presets/opencode/next/rules/product-specs.md +56 -0
  311. package/presets/opencode/next/rules/public-imports.md +50 -0
  312. package/presets/opencode/next/rules/react-a11y-coding.md +31 -0
  313. package/presets/opencode/next/rules/react-next-anti-hallucination.md +60 -0
  314. package/presets/opencode/next/rules/react-ui.md +105 -0
  315. package/presets/opencode/next/rules/reference-features.md +45 -0
  316. package/presets/opencode/next/rules/security-next.md +45 -0
  317. package/presets/opencode/next/rules/store-rtk.md +78 -0
  318. package/presets/opencode/next/rules/technical-retro.md +11 -0
  319. package/presets/opencode/next/rules/tests-e2e-structure.md +72 -0
  320. package/presets/opencode/next/rules/tests-unit.md +72 -0
  321. package/presets/opencode/next/rules/types-jsdoc.md +43 -0
  322. package/presets/opencode/next/rules/ux-design.md +99 -0
  323. package/presets/opencode/next/skills/README.md +21 -0
  324. package/presets/opencode/next/skills/ci-investigation/SKILL.md +44 -0
  325. package/presets/opencode/next/skills/code-review/SKILL.md +44 -0
  326. package/presets/opencode/next/skills/debug-investigation/SKILL.md +59 -0
  327. package/presets/opencode/next/skills/feature-delivery/SKILL.md +39 -0
  328. package/presets/opencode/next/skills/mockup-review/SKILL.md +29 -0
  329. package/presets/opencode/next/skills/playwright-e2e/SKILL.md +33 -0
  330. package/presets/opencode/next/skills/react-performance/SKILL.md +44 -0
  331. package/presets/opencode/next/skills/spec-authoring/SKILL.md +26 -0
  332. package/presets/opencode/next/skills/spec-discovery/SKILL.md +58 -0
  333. package/presets/opencode/next/skills/technical-retro/SKILL.md +54 -0
  334. package/presets/opencode/next/skills/unit-testing/SKILL.md +34 -0
  335. package/presets/opencode/next/skills/ux-design/SKILL.md +36 -0
  336. package/presets/opencode/next/skills/write-adr/SKILL.md +41 -0
  337. package/presets/opencode/next/team/README.md +148 -0
  338. package/presets/opencode/next/team/conventions.md +21 -0
  339. package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +79 -0
  340. package/presets/opencode/next/team/fixtures/bugfix-standard.json +25 -0
  341. package/presets/opencode/next/team/fixtures/feature-full.json +29 -0
  342. package/presets/opencode/next/team/fixtures/feature-light.json +27 -0
  343. package/presets/opencode/next/team/fixtures/feature-with-figma-url.json +17 -0
  344. package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
  345. package/presets/opencode/next/team/fixtures/memlog.example.md +9 -0
  346. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  347. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  348. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  349. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  350. package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  351. package/presets/opencode/next/team/fixtures/metrics.example.json +54 -0
  352. package/presets/opencode/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
  353. package/presets/opencode/next/team/fixtures/mockup-review-standalone.json +14 -0
  354. package/presets/opencode/next/team/fixtures/ux-design-standalone.json +15 -0
  355. package/presets/opencode/next/team/tasks/.gitkeep +0 -0
  356. package/presets/opencode/platform-contract.json +131 -0
  357. package/scripts/capture-cli-golden.mjs +48 -0
  358. package/scripts/check-chain-hook-coverage.sh +2 -0
  359. package/scripts/check-mavis-adapter-map.mjs +294 -0
  360. package/scripts/check-mavis-local-overlay.mjs +56 -0
  361. package/scripts/check-mavis-platform-contract.mjs +388 -0
  362. package/scripts/check-mavis-token-budget.mjs +48 -0
  363. package/scripts/check-opencode-adapter-map.mjs +294 -0
  364. package/scripts/check-opencode-local-overlay.mjs +56 -0
  365. package/scripts/check-opencode-platform-contract.mjs +388 -0
  366. package/scripts/check-opencode-token-budget.mjs +48 -0
  367. package/scripts/check-preset-leakage.sh +64 -3
  368. package/scripts/check-preset-structure.sh +108 -0
  369. package/scripts/check-shared-core-drift.sh +18 -0
  370. package/scripts/check-task-router-intents.sh +15 -2
  371. package/scripts/fixtures/cli-golden/claude/next.json +130 -0
  372. package/scripts/fixtures/cli-golden/cursor/next.json +132 -0
  373. package/scripts/fixtures/cli-golden/mavis/next.json +125 -0
  374. package/scripts/fixtures/cli-golden/opencode/next.json +125 -0
  375. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
  376. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
  377. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
  378. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/MAVIS.md +1 -0
  379. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/adapter-map.json +26 -0
  380. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/rules/sample.md +2 -0
  381. package/scripts/fixtures/mavis-adapter-map/valid/cursor/AGENTS.md +1 -0
  382. package/scripts/fixtures/mavis-adapter-map/valid/cursor/rules/sample.mdc +2 -0
  383. package/scripts/fixtures/mavis-adapter-map/valid/mavis/MAVIS.md +1 -0
  384. package/scripts/fixtures/mavis-adapter-map/valid/mavis/adapter-map.json +26 -0
  385. package/scripts/fixtures/mavis-adapter-map/valid/mavis/rules/sample.md +2 -0
  386. package/scripts/fixtures/mavis-platform-contract/invalid-minimax-destination.json +131 -0
  387. package/scripts/fixtures/mavis-platform-contract/invalid-missing-capability.json +126 -0
  388. package/scripts/fixtures/mavis-platform-contract/invalid-released-unknown-stack.json +133 -0
  389. package/scripts/fixtures/mavis-platform-contract/invalid-unknown-native-path.json +131 -0
  390. package/scripts/fixtures/mavis-platform-contract/invalid-version-pin.json +132 -0
  391. package/scripts/fixtures/mavis-platform-contract/valid.json +131 -0
  392. package/scripts/fixtures/mavis-probe/AGENTS.md +6 -0
  393. package/scripts/fixtures/mavis-probe/agents/probe-agent.md +6 -0
  394. package/scripts/fixtures/mavis-probe/fake-mcode.mjs +98 -0
  395. package/scripts/fixtures/mavis-probe/output.schema.json +28 -0
  396. package/scripts/fixtures/mavis-probe/rules/probe.md +5 -0
  397. package/scripts/fixtures/mavis-probe/skills/probe/SKILL.md +11 -0
  398. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
  399. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
  400. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
  401. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/OPENCODE.md +1 -0
  402. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/adapter-map.json +26 -0
  403. package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/rules/sample.md +2 -0
  404. package/scripts/fixtures/opencode-adapter-map/valid/cursor/AGENTS.md +1 -0
  405. package/scripts/fixtures/opencode-adapter-map/valid/cursor/rules/sample.mdc +2 -0
  406. package/scripts/fixtures/opencode-adapter-map/valid/opencode/OPENCODE.md +1 -0
  407. package/scripts/fixtures/opencode-adapter-map/valid/opencode/adapter-map.json +26 -0
  408. package/scripts/fixtures/opencode-adapter-map/valid/opencode/rules/sample.md +2 -0
  409. package/scripts/fixtures/opencode-platform-contract/invalid-home-destination.json +131 -0
  410. package/scripts/fixtures/opencode-platform-contract/invalid-missing-capability.json +126 -0
  411. package/scripts/fixtures/opencode-platform-contract/invalid-released-unknown-stack.json +133 -0
  412. package/scripts/fixtures/opencode-platform-contract/invalid-unknown-native-path.json +131 -0
  413. package/scripts/fixtures/opencode-platform-contract/invalid-version-pin.json +132 -0
  414. package/scripts/fixtures/opencode-platform-contract/valid.json +131 -0
  415. package/scripts/generate-mavis-next.mjs +706 -0
  416. package/scripts/generate-opencode-next.mjs +831 -0
  417. package/scripts/lib/cli-golden.mjs +50 -0
  418. package/scripts/lib/discover-hooks.mjs +94 -0
  419. package/scripts/probe-mavis-capabilities.mjs +480 -0
  420. package/scripts/sync-dogfood-mavis.sh +90 -0
  421. package/scripts/sync-dogfood-opencode.sh +85 -0
  422. package/scripts/test-agent-task-metrics-hooks.mjs +25 -16
  423. package/scripts/test-chain-team-phases-coverage.mjs +15 -7
  424. package/scripts/test-cli-init-clean.mjs +367 -0
  425. package/scripts/test-cli-mcp-merge.mjs +23 -0
  426. package/scripts/test-mavis-context-budget.mjs +55 -0
  427. package/scripts/test-mavis-orchestration.mjs +649 -0
  428. package/scripts/test-opencode-context-budget.mjs +53 -0
  429. package/scripts/test-probe-mavis-capabilities.mjs +205 -0
@@ -0,0 +1,124 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "task": {
4
+ "runId": "validation-failed-run",
5
+ "slug": "validation-failed",
6
+ "preset": "ai-rules",
7
+ "stack": "next",
8
+ "platform": "cursor",
9
+ "intent": "feature",
10
+ "profile": "full"
11
+ },
12
+ "events": [
13
+ {
14
+ "eventId": "validation-failed-run:task",
15
+ "type": "task_started",
16
+ "at": "2026-07-31T15:00:00.000Z",
17
+ "source": "router",
18
+ "attributionConfidence": "high"
19
+ },
20
+ {
21
+ "eventId": "validation-failed-run:2:build-verifier:1:start",
22
+ "type": "attempt_started",
23
+ "at": "2026-07-31T15:00:00.000Z",
24
+ "attemptId": "validation-failed-run:step-2:build-verifier:attempt-1",
25
+ "stepIndex": 2,
26
+ "stepLabel": null,
27
+ "agent": "build-verifier",
28
+ "role": "validation",
29
+ "attempt": 1,
30
+ "parallelGroupId": null,
31
+ "source": "hook",
32
+ "attributionConfidence": "high"
33
+ },
34
+ {
35
+ "eventId": "validation-failed-run:2:build-verifier:1:finish",
36
+ "type": "attempt_finished",
37
+ "at": "2026-07-31T15:02:00.000Z",
38
+ "attemptId": "validation-failed-run:step-2:build-verifier:attempt-1",
39
+ "outcome": "validation_failed",
40
+ "durationMs": 120000,
41
+ "retryAfterFix": null,
42
+ "source": "hook",
43
+ "attributionConfidence": "high"
44
+ },
45
+ {
46
+ "eventId": "validation-failed-run:retry:1",
47
+ "type": "retry_scheduled",
48
+ "at": "2026-07-31T15:02:00.000Z",
49
+ "attemptId": "validation-failed-run:step-2:build-verifier:attempt-1",
50
+ "nextAgent": "feature-developer",
51
+ "retryAfterFix": "build-verifier",
52
+ "source": "hook",
53
+ "attributionConfidence": "high"
54
+ },
55
+ {
56
+ "eventId": "validation-failed-run:1:feature-developer:1:start",
57
+ "type": "attempt_started",
58
+ "at": "2026-07-31T15:02:00.000Z",
59
+ "attemptId": "validation-failed-run:step-1:feature-developer:attempt-1",
60
+ "stepIndex": 1,
61
+ "stepLabel": null,
62
+ "agent": "feature-developer",
63
+ "role": "implementation",
64
+ "attempt": 1,
65
+ "parallelGroupId": null,
66
+ "source": "hook",
67
+ "attributionConfidence": "high"
68
+ },
69
+ {
70
+ "eventId": "validation-failed-run:1:feature-developer:1:finish",
71
+ "type": "attempt_finished",
72
+ "at": "2026-07-31T15:05:00.000Z",
73
+ "attemptId": "validation-failed-run:step-1:feature-developer:attempt-1",
74
+ "outcome": "completed",
75
+ "durationMs": 180000,
76
+ "retryAfterFix": null,
77
+ "source": "hook",
78
+ "attributionConfidence": "high"
79
+ },
80
+ {
81
+ "eventId": "validation-failed-run:retry:2",
82
+ "type": "retry_scheduled",
83
+ "at": "2026-07-31T15:05:00.000Z",
84
+ "attemptId": "validation-failed-run:step-1:feature-developer:attempt-1",
85
+ "nextAgent": "build-verifier",
86
+ "retryAfterFix": null,
87
+ "source": "hook",
88
+ "attributionConfidence": "high"
89
+ },
90
+ {
91
+ "eventId": "validation-failed-run:2:build-verifier:2:start",
92
+ "type": "attempt_started",
93
+ "at": "2026-07-31T15:05:00.000Z",
94
+ "attemptId": "validation-failed-run:step-2:build-verifier:attempt-2",
95
+ "stepIndex": 2,
96
+ "stepLabel": null,
97
+ "agent": "build-verifier",
98
+ "role": "validation",
99
+ "attempt": 2,
100
+ "parallelGroupId": null,
101
+ "source": "hook",
102
+ "attributionConfidence": "high"
103
+ },
104
+ {
105
+ "eventId": "validation-failed-run:2:build-verifier:2:finish",
106
+ "type": "attempt_finished",
107
+ "at": "2026-07-31T15:06:00.000Z",
108
+ "attemptId": "validation-failed-run:step-2:build-verifier:attempt-2",
109
+ "outcome": "completed",
110
+ "durationMs": 60000,
111
+ "retryAfterFix": null,
112
+ "source": "hook",
113
+ "attributionConfidence": "high"
114
+ },
115
+ {
116
+ "eventId": "validation-failed-run:done",
117
+ "type": "task_completed",
118
+ "at": "2026-07-31T15:06:00.000Z",
119
+ "outcome": "completed",
120
+ "source": "hook",
121
+ "attributionConfidence": "high"
122
+ }
123
+ ]
124
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "task": {
4
+ "runId": "example-run-1",
5
+ "slug": "example-feature-full",
6
+ "preset": "ai-rules",
7
+ "stack": "next",
8
+ "platform": "cursor",
9
+ "intent": "feature",
10
+ "profile": "full"
11
+ },
12
+ "events": [
13
+ {
14
+ "eventId": "example-run-1:task_started",
15
+ "type": "task_started",
16
+ "at": "2026-07-31T14:00:00.000Z",
17
+ "source": "router",
18
+ "attributionConfidence": "high"
19
+ },
20
+ {
21
+ "eventId": "example-run-1:attempt-1:start",
22
+ "type": "attempt_started",
23
+ "at": "2026-07-31T14:00:00.000Z",
24
+ "attemptId": "example-run-1:step-0:task-analyst:attempt-1",
25
+ "stepIndex": 0,
26
+ "stepLabel": "Clarify and decompose",
27
+ "agent": "task-analyst",
28
+ "role": "planning",
29
+ "attempt": 1,
30
+ "parallelGroupId": null,
31
+ "source": "router",
32
+ "attributionConfidence": "high"
33
+ },
34
+ {
35
+ "eventId": "example-run-1:attempt-1:end",
36
+ "type": "attempt_finished",
37
+ "at": "2026-07-31T14:02:00.000Z",
38
+ "attemptId": "example-run-1:step-0:task-analyst:attempt-1",
39
+ "outcome": "completed",
40
+ "durationMs": 120000,
41
+ "retryAfterFix": null,
42
+ "source": "hook",
43
+ "attributionConfidence": "high"
44
+ },
45
+ {
46
+ "eventId": "example-run-1:task_completed",
47
+ "type": "task_completed",
48
+ "at": "2026-07-31T14:02:00.000Z",
49
+ "outcome": "completed",
50
+ "source": "hook",
51
+ "attributionConfidence": "high"
52
+ }
53
+ ]
54
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "slug": "example-mockup-fail-gate",
3
+ "state": "awaiting_approval",
4
+ "currentAgent": "mockup-reviewer",
5
+ "awaitingHumanGate": true,
6
+ "retryAfterFix": null,
7
+ "note": "Embedded mockup FAIL: hook must NOT set retryAfterFix to feature-developer. Resume only via /task-continue."
8
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "slug": "example-mockup-review-standalone",
3
+ "intent": "mockup-review",
4
+ "profile": "light",
5
+ "summary": "Standalone Figma mockup review (report-only)",
6
+ "steps": [
7
+ { "agent": "mockup-reviewer", "label": "Figma mockup review", "model": "strong" }
8
+ ],
9
+ "humanGates": [],
10
+ "autoChain": true,
11
+ "skipped": [
12
+ { "agent": "feature-developer", "reason": "Standalone mockup-review is report-only" }
13
+ ]
14
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "slug": "example-ux-design-standalone",
3
+ "intent": "ux-design",
4
+ "profile": "light",
5
+ "summary": "Standalone behavioral UX design (analyst + skill ux-design; report-only; no developer)",
6
+ "steps": [
7
+ { "agent": "task-analyst", "label": "UX design (skill ux-design)" }
8
+ ],
9
+ "humanGates": [],
10
+ "autoChain": true,
11
+ "skipped": [
12
+ { "agent": "feature-developer", "reason": "Standalone ux-design is report-only" },
13
+ { "agent": "mockup-reviewer", "reason": "No figma.com URL; not a mockup review" }
14
+ ]
15
+ }
File without changes
@@ -0,0 +1,131 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "mavis",
4
+ "runtimeExecutable": "mcode",
5
+ "sourceRoot": "presets/mavis",
6
+ "managedRoot": ".mavis",
7
+ "releasedStacks": ["next"],
8
+ "entryFiles": [
9
+ {
10
+ "source": "REPO_AGENTS.md",
11
+ "destination": "AGENTS.md"
12
+ },
13
+ {
14
+ "source": "MAVIS.md",
15
+ "destination": ".mavis/AGENTS.md"
16
+ }
17
+ ],
18
+ "directoryMappings": [
19
+ {
20
+ "source": "rules",
21
+ "destination": ".mavis/rules"
22
+ },
23
+ {
24
+ "source": "agents",
25
+ "destination": ".mavis/agents"
26
+ },
27
+ {
28
+ "source": "skills",
29
+ "destination": ".mavis/skills"
30
+ },
31
+ {
32
+ "source": "commands",
33
+ "destination": ".mavis/commands"
34
+ },
35
+ {
36
+ "source": "hooks",
37
+ "destination": ".mavis/hooks"
38
+ },
39
+ {
40
+ "source": "team",
41
+ "destination": ".mavis/team"
42
+ }
43
+ ],
44
+ "mcp": {
45
+ "source": "mcp.json",
46
+ "fallbackDestination": ".mavis/mcp.json",
47
+ "mode": "fallback-manual-import"
48
+ },
49
+ "docsSeed": {
50
+ "source": "presets/_shared/assets/docs-specs",
51
+ "behavior": "absent-only"
52
+ },
53
+ "cleanStrategy": "manifest-owned",
54
+ "nativeCapabilities": {
55
+ "cliVersion": {
56
+ "status": "confirmed",
57
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
58
+ "nativePath": null
59
+ },
60
+ "rootAgents": {
61
+ "status": "confirmed",
62
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
63
+ "nativePath": null
64
+ },
65
+ "explicitAgentFile": {
66
+ "status": "confirmed",
67
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
68
+ "nativePath": null
69
+ },
70
+ "structuredOutput": {
71
+ "status": "confirmed",
72
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
73
+ "nativePath": null
74
+ },
75
+ "referencedRule": {
76
+ "status": "confirmed",
77
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
78
+ "nativePath": null
79
+ },
80
+ "referencedSkill": {
81
+ "status": "confirmed",
82
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
83
+ "nativePath": null
84
+ },
85
+ "freshInit": {
86
+ "status": "unknown",
87
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
88
+ "nativePath": null
89
+ },
90
+ "nativeProjectRules": {
91
+ "status": "unknown",
92
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
93
+ "nativePath": null
94
+ },
95
+ "nativeWorkspaceSkills": {
96
+ "status": "unknown",
97
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
98
+ "nativePath": null
99
+ },
100
+ "nativeWorkspaceAgents": {
101
+ "status": "unknown",
102
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
103
+ "nativePath": null
104
+ },
105
+ "projectMcp": {
106
+ "status": "unknown",
107
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
108
+ "nativePath": null
109
+ },
110
+ "projectHooks": {
111
+ "status": "unknown",
112
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
113
+ "nativePath": null
114
+ },
115
+ "slashCommands": {
116
+ "status": "unknown",
117
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
118
+ "nativePath": null
119
+ },
120
+ "pluginSkillMcp": {
121
+ "status": "confirmed",
122
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
123
+ "nativePath": null
124
+ },
125
+ "nativeTeam": {
126
+ "status": "partial",
127
+ "evidence": "docs/MAVIS-COMPATIBILITY.md",
128
+ "nativePath": null
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,61 @@
1
+ # OpenCode platform adapter
2
+
3
+ Sibling of `presets/cursor/`, `presets/claude/`, and `presets/mavis/`.
4
+ Platform id is **`opencode`**. The external runtime executable is **`opencode`**.
5
+
6
+ This directory is the **source** tree. Consumer installs land under **`.opencode/`**
7
+ (native OpenCode discovery for agents, skills, and commands) plus root
8
+ `AGENTS.md` and `opencode.json`.
9
+
10
+ Do not write `~/.config/opencode/**` from init, clean, or probes.
11
+
12
+ ## Status
13
+
14
+ `platform-contract.json` `releasedStacks` lists installable stacks. **`next`**
15
+ is released (`npx @bonesofspring/ai-rules init opencode --preset next`).
16
+ Additional stacks ship after the Next pilot.
17
+
18
+ Derivation (approved architecture):
19
+
20
+ ```text
21
+ _shared/core → cursor/<stack> → opencode/<stack>
22
+ cursor/<stack> → claude/<stack> (unchanged twin)
23
+ cursor/<stack> → mavis/<stack> (unchanged)
24
+ ```
25
+
26
+ OpenCode sources are **not** derived from Claude. Cursor remains the semantic
27
+ source of truth.
28
+
29
+ ## Compatibility floor
30
+
31
+ See [`docs/OPENCODE.md`](../../docs/OPENCODE.md) (consumer guide) and
32
+ [`docs/OPENCODE-COMPATIBILITY.md`](../../docs/OPENCODE-COMPATIBILITY.md).
33
+ Statuses come from official OpenCode docs until a live CLI probe exists.
34
+ `unknown` / `no-equivalent` capabilities must not declare a native path.
35
+
36
+ Native (documented):
37
+
38
+ - root `AGENTS.md`
39
+ - `.opencode/agents/`, `.opencode/skills/`, `.opencode/commands/`
40
+ - `opencode.json` `mcp`
41
+
42
+ Fallback (no Cursor-style rule engine / no `hooks.json`):
43
+
44
+ - `.opencode/rules/**` — lazy `Read` from `AGENTS.md` catalog
45
+ - pipeline lifecycle — `bash .opencode/hooks/chain-team-phases.sh` after receipts
46
+
47
+ ## Files
48
+
49
+ | Path | Role |
50
+ |------|------|
51
+ | `platform-contract.json` | Machine-readable adapter declaration |
52
+ | `next/` | Released Next.js stack (`releasedStacks: ["next"]`) |
53
+
54
+ Validate:
55
+
56
+ ```bash
57
+ node scripts/check-opencode-platform-contract.mjs
58
+ node scripts/check-opencode-platform-contract.mjs --self-test
59
+ node scripts/generate-opencode-next.mjs
60
+ node scripts/check-opencode-adapter-map.mjs
61
+ ```
@@ -0,0 +1,36 @@
1
+ # MCP (preset `next`, OpenCode)
2
+
3
+ Merged into project `opencode.json` `mcp` on `ai-rules init opencode --preset next`.
4
+
5
+ ## Servers
6
+
7
+ | Name | Package | Purpose |
8
+ |------|---------|---------|
9
+ | `context7` | `@upstash/context7-mcp` | Up-to-date Next/React/TS and library docs (fewer stale APIs in agent answers) |
10
+ | `playwright` | `@playwright/mcp` | Browser automation for e2e agents (`playwright-test-*`) and selector checks |
11
+ | `chrome-devtools` | `chrome-devtools-mcp` | Live DOM/network/performance when debugging UI |
12
+ | `figma` | remote `https://mcp.figma.com/mcp` | Design context → code (layouts, tokens, Code Connect); OAuth in OpenCode (operator MCP config) |
13
+
14
+ Do not put secrets in the file. Optional: `CONTEXT7_API_KEY` in the environment — higher Context7 rate limits. Figma — OAuth on first connect (do not write the token into config).
15
+
16
+
17
+ ## Agent usage
18
+
19
+ Load requestable rule `mcp-usage`. The **session MCP catalog** is source of truth (this file and `mcp.json` are hints). Discover tool schemas before calling; never invent them.
20
+
21
+ **Context7 (shipped):** query docs when a third-party API is not confirmed by lockfile + sibling files. Use the installed major. Cap ≤3 doc queries per question. If Context7 is down, mark `// VERIFY` and continue — do not block.
22
+
23
+ ## Local overlay (not shipped)
24
+
25
+ `init` **merges** `mcpServers`: preset keys are updated; extra local servers are kept. User-level MCP is never touched. Prefer user-level MCP if you do not want overlay servers in the project file.
26
+
27
+ Use an overlay only when it is **ready** (`serverStatus` not `error` / `needsAuth` / `loading`) **and** the task fits. Absence is not a blocker unless the user required that MCP as source of truth.
28
+
29
+ | Kind | Typical aliases | When |
30
+ |------|-----------------|------|
31
+ | Observability | `sentry`, `datadog`, `plugin-datadog-*` | production error, event/trace id, APM |
32
+ | Tickets | `linear`, `jira`, `notion`, `plugin-notion-*` | ticket/page URL; read-only; task-folder artifacts remain SoT |
33
+ | GitHub MCP | `github` | optional; native `gh` remains SoT for PRs and checks |
34
+ | Storybook | `storybook`, `user-storybook`, `plugin-storybook`, `storybook-mcp-addon` | component docs/stories/controls; needs Storybook running; not shipped |
35
+
36
+ **Browser split (this preset):** Playwright MCP → e2e agents and selectors. Chrome DevTools MCP → `debugger` / `performance-auditor` against a running app. Not interchangeable.
@@ -0,0 +1,65 @@
1
+ # Next.js stack — OpenCode agent team
2
+
3
+ Short OpenCode entry. Native discovery: `.opencode/agents/`,
4
+ `.opencode/skills/`, `.opencode/commands/`. Rule files under
5
+ `.opencode/rules/*.md` are **not** auto-loaded.
6
+
7
+ Root `AGENTS.md` is native always-on. Read it first, then this file.
8
+
9
+ ## How to load
10
+
11
+ - Essential rules: Read immediately (paths below). Do not preload the catalog.
12
+ - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
+ - Agents: native `@name` / Task from `.opencode/agents/`.
14
+ - Commands: native `/task` from `.opencode/commands/`.
15
+ - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
16
+ Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
+
18
+ ## Essential rules (read every turn)
19
+
20
+ - `.opencode/rules/next-app-core.md`
21
+ - `.opencode/rules/package-manager.md`
22
+ - `.opencode/rules/code-quality-and-refactoring.md`
23
+ - `.opencode/rules/ai-local-overlay.md`
24
+
25
+ See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
+
27
+ **Platform docs:** published with the `@bonesofspring/ai-rules` package
28
+ (`docs/OPENCODE.md`, `docs/OPENCODE-COMPATIBILITY.md`) — **not** copied into
29
+ the consumer repo. Source: https://github.com/bonesofspring/ai-rules
30
+
31
+ **Repo-root agents:** see [`AGENTS.md`](../../AGENTS.md) at the project root (cross-tool setup, commands, security, living conventions pointers).
32
+
33
+ ## Quick start
34
+
35
+ | Task | Where to look |
36
+ |------|----------------|
37
+ | Any new work task | `/task` → `commands/task.md` + `agent-team-orchestrator.md` (+ `agent-team-intake.md` on-demand) |
38
+ | New end-to-end feature | skill `feature-delivery` + `feature-delivery-workflow.md` |
39
+ | Stack and layers | `next-app-core.md` |
40
+ | Reference features | `reference-features.md` (fill paths in the repo) |
41
+ | After code edits | `post-change-lint.md` (**requestable**, but required after edits; full gate — `build-verifier`) |
42
+ | Code review MR | skill `code-review` + `code-review-mr.md` |
43
+ | Security (auth/forms/env) | `security-next.md` + agent `security-reviewer` |
44
+ | Validation before review | agent `build-verifier` |
45
+ | Technical retro | `/technical-retro` + skill `technical-retro` |
46
+
47
+ ## When to use `/task`
48
+
49
+ - Implementation, bugfix, migration, tests, MR review, CI fix — **prefer `/task`**.
50
+ - Simple one-liner without architectural risk — may skip the pipeline if the user explicitly asks.
51
+ - Questions «как работает X» (how does X work) — agent `codebase-analyzer` (explain-as-is) or answer without `/task`. <!-- i18n-keep: E4 -->
52
+
53
+ ## Pipeline routing
54
+
55
+ Intent detection, profiles (`full` / `standard` / `light`), and default steps — **only** in `agents/task-router.md`. Schema and examples — `agents/README.md`.
56
+
57
+ ## Install
58
+
59
+ ```bash
60
+ npx @bonesofspring/ai-rules init opencode --preset next
61
+ ```
62
+
63
+ Copies rules, commands, agents, hooks, skills, team, `OPENCODE.md` →
64
+ `.opencode/AGENTS.md`, `MCP.md`, `opencode.json` → project `opencode.json`
65
+ (`mcp` merge), plus `REPO_AGENTS.md` → root `AGENTS.md`.
@@ -0,0 +1,16 @@
1
+ # Next.js preset (OpenCode)
2
+
3
+ Sibling adapter derived from `presets/cursor/next`. Platform id `opencode`;
4
+ runtime `opencode`. Consumer install root is `.opencode/` (native agents,
5
+ skills, commands) plus root `AGENTS.md` and `opencode.json`.
6
+
7
+ Mapping: `adapter-map.json`. Do not derive this tree from Claude.
8
+
9
+ ```bash
10
+ npx @bonesofspring/ai-rules init opencode --preset next
11
+ ```
12
+
13
+ `releasedStacks` currently lists **`next`** only.
14
+
15
+ Omitted from this pilot: `BUGBOT.md`, `hooks.json`, hook examples, and
16
+ unwired `guard-shell-command.sh`.
@@ -0,0 +1,97 @@
1
+ # Next.js — agent instructions
2
+
3
+ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`,
4
+ `.claude/CLAUDE.md`, `.mavis/AGENTS.md`, and `.opencode/AGENTS.md`.
5
+
6
+ When this OpenCode preset is installed, read `.opencode/AGENTS.md` on every
7
+ turn. Do not write `~/.config/opencode/**`. Do not mutate
8
+ `.opencode/team/tasks/<slug>/status.json` or `metrics.json` — the chain
9
+ runner owns those files.
10
+
11
+ ## Cross-tool setup
12
+
13
+ - Treat this file as the **shared** entry for any agent (Cursor, Claude Code,
14
+ Mavis, OpenCode, or other).
15
+ - Install:
16
+
17
+ ```bash
18
+ npx @bonesofspring/ai-rules init cursor --preset next
19
+ npx @bonesofspring/ai-rules init claude --preset next
20
+ npx @bonesofspring/ai-rules init mavis --preset next
21
+ npx @bonesofspring/ai-rules init opencode --preset next
22
+ ```
23
+
24
+ `init` overwrites this file from the preset (`REPO_AGENTS.md` → `AGENTS.md`).
25
+ Living gotchas belong in `team/conventions.md`, not here.
26
+
27
+ ## OpenCode load map
28
+
29
+ After install, also read:
30
+
31
+ - `.opencode/AGENTS.md` — OpenCode load map, roles, and procedures
32
+ - `.opencode/rules/next-app-core.md`
33
+ - `.opencode/rules/package-manager.md`
34
+ - `.opencode/rules/code-quality-and-refactoring.md`
35
+ - `.opencode/rules/ai-local-overlay.md`
36
+
37
+ Do **not** preload the full `.opencode/rules/` catalog. Native agents live in
38
+ `.opencode/agents/`; skills in `.opencode/skills/`; slash commands in
39
+ `.opencode/commands/` (`/task`). After a producer receipt run
40
+ `bash .opencode/hooks/chain-team-phases.sh`.
41
+
42
+ ## Commands (test / lint / build)
43
+
44
+ Working directory for app scripts: **`app/`**. Detect the package manager from
45
+ lockfile / `packageManager` (`package-manager` rule).
46
+
47
+ | Gate | Typical command |
48
+ |------|-----------------|
49
+ | Lint JS | `yarn lint:js` (or project equivalent) from `app/` |
50
+ | Lint CSS | `yarn lint:css` from `app/` |
51
+ | Unit tests | project unit script under `app/` |
52
+ | Build | project `build` under `app/` |
53
+
54
+ After code edits: invoke **`post-change-lint`** (requestable). Full gate: agent
55
+ `build-verifier`.
56
+
57
+ ## Security basics
58
+
59
+ - Do not commit secrets (`.env`, tokens, credentials).
60
+ - Review destructive git (`reset --hard`, force-push) before running; respect
61
+ shell hooks.
62
+ - Do not weaken CI or skip hooks unless the user explicitly asks.
63
+
64
+ ## Tool entry points
65
+
66
+ | Tool | Map |
67
+ |------|-----|
68
+ | Cursor | `.cursor/AGENTS.md` (optional if Cursor not installed) |
69
+ | Claude Code | `.claude/CLAUDE.md` (optional if Claude Code not installed) |
70
+ | Mavis | `.mavis/AGENTS.md` (optional if Mavis not installed) |
71
+ | OpenCode | `.opencode/AGENTS.md` (optional if OpenCode not installed) |
72
+
73
+ Rules: `.cursor/rules/`, `.claude/rules/`, `.mavis/rules/`, or `.opencode/rules/`.
74
+ Skills: `.cursor/skills/`, `.claude/skills/`, `.mavis/skills/`, or `.opencode/skills/`.
75
+
76
+ ## Living conventions
77
+
78
+ Gotchas, local patterns, and team decisions:
79
+ **`.cursor/team/conventions.md`**, **`.claude/team/conventions.md`**,
80
+ **`.mavis/team/conventions.md`**, and/or **`.opencode/team/conventions.md`**
81
+ (fill after init; not overwritten on every dogfood sync when already present).
82
+
83
+ ## Local overlay (`.ai.local/`) — MANDATORY
84
+
85
+ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in
86
+ monorepos. **All agents MUST read and apply it on every turn.** Rules there
87
+ override preset rules; in conflicts, the local rule wins.
88
+ `override: kill <preset-rule-name>` drops the named preset rule from the
89
+ agent's context entirely.
90
+
91
+ Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with
92
+ higher priority than preset rules. Living gotchas live in
93
+ `.ai.local/conventions.md`.
94
+
95
+ Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules`
96
+ package. The `ai-local-overlay` rule is the mechanism; this `MANDATORY`
97
+ section is the reinforcement.