@bonesofspring/ai-rules 0.2.43 → 0.2.45

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 (629) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/bin/lib/engine-scripts.js +6 -1
  3. package/docs/LOCAL-OVERLAY.md +3 -3
  4. package/docs/MAVIS.md +1 -1
  5. package/docs/OPENCODE.md +1 -1
  6. package/docs/PRESET-CONTRIBUTION.md +2 -2
  7. package/docs/PRESET-ENGLISH-STYLE.md +1 -1
  8. package/package.json +1 -1
  9. package/presets/_shared/README.md +1 -1
  10. package/presets/_shared/ai-local/scripts/efficacy-oracle.mjs +10 -2
  11. package/presets/_shared/ai-local/scripts/manifest.mjs +341 -0
  12. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +23 -1
  13. package/presets/_shared/core/agent-team/agent-team-intake.md +1 -1
  14. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +13 -4
  15. package/presets/_shared/core/agent-team/language-policy.md +24 -16
  16. package/presets/_shared/core/review/code-review-mr.md +9 -0
  17. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +2 -2
  18. package/presets/claude/android-kotlin/REPO_AGENTS.md +1 -3
  19. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  20. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  21. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  22. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  23. package/presets/claude/android-kotlin/agents/qa-tester.md +1 -1
  24. package/presets/claude/android-kotlin/commands/task.md +1 -3
  25. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +2 -2
  26. package/presets/claude/android-kotlin/rules/stack/android-app-core.md +1 -3
  27. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +1 -1
  28. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  29. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +1 -1
  30. package/presets/claude/android-kotlin/rules/tooling-and-review/code-review.md +9 -0
  31. package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +25 -17
  32. package/presets/claude/android-kotlin/team/README.md +17 -0
  33. package/presets/claude/go/REPO_AGENTS.md +1 -3
  34. package/presets/claude/go/agents/build-verifier.md +1 -1
  35. package/presets/claude/go/agents/code-reviewer.md +1 -1
  36. package/presets/claude/go/agents/debugger.md +1 -1
  37. package/presets/claude/go/agents/feature-developer.md +1 -1
  38. package/presets/claude/go/agents/qa-tester.md +1 -1
  39. package/presets/claude/go/commands/task.md +1 -3
  40. package/presets/claude/go/hooks/chain-team-phases.sh +2 -2
  41. package/presets/claude/go/rules/stack/go-app-core.md +1 -3
  42. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +1 -1
  43. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  44. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +1 -1
  45. package/presets/claude/go/rules/tooling-and-review/code-review.md +9 -0
  46. package/presets/claude/go/rules/tooling-and-review/language-policy.md +25 -17
  47. package/presets/claude/go/team/README.md +17 -0
  48. package/presets/claude/ios-swift/REPO_AGENTS.md +1 -3
  49. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  50. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  51. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  52. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  53. package/presets/claude/ios-swift/agents/qa-tester.md +1 -1
  54. package/presets/claude/ios-swift/commands/task.md +1 -3
  55. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +2 -2
  56. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +1 -3
  57. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +1 -1
  58. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  59. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +1 -1
  60. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +9 -0
  61. package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +25 -17
  62. package/presets/claude/ios-swift/team/README.md +17 -0
  63. package/presets/claude/java/REPO_AGENTS.md +1 -3
  64. package/presets/claude/java/agents/build-verifier.md +1 -1
  65. package/presets/claude/java/agents/code-reviewer.md +1 -1
  66. package/presets/claude/java/agents/debugger.md +1 -1
  67. package/presets/claude/java/agents/feature-developer.md +1 -1
  68. package/presets/claude/java/agents/qa-tester.md +1 -1
  69. package/presets/claude/java/commands/task.md +1 -3
  70. package/presets/claude/java/hooks/chain-team-phases.sh +2 -2
  71. package/presets/claude/java/rules/stack/java-app-core.md +1 -3
  72. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +1 -1
  73. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  74. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +1 -1
  75. package/presets/claude/java/rules/tooling-and-review/code-review.md +9 -0
  76. package/presets/claude/java/rules/tooling-and-review/language-policy.md +25 -17
  77. package/presets/claude/java/team/README.md +17 -0
  78. package/presets/claude/mcp-ts/REPO_AGENTS.md +1 -3
  79. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  80. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  81. package/presets/claude/mcp-ts/commands/task.md +1 -3
  82. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +2 -2
  83. package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +1 -3
  84. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +1 -1
  85. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  86. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +1 -1
  87. package/presets/claude/mcp-ts/rules/tooling-and-review/code-review.md +9 -0
  88. package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +25 -17
  89. package/presets/claude/mcp-ts/team/README.md +17 -0
  90. package/presets/claude/next/REPO_AGENTS.md +1 -3
  91. package/presets/claude/next/agents/build-verifier.md +1 -1
  92. package/presets/claude/next/agents/code-reviewer.md +1 -1
  93. package/presets/claude/next/agents/debugger.md +1 -1
  94. package/presets/claude/next/agents/feature-developer.md +1 -1
  95. package/presets/claude/next/agents/qa-tester.md +1 -1
  96. package/presets/claude/next/agents/security-reviewer.md +5 -0
  97. package/presets/claude/next/commands/task.md +1 -3
  98. package/presets/claude/next/hooks/chain-team-phases.sh +2 -2
  99. package/presets/claude/next/rules/stack/next-app-core.md +1 -3
  100. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +1 -1
  101. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  102. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
  103. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +9 -0
  104. package/presets/claude/next/rules/tooling-and-review/language-policy.md +25 -17
  105. package/presets/claude/next/team/README.md +17 -0
  106. package/presets/claude/nuxt/REPO_AGENTS.md +1 -3
  107. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  108. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  109. package/presets/claude/nuxt/agents/debugger.md +1 -1
  110. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  111. package/presets/claude/nuxt/agents/qa-tester.md +1 -1
  112. package/presets/claude/nuxt/commands/task.md +1 -3
  113. package/presets/claude/nuxt/hooks/chain-team-phases.sh +2 -2
  114. package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +1 -3
  115. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +1 -1
  116. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  117. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +1 -1
  118. package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +9 -0
  119. package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +25 -17
  120. package/presets/claude/nuxt/team/README.md +17 -0
  121. package/presets/claude/php-hexagonal/REPO_AGENTS.md +1 -3
  122. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  123. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  124. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  125. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  126. package/presets/claude/php-hexagonal/agents/qa-tester.md +1 -1
  127. package/presets/claude/php-hexagonal/commands/task.md +1 -3
  128. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +2 -2
  129. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +1 -3
  130. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +1 -1
  131. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  132. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +1 -1
  133. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-review.md +9 -0
  134. package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +25 -17
  135. package/presets/claude/php-hexagonal/team/README.md +17 -0
  136. package/presets/claude/php-laravel/REPO_AGENTS.md +1 -3
  137. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  138. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  139. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  140. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  141. package/presets/claude/php-laravel/agents/qa-tester.md +1 -1
  142. package/presets/claude/php-laravel/commands/task.md +1 -3
  143. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +2 -2
  144. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +1 -3
  145. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +1 -1
  146. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  147. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +1 -1
  148. package/presets/claude/php-laravel/rules/tooling-and-review/code-review.md +9 -0
  149. package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +25 -17
  150. package/presets/claude/php-laravel/team/README.md +17 -0
  151. package/presets/claude/svelte/REPO_AGENTS.md +1 -3
  152. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  153. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  154. package/presets/claude/svelte/agents/debugger.md +1 -1
  155. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  156. package/presets/claude/svelte/agents/qa-tester.md +1 -1
  157. package/presets/claude/svelte/commands/task.md +1 -3
  158. package/presets/claude/svelte/hooks/chain-team-phases.sh +2 -2
  159. package/presets/claude/svelte/rules/stack/svelte-app-core.md +1 -3
  160. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +1 -1
  161. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +13 -4
  162. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +1 -1
  163. package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +9 -0
  164. package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +25 -17
  165. package/presets/claude/svelte/team/README.md +17 -0
  166. package/presets/cursor/android-kotlin/REPO_AGENTS.md +1 -3
  167. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  168. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  169. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  170. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  171. package/presets/cursor/android-kotlin/agents/qa-tester.md +1 -1
  172. package/presets/cursor/android-kotlin/commands/task.md +1 -3
  173. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +2 -2
  174. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +1 -1
  175. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +3 -10
  176. package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +1 -1
  177. package/presets/cursor/android-kotlin/rules/android-app-core.mdc +1 -3
  178. package/presets/cursor/android-kotlin/rules/code-review-mr.mdc +9 -0
  179. package/presets/cursor/android-kotlin/rules/language-policy.mdc +25 -17
  180. package/presets/cursor/android-kotlin/team/README.md +17 -0
  181. package/presets/cursor/go/REPO_AGENTS.md +1 -3
  182. package/presets/cursor/go/agents/build-verifier.md +1 -1
  183. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  184. package/presets/cursor/go/agents/debugger.md +1 -1
  185. package/presets/cursor/go/agents/feature-developer.md +1 -1
  186. package/presets/cursor/go/agents/qa-tester.md +1 -1
  187. package/presets/cursor/go/commands/task.md +1 -3
  188. package/presets/cursor/go/hooks/chain-team-phases.sh +2 -2
  189. package/presets/cursor/go/rules/agent-team-intake.mdc +1 -1
  190. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +3 -10
  191. package/presets/cursor/go/rules/ai-local-overlay.mdc +1 -1
  192. package/presets/cursor/go/rules/code-review-mr.mdc +9 -0
  193. package/presets/cursor/go/rules/go-app-core.mdc +1 -3
  194. package/presets/cursor/go/rules/language-policy.mdc +25 -17
  195. package/presets/cursor/go/team/README.md +17 -0
  196. package/presets/cursor/ios-swift/REPO_AGENTS.md +1 -3
  197. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  198. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  199. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  200. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  201. package/presets/cursor/ios-swift/agents/qa-tester.md +1 -1
  202. package/presets/cursor/ios-swift/commands/task.md +1 -3
  203. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +2 -2
  204. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +1 -1
  205. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +3 -10
  206. package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +1 -1
  207. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +9 -0
  208. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +1 -3
  209. package/presets/cursor/ios-swift/rules/language-policy.mdc +25 -17
  210. package/presets/cursor/ios-swift/team/README.md +17 -0
  211. package/presets/cursor/java/REPO_AGENTS.md +1 -3
  212. package/presets/cursor/java/agents/build-verifier.md +1 -1
  213. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  214. package/presets/cursor/java/agents/debugger.md +1 -1
  215. package/presets/cursor/java/agents/feature-developer.md +1 -1
  216. package/presets/cursor/java/agents/qa-tester.md +1 -1
  217. package/presets/cursor/java/commands/task.md +1 -3
  218. package/presets/cursor/java/hooks/chain-team-phases.sh +2 -2
  219. package/presets/cursor/java/rules/agent-team-intake.mdc +1 -1
  220. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +3 -10
  221. package/presets/cursor/java/rules/ai-local-overlay.mdc +1 -1
  222. package/presets/cursor/java/rules/code-review-mr.mdc +9 -0
  223. package/presets/cursor/java/rules/java-app-core.mdc +1 -3
  224. package/presets/cursor/java/rules/language-policy.mdc +25 -17
  225. package/presets/cursor/java/team/README.md +17 -0
  226. package/presets/cursor/mcp-ts/REPO_AGENTS.md +1 -3
  227. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  228. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  229. package/presets/cursor/mcp-ts/commands/task.md +1 -3
  230. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +2 -2
  231. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +1 -1
  232. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +3 -10
  233. package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +1 -1
  234. package/presets/cursor/mcp-ts/rules/code-review-mr.mdc +9 -0
  235. package/presets/cursor/mcp-ts/rules/language-policy.mdc +25 -17
  236. package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +1 -3
  237. package/presets/cursor/mcp-ts/team/README.md +17 -0
  238. package/presets/cursor/next/REPO_AGENTS.md +1 -3
  239. package/presets/cursor/next/agents/build-verifier.md +1 -1
  240. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  241. package/presets/cursor/next/agents/debugger.md +1 -1
  242. package/presets/cursor/next/agents/feature-developer.md +1 -1
  243. package/presets/cursor/next/agents/qa-tester.md +1 -1
  244. package/presets/cursor/next/agents/security-reviewer.md +5 -0
  245. package/presets/cursor/next/commands/task.md +1 -3
  246. package/presets/cursor/next/hooks/chain-team-phases.sh +2 -2
  247. package/presets/cursor/next/rules/agent-team-intake.mdc +1 -1
  248. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -10
  249. package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
  250. package/presets/cursor/next/rules/code-review-mr.mdc +9 -0
  251. package/presets/cursor/next/rules/language-policy.mdc +25 -17
  252. package/presets/cursor/next/rules/next-app-core.mdc +1 -3
  253. package/presets/cursor/next/team/README.md +17 -0
  254. package/presets/cursor/nuxt/REPO_AGENTS.md +1 -3
  255. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  256. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  257. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  258. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  259. package/presets/cursor/nuxt/agents/qa-tester.md +1 -1
  260. package/presets/cursor/nuxt/commands/task.md +1 -3
  261. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +2 -2
  262. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +1 -1
  263. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +3 -10
  264. package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +1 -1
  265. package/presets/cursor/nuxt/rules/code-review-mr.mdc +9 -0
  266. package/presets/cursor/nuxt/rules/language-policy.mdc +25 -17
  267. package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +1 -3
  268. package/presets/cursor/nuxt/team/README.md +17 -0
  269. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +1 -3
  270. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  271. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  272. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  273. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  274. package/presets/cursor/php-hexagonal/agents/qa-tester.md +1 -1
  275. package/presets/cursor/php-hexagonal/commands/task.md +1 -3
  276. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +2 -2
  277. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +1 -1
  278. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +3 -10
  279. package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +1 -1
  280. package/presets/cursor/php-hexagonal/rules/code-review-mr.mdc +9 -0
  281. package/presets/cursor/php-hexagonal/rules/language-policy.mdc +25 -17
  282. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +1 -3
  283. package/presets/cursor/php-hexagonal/team/README.md +17 -0
  284. package/presets/cursor/php-laravel/REPO_AGENTS.md +1 -3
  285. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  286. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  287. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  288. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  289. package/presets/cursor/php-laravel/agents/qa-tester.md +1 -1
  290. package/presets/cursor/php-laravel/commands/task.md +1 -3
  291. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +2 -2
  292. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +1 -1
  293. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +3 -10
  294. package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +1 -1
  295. package/presets/cursor/php-laravel/rules/code-review-mr.mdc +9 -0
  296. package/presets/cursor/php-laravel/rules/language-policy.mdc +25 -17
  297. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +1 -3
  298. package/presets/cursor/php-laravel/team/README.md +17 -0
  299. package/presets/cursor/svelte/REPO_AGENTS.md +1 -3
  300. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  301. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  302. package/presets/cursor/svelte/agents/debugger.md +1 -1
  303. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  304. package/presets/cursor/svelte/agents/qa-tester.md +1 -1
  305. package/presets/cursor/svelte/commands/task.md +1 -3
  306. package/presets/cursor/svelte/hooks/chain-team-phases.sh +2 -2
  307. package/presets/cursor/svelte/rules/agent-team-intake.mdc +1 -1
  308. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +3 -10
  309. package/presets/cursor/svelte/rules/ai-local-overlay.mdc +1 -1
  310. package/presets/cursor/svelte/rules/code-review-mr.mdc +9 -0
  311. package/presets/cursor/svelte/rules/language-policy.mdc +25 -17
  312. package/presets/cursor/svelte/rules/svelte-app-core.mdc +1 -3
  313. package/presets/cursor/svelte/team/README.md +17 -0
  314. package/presets/mavis/android-kotlin/REPO_AGENTS.md +1 -3
  315. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  316. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  317. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  318. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  319. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  320. package/presets/mavis/android-kotlin/agents/qa-tester.md +1 -1
  321. package/presets/mavis/android-kotlin/commands/task.md +1 -3
  322. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +2 -2
  323. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +1 -1
  324. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +13 -4
  325. package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +1 -1
  326. package/presets/mavis/android-kotlin/rules/android-app-core.md +1 -3
  327. package/presets/mavis/android-kotlin/rules/code-review-mr.md +9 -0
  328. package/presets/mavis/android-kotlin/rules/language-policy.md +24 -16
  329. package/presets/mavis/android-kotlin/team/README.md +17 -0
  330. package/presets/mavis/go/REPO_AGENTS.md +1 -3
  331. package/presets/mavis/go/adapter-map.json +1 -1
  332. package/presets/mavis/go/agents/build-verifier.md +1 -1
  333. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  334. package/presets/mavis/go/agents/debugger.md +1 -1
  335. package/presets/mavis/go/agents/feature-developer.md +1 -1
  336. package/presets/mavis/go/agents/qa-tester.md +1 -1
  337. package/presets/mavis/go/commands/task.md +1 -3
  338. package/presets/mavis/go/hooks/chain-team-phases.sh +2 -2
  339. package/presets/mavis/go/rules/agent-team-intake.md +1 -1
  340. package/presets/mavis/go/rules/agent-team-orchestrator.md +13 -4
  341. package/presets/mavis/go/rules/ai-local-overlay.md +1 -1
  342. package/presets/mavis/go/rules/code-review-mr.md +9 -0
  343. package/presets/mavis/go/rules/go-app-core.md +1 -3
  344. package/presets/mavis/go/rules/language-policy.md +24 -16
  345. package/presets/mavis/go/team/README.md +17 -0
  346. package/presets/mavis/ios-swift/REPO_AGENTS.md +1 -3
  347. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  348. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  349. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  350. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  351. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  352. package/presets/mavis/ios-swift/agents/qa-tester.md +1 -1
  353. package/presets/mavis/ios-swift/commands/task.md +1 -3
  354. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +2 -2
  355. package/presets/mavis/ios-swift/rules/agent-team-intake.md +1 -1
  356. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +13 -4
  357. package/presets/mavis/ios-swift/rules/ai-local-overlay.md +1 -1
  358. package/presets/mavis/ios-swift/rules/code-review-mr.md +9 -0
  359. package/presets/mavis/ios-swift/rules/ios-app-core.md +1 -3
  360. package/presets/mavis/ios-swift/rules/language-policy.md +24 -16
  361. package/presets/mavis/ios-swift/team/README.md +17 -0
  362. package/presets/mavis/java/REPO_AGENTS.md +1 -3
  363. package/presets/mavis/java/adapter-map.json +1 -1
  364. package/presets/mavis/java/agents/build-verifier.md +1 -1
  365. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  366. package/presets/mavis/java/agents/debugger.md +1 -1
  367. package/presets/mavis/java/agents/feature-developer.md +1 -1
  368. package/presets/mavis/java/agents/qa-tester.md +1 -1
  369. package/presets/mavis/java/commands/task.md +1 -3
  370. package/presets/mavis/java/hooks/chain-team-phases.sh +2 -2
  371. package/presets/mavis/java/rules/agent-team-intake.md +1 -1
  372. package/presets/mavis/java/rules/agent-team-orchestrator.md +13 -4
  373. package/presets/mavis/java/rules/ai-local-overlay.md +1 -1
  374. package/presets/mavis/java/rules/code-review-mr.md +9 -0
  375. package/presets/mavis/java/rules/java-app-core.md +1 -3
  376. package/presets/mavis/java/rules/language-policy.md +24 -16
  377. package/presets/mavis/java/team/README.md +17 -0
  378. package/presets/mavis/mcp-ts/REPO_AGENTS.md +1 -3
  379. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  380. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  381. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  382. package/presets/mavis/mcp-ts/commands/task.md +1 -3
  383. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +2 -2
  384. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +1 -1
  385. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +13 -4
  386. package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +1 -1
  387. package/presets/mavis/mcp-ts/rules/code-review-mr.md +9 -0
  388. package/presets/mavis/mcp-ts/rules/language-policy.md +24 -16
  389. package/presets/mavis/mcp-ts/rules/mcp-ts-app-core.md +1 -3
  390. package/presets/mavis/mcp-ts/team/README.md +17 -0
  391. package/presets/mavis/next/REPO_AGENTS.md +1 -3
  392. package/presets/mavis/next/adapter-map.json +1 -1
  393. package/presets/mavis/next/agents/build-verifier.md +1 -1
  394. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  395. package/presets/mavis/next/agents/debugger.md +1 -1
  396. package/presets/mavis/next/agents/feature-developer.md +1 -1
  397. package/presets/mavis/next/agents/qa-tester.md +1 -1
  398. package/presets/mavis/next/agents/security-reviewer.md +5 -0
  399. package/presets/mavis/next/commands/task.md +1 -3
  400. package/presets/mavis/next/hooks/chain-team-phases.sh +2 -2
  401. package/presets/mavis/next/rules/agent-team-intake.md +1 -1
  402. package/presets/mavis/next/rules/agent-team-orchestrator.md +13 -4
  403. package/presets/mavis/next/rules/ai-local-overlay.md +1 -1
  404. package/presets/mavis/next/rules/code-review-mr.md +9 -0
  405. package/presets/mavis/next/rules/language-policy.md +24 -16
  406. package/presets/mavis/next/rules/next-app-core.md +1 -3
  407. package/presets/mavis/next/team/README.md +17 -0
  408. package/presets/mavis/nuxt/REPO_AGENTS.md +1 -3
  409. package/presets/mavis/nuxt/adapter-map.json +1 -1
  410. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  411. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  412. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  413. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  414. package/presets/mavis/nuxt/agents/qa-tester.md +1 -1
  415. package/presets/mavis/nuxt/commands/task.md +1 -3
  416. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +2 -2
  417. package/presets/mavis/nuxt/rules/agent-team-intake.md +1 -1
  418. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +13 -4
  419. package/presets/mavis/nuxt/rules/ai-local-overlay.md +1 -1
  420. package/presets/mavis/nuxt/rules/code-review-mr.md +9 -0
  421. package/presets/mavis/nuxt/rules/language-policy.md +24 -16
  422. package/presets/mavis/nuxt/rules/nuxt-app-core.md +1 -3
  423. package/presets/mavis/nuxt/team/README.md +17 -0
  424. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +1 -3
  425. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  426. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  427. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  428. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  429. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  430. package/presets/mavis/php-hexagonal/agents/qa-tester.md +1 -1
  431. package/presets/mavis/php-hexagonal/commands/task.md +1 -3
  432. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +2 -2
  433. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +1 -1
  434. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +13 -4
  435. package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +1 -1
  436. package/presets/mavis/php-hexagonal/rules/code-review-mr.md +9 -0
  437. package/presets/mavis/php-hexagonal/rules/language-policy.md +24 -16
  438. package/presets/mavis/php-hexagonal/rules/php-app-core.md +1 -3
  439. package/presets/mavis/php-hexagonal/team/README.md +17 -0
  440. package/presets/mavis/php-laravel/REPO_AGENTS.md +1 -3
  441. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  442. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  443. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  444. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  445. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  446. package/presets/mavis/php-laravel/agents/qa-tester.md +1 -1
  447. package/presets/mavis/php-laravel/commands/task.md +1 -3
  448. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +2 -2
  449. package/presets/mavis/php-laravel/rules/agent-team-intake.md +1 -1
  450. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +13 -4
  451. package/presets/mavis/php-laravel/rules/ai-local-overlay.md +1 -1
  452. package/presets/mavis/php-laravel/rules/code-review-mr.md +9 -0
  453. package/presets/mavis/php-laravel/rules/language-policy.md +24 -16
  454. package/presets/mavis/php-laravel/rules/laravel-app-core.md +1 -3
  455. package/presets/mavis/php-laravel/team/README.md +17 -0
  456. package/presets/mavis/svelte/REPO_AGENTS.md +1 -3
  457. package/presets/mavis/svelte/adapter-map.json +1 -1
  458. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  459. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  460. package/presets/mavis/svelte/agents/debugger.md +1 -1
  461. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  462. package/presets/mavis/svelte/agents/qa-tester.md +1 -1
  463. package/presets/mavis/svelte/commands/task.md +1 -3
  464. package/presets/mavis/svelte/hooks/chain-team-phases.sh +2 -2
  465. package/presets/mavis/svelte/rules/agent-team-intake.md +1 -1
  466. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +13 -4
  467. package/presets/mavis/svelte/rules/ai-local-overlay.md +1 -1
  468. package/presets/mavis/svelte/rules/code-review-mr.md +9 -0
  469. package/presets/mavis/svelte/rules/language-policy.md +24 -16
  470. package/presets/mavis/svelte/rules/svelte-app-core.md +1 -3
  471. package/presets/mavis/svelte/team/README.md +17 -0
  472. package/presets/opencode/android-kotlin/REPO_AGENTS.md +1 -3
  473. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  474. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  475. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  476. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  477. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  478. package/presets/opencode/android-kotlin/agents/qa-tester.md +1 -1
  479. package/presets/opencode/android-kotlin/commands/task.md +1 -3
  480. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +2 -2
  481. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +1 -1
  482. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +13 -4
  483. package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +1 -1
  484. package/presets/opencode/android-kotlin/rules/android-app-core.md +1 -3
  485. package/presets/opencode/android-kotlin/rules/code-review-mr.md +9 -0
  486. package/presets/opencode/android-kotlin/rules/language-policy.md +24 -16
  487. package/presets/opencode/android-kotlin/team/README.md +17 -0
  488. package/presets/opencode/go/REPO_AGENTS.md +1 -3
  489. package/presets/opencode/go/adapter-map.json +1 -1
  490. package/presets/opencode/go/agents/build-verifier.md +1 -1
  491. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  492. package/presets/opencode/go/agents/debugger.md +1 -1
  493. package/presets/opencode/go/agents/feature-developer.md +1 -1
  494. package/presets/opencode/go/agents/qa-tester.md +1 -1
  495. package/presets/opencode/go/commands/task.md +1 -3
  496. package/presets/opencode/go/hooks/chain-team-phases.sh +2 -2
  497. package/presets/opencode/go/rules/agent-team-intake.md +1 -1
  498. package/presets/opencode/go/rules/agent-team-orchestrator.md +13 -4
  499. package/presets/opencode/go/rules/ai-local-overlay.md +1 -1
  500. package/presets/opencode/go/rules/code-review-mr.md +9 -0
  501. package/presets/opencode/go/rules/go-app-core.md +1 -3
  502. package/presets/opencode/go/rules/language-policy.md +24 -16
  503. package/presets/opencode/go/team/README.md +17 -0
  504. package/presets/opencode/ios-swift/REPO_AGENTS.md +1 -3
  505. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  506. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  507. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  508. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  509. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  510. package/presets/opencode/ios-swift/agents/qa-tester.md +1 -1
  511. package/presets/opencode/ios-swift/commands/task.md +1 -3
  512. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +2 -2
  513. package/presets/opencode/ios-swift/rules/agent-team-intake.md +1 -1
  514. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +13 -4
  515. package/presets/opencode/ios-swift/rules/ai-local-overlay.md +1 -1
  516. package/presets/opencode/ios-swift/rules/code-review-mr.md +9 -0
  517. package/presets/opencode/ios-swift/rules/ios-app-core.md +1 -3
  518. package/presets/opencode/ios-swift/rules/language-policy.md +24 -16
  519. package/presets/opencode/ios-swift/team/README.md +17 -0
  520. package/presets/opencode/java/REPO_AGENTS.md +1 -3
  521. package/presets/opencode/java/adapter-map.json +1 -1
  522. package/presets/opencode/java/agents/build-verifier.md +1 -1
  523. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  524. package/presets/opencode/java/agents/debugger.md +1 -1
  525. package/presets/opencode/java/agents/feature-developer.md +1 -1
  526. package/presets/opencode/java/agents/qa-tester.md +1 -1
  527. package/presets/opencode/java/commands/task.md +1 -3
  528. package/presets/opencode/java/hooks/chain-team-phases.sh +2 -2
  529. package/presets/opencode/java/rules/agent-team-intake.md +1 -1
  530. package/presets/opencode/java/rules/agent-team-orchestrator.md +13 -4
  531. package/presets/opencode/java/rules/ai-local-overlay.md +1 -1
  532. package/presets/opencode/java/rules/code-review-mr.md +9 -0
  533. package/presets/opencode/java/rules/java-app-core.md +1 -3
  534. package/presets/opencode/java/rules/language-policy.md +24 -16
  535. package/presets/opencode/java/team/README.md +17 -0
  536. package/presets/opencode/mcp-ts/REPO_AGENTS.md +1 -3
  537. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  538. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  539. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  540. package/presets/opencode/mcp-ts/commands/task.md +1 -3
  541. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +2 -2
  542. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +1 -1
  543. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +13 -4
  544. package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +1 -1
  545. package/presets/opencode/mcp-ts/rules/code-review-mr.md +9 -0
  546. package/presets/opencode/mcp-ts/rules/language-policy.md +24 -16
  547. package/presets/opencode/mcp-ts/rules/mcp-ts-app-core.md +1 -3
  548. package/presets/opencode/mcp-ts/team/README.md +17 -0
  549. package/presets/opencode/next/REPO_AGENTS.md +1 -3
  550. package/presets/opencode/next/adapter-map.json +1 -1
  551. package/presets/opencode/next/agents/build-verifier.md +1 -1
  552. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  553. package/presets/opencode/next/agents/debugger.md +1 -1
  554. package/presets/opencode/next/agents/feature-developer.md +1 -1
  555. package/presets/opencode/next/agents/qa-tester.md +1 -1
  556. package/presets/opencode/next/agents/security-reviewer.md +5 -0
  557. package/presets/opencode/next/commands/task.md +1 -3
  558. package/presets/opencode/next/hooks/chain-team-phases.sh +2 -2
  559. package/presets/opencode/next/rules/agent-team-intake.md +1 -1
  560. package/presets/opencode/next/rules/agent-team-orchestrator.md +13 -4
  561. package/presets/opencode/next/rules/ai-local-overlay.md +1 -1
  562. package/presets/opencode/next/rules/code-review-mr.md +9 -0
  563. package/presets/opencode/next/rules/language-policy.md +24 -16
  564. package/presets/opencode/next/rules/next-app-core.md +1 -3
  565. package/presets/opencode/next/team/README.md +17 -0
  566. package/presets/opencode/nuxt/REPO_AGENTS.md +1 -3
  567. package/presets/opencode/nuxt/adapter-map.json +1 -1
  568. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  569. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  570. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  571. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  572. package/presets/opencode/nuxt/agents/qa-tester.md +1 -1
  573. package/presets/opencode/nuxt/commands/task.md +1 -3
  574. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +2 -2
  575. package/presets/opencode/nuxt/rules/agent-team-intake.md +1 -1
  576. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +13 -4
  577. package/presets/opencode/nuxt/rules/ai-local-overlay.md +1 -1
  578. package/presets/opencode/nuxt/rules/code-review-mr.md +9 -0
  579. package/presets/opencode/nuxt/rules/language-policy.md +24 -16
  580. package/presets/opencode/nuxt/rules/nuxt-app-core.md +1 -3
  581. package/presets/opencode/nuxt/team/README.md +17 -0
  582. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +1 -3
  583. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  584. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  585. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  586. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  587. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  588. package/presets/opencode/php-hexagonal/agents/qa-tester.md +1 -1
  589. package/presets/opencode/php-hexagonal/commands/task.md +1 -3
  590. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +2 -2
  591. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +1 -1
  592. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +13 -4
  593. package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +1 -1
  594. package/presets/opencode/php-hexagonal/rules/code-review-mr.md +9 -0
  595. package/presets/opencode/php-hexagonal/rules/language-policy.md +24 -16
  596. package/presets/opencode/php-hexagonal/rules/php-app-core.md +1 -3
  597. package/presets/opencode/php-hexagonal/team/README.md +17 -0
  598. package/presets/opencode/php-laravel/REPO_AGENTS.md +1 -3
  599. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  600. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  601. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  602. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  603. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  604. package/presets/opencode/php-laravel/agents/qa-tester.md +1 -1
  605. package/presets/opencode/php-laravel/commands/task.md +1 -3
  606. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +2 -2
  607. package/presets/opencode/php-laravel/rules/agent-team-intake.md +1 -1
  608. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +13 -4
  609. package/presets/opencode/php-laravel/rules/ai-local-overlay.md +1 -1
  610. package/presets/opencode/php-laravel/rules/code-review-mr.md +9 -0
  611. package/presets/opencode/php-laravel/rules/language-policy.md +24 -16
  612. package/presets/opencode/php-laravel/rules/laravel-app-core.md +1 -3
  613. package/presets/opencode/php-laravel/team/README.md +17 -0
  614. package/presets/opencode/svelte/REPO_AGENTS.md +1 -3
  615. package/presets/opencode/svelte/adapter-map.json +1 -1
  616. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  617. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  618. package/presets/opencode/svelte/agents/debugger.md +1 -1
  619. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  620. package/presets/opencode/svelte/agents/qa-tester.md +1 -1
  621. package/presets/opencode/svelte/commands/task.md +1 -3
  622. package/presets/opencode/svelte/hooks/chain-team-phases.sh +2 -2
  623. package/presets/opencode/svelte/rules/agent-team-intake.md +1 -1
  624. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +13 -4
  625. package/presets/opencode/svelte/rules/ai-local-overlay.md +1 -1
  626. package/presets/opencode/svelte/rules/code-review-mr.md +9 -0
  627. package/presets/opencode/svelte/rules/language-policy.md +24 -16
  628. package/presets/opencode/svelte/rules/svelte-app-core.md +1 -3
  629. package/presets/opencode/svelte/team/README.md +17 -0
@@ -123,12 +123,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
123
123
 
124
124
  - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
125
125
  - Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
126
- - Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
126
+ - Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
127
127
  - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
128
128
  - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
129
129
 
130
- ## Plan revision (replanning)
130
+ ## Out-of-band producer passes
131
+
132
+ A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
131
133
 
134
+ - Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
135
+ - Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
136
+ - Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
137
+ - Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
138
+ - Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
139
+
140
+ ## Plan revision (replanning)
132
141
  Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
133
142
 
134
143
  ## Context budget & checkpoint/resume
@@ -215,7 +224,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
215
224
  8. When all steps complete, suggest `/technical-retro <slug>`.
216
225
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
217
226
  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). It is 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.
218
- 11. **Answer the user in the resolved dialogue language for the whole task.** Resolve once at task start (`.ai.local` `## Language` → prompt language → English) and pass it to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
227
+ 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**.
219
228
  12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger. The role pipeline and the engineering graph are two linked objects: `pipeline.json` `steps[].dependsOn` still decides which agent runs; the decomposition ready set only chooses rows inside the active step. Reviewer and QA steps stay on the pipeline.
220
229
  13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model. Each decomposition task lists the repo paths it may create or modify. That list is a subset of the implementing step's `writeScopes[]` when the step declares `writeScopes`. Tasks with no `dependsOn` path between them keep those lists disjoint; a shared path stays sequential. `docs/specs/**` or `openspec/**` paths and `app/**` paths stay in different lists. `steps[].writeScopes[]` stays the role-level authority. Reviewer steps stay team-artifact only.
221
230
 
@@ -223,7 +232,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
223
232
 
224
233
  - **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. It is not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
225
234
  - **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.
226
- - **Answer in the resolved dialogue language.** Resolve once at task start (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins) and 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**.
235
+ - **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**.
227
236
  - 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).
228
237
  - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
229
238
  - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
@@ -1,8 +1,9 @@
1
1
  # Language policy
2
2
 
3
- Behavior contract for **every agent and command in any consumer repo** — stack-agnostic. Not a
4
- preset-authoring meta rule. The essentials are anchored on the always-on surfaces; this rule is the
5
- detailed reference.
3
+ Behavior contract for **every agent in any consumer repo** — stack-agnostic. Not a
4
+ preset-authoring meta rule. Resolve the dialogue language on every user message from the
5
+ always-on surfaces (`ai-local-overlay`, the stack app-core, root `AGENTS.md`). This file
6
+ is the detailed reference. A slash command does not gate resolution.
6
7
 
7
8
  ## Two halves (mandatory)
8
9
 
@@ -12,30 +13,37 @@ detailed reference.
12
13
  code, identifiers, logs, or artifacts.
13
14
  2. **Every user-facing interaction is in the user's native language.** Clarifying questions, plan /
14
15
  human-gate prompts, `/task-continue` prompts, status answers, plan/progress summaries, and error
15
- escalations are written in the resolved language. Every such message — no exception.
16
+ escalations are written in the resolved language. Every such message — a question, a one-liner, or a
17
+ slash command — no exception.
16
18
 
17
- ## Resolution (ordered)
19
+ ## Resolution (every user message)
18
20
 
19
- 1. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
21
+ Resolve on every user message, before you answer. Do not wait for `/task`, `/update`, or any other
22
+ command. Those commands reuse the language this step already resolved.
23
+
24
+ 1. **Active task tag** — when a task is in progress, the `language:` value already stored in that task's
25
+ `prompt.md`.
26
+ 2. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
20
27
  **nearest** `.ai.local` wins in a monorepo.
21
- 2. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
28
+ 3. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
22
29
  the request.
23
- 3. Otherwise **English** (English-only / ambiguous prompt).
30
+ 4. Otherwise **English** (English-only / ambiguous prompt).
24
31
 
25
- The `.ai.local` setting **wins over** a mid-task prompt in another language. On a disagreement, follow the
32
+ The `.ai.local` setting **wins over** a later prompt in another language. On a disagreement, follow the
26
33
  setting and surface the mismatch **once in one sentence** — never block, and **never ask a
27
- language-confirmation question**.
34
+ language-confirmation question**. A message with no task still resolves on this turn.
28
35
 
29
36
  ## Per-task persistence
30
37
 
31
- Resolve the language once at task start and reuse it for the whole task — every pipeline agent and every
32
- `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header (`language: <BCP-47>`) and an
33
- append-only `.memlog.md` `event:` checkpoint. A later correction is an append-only memlog event (the fenced
34
- verbatim block is frozen). Never store it in `status.json`, `metrics.json`, or an `artifacts[]` body.
38
+ When a task artifact is created, record the language already resolved above and reuse it for the whole
39
+ task — every pipeline agent and every `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header
40
+ (`language: <BCP-47>`) and an append-only `.memlog.md` `event:` checkpoint. A later correction is an
41
+ append-only memlog event (the fenced verbatim block is frozen). Never store it in `status.json`,
42
+ `metrics.json`, or an `artifacts[]` body.
35
43
 
36
44
  ## See also
37
45
 
38
- - `ai-local-overlay` — reads `.ai.local` every turn; carries the setting read.
39
- - `agent-team-intake` — resolves the language when a work request starts.
46
+ - `ai-local-overlay` — always-on; resolves the language on every user message.
47
+ - `agent-team-intake` — persists the already-resolved language when a work request starts.
40
48
  - `agent-team-orchestrator` — carries the resolved language across steps.
41
49
  - `agent-artifact-contracts` — the `prompt.md` header contract.
@@ -36,3 +36,12 @@ Procedure details live in skill `code-review`. Required shape:
36
36
  - Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
37
37
  - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
38
38
  - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
39
+
40
+ ## Verdict and terminal receipt
41
+
42
+ The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
43
+
44
+ - Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
45
+ - Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
46
+ - A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
47
+ - Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
@@ -724,9 +724,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
724
724
  const seeded = writeSkeletonManifest(manifestPath);
725
725
  const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
726
726
  if (seeded) {
727
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/team/tasks/${slug}/artifact-manifest.json with {schemaVersion:1, slug, artifacts:[]}, add the receipt for artifactOutputId "${expectedOutputId}", then resume with: /task-continue ${slug}` };
727
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
728
728
  }
729
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact and its receipt, then resume with: /task-continue ${slug}` };
729
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
730
730
  }
731
731
  try {
732
732
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
@@ -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
@@ -71,7 +71,7 @@ Write `.ai.local/team/tasks/<slug>/validation-report.md` with verdict, commands,
71
71
 
72
72
  Write the owned validation receipt (`completed` or `validation_failed`). Do not fix code — report only.
73
73
 
74
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
74
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
75
75
 
76
76
  ## Artifact contract
77
77
 
@@ -98,7 +98,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
98
98
 
99
99
  Do not mix this output with retrospective facilitation — keep review and retro separate.
100
100
 
101
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
101
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
102
102
 
103
103
  ## Design guidance
104
104
 
@@ -84,7 +84,7 @@ fixApplied: false
84
84
 
85
85
  Write the owned terminal receipt described under **Artifact contract**.
86
86
 
87
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
87
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
88
88
 
89
89
  ## 3-fix architecture gate
90
90
 
@@ -75,7 +75,7 @@ When copying from `next` into `android-kotlin` (or another stack):
75
75
 
76
76
  Emit the owned implementation receipt with outcome `completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
77
77
 
78
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
78
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
79
79
 
80
80
  ## Design guidance
81
81
 
@@ -66,7 +66,7 @@ When the task is mostly UI e2e, prefer `instrumentation-test-planner`, `instrume
66
66
 
67
67
  Write the owned terminal receipt described under **Artifact contract**.
68
68
 
69
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
69
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
70
70
 
71
71
  ## Artifact contract
72
72
 
@@ -65,9 +65,7 @@ Before any specialist runs, `goal.md` is written and shown with the plan. When t
65
65
 
66
66
  ## Dialogue language
67
67
 
68
- Resolve the user-facing language once at task start (`.ai.local` `## Language` → prompt language → English;
69
- mixed → dominant) and record it in the `prompt.md` header (`language: <BCP-47>`). Reuse it for every
70
- user-facing message and `/task-continue`. See `language-policy`.
68
+ 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`.
71
69
 
72
70
 
73
71
  ## Metrics
@@ -761,9 +761,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
761
761
  const seeded = writeSkeletonManifest(manifestPath);
762
762
  const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
763
763
  if (seeded) {
764
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/team/tasks/${slug}/artifact-manifest.json with {schemaVersion:1, slug, artifacts:[]}, add the receipt for artifactOutputId "${expectedOutputId}", then resume with: /task-continue ${slug}` };
764
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
765
765
  }
766
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact and its receipt, then resume with: /task-continue ${slug}` };
766
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
767
767
  }
768
768
  try {
769
769
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
@@ -28,6 +28,4 @@ Place new files next to analogs. Boundaries/DI — **`architecture-boundaries`**
28
28
 
29
29
  ## Language
30
30
 
31
- Development, reasoning, and artifacts stay **English**; every user-facing message (questions, gate prompts,
32
- status, summaries, escalations) uses the user's **native language** — resolved from `.ai.local`
33
- (`## Language`) or the prompt, else English. See `language-policy`.
31
+ 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`.
@@ -14,6 +14,6 @@ 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.
@@ -134,12 +134,21 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
134
134
 
135
135
  - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
136
136
  - Markdown remains detailed evidence; the manifest points to authoritative paths and records producer, status, timestamps, outcome, and evidence paths.
137
- - Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
137
+ - Agents upsert only the items they own in `manifest.artifacts[]` and preserve all foreign items in that array. Parallel agents use distinct IDs. Every write is a whole-file merge through `node .ai.local/scripts/manifest.mjs upsert …` under `.manifest.lock` (see the installed `team/README.md` § artifact-manifest.json — write protocol); the parent does not need to serialize merges, and a fragment/replace edit of the JSON is forbidden. The top-level array key is `artifacts` — not `entries`; see `agent-artifact-contracts.md` for the schema callout.
138
138
  - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite unrelated state, gate, retry, attempt, timestamp, or metrics fields.
139
139
  - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
140
140
 
141
- ## Plan revision (replanning)
141
+ ## Out-of-band producer passes
142
+
143
+ A producer invoked outside `pipeline.json.steps` — a remediation pass after a reviewer finding, a manual fix, a re-run of one agent — is still a run artifact, not an informal turn.
142
144
 
145
+ - Record it as one `event:` line in `.memlog.md`: the trigger, the agent, the files touched, and the gate that was re-run.
146
+ - Upsert its receipt into `artifact-manifest.json` as its own owned entry, never folded into the previous step's entry, with `outcome` and `evidencePaths`.
147
+ - Do not invent an `attemptId` for it. An id the hook did not allocate cannot be reconciled by the metrics ledger; leave the receipt unbound and let the `.memlog.md` line carry the provenance.
148
+ - Re-run the affected gate (the step's `build-verifier` or the owned check) after the pass. An unverified pass is not a delivery.
149
+ - Prefer the routed path: a `changes_requested` receipt already re-dispatches the developer and keeps the ledger intact. Out-of-band work is the fallback, used when the finding arrives after the gate or comes from a human.
150
+
151
+ ## Plan revision (replanning)
143
152
  Replanning is a **named, auditable operation** — never a silent reorder. Trigger it when an evaluation oracle fails twice on the same task, when scope or requirements change, or when a previously unknown dependency/consumer is discovered. Procedure: append `decision: replan rev N → N+1` (with the reason) to `.memlog.md`, update `decomposition.md` (task add/remove or dependency change) and any optional plan fields, then **re-run the affected gate**. Scope-changing revisions return to the human gate.
144
153
 
145
154
  ## Context budget & checkpoint/resume
@@ -226,7 +235,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
226
235
  8. When all steps complete, suggest `/technical-retro <slug>`.
227
236
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
228
237
  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). It is 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.
229
- 11. **Answer the user in the resolved dialogue language for the whole task.** Resolve once at task start (`.ai.local` `## Language` → prompt language → English) and pass it to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
238
+ 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**.
230
239
  12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger. The role pipeline and the engineering graph are two linked objects: `pipeline.json` `steps[].dependsOn` still decides which agent runs; the decomposition ready set only chooses rows inside the active step. Reviewer and QA steps stay on the pipeline.
231
240
  13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model. Each decomposition task lists the repo paths it may create or modify. That list is a subset of the implementing step's `writeScopes[]` when the step declares `writeScopes`. Tasks with no `dependsOn` path between them keep those lists disjoint; a shared path stays sequential. `docs/specs/**` or `openspec/**` paths and `app/**` paths stay in different lists. `steps[].writeScopes[]` stays the role-level authority. Reviewer steps stay team-artifact only.
232
241
 
@@ -234,7 +243,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
234
243
 
235
244
  - **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. It is not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
236
245
  - **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.
237
- - **Answer in the resolved dialogue language.** Resolve once at task start (`.ai.local` `## Language` → prompt language → English; mixed → dominant; nearest `.ai.local` wins) and 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**.
246
+ - **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**.
238
247
  - 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).
239
248
  - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
240
249
  - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
@@ -15,7 +15,7 @@ This rule is mandatory. **You MUST** obey it on every turn, without exception.
15
15
  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.
16
16
  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.
17
17
  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.
18
- 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`.
18
+ 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`.
19
19
  8. **Re-read** — before answering a question that touches a local rule, re-read that file.
20
20
 
21
21
  If the script is missing, read the root `.ai.local/rules/*.md` and `.ai.local/conventions.md` only.
@@ -44,6 +44,15 @@ Procedure details live in skill `code-review`. Required shape:
44
44
  - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
45
45
  - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
46
46
 
47
+ ## Verdict and terminal receipt
48
+
49
+ The verdict and the receipt are the same decision expressed twice — never let a fixable defect hide behind "notes".
50
+
51
+ - Any `blocker` or `important` finding (a scale that names `high`/`medium` maps them here) means the MR is **not** mergeable as-is: emit receipt outcome `changes_requested` so the orchestrator runs its existing developer retry, not `completed`.
52
+ - Reserve a notes-only verdict for `nit`/informational items. Reporting a non-cosmetic fixable defect as a note converts it into unplanned out-of-band work and leaves it unrecorded in the run ledger.
53
+ - A divergence between the frozen spec/design and the shipped code is a finding, never a note: cite the spec line and the code line in the same finding.
54
+ - Before freezing a wire contract, confirm the stated behaviour against the repository's existing handler/decoder convention; a spec that contradicts the codebase convention is the same finding class.
55
+
47
56
  ## Stack notes
48
57
 
49
58
  On-demand rule for review flows (not always-on).
@@ -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
  paths:
4
4
  - .ai.local/**/*
5
5
  - AGENTS.md
@@ -10,9 +10,10 @@ paths:
10
10
 
11
11
  # Language policy
12
12
 
13
- Behavior contract for **every agent and command in any consumer repo** — stack-agnostic. Not a
14
- preset-authoring meta rule. The essentials are anchored on the always-on surfaces; this rule is the
15
- detailed reference.
13
+ Behavior contract for **every agent in any consumer repo** — stack-agnostic. Not a
14
+ preset-authoring meta rule. Resolve the dialogue language on every user message from the
15
+ always-on surfaces (`ai-local-overlay`, the stack app-core, root `AGENTS.md`). This file
16
+ is the detailed reference. A slash command does not gate resolution.
16
17
 
17
18
  ## Two halves (mandatory)
18
19
 
@@ -22,30 +23,37 @@ detailed reference.
22
23
  code, identifiers, logs, or artifacts.
23
24
  2. **Every user-facing interaction is in the user's native language.** Clarifying questions, plan /
24
25
  human-gate prompts, `/task-continue` prompts, status answers, plan/progress summaries, and error
25
- escalations are written in the resolved language. Every such message — no exception.
26
+ escalations are written in the resolved language. Every such message — a question, a one-liner, or a
27
+ slash command — no exception.
26
28
 
27
- ## Resolution (ordered)
29
+ ## Resolution (every user message)
28
30
 
29
- 1. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
31
+ Resolve on every user message, before you answer. Do not wait for `/task`, `/update`, or any other
32
+ command. Those commands reuse the language this step already resolved.
33
+
34
+ 1. **Active task tag** — when a task is in progress, the `language:` value already stored in that task's
35
+ `prompt.md`.
36
+ 2. **Explicit `.ai.local` setting** — the `## Language` section of `.ai.local/conventions.md`. The
30
37
  **nearest** `.ai.local` wins in a monorepo.
31
- 2. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
38
+ 3. Otherwise **infer from the prompt language**. A mixed-language prompt uses the **dominant** language of
32
39
  the request.
33
- 3. Otherwise **English** (English-only / ambiguous prompt).
40
+ 4. Otherwise **English** (English-only / ambiguous prompt).
34
41
 
35
- The `.ai.local` setting **wins over** a mid-task prompt in another language. On a disagreement, follow the
42
+ The `.ai.local` setting **wins over** a later prompt in another language. On a disagreement, follow the
36
43
  setting and surface the mismatch **once in one sentence** — never block, and **never ask a
37
- language-confirmation question**.
44
+ language-confirmation question**. A message with no task still resolves on this turn.
38
45
 
39
46
  ## Per-task persistence
40
47
 
41
- Resolve the language once at task start and reuse it for the whole task — every pipeline agent and every
42
- `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header (`language: <BCP-47>`) and an
43
- append-only `.memlog.md` `event:` checkpoint. A later correction is an append-only memlog event (the fenced
44
- verbatim block is frozen). Never store it in `status.json`, `metrics.json`, or an `artifacts[]` body.
48
+ When a task artifact is created, record the language already resolved above and reuse it for the whole
49
+ task — every pipeline agent and every `/task-continue`. Persist the BCP-47 tag in the `prompt.md` header
50
+ (`language: <BCP-47>`) and an append-only `.memlog.md` `event:` checkpoint. A later correction is an
51
+ append-only memlog event (the fenced verbatim block is frozen). Never store it in `status.json`,
52
+ `metrics.json`, or an `artifacts[]` body.
45
53
 
46
54
  ## See also
47
55
 
48
- - `ai-local-overlay` — reads `.ai.local` every turn; carries the setting read.
49
- - `agent-team-intake` — resolves the language when a work request starts.
56
+ - `ai-local-overlay` — always-on; resolves the language on every user message.
57
+ - `agent-team-intake` — persists the already-resolved language when a work request starts.
50
58
  - `agent-team-orchestrator` — carries the resolved language across steps.
51
59
  - `agent-artifact-contracts` — the `prompt.md` header contract.
@@ -56,6 +56,23 @@ Bootstrap a slug by **writing** `pipeline.json` (editor Write tool). Do not `mkd
56
56
 
57
57
  Prefer `phase: executing`. States: `in_progress`, `completed`, `awaiting_approval` (`/task-continue`), `changes_requested`, `validation_failed`, `blocked` (graph mode still dispatches independent ready steps), `awaiting_artifact_receipt`.
58
58
 
59
+ ## artifact-manifest.json — write protocol
60
+
61
+ The manifest is a **whole-file merge target**. Producers rewrite it, and every write refreshes `updatedAt`, so a fragment/replace edit of the JSON fails its match and aborts the receipt. Merge by entry `id` and rewrite the file:
62
+
63
+ ```bash
64
+ node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> \
65
+ --outcome completed --paths brief.md,decomposition.md --acs AC-1 --tasks T1 --attempt <attemptId>
66
+ node .ai.local/scripts/manifest.mjs check --slug <slug>
67
+ ```
68
+
69
+ - Absent file → `manifest.mjs init --slug <slug>` (the hook seeds the same skeleton).
70
+ - Never patch the JSON with a fragment/replace edit (`edit`, `str_replace`, `apply_patch`): a foreign parallel write or a refreshed `updatedAt` breaks the match, the produced artifact ends up without a receipt, and the step stalls in `awaiting_artifact_receipt`.
71
+ - Merge or parse error → re-read and merge again, at most twice, then report `blocked` with the error. Never leave the file truncated.
72
+ - Parallel wave → the writer holds `.manifest.lock` in the task directory, so concurrent producers serialize; a hand-written merge must take the same lock.
73
+ - Plan closure → tick (`- [ ]` → `- [x]`) every `tasks.md` row this receipt closes, in the same turn. An unticked row makes `openspec list` report stale progress and hides the exit criteria from the next agent.
74
+ - Schema and completion conventions: `agent-team/agent-artifact-contracts.md`.
75
+
59
76
  ## Commands
60
77
 
61
78
  ```bash
@@ -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
@@ -64,4 +64,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
64
64
 
65
65
  ## Receipt binding
66
66
 
67
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
67
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -84,4 +84,4 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
84
84
 
85
85
  ## Receipt binding
86
86
 
87
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
87
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -90,4 +90,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
90
90
 
91
91
  ## Receipt binding
92
92
 
93
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
93
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -136,4 +136,4 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
136
136
 
137
137
  ## Receipt binding
138
138
 
139
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
139
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -45,4 +45,4 @@ Coordinate with existing plans under `.ai.local/team/tasks/<slug>/`.
45
45
 
46
46
  ## Receipt binding
47
47
 
48
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
48
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -63,9 +63,7 @@ Before any specialist runs, `goal.md` is written and shown with the plan. When t
63
63
 
64
64
  ## Dialogue language
65
65
 
66
- Resolve the user-facing language once at task start (`.ai.local` `## Language` → prompt language → English;
67
- mixed → dominant) and record it in the `prompt.md` header (`language: <BCP-47>`). Reuse it for every
68
- user-facing message and `/task-continue`. See `language-policy`.
66
+ 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`.
69
67
 
70
68
 
71
69
  ## Metrics
@@ -760,9 +760,9 @@ function readBoundReceiptOutcome(agent, step, resolved) {
760
760
  const seeded = writeSkeletonManifest(manifestPath);
761
761
  const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
762
762
  if (seeded) {
763
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/team/tasks/${slug}/artifact-manifest.json with {schemaVersion:1, slug, artifacts:[]}, add the receipt for artifactOutputId "${expectedOutputId}", then resume with: /task-continue ${slug}` };
763
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create it with "node .ai.local/scripts/manifest.mjs init --slug ${slug}", then merge the receipt for artifactOutputId "${expectedOutputId}" with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
764
764
  }
765
- return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact and its receipt, then resume with: /task-continue ${slug}` };
765
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact, then merge its receipt with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${expectedOutputId} --producer ${agent} --outcome completed --paths <artifact>.md" (whole-file merge; never patch the JSON), then resume with: /task-continue ${slug}` };
766
766
  }
767
767
  try {
768
768
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
@@ -32,6 +32,4 @@ Boundaries — **`architecture/boundaries.md`**. Tooling — requestable **`tool
32
32
 
33
33
  ## Language
34
34
 
35
- Development, reasoning, and artifacts stay **English**; every user-facing message (questions, gate prompts,
36
- status, summaries, escalations) uses the user's **native language** — resolved from `.ai.local`
37
- (`## Language`) or the prompt, else English. See `language-policy`.
35
+ 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`.
@@ -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