@bonesofspring/ai-rules 0.2.28 → 0.2.30

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 (282) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/docs/MAVIS-COMPATIBILITY.md +10 -6
  4. package/docs/MAVIS.md +15 -6
  5. package/docs/OPENCODE-COMPATIBILITY.md +2 -2
  6. package/docs/OPENCODE.md +1 -1
  7. package/package.json +5 -1
  8. package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
  9. package/presets/claude/android-kotlin/CLAUDE.md +3 -1
  10. package/presets/claude/android-kotlin/REPO_AGENTS.md +1 -1
  11. package/presets/claude/android-kotlin/hooks/README.md +6 -5
  12. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +18 -0
  13. package/presets/claude/android-kotlin/hooks/examples/README.md +2 -0
  14. package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +32 -9
  15. package/presets/claude/android-kotlin/rules/README.md +1 -1
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +0 -5
  17. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  18. package/presets/claude/android-kotlin/settings.json +23 -0
  19. package/presets/claude/go/CLAUDE.md +3 -1
  20. package/presets/claude/go/REPO_AGENTS.md +1 -1
  21. package/presets/claude/go/hooks/README.md +6 -5
  22. package/presets/claude/go/hooks/chain-team-phases.sh +18 -0
  23. package/presets/claude/go/hooks/examples/README.md +2 -0
  24. package/presets/claude/go/hooks/guard-shell-command.sh +32 -9
  25. package/presets/claude/go/rules/README.md +1 -1
  26. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +0 -5
  27. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  28. package/presets/claude/go/settings.json +23 -0
  29. package/presets/claude/ios-swift/CLAUDE.md +3 -1
  30. package/presets/claude/ios-swift/REPO_AGENTS.md +1 -1
  31. package/presets/claude/ios-swift/hooks/README.md +6 -5
  32. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +18 -0
  33. package/presets/claude/ios-swift/hooks/examples/README.md +2 -0
  34. package/presets/claude/ios-swift/hooks/guard-shell-command.sh +32 -9
  35. package/presets/claude/ios-swift/rules/README.md +1 -1
  36. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +0 -5
  37. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  38. package/presets/claude/ios-swift/settings.json +23 -0
  39. package/presets/claude/java/CLAUDE.md +3 -1
  40. package/presets/claude/java/REPO_AGENTS.md +1 -1
  41. package/presets/claude/java/hooks/README.md +6 -5
  42. package/presets/claude/java/hooks/chain-team-phases.sh +18 -0
  43. package/presets/claude/java/hooks/examples/README.md +2 -0
  44. package/presets/claude/java/hooks/guard-shell-command.sh +32 -9
  45. package/presets/claude/java/rules/README.md +1 -1
  46. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +0 -5
  47. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  48. package/presets/claude/java/settings.json +23 -0
  49. package/presets/claude/mcp-ts/CLAUDE.md +3 -1
  50. package/presets/claude/mcp-ts/REPO_AGENTS.md +1 -1
  51. package/presets/claude/mcp-ts/hooks/README.md +8 -3
  52. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +18 -0
  53. package/presets/claude/mcp-ts/hooks/examples/README.md +5 -0
  54. package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +32 -9
  55. package/presets/claude/mcp-ts/rules/README.md +1 -1
  56. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +0 -5
  57. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  58. package/presets/claude/mcp-ts/settings.json +23 -0
  59. package/presets/claude/next/CLAUDE.md +3 -1
  60. package/presets/claude/next/REPO_AGENTS.md +1 -1
  61. package/presets/claude/next/agents/code-reviewer.md +35 -0
  62. package/presets/claude/next/agents/feature-developer.md +12 -0
  63. package/presets/claude/next/agents/mockup-reviewer.md +27 -1
  64. package/presets/claude/next/hooks/README.md +10 -1
  65. package/presets/claude/next/hooks/chain-team-phases.sh +18 -0
  66. package/presets/claude/next/hooks/examples/README.md +2 -0
  67. package/presets/claude/next/hooks/guard-shell-command.sh +32 -9
  68. package/presets/claude/next/rules/README.md +3 -2
  69. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +17 -0
  70. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +0 -5
  71. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +10 -0
  72. package/presets/claude/next/rules/tooling-and-review/mockup-review.md +9 -0
  73. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  74. package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +42 -0
  75. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +1 -0
  76. package/presets/claude/next/settings.json +23 -0
  77. package/presets/claude/next/skills/code-review/SKILL.md +1 -0
  78. package/presets/claude/nuxt/CLAUDE.md +3 -1
  79. package/presets/claude/nuxt/REPO_AGENTS.md +1 -1
  80. package/presets/claude/nuxt/hooks/README.md +7 -4
  81. package/presets/claude/nuxt/hooks/chain-team-phases.sh +18 -0
  82. package/presets/claude/nuxt/hooks/examples/README.md +2 -0
  83. package/presets/claude/nuxt/hooks/guard-shell-command.sh +32 -9
  84. package/presets/claude/nuxt/rules/README.md +1 -1
  85. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +0 -5
  86. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  87. package/presets/claude/nuxt/settings.json +23 -0
  88. package/presets/claude/php-hexagonal/CLAUDE.md +3 -1
  89. package/presets/claude/php-hexagonal/REPO_AGENTS.md +1 -1
  90. package/presets/claude/php-hexagonal/hooks/README.md +6 -5
  91. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +18 -0
  92. package/presets/claude/php-hexagonal/hooks/examples/README.md +3 -1
  93. package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +32 -9
  94. package/presets/claude/php-hexagonal/rules/README.md +1 -1
  95. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +0 -5
  96. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  97. package/presets/claude/php-hexagonal/settings.json +23 -0
  98. package/presets/claude/php-laravel/CLAUDE.md +6 -0
  99. package/presets/claude/php-laravel/REPO_AGENTS.md +1 -1
  100. package/presets/claude/php-laravel/hooks/README.md +6 -5
  101. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +18 -0
  102. package/presets/claude/php-laravel/hooks/examples/README.md +3 -1
  103. package/presets/claude/php-laravel/hooks/guard-shell-command.sh +32 -9
  104. package/presets/claude/php-laravel/rules/README.md +1 -1
  105. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +0 -5
  106. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  107. package/presets/claude/php-laravel/settings.json +23 -0
  108. package/presets/claude/svelte/CLAUDE.md +3 -1
  109. package/presets/claude/svelte/REPO_AGENTS.md +1 -1
  110. package/presets/claude/svelte/hooks/README.md +7 -4
  111. package/presets/claude/svelte/hooks/chain-team-phases.sh +18 -0
  112. package/presets/claude/svelte/hooks/examples/README.md +2 -0
  113. package/presets/claude/svelte/hooks/guard-shell-command.sh +32 -9
  114. package/presets/claude/svelte/rules/README.md +1 -1
  115. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +0 -5
  116. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
  117. package/presets/claude/svelte/settings.json +23 -0
  118. package/presets/cursor/android-kotlin/REPO_AGENTS.md +1 -1
  119. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
  120. package/presets/cursor/go/REPO_AGENTS.md +1 -1
  121. package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
  122. package/presets/cursor/ios-swift/REPO_AGENTS.md +1 -1
  123. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
  124. package/presets/cursor/java/REPO_AGENTS.md +1 -1
  125. package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
  126. package/presets/cursor/mcp-ts/REPO_AGENTS.md +1 -1
  127. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
  128. package/presets/cursor/next/REPO_AGENTS.md +1 -1
  129. package/presets/cursor/next/agents/code-reviewer.md +35 -0
  130. package/presets/cursor/next/agents/feature-developer.md +22 -0
  131. package/presets/cursor/next/agents/mockup-reviewer.md +27 -1
  132. package/presets/cursor/next/rules/README.md +3 -1
  133. package/presets/cursor/next/rules/code-review-mr.mdc +10 -0
  134. package/presets/cursor/next/rules/design-tokens-binding.mdc +41 -0
  135. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +17 -0
  136. package/presets/cursor/next/rules/mockup-review.mdc +9 -0
  137. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
  138. package/presets/cursor/next/rules/react-ui.mdc +1 -0
  139. package/presets/cursor/next/skills/code-review/SKILL.md +1 -0
  140. package/presets/cursor/nuxt/REPO_AGENTS.md +1 -1
  141. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
  142. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +1 -1
  143. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
  144. package/presets/cursor/php-laravel/REPO_AGENTS.md +1 -1
  145. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
  146. package/presets/cursor/svelte/REPO_AGENTS.md +1 -1
  147. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
  148. package/presets/mavis/README.md +2 -0
  149. package/presets/mavis/android-kotlin/MAVIS.md +10 -1
  150. package/presets/mavis/android-kotlin/REPO_AGENTS.md +1 -1
  151. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  152. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
  153. package/presets/mavis/go/MAVIS.md +10 -1
  154. package/presets/mavis/go/REPO_AGENTS.md +1 -1
  155. package/presets/mavis/go/adapter-map.json +1 -1
  156. package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
  157. package/presets/mavis/ios-swift/MAVIS.md +10 -1
  158. package/presets/mavis/ios-swift/REPO_AGENTS.md +1 -1
  159. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  160. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
  161. package/presets/mavis/java/MAVIS.md +10 -1
  162. package/presets/mavis/java/REPO_AGENTS.md +1 -1
  163. package/presets/mavis/java/adapter-map.json +1 -1
  164. package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
  165. package/presets/mavis/mcp-ts/MAVIS.md +10 -1
  166. package/presets/mavis/mcp-ts/REPO_AGENTS.md +1 -1
  167. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  168. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
  169. package/presets/mavis/next/MAVIS.md +10 -1
  170. package/presets/mavis/next/REPO_AGENTS.md +1 -1
  171. package/presets/mavis/next/adapter-map.json +9 -1
  172. package/presets/mavis/next/agents/code-reviewer.md +35 -0
  173. package/presets/mavis/next/agents/feature-developer.md +22 -0
  174. package/presets/mavis/next/agents/mockup-reviewer.md +27 -1
  175. package/presets/mavis/next/rules/code-review-mr.md +10 -0
  176. package/presets/mavis/next/rules/design-tokens-binding.md +35 -0
  177. package/presets/mavis/next/rules/feature-delivery-workflow.md +17 -0
  178. package/presets/mavis/next/rules/mockup-review.md +9 -0
  179. package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
  180. package/presets/mavis/next/rules/react-ui.md +1 -0
  181. package/presets/mavis/next/skills/code-review/SKILL.md +1 -0
  182. package/presets/mavis/nuxt/MAVIS.md +10 -1
  183. package/presets/mavis/nuxt/REPO_AGENTS.md +1 -1
  184. package/presets/mavis/nuxt/adapter-map.json +1 -1
  185. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
  186. package/presets/mavis/php-hexagonal/MAVIS.md +10 -1
  187. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +1 -1
  188. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  189. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  190. package/presets/mavis/php-laravel/MAVIS.md +10 -1
  191. package/presets/mavis/php-laravel/REPO_AGENTS.md +1 -1
  192. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  193. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
  194. package/presets/mavis/platform-contract.json +4 -4
  195. package/presets/mavis/svelte/MAVIS.md +10 -1
  196. package/presets/mavis/svelte/REPO_AGENTS.md +1 -1
  197. package/presets/mavis/svelte/adapter-map.json +1 -1
  198. package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
  199. package/presets/opencode/README.md +1 -1
  200. package/presets/opencode/android-kotlin/OPENCODE.md +8 -1
  201. package/presets/opencode/android-kotlin/REPO_AGENTS.md +1 -1
  202. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  203. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
  204. package/presets/opencode/go/OPENCODE.md +8 -1
  205. package/presets/opencode/go/REPO_AGENTS.md +1 -1
  206. package/presets/opencode/go/adapter-map.json +1 -1
  207. package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
  208. package/presets/opencode/ios-swift/OPENCODE.md +8 -1
  209. package/presets/opencode/ios-swift/REPO_AGENTS.md +1 -1
  210. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  211. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
  212. package/presets/opencode/java/OPENCODE.md +8 -1
  213. package/presets/opencode/java/REPO_AGENTS.md +1 -1
  214. package/presets/opencode/java/adapter-map.json +1 -1
  215. package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
  216. package/presets/opencode/mcp-ts/OPENCODE.md +8 -1
  217. package/presets/opencode/mcp-ts/REPO_AGENTS.md +1 -1
  218. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  219. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
  220. package/presets/opencode/next/OPENCODE.md +8 -1
  221. package/presets/opencode/next/REPO_AGENTS.md +1 -1
  222. package/presets/opencode/next/adapter-map.json +9 -1
  223. package/presets/opencode/next/agents/code-reviewer.md +35 -0
  224. package/presets/opencode/next/agents/feature-developer.md +22 -0
  225. package/presets/opencode/next/agents/mockup-reviewer.md +27 -1
  226. package/presets/opencode/next/rules/code-review-mr.md +10 -0
  227. package/presets/opencode/next/rules/design-tokens-binding.md +35 -0
  228. package/presets/opencode/next/rules/feature-delivery-workflow.md +17 -0
  229. package/presets/opencode/next/rules/mockup-review.md +9 -0
  230. package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
  231. package/presets/opencode/next/rules/react-ui.md +1 -0
  232. package/presets/opencode/next/skills/code-review/SKILL.md +1 -0
  233. package/presets/opencode/nuxt/OPENCODE.md +8 -1
  234. package/presets/opencode/nuxt/REPO_AGENTS.md +1 -1
  235. package/presets/opencode/nuxt/adapter-map.json +1 -1
  236. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
  237. package/presets/opencode/php-hexagonal/OPENCODE.md +8 -1
  238. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +1 -1
  239. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  240. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
  241. package/presets/opencode/php-laravel/OPENCODE.md +8 -1
  242. package/presets/opencode/php-laravel/REPO_AGENTS.md +1 -1
  243. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  244. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
  245. package/presets/opencode/platform-contract.json +1 -1
  246. package/presets/opencode/svelte/OPENCODE.md +8 -1
  247. package/presets/opencode/svelte/REPO_AGENTS.md +1 -1
  248. package/presets/opencode/svelte/adapter-map.json +1 -1
  249. package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
  250. package/scripts/check-local-overlay.sh +40 -4
  251. package/scripts/check-mavis-local-overlay.mjs +23 -0
  252. package/scripts/check-mavis-platform-contract.mjs +5 -2
  253. package/scripts/check-opencode-local-overlay.mjs +19 -0
  254. package/scripts/check-opencode-platform-contract.mjs +5 -2
  255. package/scripts/check-preset-token-budget.sh +7 -0
  256. package/scripts/fixtures/cli-golden/claude/next.json +19 -18
  257. package/scripts/fixtures/cli-golden/cursor/next.json +12 -11
  258. package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +3 -3
  259. package/scripts/fixtures/cli-golden/mavis/go.json +3 -3
  260. package/scripts/fixtures/cli-golden/mavis/ios-swift.json +3 -3
  261. package/scripts/fixtures/cli-golden/mavis/java.json +3 -3
  262. package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +3 -3
  263. package/scripts/fixtures/cli-golden/mavis/next.json +12 -11
  264. package/scripts/fixtures/cli-golden/mavis/nuxt.json +3 -3
  265. package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +3 -3
  266. package/scripts/fixtures/cli-golden/mavis/php-laravel.json +3 -3
  267. package/scripts/fixtures/cli-golden/mavis/svelte.json +3 -3
  268. package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +3 -3
  269. package/scripts/fixtures/cli-golden/opencode/go.json +3 -3
  270. package/scripts/fixtures/cli-golden/opencode/ios-swift.json +3 -3
  271. package/scripts/fixtures/cli-golden/opencode/java.json +3 -3
  272. package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +3 -3
  273. package/scripts/fixtures/cli-golden/opencode/next.json +12 -11
  274. package/scripts/fixtures/cli-golden/opencode/nuxt.json +3 -3
  275. package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +3 -3
  276. package/scripts/fixtures/cli-golden/opencode/php-laravel.json +3 -3
  277. package/scripts/fixtures/cli-golden/opencode/svelte.json +3 -3
  278. package/scripts/lib/generate-mavis-adapter.mjs +10 -1
  279. package/scripts/lib/generate-opencode-adapter.mjs +8 -1
  280. package/scripts/sync-claude-settings.mjs +25 -0
  281. package/scripts/sync-dogfood-claude.sh +62 -0
  282. package/scripts/test-mavis-orchestration.mjs +3 -2
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -71,4 +71,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
71
71
 
72
72
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
73
73
 
74
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
74
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "android-kotlin",
5
5
  "semanticSource": "cursor/android-kotlin",
6
- "sourceRevision": "94c31b7b1327d457759e866babcbceceff211ba6691ba6114c32b5ca8e1282fd",
6
+ "sourceRevision": "6e09f86a97133b60a3818076d68660709ce3b9119175f1e00ef160b3bc747def",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
21
21
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
22
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
23
23
  - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
24
- - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (and `sync-dogfood-mavis.sh` / `sync-dogfood-opencode.sh` when those platforms changed), or document an intentional skip, when maintaining this monorepo
24
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, and `sync-dogfood-opencode.sh` when those platforms changed, or document an intentional skip, when maintaining this monorepo
25
25
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
26
26
 
27
27
  ## Pointers
@@ -31,6 +31,6 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
31
31
  - Budget: `preset-token-budget`
32
32
  - Leakage: `preset-no-cross-stack-leakage`
33
33
  - Validation: stack `agents/build-verifier.md` → preset-structure section
34
- - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
34
+ - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
35
35
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
36
36
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -71,4 +71,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
71
71
 
72
72
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
73
73
 
74
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
74
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "go",
5
5
  "semanticSource": "cursor/go",
6
- "sourceRevision": "c80c2a8469a9d8c0b09042fa2dee8e9ba0193704587e9586d352e506126547a6",
6
+ "sourceRevision": "082c8aec1536c91c49993c58c6f9ad587da93c4a5bbef82b7b73eece4402eab9",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
21
21
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
22
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
23
23
  - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
24
- - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (and `sync-dogfood-mavis.sh` / `sync-dogfood-opencode.sh` when those platforms changed), or document an intentional skip, when maintaining this monorepo
24
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, and `sync-dogfood-opencode.sh` when those platforms changed, or document an intentional skip, when maintaining this monorepo
25
25
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
26
26
 
27
27
  ## Pointers
@@ -31,6 +31,6 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
31
31
  - Budget: `preset-token-budget`
32
32
  - Leakage: `preset-no-cross-stack-leakage`
33
33
  - Validation: stack `agents/build-verifier.md` → preset-structure section
34
- - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
34
+ - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
35
35
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
36
36
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -69,4 +69,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
69
69
 
70
70
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
71
71
 
72
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
72
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "ios-swift",
5
5
  "semanticSource": "cursor/ios-swift",
6
- "sourceRevision": "c9bca6893eaac1a4f71e0211d8dfa8b2967938027af0e7945e06410bfffa522d",
6
+ "sourceRevision": "6109fce820397ca0bc6b9a2f09290049e4a0e88a5c8dfb5267f52ff8b46f30e5",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
21
21
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
22
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
23
23
  - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
24
- - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (and `sync-dogfood-mavis.sh` / `sync-dogfood-opencode.sh` when those platforms changed), or document an intentional skip, when maintaining this monorepo
24
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, and `sync-dogfood-opencode.sh` when those platforms changed, or document an intentional skip, when maintaining this monorepo
25
25
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
26
26
 
27
27
  ## Pointers
@@ -31,6 +31,6 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
31
31
  - Budget: `preset-token-budget`
32
32
  - Leakage: `preset-no-cross-stack-leakage`
33
33
  - Validation: stack `agents/build-verifier.md` → preset-structure section
34
- - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
34
+ - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
35
35
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
36
36
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -69,4 +69,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
69
69
 
70
70
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
71
71
 
72
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
72
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "java",
5
5
  "semanticSource": "cursor/java",
6
- "sourceRevision": "19291099a0af90377f78d53ec28a657d3d69657561e267fe1addacf201860228",
6
+ "sourceRevision": "644b4a47fead34d4c5745a9290e800b99b6948a174edcf5c74621999068dd14e",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
21
21
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
22
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
23
23
  - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
24
- - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (and `sync-dogfood-mavis.sh` / `sync-dogfood-opencode.sh` when those platforms changed), or document an intentional skip, when maintaining this monorepo
24
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, and `sync-dogfood-opencode.sh` when those platforms changed, or document an intentional skip, when maintaining this monorepo
25
25
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
26
26
 
27
27
  ## Pointers
@@ -31,6 +31,6 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
31
31
  - Budget: `preset-token-budget`
32
32
  - Leakage: `preset-no-cross-stack-leakage`
33
33
  - Validation: stack `agents/build-verifier.md` → preset-structure section
34
- - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
34
+ - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
35
35
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
36
36
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -72,4 +72,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
72
72
 
73
73
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
74
74
 
75
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
75
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "mcp-ts",
5
5
  "semanticSource": "cursor/mcp-ts",
6
- "sourceRevision": "8d8d5d2737c689451c222cee97747f78dc10cf47ed25126cb0d51fdf73667550",
6
+ "sourceRevision": "008356a19bf3609e33b39cb6a5397384b45078380661e6b944b1f86ced6aae7d",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -21,7 +21,7 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
21
21
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
22
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
23
23
  - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
24
- - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (and `sync-dogfood-mavis.sh` / `sync-dogfood-opencode.sh` when those platforms changed), or document an intentional skip, when maintaining this monorepo
24
+ - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, and `sync-dogfood-opencode.sh` when those platforms changed, or document an intentional skip, when maintaining this monorepo
25
25
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
26
26
 
27
27
  ## Pointers
@@ -31,6 +31,6 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
31
31
  - Budget: `preset-token-budget`
32
32
  - Leakage: `preset-no-cross-stack-leakage`
33
33
  - Validation: stack `agents/build-verifier.md` → preset-structure section
34
- - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
34
+ - Dogfood scripts: `packages/ai-rules/scripts/sync-dogfood-cursor.sh`, `sync-dogfood-claude.sh`, `sync-dogfood-mavis.sh`, `sync-dogfood-opencode.sh`
35
35
  - Drift script: `packages/ai-rules/scripts/check-shared-core-drift.sh`
36
36
  - Orchestrator: when editing presets, load this checklist + twin-sync
@@ -12,7 +12,9 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
12
12
  - Other rules: lazy `Read` `.opencode/rules/<stem>.md` when the task matches.
13
13
  - Agents: native `@name` / Task from `.opencode/agents/`.
14
14
  - Commands: native `/task` from `.opencode/commands/`.
15
- - After a producer receipt, run `bash .opencode/hooks/chain-team-phases.sh`.
15
+ - After a producer receipt, run the chain by hand (`projectHooks` is `manual`; this preset ships no plugin):
16
+ `printf '%s\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh`.
17
+ Slash commands are native (`/task` from `.opencode/commands/`). Do not assume `SubagentStop` auto-chain.
16
18
  Agents must not write lifecycle fields in `status.json` / `metrics.json`.
17
19
 
18
20
  ## Essential rules (read every turn)
@@ -22,6 +24,11 @@ Root `AGENTS.md` is native always-on. Read it first, then this file.
22
24
  - `.opencode/rules/code-quality-and-refactoring.md`
23
25
  - `.opencode/rules/ai-local-overlay.md`
24
26
 
27
+ Every turn, probe `ls -la .ai.local`, then apply `.ai.local/rules/*.md` and
28
+ `.ai.local/conventions.md`. Acknowledge `Using .ai.local: <rule-name>`.
29
+ Guide: `docs/LOCAL-OVERLAY.md`. These essential rules are a prompt contract.
30
+ `nativeProjectRules` is `no-equivalent` — do not claim engine `alwaysApply`.
31
+
25
32
  See `.opencode/rules/README.md` for the full catalog and loading strategy.
26
33
 
27
34
  ## Harness wiring
@@ -71,4 +71,4 @@ A `.ai.local/` directory MAY exist at the repo root or at any nesting depth in m
71
71
 
72
72
  Plain markdown rules under `.ai.local/rules/*.md` are read by the agent with higher priority than preset rules. Living gotchas live in `.ai.local/conventions.md`.
73
73
 
74
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule (always-on for Cursor, on-demand for Claude) is the mechanism; this `MANDATORY` section is the reinforcement.
74
+ On every turn, probe `ls -la .ai.local`, apply `.ai.local/rules/*.md` and `.ai.local/conventions.md`, and acknowledge `Using .ai.local: <rule-name>`. Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package. The `ai-local-overlay` rule is always-on on Cursor and session-start on Claude (no `paths:`). Mavis and OpenCode have no native `alwaysApply`; this section plus the platform entry's essential-rules list is the reinforcement.
@@ -3,7 +3,7 @@
3
3
  "platform": "opencode",
4
4
  "stack": "next",
5
5
  "semanticSource": "cursor/next",
6
- "sourceRevision": "27df1a96830a46bbc59319d9f695bae3ce3d4fccd71885feeea67d8a920b5cb6",
6
+ "sourceRevision": "be3247c939b52878a3d3d93245cd63c02e259418104111458f04ef0b737e5d27",
7
7
  "entries": [
8
8
  {
9
9
  "source": "AGENTS.md",
@@ -490,6 +490,14 @@
490
490
  "reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded",
491
491
  "sharedCoreStem": "quality/design-guidance.md"
492
492
  },
493
+ {
494
+ "source": "rules/design-tokens-binding.mdc",
495
+ "target": "rules/design-tokens-binding.md",
496
+ "category": "rules",
497
+ "disposition": "transform",
498
+ "loadMode": "referenced",
499
+ "reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded"
500
+ },
493
501
  {
494
502
  "source": "rules/feature-delivery-workflow.mdc",
495
503
  "target": "rules/feature-delivery-workflow.md",
@@ -47,6 +47,35 @@ You **issue** reviews. Implementers acting on your findings must verify each ite
47
47
  - User-flow changes without e2e plan/spec updates → note in warnings; REQUEST_CHANGES when AC requires e2e.
48
48
  - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
49
49
 
50
+ ## UI / Figma parity gate (UI-touching MR)
51
+
52
+ When the diff touches **UI / layout / styling** — paths under `app/src/ui/**` (components, pages, styles, hooks used by UI), or edits to global layout/CSS/tokens, or renamed/reordered UI files — AND a Figma mockup reference exists in `brief.md` / `decomposition.md` (Figma URL, fileKey, or node id) **or** `mockup-review.md` is present in the task:
53
+
54
+ - **Do a detailed, pixel-accurate comparison** of the implementation against the mockup, **across every viewport the project uses**. The project’s accepted viewport set is the one declared in the `mockup-review` AC-8 / Stack notes (web buckets ~375 / ~768 / ~1280 mapped to small / medium / large) and/or the Storybook viewport toolbar in this repo — fetch the full set, do not sample.
55
+ - For each viewport: pull the Figma frame via Figma MCP `get_screenshot` (prefer the node-link if present) and capture the running app at the same width (Playwright MCP / Chrome DevTools MCP). Compare structure, spacing, typography, color, iconography, states, and interactive affordances. **Storybook visual baselines are not a substitute.**
56
+
57
+ ### Per-element parity checklist (mandatory)
58
+
59
+ For every UI element in the diff scope, verify against the Figma node and the `mockup-review.md` `## Design contract` (when present) and the **`design-tokens-binding`** discipline. Findings cite **`path:line`** + Figma node id + viewport.
60
+
61
+ 1. **Typography** — font-family, size, line-height, weight, letter-spacing, color. Must match the Figma text style / `tokens-typography` mapping. A `Text variant="…"` DS component is the safe mirror; a raw `font-size: 14px; line-height: 20px;` wrapper is a finding unless the Figma text style maps to a raw token (and the token is used, not a literal).
62
+ 2. **Color** — fills, strokes, icon color, link color, placeholder color. Must bind to `@sds/tokens-colors` / `@sds/brand-colors` / the project token module (or the Figma variable mapped in the Design contract). Raw `#…` / `rgb(…)` is a finding. Hover / active / focus / disabled states must use the bound state color from the token set, not a literal.
63
+ 3. **Spacing** — padding, gap, margin, border-radius. Must match the Figma spacing / radius variable (Design contract) or the repo spacing scale. Raw `padding: 16px;` is a finding if a token exists. Auto-layout intent (direction, gap, alignment) preserved — no reflow to absolute positioning without a brief reason.
64
+ 4. **Imagery & icons** — image `src`, intrinsic `width`/`height`, aspect ratio match the Figma asset / `get_design_context` recommendation; rendered with `next/image` (or repo convention). Icons must use the `@sds/icon` (or DS) symbol name from the Figma component instance. A `placeholder`, an invented image URL, a guessed icon name, or a stretched aspect ratio is a finding. `alt` text matches the Figma node copy when meaningful.
65
+ 5. **States** — empty / loading / error / success / disabled / validation visible in the Figma must be implemented. Missing states present in the mockup → `blocker`.
66
+ 6. **Structure & responsive** — direction (row / column), alignment, wrap, overflow match the Figma. The implementation responds to the project viewport set without horizontal scroll or clipped content at any accepted width (unless the Figma explicitly clips).
67
+ 7. **Auto-layout vs absolute** — for a region that is the only responsive evidence in Figma, the implementation must use flex / grid with the same gap / padding, not absolute positioning.
68
+
69
+ ### Findings, severity, and section
70
+
71
+ - Findings cite `path:line` + Figma node id + viewport + severity. Layout / style deviations from the mockup → **`important`**; user-visible / broken / missing-state → **`blocker`**; latent / cosmetic → **`nit`**.
72
+ - Emit a `## Figma parity (UI)` section in `review.md` with the per-viewport verdict, a findings table, and screenshots / links. The section must reference the `## Design contract` from `mockup-review.md` and the **`design-tokens-binding`** discipline. **If you cannot perform the comparison** (no Figma URL in brief, or Figma MCP down with no manual screenshots) → still emit the section with verdict `unable_to_compare` and a one-line reason. **Never** skip the section on a UI-touching MR with a Figma reference.
73
+ - **Hard rules:**
74
+ - UI-touching MR with a Figma reference and a missing or `unable_to_compare` parity section → **REQUEST_CHANGES**.
75
+ - Unbound raw values where a token exists (typography / color / spacing / imagery) → `blocker` (user-visible) or `important` (latent). Do not approve on Storybook baselines alone.
76
+
77
+ The gate does **not** apply to MRs with no UI/layout diff and no Figma reference (e.g. pure store/reducer or test-only changes).
78
+
50
79
  ## Review artifact
51
80
 
52
81
  Write `.ai.local/team/tasks/<slug>/review.md` with this format:
@@ -66,6 +95,12 @@ APPROVE | APPROVE_WITH_NOTES | REQUEST_CHANGES
66
95
  ## Suggestions (nice to have)
67
96
  - ...
68
97
 
98
+ ## Figma parity (UI)
99
+ - Viewports compared: …
100
+ - Per-viewport verdict: …
101
+ - Findings: `path:line` | node id | viewport | severity | note
102
+ - (If UI gate not applicable: `N/A — no UI diff / no Figma reference`.)
103
+
69
104
  ## AC coverage
70
105
  | Criterion | Status | Notes |
71
106
  |-----------|--------|-------|
@@ -49,6 +49,7 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
49
49
  3. Read `pipeline.json` for step context and scope.
50
50
  4. Follow the **`feature-delivery` skill** (layer order, reference features, validation handoff).
51
51
  5. **Verify carry-over at HEAD before applying** (refactor intent only). When the brief comes from a prior review's carry-over findings list, for each item run `git show HEAD:<path>` or `grep` to confirm the finding still applies at the current HEAD; if the file already contains the fix (carry-over was closed in a prior uncommitted batch), mark it as **NO-OP at HEAD** in `implementation.md` and skip the edit; if the file is unchanged, apply the fix and cite file:line. Target ≤2 NO-OP items per refactor pipeline.
52
+ 6. **Figma node-link precondition.** If `brief.md` / `decomposition.md` / the prompt contains a Figma URL with a node id (`?node-id=…`), do **not** start UI implementation until `mockup-review.md` contains **both** a `## Design contract` section (Figma variables, text styles, components/assets with the repo mapping) **and** a `## Node decomposition (AC-2)` section (child→component map with bindings) for that node. If either section is missing or empty, emit `blocked` and hand back to the analyst / mockup-reviewer (or ask the user to re-run mockup-review). The Design contract is the binding table for typography / color / spacing / imagery; the Node decomposition is the component map. Load requestable rule **`design-tokens-binding`** before writing UI — bind every value to a Figma variable / text style / repo token; raw `#…` / `px` are a finding.
52
53
 
53
54
  ## Task execution rules
54
55
 
@@ -93,6 +94,27 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
93
94
 
94
95
  Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
95
96
 
97
+ ## UI self-check vs Figma (mandatory for UI WPs with a Figma reference)
98
+
99
+ When this WP touched UI / layout / styling (paths under `app/src/ui/**`, global layout/CSS/tokens) AND a Figma reference exists in `brief.md` / `decomposition.md` (or `mockup-review.md` is present):
100
+
101
+ 1. **Render** the changed routes at **each project viewport** (the set from `mockup-review` AC-8 / Stack notes — web buckets ~375 / ~768 / ~1280 small/medium/large — and the repo’s Storybook viewport toolbar). Use Playwright MCP or Chrome DevTools MCP (the app must be running; if not, note the limitation and still perform the self-check as far as possible).
102
+ 2. **Compare** each rendered viewport to the Figma `get_screenshot` (prefer the node-link). For each UI element in the diff scope, check the per-element parity list in the `code-reviewer` UI / Figma parity gate: typography, color, spacing, imagery, states, structure/responsive, auto-layout intent.
103
+ 3. **Fix** obvious deviations before the implementation receipt (font family / size / line-height / color / spacing / image src+size / icon name / state). Bind to the Design contract; load **`design-tokens-binding`** if a value is missing.
104
+ 4. **Record** a `## UI self-check vs Figma` block in `implementation.md`:
105
+
106
+ ```markdown
107
+ ## UI self-check vs Figma
108
+ - Viewports checked: <e.g. 375, 768, 1280>
109
+ - MCP / app status: <ok | degraded: reason>
110
+ - Deviations fixed: `path:line` | node id | viewport | what | fix
111
+ - Remaining gaps / known limits: <… or none>
112
+ ```
113
+
114
+ If the app was not runnable or MCP was down, still emit the block with the limitation and what you could not check — the reviewer will gate.
115
+
116
+ This is the developer-side counterpart to the `code-reviewer` UI / Figma parity gate; together they close the fidelity loop (extract contract → bind → self-check → review-block on unbound).
117
+
96
118
  ## Anti-hallucination (Next / React / RTK)
97
119
 
98
120
  - When editing `app/**/*.{ts,tsx}`, load / follow rule `react-next-anti-hallucination`.
@@ -56,9 +56,35 @@ MCP unavailable or OAuth fail → verdict `BLOCKED_MCP`. Do not invent DS claims
56
56
 
57
57
  Follow the requestable `mockup-review` checklist (DS components, tokens, quality, coverage, viewports). Do not duplicate that checklist here.
58
58
 
59
+ ## Node-link input: child→component decomposition (AC-2, mandatory)
60
+
61
+ When the Figma URL (in prompt, `brief.md`, or `decomposition.md`) contains a node id (`?node-id=…` or `…/node/…`):
62
+
63
+ 1. **Inspect the node subtree** via Figma MCP `get_metadata` for the exact node (not the whole file). Depth ≤3 named-frame levels; ≤12 child rows in the map.
64
+ 2. **Classify each child node** as one of: library component instance (check `search_design_system` / library metadata), custom frame, text/icon/asset, container, layout-only, unknown. Skip pure decorative leaves unless they constrain the child component.
65
+ 3. **Map each child node → target component** using repo conventions:
66
+ - existing `app/src/ui/**` component → name it (e.g. `RiskProfilePage/components/ProfileHealthCard`);
67
+ - attached library component (e.g. `@sds/*`) → name the library symbol and the local wrapper;
68
+ - no analog → mark `new: <ProposedName>` and the parent component it belongs to.
69
+ 4. **Emit the map** in the report under `## Node decomposition (AC-2)` as a table (node id, node name, type, target component / action). Add a short prose summary of grouping / boundaries.
70
+ 5. **Extract the Design contract** (mandatory for node-link input) and emit it as a separate `## Design contract` section, **above** the Node decomposition table — the developer reads it first:
71
+ - **Figma variables** (one `get_variable_defs` call per file): list the variables used by the subtree (color, spacing, radius, effect). Map each to the repo equivalent: `@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens` / project token module (e.g. `var(--text-primary, …)`).
72
+ - **Text styles**: list the Figma text style names used (e.g. `Body/M`, `Heading/L`). Map to the repo typography component / token (`@sds/tokens-typography`, `Text variant="…"`, Linaria `var(--font-…, …)`).
73
+ - **Components / assets**: list library component instances (`@sds/*` symbol name), image fills (asset URL / `get_design_context` recommendation), and icons (`@sds/icon` symbol name).
74
+ - Call this once per file; do not dump the whole variable set — only what the subtree uses.
75
+ 6. **Extend the AC-2 table** with a concise `Bindings` column (or a per-row note) capturing the text style, fill / spacing tokens, and asset source for that node. Keep the table scannable; put the long form in the Design contract section.
76
+ 7. **Verdict rule.** Missing map **or** missing Design contract on a node-link input → verdict `FAIL` (mandatory pre-implementation step) unless MCP returned `BLOCKED_MCP`. Refusal to produce the map / contract on a node-link task is not an option — narrow the node with the user first (do not silently fall back to whole-file review).
77
+
78
+ The map and the Design contract are the implementation contract the developer reads before coding; the DS/tokens/quality/coverage/viewport dimensions still apply on top.
79
+
59
80
  ## Output
60
81
 
61
- Write `.ai.local/team/tasks/<slug>/mockup-review.md` using the report headings in the `mockup-review` rule.
82
+ Write `.ai.local/team/tasks/<slug>/mockup-review.md` using the report headings in the `mockup-review` rule. When the input is a node-link, the report **must** additionally include:
83
+
84
+ - `## Design contract` (above Node decomposition) — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-*` / DS components / project token module). This is the binding table the developer uses for typography, color, spacing, and imagery.
85
+ - `## Node decomposition (AC-2)` — the child→component map (table) plus a short prose summary, with a `Bindings` column / per-row note for the Figma design bindings.
86
+
87
+ Both sections are the developer’s pre-implementation contract; do not omit either on a node-link input.
62
88
 
63
89
  ## Verdicts and receipts
64
90
 
@@ -51,3 +51,13 @@ On-demand rule for review flows. **Procedure and output format:** skill `code-re
51
51
  - Security: `security-next.mdc`
52
52
  - Tests: `tests-unit.mdc`, `playwright-agents.mdc`, `tests-e2e-structure.mdc`
53
53
  - Lint gate before final report: `post-change-lint.mdc`
54
+
55
+ ### UI / Figma parity (web)
56
+
57
+ When the diff touches UI / layout / styling (paths under `app/src/ui/**`, global layout/CSS/tokens) AND a Figma mockup is referenced in `brief.md` / `decomposition.md` (URL, fileKey, or node id) **or** `mockup-review.md` is present:
58
+
59
+ - The `code-reviewer` agent must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup, **across every viewport the project uses** (the `mockup-review` AC-8 / Stack notes set — web buckets ~375 / ~768 / ~1280 small/medium/large — and the Storybook viewport toolbar in this repo). Figma frames via Figma MCP `get_screenshot`; the running app via Playwright MCP / Chrome DevTools MCP at the matching width.
60
+ - The comparison is a **per-element parity check** (typography / color / spacing / imagery / states / structure / auto-layout intent) per the `code-reviewer` UI / Figma parity gate. Bind to the `mockup-review.md` `## Design contract` and the **`design-tokens-binding.mdc`** discipline (`@sds/tokens-*` / DS components, no raw `#…` / `px` where a token exists).
61
+ - Findings: `path:line` + Figma node id + viewport + severity. Emit a `## Figma parity (UI)` section in `review.md`.
62
+ - **Storybook visual baselines are not a substitute.** Approving a UI MR on Storybook baselines alone is not acceptable when a Figma reference exists.
63
+ - Missing or `unable_to_compare` parity section on a UI-touching MR with a Figma reference → `REQUEST_CHANGES`. Unbound raw values where a token exists (typography / color / spacing / imagery) → `blocker` / `important`. The full gate lives in the `code-reviewer` agent prompt; this rule cross-references it.
@@ -0,0 +1,35 @@
1
+ # Design-token binding (Figma → repo)
2
+
3
+ The implementation must mirror the Figma mockup token-for-token. Raw design values where a token exists are a finding. This rule is the web-stack discipline; the reporter (`mockup-reviewer`) emits the bindings, the implementer (`feature-developer`) binds, the reviewer (`code-reviewer`) blocks on unbound raw values.
4
+
5
+ ## Typography
6
+
7
+ - Bind to the Figma **text style** used by the node — extract via Figma MCP `get_design_context` / `get_variable_defs` and the node metadata. Do not invent `font-size: 14px; line-height: 20px;` when a Figma text style exists.
8
+ - Repo mapping: font family, size, line-height, weight, letter-spacing → `@sds/tokens-typography` (or the project token module). In Linaria / styled: `font: var(--font-body-m, …)` / equivalent token.
9
+ - Prefer a typography variant / DS text component that already binds the token (e.g. `Text variant="body-m"`) over a styled wrapper with raw values.
10
+
11
+ ## Color
12
+
13
+ - Bind to the Figma **fill / stroke variable** (`get_variable_defs`). Do not write raw `#…` or `rgb(…)`.
14
+ - Repo mapping: `@sds/tokens-colors`, `@sds/brand-colors`, or the project token module (`color: var(--text-primary, …)`).
15
+ - A raw value is allowed only with an inline `// token-pending: <Figma-variable-name>` comment and a follow-up to bind it. The reviewer treats unbound raw values as a finding.
16
+
17
+ ## Spacing / radius / shadow
18
+
19
+ - Bind to Figma **spacing / radius / effect variables** or the repo spacing scale. Do not write raw `padding: 16px; gap: 12px;` if a token exists.
20
+ - Repo mapping: spacing tokens from `@sds/tokens` / the project scale; Linaria `css\`…\`` uses `var(--space-…, …)`.
21
+ - **Auto-layout intent:** respect Figma auto-layout (direction, gap, padding, alignment). Switching to absolute positioning for a region that is the only responsive evidence is a finding. `display: flex` with the same gap/padding is the safe mirror; do not reflow to a different layout without a reason in the brief.
22
+
23
+ ## Imagery & icons
24
+
25
+ - **Images:** use the Figma asset source from `get_design_context` / the node’s image fill. Repo: `next/image` (or repo convention) with `src`, `width`, `height` derived from Figma. Do not use a placeholder, do not invent a URL, do not change aspect ratio.
26
+ - **Icons:** use the `@sds/icon` (or project DS) symbol name from the Figma component instance / metadata. Do not invent icon names. The Figma node’s component name (e.g. `Icon / chevron-right`) maps to the DS symbol.
27
+ - `alt` text from the Figma node name when meaningful; otherwise from the design context copy.
28
+
29
+ ## Self-check before handoff
30
+
31
+ For UI WPs with a Figma reference: render the page at each project viewport (Playwright MCP / Chrome DevTools MCP) and compare to the Figma `get_screenshot`. Fix obvious typography / color / spacing / imagery deviations before the implementation receipt. Record a short **UI self-check vs Figma** block in `implementation.md` (viewports checked, deviations fixed, remaining gaps, MCP / app status). If the app is not runnable or MCP is down, note the limitation — the reviewer will gate.
32
+
33
+ ## Reviewer contract
34
+
35
+ The `code-reviewer` UI / Figma parity gate enforces this. A UI-touching MR with a Figma reference and unbound raw values where tokens exist → `blocker` (user-visible) or `important` (latent). Missing self-check on a UI WP with a Figma reference → `important`.
@@ -56,6 +56,23 @@ When the prompt or `brief.md` contains a `figma.com` URL, **mockup review** (`mo
56
56
 
57
57
  Before writing a new file in a layer, open **1–2 analog files** in the same layer and mirror: export shape, name prefixes (`T` / `I` where the repo uses them), file suffixes (`.apiMethods.ts`, `.endpoints.ts`, `.data.ts`, `.hooks.ts`, `styles.ts`), mapper / selector / thunk naming, and barrel shape. Record the analogs in the handoff. Where this preset's examples differ from the repo, **the repo wins**.
58
58
 
59
+ ## Figma node-link — child→component decomposition (mandatory pre-implementation)
60
+
61
+ When the prompt or `brief.md` contains a Figma URL with a node id (`?node-id=…`), `mockup-reviewer` must walk the node subtree via Figma MCP and emit **two sections** in `mockup-review.md`:
62
+
63
+ - `## Design contract` — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS components / `next/image` with Figma-derived `src/width/height`). This is the binding table the developer uses for typography, color, spacing, and imagery.
64
+ - `## Node decomposition (AC-2)` — the child→component map (with a `Bindings` column for the Figma design bindings).
65
+
66
+ `feature-developer` must **not** start UI implementation until both sections are present, and must load requestable `design-tokens-binding.mdc` to bind every value to a Figma variable / text style / repo token (raw `#…` / `px` are a finding). The full procedure and verdict rule live in the `mockup-reviewer` agent prompt and the `mockup-review` Stack notes.
67
+
68
+ ## UI MR — Figma parity gate (mandatory in code review)
69
+
70
+ When the MR touches UI / layout / styling (`app/src/ui/**`, global layout/CSS/tokens) and a Figma reference exists in `brief.md` / `decomposition.md` or `mockup-review.md` is present, `code-reviewer` must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup across **every project viewport** (mockup-review AC-8 / Stack notes set and the repo’s Storybook viewport toolbar). The comparison is a per-element parity check (typography / color / spacing / imagery / states / structure / auto-layout intent) bound to the `## Design contract` and the `design-tokens-binding.mdc` discipline. Findings go in `## Figma parity (UI)` in `review.md`. **Storybook visual baselines are not a substitute.** Missing or `unable_to_compare` parity on a UI MR with a Figma reference → `REQUEST_CHANGES`. The full gate lives in the `code-reviewer` agent prompt and the `code-review-mr` Stack notes.
71
+
72
+ ## UI self-check vs Figma (mandatory in implementation)
73
+
74
+ For UI WPs with a Figma reference, `feature-developer` performs a **self-check vs Figma** at each project viewport (Playwright MCP / Chrome DevTools MCP) before the implementation receipt, fixes obvious typography / color / spacing / imagery / state deviations, and records a `## UI self-check vs Figma` block in `implementation.md`. This is the developer-side counterpart to the parity gate and closes the fidelity loop (extract contract → bind → self-check → review-block).
75
+
59
76
  Typical feature with backend data and shared state. Layer details — `architecture-boundaries.mdc`, `next-app-core.mdc`.
60
77
 
61
78
  ## Checklist (work order)
@@ -109,3 +109,12 @@ PASS | PASS_WITH_NOTES | FAIL | BLOCKED_MCP
109
109
  ## Stack notes
110
110
 
111
111
  Illustrative web buckets (not enforced pixels): ~375 / ~768 / ~1280 mapped to small / medium / large.
112
+
113
+ ### Node-link input (AC-2) — child→component decomposition + Design contract (mandatory)
114
+
115
+ When the Figma URL contains a node id (`?node-id=…`), `mockup-reviewer` must:
116
+
117
+ 1. Walk the node subtree via Figma MCP `get_metadata` and emit a **Node→component map** (each child node id/name/type → target `app/src/ui/**` component, attached library component (e.g. `@sds/*`), or `new: <ProposedName>`). The map goes in `mockup-review.md` under `## Node decomposition (AC-2)` as a table plus a short prose summary, with a `Bindings` column / per-row note for the Figma design bindings.
118
+ 2. Extract the **Design contract** (above the Node decomposition table): Figma variables used by the subtree (color, spacing, radius, effect — one `get_variable_defs` call per file), text styles used, and components / assets (library instances, image fills via `get_design_context`, icons). Each item mapped to the repo equivalent: `@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS component (`@sds/icon` symbol name, `Text variant="…"`) / `next/image` with Figma-derived `src/width/height`.
119
+
120
+ Both sections are the **pre-implementation contract** the developer reads before coding; the DS/tokens/quality/coverage/viewport dimensions still apply on top. Verdict: missing map **or** missing Design contract on a node-link input → `FAIL` (unless `BLOCKED_MCP`). The developer (`feature-developer`) must not start UI work until both sections are present, and must bind implementation to the Design contract (see `design-tokens-binding.mdc`).