@bonesofspring/ai-rules 0.2.32 → 0.2.34

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 (1179) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/docs/LOCAL-OVERLAY.md +16 -1
  4. package/docs/PRESET-CONTRIBUTION.md +13 -4
  5. package/docs/PRESET-ENGLISH-STYLE.md +23 -1
  6. package/package.json +5 -1
  7. package/presets/_shared/README.md +10 -4
  8. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +61 -0
  9. package/presets/_shared/core/agent-team/agent-task-metrics.md +12 -1
  10. package/presets/_shared/core/agent-team/agent-team-intake.md +3 -0
  11. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +39 -5
  12. package/presets/_shared/core/agent-team/language-policy.md +41 -0
  13. package/presets/_shared/core/agent-team/plan-graph.md +63 -0
  14. package/presets/_shared/core/agent-team/task-classification.md +4 -0
  15. package/presets/_shared/core/agent-team/task-framing.md +45 -0
  16. package/presets/_shared/core/architecture/feature-delivery-workflow.md +11 -1
  17. package/presets/_shared/core/meta/preset-goals.md +29 -0
  18. package/presets/_shared/core/meta/preset-layering.md +1 -1
  19. package/presets/_shared/core/meta/preset-pr-checklist.md +4 -0
  20. package/presets/_shared/core/meta/preset-twin-sync.md +19 -77
  21. package/presets/_shared/core/meta/preset-writing-style.md +40 -0
  22. package/presets/_shared/core/quality/code-quality-and-refactoring.md +20 -1
  23. package/presets/_shared/core/quality/context-and-iteration.md +29 -0
  24. package/presets/_shared/core/quality/self-review-and-context-hygiene.md +51 -0
  25. package/presets/_shared/core/quality/verification-before-completion.md +4 -0
  26. package/presets/_shared/core/review/mockup-review.md +56 -1
  27. package/presets/claude/android-kotlin/REPO_AGENTS.md +3 -0
  28. package/presets/claude/android-kotlin/agents/README.md +6 -0
  29. package/presets/claude/android-kotlin/agents/build-verifier.md +12 -0
  30. package/presets/claude/android-kotlin/agents/code-reviewer.md +12 -0
  31. package/presets/claude/android-kotlin/agents/debugger.md +12 -0
  32. package/presets/claude/android-kotlin/agents/feature-developer.md +12 -0
  33. package/presets/claude/android-kotlin/agents/task-analyst.md +30 -0
  34. package/presets/claude/android-kotlin/agents/task-router.md +18 -0
  35. package/presets/claude/android-kotlin/ai-local/conventions.md +8 -0
  36. package/presets/claude/android-kotlin/commands/task-continue.md +8 -0
  37. package/presets/claude/android-kotlin/commands/task.md +14 -1
  38. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +369 -16
  39. package/presets/claude/android-kotlin/rules/README.md +5 -0
  40. package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +4 -0
  41. package/presets/claude/android-kotlin/rules/stack/android-app-core.md +6 -0
  42. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-intake.md +3 -0
  43. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +43 -2
  44. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +4 -0
  45. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +20 -1
  46. package/presets/claude/android-kotlin/rules/tooling-and-review/language-policy.md +52 -0
  47. package/presets/claude/android-kotlin/rules/tooling-and-review/mockup-review.md +56 -1
  48. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-goals.md +40 -0
  49. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +1 -1
  50. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  51. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +19 -77
  52. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-writing-style.md +51 -0
  53. package/presets/claude/android-kotlin/team/README.md +21 -1
  54. package/presets/claude/go/REPO_AGENTS.md +3 -0
  55. package/presets/claude/go/agents/README.md +6 -0
  56. package/presets/claude/go/agents/build-verifier.md +12 -0
  57. package/presets/claude/go/agents/code-reviewer.md +12 -0
  58. package/presets/claude/go/agents/debugger.md +12 -0
  59. package/presets/claude/go/agents/feature-developer.md +12 -0
  60. package/presets/claude/go/agents/task-analyst.md +30 -0
  61. package/presets/claude/go/agents/task-router.md +18 -0
  62. package/presets/claude/go/ai-local/conventions.md +8 -0
  63. package/presets/claude/go/commands/task-continue.md +8 -0
  64. package/presets/claude/go/commands/task.md +14 -1
  65. package/presets/claude/go/hooks/chain-team-phases.sh +367 -16
  66. package/presets/claude/go/rules/README.md +5 -0
  67. package/presets/claude/go/rules/architecture/feature-delivery.md +4 -0
  68. package/presets/claude/go/rules/stack/go-app-core.md +6 -0
  69. package/presets/claude/go/rules/tooling-and-review/README.md +1 -0
  70. package/presets/claude/go/rules/tooling-and-review/agent-team-intake.md +3 -0
  71. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +42 -1
  72. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +4 -0
  73. package/presets/claude/go/rules/tooling-and-review/code-quality.md +20 -1
  74. package/presets/claude/go/rules/tooling-and-review/language-policy.md +52 -0
  75. package/presets/claude/go/rules/tooling-and-review/preset-goals.md +40 -0
  76. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +1 -1
  77. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  78. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +19 -77
  79. package/presets/claude/go/rules/tooling-and-review/preset-writing-style.md +51 -0
  80. package/presets/claude/go/team/README.md +21 -1
  81. package/presets/claude/ios-swift/REPO_AGENTS.md +3 -0
  82. package/presets/claude/ios-swift/agents/README.md +6 -0
  83. package/presets/claude/ios-swift/agents/build-verifier.md +12 -0
  84. package/presets/claude/ios-swift/agents/code-reviewer.md +12 -0
  85. package/presets/claude/ios-swift/agents/debugger.md +12 -0
  86. package/presets/claude/ios-swift/agents/feature-developer.md +12 -0
  87. package/presets/claude/ios-swift/agents/task-analyst.md +30 -0
  88. package/presets/claude/ios-swift/agents/task-router.md +18 -0
  89. package/presets/claude/ios-swift/ai-local/conventions.md +8 -0
  90. package/presets/claude/ios-swift/commands/task-continue.md +8 -0
  91. package/presets/claude/ios-swift/commands/task.md +14 -1
  92. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +369 -16
  93. package/presets/claude/ios-swift/rules/README.md +4 -0
  94. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +4 -0
  95. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +6 -0
  96. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +3 -0
  97. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +43 -2
  98. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +4 -0
  99. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +20 -1
  100. package/presets/claude/ios-swift/rules/tooling-and-review/language-policy.md +52 -0
  101. package/presets/claude/ios-swift/rules/tooling-and-review/mockup-review.md +56 -1
  102. package/presets/claude/ios-swift/rules/tooling-and-review/preset-goals.md +40 -0
  103. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +1 -1
  104. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  105. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +19 -77
  106. package/presets/claude/ios-swift/rules/tooling-and-review/preset-writing-style.md +51 -0
  107. package/presets/claude/ios-swift/team/README.md +21 -1
  108. package/presets/claude/java/REPO_AGENTS.md +3 -0
  109. package/presets/claude/java/agents/README.md +6 -0
  110. package/presets/claude/java/agents/build-verifier.md +12 -0
  111. package/presets/claude/java/agents/code-reviewer.md +12 -0
  112. package/presets/claude/java/agents/debugger.md +12 -0
  113. package/presets/claude/java/agents/feature-developer.md +12 -0
  114. package/presets/claude/java/agents/task-analyst.md +30 -0
  115. package/presets/claude/java/agents/task-router.md +18 -0
  116. package/presets/claude/java/ai-local/conventions.md +8 -0
  117. package/presets/claude/java/commands/task-continue.md +8 -0
  118. package/presets/claude/java/commands/task.md +14 -1
  119. package/presets/claude/java/hooks/chain-team-phases.sh +367 -16
  120. package/presets/claude/java/rules/README.md +5 -0
  121. package/presets/claude/java/rules/architecture/feature-delivery.md +4 -0
  122. package/presets/claude/java/rules/stack/java-app-core.md +6 -0
  123. package/presets/claude/java/rules/tooling-and-review/README.md +1 -0
  124. package/presets/claude/java/rules/tooling-and-review/agent-team-intake.md +3 -0
  125. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +42 -1
  126. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +4 -0
  127. package/presets/claude/java/rules/tooling-and-review/code-quality.md +20 -1
  128. package/presets/claude/java/rules/tooling-and-review/language-policy.md +52 -0
  129. package/presets/claude/java/rules/tooling-and-review/preset-goals.md +40 -0
  130. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +1 -1
  131. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  132. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +19 -77
  133. package/presets/claude/java/rules/tooling-and-review/preset-writing-style.md +51 -0
  134. package/presets/claude/java/team/README.md +21 -1
  135. package/presets/claude/mcp-ts/REPO_AGENTS.md +3 -0
  136. package/presets/claude/mcp-ts/agents/README.md +6 -0
  137. package/presets/claude/mcp-ts/agents/build-verifier.md +12 -0
  138. package/presets/claude/mcp-ts/agents/feature-developer.md +12 -0
  139. package/presets/claude/mcp-ts/agents/task-analyst.md +30 -0
  140. package/presets/claude/mcp-ts/agents/task-router.md +18 -0
  141. package/presets/claude/mcp-ts/ai-local/conventions.md +8 -0
  142. package/presets/claude/mcp-ts/commands/task-continue.md +8 -0
  143. package/presets/claude/mcp-ts/commands/task.md +14 -1
  144. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +367 -16
  145. package/presets/claude/mcp-ts/rules/README.md +5 -0
  146. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +4 -0
  147. package/presets/claude/mcp-ts/rules/stack/mcp-ts-app-core.md +6 -0
  148. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-intake.md +3 -0
  149. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +42 -1
  150. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +4 -0
  151. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +20 -1
  152. package/presets/claude/mcp-ts/rules/tooling-and-review/language-policy.md +52 -0
  153. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-goals.md +40 -0
  154. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +1 -1
  155. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  156. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +19 -77
  157. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-writing-style.md +51 -0
  158. package/presets/claude/mcp-ts/team/README.md +21 -1
  159. package/presets/claude/next/REPO_AGENTS.md +3 -0
  160. package/presets/claude/next/agents/README.md +6 -0
  161. package/presets/claude/next/agents/build-verifier.md +12 -0
  162. package/presets/claude/next/agents/code-reviewer.md +23 -0
  163. package/presets/claude/next/agents/debugger.md +12 -0
  164. package/presets/claude/next/agents/feature-developer.md +20 -2
  165. package/presets/claude/next/agents/mockup-reviewer.md +25 -4
  166. package/presets/claude/next/agents/task-analyst.md +30 -0
  167. package/presets/claude/next/agents/task-router.md +18 -0
  168. package/presets/claude/next/ai-local/conventions.md +8 -0
  169. package/presets/claude/next/commands/task-continue.md +8 -0
  170. package/presets/claude/next/commands/task.md +14 -1
  171. package/presets/claude/next/hooks/chain-team-phases.sh +369 -16
  172. package/presets/claude/next/rules/README.md +4 -0
  173. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +8 -0
  174. package/presets/claude/next/rules/stack/next-app-core.md +6 -0
  175. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +3 -0
  176. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +43 -2
  177. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +4 -0
  178. package/presets/claude/next/rules/tooling-and-review/code-quality.md +20 -1
  179. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +10 -0
  180. package/presets/claude/next/rules/tooling-and-review/language-policy.md +52 -0
  181. package/presets/claude/next/rules/tooling-and-review/mockup-review.md +77 -1
  182. package/presets/claude/next/rules/tooling-and-review/preset-goals.md +40 -0
  183. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +1 -1
  184. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  185. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +19 -77
  186. package/presets/claude/next/rules/tooling-and-review/preset-writing-style.md +51 -0
  187. package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +23 -1
  188. package/presets/claude/next/skills/README.md +1 -0
  189. package/presets/claude/next/skills/code-review/SKILL.md +1 -1
  190. package/presets/claude/next/skills/figma-fidelity/SKILL.md +96 -0
  191. package/presets/claude/next/skills/mockup-review/SKILL.md +5 -1
  192. package/presets/claude/next/team/README.md +22 -1
  193. package/presets/claude/next/team/fixtures/artifact-manifest.example.json +1 -1
  194. package/presets/claude/next/team/fixtures/feature-parallel.json +84 -0
  195. package/presets/claude/nuxt/REPO_AGENTS.md +3 -0
  196. package/presets/claude/nuxt/agents/README.md +6 -0
  197. package/presets/claude/nuxt/agents/build-verifier.md +12 -0
  198. package/presets/claude/nuxt/agents/code-reviewer.md +12 -0
  199. package/presets/claude/nuxt/agents/debugger.md +12 -0
  200. package/presets/claude/nuxt/agents/feature-developer.md +12 -0
  201. package/presets/claude/nuxt/agents/task-analyst.md +30 -0
  202. package/presets/claude/nuxt/agents/task-router.md +18 -0
  203. package/presets/claude/nuxt/ai-local/conventions.md +8 -0
  204. package/presets/claude/nuxt/commands/task-continue.md +8 -0
  205. package/presets/claude/nuxt/commands/task.md +14 -1
  206. package/presets/claude/nuxt/hooks/chain-team-phases.sh +369 -16
  207. package/presets/claude/nuxt/rules/README.md +4 -0
  208. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +4 -0
  209. package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +6 -0
  210. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +3 -0
  211. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +43 -2
  212. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +4 -0
  213. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +20 -1
  214. package/presets/claude/nuxt/rules/tooling-and-review/language-policy.md +52 -0
  215. package/presets/claude/nuxt/rules/tooling-and-review/mockup-review.md +56 -1
  216. package/presets/claude/nuxt/rules/tooling-and-review/preset-goals.md +40 -0
  217. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +1 -1
  218. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  219. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +19 -77
  220. package/presets/claude/nuxt/rules/tooling-and-review/preset-writing-style.md +51 -0
  221. package/presets/claude/nuxt/team/README.md +21 -1
  222. package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +1 -1
  223. package/presets/claude/php-hexagonal/REPO_AGENTS.md +3 -0
  224. package/presets/claude/php-hexagonal/agents/README.md +6 -0
  225. package/presets/claude/php-hexagonal/agents/build-verifier.md +12 -0
  226. package/presets/claude/php-hexagonal/agents/code-reviewer.md +12 -0
  227. package/presets/claude/php-hexagonal/agents/debugger.md +12 -0
  228. package/presets/claude/php-hexagonal/agents/feature-developer.md +12 -0
  229. package/presets/claude/php-hexagonal/agents/task-analyst.md +30 -0
  230. package/presets/claude/php-hexagonal/agents/task-router.md +18 -0
  231. package/presets/claude/php-hexagonal/ai-local/conventions.md +8 -0
  232. package/presets/claude/php-hexagonal/commands/task-continue.md +8 -0
  233. package/presets/claude/php-hexagonal/commands/task.md +14 -1
  234. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +367 -16
  235. package/presets/claude/php-hexagonal/rules/README.md +5 -0
  236. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +4 -0
  237. package/presets/claude/php-hexagonal/rules/stack/php-app-core.md +6 -0
  238. package/presets/claude/php-hexagonal/rules/tooling-and-review/README.md +1 -0
  239. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-intake.md +3 -0
  240. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +42 -1
  241. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +4 -0
  242. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +20 -1
  243. package/presets/claude/php-hexagonal/rules/tooling-and-review/language-policy.md +52 -0
  244. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-goals.md +40 -0
  245. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +1 -1
  246. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  247. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +19 -77
  248. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-writing-style.md +51 -0
  249. package/presets/claude/php-hexagonal/team/README.md +21 -1
  250. package/presets/claude/php-laravel/REPO_AGENTS.md +3 -0
  251. package/presets/claude/php-laravel/agents/README.md +6 -0
  252. package/presets/claude/php-laravel/agents/build-verifier.md +12 -0
  253. package/presets/claude/php-laravel/agents/code-reviewer.md +12 -0
  254. package/presets/claude/php-laravel/agents/debugger.md +12 -0
  255. package/presets/claude/php-laravel/agents/feature-developer.md +12 -0
  256. package/presets/claude/php-laravel/agents/task-analyst.md +30 -0
  257. package/presets/claude/php-laravel/agents/task-router.md +18 -0
  258. package/presets/claude/php-laravel/ai-local/conventions.md +8 -0
  259. package/presets/claude/php-laravel/commands/task-continue.md +8 -0
  260. package/presets/claude/php-laravel/commands/task.md +14 -1
  261. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +367 -16
  262. package/presets/claude/php-laravel/rules/README.md +5 -0
  263. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +4 -0
  264. package/presets/claude/php-laravel/rules/stack/laravel-app-core.md +6 -0
  265. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-intake.md +3 -0
  266. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +42 -1
  267. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +4 -0
  268. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +20 -1
  269. package/presets/claude/php-laravel/rules/tooling-and-review/language-policy.md +52 -0
  270. package/presets/claude/php-laravel/rules/tooling-and-review/preset-goals.md +40 -0
  271. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +1 -1
  272. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  273. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +19 -77
  274. package/presets/claude/php-laravel/rules/tooling-and-review/preset-writing-style.md +51 -0
  275. package/presets/claude/php-laravel/team/README.md +21 -1
  276. package/presets/claude/svelte/REPO_AGENTS.md +3 -0
  277. package/presets/claude/svelte/agents/README.md +6 -0
  278. package/presets/claude/svelte/agents/build-verifier.md +12 -0
  279. package/presets/claude/svelte/agents/code-reviewer.md +12 -0
  280. package/presets/claude/svelte/agents/debugger.md +12 -0
  281. package/presets/claude/svelte/agents/feature-developer.md +12 -0
  282. package/presets/claude/svelte/agents/task-analyst.md +30 -0
  283. package/presets/claude/svelte/agents/task-router.md +18 -0
  284. package/presets/claude/svelte/ai-local/conventions.md +8 -0
  285. package/presets/claude/svelte/commands/task-continue.md +8 -0
  286. package/presets/claude/svelte/commands/task.md +14 -1
  287. package/presets/claude/svelte/hooks/chain-team-phases.sh +369 -16
  288. package/presets/claude/svelte/rules/README.md +4 -0
  289. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +4 -0
  290. package/presets/claude/svelte/rules/stack/svelte-app-core.md +6 -0
  291. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +3 -0
  292. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +43 -2
  293. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +4 -0
  294. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +20 -1
  295. package/presets/claude/svelte/rules/tooling-and-review/language-policy.md +52 -0
  296. package/presets/claude/svelte/rules/tooling-and-review/mockup-review.md +56 -1
  297. package/presets/claude/svelte/rules/tooling-and-review/preset-goals.md +40 -0
  298. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +1 -1
  299. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +4 -0
  300. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +19 -77
  301. package/presets/claude/svelte/rules/tooling-and-review/preset-writing-style.md +51 -0
  302. package/presets/claude/svelte/team/README.md +21 -1
  303. package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +1 -1
  304. package/presets/cursor/android-kotlin/REPO_AGENTS.md +3 -0
  305. package/presets/cursor/android-kotlin/agents/README.md +7 -0
  306. package/presets/cursor/android-kotlin/agents/build-verifier.md +12 -0
  307. package/presets/cursor/android-kotlin/agents/code-reviewer.md +12 -0
  308. package/presets/cursor/android-kotlin/agents/debugger.md +12 -0
  309. package/presets/cursor/android-kotlin/agents/feature-developer.md +12 -0
  310. package/presets/cursor/android-kotlin/agents/task-analyst.md +31 -1
  311. package/presets/cursor/android-kotlin/agents/task-router.md +18 -0
  312. package/presets/cursor/android-kotlin/ai-local/conventions.md +8 -0
  313. package/presets/cursor/android-kotlin/commands/task-continue.md +8 -0
  314. package/presets/cursor/android-kotlin/commands/task.md +14 -1
  315. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +369 -16
  316. package/presets/cursor/android-kotlin/rules/README.md +3 -1
  317. package/presets/cursor/android-kotlin/rules/agent-team-intake.mdc +3 -0
  318. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +43 -2
  319. package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +4 -0
  320. package/presets/cursor/android-kotlin/rules/android-app-core.mdc +6 -0
  321. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +20 -1
  322. package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +4 -0
  323. package/presets/cursor/android-kotlin/rules/language-policy.mdc +52 -0
  324. package/presets/cursor/android-kotlin/rules/mockup-review.mdc +56 -1
  325. package/presets/cursor/android-kotlin/rules/preset-goals.mdc +40 -0
  326. package/presets/cursor/android-kotlin/rules/preset-layering.mdc +1 -1
  327. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +4 -0
  328. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +19 -77
  329. package/presets/cursor/android-kotlin/rules/preset-writing-style.mdc +51 -0
  330. package/presets/cursor/android-kotlin/team/README.md +15 -1
  331. package/presets/cursor/go/REPO_AGENTS.md +3 -0
  332. package/presets/cursor/go/agents/README.md +7 -0
  333. package/presets/cursor/go/agents/build-verifier.md +12 -0
  334. package/presets/cursor/go/agents/code-reviewer.md +12 -0
  335. package/presets/cursor/go/agents/debugger.md +12 -0
  336. package/presets/cursor/go/agents/feature-developer.md +12 -0
  337. package/presets/cursor/go/agents/task-analyst.md +31 -1
  338. package/presets/cursor/go/agents/task-router.md +18 -0
  339. package/presets/cursor/go/ai-local/conventions.md +8 -0
  340. package/presets/cursor/go/commands/task-continue.md +8 -0
  341. package/presets/cursor/go/commands/task.md +14 -1
  342. package/presets/cursor/go/hooks/chain-team-phases.sh +367 -16
  343. package/presets/cursor/go/rules/README.md +5 -3
  344. package/presets/cursor/go/rules/agent-team-intake.mdc +3 -0
  345. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +42 -1
  346. package/presets/cursor/go/rules/ai-local-overlay.mdc +4 -0
  347. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +20 -1
  348. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +4 -0
  349. package/presets/cursor/go/rules/go-app-core.mdc +6 -0
  350. package/presets/cursor/go/rules/language-policy.mdc +52 -0
  351. package/presets/cursor/go/rules/preset-goals.mdc +40 -0
  352. package/presets/cursor/go/rules/preset-layering.mdc +1 -1
  353. package/presets/cursor/go/rules/preset-pr-checklist.mdc +4 -0
  354. package/presets/cursor/go/rules/preset-twin-sync.mdc +19 -77
  355. package/presets/cursor/go/rules/preset-writing-style.mdc +51 -0
  356. package/presets/cursor/go/team/README.md +15 -1
  357. package/presets/cursor/ios-swift/REPO_AGENTS.md +3 -0
  358. package/presets/cursor/ios-swift/agents/README.md +7 -0
  359. package/presets/cursor/ios-swift/agents/build-verifier.md +12 -0
  360. package/presets/cursor/ios-swift/agents/code-reviewer.md +12 -0
  361. package/presets/cursor/ios-swift/agents/debugger.md +12 -0
  362. package/presets/cursor/ios-swift/agents/feature-developer.md +12 -0
  363. package/presets/cursor/ios-swift/agents/task-analyst.md +31 -1
  364. package/presets/cursor/ios-swift/agents/task-router.md +18 -0
  365. package/presets/cursor/ios-swift/ai-local/conventions.md +8 -0
  366. package/presets/cursor/ios-swift/commands/task-continue.md +8 -0
  367. package/presets/cursor/ios-swift/commands/task.md +14 -1
  368. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +369 -16
  369. package/presets/cursor/ios-swift/rules/README.md +4 -2
  370. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +3 -0
  371. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +43 -2
  372. package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +4 -0
  373. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +20 -1
  374. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +4 -0
  375. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +6 -0
  376. package/presets/cursor/ios-swift/rules/language-policy.mdc +52 -0
  377. package/presets/cursor/ios-swift/rules/mockup-review.mdc +56 -1
  378. package/presets/cursor/ios-swift/rules/preset-goals.mdc +40 -0
  379. package/presets/cursor/ios-swift/rules/preset-layering.mdc +1 -1
  380. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +4 -0
  381. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +19 -77
  382. package/presets/cursor/ios-swift/rules/preset-writing-style.mdc +51 -0
  383. package/presets/cursor/ios-swift/team/README.md +15 -1
  384. package/presets/cursor/java/REPO_AGENTS.md +3 -0
  385. package/presets/cursor/java/agents/README.md +7 -0
  386. package/presets/cursor/java/agents/build-verifier.md +12 -0
  387. package/presets/cursor/java/agents/code-reviewer.md +12 -0
  388. package/presets/cursor/java/agents/debugger.md +12 -0
  389. package/presets/cursor/java/agents/feature-developer.md +12 -0
  390. package/presets/cursor/java/agents/task-analyst.md +31 -1
  391. package/presets/cursor/java/agents/task-router.md +18 -0
  392. package/presets/cursor/java/ai-local/conventions.md +8 -0
  393. package/presets/cursor/java/commands/task-continue.md +8 -0
  394. package/presets/cursor/java/commands/task.md +14 -1
  395. package/presets/cursor/java/hooks/chain-team-phases.sh +367 -16
  396. package/presets/cursor/java/rules/README.md +5 -3
  397. package/presets/cursor/java/rules/agent-team-intake.mdc +3 -0
  398. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +42 -1
  399. package/presets/cursor/java/rules/ai-local-overlay.mdc +4 -0
  400. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +20 -1
  401. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +4 -0
  402. package/presets/cursor/java/rules/java-app-core.mdc +6 -0
  403. package/presets/cursor/java/rules/language-policy.mdc +52 -0
  404. package/presets/cursor/java/rules/preset-goals.mdc +40 -0
  405. package/presets/cursor/java/rules/preset-layering.mdc +1 -1
  406. package/presets/cursor/java/rules/preset-pr-checklist.mdc +4 -0
  407. package/presets/cursor/java/rules/preset-twin-sync.mdc +19 -77
  408. package/presets/cursor/java/rules/preset-writing-style.mdc +51 -0
  409. package/presets/cursor/java/team/README.md +15 -1
  410. package/presets/cursor/mcp-ts/REPO_AGENTS.md +3 -0
  411. package/presets/cursor/mcp-ts/agents/README.md +7 -0
  412. package/presets/cursor/mcp-ts/agents/build-verifier.md +12 -0
  413. package/presets/cursor/mcp-ts/agents/feature-developer.md +12 -0
  414. package/presets/cursor/mcp-ts/agents/task-analyst.md +31 -1
  415. package/presets/cursor/mcp-ts/agents/task-router.md +18 -0
  416. package/presets/cursor/mcp-ts/ai-local/conventions.md +8 -0
  417. package/presets/cursor/mcp-ts/commands/task-continue.md +8 -0
  418. package/presets/cursor/mcp-ts/commands/task.md +14 -1
  419. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +367 -16
  420. package/presets/cursor/mcp-ts/rules/README.md +4 -2
  421. package/presets/cursor/mcp-ts/rules/agent-team-intake.mdc +3 -0
  422. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +42 -1
  423. package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +4 -0
  424. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +20 -1
  425. package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +4 -0
  426. package/presets/cursor/mcp-ts/rules/language-policy.mdc +52 -0
  427. package/presets/cursor/mcp-ts/rules/mcp-ts-app-core.mdc +6 -0
  428. package/presets/cursor/mcp-ts/rules/preset-goals.mdc +40 -0
  429. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +1 -1
  430. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +4 -0
  431. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +19 -77
  432. package/presets/cursor/mcp-ts/rules/preset-writing-style.mdc +51 -0
  433. package/presets/cursor/mcp-ts/team/README.md +15 -1
  434. package/presets/cursor/next/REPO_AGENTS.md +3 -0
  435. package/presets/cursor/next/agents/README.md +7 -1
  436. package/presets/cursor/next/agents/build-verifier.md +12 -0
  437. package/presets/cursor/next/agents/code-reviewer.md +23 -0
  438. package/presets/cursor/next/agents/debugger.md +12 -0
  439. package/presets/cursor/next/agents/feature-developer.md +20 -2
  440. package/presets/cursor/next/agents/mockup-reviewer.md +25 -4
  441. package/presets/cursor/next/agents/task-analyst.md +43 -2
  442. package/presets/cursor/next/agents/task-router.md +18 -0
  443. package/presets/cursor/next/ai-local/conventions.md +8 -0
  444. package/presets/cursor/next/ai-local/rules-library/agent-pipeline-gates.md +1 -1
  445. package/presets/cursor/next/ai-local/rules-library/mcp-required-for-ui-layout.md +4 -0
  446. package/presets/cursor/next/ai-local/rules-library/storybook-dev-compare-figma.md +4 -0
  447. package/presets/cursor/next/ai-local/rules-library/ui-change-review-gate.md +1 -0
  448. package/presets/cursor/next/commands/task-continue.md +8 -0
  449. package/presets/cursor/next/commands/task.md +14 -1
  450. package/presets/cursor/next/hooks/chain-team-phases.sh +369 -16
  451. package/presets/cursor/next/rules/README.md +3 -1
  452. package/presets/cursor/next/rules/agent-team-intake.mdc +3 -0
  453. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +47 -2
  454. package/presets/cursor/next/rules/ai-local-overlay.mdc +4 -0
  455. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +20 -1
  456. package/presets/cursor/next/rules/code-review-mr.mdc +10 -0
  457. package/presets/cursor/next/rules/design-tokens-binding.mdc +23 -1
  458. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +8 -0
  459. package/presets/cursor/next/rules/language-policy.mdc +52 -0
  460. package/presets/cursor/next/rules/mockup-review.mdc +77 -1
  461. package/presets/cursor/next/rules/next-app-core.mdc +6 -0
  462. package/presets/cursor/next/rules/preset-goals.mdc +40 -0
  463. package/presets/cursor/next/rules/preset-layering.mdc +1 -1
  464. package/presets/cursor/next/rules/preset-pr-checklist.mdc +4 -0
  465. package/presets/cursor/next/rules/preset-twin-sync.mdc +19 -77
  466. package/presets/cursor/next/rules/preset-writing-style.mdc +51 -0
  467. package/presets/cursor/next/skills/README.md +1 -0
  468. package/presets/cursor/next/skills/code-review/SKILL.md +1 -1
  469. package/presets/cursor/next/skills/figma-fidelity/SKILL.md +96 -0
  470. package/presets/cursor/next/skills/mockup-review/SKILL.md +5 -1
  471. package/presets/cursor/next/team/README.md +16 -1
  472. package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +1 -1
  473. package/presets/cursor/next/team/fixtures/feature-parallel.json +84 -0
  474. package/presets/cursor/nuxt/REPO_AGENTS.md +3 -0
  475. package/presets/cursor/nuxt/agents/README.md +7 -0
  476. package/presets/cursor/nuxt/agents/build-verifier.md +12 -0
  477. package/presets/cursor/nuxt/agents/code-reviewer.md +12 -0
  478. package/presets/cursor/nuxt/agents/debugger.md +12 -0
  479. package/presets/cursor/nuxt/agents/feature-developer.md +12 -0
  480. package/presets/cursor/nuxt/agents/task-analyst.md +43 -2
  481. package/presets/cursor/nuxt/agents/task-router.md +18 -0
  482. package/presets/cursor/nuxt/ai-local/conventions.md +8 -0
  483. package/presets/cursor/nuxt/commands/task-continue.md +8 -0
  484. package/presets/cursor/nuxt/commands/task.md +14 -1
  485. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +369 -16
  486. package/presets/cursor/nuxt/rules/README.md +3 -1
  487. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +3 -0
  488. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +43 -2
  489. package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +4 -0
  490. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +20 -1
  491. package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +4 -0
  492. package/presets/cursor/nuxt/rules/language-policy.mdc +52 -0
  493. package/presets/cursor/nuxt/rules/mockup-review.mdc +56 -1
  494. package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +6 -0
  495. package/presets/cursor/nuxt/rules/preset-goals.mdc +40 -0
  496. package/presets/cursor/nuxt/rules/preset-layering.mdc +1 -1
  497. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +4 -0
  498. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +19 -77
  499. package/presets/cursor/nuxt/rules/preset-writing-style.mdc +51 -0
  500. package/presets/cursor/nuxt/team/README.md +15 -1
  501. package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +1 -1
  502. package/presets/cursor/php-hexagonal/REPO_AGENTS.md +3 -0
  503. package/presets/cursor/php-hexagonal/agents/README.md +7 -0
  504. package/presets/cursor/php-hexagonal/agents/build-verifier.md +12 -0
  505. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +12 -0
  506. package/presets/cursor/php-hexagonal/agents/debugger.md +12 -0
  507. package/presets/cursor/php-hexagonal/agents/feature-developer.md +12 -0
  508. package/presets/cursor/php-hexagonal/agents/task-analyst.md +31 -1
  509. package/presets/cursor/php-hexagonal/agents/task-router.md +18 -0
  510. package/presets/cursor/php-hexagonal/ai-local/conventions.md +8 -0
  511. package/presets/cursor/php-hexagonal/commands/task-continue.md +8 -0
  512. package/presets/cursor/php-hexagonal/commands/task.md +14 -1
  513. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +367 -16
  514. package/presets/cursor/php-hexagonal/rules/README.md +5 -3
  515. package/presets/cursor/php-hexagonal/rules/agent-team-intake.mdc +3 -0
  516. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +42 -1
  517. package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +4 -0
  518. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +20 -1
  519. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +4 -0
  520. package/presets/cursor/php-hexagonal/rules/language-policy.mdc +52 -0
  521. package/presets/cursor/php-hexagonal/rules/php-app-core.mdc +6 -0
  522. package/presets/cursor/php-hexagonal/rules/preset-goals.mdc +40 -0
  523. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +1 -1
  524. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +4 -0
  525. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +19 -77
  526. package/presets/cursor/php-hexagonal/rules/preset-writing-style.mdc +51 -0
  527. package/presets/cursor/php-hexagonal/team/README.md +15 -1
  528. package/presets/cursor/php-laravel/REPO_AGENTS.md +3 -0
  529. package/presets/cursor/php-laravel/agents/README.md +7 -0
  530. package/presets/cursor/php-laravel/agents/build-verifier.md +12 -0
  531. package/presets/cursor/php-laravel/agents/code-reviewer.md +12 -0
  532. package/presets/cursor/php-laravel/agents/debugger.md +12 -0
  533. package/presets/cursor/php-laravel/agents/feature-developer.md +12 -0
  534. package/presets/cursor/php-laravel/agents/task-analyst.md +31 -1
  535. package/presets/cursor/php-laravel/agents/task-router.md +18 -0
  536. package/presets/cursor/php-laravel/ai-local/conventions.md +8 -0
  537. package/presets/cursor/php-laravel/commands/task-continue.md +8 -0
  538. package/presets/cursor/php-laravel/commands/task.md +14 -1
  539. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +367 -16
  540. package/presets/cursor/php-laravel/rules/README.md +5 -3
  541. package/presets/cursor/php-laravel/rules/agent-team-intake.mdc +3 -0
  542. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +42 -1
  543. package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +4 -0
  544. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +20 -1
  545. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +4 -0
  546. package/presets/cursor/php-laravel/rules/language-policy.mdc +52 -0
  547. package/presets/cursor/php-laravel/rules/laravel-app-core.mdc +6 -0
  548. package/presets/cursor/php-laravel/rules/preset-goals.mdc +40 -0
  549. package/presets/cursor/php-laravel/rules/preset-layering.mdc +1 -1
  550. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +4 -0
  551. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +19 -77
  552. package/presets/cursor/php-laravel/rules/preset-writing-style.mdc +51 -0
  553. package/presets/cursor/php-laravel/team/README.md +15 -1
  554. package/presets/cursor/svelte/REPO_AGENTS.md +3 -0
  555. package/presets/cursor/svelte/agents/README.md +7 -0
  556. package/presets/cursor/svelte/agents/build-verifier.md +12 -0
  557. package/presets/cursor/svelte/agents/code-reviewer.md +12 -0
  558. package/presets/cursor/svelte/agents/debugger.md +12 -0
  559. package/presets/cursor/svelte/agents/feature-developer.md +12 -0
  560. package/presets/cursor/svelte/agents/task-analyst.md +43 -2
  561. package/presets/cursor/svelte/agents/task-router.md +18 -0
  562. package/presets/cursor/svelte/ai-local/conventions.md +8 -0
  563. package/presets/cursor/svelte/commands/task-continue.md +8 -0
  564. package/presets/cursor/svelte/commands/task.md +14 -1
  565. package/presets/cursor/svelte/hooks/chain-team-phases.sh +369 -16
  566. package/presets/cursor/svelte/rules/README.md +3 -1
  567. package/presets/cursor/svelte/rules/agent-team-intake.mdc +3 -0
  568. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +43 -2
  569. package/presets/cursor/svelte/rules/ai-local-overlay.mdc +4 -0
  570. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +20 -1
  571. package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +4 -0
  572. package/presets/cursor/svelte/rules/language-policy.mdc +52 -0
  573. package/presets/cursor/svelte/rules/mockup-review.mdc +56 -1
  574. package/presets/cursor/svelte/rules/preset-goals.mdc +40 -0
  575. package/presets/cursor/svelte/rules/preset-layering.mdc +1 -1
  576. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +4 -0
  577. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +19 -77
  578. package/presets/cursor/svelte/rules/preset-writing-style.mdc +51 -0
  579. package/presets/cursor/svelte/rules/svelte-app-core.mdc +6 -0
  580. package/presets/cursor/svelte/team/README.md +15 -1
  581. package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +1 -1
  582. package/presets/mavis/android-kotlin/REPO_AGENTS.md +3 -0
  583. package/presets/mavis/android-kotlin/adapter-map.json +29 -2
  584. package/presets/mavis/android-kotlin/agents/README.md +7 -0
  585. package/presets/mavis/android-kotlin/agents/build-verifier.md +12 -0
  586. package/presets/mavis/android-kotlin/agents/code-reviewer.md +12 -0
  587. package/presets/mavis/android-kotlin/agents/debugger.md +12 -0
  588. package/presets/mavis/android-kotlin/agents/feature-developer.md +12 -0
  589. package/presets/mavis/android-kotlin/agents/task-analyst.md +31 -1
  590. package/presets/mavis/android-kotlin/agents/task-router.md +18 -0
  591. package/presets/mavis/android-kotlin/ai-local/conventions.md +8 -0
  592. package/presets/mavis/android-kotlin/commands/task-continue.md +8 -0
  593. package/presets/mavis/android-kotlin/commands/task.md +14 -1
  594. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +369 -16
  595. package/presets/mavis/android-kotlin/rules/agent-team-intake.md +3 -0
  596. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +39 -5
  597. package/presets/mavis/android-kotlin/rules/ai-local-overlay.md +4 -0
  598. package/presets/mavis/android-kotlin/rules/android-app-core.md +6 -0
  599. package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +20 -1
  600. package/presets/mavis/android-kotlin/rules/feature-delivery-workflow.md +4 -0
  601. package/presets/mavis/android-kotlin/rules/language-policy.md +43 -0
  602. package/presets/mavis/android-kotlin/rules/mockup-review.md +56 -1
  603. package/presets/mavis/android-kotlin/rules/preset-goals.md +31 -0
  604. package/presets/mavis/android-kotlin/rules/preset-layering.md +1 -1
  605. package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +4 -0
  606. package/presets/mavis/android-kotlin/rules/preset-twin-sync.md +19 -77
  607. package/presets/mavis/android-kotlin/rules/preset-writing-style.md +42 -0
  608. package/presets/mavis/android-kotlin/team/README.md +15 -1
  609. package/presets/mavis/go/REPO_AGENTS.md +3 -0
  610. package/presets/mavis/go/adapter-map.json +30 -3
  611. package/presets/mavis/go/agents/README.md +5 -0
  612. package/presets/mavis/go/agents/build-verifier.md +12 -0
  613. package/presets/mavis/go/agents/code-reviewer.md +12 -0
  614. package/presets/mavis/go/agents/debugger.md +12 -0
  615. package/presets/mavis/go/agents/feature-developer.md +12 -0
  616. package/presets/mavis/go/agents/task-analyst.md +31 -1
  617. package/presets/mavis/go/agents/task-router.md +18 -0
  618. package/presets/mavis/go/ai-local/conventions.md +8 -0
  619. package/presets/mavis/go/commands/task-continue.md +8 -0
  620. package/presets/mavis/go/commands/task.md +14 -1
  621. package/presets/mavis/go/hooks/chain-team-phases.sh +367 -16
  622. package/presets/mavis/go/rules/agent-team-intake.md +3 -0
  623. package/presets/mavis/go/rules/agent-team-orchestrator.md +39 -5
  624. package/presets/mavis/go/rules/ai-local-overlay.md +4 -0
  625. package/presets/mavis/go/rules/code-quality-and-refactoring.md +20 -1
  626. package/presets/mavis/go/rules/feature-delivery-workflow.md +11 -1
  627. package/presets/mavis/go/rules/go-app-core.md +6 -0
  628. package/presets/mavis/go/rules/language-policy.md +43 -0
  629. package/presets/mavis/go/rules/preset-goals.md +31 -0
  630. package/presets/mavis/go/rules/preset-layering.md +1 -1
  631. package/presets/mavis/go/rules/preset-pr-checklist.md +4 -0
  632. package/presets/mavis/go/rules/preset-twin-sync.md +19 -77
  633. package/presets/mavis/go/rules/preset-writing-style.md +42 -0
  634. package/presets/mavis/go/team/README.md +15 -1
  635. package/presets/mavis/ios-swift/REPO_AGENTS.md +3 -0
  636. package/presets/mavis/ios-swift/adapter-map.json +29 -2
  637. package/presets/mavis/ios-swift/agents/README.md +7 -0
  638. package/presets/mavis/ios-swift/agents/build-verifier.md +12 -0
  639. package/presets/mavis/ios-swift/agents/code-reviewer.md +12 -0
  640. package/presets/mavis/ios-swift/agents/debugger.md +12 -0
  641. package/presets/mavis/ios-swift/agents/feature-developer.md +12 -0
  642. package/presets/mavis/ios-swift/agents/task-analyst.md +31 -1
  643. package/presets/mavis/ios-swift/agents/task-router.md +18 -0
  644. package/presets/mavis/ios-swift/ai-local/conventions.md +8 -0
  645. package/presets/mavis/ios-swift/commands/task-continue.md +8 -0
  646. package/presets/mavis/ios-swift/commands/task.md +14 -1
  647. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +369 -16
  648. package/presets/mavis/ios-swift/rules/agent-team-intake.md +3 -0
  649. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +39 -5
  650. package/presets/mavis/ios-swift/rules/ai-local-overlay.md +4 -0
  651. package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +20 -1
  652. package/presets/mavis/ios-swift/rules/feature-delivery-workflow.md +15 -1
  653. package/presets/mavis/ios-swift/rules/ios-app-core.md +6 -0
  654. package/presets/mavis/ios-swift/rules/language-policy.md +43 -0
  655. package/presets/mavis/ios-swift/rules/mockup-review.md +56 -1
  656. package/presets/mavis/ios-swift/rules/preset-goals.md +31 -0
  657. package/presets/mavis/ios-swift/rules/preset-layering.md +1 -1
  658. package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +4 -0
  659. package/presets/mavis/ios-swift/rules/preset-twin-sync.md +19 -77
  660. package/presets/mavis/ios-swift/rules/preset-writing-style.md +42 -0
  661. package/presets/mavis/ios-swift/team/README.md +15 -1
  662. package/presets/mavis/java/REPO_AGENTS.md +3 -0
  663. package/presets/mavis/java/adapter-map.json +30 -3
  664. package/presets/mavis/java/agents/README.md +5 -0
  665. package/presets/mavis/java/agents/build-verifier.md +12 -0
  666. package/presets/mavis/java/agents/code-reviewer.md +12 -0
  667. package/presets/mavis/java/agents/debugger.md +12 -0
  668. package/presets/mavis/java/agents/feature-developer.md +12 -0
  669. package/presets/mavis/java/agents/task-analyst.md +31 -1
  670. package/presets/mavis/java/agents/task-router.md +18 -0
  671. package/presets/mavis/java/ai-local/conventions.md +8 -0
  672. package/presets/mavis/java/commands/task-continue.md +8 -0
  673. package/presets/mavis/java/commands/task.md +14 -1
  674. package/presets/mavis/java/hooks/chain-team-phases.sh +367 -16
  675. package/presets/mavis/java/rules/agent-team-intake.md +3 -0
  676. package/presets/mavis/java/rules/agent-team-orchestrator.md +39 -5
  677. package/presets/mavis/java/rules/ai-local-overlay.md +4 -0
  678. package/presets/mavis/java/rules/code-quality-and-refactoring.md +20 -1
  679. package/presets/mavis/java/rules/feature-delivery-workflow.md +11 -1
  680. package/presets/mavis/java/rules/java-app-core.md +6 -0
  681. package/presets/mavis/java/rules/language-policy.md +43 -0
  682. package/presets/mavis/java/rules/preset-goals.md +31 -0
  683. package/presets/mavis/java/rules/preset-layering.md +1 -1
  684. package/presets/mavis/java/rules/preset-pr-checklist.md +4 -0
  685. package/presets/mavis/java/rules/preset-twin-sync.md +19 -77
  686. package/presets/mavis/java/rules/preset-writing-style.md +42 -0
  687. package/presets/mavis/java/team/README.md +15 -1
  688. package/presets/mavis/mcp-ts/REPO_AGENTS.md +3 -0
  689. package/presets/mavis/mcp-ts/adapter-map.json +28 -1
  690. package/presets/mavis/mcp-ts/agents/README.md +7 -0
  691. package/presets/mavis/mcp-ts/agents/build-verifier.md +12 -0
  692. package/presets/mavis/mcp-ts/agents/feature-developer.md +12 -0
  693. package/presets/mavis/mcp-ts/agents/task-analyst.md +31 -1
  694. package/presets/mavis/mcp-ts/agents/task-router.md +18 -0
  695. package/presets/mavis/mcp-ts/ai-local/conventions.md +8 -0
  696. package/presets/mavis/mcp-ts/commands/task-continue.md +8 -0
  697. package/presets/mavis/mcp-ts/commands/task.md +14 -1
  698. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +367 -16
  699. package/presets/mavis/mcp-ts/rules/agent-team-intake.md +3 -0
  700. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +39 -5
  701. package/presets/mavis/mcp-ts/rules/ai-local-overlay.md +4 -0
  702. package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +20 -1
  703. package/presets/mavis/mcp-ts/rules/feature-delivery-workflow.md +11 -1
  704. package/presets/mavis/mcp-ts/rules/language-policy.md +43 -0
  705. package/presets/mavis/mcp-ts/rules/mcp-ts-app-core.md +6 -0
  706. package/presets/mavis/mcp-ts/rules/preset-goals.md +31 -0
  707. package/presets/mavis/mcp-ts/rules/preset-layering.md +1 -1
  708. package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +4 -0
  709. package/presets/mavis/mcp-ts/rules/preset-twin-sync.md +19 -77
  710. package/presets/mavis/mcp-ts/rules/preset-writing-style.md +42 -0
  711. package/presets/mavis/mcp-ts/team/README.md +15 -1
  712. package/presets/mavis/next/REPO_AGENTS.md +3 -0
  713. package/presets/mavis/next/adapter-map.json +46 -3
  714. package/presets/mavis/next/agents/README.md +6 -0
  715. package/presets/mavis/next/agents/build-verifier.md +12 -0
  716. package/presets/mavis/next/agents/code-reviewer.md +23 -0
  717. package/presets/mavis/next/agents/debugger.md +12 -0
  718. package/presets/mavis/next/agents/feature-developer.md +20 -2
  719. package/presets/mavis/next/agents/mockup-reviewer.md +25 -4
  720. package/presets/mavis/next/agents/task-analyst.md +43 -2
  721. package/presets/mavis/next/agents/task-router.md +18 -0
  722. package/presets/mavis/next/ai-local/conventions.md +8 -0
  723. package/presets/mavis/next/ai-local/rules-library/agent-pipeline-gates.md +1 -1
  724. package/presets/mavis/next/ai-local/rules-library/mcp-required-for-ui-layout.md +4 -0
  725. package/presets/mavis/next/ai-local/rules-library/storybook-dev-compare-figma.md +4 -0
  726. package/presets/mavis/next/ai-local/rules-library/ui-change-review-gate.md +1 -0
  727. package/presets/mavis/next/commands/task-continue.md +8 -0
  728. package/presets/mavis/next/commands/task.md +14 -1
  729. package/presets/mavis/next/hooks/chain-team-phases.sh +369 -16
  730. package/presets/mavis/next/rules/agent-team-intake.md +3 -0
  731. package/presets/mavis/next/rules/agent-team-orchestrator.md +39 -5
  732. package/presets/mavis/next/rules/ai-local-overlay.md +4 -0
  733. package/presets/mavis/next/rules/code-quality-and-refactoring.md +20 -1
  734. package/presets/mavis/next/rules/code-review-mr.md +10 -0
  735. package/presets/mavis/next/rules/design-tokens-binding.md +23 -1
  736. package/presets/mavis/next/rules/feature-delivery-workflow.md +19 -1
  737. package/presets/mavis/next/rules/language-policy.md +43 -0
  738. package/presets/mavis/next/rules/mockup-review.md +77 -1
  739. package/presets/mavis/next/rules/next-app-core.md +6 -0
  740. package/presets/mavis/next/rules/preset-goals.md +31 -0
  741. package/presets/mavis/next/rules/preset-layering.md +1 -1
  742. package/presets/mavis/next/rules/preset-pr-checklist.md +4 -0
  743. package/presets/mavis/next/rules/preset-twin-sync.md +19 -77
  744. package/presets/mavis/next/rules/preset-writing-style.md +42 -0
  745. package/presets/mavis/next/skills/README.md +1 -0
  746. package/presets/mavis/next/skills/code-review/SKILL.md +1 -1
  747. package/presets/mavis/next/skills/figma-fidelity/SKILL.md +91 -0
  748. package/presets/mavis/next/skills/mockup-review/SKILL.md +5 -1
  749. package/presets/mavis/next/team/README.md +16 -1
  750. package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +1 -1
  751. package/presets/mavis/next/team/fixtures/feature-parallel.json +84 -0
  752. package/presets/mavis/nuxt/REPO_AGENTS.md +3 -0
  753. package/presets/mavis/nuxt/adapter-map.json +30 -3
  754. package/presets/mavis/nuxt/agents/README.md +7 -0
  755. package/presets/mavis/nuxt/agents/build-verifier.md +12 -0
  756. package/presets/mavis/nuxt/agents/code-reviewer.md +12 -0
  757. package/presets/mavis/nuxt/agents/debugger.md +12 -0
  758. package/presets/mavis/nuxt/agents/feature-developer.md +12 -0
  759. package/presets/mavis/nuxt/agents/task-analyst.md +43 -2
  760. package/presets/mavis/nuxt/agents/task-router.md +18 -0
  761. package/presets/mavis/nuxt/ai-local/conventions.md +8 -0
  762. package/presets/mavis/nuxt/commands/task-continue.md +8 -0
  763. package/presets/mavis/nuxt/commands/task.md +14 -1
  764. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +369 -16
  765. package/presets/mavis/nuxt/rules/agent-team-intake.md +3 -0
  766. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +39 -5
  767. package/presets/mavis/nuxt/rules/ai-local-overlay.md +4 -0
  768. package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +20 -1
  769. package/presets/mavis/nuxt/rules/feature-delivery-workflow.md +15 -1
  770. package/presets/mavis/nuxt/rules/language-policy.md +43 -0
  771. package/presets/mavis/nuxt/rules/mockup-review.md +56 -1
  772. package/presets/mavis/nuxt/rules/nuxt-app-core.md +6 -0
  773. package/presets/mavis/nuxt/rules/preset-goals.md +31 -0
  774. package/presets/mavis/nuxt/rules/preset-layering.md +1 -1
  775. package/presets/mavis/nuxt/rules/preset-pr-checklist.md +4 -0
  776. package/presets/mavis/nuxt/rules/preset-twin-sync.md +19 -77
  777. package/presets/mavis/nuxt/rules/preset-writing-style.md +42 -0
  778. package/presets/mavis/nuxt/team/README.md +15 -1
  779. package/presets/mavis/nuxt/team/fixtures/artifact-manifest.example.json +1 -1
  780. package/presets/mavis/php-hexagonal/REPO_AGENTS.md +3 -0
  781. package/presets/mavis/php-hexagonal/adapter-map.json +30 -3
  782. package/presets/mavis/php-hexagonal/agents/README.md +5 -0
  783. package/presets/mavis/php-hexagonal/agents/build-verifier.md +12 -0
  784. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +12 -0
  785. package/presets/mavis/php-hexagonal/agents/debugger.md +12 -0
  786. package/presets/mavis/php-hexagonal/agents/feature-developer.md +12 -0
  787. package/presets/mavis/php-hexagonal/agents/task-analyst.md +31 -1
  788. package/presets/mavis/php-hexagonal/agents/task-router.md +18 -0
  789. package/presets/mavis/php-hexagonal/ai-local/conventions.md +8 -0
  790. package/presets/mavis/php-hexagonal/commands/task-continue.md +8 -0
  791. package/presets/mavis/php-hexagonal/commands/task.md +14 -1
  792. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +367 -16
  793. package/presets/mavis/php-hexagonal/rules/agent-team-intake.md +3 -0
  794. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +39 -5
  795. package/presets/mavis/php-hexagonal/rules/ai-local-overlay.md +4 -0
  796. package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +20 -1
  797. package/presets/mavis/php-hexagonal/rules/feature-delivery-workflow.md +11 -1
  798. package/presets/mavis/php-hexagonal/rules/language-policy.md +43 -0
  799. package/presets/mavis/php-hexagonal/rules/php-app-core.md +6 -0
  800. package/presets/mavis/php-hexagonal/rules/preset-goals.md +31 -0
  801. package/presets/mavis/php-hexagonal/rules/preset-layering.md +1 -1
  802. package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +4 -0
  803. package/presets/mavis/php-hexagonal/rules/preset-twin-sync.md +19 -77
  804. package/presets/mavis/php-hexagonal/rules/preset-writing-style.md +42 -0
  805. package/presets/mavis/php-hexagonal/team/README.md +15 -1
  806. package/presets/mavis/php-laravel/REPO_AGENTS.md +3 -0
  807. package/presets/mavis/php-laravel/adapter-map.json +30 -3
  808. package/presets/mavis/php-laravel/agents/README.md +5 -0
  809. package/presets/mavis/php-laravel/agents/build-verifier.md +12 -0
  810. package/presets/mavis/php-laravel/agents/code-reviewer.md +12 -0
  811. package/presets/mavis/php-laravel/agents/debugger.md +12 -0
  812. package/presets/mavis/php-laravel/agents/feature-developer.md +12 -0
  813. package/presets/mavis/php-laravel/agents/task-analyst.md +31 -1
  814. package/presets/mavis/php-laravel/agents/task-router.md +18 -0
  815. package/presets/mavis/php-laravel/ai-local/conventions.md +8 -0
  816. package/presets/mavis/php-laravel/commands/task-continue.md +8 -0
  817. package/presets/mavis/php-laravel/commands/task.md +14 -1
  818. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +367 -16
  819. package/presets/mavis/php-laravel/rules/agent-team-intake.md +3 -0
  820. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +39 -5
  821. package/presets/mavis/php-laravel/rules/ai-local-overlay.md +4 -0
  822. package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +20 -1
  823. package/presets/mavis/php-laravel/rules/feature-delivery-workflow.md +11 -1
  824. package/presets/mavis/php-laravel/rules/language-policy.md +43 -0
  825. package/presets/mavis/php-laravel/rules/laravel-app-core.md +6 -0
  826. package/presets/mavis/php-laravel/rules/preset-goals.md +31 -0
  827. package/presets/mavis/php-laravel/rules/preset-layering.md +1 -1
  828. package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +4 -0
  829. package/presets/mavis/php-laravel/rules/preset-twin-sync.md +19 -77
  830. package/presets/mavis/php-laravel/rules/preset-writing-style.md +42 -0
  831. package/presets/mavis/php-laravel/team/README.md +15 -1
  832. package/presets/mavis/svelte/REPO_AGENTS.md +3 -0
  833. package/presets/mavis/svelte/adapter-map.json +30 -3
  834. package/presets/mavis/svelte/agents/README.md +7 -0
  835. package/presets/mavis/svelte/agents/build-verifier.md +12 -0
  836. package/presets/mavis/svelte/agents/code-reviewer.md +12 -0
  837. package/presets/mavis/svelte/agents/debugger.md +12 -0
  838. package/presets/mavis/svelte/agents/feature-developer.md +12 -0
  839. package/presets/mavis/svelte/agents/task-analyst.md +43 -2
  840. package/presets/mavis/svelte/agents/task-router.md +18 -0
  841. package/presets/mavis/svelte/ai-local/conventions.md +8 -0
  842. package/presets/mavis/svelte/commands/task-continue.md +8 -0
  843. package/presets/mavis/svelte/commands/task.md +14 -1
  844. package/presets/mavis/svelte/hooks/chain-team-phases.sh +369 -16
  845. package/presets/mavis/svelte/rules/agent-team-intake.md +3 -0
  846. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +39 -5
  847. package/presets/mavis/svelte/rules/ai-local-overlay.md +4 -0
  848. package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +20 -1
  849. package/presets/mavis/svelte/rules/feature-delivery-workflow.md +15 -1
  850. package/presets/mavis/svelte/rules/language-policy.md +43 -0
  851. package/presets/mavis/svelte/rules/mockup-review.md +56 -1
  852. package/presets/mavis/svelte/rules/preset-goals.md +31 -0
  853. package/presets/mavis/svelte/rules/preset-layering.md +1 -1
  854. package/presets/mavis/svelte/rules/preset-pr-checklist.md +4 -0
  855. package/presets/mavis/svelte/rules/preset-twin-sync.md +19 -77
  856. package/presets/mavis/svelte/rules/preset-writing-style.md +42 -0
  857. package/presets/mavis/svelte/rules/svelte-app-core.md +6 -0
  858. package/presets/mavis/svelte/team/README.md +15 -1
  859. package/presets/mavis/svelte/team/fixtures/artifact-manifest.example.json +1 -1
  860. package/presets/opencode/android-kotlin/REPO_AGENTS.md +3 -0
  861. package/presets/opencode/android-kotlin/adapter-map.json +29 -2
  862. package/presets/opencode/android-kotlin/agents/README.md +7 -0
  863. package/presets/opencode/android-kotlin/agents/build-verifier.md +12 -0
  864. package/presets/opencode/android-kotlin/agents/code-reviewer.md +12 -0
  865. package/presets/opencode/android-kotlin/agents/debugger.md +12 -0
  866. package/presets/opencode/android-kotlin/agents/feature-developer.md +12 -0
  867. package/presets/opencode/android-kotlin/agents/task-analyst.md +31 -1
  868. package/presets/opencode/android-kotlin/agents/task-router.md +18 -0
  869. package/presets/opencode/android-kotlin/ai-local/conventions.md +8 -0
  870. package/presets/opencode/android-kotlin/commands/task-continue.md +8 -0
  871. package/presets/opencode/android-kotlin/commands/task.md +14 -1
  872. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +369 -16
  873. package/presets/opencode/android-kotlin/rules/agent-team-intake.md +3 -0
  874. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +39 -5
  875. package/presets/opencode/android-kotlin/rules/ai-local-overlay.md +4 -0
  876. package/presets/opencode/android-kotlin/rules/android-app-core.md +6 -0
  877. package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +20 -1
  878. package/presets/opencode/android-kotlin/rules/feature-delivery-workflow.md +4 -0
  879. package/presets/opencode/android-kotlin/rules/language-policy.md +43 -0
  880. package/presets/opencode/android-kotlin/rules/mockup-review.md +56 -1
  881. package/presets/opencode/android-kotlin/rules/preset-goals.md +31 -0
  882. package/presets/opencode/android-kotlin/rules/preset-layering.md +1 -1
  883. package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +4 -0
  884. package/presets/opencode/android-kotlin/rules/preset-twin-sync.md +19 -77
  885. package/presets/opencode/android-kotlin/rules/preset-writing-style.md +42 -0
  886. package/presets/opencode/android-kotlin/team/README.md +15 -1
  887. package/presets/opencode/go/REPO_AGENTS.md +3 -0
  888. package/presets/opencode/go/adapter-map.json +30 -3
  889. package/presets/opencode/go/agents/README.md +5 -0
  890. package/presets/opencode/go/agents/build-verifier.md +12 -0
  891. package/presets/opencode/go/agents/code-reviewer.md +12 -0
  892. package/presets/opencode/go/agents/debugger.md +12 -0
  893. package/presets/opencode/go/agents/feature-developer.md +12 -0
  894. package/presets/opencode/go/agents/task-analyst.md +31 -1
  895. package/presets/opencode/go/agents/task-router.md +18 -0
  896. package/presets/opencode/go/ai-local/conventions.md +8 -0
  897. package/presets/opencode/go/commands/task-continue.md +8 -0
  898. package/presets/opencode/go/commands/task.md +14 -1
  899. package/presets/opencode/go/hooks/chain-team-phases.sh +367 -16
  900. package/presets/opencode/go/rules/agent-team-intake.md +3 -0
  901. package/presets/opencode/go/rules/agent-team-orchestrator.md +39 -5
  902. package/presets/opencode/go/rules/ai-local-overlay.md +4 -0
  903. package/presets/opencode/go/rules/code-quality-and-refactoring.md +20 -1
  904. package/presets/opencode/go/rules/feature-delivery-workflow.md +11 -1
  905. package/presets/opencode/go/rules/go-app-core.md +6 -0
  906. package/presets/opencode/go/rules/language-policy.md +43 -0
  907. package/presets/opencode/go/rules/preset-goals.md +31 -0
  908. package/presets/opencode/go/rules/preset-layering.md +1 -1
  909. package/presets/opencode/go/rules/preset-pr-checklist.md +4 -0
  910. package/presets/opencode/go/rules/preset-twin-sync.md +19 -77
  911. package/presets/opencode/go/rules/preset-writing-style.md +42 -0
  912. package/presets/opencode/go/team/README.md +15 -1
  913. package/presets/opencode/ios-swift/REPO_AGENTS.md +3 -0
  914. package/presets/opencode/ios-swift/adapter-map.json +29 -2
  915. package/presets/opencode/ios-swift/agents/README.md +7 -0
  916. package/presets/opencode/ios-swift/agents/build-verifier.md +12 -0
  917. package/presets/opencode/ios-swift/agents/code-reviewer.md +12 -0
  918. package/presets/opencode/ios-swift/agents/debugger.md +12 -0
  919. package/presets/opencode/ios-swift/agents/feature-developer.md +12 -0
  920. package/presets/opencode/ios-swift/agents/task-analyst.md +31 -1
  921. package/presets/opencode/ios-swift/agents/task-router.md +18 -0
  922. package/presets/opencode/ios-swift/ai-local/conventions.md +8 -0
  923. package/presets/opencode/ios-swift/commands/task-continue.md +8 -0
  924. package/presets/opencode/ios-swift/commands/task.md +14 -1
  925. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +369 -16
  926. package/presets/opencode/ios-swift/rules/agent-team-intake.md +3 -0
  927. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +39 -5
  928. package/presets/opencode/ios-swift/rules/ai-local-overlay.md +4 -0
  929. package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +20 -1
  930. package/presets/opencode/ios-swift/rules/feature-delivery-workflow.md +15 -1
  931. package/presets/opencode/ios-swift/rules/ios-app-core.md +6 -0
  932. package/presets/opencode/ios-swift/rules/language-policy.md +43 -0
  933. package/presets/opencode/ios-swift/rules/mockup-review.md +56 -1
  934. package/presets/opencode/ios-swift/rules/preset-goals.md +31 -0
  935. package/presets/opencode/ios-swift/rules/preset-layering.md +1 -1
  936. package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +4 -0
  937. package/presets/opencode/ios-swift/rules/preset-twin-sync.md +19 -77
  938. package/presets/opencode/ios-swift/rules/preset-writing-style.md +42 -0
  939. package/presets/opencode/ios-swift/team/README.md +15 -1
  940. package/presets/opencode/java/REPO_AGENTS.md +3 -0
  941. package/presets/opencode/java/adapter-map.json +30 -3
  942. package/presets/opencode/java/agents/README.md +5 -0
  943. package/presets/opencode/java/agents/build-verifier.md +12 -0
  944. package/presets/opencode/java/agents/code-reviewer.md +12 -0
  945. package/presets/opencode/java/agents/debugger.md +12 -0
  946. package/presets/opencode/java/agents/feature-developer.md +12 -0
  947. package/presets/opencode/java/agents/task-analyst.md +31 -1
  948. package/presets/opencode/java/agents/task-router.md +18 -0
  949. package/presets/opencode/java/ai-local/conventions.md +8 -0
  950. package/presets/opencode/java/commands/task-continue.md +8 -0
  951. package/presets/opencode/java/commands/task.md +14 -1
  952. package/presets/opencode/java/hooks/chain-team-phases.sh +367 -16
  953. package/presets/opencode/java/rules/agent-team-intake.md +3 -0
  954. package/presets/opencode/java/rules/agent-team-orchestrator.md +39 -5
  955. package/presets/opencode/java/rules/ai-local-overlay.md +4 -0
  956. package/presets/opencode/java/rules/code-quality-and-refactoring.md +20 -1
  957. package/presets/opencode/java/rules/feature-delivery-workflow.md +11 -1
  958. package/presets/opencode/java/rules/java-app-core.md +6 -0
  959. package/presets/opencode/java/rules/language-policy.md +43 -0
  960. package/presets/opencode/java/rules/preset-goals.md +31 -0
  961. package/presets/opencode/java/rules/preset-layering.md +1 -1
  962. package/presets/opencode/java/rules/preset-pr-checklist.md +4 -0
  963. package/presets/opencode/java/rules/preset-twin-sync.md +19 -77
  964. package/presets/opencode/java/rules/preset-writing-style.md +42 -0
  965. package/presets/opencode/java/team/README.md +15 -1
  966. package/presets/opencode/mcp-ts/REPO_AGENTS.md +3 -0
  967. package/presets/opencode/mcp-ts/adapter-map.json +28 -1
  968. package/presets/opencode/mcp-ts/agents/README.md +7 -0
  969. package/presets/opencode/mcp-ts/agents/build-verifier.md +12 -0
  970. package/presets/opencode/mcp-ts/agents/feature-developer.md +12 -0
  971. package/presets/opencode/mcp-ts/agents/task-analyst.md +31 -1
  972. package/presets/opencode/mcp-ts/agents/task-router.md +18 -0
  973. package/presets/opencode/mcp-ts/ai-local/conventions.md +8 -0
  974. package/presets/opencode/mcp-ts/commands/task-continue.md +8 -0
  975. package/presets/opencode/mcp-ts/commands/task.md +14 -1
  976. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +367 -16
  977. package/presets/opencode/mcp-ts/rules/agent-team-intake.md +3 -0
  978. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +39 -5
  979. package/presets/opencode/mcp-ts/rules/ai-local-overlay.md +4 -0
  980. package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +20 -1
  981. package/presets/opencode/mcp-ts/rules/feature-delivery-workflow.md +11 -1
  982. package/presets/opencode/mcp-ts/rules/language-policy.md +43 -0
  983. package/presets/opencode/mcp-ts/rules/mcp-ts-app-core.md +6 -0
  984. package/presets/opencode/mcp-ts/rules/preset-goals.md +31 -0
  985. package/presets/opencode/mcp-ts/rules/preset-layering.md +1 -1
  986. package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +4 -0
  987. package/presets/opencode/mcp-ts/rules/preset-twin-sync.md +19 -77
  988. package/presets/opencode/mcp-ts/rules/preset-writing-style.md +42 -0
  989. package/presets/opencode/mcp-ts/team/README.md +15 -1
  990. package/presets/opencode/next/REPO_AGENTS.md +3 -0
  991. package/presets/opencode/next/adapter-map.json +46 -3
  992. package/presets/opencode/next/agents/README.md +6 -0
  993. package/presets/opencode/next/agents/build-verifier.md +12 -0
  994. package/presets/opencode/next/agents/code-reviewer.md +23 -0
  995. package/presets/opencode/next/agents/debugger.md +12 -0
  996. package/presets/opencode/next/agents/feature-developer.md +20 -2
  997. package/presets/opencode/next/agents/mockup-reviewer.md +25 -4
  998. package/presets/opencode/next/agents/task-analyst.md +43 -2
  999. package/presets/opencode/next/agents/task-router.md +18 -0
  1000. package/presets/opencode/next/ai-local/conventions.md +8 -0
  1001. package/presets/opencode/next/ai-local/rules-library/agent-pipeline-gates.md +1 -1
  1002. package/presets/opencode/next/ai-local/rules-library/mcp-required-for-ui-layout.md +4 -0
  1003. package/presets/opencode/next/ai-local/rules-library/storybook-dev-compare-figma.md +4 -0
  1004. package/presets/opencode/next/ai-local/rules-library/ui-change-review-gate.md +1 -0
  1005. package/presets/opencode/next/commands/task-continue.md +8 -0
  1006. package/presets/opencode/next/commands/task.md +14 -1
  1007. package/presets/opencode/next/hooks/chain-team-phases.sh +369 -16
  1008. package/presets/opencode/next/rules/agent-team-intake.md +3 -0
  1009. package/presets/opencode/next/rules/agent-team-orchestrator.md +39 -5
  1010. package/presets/opencode/next/rules/ai-local-overlay.md +4 -0
  1011. package/presets/opencode/next/rules/code-quality-and-refactoring.md +20 -1
  1012. package/presets/opencode/next/rules/code-review-mr.md +10 -0
  1013. package/presets/opencode/next/rules/design-tokens-binding.md +23 -1
  1014. package/presets/opencode/next/rules/feature-delivery-workflow.md +19 -1
  1015. package/presets/opencode/next/rules/language-policy.md +43 -0
  1016. package/presets/opencode/next/rules/mockup-review.md +77 -1
  1017. package/presets/opencode/next/rules/next-app-core.md +6 -0
  1018. package/presets/opencode/next/rules/preset-goals.md +31 -0
  1019. package/presets/opencode/next/rules/preset-layering.md +1 -1
  1020. package/presets/opencode/next/rules/preset-pr-checklist.md +4 -0
  1021. package/presets/opencode/next/rules/preset-twin-sync.md +19 -77
  1022. package/presets/opencode/next/rules/preset-writing-style.md +42 -0
  1023. package/presets/opencode/next/skills/README.md +1 -0
  1024. package/presets/opencode/next/skills/code-review/SKILL.md +1 -1
  1025. package/presets/opencode/next/skills/figma-fidelity/SKILL.md +96 -0
  1026. package/presets/opencode/next/skills/mockup-review/SKILL.md +5 -1
  1027. package/presets/opencode/next/team/README.md +16 -1
  1028. package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +1 -1
  1029. package/presets/opencode/next/team/fixtures/feature-parallel.json +84 -0
  1030. package/presets/opencode/nuxt/REPO_AGENTS.md +3 -0
  1031. package/presets/opencode/nuxt/adapter-map.json +30 -3
  1032. package/presets/opencode/nuxt/agents/README.md +7 -0
  1033. package/presets/opencode/nuxt/agents/build-verifier.md +12 -0
  1034. package/presets/opencode/nuxt/agents/code-reviewer.md +12 -0
  1035. package/presets/opencode/nuxt/agents/debugger.md +12 -0
  1036. package/presets/opencode/nuxt/agents/feature-developer.md +12 -0
  1037. package/presets/opencode/nuxt/agents/task-analyst.md +43 -2
  1038. package/presets/opencode/nuxt/agents/task-router.md +18 -0
  1039. package/presets/opencode/nuxt/ai-local/conventions.md +8 -0
  1040. package/presets/opencode/nuxt/commands/task-continue.md +8 -0
  1041. package/presets/opencode/nuxt/commands/task.md +14 -1
  1042. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +369 -16
  1043. package/presets/opencode/nuxt/rules/agent-team-intake.md +3 -0
  1044. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +39 -5
  1045. package/presets/opencode/nuxt/rules/ai-local-overlay.md +4 -0
  1046. package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +20 -1
  1047. package/presets/opencode/nuxt/rules/feature-delivery-workflow.md +15 -1
  1048. package/presets/opencode/nuxt/rules/language-policy.md +43 -0
  1049. package/presets/opencode/nuxt/rules/mockup-review.md +56 -1
  1050. package/presets/opencode/nuxt/rules/nuxt-app-core.md +6 -0
  1051. package/presets/opencode/nuxt/rules/preset-goals.md +31 -0
  1052. package/presets/opencode/nuxt/rules/preset-layering.md +1 -1
  1053. package/presets/opencode/nuxt/rules/preset-pr-checklist.md +4 -0
  1054. package/presets/opencode/nuxt/rules/preset-twin-sync.md +19 -77
  1055. package/presets/opencode/nuxt/rules/preset-writing-style.md +42 -0
  1056. package/presets/opencode/nuxt/team/README.md +15 -1
  1057. package/presets/opencode/nuxt/team/fixtures/artifact-manifest.example.json +1 -1
  1058. package/presets/opencode/php-hexagonal/REPO_AGENTS.md +3 -0
  1059. package/presets/opencode/php-hexagonal/adapter-map.json +30 -3
  1060. package/presets/opencode/php-hexagonal/agents/README.md +5 -0
  1061. package/presets/opencode/php-hexagonal/agents/build-verifier.md +12 -0
  1062. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +12 -0
  1063. package/presets/opencode/php-hexagonal/agents/debugger.md +12 -0
  1064. package/presets/opencode/php-hexagonal/agents/feature-developer.md +12 -0
  1065. package/presets/opencode/php-hexagonal/agents/task-analyst.md +31 -1
  1066. package/presets/opencode/php-hexagonal/agents/task-router.md +18 -0
  1067. package/presets/opencode/php-hexagonal/ai-local/conventions.md +8 -0
  1068. package/presets/opencode/php-hexagonal/commands/task-continue.md +8 -0
  1069. package/presets/opencode/php-hexagonal/commands/task.md +14 -1
  1070. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +367 -16
  1071. package/presets/opencode/php-hexagonal/rules/agent-team-intake.md +3 -0
  1072. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +39 -5
  1073. package/presets/opencode/php-hexagonal/rules/ai-local-overlay.md +4 -0
  1074. package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +20 -1
  1075. package/presets/opencode/php-hexagonal/rules/feature-delivery-workflow.md +11 -1
  1076. package/presets/opencode/php-hexagonal/rules/language-policy.md +43 -0
  1077. package/presets/opencode/php-hexagonal/rules/php-app-core.md +6 -0
  1078. package/presets/opencode/php-hexagonal/rules/preset-goals.md +31 -0
  1079. package/presets/opencode/php-hexagonal/rules/preset-layering.md +1 -1
  1080. package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +4 -0
  1081. package/presets/opencode/php-hexagonal/rules/preset-twin-sync.md +19 -77
  1082. package/presets/opencode/php-hexagonal/rules/preset-writing-style.md +42 -0
  1083. package/presets/opencode/php-hexagonal/team/README.md +15 -1
  1084. package/presets/opencode/php-laravel/REPO_AGENTS.md +3 -0
  1085. package/presets/opencode/php-laravel/adapter-map.json +30 -3
  1086. package/presets/opencode/php-laravel/agents/README.md +5 -0
  1087. package/presets/opencode/php-laravel/agents/build-verifier.md +12 -0
  1088. package/presets/opencode/php-laravel/agents/code-reviewer.md +12 -0
  1089. package/presets/opencode/php-laravel/agents/debugger.md +12 -0
  1090. package/presets/opencode/php-laravel/agents/feature-developer.md +12 -0
  1091. package/presets/opencode/php-laravel/agents/task-analyst.md +31 -1
  1092. package/presets/opencode/php-laravel/agents/task-router.md +18 -0
  1093. package/presets/opencode/php-laravel/ai-local/conventions.md +8 -0
  1094. package/presets/opencode/php-laravel/commands/task-continue.md +8 -0
  1095. package/presets/opencode/php-laravel/commands/task.md +14 -1
  1096. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +367 -16
  1097. package/presets/opencode/php-laravel/rules/agent-team-intake.md +3 -0
  1098. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +39 -5
  1099. package/presets/opencode/php-laravel/rules/ai-local-overlay.md +4 -0
  1100. package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +20 -1
  1101. package/presets/opencode/php-laravel/rules/feature-delivery-workflow.md +11 -1
  1102. package/presets/opencode/php-laravel/rules/language-policy.md +43 -0
  1103. package/presets/opencode/php-laravel/rules/laravel-app-core.md +6 -0
  1104. package/presets/opencode/php-laravel/rules/preset-goals.md +31 -0
  1105. package/presets/opencode/php-laravel/rules/preset-layering.md +1 -1
  1106. package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +4 -0
  1107. package/presets/opencode/php-laravel/rules/preset-twin-sync.md +19 -77
  1108. package/presets/opencode/php-laravel/rules/preset-writing-style.md +42 -0
  1109. package/presets/opencode/php-laravel/team/README.md +15 -1
  1110. package/presets/opencode/svelte/REPO_AGENTS.md +3 -0
  1111. package/presets/opencode/svelte/adapter-map.json +30 -3
  1112. package/presets/opencode/svelte/agents/README.md +7 -0
  1113. package/presets/opencode/svelte/agents/build-verifier.md +12 -0
  1114. package/presets/opencode/svelte/agents/code-reviewer.md +12 -0
  1115. package/presets/opencode/svelte/agents/debugger.md +12 -0
  1116. package/presets/opencode/svelte/agents/feature-developer.md +12 -0
  1117. package/presets/opencode/svelte/agents/task-analyst.md +43 -2
  1118. package/presets/opencode/svelte/agents/task-router.md +18 -0
  1119. package/presets/opencode/svelte/ai-local/conventions.md +8 -0
  1120. package/presets/opencode/svelte/commands/task-continue.md +8 -0
  1121. package/presets/opencode/svelte/commands/task.md +14 -1
  1122. package/presets/opencode/svelte/hooks/chain-team-phases.sh +369 -16
  1123. package/presets/opencode/svelte/rules/agent-team-intake.md +3 -0
  1124. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +39 -5
  1125. package/presets/opencode/svelte/rules/ai-local-overlay.md +4 -0
  1126. package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +20 -1
  1127. package/presets/opencode/svelte/rules/feature-delivery-workflow.md +15 -1
  1128. package/presets/opencode/svelte/rules/language-policy.md +43 -0
  1129. package/presets/opencode/svelte/rules/mockup-review.md +56 -1
  1130. package/presets/opencode/svelte/rules/preset-goals.md +31 -0
  1131. package/presets/opencode/svelte/rules/preset-layering.md +1 -1
  1132. package/presets/opencode/svelte/rules/preset-pr-checklist.md +4 -0
  1133. package/presets/opencode/svelte/rules/preset-twin-sync.md +19 -77
  1134. package/presets/opencode/svelte/rules/preset-writing-style.md +42 -0
  1135. package/presets/opencode/svelte/rules/svelte-app-core.md +6 -0
  1136. package/presets/opencode/svelte/team/README.md +15 -1
  1137. package/presets/opencode/svelte/team/fixtures/artifact-manifest.example.json +1 -1
  1138. package/scripts/_lib/agent-write-scopes.json +27 -0
  1139. package/scripts/_lib/embed-stems.json +8 -1
  1140. package/scripts/check-figma-contract-presence.sh +119 -0
  1141. package/scripts/check-parallel-plan.sh +353 -0
  1142. package/scripts/check-plan-contract.sh +133 -0
  1143. package/scripts/check-preset-goal-contract.sh +214 -0
  1144. package/scripts/check-preset-language-policy.sh +292 -0
  1145. package/scripts/check-preset-prompt-persistence.sh +218 -0
  1146. package/scripts/check-preset-self-review-contract.sh +179 -0
  1147. package/scripts/check-preset-structure.sh +53 -0
  1148. package/scripts/check-preset-token-budget.sh +3 -0
  1149. package/scripts/check-step-graph-contract.sh +123 -0
  1150. package/scripts/fixtures/cli-golden/claude/next.json +36 -31
  1151. package/scripts/fixtures/cli-golden/cursor/next.json +40 -35
  1152. package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +26 -23
  1153. package/scripts/fixtures/cli-golden/mavis/go.json +25 -22
  1154. package/scripts/fixtures/cli-golden/mavis/ios-swift.json +26 -23
  1155. package/scripts/fixtures/cli-golden/mavis/java.json +25 -22
  1156. package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +23 -20
  1157. package/scripts/fixtures/cli-golden/mavis/next.json +39 -34
  1158. package/scripts/fixtures/cli-golden/mavis/nuxt.json +27 -24
  1159. package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +25 -22
  1160. package/scripts/fixtures/cli-golden/mavis/php-laravel.json +25 -22
  1161. package/scripts/fixtures/cli-golden/mavis/svelte.json +27 -24
  1162. package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +26 -23
  1163. package/scripts/fixtures/cli-golden/opencode/go.json +25 -22
  1164. package/scripts/fixtures/cli-golden/opencode/ios-swift.json +26 -23
  1165. package/scripts/fixtures/cli-golden/opencode/java.json +25 -22
  1166. package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +23 -20
  1167. package/scripts/fixtures/cli-golden/opencode/next.json +39 -34
  1168. package/scripts/fixtures/cli-golden/opencode/nuxt.json +27 -24
  1169. package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +25 -22
  1170. package/scripts/fixtures/cli-golden/opencode/php-laravel.json +25 -22
  1171. package/scripts/fixtures/cli-golden/opencode/svelte.json +27 -24
  1172. package/scripts/test-agent-task-metrics-hooks.mjs +167 -0
  1173. package/scripts/test-chain-team-phases-coverage.mjs +129 -0
  1174. package/scripts/test-parallel-plan-fixtures.mjs +173 -0
  1175. package/scripts/test-plan-contract-fixtures.mjs +132 -0
  1176. package/scripts/test-preset-goal-contract-fixtures.mjs +162 -0
  1177. package/scripts/test-preset-language-policy-fixtures.mjs +194 -0
  1178. package/scripts/test-preset-prompt-persistence-fixtures.mjs +232 -0
  1179. package/scripts/test-preset-self-review-contract-fixtures.mjs +163 -0
@@ -27,7 +27,7 @@ Examples:
27
27
 
28
28
  ## Procedure
29
29
 
30
- 1. **Slug** — kebab-case from the description (≤48 characters). Create `.ai.local/team/tasks/<slug>/` via **Write** (e.g. placeholder `pipeline.json` or empty marker) — runtime/hook owns `status.json` — **not** via Shell `mkdir` (sandbox → `Operation not permitted`).
30
+ 1. **Slug** — kebab-case from the description (≤48 characters). Create `.ai.local/team/tasks/<slug>/` via **Write** (e.g. placeholder `pipeline.json` or empty marker) — runtime/hook owns `status.json` — **not** via Shell `mkdir` (sandbox → `Operation not permitted`). Also write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` (write-if-absent; never overwrite on resume; not a manifest `artifacts[]` body). Do **not** create the follow-up ledger `prompt-log.md` here; it is created on the first subsequent user-authored prompt (see **agent-artifact-contracts** § Prompt log).
31
31
  2. **Router** — invoke subagent **task-router** with the task description and slug path.
32
32
  3. **Plan** — show the user the table from `pipeline.json`: intent, steps, skipped, humanGates.
33
33
  4. **Intent retro** — if `intent === "retro"`, run `/technical-retro` and **stop**.
@@ -38,6 +38,12 @@ Examples:
38
38
  6. **After each agent** — wait for hook handoff / reconciliation terminal receipt → `status.state`; do not start the next step until `status.json` reflects handoff (or until there is a `followup_message` from the hook).
39
39
  7. **Human gate** — if after the current step there is a gate in `humanGates` (`after:<agent>`), after the agent finishes **stop** and ask for `/task-continue <slug>`.
40
40
 
41
+ ## Plan contract
42
+
43
+ Intake runs the planning workflow before any implementation: **goal frame** (goal, user value, success + result-evaluation criteria) → **requirements + AC-IDs** → **information-sufficiency** verdict (`sufficient` | `insufficient`) → decompose with a **dependency graph** (`dependsOn[]`, DAG, critical path) and, for large flows, **epics / stages** with exit criteria. The plan is revisable: a **plan revision** is a named, recorded operation (`planRevision`), and progress is checkpointed to `.memlog.md` (with the optional `contextBudget` note) so a run can resume.
44
+
45
+ The producer closes each wave with a **pre-receipt self-review** — a `## Self-review` block in the owned artifact (goal/AC coverage, evidence, alignment/drift) — and names **context loss** vs **context excess/noise**; a detected drift triggers a **re-anchor**: re-read the goal frame + `decomposition.md`, repair, re-run the affected gate, and record append-only in `.memlog.md` (`event:` line, or `decision: replan rev N → N+1`). No new pipeline step; ratchets down for `bounded`/`spike`.
46
+
41
47
  ## Do not
42
48
 
43
49
  - Invoke developer before router and (if in pipeline) analyst/architect.
@@ -50,6 +56,13 @@ Examples:
50
56
  - `in_progress` → ask: continue or new slug.
51
57
 
52
58
 
59
+ ## Dialogue language
60
+
61
+ Resolve the user-facing language once at task start (`.ai.local` `## Language` → prompt language → English;
62
+ mixed → dominant) and record it in the `prompt.md` header (`language: <BCP-47>`). Reuse it for every
63
+ user-facing message and `/task-continue`. See `language-policy`.
64
+
65
+
53
66
  ## Metrics
54
67
 
55
68
  Runtime/hook owns `metrics.json` and `status.json` attempt ledgers. Before the first invocation ensure `task_started` and one `activeAttempts[attemptId]` + `attempt_started` exist (router/runtime bootstrap — parent must not invent parallel indices). On `/task-continue`, run the installed chain hook `end_human_gate` action (or wrapper) so `human_gate_ended` lands before the next attempt. Do not calculate durations in agents.
@@ -57,6 +57,9 @@ const statusPath = path.join(taskDir, 'status.json');
57
57
  const pipelinePath = path.join(taskDir, 'pipeline.json');
58
58
  const METRICS_PATH = path.join(taskDir, 'metrics.json');
59
59
  const METRICS_LOCK = `${METRICS_PATH}.lock`;
60
+ // Pipeline step graph is assigned once pipeline.json is parsed; declared early so the
61
+ // gate-resume branch can schedule from the graph before the main parse point.
62
+ let steps = [];
60
63
 
61
64
  if (!fs.existsSync(statusPath)) {
62
65
  process.stdout.write('{}');
@@ -161,15 +164,16 @@ function artifactOutputIdFor(step, agent) {
161
164
  if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
162
165
  return DEFAULT_ARTIFACT_OUTPUT_IDS[agent] || agent;
163
166
  }
164
- function activateAttempts(step, stepIndex) {
165
- const active = { ...(status.activeAttempts || {}) }; const agents = getStepAgents(step);
166
- const parallelGroupId = step.parallel && agents.length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
167
+ function activateAttempts(step, stepIndex, waveId = null, agentsOverride = null) {
168
+ const active = { ...(status.activeAttempts || {}) };
169
+ const agents = Array.isArray(agentsOverride) && agentsOverride.length > 0 ? agentsOverride : getStepAgents(step);
170
+ const parallelGroupId = step.parallel && getStepAgents(step).length > 1 ? `${status.metricsRunId || slug}:step-${stepIndex}` : null;
167
171
  for (const agent of agents) {
168
172
  const attempt = nextAttemptOrdinal(stepIndex, agent); const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
169
173
  status.metricsRunId = runId; const attemptId = `${runId}:step-${stepIndex}:${agent}:attempt-${attempt}`;
170
174
  if (active[attemptId]) continue;
171
- active[attemptId] = { agent, stepIndex, attempt, startedAt: now, parallelGroupId };
172
- appendMetric({ type: 'attempt_started', at: now, attemptId, stepIndex, stepLabel: step.label || null, agent, role: roleFor(agent), attempt, parallelGroupId, source: 'hook', attributionConfidence: 'high' });
175
+ active[attemptId] = { agent, stepIndex, attempt, startedAt: now, parallelGroupId, waveId: waveId || null };
176
+ appendMetric({ type: 'attempt_started', at: now, attemptId, stepIndex, stepLabel: step.label || null, agent, role: roleFor(agent), attempt, parallelGroupId, waveId: waveId || null, source: 'hook', attributionConfidence: 'high' });
173
177
  }
174
178
  status.activeAttempts = active;
175
179
  }
@@ -232,8 +236,8 @@ function reconcileStatusFromManifest(agent, step, resolved) {
232
236
  return status.state;
233
237
  }
234
238
 
235
- function finishActiveAttempt() {
236
- const resolved = resolvedAttempt(); if (!resolved) return null;
239
+ function finishActiveAttempt(forced) {
240
+ const resolved = forced || resolvedAttempt(); if (!resolved) return null;
237
241
  const durationMs = Date.parse(now) - Date.parse(resolved.entry.startedAt);
238
242
  const outcome = ['completed', 'blocked', 'changes_requested', 'validation_failed'].includes(status.state) ? status.state : 'unknown';
239
243
  appendMetric({ type: 'attempt_finished', at: now, attemptId: resolved.attemptId, outcome, durationMs: Number.isFinite(durationMs) && durationMs >= 0 ? durationMs : null, retryAfterFix: status.retryAfterFix || null, source: resolved.source || 'hook', attributionConfidence: resolved.confidence });
@@ -314,6 +318,208 @@ function findNextExecutableStep(steps, startIdx, dir) {
314
318
  return null;
315
319
  }
316
320
 
321
+ // --- Parallel scheduling & conflict model (mirrors _shared/core/agent-team/plan-graph.md) ---
322
+ function isGraphMode() { return steps.some((step) => step && Array.isArray(step.dependsOn)); }
323
+ function graphSlotKey(stepIndex, agent) { return `${stepIndex}:${agent}`; }
324
+ function readJoinedSlots() { return { ...(status.joinedSlots || {}) }; }
325
+ function isSlotSatisfied(stepIndex, agent) { return Boolean((status.joinedSlots || {})[graphSlotKey(stepIndex, agent)]); }
326
+ function resolveStepIndex(dep) {
327
+ for (let i = 0; i < steps.length; i += 1) if (steps[i] && steps[i].id === dep) return i;
328
+ for (let i = 0; i < steps.length; i += 1) {
329
+ const ids = Array.isArray(steps[i]?.taskIds) ? steps[i].taskIds : [];
330
+ if (ids.includes(dep)) return i;
331
+ }
332
+ return -1;
333
+ }
334
+ function isStepSkipped(stepIndex) {
335
+ if (Array.isArray(status.skippedSteps) && status.skippedSteps.includes(stepIndex)) return true;
336
+ return skipIfMatches(steps[stepIndex]?.skipIf, taskDir);
337
+ }
338
+ function isStepSatisfied(stepIndex) {
339
+ const step = steps[stepIndex];
340
+ if (!step) return false;
341
+ if (isStepSkipped(stepIndex)) return true;
342
+ return getStepAgents(step).every((agent) => isSlotSatisfied(stepIndex, agent));
343
+ }
344
+ function pendingStepIndexes() { return steps.map((_, index) => index).filter((index) => !isStepSatisfied(index)); }
345
+ function unsatisfiedAgents(stepIndex) {
346
+ const step = steps[stepIndex];
347
+ if (!step) return [];
348
+ return getStepAgents(step).filter((agent) => !isSlotSatisfied(stepIndex, agent));
349
+ }
350
+ function declaredScopes(step) {
351
+ return Array.isArray(step?.writeScopes) ? step.writeScopes.filter((scope) => typeof scope === 'string' && scope.length > 0) : [];
352
+ }
353
+ function normalizeScope(scope) { return String(scope).replace(/\/+$/, ''); }
354
+ function scopesOverlap(left, right) {
355
+ const a = normalizeScope(left); const b = normalizeScope(right);
356
+ return a === b || a.startsWith(`${b}/`) || b.startsWith(`${a}/`);
357
+ }
358
+ function stepsConflict(leftIndex, rightIndex) {
359
+ if (leftIndex === rightIndex) return true;
360
+ const leftStep = steps[leftIndex]; const rightStep = steps[rightIndex];
361
+ const leftAgents = getStepAgents(leftStep); const rightAgents = getStepAgents(rightStep);
362
+ if (leftAgents.some((agent) => rightAgents.includes(agent))) return true;
363
+ const leftOutputs = new Set(leftAgents.map((agent) => artifactOutputIdFor(leftStep, agent)));
364
+ if (rightAgents.some((agent) => leftOutputs.has(artifactOutputIdFor(rightStep, agent)))) return true;
365
+ // An undeclared scope is unknown, and an unknown unit conflicts with everything (safe default).
366
+ const leftScopes = declaredScopes(leftStep); const rightScopes = declaredScopes(rightStep);
367
+ if (leftScopes.length === 0 || rightScopes.length === 0) return true;
368
+ for (const a of leftScopes) for (const b of rightScopes) if (scopesOverlap(a, b)) return true;
369
+ return false;
370
+ }
371
+ function selectWave(candidates) {
372
+ const wave = []; const deferred = [];
373
+ for (const index of candidates) {
374
+ if (wave.every((chosen) => !stepsConflict(chosen, index))) wave.push(index);
375
+ else deferred.push(index);
376
+ }
377
+ return { wave, deferred };
378
+ }
379
+ function invalidateFrom(stepIndex, preserveStepIndex) {
380
+ const remove = new Set([stepIndex]);
381
+ let changed = true;
382
+ while (changed) {
383
+ changed = false;
384
+ for (let i = 0; i < steps.length; i += 1) {
385
+ if (remove.has(i)) continue;
386
+ const deps = Array.isArray(steps[i]?.dependsOn) ? steps[i].dependsOn : [];
387
+ if (deps.some((dep) => { const j = resolveStepIndex(dep); return j >= 0 && remove.has(j); })) { remove.add(i); changed = true; }
388
+ }
389
+ }
390
+ // Preserve the requesting step's satisfied slots so a sibling is never re-invoked.
391
+ if (Number.isInteger(preserveStepIndex)) remove.delete(preserveStepIndex);
392
+ const slots = readJoinedSlots();
393
+ const removedAgents = new Set();
394
+ for (const key of Object.keys(slots)) {
395
+ const index = Number(key.split(':')[0]);
396
+ if (remove.has(index)) { removedAgents.add(slots[key].agent); delete slots[key]; }
397
+ }
398
+ status.joinedSlots = slots;
399
+ status.parallelCompleted = (status.parallelCompleted || []).filter((agent) => !removedAgents.has(agent));
400
+ return remove;
401
+ }
402
+ function computeReadySteps() {
403
+ if (!isGraphMode()) return [];
404
+ const inFlight = new Set(Object.values(status.activeAttempts || {}).map((entry) => entry.stepIndex));
405
+ const blocked = new Set(Array.isArray(status.blockedSteps) ? status.blockedSteps : []);
406
+ const skipped = new Set(Array.isArray(status.skippedSteps) ? status.skippedSteps : []);
407
+ const ready = [];
408
+ for (let i = 0; i < steps.length; i += 1) {
409
+ if (blocked.has(i) || inFlight.has(i)) continue;
410
+ if (skipIfMatches(steps[i].skipIf, taskDir)) {
411
+ if (!skipped.has(i)) { recordSkippedStep(steps[i], i); skipped.add(i); }
412
+ continue;
413
+ }
414
+ if (isStepSatisfied(i)) continue;
415
+ const deps = Array.isArray(steps[i].dependsOn) ? steps[i].dependsOn : [];
416
+ if (deps.every((dep) => { const j = resolveStepIndex(dep); return j >= 0 && isStepSatisfied(j); })) ready.push(i);
417
+ }
418
+ status.skippedSteps = [...skipped];
419
+ return ready;
420
+ }
421
+ function handoffForWave(units, waveId) {
422
+ const labels = units.map((unit) => `${steps[unit.stepIndex].id || `step-${unit.stepIndex}`}=${unit.agent}`);
423
+ const attemptIds = Object.entries(status.activeAttempts || {})
424
+ .filter(([, entry]) => units.some((unit) => unit.stepIndex === entry.stepIndex && unit.agent === entry.agent))
425
+ .map(([attemptId, entry]) => `${entry.agent}=${attemptId}`);
426
+ const outputIds = units.map((unit) => `${unit.agent}=${artifactOutputIdFor(steps[unit.stepIndex], unit.agent)}`);
427
+ const inputIds = [...new Set(units.flatMap((unit) => (Array.isArray(steps[unit.stepIndex].artifactInputIds) ? steps[unit.stepIndex].artifactInputIds : [])))];
428
+ return (
429
+ `Invoke IN PARALLEL (one message, multiple Task calls): ${labels.join(' AND ')} for slug "${slug}"${waveId ? ` (waveId=${waveId})` : ''}. ` +
430
+ `Each agent writes its artifact and owned receipt; the hook records slot joins from stops. Do not mutate status.json lifecycle fields. ` +
431
+ `Artifact inputs: ${inputIds.length > 0 ? inputIds.join(', ') : 'manifest defaults'}; owned output IDs: ${outputIds.join('; ')}. ` +
432
+ `Metrics attemptIds: ${attemptIds.join('; ')}. If the hook cannot identify a parallel stop, append a minimal { attemptId, outcome } receipt to .metrics-receipts.json; do not calculate duration.`
433
+ );
434
+ }
435
+ function blockedNotice(blockedIndex, agent) {
436
+ const gated = [];
437
+ for (let i = 0; i < steps.length; i += 1) {
438
+ if (i === blockedIndex || isStepSatisfied(i)) continue;
439
+ const deps = Array.isArray(steps[i].dependsOn) ? steps[i].dependsOn : [];
440
+ if (deps.some((dep) => resolveStepIndex(dep) === blockedIndex)) gated.push(steps[i].id || `step-${i}`);
441
+ }
442
+ return `Step ${blockedIndex} (${agent}) is blocked for slug "${slug}"${gated.length > 0 ? ` and gates: ${gated.join(', ')}` : ''}. No independent ready step remains. Resume only via /task-continue ${slug}.`;
443
+ }
444
+ function noProgressNotice() {
445
+ const pending = pendingStepIndexes().map((index) => steps[index].id || `step-${index}`);
446
+ return `No schedulable step remains for slug "${slug}" (unsatisfied: ${pending.join(', ')}). Resume only via /task-continue ${slug}.`;
447
+ }
448
+ function dispatchReadyWave(prefixMessage) {
449
+ const ready = computeReadySteps();
450
+ if (ready.length === 0) return false;
451
+ const { wave, deferred } = selectWave(ready);
452
+ if (deferred.length > 0) {
453
+ appendMetric({ type: 'parallel_conflict_deferred', at: now, stepIndex: wave[0], deferredStepIndexes: deferred, reason: 'ready set not conflict-free or writeScopes undeclared', source: 'hook', attributionConfidence: 'fallback' });
454
+ }
455
+ // Slot-filtered dispatch: only unsatisfied (stepIndex, agent) slots are invoked.
456
+ const units = wave.flatMap((stepIndex) => unsatisfiedAgents(stepIndex).map((agent) => ({ stepIndex, agent })));
457
+ if (units.length === 0) return false;
458
+ const first = units[0].stepIndex;
459
+ const waveId = `${status.metricsRunId || slug}:wave-${first}`;
460
+ for (const unit of units) activateAttempts(steps[unit.stepIndex], unit.stepIndex, units.length > 1 ? waveId : null, [unit.agent]);
461
+ writeStatus({
462
+ pipelineIndex: first,
463
+ currentAgent: units[0].agent,
464
+ phase: 'executing',
465
+ state: 'in_progress',
466
+ awaitingHumanGate: false,
467
+ parallelCompleted: [],
468
+ parallelOutcomes: {},
469
+ waveSteps: wave,
470
+ waveId,
471
+ });
472
+ const stepIndexes = [...new Set(units.map((unit) => unit.stepIndex))];
473
+ appendMetric({ type: 'parallel_wave_started', at: now, waveId, stepIndexes, agents: units.map((unit) => unit.agent), source: 'hook', attributionConfidence: 'high' });
474
+ let message;
475
+ if (units.length === 1) message = handoffForAgent(units[0].agent, steps[first]?.scope, steps[first]);
476
+ else if (stepIndexes.length === 1 && steps[first].parallel && units.length === getStepAgents(steps[first]).length) message = handoffForParallelStep(steps[first]);
477
+ else message = handoffForWave(units, waveId);
478
+ out(prefixMessage ? `${prefixMessage} ${message}` : message);
479
+ return true;
480
+ }
481
+ function resolveProducerStepIndex(agent, fromIndex) {
482
+ const seen = new Set([fromIndex]);
483
+ const stack = [fromIndex];
484
+ let best = -1;
485
+ while (stack.length > 0) {
486
+ const node = stack.pop();
487
+ const deps = Array.isArray(steps[node]?.dependsOn) ? steps[node].dependsOn : [];
488
+ for (const dep of deps) {
489
+ const j = resolveStepIndex(dep);
490
+ if (j < 0 || seen.has(j)) continue;
491
+ seen.add(j);
492
+ if (getStepAgents(steps[j]).includes(agent)) best = Math.max(best, j);
493
+ stack.push(j);
494
+ }
495
+ }
496
+ return best >= 0 ? best : -1;
497
+ }
498
+ function repairUnattributableStop() {
499
+ const entries = Object.entries(status.activeAttempts || {});
500
+ if (entries.length === 0) return null;
501
+ const bindByAgent = (agent) => {
502
+ if (!agent) return null;
503
+ const matches = entries.filter(([, entry]) => entry.agent === agent);
504
+ return matches.length === 1 ? { attemptId: matches[0][0], entry: matches[0][1], confidence: 'fallback', repaired: true } : null;
505
+ };
506
+ const payloadAgent = typeof hookInput.agentType === 'string' ? hookInput.agentType : (typeof hookInput.agent_type === 'string' ? hookInput.agent_type : null);
507
+ const byPayload = bindByAgent(payloadAgent);
508
+ if (byPayload) return byPayload;
509
+ if (Array.isArray(status.waveSteps) && status.waveSteps.length > 0) {
510
+ const outcomes = status.parallelOutcomes || {};
511
+ const unrecorded = status.waveSteps.flatMap((index) => getStepAgents(steps[index])).filter((agent) => !outcomes[agent]);
512
+ if (unrecorded.length === 1) { const bySole = bindByAgent(unrecorded[0]); if (bySole) return bySole; }
513
+ }
514
+ const byCurrent = bindByAgent(status.currentAgent);
515
+ if (byCurrent) return byCurrent;
516
+ return null;
517
+ }
518
+ function repairHandoffMessage() {
519
+ const listing = Object.entries(status.activeAttempts || {}).map(([attemptId, entry]) => `${entry.agent}=${attemptId}`).join('; ');
520
+ return `Parallel stop could not be attributed for slug "${slug}": in-flight attempts ${listing}; no payload attemptId and no bound receipt for the finished agent. Resume deterministically: append a minimal { attemptId, outcome } receipt for the agent that just finished to .ai.local/team/tasks/${slug}/.metrics-receipts.json, then re-run the installed hooks/chain-team-phases.sh with that attemptId. Do not edit status.json manually.`;
521
+ }
522
+
317
523
  const AGENT_HANDOFF = {
318
524
  'task-analyst': (s) =>
319
525
  `Invoke task-analyst for slug "${s}". Write brief.md and decomposition.md under .ai.local/team/tasks/${s}/. ` +
@@ -483,6 +689,24 @@ if (hookInput.action === 'end_human_gate') {
483
689
  try { resumePipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8')); } catch {}
484
690
  if (resumePipeline) {
485
691
  const resumeSteps = resumePipeline.steps || [];
692
+ if (resumeSteps.some((step) => step && Array.isArray(step.dependsOn))) {
693
+ steps = resumeSteps;
694
+ status.blockedSteps = [];
695
+ status.parallelCompleted = [];
696
+ status.parallelOutcomes = {};
697
+ status.waveSteps = [];
698
+ status.waveId = null;
699
+ if (dispatchReadyWave()) process.exit(0);
700
+ if (pendingStepIndexes().length === 0) {
701
+ status.state = 'completed';
702
+ completeTaskMetrics();
703
+ writeStatus({ pipelineIndex: resumeSteps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
704
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
705
+ process.exit(0);
706
+ }
707
+ out(noProgressNotice());
708
+ process.exit(0);
709
+ }
486
710
  const resumeStart = (typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0) + 1;
487
711
  const resumeNext = findNextExecutableStep(resumeSteps, resumeStart, taskDir);
488
712
  if (resumeNext) {
@@ -581,7 +805,7 @@ if (pipelineParseError) {
581
805
  legacyFlow();
582
806
  }
583
807
 
584
- const steps = pipeline.steps || [];
808
+ steps = pipeline.steps || [];
585
809
  const initialIdx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
586
810
  const initialStep = steps[initialIdx];
587
811
  const activeAttemptCountBeforeFinish = Object.keys(status.activeAttempts || {}).length;
@@ -598,10 +822,23 @@ if (status.state === 'awaiting_artifact_receipt') {
598
822
  process.stdout.write('{}');
599
823
  process.exit(0);
600
824
  }
601
- const finishedAttempt = finishActiveAttempt();
602
- if (!finishedAttempt && (hookInput.attemptId || activeAttemptCountBeforeFinish > 0)) {
603
- process.stdout.write('{}');
604
- process.exit(0);
825
+ let finishedAttempt = finishActiveAttempt();
826
+ if (!finishedAttempt && activeAttemptCountBeforeFinish > 0) {
827
+ if (!hookInput.attemptId) {
828
+ const repaired = repairUnattributableStop();
829
+ if (repaired) {
830
+ appendMetric({ type: 'parallel_attribution_repair', at: now, attemptIds: [repaired.attemptId], source: 'hook', attributionConfidence: 'fallback' });
831
+ reconcileStatusFromManifest(repaired.entry.agent, steps[repaired.entry.stepIndex], repaired);
832
+ finishedAttempt = finishActiveAttempt(repaired);
833
+ } else {
834
+ writeStatus({});
835
+ out(repairHandoffMessage());
836
+ process.exit(0);
837
+ }
838
+ } else {
839
+ process.stdout.write('{}');
840
+ process.exit(0);
841
+ }
605
842
  }
606
843
  endHumanGateIfResumed();
607
844
  if (steps.length === 0 || pipeline.autoChain === false) {
@@ -637,9 +874,27 @@ function scheduleRetry(agent, retryAfterFix, predecessor, explicitStepIndex = nu
637
874
  const idx = typeof status.pipelineIndex === 'number' ? status.pipelineIndex : 0;
638
875
  const currentStep = steps[idx];
639
876
  const completedAgent = finishedAttempt?.entry?.agent || status.currentAgent || getStepAgents(currentStep)[0];
877
+ const completedStepIndex = Number.isInteger(finishedAttempt?.entry?.stepIndex) ? finishedAttempt.entry.stepIndex : idx;
640
878
  const stepAgents = getStepAgents(currentStep);
641
- if (currentStep?.parallel && stepAgents.length > 1) {
879
+ const activeWave = isGraphMode() && Array.isArray(status.waveSteps) && status.waveSteps.filter((i) => Number.isInteger(i) && steps[i]).length > 0
880
+ ? status.waveSteps.filter((i) => Number.isInteger(i) && steps[i])
881
+ : null;
882
+ const waveIndexes = activeWave
883
+ ? activeWave
884
+ : (currentStep?.parallel && stepAgents.length > 1
885
+ ? [idx]
886
+ : (isGraphMode() && finishedAttempt ? [completedStepIndex] : null));
887
+
888
+ if (waveIndexes) {
889
+ const waveAgents = waveIndexes.flatMap((i) => getStepAgents(steps[i]));
642
890
  const done = [...(status.parallelCompleted || [])];
891
+ if (isGraphMode()) {
892
+ for (const waveStep of waveIndexes) {
893
+ for (const waveAgent of getStepAgents(steps[waveStep])) {
894
+ if (isSlotSatisfied(waveStep, waveAgent) && !done.includes(waveAgent)) done.push(waveAgent);
895
+ }
896
+ }
897
+ }
643
898
  const outcomes = { ...(status.parallelOutcomes || {}) };
644
899
  if (finishedAttempt && completedAgent) {
645
900
  if (!done.includes(completedAgent)) done.push(completedAgent);
@@ -649,22 +904,61 @@ if (currentStep?.parallel && stepAgents.length > 1) {
649
904
  confidence: finishedAttempt.confidence,
650
905
  };
651
906
  }
907
+ if (finishedAttempt && completedAgent && isGraphMode() && (finishedAttempt.outcome || status.state) === 'completed') {
908
+ const completedSlots = readJoinedSlots();
909
+ completedSlots[graphSlotKey(completedStepIndex, completedAgent)] = {
910
+ agent: completedAgent,
911
+ stepIndex: completedStepIndex,
912
+ attemptId: finishedAttempt.attemptId,
913
+ outcome: 'completed',
914
+ };
915
+ status.joinedSlots = completedSlots;
916
+ appendMetric({ type: 'step_joined', at: now, stepIndex: completedStepIndex, slotKeys: [graphSlotKey(completedStepIndex, completedAgent)], attemptIds: [finishedAttempt.attemptId], source: 'hook', attributionConfidence: 'high' });
917
+ }
652
918
  writeStatus({ parallelCompleted: done, parallelOutcomes: outcomes });
653
- const remaining = stepAgents.filter((agent) => !done.includes(agent));
919
+ const remaining = waveAgents.filter((agent) => !done.includes(agent));
654
920
  if (remaining.length > 0) {
655
921
  process.stdout.write('{}');
656
922
  process.exit(0);
657
923
  }
658
924
 
659
- const blockedProducer = stepAgents.find((agent) => outcomes[agent]?.outcome === 'blocked');
925
+ const blockedProducer = waveAgents.find((agent) => outcomes[agent]?.outcome === 'blocked');
660
926
  if (blockedProducer) {
927
+ if (isGraphMode()) {
928
+ const blockedStepIndex = waveIndexes.find((i) => getStepAgents(steps[i]).includes(blockedProducer));
929
+ status.blockedSteps = [...new Set([...(status.blockedSteps || []), blockedStepIndex])];
930
+ writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: blockedProducer, parallelCompleted: [], parallelOutcomes: {}, waveSteps: [], waveId: null });
931
+ if (!dispatchReadyWave(`Step ${blockedStepIndex} (${blockedProducer}) is blocked; proceeding with independent ready steps.`)) out(blockedNotice(blockedStepIndex, blockedProducer));
932
+ process.exit(0);
933
+ }
661
934
  writeStatus({ parallelCompleted: [], parallelOutcomes: {}, state: 'blocked', phase: 'blocked', currentAgent: blockedProducer });
662
935
  process.stdout.write('{}');
663
936
  process.exit(0);
664
937
  }
665
938
 
666
- const retryReviewer = stepAgents.find((agent) => outcomes[agent]?.outcome === 'changes_requested');
939
+ const retryReviewer = waveAgents.find((agent) => outcomes[agent]?.outcome === 'changes_requested');
667
940
  if (retryReviewer) {
941
+ if (isGraphMode()) {
942
+ const reviewerStepIndex = waveIndexes.find((i) => getStepAgents(steps[i]).includes(retryReviewer));
943
+ const producerIndex = resolveProducerStepIndex('feature-developer', reviewerStepIndex);
944
+ if (producerIndex < 0) {
945
+ beginHumanGate();
946
+ writeStatus({ awaitingHumanGate: true, state: 'awaiting_approval', currentAgent: retryReviewer, parallelCompleted: [], parallelOutcomes: {}, waveSteps: [], waveId: null });
947
+ out(`${retryReviewer} requested changes for slug "${slug}" but no graph ancestor authors fixes. Read the review artifact. Resume only via /task-continue.`);
948
+ process.exit(0);
949
+ }
950
+ const graphPredecessor = outcomes[retryReviewer]
951
+ ? { attemptId: outcomes[retryReviewer].attemptId, confidence: outcomes[retryReviewer].confidence }
952
+ : finishedAttempt;
953
+ appendMetric({ type: 'retry_scheduled', at: now, attemptId: graphPredecessor?.attemptId || status.lastCompletedAttempt?.attemptId || null, nextAgent: 'feature-developer', retryAfterFix: retryReviewer, source: 'hook', attributionConfidence: graphPredecessor ? graphPredecessor.confidence : 'unknown' });
954
+ invalidateFrom(producerIndex, reviewerStepIndex);
955
+ const siblingOutcomes = { ...(status.parallelOutcomes || {}) };
956
+ delete siblingOutcomes[retryReviewer];
957
+ status.parallelOutcomes = siblingOutcomes;
958
+ writeStatus({ state: 'in_progress', phase: 'executing', waveSteps: [], waveId: null, retryAfterFix: null, retryAfterFixStepIndex: null });
959
+ if (!dispatchReadyWave(`Step ${reviewerStepIndex} (${retryReviewer}) requested changes; re-dispatching unsatisfied steps.`)) out(noProgressNotice());
960
+ process.exit(0);
961
+ }
668
962
  const retryAfterFixStepIndex = idx;
669
963
  const predecessor = outcomes[retryReviewer]
670
964
  ? {
@@ -699,10 +993,51 @@ if (currentStep?.parallel && stepAgents.length > 1) {
699
993
  process.exit(0);
700
994
  }
701
995
 
996
+ if (isGraphMode()) {
997
+ const validationProducer = waveAgents.find((agent) => outcomes[agent]?.outcome === 'validation_failed');
998
+ if (validationProducer) {
999
+ const verifierStepIndex = waveIndexes.find((i) => getStepAgents(steps[i]).includes(validationProducer));
1000
+ const producerIndex = resolveProducerStepIndex('feature-developer', verifierStepIndex);
1001
+ if (producerIndex >= 0) {
1002
+ appendMetric({ type: 'retry_scheduled', at: now, attemptId: outcomes[validationProducer]?.attemptId || null, nextAgent: 'feature-developer', retryAfterFix: validationProducer, source: 'hook', attributionConfidence: 'fallback' });
1003
+ invalidateFrom(producerIndex, verifierStepIndex);
1004
+ writeStatus({ state: 'in_progress', phase: 'executing', parallelCompleted: [], parallelOutcomes: {}, waveSteps: [], waveId: null });
1005
+ if (dispatchReadyWave(`Step ${verifierStepIndex} (${validationProducer}) failed validation; re-dispatching unsatisfied steps.`)) process.exit(0);
1006
+ }
1007
+ }
1008
+ const gatedStep = waveIndexes.find((i) => hasGateAfterStep(steps[i], pipeline.humanGates));
1009
+ if (gatedStep !== undefined) {
1010
+ beginHumanGate();
1011
+ writeStatus({ awaitingHumanGate: true, state: 'awaiting_approval', currentAgent: completedAgent, pipelineIndex: gatedStep, parallelCompleted: [], parallelOutcomes: {}, waveSteps: [], waveId: null });
1012
+ process.stdout.write('{}');
1013
+ process.exit(0);
1014
+ }
1015
+ writeStatus({ parallelCompleted: [], parallelOutcomes: {}, waveSteps: [], waveId: null, state: 'completed' });
1016
+ if (dispatchReadyWave()) process.exit(0);
1017
+ if (Object.keys(status.activeAttempts || {}).length > 0) {
1018
+ process.stdout.write('{}');
1019
+ process.exit(0);
1020
+ }
1021
+ if (pendingStepIndexes().length === 0) {
1022
+ completeTaskMetrics();
1023
+ writeStatus({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1024
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1025
+ process.exit(0);
1026
+ }
1027
+ out(noProgressNotice());
1028
+ process.exit(0);
1029
+ }
1030
+
702
1031
  writeStatus({ parallelCompleted: [], parallelOutcomes: {}, state: 'completed' });
703
1032
  }
704
1033
 
705
1034
  if (status.state === 'blocked') {
1035
+ if (isGraphMode()) {
1036
+ status.blockedSteps = [...new Set([...(status.blockedSteps || []), idx])];
1037
+ writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: completedAgent, waveSteps: [], waveId: null, parallelCompleted: [], parallelOutcomes: {} });
1038
+ if (!dispatchReadyWave(`Step ${idx} (${completedAgent}) is blocked; proceeding with independent ready steps.`)) out(blockedNotice(idx, completedAgent));
1039
+ process.exit(0);
1040
+ }
706
1041
  writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: completedAgent });
707
1042
  process.stdout.write('{}');
708
1043
  process.exit(0);
@@ -784,6 +1119,22 @@ if (hasGateAfterStep(currentStep, pipeline.humanGates)) {
784
1119
  process.exit(0);
785
1120
  }
786
1121
 
1122
+ if (isGraphMode()) {
1123
+ if (Object.keys(status.activeAttempts || {}).length > 0) {
1124
+ process.stdout.write('{}');
1125
+ process.exit(0);
1126
+ }
1127
+ if (dispatchReadyWave()) process.exit(0);
1128
+ if (pendingStepIndexes().length === 0) {
1129
+ completeTaskMetrics();
1130
+ writeStatus({ pipelineIndex: steps.length, phase: 'done', state: 'completed', currentAgent: null, awaitingHumanGate: false });
1131
+ out(`Pipeline complete for "${slug}". Run /technical-retro ${slug}.`);
1132
+ process.exit(0);
1133
+ }
1134
+ out(noProgressNotice());
1135
+ process.exit(0);
1136
+ }
1137
+
787
1138
  const next = findNextExecutableStep(steps, idx + 1, taskDir);
788
1139
  if (!next) {
789
1140
  completeTaskMetrics();
@@ -7,6 +7,9 @@ When the user message looks like a **work request** (implement, add, fix, refact
7
7
  1. Prefer **`/task <their request>`** or invoke **task-router** first.
8
8
  2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
9
9
  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`.
10
+ 4. A work request now runs the planning workflow — **goal frame → requirements → information-sufficiency → decompose** (dependency graph / epics); see **task-framing** and **plan-graph**.
11
+ 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).
12
+ 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**.
10
13
 
11
14
  Exceptions: user explicitly says “no pipeline”, “just do it”, or continues an active slug.
12
15
 
@@ -101,7 +101,7 @@ Existing pipelines without `routingDecision` remain valid; routers emit it for n
101
101
 
102
102
  For local metrics policy and the `metrics.json` ledger, see **agent-task-metrics**. The orchestration runtime records `task_started` and one `attempt_started` before each invocation; the hook records host-clock terminal and human-gate events. Keep active attempt identities in `status.json.activeAttempts` so parallel completions can be bound safely.
103
103
 
104
- Do not calculate durations in agents. For parallel steps, never attribute a stop using `currentAgent` alone: use a stable runtime identity, the sole active attempt, or an explicit receipt marked with fallback confidence.
104
+ Do not calculate durations in agents. For parallel steps, never attribute a stop using `currentAgent` alone: use a stable runtime identity, the sole active attempt, or an explicit receipt marked with fallback confidence. An unattributable stop with in-flight attempts never returns bare `{}` — the hook repairs the binding (payload agent → sole unrecorded slot → `currentAgent`) with `attributionConfidence: "fallback"`, or emits a deterministic resume handoff. See **agent-task-metrics** § Parallel waves.
105
105
 
106
106
  ## Artifact context index and receipts
107
107
 
@@ -113,6 +113,22 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
113
113
  - 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.
114
114
  - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
115
115
 
116
+ ## Plan revision (replanning)
117
+
118
+ 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.
119
+
120
+ ## Context budget & checkpoint/resume
121
+
122
+ Work in bounded waves (one artifact class across the target surface); mechanical waves (generation, embed sync) are delegated to repo scripts rather than spent on tokens. **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
123
+
124
+ ## Self-review & context hygiene
125
+
126
+ Each producing agent runs a **pre-receipt self-review** of its own output — goal/AC coverage, evidence presence, and alignment/drift — **before** it emits its terminal receipt. It is a producer-side step, **not** a new pipeline agent or step, and it does not replace the evidence gate (`verification-before-completion`), the independent `code-reviewer`, or the `build-verifier` project gate.
127
+
128
+ - **Context loss vs excess/noise.** *Loss* = a dropped/misattributed AC or constraint, a stale plan vs the current request, a forgotten prior decision. *Excess/noise* = irrelevant/tangent reads, scope creep beyond the frame, duplicated or bloated artifacts, chat state that belongs on disk.
129
+ - **Re-anchor.** On detected drift, return the run to the framed task: re-read the `task-framing` goal frame + the current `decomposition.md` → repair the drift → re-run the affected gate → record append-only in `.memlog.md` (`event:` line; `decision: replan rev N → N+1` when the plan changes). Re-anchor is a **trigger source of the existing `plan-graph` `replan`** — no second orchestrator, no `status.json`/`metrics.json` field.
130
+ - **Recording & ratchet.** The producer writes a `## Self-review` block in the artifact it owns; the correction lives only in `.memlog.md` (hook-only lifecycle preserved). No self-review, context-health pass, or re-anchor for `bounded`/`spike` tasks (or the `light` profile) — ratchet up for `standard`/`architectural`, never down past a required verification gate. See the requestable `quality/self-review-and-context-hygiene` contract.
131
+
116
132
  ## status.json (pipeline mode)
117
133
 
118
134
  ```json
@@ -136,7 +152,14 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Th
136
152
  | `activeAttempts` | Transient timing bridge keyed by `attemptId` |
137
153
  | `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
138
154
  | `parallelCompleted` | Agents that have stopped in the current parallel step |
139
- | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
155
+ | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step/wave advances, retained across a retry of the same step |
156
+ | `joinedSlots` | Persistent satisfaction ledger `"<stepIndex>:<agent>" → { agent, stepIndex, attemptId, outcome }`; the ready-queue history (graph mode) |
157
+ | `waveSteps` | Step indexes of the in-flight wave; cleared on wave completion |
158
+ | `waveId` | `<runId>:wave-<firstStepIndex>` for the in-flight wave |
159
+ | `graphMode` | Cached `steps.some(s => Array.isArray(s.dependsOn))` |
160
+ | `blockedSteps` | Steps that ended `blocked`, excluded from the ready set until a human-approved retry |
161
+
162
+ Additional states: `blocked` — a step (or a parallel producer) cannot proceed; in graph mode independent ready steps still dispatch, and a fully-gated run emits a deterministic notice (no stall).
140
163
 
141
164
  | state | Meaning |
142
165
  |-------|---------|
@@ -156,7 +179,11 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
156
179
  |-------|-----|
157
180
  | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
158
181
  | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
159
- | `scope` | e.g. `unit-in-dev`, `e2e-only`, `preset-artifacts-only` — passed to developer/qa |
182
+ | `id` | Stable step handle; the recommended value is the decomposition task ID when 1:1. Unique vs other ids and `taskIds`. |
183
+ | `dependsOn` | Step `id`s / `taskIds` that must be satisfied before dispatch. Optional; **any** occurrence switches the hook to graph mode. |
184
+ | `taskIds` | Decomposition task IDs the step realizes — the shared vocabulary with `decomposition.md` and a `dependsOn` alias. |
185
+ | `writeScopes` | Declared write surface for conflict analysis (see **plan-graph** § Conflict model). |
186
+ | `scope` | e.g. `unit-in-dev`, `e2e-only` — passed to developer/qa |
160
187
  | `model` | `cheap` \| `standard` \| `strong` — optional tier override |
161
188
 
162
189
  ## Rules (strict)
@@ -166,13 +193,20 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
166
193
  3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
167
194
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
168
195
  5. Persist handoffs to disk (`brief.md`, `decomposition.md`, `debug-report.md`, `validation-report.md`, `architecture.md`, `migration-plan.md`, `ci-report.md`, `a11y-review.md`, `perf-report.md`, `security-review.md`, `api-contract-review.md`, `unit-test-plan.md`, `documentation.md`, `review.md`, `mockup-review.md`, `ux-design.md`) and update the producer-owned terminal receipt in `artifact-manifest.json`.
169
- 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer.
196
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer. Exception: embedded `mockup-reviewer` FAIL (`changes_requested` while the completed/current agent is `mockup-reviewer`) → `awaiting_approval` / `/task-continue` only — do **not** `retryAfterFix` to developer. A `mockup-reviewer` verdict `mockup-change-requested` (a defect whose fix belongs in the design source, not the implementation) routes the same way — `awaiting_approval`, no developer retry.
170
197
  7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
171
198
  8. When all steps complete, suggest `/technical-retro <slug>`.
172
199
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
200
+ 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.
201
+ 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**.
202
+ 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.
203
+ 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.
173
204
 
174
205
  ## Team artifact I/O
175
206
 
207
+ - **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.
208
+ - **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.
209
+ - **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**.
176
210
  - 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).
177
211
  - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
178
212
  - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
@@ -213,4 +247,4 @@ When user describes a **non-trivial task** (not a question), suggest `/task <mes
213
247
 
214
248
  ## Preset authoring
215
249
 
216
- When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
250
+ When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-goals**, **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
@@ -9,6 +9,9 @@ This rule is mandatory. **You MUST** obey it on every turn, without exception.
9
9
  3. **Apply** — treat every `.ai.local/rules/*.md` and `.ai.local/conventions.md` as a higher-priority rule for this repo. Do **not** load `.ai.local/team/**` as rules (shared pipeline artifacts). The block below ("Authoring `.ai.local/rules/*.md`") defines the conventions.
10
10
  4. **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.
11
11
  5. **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 no `.ai.local/` exists, do NOT mention this rule.
12
+ 6. **Language** — reply to the user in their **native language**: read the `## Language` section of
13
+ `.ai.local/conventions.md` (nearest `.ai.local` first); if unset, infer from the prompt language; else
14
+ English. Development, reasoning, and all artifacts stay **English**. See `language-policy`.
12
15
 
13
16
  If `.ai.local/` does not exist → **no-op**, do not error. Do not produce any log line about its absence.
14
17
 
@@ -35,3 +38,4 @@ Keep files ≤ 120 lines. Match the style of preset rules (short sections, bulle
35
38
  - Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
36
39
  - Living gotchas: `.ai.local/conventions.md`. Pipeline artifacts: `.ai.local/team/` (do not load as rules).
37
40
  - Root `AGENTS.md` reinforces this rule with a `MANDATORY` section.
41
+ - Language policy: `language-policy` (native dialogue; English development/artifacts).