@bonesofspring/ai-rules 0.2.21 → 0.2.23

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 (363) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +6 -2
  3. package/bin/cli.js +32 -8
  4. package/bin/mavis-install.js +441 -0
  5. package/package.json +9 -2
  6. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +2 -0
  7. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -0
  8. package/presets/_shared/core/meta/preset-twin-sync.md +17 -1
  9. package/presets/claude/android-kotlin/agents/build-verifier.md +2 -0
  10. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
  11. package/presets/claude/android-kotlin/agents/debugger.md +1 -0
  12. package/presets/claude/android-kotlin/agents/feature-developer.md +3 -0
  13. package/presets/claude/android-kotlin/agents/qa-tester.md +2 -0
  14. package/presets/claude/android-kotlin/agents/task-router.md +4 -0
  15. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +51 -11
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  17. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +17 -1
  18. package/presets/claude/go/agents/build-verifier.md +4 -0
  19. package/presets/claude/go/agents/code-reviewer.md +4 -0
  20. package/presets/claude/go/agents/debugger.md +4 -0
  21. package/presets/claude/go/agents/feature-developer.md +5 -0
  22. package/presets/claude/go/agents/qa-tester.md +4 -0
  23. package/presets/claude/go/agents/task-router.md +4 -0
  24. package/presets/claude/go/hooks/chain-team-phases.sh +51 -11
  25. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  26. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +17 -1
  27. package/presets/claude/ios-swift/agents/build-verifier.md +2 -0
  28. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
  29. package/presets/claude/ios-swift/agents/debugger.md +1 -0
  30. package/presets/claude/ios-swift/agents/feature-developer.md +3 -0
  31. package/presets/claude/ios-swift/agents/qa-tester.md +2 -0
  32. package/presets/claude/ios-swift/agents/task-router.md +4 -0
  33. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +51 -11
  34. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  35. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +17 -1
  36. package/presets/claude/java/agents/build-verifier.md +4 -0
  37. package/presets/claude/java/agents/code-reviewer.md +4 -0
  38. package/presets/claude/java/agents/debugger.md +4 -0
  39. package/presets/claude/java/agents/feature-developer.md +5 -0
  40. package/presets/claude/java/agents/qa-tester.md +4 -0
  41. package/presets/claude/java/agents/task-router.md +4 -0
  42. package/presets/claude/java/hooks/chain-team-phases.sh +51 -11
  43. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  44. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +17 -1
  45. package/presets/claude/mcp-ts/agents/build-verifier.md +4 -0
  46. package/presets/claude/mcp-ts/agents/feature-developer.md +5 -0
  47. package/presets/claude/mcp-ts/agents/task-router.md +1 -1
  48. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +51 -11
  49. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  50. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +17 -1
  51. package/presets/claude/next/agents/build-verifier.md +2 -0
  52. package/presets/claude/next/agents/code-reviewer.md +2 -0
  53. package/presets/claude/next/agents/debugger.md +4 -0
  54. package/presets/claude/next/agents/feature-developer.md +3 -0
  55. package/presets/claude/next/agents/qa-tester.md +4 -0
  56. package/presets/claude/next/agents/unit-test-generator.md +1 -1
  57. package/presets/claude/next/agents/unit-test-planner.md +1 -1
  58. package/presets/claude/next/hooks/chain-team-phases.sh +51 -11
  59. package/presets/claude/next/rules/api-and-data/http-client.md +1 -1
  60. package/presets/claude/next/rules/architecture/reference-features.md +1 -1
  61. package/presets/claude/next/rules/testing/README.md +1 -1
  62. package/presets/claude/next/rules/testing/tests-e2e-structure.md +2 -0
  63. package/presets/claude/next/rules/testing/tests-unit.md +3 -5
  64. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  65. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +17 -1
  66. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +1 -1
  67. package/presets/claude/next/skills/playwright-e2e/SKILL.md +5 -3
  68. package/presets/claude/next/skills/unit-testing/SKILL.md +6 -4
  69. package/presets/claude/nuxt/agents/build-verifier.md +2 -0
  70. package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
  71. package/presets/claude/nuxt/agents/debugger.md +4 -0
  72. package/presets/claude/nuxt/agents/feature-developer.md +3 -0
  73. package/presets/claude/nuxt/agents/qa-tester.md +4 -0
  74. package/presets/claude/nuxt/hooks/chain-team-phases.sh +51 -11
  75. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  76. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +17 -1
  77. package/presets/claude/php-hexagonal/agents/build-verifier.md +4 -0
  78. package/presets/claude/php-hexagonal/agents/code-reviewer.md +4 -0
  79. package/presets/claude/php-hexagonal/agents/debugger.md +4 -0
  80. package/presets/claude/php-hexagonal/agents/feature-developer.md +5 -0
  81. package/presets/claude/php-hexagonal/agents/qa-tester.md +4 -0
  82. package/presets/claude/php-hexagonal/agents/task-router.md +4 -0
  83. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +51 -11
  84. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  85. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +17 -1
  86. package/presets/claude/php-laravel/agents/build-verifier.md +4 -0
  87. package/presets/claude/php-laravel/agents/code-reviewer.md +4 -0
  88. package/presets/claude/php-laravel/agents/debugger.md +4 -0
  89. package/presets/claude/php-laravel/agents/feature-developer.md +5 -0
  90. package/presets/claude/php-laravel/agents/qa-tester.md +4 -0
  91. package/presets/claude/php-laravel/agents/task-router.md +1 -0
  92. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +51 -11
  93. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  94. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +17 -1
  95. package/presets/claude/svelte/agents/build-verifier.md +2 -0
  96. package/presets/claude/svelte/agents/code-reviewer.md +2 -0
  97. package/presets/claude/svelte/agents/debugger.md +4 -0
  98. package/presets/claude/svelte/agents/feature-developer.md +3 -0
  99. package/presets/claude/svelte/agents/qa-tester.md +4 -0
  100. package/presets/claude/svelte/hooks/chain-team-phases.sh +51 -11
  101. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +1 -0
  102. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +17 -1
  103. package/presets/cursor/android-kotlin/agents/build-verifier.md +2 -0
  104. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
  105. package/presets/cursor/android-kotlin/agents/debugger.md +1 -0
  106. package/presets/cursor/android-kotlin/agents/feature-developer.md +3 -0
  107. package/presets/cursor/android-kotlin/agents/qa-tester.md +2 -0
  108. package/presets/cursor/android-kotlin/agents/task-router.md +4 -0
  109. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +51 -11
  110. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +1 -0
  111. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +17 -1
  112. package/presets/cursor/go/agents/build-verifier.md +4 -0
  113. package/presets/cursor/go/agents/code-reviewer.md +4 -0
  114. package/presets/cursor/go/agents/debugger.md +4 -0
  115. package/presets/cursor/go/agents/feature-developer.md +5 -0
  116. package/presets/cursor/go/agents/qa-tester.md +4 -0
  117. package/presets/cursor/go/agents/task-router.md +4 -0
  118. package/presets/cursor/go/hooks/chain-team-phases.sh +51 -11
  119. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -0
  120. package/presets/cursor/go/rules/preset-twin-sync.mdc +17 -1
  121. package/presets/cursor/ios-swift/agents/build-verifier.md +2 -0
  122. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
  123. package/presets/cursor/ios-swift/agents/debugger.md +1 -0
  124. package/presets/cursor/ios-swift/agents/feature-developer.md +3 -0
  125. package/presets/cursor/ios-swift/agents/qa-tester.md +2 -0
  126. package/presets/cursor/ios-swift/agents/task-router.md +4 -0
  127. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +51 -11
  128. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -0
  129. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +17 -1
  130. package/presets/cursor/java/agents/build-verifier.md +4 -0
  131. package/presets/cursor/java/agents/code-reviewer.md +4 -0
  132. package/presets/cursor/java/agents/debugger.md +4 -0
  133. package/presets/cursor/java/agents/feature-developer.md +5 -0
  134. package/presets/cursor/java/agents/qa-tester.md +4 -0
  135. package/presets/cursor/java/agents/task-router.md +4 -0
  136. package/presets/cursor/java/hooks/chain-team-phases.sh +51 -11
  137. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -0
  138. package/presets/cursor/java/rules/preset-twin-sync.mdc +17 -1
  139. package/presets/cursor/mcp-ts/agents/build-verifier.md +4 -0
  140. package/presets/cursor/mcp-ts/agents/feature-developer.md +5 -0
  141. package/presets/cursor/mcp-ts/agents/task-router.md +1 -1
  142. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +51 -11
  143. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -0
  144. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +17 -1
  145. package/presets/cursor/next/agents/build-verifier.md +2 -0
  146. package/presets/cursor/next/agents/code-reviewer.md +2 -0
  147. package/presets/cursor/next/agents/debugger.md +4 -0
  148. package/presets/cursor/next/agents/feature-developer.md +3 -0
  149. package/presets/cursor/next/agents/qa-tester.md +4 -0
  150. package/presets/cursor/next/agents/unit-test-generator.md +1 -1
  151. package/presets/cursor/next/agents/unit-test-planner.md +1 -1
  152. package/presets/cursor/next/hooks/chain-team-phases.sh +51 -11
  153. package/presets/cursor/next/rules/http-client.mdc +1 -1
  154. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -0
  155. package/presets/cursor/next/rules/preset-twin-sync.mdc +17 -1
  156. package/presets/cursor/next/rules/react-ui.mdc +1 -1
  157. package/presets/cursor/next/rules/reference-features.mdc +1 -1
  158. package/presets/cursor/next/rules/tests-e2e-structure.mdc +2 -0
  159. package/presets/cursor/next/rules/tests-unit.mdc +3 -5
  160. package/presets/cursor/next/skills/playwright-e2e/SKILL.md +5 -3
  161. package/presets/cursor/next/skills/unit-testing/SKILL.md +6 -4
  162. package/presets/cursor/nuxt/agents/build-verifier.md +2 -0
  163. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
  164. package/presets/cursor/nuxt/agents/debugger.md +4 -0
  165. package/presets/cursor/nuxt/agents/feature-developer.md +3 -0
  166. package/presets/cursor/nuxt/agents/qa-tester.md +4 -0
  167. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +51 -11
  168. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +1 -0
  169. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +17 -1
  170. package/presets/cursor/php-hexagonal/agents/build-verifier.md +4 -0
  171. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +4 -0
  172. package/presets/cursor/php-hexagonal/agents/debugger.md +4 -0
  173. package/presets/cursor/php-hexagonal/agents/feature-developer.md +5 -0
  174. package/presets/cursor/php-hexagonal/agents/qa-tester.md +4 -0
  175. package/presets/cursor/php-hexagonal/agents/task-router.md +4 -0
  176. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +51 -11
  177. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -0
  178. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +17 -1
  179. package/presets/cursor/php-laravel/agents/build-verifier.md +4 -0
  180. package/presets/cursor/php-laravel/agents/code-reviewer.md +4 -0
  181. package/presets/cursor/php-laravel/agents/debugger.md +4 -0
  182. package/presets/cursor/php-laravel/agents/feature-developer.md +5 -0
  183. package/presets/cursor/php-laravel/agents/qa-tester.md +4 -0
  184. package/presets/cursor/php-laravel/agents/task-router.md +1 -0
  185. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +51 -11
  186. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -0
  187. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +17 -1
  188. package/presets/cursor/svelte/agents/build-verifier.md +2 -0
  189. package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
  190. package/presets/cursor/svelte/agents/debugger.md +4 -0
  191. package/presets/cursor/svelte/agents/feature-developer.md +3 -0
  192. package/presets/cursor/svelte/agents/qa-tester.md +4 -0
  193. package/presets/cursor/svelte/hooks/chain-team-phases.sh +51 -11
  194. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +1 -0
  195. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +17 -1
  196. package/presets/mavis/README.md +60 -0
  197. package/presets/mavis/next/MAVIS.md +67 -0
  198. package/presets/mavis/next/MCP.md +36 -0
  199. package/presets/mavis/next/README.md +15 -0
  200. package/presets/mavis/next/REPO_AGENTS.md +94 -0
  201. package/presets/mavis/next/adapter-map.json +959 -0
  202. package/presets/mavis/next/agents/README.md +206 -0
  203. package/presets/mavis/next/agents/accessibility-reviewer.md +61 -0
  204. package/presets/mavis/next/agents/api-contract-reviewer.md +57 -0
  205. package/presets/mavis/next/agents/build-verifier.md +110 -0
  206. package/presets/mavis/next/agents/ci-investigator.md +63 -0
  207. package/presets/mavis/next/agents/code-reviewer.md +61 -0
  208. package/presets/mavis/next/agents/codebase-analyzer.md +21 -0
  209. package/presets/mavis/next/agents/debugger.md +80 -0
  210. package/presets/mavis/next/agents/feature-developer.md +101 -0
  211. package/presets/mavis/next/agents/migration-specialist.md +67 -0
  212. package/presets/mavis/next/agents/mockup-reviewer.md +53 -0
  213. package/presets/mavis/next/agents/openspec-author.md +157 -0
  214. package/presets/mavis/next/agents/performance-auditor.md +68 -0
  215. package/presets/mavis/next/agents/playwright-test-generator.md +28 -0
  216. package/presets/mavis/next/agents/playwright-test-healer.md +28 -0
  217. package/presets/mavis/next/agents/playwright-test-planner.md +21 -0
  218. package/presets/mavis/next/agents/qa-tester.md +52 -0
  219. package/presets/mavis/next/agents/security-reviewer.md +54 -0
  220. package/presets/mavis/next/agents/solution-architect.md +68 -0
  221. package/presets/mavis/next/agents/task-analyst.md +166 -0
  222. package/presets/mavis/next/agents/task-router.md +178 -0
  223. package/presets/mavis/next/agents/tech-writer.md +57 -0
  224. package/presets/mavis/next/agents/unit-test-generator.md +31 -0
  225. package/presets/mavis/next/agents/unit-test-healer.md +32 -0
  226. package/presets/mavis/next/agents/unit-test-planner.md +54 -0
  227. package/presets/mavis/next/commands/README.md +49 -0
  228. package/presets/mavis/next/commands/spec-start.md +24 -0
  229. package/presets/mavis/next/commands/task-continue.md +50 -0
  230. package/presets/mavis/next/commands/task.md +50 -0
  231. package/presets/mavis/next/commands/technical-retro.md +80 -0
  232. package/presets/mavis/next/hooks/README.md +22 -0
  233. package/presets/mavis/next/hooks/chain-team-phases.sh +845 -0
  234. package/presets/mavis/next/mcp.json +19 -0
  235. package/presets/mavis/next/rules/README.md +16 -0
  236. package/presets/mavis/next/rules/agent-team-intake.md +11 -0
  237. package/presets/mavis/next/rules/agent-team-orchestrator.md +210 -0
  238. package/presets/mavis/next/rules/ai-local-overlay.md +37 -0
  239. package/presets/mavis/next/rules/anti-sycophancy-discipline.md +23 -0
  240. package/presets/mavis/next/rules/api-services.md +72 -0
  241. package/presets/mavis/next/rules/architecture-boundaries-ui.md +9 -0
  242. package/presets/mavis/next/rules/architecture-boundaries.md +86 -0
  243. package/presets/mavis/next/rules/arrow-functions.md +25 -0
  244. package/presets/mavis/next/rules/code-quality-and-refactoring.md +40 -0
  245. package/presets/mavis/next/rules/code-review-mr.md +40 -0
  246. package/presets/mavis/next/rules/css-property-order-stylelint.md +5 -0
  247. package/presets/mavis/next/rules/design-guidance.md +99 -0
  248. package/presets/mavis/next/rules/feature-delivery-workflow.md +49 -0
  249. package/presets/mavis/next/rules/http-client.md +55 -0
  250. package/presets/mavis/next/rules/layer-barrel-exports.md +68 -0
  251. package/presets/mavis/next/rules/mcp-usage.md +86 -0
  252. package/presets/mavis/next/rules/mockup-review.md +107 -0
  253. package/presets/mavis/next/rules/navigation-router-stack.md +56 -0
  254. package/presets/mavis/next/rules/navigation-router-ui.md +10 -0
  255. package/presets/mavis/next/rules/next-app-core.md +29 -0
  256. package/presets/mavis/next/rules/next-app-router.md +44 -0
  257. package/presets/mavis/next/rules/no-props-spread.md +56 -0
  258. package/presets/mavis/next/rules/no-type-assertion-as-import-export.md +51 -0
  259. package/presets/mavis/next/rules/package-manager.md +11 -0
  260. package/presets/mavis/next/rules/playwright-agents.md +67 -0
  261. package/presets/mavis/next/rules/post-change-lint.md +35 -0
  262. package/presets/mavis/next/rules/preset-layering.md +27 -0
  263. package/presets/mavis/next/rules/preset-no-cross-stack-leakage.md +90 -0
  264. package/presets/mavis/next/rules/preset-pr-checklist.md +35 -0
  265. package/presets/mavis/next/rules/preset-token-budget.md +36 -0
  266. package/presets/mavis/next/rules/preset-twin-sync.md +65 -0
  267. package/presets/mavis/next/rules/product-specs-authoring.md +112 -0
  268. package/presets/mavis/next/rules/product-specs.md +56 -0
  269. package/presets/mavis/next/rules/public-imports.md +50 -0
  270. package/presets/mavis/next/rules/react-a11y-coding.md +31 -0
  271. package/presets/mavis/next/rules/react-next-anti-hallucination.md +60 -0
  272. package/presets/mavis/next/rules/react-ui.md +105 -0
  273. package/presets/mavis/next/rules/reference-features.md +45 -0
  274. package/presets/mavis/next/rules/security-next.md +45 -0
  275. package/presets/mavis/next/rules/store-rtk.md +78 -0
  276. package/presets/mavis/next/rules/technical-retro.md +11 -0
  277. package/presets/mavis/next/rules/tests-e2e-structure.md +72 -0
  278. package/presets/mavis/next/rules/tests-unit.md +72 -0
  279. package/presets/mavis/next/rules/types-jsdoc.md +43 -0
  280. package/presets/mavis/next/rules/ux-design.md +99 -0
  281. package/presets/mavis/next/skills/README.md +21 -0
  282. package/presets/mavis/next/skills/ci-investigation/SKILL.md +39 -0
  283. package/presets/mavis/next/skills/code-review/SKILL.md +39 -0
  284. package/presets/mavis/next/skills/debug-investigation/SKILL.md +26 -0
  285. package/presets/mavis/next/skills/feature-delivery/SKILL.md +34 -0
  286. package/presets/mavis/next/skills/mockup-review/SKILL.md +24 -0
  287. package/presets/mavis/next/skills/playwright-e2e/SKILL.md +28 -0
  288. package/presets/mavis/next/skills/react-performance/SKILL.md +39 -0
  289. package/presets/mavis/next/skills/spec-authoring/SKILL.md +21 -0
  290. package/presets/mavis/next/skills/spec-discovery/SKILL.md +53 -0
  291. package/presets/mavis/next/skills/technical-retro/SKILL.md +49 -0
  292. package/presets/mavis/next/skills/unit-testing/SKILL.md +29 -0
  293. package/presets/mavis/next/skills/ux-design/SKILL.md +31 -0
  294. package/presets/mavis/next/skills/write-adr/SKILL.md +36 -0
  295. package/presets/mavis/next/team/README.md +148 -0
  296. package/presets/mavis/next/team/conventions.md +21 -0
  297. package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +79 -0
  298. package/presets/mavis/next/team/fixtures/bugfix-standard.json +25 -0
  299. package/presets/mavis/next/team/fixtures/feature-full.json +29 -0
  300. package/presets/mavis/next/team/fixtures/feature-light.json +27 -0
  301. package/presets/mavis/next/team/fixtures/feature-with-figma-url.json +17 -0
  302. package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
  303. package/presets/mavis/next/team/fixtures/memlog.example.md +9 -0
  304. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  305. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  306. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  307. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  308. package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  309. package/presets/mavis/next/team/fixtures/metrics.example.json +54 -0
  310. package/presets/mavis/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
  311. package/presets/mavis/next/team/fixtures/mockup-review-standalone.json +14 -0
  312. package/presets/mavis/next/team/fixtures/ux-design-standalone.json +15 -0
  313. package/presets/mavis/next/team/tasks/.gitkeep +0 -0
  314. package/presets/mavis/platform-contract.json +131 -0
  315. package/scripts/capture-cli-golden.mjs +44 -0
  316. package/scripts/check-chain-hook-coverage.sh +1 -0
  317. package/scripts/check-mavis-adapter-map.mjs +294 -0
  318. package/scripts/check-mavis-local-overlay.mjs +56 -0
  319. package/scripts/check-mavis-platform-contract.mjs +388 -0
  320. package/scripts/check-mavis-token-budget.mjs +48 -0
  321. package/scripts/check-preset-leakage.sh +35 -3
  322. package/scripts/check-preset-structure.sh +73 -0
  323. package/scripts/check-preset-token-budget.sh +100 -0
  324. package/scripts/check-shared-core-drift.sh +18 -0
  325. package/scripts/check-task-router-intents.sh +154 -0
  326. package/scripts/fixtures/cli-golden/claude/next.json +130 -0
  327. package/scripts/fixtures/cli-golden/cursor/next.json +132 -0
  328. package/scripts/fixtures/cli-golden/mavis/next.json +125 -0
  329. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
  330. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
  331. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
  332. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/MAVIS.md +1 -0
  333. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/adapter-map.json +26 -0
  334. package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/rules/sample.md +2 -0
  335. package/scripts/fixtures/mavis-adapter-map/valid/cursor/AGENTS.md +1 -0
  336. package/scripts/fixtures/mavis-adapter-map/valid/cursor/rules/sample.mdc +2 -0
  337. package/scripts/fixtures/mavis-adapter-map/valid/mavis/MAVIS.md +1 -0
  338. package/scripts/fixtures/mavis-adapter-map/valid/mavis/adapter-map.json +26 -0
  339. package/scripts/fixtures/mavis-adapter-map/valid/mavis/rules/sample.md +2 -0
  340. package/scripts/fixtures/mavis-platform-contract/invalid-minimax-destination.json +131 -0
  341. package/scripts/fixtures/mavis-platform-contract/invalid-missing-capability.json +126 -0
  342. package/scripts/fixtures/mavis-platform-contract/invalid-released-unknown-stack.json +133 -0
  343. package/scripts/fixtures/mavis-platform-contract/invalid-unknown-native-path.json +131 -0
  344. package/scripts/fixtures/mavis-platform-contract/invalid-version-pin.json +132 -0
  345. package/scripts/fixtures/mavis-platform-contract/valid.json +131 -0
  346. package/scripts/fixtures/mavis-probe/AGENTS.md +6 -0
  347. package/scripts/fixtures/mavis-probe/agents/probe-agent.md +6 -0
  348. package/scripts/fixtures/mavis-probe/fake-mcode.mjs +98 -0
  349. package/scripts/fixtures/mavis-probe/output.schema.json +28 -0
  350. package/scripts/fixtures/mavis-probe/rules/probe.md +5 -0
  351. package/scripts/fixtures/mavis-probe/skills/probe/SKILL.md +11 -0
  352. package/scripts/generate-mavis-next.mjs +704 -0
  353. package/scripts/lib/cli-golden.mjs +50 -0
  354. package/scripts/lib/discover-hooks.mjs +72 -0
  355. package/scripts/probe-mavis-capabilities.mjs +480 -0
  356. package/scripts/test-agent-task-metrics-hooks.mjs +120 -16
  357. package/scripts/test-chain-team-phases-coverage.mjs +110 -8
  358. package/scripts/test-cli-init-clean.mjs +256 -0
  359. package/scripts/test-cli-mcp-merge.mjs +23 -0
  360. package/scripts/test-mavis-context-budget.mjs +55 -0
  361. package/scripts/test-mavis-orchestration.mjs +649 -0
  362. package/scripts/test-probe-mavis-capabilities.mjs +205 -0
  363. package/scripts/test-task-router-intents-fixtures.mjs +109 -0
@@ -0,0 +1,43 @@
1
+ # Type documentation in `app/src/types`
2
+
3
+ When adding or substantially changing types in this layer, **follow the JSDoc style already adopted in the repo** (see examples: `User.types.ts`, `Common.types.ts`, `ServerValidation.types.ts`, `TreatmentPlan/*.types.ts`).
4
+
5
+ ## Language and form
6
+
7
+ - Comment text — **in Russian** (repo locale convention for domain/API field descriptions), brief and to the point: what the type or field means in the domain or API contract.
8
+ - **Do not rely** on tags like `@param`, `@returns`, `@see`, `@deprecated` for type descriptions — they are **not used** in this layer; plain text in `/** … */` is enough.
9
+
10
+ ## Exported `type` / `interface`
11
+
12
+ - Immediately **before the declaration** — a `/** … */` block.
13
+ - If you need to explain data source, constraints, or non-obvious details — a **second paragraph** in the same block (in JSDoc, separate paragraphs with a blank line between text lines).
14
+ - For **nested** objects in the same file, document each type with its own block above its declaration.
15
+
16
+ ## Fields
17
+
18
+ - For **every** public property — a **single-line** `/** … */` on the line directly **above** the field.
19
+ - If a field **does not come from the backend as-is** but is computed or enriched on the frontend (mapper, selector, UI) — start the description with the **`[computed]`** prefix (as in `TUserProfile`, treatment plan types).
20
+ - For data formats, state this **in the text**: e.g. date `YYYY-MM-DD`, a display string example in quotes.
21
+
22
+ Example field comment (Russian locale — keep Cyrillic in type docs): <!-- i18n-keep: E5 -->
23
+
24
+ ```ts
25
+ /** Дата рождения в формате YYYY-MM-DD */ <!-- i18n-keep: E5 -->
26
+ birthDate: string
27
+ ```
28
+
29
+ ## Classes and other declarations
30
+
31
+ - For **classes** (e.g. transport errors), when changing public API — a brief block above the class and **comments on public fields** using the same rules as interface properties.
32
+
33
+ ## `enum`
34
+
35
+ - In `enums.ts`, members are often **without JSDoc** historically; for new enums a short description **above the enum** is acceptable if purpose is not obvious from the name. UI labels — as established, via `*Names` objects next to the enum.
36
+
37
+ ## Agent practice
38
+
39
+ - When adding a new type or field, **do not leave** new public fields unexplained if meaning is not 100% clear from the name.
40
+ - When editing a file that already has such comments, **maintain the same style**, not mixed with English-only or tag-heavy blocks.
41
+ - Do not bloat comments: one or two sentences per type, one line per field is normal; exception — a genuinely complex domain caveat.
42
+
43
+ See also imports and barrel: `public-imports.md`.
@@ -0,0 +1,99 @@
1
+ <!-- shared-core: review/ux-design.md -->
2
+
3
+ # UX design checklist
4
+
5
+ On-demand behavioral UX checklist (IA, named flows, state matrix). **Procedure:** skill `ux-design`. **Producer:** `task-analyst` (not a pipeline agent). Do not inline this checklist into the analyst prompt.
6
+
7
+ Stack-agnostic: no app-source globs, Playwright, or `xcodebuild`. Form-factor **examples** live in adapter **Stack notes** only.
8
+
9
+ ## When to load
10
+
11
+ - Standalone `/task` intent `ux-design` (modes `synthesize` | `review`; profile `light`; steps only `task-analyst`)
12
+ - Embedded on a UI-capable stack when **required-signal** or advisory UI AC fires on `feature` / `refactor` / `spike` / `spec-gen`
13
+ - Required-signal (any one): the user asked for UX, **or** AC explicitly require flows/states, **or** intent is `spec-gen` / `/spec-start` for a **page/feature**. Else **advisory** (notes only; skip if no UI surface)
14
+ - **Do not** load for backend-only AC even on a UI stack. Classify `mockup-review` (Figma) before `ux-design` before `review-only`
15
+
16
+ ## Inputs
17
+
18
+ 1. Task `artifact-manifest.json`, then prompt / `brief.md` / `decomposition.md` when present
19
+ 2. Skill `ux-design` + this rule
20
+ 3. Approved `docs/specs` only as product-behavior SoT **after** UX synthesis maps via Spec feed — do not write INDEX here
21
+
22
+ ## Forbidden Figma MCP
23
+
24
+ Do **not** call Figma MCP. Only `mockup-reviewer` reads Figma. Forbidden by name: `get_metadata`, `get_design_context`, `get_screenshot`, `search_design_system`, `get_variable_defs`, `use_figma`, `create_new_file`, `generate_*`.
25
+
26
+ When `figma.com` is present and required-signal fires, emit a **thin** `ux-design.md` from AC only (IA/flows the mockup must cover; no visual or DS claims). If the user only pasted a URL and AC are visual, the UX file may be omitted; `mockup-review.md` coverage stands.
27
+
28
+ Do **not** write BMAD-style `DESIGN.md` or a second visual spine. One experience artifact: `ux-design.md`.
29
+
30
+ ## Modes
31
+
32
+ | Mode | When |
33
+ |------|------|
34
+ | `synthesize` | Design UX from a brief/AC (standalone «разработай UX» / embedded required-signal) | <!-- i18n-keep: E4 -->
35
+ | `review` | Critique a brief/wireframe/description **without** Figma («ревью UX»). Figma + review-not-implement remains intent `mockup-review` | <!-- i18n-keep: E4 -->
36
+
37
+ ## Required vs advisory
38
+
39
+ - **Required** when required-signal fires (user-asked-ux / ac-requires-flows-states / spec-gen-page-feature)
40
+ - **Advisory** otherwise (UI AC without those signals). Advisory `INCOMPLETE` → notes only; DoR may complete
41
+ - Skip the skill when there is no UI surface or the prompt is empty of UX-relevant AC
42
+
43
+ ## Verdicts
44
+
45
+ `PASS` | `PASS_WITH_NOTES` | `INCOMPLETE`. Never copy the mockup FAIL-only hook (`changes_requested` + do-not-retry-developer). Incomplete UX is an analyst/DoR problem.
46
+
47
+ | Verdict | Required step | Advisory step | Standalone intent `ux-design` |
48
+ |---------|---------------|---------------|-------------------------------|
49
+ | `PASS` / `PASS_WITH_NOTES` | Analysis may complete DoR | Analysis may complete | `completed` |
50
+ | `INCOMPLETE` | DoR **not** met: `open_questions` / blocked analysis; existing `after:task-analyst` gate | Notes only; DoR may complete | `completed` (report-only) |
51
+
52
+ **Block (`INCOMPLETE` as DoR failure) only when the step was required and primary flows *or* the empty/error/loading matrix are missing.** Isolated missing microcopy or optional protagonist names never block.
53
+
54
+ ## Surface-closure
55
+
56
+ Each stated need → a surface; each surface → a flow that lands there. If closure fails, list probes under **Open probes** — **do not invent** screens, flows, or copy to fill gaps.
57
+
58
+ ## Spec feed
59
+
60
+ Analyst remains the **only** writer of `docs/specs` INDEX and page/feature files. Map `ux-design.md` → templates **after** UX synthesis (UX before `spec-authoring` author mode):
61
+
62
+ | `ux-design.md` heading | Page template | Feature template |
63
+ |------------------------|---------------|------------------|
64
+ | Scope + IA | **Overview** | **Overview** |
65
+ | Entry / actors | **Entry / actors** | — (page-level) |
66
+ | Primary flows | **Primary flows** | **Shared behavior / constraints** when a flow is cross-page |
67
+ | States | **States** (loading/empty/error/success) | **Cross-cutting states** when shared |
68
+ | Interaction notes + microcopy direction | Inform **Acceptance criteria**; leftover → **Edge cases** | Shared constraints |
69
+ | Accessibility floor (behavioral) | Testable AC without pixels; else Edge cases | Shared constraints |
70
+ | Surface-closure probes | Analyst `open_questions` — **do not** invent spec rows | Same |
71
+
72
+ ## Manifest
73
+
74
+ When produced, append `ux-design.md` to the **`analysis`** entry `authoritativePaths` and `evidencePaths`. Do **not** add a new default producer row for v1 (`ux-designer` is deferred).
75
+
76
+ ## Report headings
77
+
78
+ Write `ux-design.md` with these headings (must match the architecture artifact contract):
79
+
80
+ ```markdown
81
+ # UX design: <slug>
82
+ ## Mode
83
+ synthesize | review
84
+ ## Verdict
85
+ PASS | PASS_WITH_NOTES | INCOMPLETE
86
+ ## Scope
87
+ - Form factor: web | ios | android | mixed
88
+ - Figma present: yes | no
89
+ - Required-signal: user-asked-ux | ac-requires-flows-states | spec-gen-page-feature | advisory
90
+ ## Information architecture
91
+ ## Entry / actors
92
+ ## Primary flows
93
+ ## States
94
+ ## Interaction notes
95
+ ## Microcopy direction
96
+ ## Accessibility floor (behavioral)
97
+ ## Spec feed
98
+ ## Open probes
99
+ ```
@@ -0,0 +1,21 @@
1
+ # `.mavis/skills` (preset next)
2
+
3
+ Project skills for Cursor. They keep long workflows out of always-on rules while preserving the same team conventions as the Claude preset.
4
+
5
+ | Skill | When to use |
6
+ |-------|-------------|
7
+ | `feature-delivery` | End-to-end feature work across types, API, store, UI, tests |
8
+ | `spec-authoring` | Author or bootstrap docs/specs (INDEX, page/feature templates); `/spec-start` / analyst author mode |
9
+ | `spec-discovery` | Opt-in research-before-spec in analyst author mode (claim ledger; not default `/task` consume) |
10
+ | `mockup-review` | Figma mockup review: DS, coverage, viewports (standalone or embedded) |
11
+ | `ux-design` | Behavioral UX synthesis/review via task-analyst (standalone or embedded; no Figma MCP) |
12
+ | `code-review` | MR/diff review using project architecture and test standards |
13
+ | `debug-investigation` | Reproducing and fixing bugs with root-cause evidence |
14
+ | `ci-investigation` | Diagnosing and fixing failing CI checks on PRs/branches |
15
+ | `unit-testing` | Planning, generating, or healing unit test coverage |
16
+ | `playwright-e2e` | Planning, generating, or healing Playwright e2e coverage |
17
+ | `technical-retro` | Technical retrospective for a task, sprint, incident, or agent pipeline |
18
+ | `write-adr` | Author an Architecture Decision Record (context / decision / consequences) |
19
+ | `react-performance` | Implementer checklist: bundle, RSC/client, memo, waterfalls, CWV (not a perf audit agent) |
20
+
21
+ Skills are copied to `.mavis/skills/` by `ai-rules init mavis --preset next`.
@@ -0,0 +1,39 @@
1
+ # CI Investigation
2
+
3
+ ## Workflow
4
+
5
+ 1. Identify the **first failing check** (lint, type-check, unit, e2e, build).
6
+ 2. Capture error output — ignore cascading failures until root cause is found.
7
+ 3. Reproduce locally with the same commands CI uses from `app/`:
8
+ - `lint:js`, `lint:css`, `type-check`
9
+ - targeted unit test file or suite
10
+ - affected Playwright spec if e2e failed
11
+ 4. Inspect git diff for changed files related to the failure.
12
+ 5. Apply **minimal fix** — no unrelated refactors.
13
+
14
+ ## Artifact
15
+
16
+ Write `ci-report.md` under the task slug folder:
17
+
18
+ - Failed check name and link/log excerpt
19
+ - Root cause classification
20
+ - Fix applied (or handoff to feature-developer)
21
+ - Validation commands and results
22
+
23
+
24
+ ## MCP usage
25
+
26
+ Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
27
+
28
+ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error, event, or trace, use it. Do not invent telemetry.
29
+
30
+
31
+ ## Handoff Rules
32
+
33
+ - Config-only or one-line fixes → fix in place, re-run check.
34
+ - Missing tests or architecture work → document and route to `feature-developer` or `qa-tester`.
35
+ - Flaky e2e → prefer `playwright-test-healer` after ci-investigator identifies the spec.
36
+
37
+ ## Validation
38
+
39
+ Always re-run the failing command locally before marking complete. If environment blocks execution, state the exact command and blocker.
@@ -0,0 +1,39 @@
1
+ # Code Review
2
+
3
+ ## Inputs
4
+
5
+ Use the local repository as the source of truth: `git status`, `git diff`, task artifacts under `.mavis/team/tasks/<slug>/` when present, and opened files. Do not invent hosting metadata such as labels, CI status, or reviewers.
6
+
7
+ ## Review Order
8
+
9
+ 1. Understand the intent and affected layers.
10
+ 2. Check correctness and regressions first.
11
+ 3. Verify architecture boundaries: UI does not know DTO/transport, store does not depend on UI, API services do not pull UI/store.
12
+ 4. Check public imports through `@/types` and `@/api`, plus barrel updates for new public symbols.
13
+ 5. Review UI consistency, styling conventions, and prop shape.
14
+ 6. Check tests: unit for mapper/domain logic, behavior tests for HTTP client changes, e2e plan/spec updates for user flows.
15
+ 7. **Reuse lens:** flag new helpers that duplicate existing utilities; prefer adjacent shared modules over copy-paste.
16
+ 8. **Efficiency lens:** unnecessary work, sequential ops that should be parallel, hot-path bloat, no-op store updates, overly broad reads.
17
+ 9. Report validation gaps: lint, stylelint, type-check, or relevant tests not run.
18
+
19
+ ## Output
20
+
21
+ Lead with findings ordered by severity. Required shape (also in `code-review-mr`):
22
+
23
+ - Each finding: **`path:line`** — problem — impact — concrete fix direction.
24
+ - Severity: **`blocker` | `important` | `nit`** (list blocker → nit).
25
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding context.
26
+ - End with a verdict line: **`Safe to merge | needs changes | reject`**.
27
+ - If there are no findings, say so and call out remaining test or validation risk.
28
+
29
+ For agent team tasks, write `.mavis/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
30
+
31
+ ## Receiving review feedback
32
+
33
+ <!-- shared-core: review/receiving-code-review.md -->
34
+
35
+ When **implementing** review comments (not when issuing them): verify each item against the codebase before changing code; do not perform agreement (`You're absolutely right!`). Unclear items → ask, do not guess.
36
+
37
+ ## Design guidance
38
+
39
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -0,0 +1,26 @@
1
+ <!-- shared-core: quality/debug-investigation.md -->
2
+
3
+ # Debug investigation
4
+
5
+ Stack-agnostic root-cause loop. Consumed by skill `debug-investigation` and agent `debugger`. Platform paths, MCP, and stack commands belong in adapter **Stack notes**.
6
+
7
+ ## When
8
+
9
+ Any bug, test failure, build failure, or unexpected behavior — **before** proposing a fix.
10
+
11
+ ## Phases (in order)
12
+
13
+ 1. **Evidence** — reproduce, or collect the closest evidence (error output, failing test, logs, user steps).
14
+ 2. **Isolate** — expected vs actual in one sentence; smallest relevant slice of the codebase.
15
+ 3. **Root cause** — name the cause before editing. One hypothesis at a time; do not stack speculative fixes.
16
+ 4. **Minimal fix + verify** — smallest change that preserves architecture and public contracts. Add a regression test when the behavior is user-facing or likely to recur. Re-run the **failing** check first, then the relevant lint/type/test slice.
17
+
18
+ ## 3-fix architecture gate
19
+
20
+ If **three** fix attempts fail, or the same symptom returns after two supposed fixes: **STOP**. Do not attempt fix #4. Escalate — the design is likely wrong (human partner or `solution-architect`). Chasing symptoms is the failure mode.
21
+
22
+ ## Do not
23
+
24
+ - Broad refactor during a bugfix.
25
+ - Fix only where the error surfaces if invalid data originates elsewhere.
26
+ - Claim `fixApplied: true` without re-running the failing check (see `quality/verification-before-completion.md`).
@@ -0,0 +1,34 @@
1
+ # Feature Delivery
2
+
3
+ 1. Read task brief, acceptance criteria, and decomposition if present.
4
+ 2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss — do not invent behavior). If generation was requested but not yet approved, stop for human gate — do not implement against draft-only gaps.
5
+ 3. Read **`feature-delivery-workflow.md`** and **`reference-features.md`** — follow layer order and mirror closest reference feature.
6
+ 4. Add or update focused tests for changed behavior.
7
+ 5. Validation from `app/`: **invoke** **`post-change-lint.md`** after code edits (requestable, not always-on — but **must** when code changed). Pipeline: scoped lint OK if next step is `build-verifier`.
8
+
9
+ - If the prompt or brief contains a `figma.com` URL, load requestable skill `mockup-review` and do not start UI work until the mockup-reviewer step is completed or the user continued past FAIL/`BLOCKED_MCP`.
10
+ - When required-signal (user asked UX, AC require flows/states, or spec-gen page/feature) and **no** `figma.com` URL: `ux-design.md` must exist on the analysis manifest entry (verdict not `INCOMPLETE`) before UI work. If missing, **blocked** — hand back to `task-analyst`. Parallel to the mockup gate when Figma exists.
11
+
12
+ ## Scope discipline
13
+
14
+ Implement only the current AC / decomposition task. Clarify ambiguity before coding; do not add unrelated hardening, polish, or refactors. See `feature-developer` → **Zero improvisation**.
15
+
16
+ ## Handoff
17
+
18
+ Summarize by layer, validation results, and known gaps. Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
19
+
20
+
21
+ ## MCP usage
22
+
23
+ Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
24
+
25
+ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools MCP for live-app debug and performance (app must be running). Storybook MCP if present and the work is component docs/stories.
26
+
27
+
28
+ ## Design guidance
29
+
30
+ - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
31
+
32
+ ## Anti-hallucination
33
+
34
+ - When editing app TS/TSX, load `react-next-anti-hallucination` (phantom Next/React/RTK imports).
@@ -0,0 +1,24 @@
1
+ # Mockup review
2
+
3
+ Requestable procedure for agent `mockup-reviewer`. Checklist lives in rule `mockup-review` — do not duplicate it here.
4
+
5
+ ## When to run
6
+
7
+ - Standalone `/task` intent `mockup-review` (report-only; profile `light`; steps only `mockup-reviewer`).
8
+ - Embedded: `feature` / `refactor` / `spike` / `spec-gen` whose prompt or `brief.md` contains a `figma.com` URL on a UI stack — after `task-analyst` (when present), before architect and developer.
9
+
10
+ ## MCP OAuth preflight
11
+
12
+ Confirm Figma MCP is configured (see `MCP.md`). Do not ship secrets. If MCP is down or auth fails, write `mockup-review.md` with verdict `BLOCKED_MCP` and receipt `blocked`. Do not invent DS claims. Embedded skip-forward is `/task-continue` (explicit «proceed without MCP»).
13
+
14
+ ## Plugin skills
15
+
16
+ If plugin skills `figma-design-to-code` / `figma-use` are installed, load them for MCP invocation recipes; do not paste their bodies; do not run design-to-code. Preset owns the checklist, agent, and routing; plugin owns MCP recipes.
17
+
18
+ ## Load the checklist
19
+
20
+ Load requestable rule `mockup-review` and follow its review dimensions, node caps, and report headings.
21
+
22
+ ## Output
23
+
24
+ Write `.mavis/team/tasks/<slug>/mockup-review.md` and upsert manifest entry id `mockup-review` (producer `mockup-reviewer`). Receipt mapping is in the agent prompt.
@@ -0,0 +1,28 @@
1
+ # Playwright E2E
2
+
3
+ ## Project Layout
4
+
5
+ - Test root: `app/__tests__/e2e`.
6
+ - Mirror formula: `app/src/<rel>` → `app/__tests__/e2e/<rel>` (drop `app/src`, preserve the relative path).
7
+ - Place artifacts at the deepest mirrored folder of the source under test; page-wide scenarios use the page folder.
8
+ - Test plans: `*.cases.md` files in the mirrored folder.
9
+ - Executable specs: `*.spec.ts` files in the same folder.
10
+ - Seed/setup reference: `app/__tests__/e2e/seed.spec.ts`. Root exceptions: `_shared/`, `smoke.spec.ts`, and `seed.spec.ts`.
11
+
12
+ Do not introduce top-level `specs/`, `tests/`, or feature-named folders for real coverage unless the user explicitly asks for a sandbox.
13
+
14
+ ## Planner
15
+
16
+ Create or update the relevant `*.cases.md` file. Each scenario should include title, preconditions, steps, and expected result. Cover happy path, important edge cases, validation, and error states.
17
+
18
+ ## Generator
19
+
20
+ Generate specs from `*.cases.md` into the same folder. Reuse existing page objects and `_shared/` helpers. Keep test names aligned with scenario names.
21
+
22
+ ## Healer
23
+
24
+ Fix selectors, waits, setup, or page-object details without weakening business assertions. Use the matching `*.cases.md` file as the behavior contract.
25
+
26
+ ## Validation
27
+
28
+ Run the affected spec when feasible. If the environment blocks execution, report the command that should be run and the blocker.
@@ -0,0 +1,39 @@
1
+ # React performance (next)
2
+
3
+ On-demand checklist for **implementers** shipping Next.js UI. For a formal diff audit report, use the **`performance-auditor`** agent instead — this skill does not replace it.
4
+
5
+ ## Bundle
6
+
7
+ - Prefer route-level and component-level code splitting for heavy UI (charts, editors).
8
+ - Avoid importing large libraries into shared layouts; keep client entry points small.
9
+ - Check that barrel files do not re-export heavy modules into every consumer.
10
+
11
+ ## RSC / client boundaries
12
+
13
+ - Default to Server Components; add `"use client"` only when hooks, browser APIs, or interactivity require it.
14
+ - Keep client leaves small; pass serializable props from server parents.
15
+ - Do not pull server-only modules (secrets, Node APIs) into client components.
16
+
17
+ ## Memoization discipline
18
+
19
+ - Do **not** add `useMemo` / `useCallback` by default — follow the repo’s React Compiler / team guidance.
20
+ - Memoize when profiling shows unstable props causing expensive subtree re-renders, or when an existing pattern already does.
21
+ - Prefer fixing state placement and list keys over blanket memo wrappers.
22
+
23
+ ## Data-fetch waterfalls
24
+
25
+ - Avoid sequential awaits that could be parallel (`Promise.all`) when independent.
26
+ - Lift shared fetches to a layout/parent when multiple children need the same data.
27
+ - Prefer store/thunk or server fetch patterns already used in the feature’s reference slice — do not invent a second data layer.
28
+
29
+ ## Core Web Vitals (quick)
30
+
31
+ | Metric | Implementer checks |
32
+ |--------|--------------------|
33
+ | LCP | Hero/media not blocked by unnecessary client JS; sensible image sizing |
34
+ | INP | Click handlers lean; avoid long sync work on the main thread |
35
+ | CLS | Reserve space for images/skeleton; stable fonts |
36
+
37
+ ## Handoff
38
+
39
+ If the user asks for a **performance audit report** of a diff/deliverable, route to **`performance-auditor`** (readonly `perf-report.md`), not this skill alone.
@@ -0,0 +1,21 @@
1
+ # Spec authoring
2
+
3
+ Requestable — not always-on. Load **`product-specs`** + **`product-specs-authoring`** first.
4
+
5
+ ## Steps
6
+
7
+ 1. **Resolve mode** — Generate (tree exists) vs Bootstrap (create INDEX + templates + first spec). Refuse inventing INDEX without explicit intent/AC/`/spec-start`.
8
+ 2. **Ensure templates** — if consumer `docs/specs/_templates/` missing, copy from package SoT `presets/_shared/assets/docs-specs/_templates/` (or seeded init assets).
9
+ 3. **Fill frontmatter v1** — all array keys present (may be `[]`); prefer `type: feature` on backend/MCP; default `status: draft`.
10
+ 4. **Fill required body headings** — page: Overview, Entry/actors, Primary flows, States, Acceptance criteria; feature: Overview, Shared behavior/constraints, Related pages. Use `N/A` explicitly when needed.
11
+ 5. **Update INDEX** in the **same change set** (columns: id, type, domain, title, path, optional routes/aliases/status).
12
+ 6. **Self-check** against `product-specs-authoring` checklist; put blockers in `open_questions`.
13
+ 7. **Handoff** — list created/updated paths + INDEX diff for human gate (`after:task-analyst`). Approve before feature-developer.
14
+
15
+ ## Sources
16
+
17
+ Cite AC / user / Figma / labeled code inference. Do not invent product behavior.
18
+
19
+ ## mcp-ts
20
+
21
+ Analyst-only path (no tech-writer). `routes` = tool names; `ui`/`store` = `[]`.
@@ -0,0 +1,53 @@
1
+ # Spec discovery
2
+
3
+ Requestable — **not** always-on. Load **only** in **task-analyst author mode** when the user or AC asks research-before-spec (including `/spec-start` with that intent). Never default consume `/task`. Not a pipeline step.
4
+
5
+ Load **`product-specs`** (and **`product-specs-authoring`** after this skill if authoring follows). Do **not** invent product behavior. Do **not** create a second spec-file tree.
6
+
7
+ ## Load policy
8
+
9
+ 1. Pick a **subset** of methods that fit the task — not all 11 every time.
10
+ 2. **`claim-ledger` is mandatory** whenever this skill runs.
11
+ 3. Write chronological notes to `.mavis/team/tasks/<slug>/.memlog.md` (append-only). Do **not** mutate `status.json` / `metrics.json`.
12
+ 4. Discovery output lives in memlog + `brief.md` sections. Then hand off to skill **`spec-authoring`** (or stop if `specMode: none`).
13
+
14
+ Backend / MCP stacks: skip UI-only examples; prefer `analog-scan`, `code-archaeology`, `problem-define`, `assumption-audit`, `claim-ledger`.
15
+
16
+ ## Methods
17
+
18
+ | Method | Produces | Skip when |
19
+ |--------|----------|-----------|
20
+ | **intake-capture** | Raw idea, origin, first unknowns → memlog + brief Research inputs | User prompt + AC already complete |
21
+ | **index-locator** | Related INDEX rows + linked spec paths + gaps | `specMode: none` or INDEX absent without consume intent |
22
+ | **code-archaeology** | Observed behavior labeled `inferred`/`draft` with path citations | Greenfield with no relevant code |
23
+ | **research-pack-scan** | Claims from `team/tasks/<slug>/research/**` or user-supplied paths | No research paths cited |
24
+ | **evidence-against** | Reasons the idea may fail | Internal spike with no product/external risk |
25
+ | **problem-define** | Who hurts, goals, non-goals, cost of inaction → brief | Brief Goal + Out of scope already exhaustive |
26
+ | **concept-shape** | 2–3 approach options + appetite (small/medium/large); no API design | `architecture.md` exists or one obvious path |
27
+ | **working-backwards-check** | Headline + 5 customer objections + verdict `forged` / `needs-heat` / `cracked` | Consume mode with approved specs |
28
+ | **assumption-audit** | Assumption register → brief Assumptions + `open_questions` | Never skip in author mode (keep lightweight) |
29
+ | **analog-scan** | 2–3 repo analogs via `reference-features` / code search | No plausible analog |
30
+ | **claim-ledger** | Markdown table `source → claim` for every product-behavior claim | **Never skip** when this skill is loaded |
31
+
32
+ ## Claim ledger (required)
33
+
34
+ Block spec authoring until every product-behavior claim has a source:
35
+
36
+ ```markdown
37
+ | Source | Claim |
38
+ |--------|-------|
39
+ | brief AC-3 | Checkout shows empty cart copy |
40
+ | code-archaeology inferred | Empty state uses an illustration |
41
+ ```
42
+
43
+ Sources: AC / user / UI copy / labeled code inference / research path. Unsourced claims → `open_questions`.
44
+
45
+ ## Memlog
46
+
47
+ Path: `.mavis/team/tasks/<slug>/.memlog.md`. Chronological `## YYYY-MM-DD` headings. Optional tags: `decision`, `assumption`, `override`, `event`, `claim`.
48
+
49
+ ## Forbidden
50
+
51
+ - 108-technique catalogs, HTML composers, party-mode, five `assess.*` slash commands, Python memlog runtime.
52
+ - Dummy INDEX rows when `specMode: none`.
53
+ - Dumping the whole `docs/specs/**` tree — locator is INDEX → linked page + optional `feature.md`.
@@ -0,0 +1,49 @@
1
+ # Technical Retro
2
+
3
+ ## Inputs
4
+
5
+ Ask for missing period, focus, task slug, participants, or format constraints. If a slug is provided, read `.mavis/team/tasks/<slug>/` artifacts and local git status/diff. Do not invent facts not present in artifacts or the user's message.
6
+
7
+ ## Facilitation Principles
8
+
9
+ - Focus on process and system behavior, not blame.
10
+ - Separate facts, interpretations, and proposed actions.
11
+ - Balance what worked with what slowed delivery.
12
+ - Keep action items concrete, owned, and measurable.
13
+
14
+ ## Default Structure
15
+
16
+ 1. Goal and scope.
17
+ 2. Timeline or factual observations.
18
+ 3. What worked.
19
+ 4. What hurt quality, speed, or confidence.
20
+ 5. Root causes for the top one or two issues.
21
+ 6. Experiments and action items.
22
+
23
+ ## Agent Team Block
24
+
25
+ For `/task` pipelines, include router, analyst, developer, **build-verifier**, reviewer, QA/e2e, hooks, and rules.
26
+
27
+ ## Wrong-turn taxonomy (optional)
28
+
29
+ When artifacts or the user mention agent mistakes, tag incidents:
30
+
31
+ | Kind | Signal |
32
+ |------|--------|
33
+ | `correction` | User pushback («no», «don't», «actually») |
34
+ | `retry` | Same tool/approach 2+ times before success |
35
+ | `waste` | Many searches before the right file |
36
+ | `reversal` | Edit then revert / delete |
37
+ | `dead-end` | Env/tool failure (missing binary, wrong path) |
38
+
39
+ Severity: **high** (explicit correction / large waste) · **med** · **low**. Confidence 0–100 — be honest; low-confidence items are optional.
40
+
41
+ ## Preset feedback loop
42
+
43
+ If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section **Preset updates**:
44
+
45
+ - Proposed change to `.mavis/rules/`, `.mavis/agents/`, `.mavis/skills/`, or **`.mavis/team/conventions.md`** (prefer conventions for project gotchas)
46
+ - One concrete snippet or file path
47
+ - Whether it belongs in always-on vs globs vs skill vs conventions (see `PRESET-CONTRIBUTION` → Building blocks)
48
+
49
+ Do not apply preset or conventions changes without user approval.
@@ -0,0 +1,29 @@
1
+ # Unit Testing
2
+
3
+ ## Project Layout
4
+
5
+ - Test root: `app/__tests__/unit`.
6
+ - Mirror formula: `app/src/<rel>` → `app/__tests__/unit/<rel>` (drop `app/src`, preserve the relative path).
7
+ - Place specs at the deepest mirrored folder of the module under test; do not colocate tests under `app/src/**`.
8
+ - Legacy `*.test.ts` / `*.test.tsx` — do not rename without a separate task.
9
+ - Runner: Jest or Vitest as configured in the target repo; components use `@testing-library/react`.
10
+
11
+ Follow **`tests-unit.md`** (Cursor) or **`rules/testing/tests-unit.md`** (Claude).
12
+
13
+ ## Planner
14
+
15
+ Write or update `.mavis/team/tasks/<slug>/unit-test-plan.md` (or `.claude/team/...`).
16
+
17
+ Each scenario needs a Russian `it()` title (capital letter after each sentence). Cover mappers, thunks, client behavior branches, and component interactions per AC. Record the mirrored target path under `app/__tests__/unit/`.
18
+
19
+ ## Generator
20
+
21
+ Implement specs from `unit-test-plan.md` under the mirrored `app/__tests__/unit/` path. Import the source under test through the `@/` alias. Reuse project test-store, HTTP mocks, and existing test utilities. Do not change production code.
22
+
23
+ ## Healer
24
+
25
+ Fix mocks, async timing, selectors, and setup — preserve business assertions. Use `unit-test-plan.md` and `brief.md` as the behavior contract.
26
+
27
+ ## Validation
28
+
29
+ Run affected unit tests from `app/` when feasible. Report command, pass/fail, and remaining gaps vs plan.
@@ -0,0 +1,31 @@
1
+ # UX design
2
+
3
+ Requestable procedure for **task-analyst** (not a pipeline agent). Checklist lives in rule `ux-design` — do not duplicate it here.
4
+
5
+ **Not** a Figma workflow: do not call Figma MCP; do not write `DESIGN.md`. Visual/DS/viewport audit stays with `mockup-reviewer` / skill `mockup-review`.
6
+
7
+ ## When to run
8
+
9
+ - Standalone `/task` intent `ux-design` (report-only; profile `light`; steps only `task-analyst`; modes `synthesize` | `review`; `humanGates: []`).
10
+ - Embedded: `feature` / `refactor` / `spike` / `spec-gen` on a UI stack when required-signal or advisory UI AC fires — inside the analyst step (no new pipeline agent). Required-signal: user asked UX, or AC require flows/states, or spec-gen page/feature.
11
+
12
+ ## Modes
13
+
14
+ - `synthesize` — elicit IA, named primary flows, empty/error/loading matrix from the brief/AC.
15
+ - `review` — critique a brief/wireframe/description **without** Figma. A `figma.com` URL with review-not-implement language is intent `mockup-review`, not this skill.
16
+
17
+ ## Order
18
+
19
+ UX synthesis **before** skill `spec-authoring` / author mode when both apply. Analyst remains the only INDEX writer. Map headings via the rule's Spec feed table; do not paste the whole UX file into `docs/specs`.
20
+
21
+ ## Forbidden Figma MCP
22
+
23
+ Do not call `get_metadata`, `get_design_context`, `get_screenshot`, `search_design_system`, `get_variable_defs`, `use_figma`, `create_new_file`, `generate_*`. Only `mockup-reviewer` reads Figma.
24
+
25
+ ## Load the checklist
26
+
27
+ Load requestable rule `ux-design` and follow its required-signal vs advisory rules, forbidden MCP list, verdicts, surface-closure, and report headings.
28
+
29
+ ## Output
30
+
31
+ Write `.mavis/team/tasks/<slug>/ux-design.md` and append that path to the **`analysis`** manifest entry (`authoritativePaths` / `evidencePaths`). Do **not** create a new producer row. Receipt stays on `analysis`: required `INCOMPLETE` (missing primary flows or empty/error/loading matrix) → DoR not met; advisory `INCOMPLETE` → notes only. Never copy the mockup FAIL-only hook.
@@ -0,0 +1,36 @@
1
+ # Write ADR
2
+
3
+ On-demand skill for durable architecture decisions. Stack-agnostic sections — fill with project-specific paths and links.
4
+
5
+ ## When to use
6
+
7
+ - Choosing between non-trivial alternatives (storage, layering, library, API shape).
8
+ - Recording a decision that future agents/humans should not silently reverse.
9
+ - User asks for an ADR, decision log, or “why did we pick X”.
10
+
11
+ ## Template
12
+
13
+ Create (or append) a short markdown ADR in the repo’s agreed location (e.g. `docs/adr/`, `.mavis/team/`, wiki). Suggested filename: `NNNN-short-title.md`.
14
+
15
+ ```markdown
16
+ # ADR NNNN: <Title>
17
+
18
+ ## Context
19
+ What problem / constraint / force requires a decision?
20
+
21
+ ## Decision
22
+ What we chose (one clear option). Include rejected alternatives briefly if useful.
23
+
24
+ ## Consequences
25
+ Positive and negative outcomes; follow-up work; what becomes harder.
26
+
27
+ ## Links
28
+ Related PRs, issues, rules, prior ADRs, diagrams.
29
+ ```
30
+
31
+ ## Guidelines
32
+
33
+ - Prefer one decision per ADR.
34
+ - Keep Context factual; Decision imperative and short.
35
+ - Link living gotchas to `team/conventions.md` when the decision becomes a recurring local pattern.
36
+ - Do not put ADR bodies only in root `AGENTS.md` (overwrite on init).