@bonesofspring/ai-rules 0.2.51 → 0.2.52

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 (275) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/bin/cli.js +14 -1
  3. package/bin/lib/ai-local-drift.js +55 -14
  4. package/bin/lib/seed-ai-local-team.js +18 -7
  5. package/bin/mavis-install.js +2 -0
  6. package/bin/opencode-install.js +2 -0
  7. package/docs/LOCAL-OVERLAY.md +1 -1
  8. package/docs/PRESET-CONTRIBUTION.md +11 -9
  9. package/package.json +5 -1
  10. package/presets/_shared/ai-local/scripts/manifest.mjs +13 -3
  11. package/presets/_shared/ai-local/scripts/rule-improver.mjs +428 -91
  12. package/presets/_shared/ai-local/scripts/run.mjs +22 -4
  13. package/presets/_shared/ai-local/scripts/signals.mjs +4 -1
  14. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  15. package/presets/_shared/core/quality/interactive-questions.md +8 -8
  16. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -0
  17. package/presets/claude/android-kotlin/rules/tooling-and-review/interactive-questions.md +8 -8
  18. package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +1 -1
  19. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  20. package/presets/claude/go/agents/code-reviewer.md +1 -0
  21. package/presets/claude/go/rules/tooling-and-review/interactive-questions.md +8 -8
  22. package/presets/claude/go/rules/tooling-and-review/language-policy.md +1 -1
  23. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  24. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -0
  25. package/presets/claude/ios-swift/rules/tooling-and-review/interactive-questions.md +8 -8
  26. package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +1 -1
  27. package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +1 -1
  28. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  29. package/presets/claude/java/agents/code-reviewer.md +1 -0
  30. package/presets/claude/java/rules/tooling-and-review/interactive-questions.md +8 -8
  31. package/presets/claude/java/rules/tooling-and-review/language-policy.md +1 -1
  32. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  33. package/presets/claude/mcp-ts/rules/tooling-and-review/interactive-questions.md +8 -8
  34. package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +1 -1
  35. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  36. package/presets/claude/next/MCP.md +7 -0
  37. package/presets/claude/next/README.md +1 -1
  38. package/presets/claude/next/REPO_AGENTS.md +1 -1
  39. package/presets/claude/next/agents/README.md +3 -3
  40. package/presets/claude/next/agents/build-verifier.md +9 -3
  41. package/presets/claude/next/agents/code-reviewer.md +2 -1
  42. package/presets/claude/next/agents/codebase-analyzer.md +1 -1
  43. package/presets/claude/next/agents/feature-developer.md +18 -8
  44. package/presets/claude/next/agents/openspec-author.md +1 -1
  45. package/presets/claude/next/agents/playwright-test-generator.md +22 -68
  46. package/presets/claude/next/agents/playwright-test-healer.md +27 -54
  47. package/presets/claude/next/agents/playwright-test-planner.md +18 -51
  48. package/presets/claude/next/agents/task-analyst.md +25 -9
  49. package/presets/claude/next/agents/task-router.md +1 -1
  50. package/presets/claude/next/agents/tech-writer.md +1 -1
  51. package/presets/claude/next/mcp.json +3 -3
  52. package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +1 -1
  53. package/presets/claude/next/rules/architecture/layer-barrel-exports.md +1 -1
  54. package/presets/claude/next/rules/architecture/reference-features.md +1 -1
  55. package/presets/claude/next/rules/stack/navigation-router-ui.md +1 -1
  56. package/presets/claude/next/rules/stack/navigation-router.md +14 -0
  57. package/presets/claude/next/rules/stack/next-app-core.md +19 -17
  58. package/presets/claude/next/rules/stack/next-app-router.md +5 -17
  59. package/presets/claude/next/rules/stack/next-static-export.md +1 -1
  60. package/presets/claude/next/rules/tooling-and-review/interactive-questions.md +8 -8
  61. package/presets/claude/next/rules/tooling-and-review/language-policy.md +1 -1
  62. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +1 -1
  63. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  64. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -1
  65. package/presets/claude/next/rules/tooling-and-review/security-next.md +28 -3
  66. package/presets/claude/next/rules/ui-and-accessibility/css-property-order.md +1 -1
  67. package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +4 -4
  68. package/presets/claude/next/rules/ui-and-accessibility/forms-validation.md +2 -2
  69. package/presets/claude/next/team/README.md +11 -0
  70. package/presets/claude/next/team/fixtures/feature-with-figma-url.json +10 -0
  71. package/presets/claude/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
  72. package/presets/claude/next/team/fixtures/mockup-review-standalone.json +9 -0
  73. package/presets/claude/next/team/fixtures/ux-design-standalone.json +9 -0
  74. package/presets/claude/nuxt/agents/code-reviewer.md +1 -0
  75. package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +1 -1
  76. package/presets/claude/nuxt/rules/stack/navigation-router-ui.md +1 -1
  77. package/presets/claude/nuxt/rules/tooling-and-review/interactive-questions.md +8 -8
  78. package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +1 -1
  79. package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +1 -1
  80. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  81. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -0
  82. package/presets/claude/php-hexagonal/rules/tooling-and-review/interactive-questions.md +8 -8
  83. package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +1 -1
  84. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  85. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -0
  86. package/presets/claude/php-laravel/rules/tooling-and-review/interactive-questions.md +8 -8
  87. package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +1 -1
  88. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  89. package/presets/claude/svelte/agents/code-reviewer.md +1 -0
  90. package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +1 -1
  91. package/presets/claude/svelte/rules/tooling-and-review/interactive-questions.md +8 -8
  92. package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +1 -1
  93. package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +1 -1
  94. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +1 -1
  95. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -0
  96. package/presets/cursor/android-kotlin/rules/README.md +1 -0
  97. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +3 -3
  98. package/presets/cursor/android-kotlin/rules/interactive-questions.mdc +8 -8
  99. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +1 -1
  100. package/presets/cursor/go/agents/code-reviewer.md +1 -0
  101. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -2
  102. package/presets/cursor/go/rules/interactive-questions.mdc +8 -8
  103. package/presets/cursor/go/rules/preset-pr-checklist.mdc +1 -1
  104. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -0
  105. package/presets/cursor/ios-swift/rules/README.md +1 -0
  106. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +3 -3
  107. package/presets/cursor/ios-swift/rules/interactive-questions.mdc +8 -8
  108. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +1 -1
  109. package/presets/cursor/java/agents/code-reviewer.md +1 -0
  110. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -2
  111. package/presets/cursor/java/rules/interactive-questions.mdc +8 -8
  112. package/presets/cursor/java/rules/preset-pr-checklist.mdc +1 -1
  113. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -2
  114. package/presets/cursor/mcp-ts/rules/interactive-questions.mdc +8 -8
  115. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +1 -1
  116. package/presets/cursor/next/MCP.md +7 -0
  117. package/presets/cursor/next/REPO_AGENTS.md +1 -1
  118. package/presets/cursor/next/agents/code-reviewer.md +1 -0
  119. package/presets/cursor/next/agents/playwright-test-healer.md +1 -0
  120. package/presets/cursor/next/ai-local/rules-library/router-pages.md +5 -5
  121. package/presets/cursor/next/mcp.json +3 -3
  122. package/presets/cursor/next/rules/README.md +1 -1
  123. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +1 -1
  124. package/presets/cursor/next/rules/css-property-order-stylelint.mdc +1 -1
  125. package/presets/cursor/next/rules/design-tokens-binding.mdc +4 -4
  126. package/presets/cursor/next/rules/forms-validation.mdc +2 -2
  127. package/presets/cursor/next/rules/interactive-questions.mdc +8 -8
  128. package/presets/cursor/next/rules/navigation-router-stack.mdc +14 -1
  129. package/presets/cursor/next/rules/next-app-core.mdc +19 -17
  130. package/presets/cursor/next/rules/next-app-router.mdc +5 -17
  131. package/presets/cursor/next/rules/next-static-export.mdc +1 -1
  132. package/presets/cursor/next/rules/preset-pr-checklist.mdc +1 -1
  133. package/presets/cursor/next/rules/preset-token-budget.mdc +1 -1
  134. package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +1 -1
  135. package/presets/cursor/next/rules/reference-features.mdc +1 -1
  136. package/presets/cursor/next/rules/security-next.mdc +28 -3
  137. package/presets/cursor/next/team/README.md +11 -0
  138. package/presets/cursor/next/team/fixtures/feature-with-figma-url.json +10 -0
  139. package/presets/cursor/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
  140. package/presets/cursor/next/team/fixtures/mockup-review-standalone.json +9 -0
  141. package/presets/cursor/next/team/fixtures/ux-design-standalone.json +9 -0
  142. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -0
  143. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +1 -1
  144. package/presets/cursor/nuxt/rules/interactive-questions.mdc +8 -8
  145. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +1 -1
  146. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -0
  147. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -2
  148. package/presets/cursor/php-hexagonal/rules/interactive-questions.mdc +8 -8
  149. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +1 -1
  150. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -0
  151. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -2
  152. package/presets/cursor/php-laravel/rules/interactive-questions.mdc +8 -8
  153. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +1 -1
  154. package/presets/cursor/svelte/agents/code-reviewer.md +1 -0
  155. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +1 -1
  156. package/presets/cursor/svelte/rules/interactive-questions.mdc +8 -8
  157. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +1 -1
  158. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  159. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -0
  160. package/presets/mavis/android-kotlin/rules/interactive-questions.md +8 -8
  161. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +1 -1
  162. package/presets/mavis/go/adapter-map.json +1 -1
  163. package/presets/mavis/go/agents/code-reviewer.md +1 -0
  164. package/presets/mavis/go/rules/interactive-questions.md +8 -8
  165. package/presets/mavis/go/rules/preset-pr-checklist.md +1 -1
  166. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  167. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -0
  168. package/presets/mavis/ios-swift/rules/interactive-questions.md +8 -8
  169. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +1 -1
  170. package/presets/mavis/java/adapter-map.json +1 -1
  171. package/presets/mavis/java/agents/code-reviewer.md +1 -0
  172. package/presets/mavis/java/rules/interactive-questions.md +8 -8
  173. package/presets/mavis/java/rules/preset-pr-checklist.md +1 -1
  174. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  175. package/presets/mavis/mcp-ts/rules/interactive-questions.md +8 -8
  176. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +1 -1
  177. package/presets/mavis/next/MCP.md +7 -0
  178. package/presets/mavis/next/REPO_AGENTS.md +1 -1
  179. package/presets/mavis/next/adapter-map.json +1 -1
  180. package/presets/mavis/next/agents/code-reviewer.md +1 -0
  181. package/presets/mavis/next/agents/playwright-test-healer.md +1 -0
  182. package/presets/mavis/next/ai-local/rules-library/router-pages.md +5 -5
  183. package/presets/mavis/next/mcp.json +3 -3
  184. package/presets/mavis/next/rules/css-property-order-stylelint.md +1 -1
  185. package/presets/mavis/next/rules/design-tokens-binding.md +4 -4
  186. package/presets/mavis/next/rules/forms-validation.md +2 -2
  187. package/presets/mavis/next/rules/interactive-questions.md +8 -8
  188. package/presets/mavis/next/rules/navigation-router-stack.md +12 -0
  189. package/presets/mavis/next/rules/next-app-core.md +18 -17
  190. package/presets/mavis/next/rules/next-app-router.md +4 -17
  191. package/presets/mavis/next/rules/next-static-export.md +1 -1
  192. package/presets/mavis/next/rules/preset-pr-checklist.md +1 -1
  193. package/presets/mavis/next/rules/react-next-anti-hallucination.md +1 -1
  194. package/presets/mavis/next/rules/reference-features.md +1 -1
  195. package/presets/mavis/next/rules/security-next.md +24 -3
  196. package/presets/mavis/next/team/README.md +11 -0
  197. package/presets/mavis/next/team/fixtures/feature-with-figma-url.json +10 -0
  198. package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
  199. package/presets/mavis/next/team/fixtures/mockup-review-standalone.json +9 -0
  200. package/presets/mavis/next/team/fixtures/ux-design-standalone.json +9 -0
  201. package/presets/mavis/nuxt/adapter-map.json +1 -1
  202. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -0
  203. package/presets/mavis/nuxt/rules/interactive-questions.md +8 -8
  204. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +1 -1
  205. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  206. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -0
  207. package/presets/mavis/php-hexagonal/rules/interactive-questions.md +8 -8
  208. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +1 -1
  209. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  210. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -0
  211. package/presets/mavis/php-laravel/rules/interactive-questions.md +8 -8
  212. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +1 -1
  213. package/presets/mavis/svelte/adapter-map.json +1 -1
  214. package/presets/mavis/svelte/agents/code-reviewer.md +1 -0
  215. package/presets/mavis/svelte/rules/interactive-questions.md +8 -8
  216. package/presets/mavis/svelte/rules/preset-pr-checklist.md +1 -1
  217. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  218. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -0
  219. package/presets/opencode/android-kotlin/rules/interactive-questions.md +8 -8
  220. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +1 -1
  221. package/presets/opencode/go/adapter-map.json +1 -1
  222. package/presets/opencode/go/agents/code-reviewer.md +1 -0
  223. package/presets/opencode/go/rules/interactive-questions.md +8 -8
  224. package/presets/opencode/go/rules/preset-pr-checklist.md +1 -1
  225. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  226. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -0
  227. package/presets/opencode/ios-swift/rules/interactive-questions.md +8 -8
  228. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +1 -1
  229. package/presets/opencode/java/adapter-map.json +1 -1
  230. package/presets/opencode/java/agents/code-reviewer.md +1 -0
  231. package/presets/opencode/java/rules/interactive-questions.md +8 -8
  232. package/presets/opencode/java/rules/preset-pr-checklist.md +1 -1
  233. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  234. package/presets/opencode/mcp-ts/rules/interactive-questions.md +8 -8
  235. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +1 -1
  236. package/presets/opencode/next/MCP.md +7 -0
  237. package/presets/opencode/next/REPO_AGENTS.md +1 -1
  238. package/presets/opencode/next/adapter-map.json +1 -1
  239. package/presets/opencode/next/agents/code-reviewer.md +1 -0
  240. package/presets/opencode/next/agents/playwright-test-healer.md +1 -0
  241. package/presets/opencode/next/ai-local/rules-library/router-pages.md +5 -5
  242. package/presets/opencode/next/opencode.json +3 -3
  243. package/presets/opencode/next/rules/css-property-order-stylelint.md +1 -1
  244. package/presets/opencode/next/rules/design-tokens-binding.md +4 -4
  245. package/presets/opencode/next/rules/forms-validation.md +2 -2
  246. package/presets/opencode/next/rules/interactive-questions.md +8 -8
  247. package/presets/opencode/next/rules/navigation-router-stack.md +12 -0
  248. package/presets/opencode/next/rules/next-app-core.md +18 -17
  249. package/presets/opencode/next/rules/next-app-router.md +4 -17
  250. package/presets/opencode/next/rules/next-static-export.md +1 -1
  251. package/presets/opencode/next/rules/preset-pr-checklist.md +1 -1
  252. package/presets/opencode/next/rules/react-next-anti-hallucination.md +1 -1
  253. package/presets/opencode/next/rules/reference-features.md +1 -1
  254. package/presets/opencode/next/rules/security-next.md +24 -3
  255. package/presets/opencode/next/team/README.md +11 -0
  256. package/presets/opencode/next/team/fixtures/feature-with-figma-url.json +10 -0
  257. package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +10 -0
  258. package/presets/opencode/next/team/fixtures/mockup-review-standalone.json +9 -0
  259. package/presets/opencode/next/team/fixtures/ux-design-standalone.json +9 -0
  260. package/presets/opencode/nuxt/adapter-map.json +1 -1
  261. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -0
  262. package/presets/opencode/nuxt/rules/interactive-questions.md +8 -8
  263. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +1 -1
  264. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  265. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -0
  266. package/presets/opencode/php-hexagonal/rules/interactive-questions.md +8 -8
  267. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +1 -1
  268. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  269. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -0
  270. package/presets/opencode/php-laravel/rules/interactive-questions.md +8 -8
  271. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +1 -1
  272. package/presets/opencode/svelte/adapter-map.json +1 -1
  273. package/presets/opencode/svelte/agents/code-reviewer.md +1 -0
  274. package/presets/opencode/svelte/rules/interactive-questions.md +8 -8
  275. package/presets/opencode/svelte/rules/preset-pr-checklist.md +1 -1
@@ -3,7 +3,7 @@ description: "Native-language dialogue policy: development/reasoning/artifacts s
3
3
  paths:
4
4
  - .ai.local/**/*
5
5
  - AGENTS.md
6
- - .cursor/**/*
6
+ - .claude/**/*
7
7
  ---
8
8
 
9
9
  <!-- shared-core: agent-team/language-policy.md -->
@@ -35,7 +35,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
35
35
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
36
36
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
37
37
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
38
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
38
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
39
39
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
40
40
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
41
41
 
@@ -81,6 +81,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
81
81
  ## Depth passes
82
82
  | Pass | Outcome | Evidence or reason |
83
83
  |------|---------|--------------------|
84
+ | Call-site sweep | `no finding` | what was searched or read |
84
85
 
85
86
  ## AC coverage
86
87
  | Criterion | Status | Notes |
@@ -45,7 +45,7 @@ The module is **not ready** until the checklist passes.
45
45
 
46
46
  ## How to find regulated layers in the repository
47
47
 
48
- 1. `architecture/public-imports.md` rules in `.cursor/rules/`.
48
+ 1. `architecture/public-imports.md` rules in `.claude/rules/`.
49
49
  2. ESLint `no-restricted-imports` — `@/<layer>/*` patterns with barrel exception.
50
50
  3. `architecture/architecture-boundaries.md`, project README.
51
51
 
@@ -7,7 +7,7 @@ paths: []
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -3,7 +3,7 @@ description: "Native-language dialogue policy: development/reasoning/artifacts s
3
3
  paths:
4
4
  - .ai.local/**/*
5
5
  - AGENTS.md
6
- - .cursor/**/*
6
+ - .claude/**/*
7
7
  ---
8
8
 
9
9
  <!-- shared-core: agent-team/language-policy.md -->
@@ -11,7 +11,7 @@ paths: []
11
11
 
12
12
  After **any** source change under `src/routes/**`, `src/lib/**`, `src/hooks.*.ts`, `src/params/**`, `tests/**` (Svelte/TS/JS, CSS, `<style>`).
13
13
 
14
- Exceptions: docs, CI configs, `.cursor/rules/**`, when application executable code did not change.
14
+ Exceptions: docs, CI configs, `.claude/rules/**`, when application executable code did not change.
15
15
 
16
16
  **Pipeline exception:** if the task goes through the agent team and the next step is `build-verifier`, the developer may limit lint/check to **changed files**; the full run is `build-verifier`’s duty. In single-agent mode (no pipeline) — always a full run.
17
17
 
@@ -35,7 +35,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
35
35
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
36
36
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
37
37
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
38
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
38
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
39
39
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
40
40
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
41
41
 
@@ -79,6 +79,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
79
79
  ## Depth passes
80
80
  | Pass | Outcome | Evidence or reason |
81
81
  |------|---------|--------------------|
82
+ | Call-site sweep | `no finding` | what was searched or read |
82
83
 
83
84
  ## AC coverage
84
85
  | Criterion | Status | Notes |
@@ -42,6 +42,7 @@ Flat Cursor SoT. Claude twins live under `presets/claude/android-kotlin/rules/<t
42
42
  | `mcp-usage.mdc` | requestable | Context7 + overlay MCP |
43
43
  | `anti-sycophancy-discipline.mdc` | requestable | VERIFY discipline |
44
44
  | `anti-hallucination-contract.mdc` | requestable | requestable contract; no globs |
45
+ | `interactive-questions.mdc` | requestable | Host question-widget format |
45
46
  | `code-review-mr.mdc` | requestable | MR checklist |
46
47
  | `agent-team-intake.mdc` | requestable | thin `/task` hint |
47
48
  | `agent-team-orchestrator.mdc` | requestable | Pipeline |
@@ -11,7 +11,7 @@ alwaysApply: false
11
11
 
12
12
  Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/`.
13
13
 
14
- Work request without `/task` — see **`agent-team-intake.mdc`**.
14
+ Work request without `/task` — see **`agent-team-intake.mdc`** (when to suggest the router instead of coding directly).
15
15
 
16
16
  <!-- shared-core: quality/anti-hallucination-load-line.md -->
17
17
 
@@ -101,7 +101,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
101
101
 
102
102
  ## Context budget & checkpoint/resume
103
103
 
104
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
104
+ Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. Mechanical waves (generation, embed sync) are delegated to repo scripts.
105
105
 
106
106
  ## status.json (pipeline mode)
107
107
 
@@ -167,7 +167,7 @@ Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent
167
167
 
168
168
  - Pure questions (“how does X work?”) — prefer **`codebase-analyzer`**; typo / one-file trivial fix; user “no pipeline”; single-line docs-only.
169
169
 
170
- Borderline — **`agent-team-intake.mdc`**.
170
+ Borderline work requests — see **`agent-team-intake.mdc`**.
171
171
 
172
172
  ## Preset authoring
173
173
 
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -36,7 +36,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
36
36
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
37
37
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
38
38
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
39
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
39
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
40
40
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
41
41
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
42
42
 
@@ -78,6 +78,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
78
78
  ## Depth passes
79
79
  | Pass | Outcome | Evidence or reason |
80
80
  |------|---------|--------------------|
81
+ | Call-site sweep | `no finding` | what was searched or read |
81
82
 
82
83
  ## AC coverage
83
84
  | Criterion | Status | Notes |
@@ -9,7 +9,7 @@ alwaysApply: false
9
9
 
10
10
  # Agent team orchestrator
11
11
 
12
- Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/` (Claude: `.ai.local/team/tasks/<slug>/`).
12
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/`.
13
13
 
14
14
  Work request without `/task` — see **agent-team-intake** (when to suggest the router instead of coding directly).
15
15
 
@@ -99,7 +99,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
99
99
 
100
100
  ## Context budget & checkpoint/resume
101
101
 
102
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
102
+ Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. Mechanical waves (generation, embed sync) are delegated to repo scripts.
103
103
 
104
104
  ## status.json (pipeline mode)
105
105
 
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -36,7 +36,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
36
36
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
37
37
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
38
38
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
39
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
39
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
40
40
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
41
41
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
42
42
 
@@ -79,6 +79,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
79
79
  ## Depth passes
80
80
  | Pass | Outcome | Evidence or reason |
81
81
  |------|---------|--------------------|
82
+ | Call-site sweep | `no finding` | what was searched or read |
82
83
 
83
84
  ## AC coverage
84
85
  | Criterion | Status | Notes |
@@ -22,6 +22,7 @@ Cursor Rule format:
22
22
  | `code-quality-and-refactoring.mdc` | **always** | Quality and light refactor |
23
23
  | `anti-sycophancy-discipline.mdc` | requestable | Full VERIFY/anti-sycophancy discipline (~17 rules) |
24
24
  | `anti-hallucination-contract.mdc` | requestable | requestable contract; no globs |
25
+ | `interactive-questions.mdc` | requestable | Host question-widget format |
25
26
  | `design-guidance.mdc` | requestable | Smells/GoF (Fowler≤12, GoF≤8) |
26
27
  | `mcp-usage.mdc` | requestable | Context7 + overlay MCP |
27
28
  | `xcode-tooling.mdc` | requestable | Schemes, xcodebuild, SwiftLint/Format |
@@ -11,7 +11,7 @@ alwaysApply: false
11
11
 
12
12
  Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/`.
13
13
 
14
- Work request without `/task` — see **`agent-team-intake.mdc`**.
14
+ Work request without `/task` — see **`agent-team-intake.mdc`** (when to suggest the router instead of coding directly).
15
15
 
16
16
  <!-- shared-core: quality/anti-hallucination-load-line.md -->
17
17
 
@@ -101,7 +101,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
101
101
 
102
102
  ## Context budget & checkpoint/resume
103
103
 
104
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
104
+ Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. Mechanical waves (generation, embed sync) are delegated to repo scripts.
105
105
 
106
106
  ## status.json (pipeline mode)
107
107
 
@@ -167,7 +167,7 @@ Honor optional `steps[i].model` (`cheap` \| `standard` \| `strong`); else agent
167
167
 
168
168
  - Pure questions (“how does X work?”) — prefer **`codebase-analyzer`**; typo / one-file trivial fix; user “no pipeline”; single-line docs-only.
169
169
 
170
- Borderline — **`agent-team-intake.mdc`**.
170
+ Borderline work requests — see **`agent-team-intake.mdc`**.
171
171
 
172
172
  ## Preset authoring
173
173
 
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -36,7 +36,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
36
36
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
37
37
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
38
38
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
39
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
39
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
40
40
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
41
41
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
42
42
 
@@ -78,6 +78,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
78
78
  ## Depth passes
79
79
  | Pass | Outcome | Evidence or reason |
80
80
  |------|---------|--------------------|
81
+ | Call-site sweep | `no finding` | what was searched or read |
81
82
 
82
83
  ## AC coverage
83
84
  | Criterion | Status | Notes |
@@ -9,7 +9,7 @@ alwaysApply: false
9
9
 
10
10
  # Agent team orchestrator
11
11
 
12
- Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/` (Claude: `.ai.local/team/tasks/<slug>/`).
12
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/`.
13
13
 
14
14
  Work request without `/task` — see **agent-team-intake** (when to suggest the router instead of coding directly).
15
15
 
@@ -99,7 +99,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
99
99
 
100
100
  ## Context budget & checkpoint/resume
101
101
 
102
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
102
+ Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. Mechanical waves (generation, embed sync) are delegated to repo scripts.
103
103
 
104
104
  ## status.json (pipeline mode)
105
105
 
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -36,7 +36,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
36
36
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
37
37
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
38
38
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
39
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
39
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
40
40
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
41
41
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
42
42
 
@@ -9,7 +9,7 @@ alwaysApply: false
9
9
 
10
10
  # Agent team orchestrator
11
11
 
12
- Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/` (Claude: `.ai.local/team/tasks/<slug>/`).
12
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.ai.local/team/tasks/<slug>/`.
13
13
 
14
14
  Work request without `/task` — see **agent-team-intake** (when to suggest the router instead of coding directly).
15
15
 
@@ -99,7 +99,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
99
99
 
100
100
  ## Context budget & checkpoint/resume
101
101
 
102
- Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. Mechanical waves (generation, embed sync) are delegated to repo scripts.
102
+ Work in bounded waves (one artifact class across the surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record produced paths on the `implementation` manifest entry `authoritativePaths`. A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. Mechanical waves (generation, embed sync) are delegated to repo scripts.
103
103
 
104
104
  ## status.json (pipeline mode)
105
105
 
@@ -7,7 +7,7 @@ alwaysApply: false
7
7
 
8
8
  # Interactive questions (requestable)
9
9
 
10
- How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool. The always-on quality rule keeps the short preference; this file carries the full contract.
11
11
 
12
12
  ## When to ask
13
13
 
@@ -17,16 +17,16 @@ How to put a user-only decision to the user. Load when the answer blocks the wor
17
17
 
18
18
  ## Widget format
19
19
 
20
- 4. **Header** → a short label (≤30 characters).
21
- 5. **Option label** → 1–5 words, in the user's terms.
20
+ 4. **Header** → a short label. Stay inside the host schema's length limit.
21
+ 5. **Option label** → a few words, in the user's terms, inside the host schema's label limit.
22
22
  6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
- 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
- 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
23
+ 7. **Option count** → the host schema's range. Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. A free-form entry the host adds itself does not count toward the range.
25
25
 
26
- ## The free-form answer is mandatory, the option is not
26
+ ## Free-form is a property of the host
27
27
 
28
- 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
- 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
28
+ 9. Use the host's free-form channel. When that channel already accepts typed text, do not add an option labeled "Other": a plain option returns its label, and the typed text belongs in the host's free-form field.
29
+ 10. A host with no free-form channel (an enum that returns only the selected label, a headless run) needs an explicit "Other" whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
30
 
31
31
  ## Fallback
32
32
 
@@ -36,7 +36,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
36
36
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
37
37
  - [ ] **Packaging:** every installable preset ships `REPO_AGENTS.md`; default `hooks.json` does not reference `hooks/examples/`; `_shared/assets/docs-specs/` ships `INDEX.md` + `_templates/{page,feature}.md`; `product-specs` / `product-specs-authoring` stay requestable
38
38
  - [ ] **UI-only surfaces:** `mockup-reviewer`, `accessibility-reviewer`, `ux-design`, and the stack performance skill ship only on UI stacks (`check-preset-leakage.sh`)
39
- - [ ] **Rule eval (soft):** `node packages/ai-rules/scripts/check-rule-eval.mjs` when rule bodies changed
39
+ - [ ] **Rule eval (hard):** `node packages/ai-rules/scripts/check-rule-eval.mjs` runs inside `yarn check:preset-structure`; keep every registered golden stem paired
40
40
  - [ ] **Anti-hallucination:** `check-anti-hallucination-coverage.mjs` is green inside `yarn check:preset-structure`. Every role loads `anti-hallucination-contract`. Writer roles, including `code-reviewer`, also load `STACK_FLOOR_STEMS`. Register a new skill family in `SKILL_CONTRACT_CLASS` (`writer` or `reader`) or the gate FAILs.
41
41
  - [ ] **Gate:** `yarn check:preset-structure` from `packages/ai-rules/` (twin-map, token-budget, leakage, drift, i18n, local overlay, anti-hallucination coverage)
42
42
 
@@ -14,6 +14,13 @@ Copied to `.cursor/mcp.json` on `ai-rules init cursor --preset next`.
14
14
  Do not put secrets in the file. Optional: `CONTEXT7_API_KEY` in the environment — higher Context7 rate limits. Figma — local desktop server (enable in Figma Desktop, Dev/Full seat).
15
15
 
16
16
 
17
+ ## Pin policy
18
+
19
+ - Pins live in `mcp.json` (Cursor, Claude) and in the generated `mcp` block of `opencode.json` — never in rule prose.
20
+ - Bump by reading the registry (`npm view <package> version`), editing `presets/cursor/next/mcp.json` and `presets/claude/next/mcp.json`, then running `yarn fix:generated` followed by `node scripts/test-cli-mcp-merge.mjs`, `node scripts/test-cli-init-clean.mjs`, and `node scripts/check-generated-drift.mjs`.
21
+ - Never write `@latest`. A package that fails to resolve, or that breaks the merge test, keeps its last working pin; record the exact command and the failure in the change that attempted the bump.
22
+ - A bumped pin changes the CLI goldens — recapture with `node scripts/capture-cli-golden.mjs <tool> next`; never edit a golden by hand.
23
+
17
24
  ## Agent usage
18
25
 
19
26
  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.
@@ -88,7 +88,7 @@ Gotchas, local patterns, and team decisions: **`.ai.local/conventions.md`** (fil
88
88
 
89
89
  ## Seed library (`.ai.local/rules-library/`)
90
90
 
91
- `init` copies `ai-local/rules/*.md` into `.ai.local/rules/` and does not overwrite an existing file. The next stack ships `task-levels` there, so L0–L3 selection is active on install. `init` also copies `router-pages` into `.ai.local/rules/` when `output: 'export'` and a Pages `_app` are both present; an existing `.ai.local/rules/router-pages.md` is left untouched and every other seed stays inactive. `init` seeds **staged-inactive** rule templates here (Cursor `.mdc` sources analog: `presets/cursor/next/ai-local/rules-library/**`). They are **not** active until moved into `.ai.local/rules/`. When a seed matches the task scope, apply it and tell the owner to move it. Typical seeds: `router-pages` (Pages Router override), `no-react-fc`, `component-child-decomposition`, `single-source-copy-constants`, `commit-hygiene`, `pre-pr-checklist`, `api-contract-source`, `agent-pipeline-gates`, `analytics-events`, `feature-flags-experiments`, `pwa-service-worker`, `qa-test-cases`, and the `storybook-*` set. (`forms-validation` is an active preset rule, not a seed. `task-levels` is an active overlay rule, not a seed.)
91
+ `init` copies `ai-local/rules/*.md` into `.ai.local/rules/` and does not overwrite an existing file. `init` and `update` also write `.ai.local/.template-base.json`, and a flagged drift run may write `.ai.local/.rollback/template-drift/**`. Neither write replaces an existing rule file. The next stack ships `task-levels` there, so L0–L3 selection is active on install. `init` also copies `router-pages` into `.ai.local/rules/` when `output: 'export'` and a Pages `_app` are both present; an existing `.ai.local/rules/router-pages.md` is left untouched and every other seed stays inactive. `init` seeds **staged-inactive** rule templates here (Cursor `.mdc` sources analog: `presets/cursor/next/ai-local/rules-library/**`). They are **not** active until moved into `.ai.local/rules/`. When a seed matches the task scope, apply it and tell the owner to move it. Typical seeds: `router-pages` (Pages Router override), `no-react-fc`, `component-child-decomposition`, `single-source-copy-constants`, `commit-hygiene`, `pre-pr-checklist`, `api-contract-source`, `agent-pipeline-gates`, `analytics-events`, `feature-flags-experiments`, `pwa-service-worker`, `qa-test-cases`, and the `storybook-*` set. (`forms-validation` is an active preset rule, not a seed. `task-levels` is an active overlay rule, not a seed.)
92
92
 
93
93
  ## Managed vs preserved
94
94
 
@@ -77,6 +77,7 @@ Findings carry `path:line`, severity, `confidence`, and a fix direction — rule
77
77
  ## Depth passes
78
78
  | Pass | Outcome | Evidence or reason |
79
79
  |------|---------|--------------------|
80
+ | Call-site sweep | `no finding` | what was searched or read |
80
81
 
81
82
  ## Figma parity (UI)
82
83
  - Scope: default | full — viewports compared: …
@@ -27,6 +27,7 @@ You debug and fix failing Playwright e2e tests.
27
27
  4. **Use `playwright` MCP** when available (or `user-playwright` if installed globally) to reproduce failures and verify fixes.
28
28
  5. Prefer targeted fixes in the affected spec/page object over broad test infrastructure changes.
29
29
  6. Re-run the affected spec when feasible.
30
+ 7. When a fix needs a product decision, ask through the host's interactive question tool (prose fallback) and load `interactive-questions`; never skip or weaken a business assertion.
30
31
 
31
32
 
32
33
  ## MCP usage