@bonesofspring/ai-rules 0.2.42 → 0.2.44

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 (468) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/bin/lib/seed-ai-local-team.js +41 -4
  3. package/docs/LOCAL-OVERLAY.md +6 -4
  4. package/docs/PRESET-CONTRIBUTION.md +2 -2
  5. package/docs/PRESET-ENGLISH-STYLE.md +1 -1
  6. package/docs/specs/INDEX.md +3 -1
  7. package/docs/specs/_templates/feature.md +6 -0
  8. package/package.json +1 -1
  9. package/presets/_shared/README.md +1 -1
  10. package/presets/_shared/assets/docs-specs/_templates/feature.md +6 -0
  11. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +1 -1
  12. package/presets/_shared/core/agent-team/agent-team-intake.md +1 -1
  13. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +23 -7
  14. package/presets/_shared/core/agent-team/language-policy.md +24 -16
  15. package/presets/_shared/core/agent-team/plan-graph.md +9 -1
  16. package/presets/_shared/core/quality/anti-hallucination-contract.md +2 -0
  17. package/presets/_shared/core/quality/context-and-iteration.md +2 -1
  18. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +1080 -4
  19. package/presets/claude/android-kotlin/REPO_AGENTS.md +1 -3
  20. package/presets/claude/android-kotlin/commands/task-continue.md +1 -1
  21. package/presets/claude/android-kotlin/commands/task.md +1 -3
  22. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  23. package/presets/claude/android-kotlin/rules/stack/android-app-core.md +1 -3
  24. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -1
  25. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  26. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +1 -1
  27. package/presets/claude/android-kotlin/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  28. package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +25 -17
  29. package/presets/claude/go/REPO_AGENTS.md +1 -3
  30. package/presets/claude/go/commands/task-continue.md +1 -1
  31. package/presets/claude/go/commands/task.md +1 -3
  32. package/presets/claude/go/hooks/chain-team-phases.sh +1080 -4
  33. package/presets/claude/go/rules/stack/go-app-core.md +1 -3
  34. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
  35. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  36. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +1 -1
  37. package/presets/claude/go/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  38. package/presets/claude/go/rules/tooling-and-review/language-policy.md +25 -17
  39. package/presets/claude/ios-swift/REPO_AGENTS.md +1 -3
  40. package/presets/claude/ios-swift/commands/task-continue.md +1 -1
  41. package/presets/claude/ios-swift/commands/task.md +1 -3
  42. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +1080 -4
  43. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +1 -3
  44. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -1
  45. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  46. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +1 -1
  47. package/presets/claude/ios-swift/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  48. package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +25 -17
  49. package/presets/claude/java/REPO_AGENTS.md +1 -3
  50. package/presets/claude/java/commands/task-continue.md +1 -1
  51. package/presets/claude/java/commands/task.md +1 -3
  52. package/presets/claude/java/hooks/chain-team-phases.sh +1080 -4
  53. package/presets/claude/java/rules/stack/java-app-core.md +1 -3
  54. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -1
  55. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  56. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +1 -1
  57. package/presets/claude/java/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  58. package/presets/claude/java/rules/tooling-and-review/language-policy.md +25 -17
  59. package/presets/claude/mcp-ts/REPO_AGENTS.md +1 -3
  60. package/presets/claude/mcp-ts/commands/task-continue.md +1 -1
  61. package/presets/claude/mcp-ts/commands/task.md +1 -3
  62. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  63. package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +1 -3
  64. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -1
  65. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  66. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +1 -1
  67. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  68. package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +25 -17
  69. package/presets/claude/next/REPO_AGENTS.md +2 -4
  70. package/presets/claude/next/agents/openspec-author.md +26 -2
  71. package/presets/claude/next/agents/task-analyst.md +15 -6
  72. package/presets/claude/next/agents/task-router.md +20 -2
  73. package/presets/{cursor/next/ai-local/rules-library → claude/next/ai-local/rules}/task-levels.md +2 -0
  74. package/presets/claude/next/commands/task-continue.md +1 -1
  75. package/presets/claude/next/commands/task.md +1 -3
  76. package/presets/claude/next/hooks/chain-team-phases.sh +1080 -4
  77. package/presets/claude/next/rules/stack/next-app-core.md +1 -3
  78. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -1
  79. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  80. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +2 -2
  81. package/presets/claude/next/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  82. package/presets/claude/next/rules/tooling-and-review/language-policy.md +25 -17
  83. package/presets/claude/nuxt/REPO_AGENTS.md +1 -3
  84. package/presets/claude/nuxt/agents/README.md +1 -1
  85. package/presets/claude/nuxt/commands/task-continue.md +1 -1
  86. package/presets/claude/nuxt/commands/task.md +1 -3
  87. package/presets/claude/nuxt/hooks/chain-team-phases.sh +1080 -4
  88. package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +1 -3
  89. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -1
  90. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  91. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +1 -1
  92. package/presets/claude/nuxt/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  93. package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +25 -17
  94. package/presets/claude/php-hexagonal/REPO_AGENTS.md +1 -3
  95. package/presets/claude/php-hexagonal/commands/task-continue.md +1 -1
  96. package/presets/claude/php-hexagonal/commands/task.md +1 -3
  97. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  98. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +1 -3
  99. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -1
  100. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  101. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +1 -1
  102. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  103. package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +25 -17
  104. package/presets/claude/php-laravel/REPO_AGENTS.md +1 -3
  105. package/presets/claude/php-laravel/commands/task-continue.md +1 -1
  106. package/presets/claude/php-laravel/commands/task.md +1 -3
  107. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +1080 -4
  108. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +1 -3
  109. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -1
  110. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  111. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +1 -1
  112. package/presets/claude/php-laravel/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  113. package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +25 -17
  114. package/presets/claude/svelte/REPO_AGENTS.md +1 -3
  115. package/presets/claude/svelte/agents/README.md +1 -1
  116. package/presets/claude/svelte/commands/task-continue.md +1 -1
  117. package/presets/claude/svelte/commands/task.md +1 -3
  118. package/presets/claude/svelte/hooks/chain-team-phases.sh +1080 -4
  119. package/presets/claude/svelte/rules/stack/svelte-app-core.md +1 -3
  120. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -1
  121. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +23 -7
  122. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +1 -1
  123. package/presets/claude/svelte/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  124. package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +25 -17
  125. package/presets/cursor/android-kotlin/REPO_AGENTS.md +1 -3
  126. package/presets/cursor/android-kotlin/commands/task-continue.md +1 -1
  127. package/presets/cursor/android-kotlin/commands/task.md +1 -3
  128. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  129. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -1
  130. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -9
  131. package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +1 -1
  132. package/presets/cursor/android-kotlin/rules/android-app-core.mdc +1 -3
  133. package/presets/cursor/android-kotlin/rules/anti-hallucination-contract.mdc +2 -0
  134. package/presets/cursor/android-kotlin/rules/language-policy.mdc +25 -17
  135. package/presets/cursor/go/REPO_AGENTS.md +1 -3
  136. package/presets/cursor/go/commands/task-continue.md +1 -1
  137. package/presets/cursor/go/commands/task.md +1 -3
  138. package/presets/cursor/go/hooks/chain-team-phases.sh +1080 -4
  139. package/presets/cursor/go/rules/agent-team-intake.mdc +1 -1
  140. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -9
  141. package/presets/cursor/go/rules/ai-local-overlay.mdc +1 -1
  142. package/presets/cursor/go/rules/anti-hallucination-contract.mdc +2 -0
  143. package/presets/cursor/go/rules/go-app-core.mdc +1 -3
  144. package/presets/cursor/go/rules/language-policy.mdc +25 -17
  145. package/presets/cursor/ios-swift/REPO_AGENTS.md +1 -3
  146. package/presets/cursor/ios-swift/commands/task-continue.md +1 -1
  147. package/presets/cursor/ios-swift/commands/task.md +1 -3
  148. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +1080 -4
  149. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -1
  150. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -9
  151. package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +1 -1
  152. package/presets/cursor/ios-swift/rules/anti-hallucination-contract.mdc +2 -0
  153. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +1 -3
  154. package/presets/cursor/ios-swift/rules/language-policy.mdc +25 -17
  155. package/presets/cursor/java/REPO_AGENTS.md +1 -3
  156. package/presets/cursor/java/commands/task-continue.md +1 -1
  157. package/presets/cursor/java/commands/task.md +1 -3
  158. package/presets/cursor/java/hooks/chain-team-phases.sh +1080 -4
  159. package/presets/cursor/java/rules/agent-team-intake.mdc +1 -1
  160. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -9
  161. package/presets/cursor/java/rules/ai-local-overlay.mdc +1 -1
  162. package/presets/cursor/java/rules/anti-hallucination-contract.mdc +2 -0
  163. package/presets/cursor/java/rules/java-app-core.mdc +1 -3
  164. package/presets/cursor/java/rules/language-policy.mdc +25 -17
  165. package/presets/cursor/mcp-ts/REPO_AGENTS.md +1 -3
  166. package/presets/cursor/mcp-ts/commands/task-continue.md +1 -1
  167. package/presets/cursor/mcp-ts/commands/task.md +1 -3
  168. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  169. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -1
  170. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -9
  171. package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +1 -1
  172. package/presets/cursor/mcp-ts/rules/anti-hallucination-contract.mdc +2 -0
  173. package/presets/cursor/mcp-ts/rules/language-policy.mdc +25 -17
  174. package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +1 -3
  175. package/presets/cursor/next/REPO_AGENTS.md +2 -4
  176. package/presets/cursor/next/agents/README.md +1 -1
  177. package/presets/cursor/next/agents/build-verifier.md +2 -0
  178. package/presets/cursor/next/agents/feature-developer.md +9 -0
  179. package/presets/cursor/next/agents/openspec-author.md +26 -2
  180. package/presets/cursor/next/agents/task-analyst.md +20 -6
  181. package/presets/cursor/next/agents/task-router.md +31 -2
  182. package/presets/cursor/next/ai-local/conventions.md +20 -0
  183. package/presets/{mavis/next/ai-local/rules-library → cursor/next/ai-local/rules}/task-levels.md +12 -0
  184. package/presets/cursor/next/commands/task-continue.md +1 -1
  185. package/presets/cursor/next/commands/task.md +1 -3
  186. package/presets/cursor/next/hooks/chain-team-phases.sh +1080 -4
  187. package/presets/cursor/next/rules/agent-team-intake.mdc +1 -1
  188. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +20 -11
  189. package/presets/cursor/next/rules/ai-local-overlay.mdc +2 -2
  190. package/presets/cursor/next/rules/anti-hallucination-contract.mdc +2 -0
  191. package/presets/cursor/next/rules/language-policy.mdc +25 -17
  192. package/presets/cursor/next/rules/next-app-core.mdc +1 -3
  193. package/presets/cursor/nuxt/REPO_AGENTS.md +1 -3
  194. package/presets/cursor/nuxt/agents/README.md +1 -1
  195. package/presets/cursor/nuxt/commands/task-continue.md +1 -1
  196. package/presets/cursor/nuxt/commands/task.md +1 -3
  197. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +1080 -4
  198. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -1
  199. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -9
  200. package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +1 -1
  201. package/presets/cursor/nuxt/rules/anti-hallucination-contract.mdc +2 -0
  202. package/presets/cursor/nuxt/rules/language-policy.mdc +25 -17
  203. package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +1 -3
  204. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +1 -3
  205. package/presets/cursor/php-hexagonal/commands/task-continue.md +1 -1
  206. package/presets/cursor/php-hexagonal/commands/task.md +1 -3
  207. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  208. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -1
  209. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -9
  210. package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +1 -1
  211. package/presets/cursor/php-hexagonal/rules/anti-hallucination-contract.mdc +2 -0
  212. package/presets/cursor/php-hexagonal/rules/language-policy.mdc +25 -17
  213. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +1 -3
  214. package/presets/cursor/php-laravel/REPO_AGENTS.md +1 -3
  215. package/presets/cursor/php-laravel/commands/task-continue.md +1 -1
  216. package/presets/cursor/php-laravel/commands/task.md +1 -3
  217. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +1080 -4
  218. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -1
  219. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -9
  220. package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +1 -1
  221. package/presets/cursor/php-laravel/rules/anti-hallucination-contract.mdc +2 -0
  222. package/presets/cursor/php-laravel/rules/language-policy.mdc +25 -17
  223. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +1 -3
  224. package/presets/cursor/svelte/REPO_AGENTS.md +1 -3
  225. package/presets/cursor/svelte/agents/README.md +1 -1
  226. package/presets/cursor/svelte/commands/task-continue.md +1 -1
  227. package/presets/cursor/svelte/commands/task.md +1 -3
  228. package/presets/cursor/svelte/hooks/chain-team-phases.sh +1080 -4
  229. package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -1
  230. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -9
  231. package/presets/cursor/svelte/rules/ai-local-overlay.mdc +1 -1
  232. package/presets/cursor/svelte/rules/anti-hallucination-contract.mdc +2 -0
  233. package/presets/cursor/svelte/rules/language-policy.mdc +25 -17
  234. package/presets/cursor/svelte/rules/svelte-app-core.mdc +1 -3
  235. package/presets/mavis/android-kotlin/REPO_AGENTS.md +1 -3
  236. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  237. package/presets/mavis/android-kotlin/commands/task-continue.md +1 -1
  238. package/presets/mavis/android-kotlin/commands/task.md +1 -3
  239. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  240. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -1
  241. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +23 -7
  242. package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +1 -1
  243. package/presets/mavis/android-kotlin/rules/android-app-core.md +1 -3
  244. package/presets/mavis/android-kotlin/rules/anti-hallucination-contract.md +2 -0
  245. package/presets/mavis/android-kotlin/rules/language-policy.md +24 -16
  246. package/presets/mavis/go/REPO_AGENTS.md +1 -3
  247. package/presets/mavis/go/adapter-map.json +1 -1
  248. package/presets/mavis/go/commands/task-continue.md +1 -1
  249. package/presets/mavis/go/commands/task.md +1 -3
  250. package/presets/mavis/go/hooks/chain-team-phases.sh +1080 -4
  251. package/presets/mavis/go/rules/agent-team-intake.md +1 -1
  252. package/presets/mavis/go/rules/agent-team-orchestrator.md +23 -7
  253. package/presets/mavis/go/rules/ai-local-overlay.md +1 -1
  254. package/presets/mavis/go/rules/anti-hallucination-contract.md +2 -0
  255. package/presets/mavis/go/rules/go-app-core.md +1 -3
  256. package/presets/mavis/go/rules/language-policy.md +24 -16
  257. package/presets/mavis/ios-swift/REPO_AGENTS.md +1 -3
  258. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  259. package/presets/mavis/ios-swift/commands/task-continue.md +1 -1
  260. package/presets/mavis/ios-swift/commands/task.md +1 -3
  261. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +1080 -4
  262. package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -1
  263. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +23 -7
  264. package/presets/mavis/ios-swift/rules/ai-local-overlay.md +1 -1
  265. package/presets/mavis/ios-swift/rules/anti-hallucination-contract.md +2 -0
  266. package/presets/mavis/ios-swift/rules/ios-app-core.md +1 -3
  267. package/presets/mavis/ios-swift/rules/language-policy.md +24 -16
  268. package/presets/mavis/java/REPO_AGENTS.md +1 -3
  269. package/presets/mavis/java/adapter-map.json +1 -1
  270. package/presets/mavis/java/commands/task-continue.md +1 -1
  271. package/presets/mavis/java/commands/task.md +1 -3
  272. package/presets/mavis/java/hooks/chain-team-phases.sh +1080 -4
  273. package/presets/mavis/java/rules/agent-team-intake.md +1 -1
  274. package/presets/mavis/java/rules/agent-team-orchestrator.md +23 -7
  275. package/presets/mavis/java/rules/ai-local-overlay.md +1 -1
  276. package/presets/mavis/java/rules/anti-hallucination-contract.md +2 -0
  277. package/presets/mavis/java/rules/java-app-core.md +1 -3
  278. package/presets/mavis/java/rules/language-policy.md +24 -16
  279. package/presets/mavis/mcp-ts/REPO_AGENTS.md +1 -3
  280. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  281. package/presets/mavis/mcp-ts/commands/task-continue.md +1 -1
  282. package/presets/mavis/mcp-ts/commands/task.md +1 -3
  283. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  284. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -1
  285. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +23 -7
  286. package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +1 -1
  287. package/presets/mavis/mcp-ts/rules/anti-hallucination-contract.md +2 -0
  288. package/presets/mavis/mcp-ts/rules/language-policy.md +24 -16
  289. package/presets/mavis/mcp-ts/rules/mcp-ts-app-core.md +1 -3
  290. package/presets/mavis/next/REPO_AGENTS.md +2 -4
  291. package/presets/mavis/next/adapter-map.json +5 -5
  292. package/presets/mavis/next/agents/build-verifier.md +2 -0
  293. package/presets/mavis/next/agents/feature-developer.md +9 -0
  294. package/presets/mavis/next/agents/openspec-author.md +26 -2
  295. package/presets/mavis/next/agents/task-analyst.md +20 -6
  296. package/presets/mavis/next/agents/task-router.md +31 -2
  297. package/presets/mavis/next/ai-local/conventions.md +20 -0
  298. package/presets/{opencode/next/ai-local/rules-library → mavis/next/ai-local/rules}/task-levels.md +12 -0
  299. package/presets/mavis/next/commands/task-continue.md +1 -1
  300. package/presets/mavis/next/commands/task.md +1 -3
  301. package/presets/mavis/next/hooks/chain-team-phases.sh +1080 -4
  302. package/presets/mavis/next/rules/agent-team-intake.md +1 -1
  303. package/presets/mavis/next/rules/agent-team-orchestrator.md +23 -7
  304. package/presets/mavis/next/rules/ai-local-overlay.md +2 -2
  305. package/presets/mavis/next/rules/anti-hallucination-contract.md +2 -0
  306. package/presets/mavis/next/rules/language-policy.md +24 -16
  307. package/presets/mavis/next/rules/next-app-core.md +1 -3
  308. package/presets/mavis/nuxt/REPO_AGENTS.md +1 -3
  309. package/presets/mavis/nuxt/adapter-map.json +1 -1
  310. package/presets/mavis/nuxt/commands/task-continue.md +1 -1
  311. package/presets/mavis/nuxt/commands/task.md +1 -3
  312. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +1080 -4
  313. package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -1
  314. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +23 -7
  315. package/presets/mavis/nuxt/rules/ai-local-overlay.md +1 -1
  316. package/presets/mavis/nuxt/rules/anti-hallucination-contract.md +2 -0
  317. package/presets/mavis/nuxt/rules/language-policy.md +24 -16
  318. package/presets/mavis/nuxt/rules/nuxt-app-core.md +1 -3
  319. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +1 -3
  320. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  321. package/presets/mavis/php-hexagonal/commands/task-continue.md +1 -1
  322. package/presets/mavis/php-hexagonal/commands/task.md +1 -3
  323. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  324. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -1
  325. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +23 -7
  326. package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +1 -1
  327. package/presets/mavis/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
  328. package/presets/mavis/php-hexagonal/rules/language-policy.md +24 -16
  329. package/presets/mavis/php-hexagonal/rules/php-app-core.md +1 -3
  330. package/presets/mavis/php-laravel/REPO_AGENTS.md +1 -3
  331. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  332. package/presets/mavis/php-laravel/commands/task-continue.md +1 -1
  333. package/presets/mavis/php-laravel/commands/task.md +1 -3
  334. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +1080 -4
  335. package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -1
  336. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +23 -7
  337. package/presets/mavis/php-laravel/rules/ai-local-overlay.md +1 -1
  338. package/presets/mavis/php-laravel/rules/anti-hallucination-contract.md +2 -0
  339. package/presets/mavis/php-laravel/rules/language-policy.md +24 -16
  340. package/presets/mavis/php-laravel/rules/laravel-app-core.md +1 -3
  341. package/presets/mavis/svelte/REPO_AGENTS.md +1 -3
  342. package/presets/mavis/svelte/adapter-map.json +1 -1
  343. package/presets/mavis/svelte/commands/task-continue.md +1 -1
  344. package/presets/mavis/svelte/commands/task.md +1 -3
  345. package/presets/mavis/svelte/hooks/chain-team-phases.sh +1080 -4
  346. package/presets/mavis/svelte/rules/agent-team-intake.md +1 -1
  347. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +23 -7
  348. package/presets/mavis/svelte/rules/ai-local-overlay.md +1 -1
  349. package/presets/mavis/svelte/rules/anti-hallucination-contract.md +2 -0
  350. package/presets/mavis/svelte/rules/language-policy.md +24 -16
  351. package/presets/mavis/svelte/rules/svelte-app-core.md +1 -3
  352. package/presets/opencode/android-kotlin/REPO_AGENTS.md +1 -3
  353. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  354. package/presets/opencode/android-kotlin/commands/task-continue.md +1 -1
  355. package/presets/opencode/android-kotlin/commands/task.md +1 -3
  356. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  357. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -1
  358. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +23 -7
  359. package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +1 -1
  360. package/presets/opencode/android-kotlin/rules/android-app-core.md +1 -3
  361. package/presets/opencode/android-kotlin/rules/anti-hallucination-contract.md +2 -0
  362. package/presets/opencode/android-kotlin/rules/language-policy.md +24 -16
  363. package/presets/opencode/go/REPO_AGENTS.md +1 -3
  364. package/presets/opencode/go/adapter-map.json +1 -1
  365. package/presets/opencode/go/commands/task-continue.md +1 -1
  366. package/presets/opencode/go/commands/task.md +1 -3
  367. package/presets/opencode/go/hooks/chain-team-phases.sh +1080 -4
  368. package/presets/opencode/go/rules/agent-team-intake.md +1 -1
  369. package/presets/opencode/go/rules/agent-team-orchestrator.md +23 -7
  370. package/presets/opencode/go/rules/ai-local-overlay.md +1 -1
  371. package/presets/opencode/go/rules/anti-hallucination-contract.md +2 -0
  372. package/presets/opencode/go/rules/go-app-core.md +1 -3
  373. package/presets/opencode/go/rules/language-policy.md +24 -16
  374. package/presets/opencode/ios-swift/REPO_AGENTS.md +1 -3
  375. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  376. package/presets/opencode/ios-swift/commands/task-continue.md +1 -1
  377. package/presets/opencode/ios-swift/commands/task.md +1 -3
  378. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +1080 -4
  379. package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -1
  380. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +23 -7
  381. package/presets/opencode/ios-swift/rules/ai-local-overlay.md +1 -1
  382. package/presets/opencode/ios-swift/rules/anti-hallucination-contract.md +2 -0
  383. package/presets/opencode/ios-swift/rules/ios-app-core.md +1 -3
  384. package/presets/opencode/ios-swift/rules/language-policy.md +24 -16
  385. package/presets/opencode/java/REPO_AGENTS.md +1 -3
  386. package/presets/opencode/java/adapter-map.json +1 -1
  387. package/presets/opencode/java/commands/task-continue.md +1 -1
  388. package/presets/opencode/java/commands/task.md +1 -3
  389. package/presets/opencode/java/hooks/chain-team-phases.sh +1080 -4
  390. package/presets/opencode/java/rules/agent-team-intake.md +1 -1
  391. package/presets/opencode/java/rules/agent-team-orchestrator.md +23 -7
  392. package/presets/opencode/java/rules/ai-local-overlay.md +1 -1
  393. package/presets/opencode/java/rules/anti-hallucination-contract.md +2 -0
  394. package/presets/opencode/java/rules/java-app-core.md +1 -3
  395. package/presets/opencode/java/rules/language-policy.md +24 -16
  396. package/presets/opencode/mcp-ts/REPO_AGENTS.md +1 -3
  397. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  398. package/presets/opencode/mcp-ts/commands/task-continue.md +1 -1
  399. package/presets/opencode/mcp-ts/commands/task.md +1 -3
  400. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  401. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -1
  402. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +23 -7
  403. package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +1 -1
  404. package/presets/opencode/mcp-ts/rules/anti-hallucination-contract.md +2 -0
  405. package/presets/opencode/mcp-ts/rules/language-policy.md +24 -16
  406. package/presets/opencode/mcp-ts/rules/mcp-ts-app-core.md +1 -3
  407. package/presets/opencode/next/REPO_AGENTS.md +2 -4
  408. package/presets/opencode/next/adapter-map.json +5 -5
  409. package/presets/opencode/next/agents/build-verifier.md +2 -0
  410. package/presets/opencode/next/agents/feature-developer.md +9 -0
  411. package/presets/opencode/next/agents/openspec-author.md +26 -2
  412. package/presets/opencode/next/agents/task-analyst.md +20 -6
  413. package/presets/opencode/next/agents/task-router.md +31 -2
  414. package/presets/opencode/next/ai-local/conventions.md +20 -0
  415. package/presets/opencode/next/ai-local/rules/task-levels.md +40 -0
  416. package/presets/opencode/next/commands/task-continue.md +1 -1
  417. package/presets/opencode/next/commands/task.md +1 -3
  418. package/presets/opencode/next/hooks/chain-team-phases.sh +1080 -4
  419. package/presets/opencode/next/rules/agent-team-intake.md +1 -1
  420. package/presets/opencode/next/rules/agent-team-orchestrator.md +23 -7
  421. package/presets/opencode/next/rules/ai-local-overlay.md +2 -2
  422. package/presets/opencode/next/rules/anti-hallucination-contract.md +2 -0
  423. package/presets/opencode/next/rules/language-policy.md +24 -16
  424. package/presets/opencode/next/rules/next-app-core.md +1 -3
  425. package/presets/opencode/nuxt/REPO_AGENTS.md +1 -3
  426. package/presets/opencode/nuxt/adapter-map.json +1 -1
  427. package/presets/opencode/nuxt/commands/task-continue.md +1 -1
  428. package/presets/opencode/nuxt/commands/task.md +1 -3
  429. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +1080 -4
  430. package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -1
  431. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +23 -7
  432. package/presets/opencode/nuxt/rules/ai-local-overlay.md +1 -1
  433. package/presets/opencode/nuxt/rules/anti-hallucination-contract.md +2 -0
  434. package/presets/opencode/nuxt/rules/language-policy.md +24 -16
  435. package/presets/opencode/nuxt/rules/nuxt-app-core.md +1 -3
  436. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +1 -3
  437. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  438. package/presets/opencode/php-hexagonal/commands/task-continue.md +1 -1
  439. package/presets/opencode/php-hexagonal/commands/task.md +1 -3
  440. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  441. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -1
  442. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +23 -7
  443. package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +1 -1
  444. package/presets/opencode/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
  445. package/presets/opencode/php-hexagonal/rules/language-policy.md +24 -16
  446. package/presets/opencode/php-hexagonal/rules/php-app-core.md +1 -3
  447. package/presets/opencode/php-laravel/REPO_AGENTS.md +1 -3
  448. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  449. package/presets/opencode/php-laravel/commands/task-continue.md +1 -1
  450. package/presets/opencode/php-laravel/commands/task.md +1 -3
  451. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +1080 -4
  452. package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -1
  453. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +23 -7
  454. package/presets/opencode/php-laravel/rules/ai-local-overlay.md +1 -1
  455. package/presets/opencode/php-laravel/rules/anti-hallucination-contract.md +2 -0
  456. package/presets/opencode/php-laravel/rules/language-policy.md +24 -16
  457. package/presets/opencode/php-laravel/rules/laravel-app-core.md +1 -3
  458. package/presets/opencode/svelte/REPO_AGENTS.md +1 -3
  459. package/presets/opencode/svelte/adapter-map.json +1 -1
  460. package/presets/opencode/svelte/commands/task-continue.md +1 -1
  461. package/presets/opencode/svelte/commands/task.md +1 -3
  462. package/presets/opencode/svelte/hooks/chain-team-phases.sh +1080 -4
  463. package/presets/opencode/svelte/rules/agent-team-intake.md +1 -1
  464. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +23 -7
  465. package/presets/opencode/svelte/rules/ai-local-overlay.md +1 -1
  466. package/presets/opencode/svelte/rules/anti-hallucination-contract.md +2 -0
  467. package/presets/opencode/svelte/rules/language-policy.md +24 -16
  468. package/presets/opencode/svelte/rules/svelte-app-core.md +1 -3
@@ -14,7 +14,7 @@ When the user message looks like a **work request** (implement, add, fix, refact
14
14
  3. Pure questions (“how does X work”, “explain”) — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
15
15
  4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
16
16
  5. Every **work request** — with or without `/task`, and even when the user says “no pipeline” / “just do it” — persists the **verbatim** original prompt at `.ai.local/team/tasks/<slug>/prompt.md`. Prefer `/task` (its **Slug** step writes it). If handling inline without `/task`, first create the slug dir and write `prompt.md` (write-if-absent), then proceed. Pure questions and trivial one-liners are not work requests → no file. On an inline follow-up for an existing slug (no `/task`) where the user authors new text, append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; create on first append; exclude machine-generated and empty/argument-less invocations).
17
- 6. **Resolve the dialogue language before you speak to the user.** Read the `## Language` section of `.ai.local/conventions.md` (nearest `.ai.local` first); else infer from the prompt language; else English (mixed → dominant). Persist it once in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line, and reuse it for the whole task. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
17
+ 6. **Reuse the dialogue language already resolved on this turn** (always-on `ai-local-overlay` / **language-policy**). A question and a message without a slash command still resolve before you speak. When this request writes `prompt.md`, persist that tag once in the header (`language: <BCP-47>`) + a `.memlog.md` `event:` line. Development, reasoning, and artifacts stay English. The setting wins over a mid-task prompt switch (surface it once, never ask). See **language-policy**.
18
18
 
19
19
  Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
20
20
 
@@ -169,20 +169,13 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
169
169
  8. When all steps complete, suggest `/technical-retro <slug>`.
170
170
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
171
171
  10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). Not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
172
- 11. **Answer the user in the resolved dialogue language for the whole task.** Resolve once at task start
173
- (`.ai.local` `## Language` → prompt language → English) and pass it to every step; `/task-continue` keeps
174
- it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See
175
- **language-policy**.
172
+ 11. **Answer the user in the resolved dialogue language for the whole task.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English). Pass that tag to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
176
173
 
177
174
  ## Team artifact I/O (Cursor Shell sandbox)
178
175
 
179
176
  - **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
180
177
  - **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
181
- - **Answer in the resolved dialogue language.** Resolve once at task start (`.ai.local` `## Language` →
182
- prompt language → English; mixed → dominant; nearest `.ai.local` wins) and reuse it for every user-facing
183
- message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a
184
- `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and
185
- artifacts stay **English**. See **language-policy**.
178
+ - **Answer in the resolved dialogue language.** The always-on language rule already resolved it on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins). Reuse it for every user-facing message and `/task-continue`. Record the tag in the `prompt.md` header (`language: <BCP-47>`) + a `.memlog.md` `event:` line; a later correction is an append-only memlog event. Development, reasoning, and artifacts stay **English**. See **language-policy**.
186
179
 
187
180
  - Create/update team task dirs with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC).
188
181
  - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
@@ -16,7 +16,7 @@ This rule is mandatory. **You MUST** obey it on every turn, without exception.
16
16
  4. **Activate seeds** — if `.ai.local/rules-library/<seed>.md` on the active chain matches the task, treat it as the applicable local rule and tell the owner to move it into that overlay's `rules/`. Seeds stay inactive until moved. Do not read the whole library up front.
17
17
  5. **Conflict** — if a local rule conflicts with a preset rule, **the local rule wins**. If a local rule body contains `override: kill <preset-rule-name>`, drop that preset rule from your context window entirely.
18
18
  6. **Acknowledge** — when answering a user question, briefly state which `.ai.local/` rules apply to the current task (one line is enough). Format: `Using .ai.local: <rule-name>(, <rule-name>)*`. If the probe prints `overlays=0`, do NOT mention this rule.
19
- 7. **Language** — reply to the user in their **native language**: use the tag already stored for the task; when it is absent, read the `## Language` section of the nearest `conventions.md` on the chain; if unset, infer from the prompt language; else English. A newly entered overlay does not switch the task language. Development, reasoning, and all artifacts stay **English**. See `language-policy`.
19
+ 7. **Language** — on every user message, before you answer, resolve the dialogue language and reply in the user's **native language**. Order: `language:` already stored for an active task; else the `## Language` section of the nearest `conventions.md`; else infer from the prompt (mixed → dominant); else English. A question and a message without a slash command still resolve. Commands reuse this resolution. A newly entered overlay does not switch the task language. Development, reasoning, and all artifacts stay **English**. See `language-policy`.
20
20
  8. **Re-read** — before answering a question that touches a local rule, re-read that file.
21
21
 
22
22
  If the script is missing, read the root `.ai.local/rules/*.md` and `.ai.local/conventions.md` only.
@@ -19,6 +19,8 @@ Do not invent MCP or tool input schemas. Read the installed schema, or mark unce
19
19
 
20
20
  `// VERIFY` is an uncertainty marker. It is not confirmation and it is not a passing check.
21
21
 
22
+ For team specs and `brief.md`, the artifact marker is a literal `[NEEDS CLARIFICATION]` line for each unresolved product decision. This contract points at that marker. `// VERIFY` stays a code comment and is not a spec token.
23
+
22
24
  Context7 is optional. When it is down or absent, write `// VERIFY` and state the uncertainty. Do not block the pipeline and do not invent the signature.
23
25
 
24
26
  Status claims follow `verification-before-completion`. Procedural rules stay in `anti-sycophancy-discipline`. Stack floors stay in their own stems.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Native-language dialogue policy: development/reasoning/artifacts stay English; every user-facing interaction uses the user's native language, resolved from .ai.local and persisted per task."
2
+ description: "Native-language dialogue policy: development/reasoning/artifacts stay English; every user-facing message, including one without a command, uses the user's native language, resolved on every turn from .ai.local."
3
3
  globs:
4
4
  - .ai.local/**/*
5
5
  - AGENTS.md
@@ -11,9 +11,10 @@ alwaysApply: false
11
11
 
12
12
  # Language policy
13
13
 
14
- Behavior contract for **every agent and command in any consumer repo** — stack-agnostic. Not a
15
- preset-authoring meta rule. The essentials are anchored on the always-on surfaces; this rule is the
16
- detailed reference.
14
+ Behavior contract for **every agent in any consumer repo** — stack-agnostic. Not a
15
+ preset-authoring meta rule. Resolve the dialogue language on every user message from the
16
+ always-on surfaces (`ai-local-overlay`, the stack app-core, root `AGENTS.md`). This file
17
+ is the detailed reference. A slash command does not gate resolution.
17
18
 
18
19
  ## Two halves (mandatory)
19
20
 
@@ -23,30 +24,37 @@ detailed reference.
23
24
  code, identifiers, logs, or artifacts.
24
25
  2. **Every user-facing interaction is in the user's native language.** Clarifying questions, plan /
25
26
  human-gate prompts, `/task-continue` prompts, status answers, plan/progress summaries, and error
26
- escalations are written in the resolved language. Every such message — no exception.
27
+ escalations are written in the resolved language. Every such message — a question, a one-liner, or a
28
+ slash command — no exception.
27
29
 
28
- ## Resolution (ordered)
30
+ ## Resolution (every user message)
29
31
 
30
- 1. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
32
+ Resolve on every user message, before you answer. Do not wait for `/task`, `/update`, or any other
33
+ command. Those commands reuse the language this step already resolved.
34
+
35
+ 1. **Active task tag** — when a task is in progress, the `language:` value already stored in that task's
36
+ `prompt.md`.
37
+ 2. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
31
38
  **nearest** `.ai.local` wins in a monorepo.
32
- 2. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
39
+ 3. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
33
40
  the request.
34
- 3. Otherwise **English** (English-only / ambiguous prompt).
41
+ 4. Otherwise **English** (English-only / ambiguous prompt).
35
42
 
36
- The `.ai.local` setting **wins over** a mid-task prompt in another language. On a disagreement, follow the
43
+ The `.ai.local` setting **wins over** a later prompt in another language. On a disagreement, follow the
37
44
  setting and surface the mismatch **once in one sentence** — never block, and **never ask a
38
- language-confirmation question**.
45
+ language-confirmation question**. A message with no task still resolves on this turn.
39
46
 
40
47
  ## Per-task persistence
41
48
 
42
- Resolve the language once at task start and reuse it for the whole task — every pipeline agent and every
43
- `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header (`language: <BCP-47>`) and an
44
- append-only `.memlog.md` `event:` checkpoint. A later correction is an append-only memlog event (the fenced
45
- verbatim block is frozen). Never store it in `status.json`, `metrics.json`, or an `artifacts[]` body.
49
+ When a task artifact is created, record the language already resolved above and reuse it for the whole
50
+ task — every pipeline agent and every `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header
51
+ (`language: <BCP-47>`) and an append-only `.memlog.md` `event:` checkpoint. A later correction is an
52
+ append-only memlog event (the fenced verbatim block is frozen). Never store it in `status.json`,
53
+ `metrics.json`, or an `artifacts[]` body.
46
54
 
47
55
  ## See also
48
56
 
49
- - `ai-local-overlay` — reads `.ai.local` every turn; carries the setting read.
50
- - `agent-team-intake` — resolves the language when a work request starts.
57
+ - `ai-local-overlay` — always-on; resolves the language on every user message.
58
+ - `agent-team-intake` — persists the already-resolved language when a work request starts.
51
59
  - `agent-team-orchestrator` — carries the resolved language across steps.
52
60
  - `agent-artifact-contracts` — the `prompt.md` header contract.
@@ -29,6 +29,4 @@ Boundaries — **`mcp-server-boundaries`**. Tooling — requestable **`mcp-ts-to
29
29
 
30
30
  ## Language
31
31
 
32
- Development, reasoning, and artifacts stay **English**; every user-facing message (questions, gate prompts,
33
- status, summaries, escalations) uses the user's **native language** — resolved from `.ai.local`
34
- (`## Language`) or the prompt, else English. See `language-policy`.
32
+ On every user message, before you answer, resolve the dialogue language and reply in the user's **native language**, including a question and a message without a slash command. Order: stored task `language:`, else `.ai.local` (`## Language`), else the prompt, else English. Development, reasoning, and artifacts stay **English**. Commands reuse this resolution. See `language-policy`.
@@ -7,9 +7,7 @@ Cross-tool repo-root guide. Tool-specific maps stay under `.cursor/AGENTS.md`, `
7
7
  - Treat this file as the **shared** entry for any agent (Cursor, Claude Code, Mavis, OpenCode, or other).
8
8
  - All four platforms ship **the same** root file. `init` overwrites it; content does not depend on which tool ran last.
9
9
  - Tool maps (agent-team tables, slash commands) live in `.cursor/AGENTS.md` / `.claude/CLAUDE.md` / `.mavis/AGENTS.md` / `.opencode/AGENTS.md` — use them when that tool is installed.
10
- - **Language.** Keep development, reasoning, and artifacts in **English**; answer the user in their
11
- **native language** (`.ai.local/conventions.md` `## Language`, else the prompt language, else English) for
12
- every question, gate prompt, status, and summary — see the `language-policy` rule.
10
+ - **Language.** On every user message, before you answer, resolve the dialogue language and answer in the user's **native language** (`.ai.local/conventions.md` `## Language`, else the prompt language, else English), including a question and a message without a slash command. Commands reuse this resolution. Development, reasoning, and artifacts stay **English**. See the `language-policy` rule.
13
11
  - Install:
14
12
 
15
13
  ```bash
@@ -90,7 +88,7 @@ Gotchas, local patterns, and team decisions: **`.ai.local/conventions.md`** (fil
90
88
 
91
89
  ## Seed library (`.ai.local/rules-library/`)
92
90
 
93
- `init` 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`, `task-levels`, `analytics-events`, `feature-flags-experiments`, `pwa-service-worker`, `qa-test-cases`, and the `storybook-*` set. (`forms-validation` is an active rule, not a seed.)
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.)
94
92
 
95
93
  ## Managed vs preserved
96
94
 
@@ -60,7 +60,7 @@ Copied to `.cursor/agents/` on `ai-rules init cursor --preset next`.
60
60
 
61
61
  ## Frontmatter `readonly`
62
62
 
63
- All pipeline agents — **`readonly: false`**. They need write access to `.ai.local/team/**` (`pipeline.json`, `brief.md`, `review.md`, `status.json`, …).
63
+ All pipeline agents — **`readonly: false`**. They need write access to `.ai.local/team/**` (`pipeline.json`, `brief.md`, `review.md`, `artifact-manifest.json`, …). Hooks own `status.json` and `metrics.json`.
64
64
 
65
65
  The “do not touch production / `app/**`” constraint is set **in the prompt body**, not via the `readonly` flag. In Cursor `readonly: true` blocks *any* file edits (including team artifacts) — that breaks the pipeline for team agents.
66
66
 
@@ -32,6 +32,8 @@ Use **`package-manager.mdc`** for the repo package manager.
32
32
 
33
33
  Prefer **`lint`** (= js + css + type-check) before handoff on large changes.
34
34
 
35
+ - **Preset twin/golden DoD.** When the change-set edits Cursor next agents and/or `presets/_shared/hooks/**` (or other generated twin surfaces), require `node scripts/fix-generated.mjs` then `yarn check:preset-structure` from `packages/ai-rules` with exit 0 before validation PASS.
36
+
35
37
  ## Verification before completion
36
38
 
37
39
  <!-- shared-core: quality/verification-before-completion.md -->
@@ -28,8 +28,17 @@ You are a senior frontend developer working in a Next.js monorepo with strict la
28
28
 
29
29
  - Do **not** start blocked tasks or tasks with incomplete dependencies.
30
30
  - **Unit tests must run before handoff** for mappers, store logic, and non-trivial pure functions.
31
+ - When the strict implementation rail is off or unset, that test-before-handoff rule is the implementation handoff text.
32
+ - When `pipeline.json` `implementationRail` is `on`:
33
+ - Write a failing test before any production edit.
34
+ - Use a branch or worktree before the first implementation task.
35
+ - Run `code-reviewer` between decomposition tasks.
36
+ - An open `[NEEDS CLARIFICATION]` line in `brief.md` blocks implementation.
37
+ - Debug retries for this handoff stop at two.
38
+ - L0, docs-only, research, and preset-only tasks do not take the rail. `build-verifier` and `code-reviewer` stay.
31
39
  - Mark completed tasks in `decomposition.md`.
32
40
  - Validation: **`post-change-lint.mdc`**. If pipeline next step is **`build-verifier`**, scoped lint/type-check on **changed files** is enough; full project lint is build-verifier's job.
41
+ - **Preset twin/golden DoD.** When the change-set edits Cursor next agents and/or `presets/_shared/hooks/**` (or other surfaces that require generated twins), from `packages/ai-rules` run `node scripts/fix-generated.mjs` then `yarn check:preset-structure` (exit 0) before implementation handoff.
33
42
 
34
43
  ## Zero improvisation
35
44
 
@@ -37,7 +37,17 @@ If `openspec/` is absent in the repo, stop and report `blocked` with the message
37
37
 
38
38
  ## Phase discipline (mirrors `/opsx:propose` → `/opsx:apply` → `/opsx:archive`)
39
39
 
40
- Pipeline step `scope` may encode a single phase or full lifecycle. Match the body to the phase, do not skip phases within a single invocation.
40
+ Pipeline step `scope` may encode a single phase or full lifecycle. Match the body to the phase. Phase 2 may start without Phase 1 only when the before-propose gate says propose is allowed without explore.
41
+
42
+ ### Spec-store checklist
43
+
44
+ Pick one case. Leave propose → validate → human merge → archive unchanged.
45
+
46
+ 1. Behavior of a capability already described as a delta spec → OpenSpec delta only.
47
+ 2. Page or feature document in `docs/specs` → that tree only (skill `spec-authoring`). This agent still refuses `app/**` and `docs/specs/**`.
48
+ 3. Both, when behavior and the published page change, with one human gate naming both paths.
49
+
50
+ An engineering task-list edit is not the living spec. A manifest receipt may name an existing OpenSpec change id as a cross-reference only.
41
51
 
42
52
  ### Phase 1 — Explore
43
53
 
@@ -48,6 +58,14 @@ Pipeline step `scope` may encode a single phase or full lifecycle. Match the bod
48
58
  5. Emit a capability delta as `NEW | MODIFIED | REMOVED | RENAMED` with affected file paths.
49
59
  6. If a required source artefact is missing (e.g. `architecture.md` not produced), set `blocked` with the gap, do not invent.
50
60
 
61
+ ### Before propose
62
+
63
+ - When `openDecisionCount` is 0 and no marker is open, propose is allowed without explore.
64
+ - When `openDecisionCount` is greater than 0, or a literal `[NEEDS CLARIFICATION]` line is open, or an `OQ-N` question id is still open, propose is blocked until an explore pass or a task-analyst spike is recorded.
65
+ - A non-OpenSpec pipeline does not gain an explore step.
66
+
67
+ `OQ-N` stays an OpenSpec question id. Read `openDecisionCount` from `pipeline.json` `routingDecision`. The open `[NEEDS CLARIFICATION]` marker is a literal line in `brief.md`. Phase 3 still runs `openspec validate <change-id> --type change --strict` and `openspec validate --specs --strict`. Do not make the expanded OpenSpec profile (`new`, `ff`, `bulk-archive`, and the rest) the default.
68
+
51
69
  ### Phase 2 — Propose
52
70
 
53
71
  Scaffold `openspec/changes/<change-id>/`:
@@ -121,7 +139,13 @@ If `scope` carries multiple phases (e.g. `openspec:<change-id>:propose+apply`),
121
139
  **Will not**
122
140
 
123
141
  - Edit `app/**`, `app/src/**`, `src/**`, or any production-code tree.
124
- - Edit `docs/specs/**` — that file tree belongs to skill `spec-authoring` (`docs/specs/INDEX.md` + page/feature templates). Hand off via `open_questions` if a request conflates the two.
142
+ - Edit `docs/specs/**` — that file tree belongs to skill `spec-authoring` (`docs/specs/INDEX.md` + page/feature templates). Hand off via `open_questions` if a request conflates the two. This agent still refuses `app/**` and `docs/specs/**`.
143
+ - Spec-store checklist, case 1: behavior of a capability already described as a delta spec → OpenSpec delta only.
144
+ - Spec-store checklist, case 2: a page or feature document in `docs/specs` → that tree only (skill `spec-authoring`).
145
+ - Spec-store checklist, case 3: both, when behavior and the published page change, with one human gate naming both paths.
146
+ - Replace the living spec with an engineering task-list edit. An engineering task-list edit is not the living spec.
147
+ - Change propose → validate → human merge → archive.
148
+ - Open a new spec store from a manifest receipt. A manifest receipt may name an existing OpenSpec change id as a cross-reference only.
125
149
  - Edit `openspec/specs/**` directly (apply via the change, never in place).
126
150
  - Skip the `## Non-goals` section in `proposal.md` even when the user omits it.
127
151
  - Use `scope: openspec-propose` in **new** pipelines — it is a legacy alias for `openspec:<change-id>`; keep emitting the correct scope name. (Tech-writer still carries the legacy alias for in-flight replays.)
@@ -34,13 +34,17 @@ Before decomposing: state the **goal frame** (goal, user value, success criteria
34
34
 
35
35
  <!-- shared-core: agent-team/plan-graph.md -->
36
36
 
37
- Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges form a **DAG** with a critical path and parallelizable groups. Large flows are staged into **Epics / stages** with **exit criteria** (ratchet: bounded tasks stay flat). Plan revision is a named, auditable operation (`decision: replan rev N → N+1` in `.memlog.md`, then re-gate). Parallelizable groups are **proven conflict-free** before the router may mark them `parallel: true` — disjoint declared `writeScopes`, distinct agents and `artifactOutputIds`, and no producer→consumer edge. Keep task IDs stable so `steps[].taskIds` / `steps[].dependsOn[]` reuse this vocabulary (see **plan-graph** § Conflict model).
37
+ Decompose as a **dependency graph**: each task carries `dependsOn[]`, the edges form a **DAG** with a critical path and parallelizable groups. Large flows are staged into **Epics / stages** with **exit criteria** (ratchet: bounded tasks stay flat). Plan revision is a named, auditable operation (`decision: replan rev N → N+1` in `.memlog.md`, then re-gate). Parallelizable groups are **proven conflict-free** before the router may mark them `parallel: true` — disjoint declared `writeScopes`, distinct agents and `artifactOutputIds`, and no producer→consumer edge. Keep task IDs stable so `steps[].taskIds` / `steps[].dependsOn[]` reuse this vocabulary (see **plan-graph** § Conflict model). Each task also lists the repo paths it may create or modify. Tasks with no `dependsOn` path between them keep those lists disjoint; a shared path stays sequential. The list is a subset of the implementing step's `writeScopes[]` when that step declares `writeScopes`. Do not put a `docs/specs/**` or `openspec/**` path and an `app/**` path in the same list. Maintain a `## Ready` section with the plan: the decomposition ready set is the task ids whose `dependsOn` are satisfied and whose manifest artifact or task row is not complete. A blocked row records `waiting_on` (the unmet dependency ids). See **plan-graph** § Ready.
38
+
39
+ ## Claude next hand-agent parity (sync-in-change-set)
40
+
41
+ Whenever decomposition Files cover edits to Cursor next `openspec-author` / `task-router` / `task-analyst`, also list the matching `presets/claude/next/agents/` paths. Cursor next is SoT; the same change-set applies equivalent substantive bullets to Claude. Do not treat documented exclusion as the default for this trio.
38
42
 
39
43
  ## Context budget & iterative refinement
40
44
 
41
45
  <!-- shared-core: quality/context-and-iteration.md -->
42
46
 
43
- Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`, so a run can resume from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
47
+ Work in bounded waves; delegate mechanical waves to repo scripts. **Checkpoint** progress to `.memlog.md` and record produced paths on the `implementation` manifest entry `authoritativePaths`. On resume, read `.ai.local/team/tasks/<slug>/focus.md` first as a resume aid only. It is a view, not the system of record, and it includes one decomposition ready-set line and one archive index line. The run still resumes from `artifact-manifest.json` + `.memlog.md` without re-deriving state. Refine with the named loop **draft → evaluate against named criteria → refine**.
44
48
 
45
49
  ## Self-review & context hygiene
46
50
 
@@ -62,7 +66,7 @@ A self-review defect that changes the output appends one `review-ledger.md` row
62
66
  2. Ask questions — **prefer one** unblocking question; **never more than 3** per iteration.
63
67
  3. List explicit **assumptions** when information is missing.
64
68
  4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
65
- 5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
69
+ 5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing. Each unresolved product decision is also one literal `[NEEDS CLARIFICATION]` line in `brief.md`.
66
70
  6. Repeat until DoR is met or the user explicitly accepts remaining risks.
67
71
 
68
72
  ## Definition of Ready checklist
@@ -74,6 +78,9 @@ Before writing artifacts, confirm:
74
78
  - [ ] **Risks and dependencies** are listed
75
79
  - [ ] **Decomposition** covers all layers touched (types, api, store, ui, tests)
76
80
  - [ ] Each task has layer, dependencies, and "done when"
81
+ - [ ] No literal `[NEEDS CLARIFICATION]` line remains in `brief.md`
82
+
83
+ A `brief.md` that still has one `[NEEDS CLARIFICATION]` line is blocked DoR (`applyReadiness: blocked`). Keep the same decision in `open_questions`. Each unresolved product decision is one such line. Accepting a remaining risk does not clear a line that is still in `brief.md`. When the line is removed, this check can pass and DoR can pass if the checklist above holds. A new spec carries at most three `[NEEDS CLARIFICATION]` lines.
77
84
 
78
85
  ## Artifacts (required output)
79
86
 
@@ -111,6 +118,7 @@ None | Affected — <surfaces: PD / medical data / analytics / SSR cookies / err
111
118
 
112
119
  ## Open questions
113
120
  - ...
121
+ - [NEEDS CLARIFICATION] <unresolved product decision>
114
122
  ```
115
123
 
116
124
  ### `decomposition.md`
@@ -120,13 +128,18 @@ None | Affected — <surfaces: PD / medical data / analytics / SSR cookies / err
120
128
 
121
129
  ## Tasks
122
130
 
123
- | ID | Layer | Description | dependsOn | Done when |
124
- |----|-------|-------------|-----------|-----------|
125
- | T1 | types | ... | — | ... |
131
+ | ID | Layer | Description | dependsOn | Files | Done when |
132
+ |----|-------|-------------|-----------|-------|-----------|
133
+ | T1 | types | ... | — | `app/src/types/example.ts` | ... |
126
134
 
127
135
  ## Dependency graph
128
136
  - edges: `T2 ← T1` · critical path: `T1 → …` · parallelizable groups: `T2 | T3`
129
137
 
138
+ ## Ready
139
+
140
+ - ready: `T1`
141
+ - blocked: `T2` waiting_on `T1`
142
+
130
143
  ## Epics / stages
131
144
 
132
145
  | id | name | tasks | exit criteria |
@@ -225,4 +238,5 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
225
238
  - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
226
239
  - **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
227
240
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present. `authoritativePaths` are relative to the task folder (`brief.md`), not the repo root; put external files in `evidencePaths`.
241
+ - A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags.
228
242
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -35,11 +35,19 @@ You are a task router for a Next.js frontend agent team. You **do not** implemen
35
35
  | `unit-only` | «unit», «юнит» (unit), «mapper tests», «покрой маппер» (cover mapper), «почини unit» (fix unit) | unit-test-planner → unit-test-generator, or unit-test-healer | <!-- i18n-keep: E4 -->
36
36
  | `e2e-only` | «e2e», «playwright», «browser test», «сценарии e2e» (e2e scenarios), «почини e2e» (fix e2e) | playwright-test-planner → playwright-test-generator, or playwright-test-healer | <!-- i18n-keep: E4 -->
37
37
  | `docs-only` | «документация» (documentation), «README», «changelog», «ADR», «migration guide» | task-analyst → tech-writer | <!-- i18n-keep: E4 -->
38
- | `openspec-change` | `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `openspec/changes`, `openspec/specs`, `openspec/config.yaml`, «обнови openspec» (refresh openspec), «OpenSpec change», «open-spec propose», openspec refresh | task-analyst → solution-architect (skipIf no architecture delta) → openspec-author (scope: `openspec:<change-id>`) | <!-- i18n-keep: E4 -->
38
+ | `openspec-change` | `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `openspec/changes`, `openspec/specs`, `openspec/config.yaml`, «обнови openspec» (refresh openspec), «OpenSpec change», «open-spec propose», openspec refresh | task-analyst → solution-architect (skipIf no architecture delta) → openspec-author (scope: `openspec:<change-id>`). Propose gate is the three lines under this table | <!-- i18n-keep: E4 -->
39
39
  | `refactor` | «рефакторинг» (refactoring), «без изменения поведения» (no behavior change), «почисти» (clean up) | task-analyst → feature-developer → build-verifier → code-reviewer | <!-- i18n-keep: E4 -->
40
40
  | `spike` | «исследуй» (investigate), «оцени» (estimate), «можно ли» (is it possible), «spike», proof of concept | task-analyst → solution-architect | <!-- i18n-keep: E4 -->
41
41
  | `retro` | «ретро» (retro), «разбор» (postmortem), «postmortem» | (no pipeline — orchestrator runs `/technical-retro`) | <!-- i18n-keep: E4 -->
42
42
 
43
+ `openspec-change` propose gate. The step list on that row stays `task-analyst` → `solution-architect` (skipIf no architecture delta) → `openspec-author`. Explore is not a new step.
44
+
45
+ - When `openDecisionCount` is 0 and no marker is open, propose is allowed without explore.
46
+ - When `openDecisionCount` is greater than 0, or a literal `[NEEDS CLARIFICATION]` line is open, or an `OQ-N` question id is still open, propose is blocked until an explore pass or a task-analyst spike is recorded.
47
+ - A non-OpenSpec pipeline does not gain an explore step.
48
+
49
+ `OQ-N` stays an OpenSpec question id. The open `[NEEDS CLARIFICATION]` marker is a literal line in `brief.md`.
50
+
43
51
  ## Pipeline profiles
44
52
 
45
53
  Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.json`. Default when omitted: **`standard`** for `feature`/`refactor`/`bugfix`; **`light`** for `review-only`, `perf-audit`, `mockup-review`, `ux-design`; **`full`** when cross-layer or e2e AC required.
@@ -52,6 +60,22 @@ Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.j
52
60
 
53
61
  **Light signals:** one file, one layer, explicit AC in prompt, no architectural risk. **Never skip `build-verifier`** after developer when `app/**` changed. **Skip `code-reviewer`** in light only for non-prod preset/docs tasks — for `app/src` changes prefer standard.
54
62
 
63
+ **Task level (L0–L3):** Apply `.ai.local/rules/task-levels.md` "Selection order" before the `light` | `standard` | `full` profile in the table above. Those three profiles keep the meanings in that table.
64
+
65
+ - One-file, non-compliance (the order has not already selected **L2**) → **L0** or skip-analyst **L1**, and does not require `brief.md`. **L0 does not require `brief.md`**. Skip-analyst **L1** is only the existing skip when AC/scope is already specified.
66
+ - Cross-boundary or compliance → **L2** or **L3**, and still includes the OpenSpec path from that rule's "Selection order" (the **L2** "Where" path `openspec/changes/<YYYY-MM-DD>-<slug>/` with `proposal.md`, `design.md`, and `tasks.md`). **L3** is that OpenSpec change plus the L1 execution files.
67
+
68
+ ## Strict implementation rail
69
+
70
+ Default off. Do not emit `implementationRail` unless this section turns it on. `"implementationRail": "on"` is the only on value. Omit the field for off. This does not change the L0–L3 selection order or the `light` | `standard` | `full` table above.
71
+
72
+ Set `"implementationRail": "on"` only when both are true:
73
+
74
+ - The task is a production app implementation (`feature`, `bugfix`, `refactor`, `migration`, or `a11y` whose scope includes application code).
75
+ - The user prompt or the task record asks for the strict implementation rail (`implementationRail: on` in the prompt, `brief.md`, or an existing task record).
76
+
77
+ L0, `docs-only`, research (`research`, `spike`), and preset-only tasks do not take the rail. Do not set the flag for them. `build-verifier` and `code-reviewer` stay on implementation pipelines. The hook reads `implementationRail`. It is not one of the hook-ignored plan-graph fields.
78
+
55
79
  ## Task class (spike / bounded / architectural)
56
80
 
57
81
  <!-- shared-core: agent-team/task-classification.md -->
@@ -115,7 +139,7 @@ Keep top-level `profile` and emit this top-level object in every new `pipeline.j
115
139
  - Classify intent `mockup-review` **before** `ux-design` **before** `review-only`. A `figma.com` URL with review-not-implement language is `mockup-review` even without the word «макет», including when the user said «ревью UX». <!-- i18n-keep: E4 -->
116
140
  - If UI stack and (required-signal or advisory UI AC), instruct **task-analyst** to load skill `ux-design` (no new pipeline step; analyst default model, not `strong`). Required-signal: user asked UX, or AC require flows/states, or spec-gen page/feature.
117
141
  - If the resolved scope touches UI paths (`app/src/ui/**`, or the repo's component-catalog root) on `feature` / `refactor`, insert **mockup-reviewer** before **feature-developer**. This includes a UI change with no `figma.com` URL; the reviewer then uses the AC / `ux-design.md`. Do not insert it when `profile` is `light` and the prompt has no `figma.com` URL and no required-signal UX AC. A `figma.com` URL still inserts **mockup-reviewer** on every profile, including `light`.
118
- - Skip **task-analyst** if AC/scope fully specified → document in `skipped`.
142
+ - Skip **task-analyst** if AC/scope fully specified → document in `skipped`. A one-file, non-compliance prompt that stays **L1** is skip-analyst **L1** and does not require `brief.md`. **L0 does not require `brief.md`** (see **Task level (L0–L3)**).
119
143
  - Add **solution-architect** for cross-layer / new public APIs — after analyst, before developer.
120
144
  - Add **api-contract-reviewer** for new/changed backend contracts — before developer.
121
145
  - Add **accessibility-reviewer** / **security-reviewer** after build-verifier (parallel when both apply).
@@ -131,8 +155,13 @@ A pipeline may carry a step graph. Emit it only for the **architectural** class
131
155
  - Set `parallel: true` (with an `agent` array) **only** for a set proven conflict-free: disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, none of `status.json` / `metrics.json` / `artifact-manifest.json` / `.metrics-receipts.json` in any scope.
132
156
  - A producer → consumer artifact pair is a `dependsOn` edge, never a parallel group.
133
157
  - **Never** put `mockup-reviewer` in a parallel group — its FAIL gate is serial.
158
+ - Overlapping `writeScopes` under `presets/**` force serial steps even when decomposition lists parallelizable groups; set `dependsOn` in leverage order when scopes overlap (see **plan-graph** § Conflict model).
134
159
  - Reference fixture: `team/fixtures/feature-parallel.json` (graph + one `parallel: true` step).
135
160
 
161
+ ## Claude next hand-agent parity (sync-in-change-set)
162
+
163
+ Whenever a change-set edits any of `presets/cursor/next/agents/openspec-author.md`, `task-router.md`, or `task-analyst.md`, the decomposition Files list and implementer scope **must** also include the matching `presets/claude/next/agents/` paths. Cursor next remains SoT; apply equivalent substantive bullets to the Claude copies in the same change-set. Intentional residual exclusion is not the default for these three agents.
164
+
136
165
  ## Model tiers (`steps[].model`)
137
166
 
138
167
  Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit → agent frontmatter default (see **Model matrix** in `agents/README.md`).
@@ -27,3 +27,23 @@ Consumer setting for user-facing dialogue. Change `en` to your BCP-47 tag (e.g.
27
27
  <!-- short pointers to ADRs / product choices that affect code -->
28
28
 
29
29
  -
30
+
31
+ ## Pending
32
+
33
+ A completed stop may append one explicit draft here. Never scan the repo on a turn.
34
+
35
+ Each line carries provenance: `incident: <id>` for a verified incident, or `read: <path>` for a file that was read.
36
+
37
+ A pending line is not a rule. A later run leaves an accepted Gotchas, Patterns, or Decisions line unchanged. A new provenance tag appends another pending line.
38
+
39
+ -
40
+
41
+ ## Advisory index
42
+
43
+ Advisory only. A row names a local rule and the kind of task it matches. The overlay probe still reads the full chain.
44
+
45
+ Pending drafts and `rules-library/` files stay inactive until a human moves a file into `.ai.local/rules/`.
46
+
47
+ | Local rule | Task kind |
48
+ |------------|-----------|
49
+ | — | — |
@@ -25,4 +25,16 @@ Every non-trivial task must live as a file artifact, never only in chat. Pick on
25
25
  4. Otherwise multi-step (planning + implementation + verification) → **L1**.
26
26
  5. Otherwise → **L0**.
27
27
 
28
+ L0 has no required files and does not use `brief.md`. Skip-analyst L1 (acceptance criteria and scope already specified) may omit `brief.md`. Any other L1 uses the files in the table. L2 and L3 keep the OpenSpec files in the table.
29
+
28
30
  Never demote a task to keep the artifact small.
31
+
32
+ ## Strict implementation rail
33
+
34
+ Default **off**. The flag is top-level `implementationRail` in `pipeline.json`. Omit the field, or set `"off"`. `"on"` is the only value that turns the rail on.
35
+
36
+ This flag does not change the selection order above. It does not change the `light` | `standard` | `full` profiles.
37
+
38
+ L0, docs-only, research, and preset-only tasks do not take the rail.
39
+
40
+ task-router sets `"implementationRail": "on"` only for a production app implementation task when the user or the task record asks for the strict implementation rail. The hook reads that field. It blocks the implementation handoff when the rail is on and a `[NEEDS CLARIFICATION]` line is open in `brief.md`, and it caps debug retries at two for that handoff only. When the rail is off or unset, those constraints are absent.
@@ -39,7 +39,7 @@ printf '%s\n' '{"status":"completed","action":"end_human_gate","activateNext":tr
39
39
 
40
40
  ## Checkpoint & resume
41
41
 
42
- Resume from the on-disk checkpoint, not from chat: read `.ai.local/team/tasks/<slug>/artifact-manifest.json` (authoritative paths per producer) and `.memlog.md` (`## <date>` + `event:` entries), skip completed waves, and continue at the first stage whose exit criteria are unmet. Record produced paths on the `implementation` manifest entry as you go. Do **not** overwrite or duplicate `.ai.local/team/tasks/<slug>/prompt.md` — it records the original ask (write-if-absent). Append the `/task-continue` arguments (when present) and any gate feedback verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; skip when the invocation carries no new user words).
42
+ Resume from the on-disk checkpoint, not from chat: read `.ai.local/team/tasks/<slug>/focus.md` first (a view, not the system of record), then `artifact-manifest.json` (authoritative paths per producer) and `.memlog.md` (`## <date>` + `event:` entries), skip completed waves, and continue at the first stage whose exit criteria are unmet. Record produced paths on the `implementation` manifest entry as you go. Do **not** overwrite or duplicate `.ai.local/team/tasks/<slug>/prompt.md` — it records the original ask (write-if-absent). Append the `/task-continue` arguments (when present) and any gate feedback verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; skip when the invocation carries no new user words).
43
43
 
44
44
  Plan revision during execution is a named, auditable operation: an evaluation oracle failing twice, a scope/requirement change, or a newly discovered dependency triggers `decision: replan rev N → N+1` in `.memlog.md`, an edit to `decomposition.md` (+ optional `planRevision`), and a **re-run of the affected gate**.
45
45
 
@@ -68,9 +68,7 @@ Before any specialist runs, `goal.md` is written and shown with the plan. When t
68
68
 
69
69
  ## Dialogue language
70
70
 
71
- Resolve the user-facing language once at task start (`.ai.local` `## Language` → prompt language → English;
72
- mixed → dominant) and record it in the `prompt.md` header (`language: <BCP-47>`). Reuse it for every
73
- user-facing message and `/task-continue`. See `language-policy`.
71
+ The always-on language rule already resolved the user-facing language on this turn (`.ai.local` `## Language` → prompt language → English; mixed → dominant). Record that tag in the `prompt.md` header (`language: <BCP-47>`) and reuse it for every user-facing message and `/task-continue`. This command records the tag. See `language-policy`.
74
72
 
75
73
 
76
74
  ## Metrics