@bonesofspring/ai-rules 0.2.19 → 0.2.21

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 (541) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +17 -2
  3. package/bin/cli.js +83 -6
  4. package/package.json +5 -2
  5. package/presets/_shared/README.md +4 -3
  6. package/presets/_shared/assets/docs-specs/INDEX.md +4 -1
  7. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +13 -0
  8. package/presets/_shared/core/agent-team/agent-task-metrics.md +1 -1
  9. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -3
  10. package/presets/_shared/core/agent-team/task-classification.md +21 -0
  11. package/presets/_shared/core/meta/preset-pr-checklist.md +5 -1
  12. package/presets/_shared/core/meta/preset-token-budget.md +7 -3
  13. package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
  14. package/presets/_shared/core/quality/debug-investigation.md +24 -0
  15. package/presets/_shared/core/quality/verification-before-completion.md +25 -0
  16. package/presets/_shared/core/review/receiving-code-review.md +24 -0
  17. package/presets/_shared/core/testing/testing-principles.md +70 -0
  18. package/presets/claude/android-kotlin/agents/README.md +2 -1
  19. package/presets/claude/android-kotlin/agents/build-verifier.md +6 -0
  20. package/presets/claude/android-kotlin/agents/ci-investigator.md +1 -0
  21. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
  22. package/presets/claude/android-kotlin/agents/debugger.md +5 -0
  23. package/presets/claude/android-kotlin/agents/feature-developer.md +8 -1
  24. package/presets/claude/android-kotlin/agents/openspec-author.md +163 -0
  25. package/presets/claude/android-kotlin/agents/task-analyst.md +11 -1
  26. package/presets/claude/android-kotlin/agents/task-router.md +19 -1
  27. package/presets/claude/android-kotlin/agents/tech-writer.md +4 -0
  28. package/presets/claude/android-kotlin/commands/README.md +0 -2
  29. package/presets/claude/android-kotlin/commands/task-continue.md +1 -1
  30. package/presets/claude/android-kotlin/commands/task.md +1 -5
  31. package/presets/claude/android-kotlin/commands/technical-retro.md +2 -2
  32. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +54 -2
  33. package/presets/claude/android-kotlin/rules/README.md +1 -0
  34. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +7 -4
  35. package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +48 -0
  36. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  37. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +7 -3
  38. package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +2 -0
  39. package/presets/claude/android-kotlin/skills/code-review/SKILL.md +6 -0
  40. package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
  41. package/presets/claude/go/README.md +1 -1
  42. package/presets/claude/go/agents/README.md +3 -2
  43. package/presets/claude/go/agents/build-verifier.md +6 -0
  44. package/presets/claude/go/agents/ci-investigator.md +1 -0
  45. package/presets/claude/go/agents/code-reviewer.md +2 -0
  46. package/presets/claude/go/agents/debugger.md +7 -0
  47. package/presets/claude/go/agents/feature-developer.md +7 -0
  48. package/presets/claude/go/agents/openspec-author.md +163 -0
  49. package/presets/claude/go/agents/task-analyst.md +10 -0
  50. package/presets/claude/go/agents/task-router.md +19 -1
  51. package/presets/claude/go/agents/tech-writer.md +4 -0
  52. package/presets/claude/go/commands/README.md +0 -2
  53. package/presets/claude/go/commands/task-continue.md +1 -1
  54. package/presets/claude/go/commands/task.md +1 -4
  55. package/presets/claude/go/hooks/chain-team-phases.sh +54 -3
  56. package/presets/claude/go/rules/README.md +1 -0
  57. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
  58. package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +48 -0
  59. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  60. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +7 -3
  61. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
  62. package/presets/claude/go/skills/code-review/SKILL.md +6 -0
  63. package/presets/claude/go/skills/debug-investigation/SKILL.md +32 -4
  64. package/presets/claude/ios-swift/agents/README.md +3 -2
  65. package/presets/claude/ios-swift/agents/build-verifier.md +6 -0
  66. package/presets/claude/ios-swift/agents/ci-investigator.md +1 -0
  67. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
  68. package/presets/claude/ios-swift/agents/debugger.md +5 -0
  69. package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
  70. package/presets/claude/ios-swift/agents/openspec-author.md +163 -0
  71. package/presets/claude/ios-swift/agents/task-analyst.md +11 -1
  72. package/presets/claude/ios-swift/agents/task-router.md +19 -1
  73. package/presets/claude/ios-swift/agents/tech-writer.md +4 -0
  74. package/presets/claude/ios-swift/commands/README.md +0 -2
  75. package/presets/claude/ios-swift/commands/task-continue.md +1 -1
  76. package/presets/claude/ios-swift/commands/task.md +1 -5
  77. package/presets/claude/ios-swift/commands/technical-retro.md +2 -2
  78. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +54 -2
  79. package/presets/claude/ios-swift/rules/README.md +1 -0
  80. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +7 -4
  81. package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +48 -0
  82. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  83. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +7 -3
  84. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
  85. package/presets/claude/ios-swift/skills/code-review/SKILL.md +6 -0
  86. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +33 -5
  87. package/presets/claude/java/CLAUDE.md +1 -1
  88. package/presets/claude/java/agents/README.md +3 -2
  89. package/presets/claude/java/agents/build-verifier.md +6 -0
  90. package/presets/claude/java/agents/ci-investigator.md +1 -0
  91. package/presets/claude/java/agents/code-reviewer.md +2 -0
  92. package/presets/claude/java/agents/debugger.md +7 -0
  93. package/presets/claude/java/agents/feature-developer.md +7 -0
  94. package/presets/claude/java/agents/openspec-author.md +163 -0
  95. package/presets/claude/java/agents/task-analyst.md +10 -0
  96. package/presets/claude/java/agents/task-router.md +19 -1
  97. package/presets/claude/java/agents/tech-writer.md +4 -0
  98. package/presets/claude/java/commands/README.md +0 -2
  99. package/presets/claude/java/commands/task-continue.md +1 -1
  100. package/presets/claude/java/commands/task.md +1 -4
  101. package/presets/claude/java/hooks/chain-team-phases.sh +54 -3
  102. package/presets/claude/java/rules/README.md +1 -0
  103. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
  104. package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +48 -0
  105. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  106. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +7 -3
  107. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +2 -0
  108. package/presets/claude/java/skills/code-review/SKILL.md +6 -0
  109. package/presets/claude/java/skills/debug-investigation/SKILL.md +32 -4
  110. package/presets/claude/mcp-ts/agents/build-verifier.md +6 -0
  111. package/presets/claude/mcp-ts/agents/feature-developer.md +7 -0
  112. package/presets/claude/mcp-ts/agents/task-analyst.md +11 -1
  113. package/presets/claude/mcp-ts/agents/task-router.md +14 -0
  114. package/presets/claude/mcp-ts/commands/README.md +0 -2
  115. package/presets/claude/mcp-ts/commands/task-continue.md +1 -1
  116. package/presets/claude/mcp-ts/commands/task.md +1 -4
  117. package/presets/claude/mcp-ts/commands/technical-retro.md +2 -2
  118. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +40 -9
  119. package/presets/claude/mcp-ts/rules/README.md +1 -0
  120. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
  121. package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +48 -0
  122. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  123. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +7 -3
  124. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +2 -0
  125. package/presets/claude/mcp-ts/skills/code-review/SKILL.md +6 -0
  126. package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
  127. package/presets/claude/next/README.md +1 -0
  128. package/presets/claude/next/agents/README.md +2 -2
  129. package/presets/claude/next/agents/build-verifier.md +17 -1
  130. package/presets/claude/next/agents/ci-investigator.md +1 -0
  131. package/presets/claude/next/agents/code-reviewer.md +2 -0
  132. package/presets/claude/next/agents/debugger.md +5 -0
  133. package/presets/claude/next/agents/feature-developer.md +8 -1
  134. package/presets/claude/next/agents/openspec-author.md +163 -0
  135. package/presets/claude/next/agents/task-analyst.md +12 -2
  136. package/presets/claude/next/agents/task-router.md +19 -1
  137. package/presets/claude/next/agents/tech-writer.md +4 -0
  138. package/presets/claude/next/commands/README.md +0 -2
  139. package/presets/claude/next/commands/task-continue.md +1 -1
  140. package/presets/claude/next/commands/task.md +1 -4
  141. package/presets/claude/next/hooks/chain-team-phases.sh +54 -2
  142. package/presets/claude/next/rules/README.md +1 -0
  143. package/presets/claude/next/rules/testing/README.md +6 -0
  144. package/presets/claude/next/rules/testing/tests-e2e-structure.md +84 -48
  145. package/presets/claude/next/rules/testing/tests-unit.md +79 -50
  146. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +3 -4
  147. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +48 -0
  148. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  149. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +7 -3
  150. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
  151. package/presets/claude/next/skills/code-review/SKILL.md +6 -0
  152. package/presets/claude/next/skills/debug-investigation/SKILL.md +29 -14
  153. package/presets/claude/next/team/README.md +0 -3
  154. package/presets/claude/nuxt/agents/README.md +1 -1
  155. package/presets/claude/nuxt/agents/build-verifier.md +6 -0
  156. package/presets/claude/nuxt/agents/ci-investigator.md +1 -0
  157. package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
  158. package/presets/claude/nuxt/agents/debugger.md +5 -0
  159. package/presets/claude/nuxt/agents/feature-developer.md +8 -1
  160. package/presets/claude/nuxt/agents/openspec-author.md +163 -0
  161. package/presets/claude/nuxt/agents/task-analyst.md +12 -2
  162. package/presets/claude/nuxt/agents/task-router.md +19 -1
  163. package/presets/claude/nuxt/agents/tech-writer.md +4 -0
  164. package/presets/claude/nuxt/commands/README.md +0 -2
  165. package/presets/claude/nuxt/commands/task-continue.md +1 -1
  166. package/presets/claude/nuxt/commands/task.md +1 -5
  167. package/presets/claude/nuxt/commands/technical-retro.md +2 -2
  168. package/presets/claude/nuxt/hooks/chain-team-phases.sh +54 -2
  169. package/presets/claude/nuxt/rules/README.md +1 -0
  170. package/presets/claude/nuxt/rules/testing/README.md +6 -0
  171. package/presets/claude/nuxt/rules/testing/tests-e2e-structure.md +86 -43
  172. package/presets/claude/nuxt/rules/testing/tests-unit.md +58 -45
  173. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +8 -5
  174. package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +48 -0
  175. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  176. package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +7 -3
  177. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +2 -0
  178. package/presets/claude/nuxt/skills/code-review/SKILL.md +6 -0
  179. package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +29 -12
  180. package/presets/claude/nuxt/team/README.md +0 -3
  181. package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
  182. package/presets/claude/php-hexagonal/agents/README.md +3 -2
  183. package/presets/claude/php-hexagonal/agents/build-verifier.md +6 -0
  184. package/presets/claude/php-hexagonal/agents/ci-investigator.md +1 -0
  185. package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
  186. package/presets/claude/php-hexagonal/agents/debugger.md +7 -0
  187. package/presets/claude/php-hexagonal/agents/feature-developer.md +7 -0
  188. package/presets/claude/php-hexagonal/agents/openspec-author.md +163 -0
  189. package/presets/claude/php-hexagonal/agents/task-analyst.md +10 -0
  190. package/presets/claude/php-hexagonal/agents/task-router.md +19 -1
  191. package/presets/claude/php-hexagonal/agents/tech-writer.md +4 -0
  192. package/presets/claude/php-hexagonal/commands/README.md +0 -2
  193. package/presets/claude/php-hexagonal/commands/task-continue.md +1 -1
  194. package/presets/claude/php-hexagonal/commands/task.md +1 -4
  195. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +54 -3
  196. package/presets/claude/php-hexagonal/rules/README.md +1 -0
  197. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
  198. package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +48 -0
  199. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  200. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +7 -3
  201. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +2 -0
  202. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +6 -0
  203. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
  204. package/presets/claude/php-laravel/agents/README.md +3 -2
  205. package/presets/claude/php-laravel/agents/build-verifier.md +6 -0
  206. package/presets/claude/php-laravel/agents/ci-investigator.md +1 -0
  207. package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
  208. package/presets/claude/php-laravel/agents/debugger.md +7 -0
  209. package/presets/claude/php-laravel/agents/feature-developer.md +7 -0
  210. package/presets/claude/php-laravel/agents/openspec-author.md +163 -0
  211. package/presets/claude/php-laravel/agents/task-analyst.md +10 -0
  212. package/presets/claude/php-laravel/agents/task-router.md +19 -1
  213. package/presets/claude/php-laravel/agents/tech-writer.md +4 -0
  214. package/presets/claude/php-laravel/commands/README.md +0 -2
  215. package/presets/claude/php-laravel/commands/task-continue.md +1 -1
  216. package/presets/claude/php-laravel/commands/task.md +1 -4
  217. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +54 -3
  218. package/presets/claude/php-laravel/rules/README.md +1 -0
  219. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
  220. package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +48 -0
  221. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  222. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +7 -3
  223. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +2 -0
  224. package/presets/claude/php-laravel/skills/code-review/SKILL.md +6 -0
  225. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +32 -4
  226. package/presets/claude/svelte/agents/README.md +1 -1
  227. package/presets/claude/svelte/agents/build-verifier.md +6 -0
  228. package/presets/claude/svelte/agents/ci-investigator.md +1 -0
  229. package/presets/claude/svelte/agents/code-reviewer.md +2 -0
  230. package/presets/claude/svelte/agents/debugger.md +5 -0
  231. package/presets/claude/svelte/agents/feature-developer.md +8 -1
  232. package/presets/claude/svelte/agents/openspec-author.md +163 -0
  233. package/presets/claude/svelte/agents/task-analyst.md +12 -2
  234. package/presets/claude/svelte/agents/task-router.md +19 -1
  235. package/presets/claude/svelte/agents/tech-writer.md +4 -0
  236. package/presets/claude/svelte/commands/README.md +0 -2
  237. package/presets/claude/svelte/commands/task-continue.md +1 -1
  238. package/presets/claude/svelte/commands/task.md +1 -5
  239. package/presets/claude/svelte/commands/technical-retro.md +2 -2
  240. package/presets/claude/svelte/hooks/chain-team-phases.sh +54 -2
  241. package/presets/claude/svelte/rules/README.md +1 -0
  242. package/presets/claude/svelte/rules/testing/README.md +6 -0
  243. package/presets/claude/svelte/rules/testing/tests-e2e-structure.md +87 -45
  244. package/presets/claude/svelte/rules/testing/tests-unit.md +70 -23
  245. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +8 -5
  246. package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +48 -0
  247. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +5 -1
  248. package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +7 -3
  249. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +2 -0
  250. package/presets/claude/svelte/skills/code-review/SKILL.md +6 -0
  251. package/presets/claude/svelte/skills/debug-investigation/SKILL.md +29 -12
  252. package/presets/claude/svelte/team/README.md +0 -3
  253. package/presets/cursor/android-kotlin/agents/README.md +2 -1
  254. package/presets/cursor/android-kotlin/agents/build-verifier.md +6 -0
  255. package/presets/cursor/android-kotlin/agents/ci-investigator.md +1 -0
  256. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
  257. package/presets/cursor/android-kotlin/agents/debugger.md +5 -0
  258. package/presets/cursor/android-kotlin/agents/feature-developer.md +8 -1
  259. package/presets/cursor/android-kotlin/agents/openspec-author.md +164 -0
  260. package/presets/cursor/android-kotlin/agents/task-analyst.md +11 -1
  261. package/presets/cursor/android-kotlin/agents/task-router.md +19 -1
  262. package/presets/cursor/android-kotlin/agents/tech-writer.md +4 -0
  263. package/presets/cursor/android-kotlin/commands/README.md +0 -2
  264. package/presets/cursor/android-kotlin/commands/task-continue.md +1 -1
  265. package/presets/cursor/android-kotlin/commands/task.md +1 -5
  266. package/presets/cursor/android-kotlin/commands/technical-retro.md +2 -2
  267. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +54 -2
  268. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +7 -4
  269. package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +43 -0
  270. package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +5 -1
  271. package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +7 -3
  272. package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +2 -0
  273. package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +6 -0
  274. package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
  275. package/presets/cursor/go/README.md +6 -6
  276. package/presets/cursor/go/agents/README.md +3 -2
  277. package/presets/cursor/go/agents/build-verifier.md +6 -0
  278. package/presets/cursor/go/agents/ci-investigator.md +1 -0
  279. package/presets/cursor/go/agents/code-reviewer.md +2 -0
  280. package/presets/cursor/go/agents/debugger.md +7 -0
  281. package/presets/cursor/go/agents/feature-developer.md +7 -0
  282. package/presets/cursor/go/agents/openspec-author.md +164 -0
  283. package/presets/cursor/go/agents/task-analyst.md +10 -0
  284. package/presets/cursor/go/agents/task-router.md +19 -1
  285. package/presets/cursor/go/agents/tech-writer.md +4 -0
  286. package/presets/cursor/go/commands/README.md +0 -2
  287. package/presets/cursor/go/commands/task-continue.md +1 -1
  288. package/presets/cursor/go/commands/task.md +1 -4
  289. package/presets/cursor/go/commands/technical-retro.md +2 -2
  290. package/presets/cursor/go/hooks/chain-team-phases.sh +54 -3
  291. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -4
  292. package/presets/cursor/go/rules/ai-local-overlay.mdc +43 -0
  293. package/presets/cursor/go/rules/preset-pr-checklist.mdc +5 -1
  294. package/presets/cursor/go/rules/preset-token-budget.mdc +7 -3
  295. package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
  296. package/presets/cursor/go/skills/code-review/SKILL.md +6 -0
  297. package/presets/cursor/go/skills/debug-investigation/SKILL.md +32 -4
  298. package/presets/cursor/ios-swift/README.md +6 -6
  299. package/presets/cursor/ios-swift/agents/README.md +3 -2
  300. package/presets/cursor/ios-swift/agents/build-verifier.md +6 -0
  301. package/presets/cursor/ios-swift/agents/ci-investigator.md +1 -0
  302. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
  303. package/presets/cursor/ios-swift/agents/debugger.md +5 -0
  304. package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
  305. package/presets/cursor/ios-swift/agents/openspec-author.md +164 -0
  306. package/presets/cursor/ios-swift/agents/task-analyst.md +11 -1
  307. package/presets/cursor/ios-swift/agents/task-router.md +19 -1
  308. package/presets/cursor/ios-swift/agents/tech-writer.md +4 -0
  309. package/presets/cursor/ios-swift/commands/README.md +1 -3
  310. package/presets/cursor/ios-swift/commands/task-continue.md +1 -1
  311. package/presets/cursor/ios-swift/commands/task.md +1 -5
  312. package/presets/cursor/ios-swift/commands/technical-retro.md +2 -2
  313. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +54 -2
  314. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +7 -4
  315. package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +43 -0
  316. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +5 -1
  317. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +7 -3
  318. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
  319. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +6 -0
  320. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +33 -5
  321. package/presets/cursor/java/AGENTS.md +1 -1
  322. package/presets/cursor/java/agents/README.md +3 -2
  323. package/presets/cursor/java/agents/build-verifier.md +6 -0
  324. package/presets/cursor/java/agents/ci-investigator.md +1 -0
  325. package/presets/cursor/java/agents/code-reviewer.md +2 -0
  326. package/presets/cursor/java/agents/debugger.md +7 -0
  327. package/presets/cursor/java/agents/feature-developer.md +7 -0
  328. package/presets/cursor/java/agents/openspec-author.md +164 -0
  329. package/presets/cursor/java/agents/task-analyst.md +10 -0
  330. package/presets/cursor/java/agents/task-router.md +19 -1
  331. package/presets/cursor/java/agents/tech-writer.md +4 -0
  332. package/presets/cursor/java/commands/README.md +0 -2
  333. package/presets/cursor/java/commands/task-continue.md +1 -1
  334. package/presets/cursor/java/commands/task.md +1 -4
  335. package/presets/cursor/java/commands/technical-retro.md +2 -2
  336. package/presets/cursor/java/hooks/chain-team-phases.sh +54 -3
  337. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -4
  338. package/presets/cursor/java/rules/ai-local-overlay.mdc +43 -0
  339. package/presets/cursor/java/rules/preset-pr-checklist.mdc +5 -1
  340. package/presets/cursor/java/rules/preset-token-budget.mdc +7 -3
  341. package/presets/cursor/java/rules/preset-twin-sync.mdc +2 -0
  342. package/presets/cursor/java/skills/code-review/SKILL.md +6 -0
  343. package/presets/cursor/java/skills/debug-investigation/SKILL.md +32 -4
  344. package/presets/cursor/mcp-ts/agents/build-verifier.md +6 -0
  345. package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -0
  346. package/presets/cursor/mcp-ts/agents/task-analyst.md +11 -1
  347. package/presets/cursor/mcp-ts/agents/task-router.md +14 -0
  348. package/presets/cursor/mcp-ts/commands/README.md +0 -2
  349. package/presets/cursor/mcp-ts/commands/task-continue.md +1 -1
  350. package/presets/cursor/mcp-ts/commands/task.md +1 -4
  351. package/presets/cursor/mcp-ts/commands/technical-retro.md +2 -2
  352. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +40 -9
  353. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -4
  354. package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +43 -0
  355. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +5 -1
  356. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +7 -3
  357. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +2 -0
  358. package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +6 -0
  359. package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
  360. package/presets/cursor/next/README.md +8 -6
  361. package/presets/cursor/next/REPO_AGENTS.md +8 -0
  362. package/presets/cursor/next/agents/README.md +2 -2
  363. package/presets/cursor/next/agents/build-verifier.md +17 -1
  364. package/presets/cursor/next/agents/ci-investigator.md +1 -0
  365. package/presets/cursor/next/agents/code-reviewer.md +2 -0
  366. package/presets/cursor/next/agents/debugger.md +5 -0
  367. package/presets/cursor/next/agents/feature-developer.md +8 -1
  368. package/presets/cursor/next/agents/openspec-author.md +164 -0
  369. package/presets/cursor/next/agents/task-analyst.md +12 -2
  370. package/presets/cursor/next/agents/task-router.md +19 -1
  371. package/presets/cursor/next/agents/tech-writer.md +4 -0
  372. package/presets/cursor/next/commands/README.md +0 -2
  373. package/presets/cursor/next/commands/task-continue.md +1 -1
  374. package/presets/cursor/next/commands/task.md +1 -4
  375. package/presets/cursor/next/commands/technical-retro.md +2 -2
  376. package/presets/cursor/next/hooks/chain-team-phases.sh +54 -2
  377. package/presets/cursor/next/rules/README.md +6 -3
  378. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +7 -5
  379. package/presets/cursor/next/rules/ai-local-overlay.mdc +43 -0
  380. package/presets/cursor/next/rules/preset-pr-checklist.mdc +5 -1
  381. package/presets/cursor/next/rules/preset-token-budget.mdc +7 -3
  382. package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
  383. package/presets/cursor/next/rules/tests-e2e-structure.mdc +83 -43
  384. package/presets/cursor/next/rules/tests-unit.mdc +78 -45
  385. package/presets/cursor/next/skills/code-review/SKILL.md +6 -0
  386. package/presets/cursor/next/skills/debug-investigation/SKILL.md +29 -14
  387. package/presets/cursor/next/team/README.md +0 -3
  388. package/presets/cursor/nuxt/README.md +6 -6
  389. package/presets/cursor/nuxt/agents/README.md +1 -1
  390. package/presets/cursor/nuxt/agents/build-verifier.md +6 -0
  391. package/presets/cursor/nuxt/agents/ci-investigator.md +1 -0
  392. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
  393. package/presets/cursor/nuxt/agents/debugger.md +5 -0
  394. package/presets/cursor/nuxt/agents/feature-developer.md +8 -1
  395. package/presets/cursor/nuxt/agents/openspec-author.md +164 -0
  396. package/presets/cursor/nuxt/agents/task-analyst.md +12 -2
  397. package/presets/cursor/nuxt/agents/task-router.md +19 -1
  398. package/presets/cursor/nuxt/agents/tech-writer.md +4 -0
  399. package/presets/cursor/nuxt/commands/README.md +0 -2
  400. package/presets/cursor/nuxt/commands/task-continue.md +1 -1
  401. package/presets/cursor/nuxt/commands/task.md +1 -5
  402. package/presets/cursor/nuxt/commands/technical-retro.md +2 -2
  403. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +54 -2
  404. package/presets/cursor/nuxt/rules/README.md +3 -1
  405. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +8 -5
  406. package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +43 -0
  407. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +5 -1
  408. package/presets/cursor/nuxt/rules/preset-token-budget.mdc +7 -3
  409. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +2 -0
  410. package/presets/cursor/nuxt/rules/tests-e2e-structure.mdc +87 -43
  411. package/presets/cursor/nuxt/rules/tests-unit.mdc +62 -47
  412. package/presets/cursor/nuxt/skills/code-review/SKILL.md +6 -0
  413. package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +29 -12
  414. package/presets/cursor/nuxt/team/README.md +0 -3
  415. package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
  416. package/presets/cursor/php-hexagonal/agents/README.md +3 -2
  417. package/presets/cursor/php-hexagonal/agents/build-verifier.md +6 -0
  418. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +1 -0
  419. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
  420. package/presets/cursor/php-hexagonal/agents/debugger.md +7 -0
  421. package/presets/cursor/php-hexagonal/agents/feature-developer.md +7 -0
  422. package/presets/cursor/php-hexagonal/agents/openspec-author.md +164 -0
  423. package/presets/cursor/php-hexagonal/agents/task-analyst.md +10 -0
  424. package/presets/cursor/php-hexagonal/agents/task-router.md +19 -1
  425. package/presets/cursor/php-hexagonal/agents/tech-writer.md +4 -0
  426. package/presets/cursor/php-hexagonal/commands/README.md +0 -2
  427. package/presets/cursor/php-hexagonal/commands/task-continue.md +1 -1
  428. package/presets/cursor/php-hexagonal/commands/task.md +1 -4
  429. package/presets/cursor/php-hexagonal/commands/technical-retro.md +2 -2
  430. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +54 -3
  431. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -4
  432. package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +43 -0
  433. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +5 -1
  434. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +7 -3
  435. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +2 -0
  436. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +6 -0
  437. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
  438. package/presets/cursor/php-laravel/AGENTS.md +1 -1
  439. package/presets/cursor/php-laravel/agents/README.md +3 -2
  440. package/presets/cursor/php-laravel/agents/build-verifier.md +6 -0
  441. package/presets/cursor/php-laravel/agents/ci-investigator.md +1 -0
  442. package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
  443. package/presets/cursor/php-laravel/agents/debugger.md +7 -0
  444. package/presets/cursor/php-laravel/agents/feature-developer.md +7 -0
  445. package/presets/cursor/php-laravel/agents/openspec-author.md +164 -0
  446. package/presets/cursor/php-laravel/agents/task-analyst.md +10 -0
  447. package/presets/cursor/php-laravel/agents/task-router.md +19 -1
  448. package/presets/cursor/php-laravel/agents/tech-writer.md +4 -0
  449. package/presets/cursor/php-laravel/commands/README.md +0 -2
  450. package/presets/cursor/php-laravel/commands/task-continue.md +1 -1
  451. package/presets/cursor/php-laravel/commands/task.md +1 -4
  452. package/presets/cursor/php-laravel/commands/technical-retro.md +2 -2
  453. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +54 -3
  454. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -4
  455. package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +43 -0
  456. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +5 -1
  457. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +7 -3
  458. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +2 -0
  459. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +6 -0
  460. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +32 -4
  461. package/presets/cursor/svelte/README.md +6 -6
  462. package/presets/cursor/svelte/agents/README.md +1 -1
  463. package/presets/cursor/svelte/agents/build-verifier.md +6 -0
  464. package/presets/cursor/svelte/agents/ci-investigator.md +1 -0
  465. package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
  466. package/presets/cursor/svelte/agents/debugger.md +5 -0
  467. package/presets/cursor/svelte/agents/feature-developer.md +8 -1
  468. package/presets/cursor/svelte/agents/openspec-author.md +164 -0
  469. package/presets/cursor/svelte/agents/task-analyst.md +12 -2
  470. package/presets/cursor/svelte/agents/task-router.md +19 -1
  471. package/presets/cursor/svelte/agents/tech-writer.md +4 -0
  472. package/presets/cursor/svelte/commands/README.md +0 -2
  473. package/presets/cursor/svelte/commands/task-continue.md +1 -1
  474. package/presets/cursor/svelte/commands/task.md +1 -5
  475. package/presets/cursor/svelte/commands/technical-retro.md +2 -2
  476. package/presets/cursor/svelte/hooks/chain-team-phases.sh +54 -2
  477. package/presets/cursor/svelte/rules/README.md +3 -1
  478. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +8 -5
  479. package/presets/cursor/svelte/rules/ai-local-overlay.mdc +43 -0
  480. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +5 -1
  481. package/presets/cursor/svelte/rules/preset-token-budget.mdc +7 -3
  482. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +2 -0
  483. package/presets/cursor/svelte/rules/tests-e2e-structure.mdc +87 -43
  484. package/presets/cursor/svelte/rules/tests-unit.mdc +72 -23
  485. package/presets/cursor/svelte/skills/code-review/SKILL.md +6 -0
  486. package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +29 -12
  487. package/presets/cursor/svelte/team/README.md +0 -3
  488. package/scripts/_lib/embed-stems.json +31 -0
  489. package/scripts/aggregate-agent-task-metrics.mjs +23 -0
  490. package/scripts/check-chain-hook-coverage.sh +109 -0
  491. package/scripts/check-local-overlay.sh +136 -0
  492. package/scripts/check-preset-i18n.sh +2 -2
  493. package/scripts/check-preset-leakage.sh +4 -1
  494. package/scripts/check-preset-structure.sh +21 -1
  495. package/scripts/check-preset-token-budget.sh +20 -10
  496. package/scripts/check-rule-eval.mjs +16 -0
  497. package/scripts/check-shared-core-drift.sh +10 -26
  498. package/scripts/close-agent-task-human-gate.mjs +22 -5
  499. package/scripts/sync-shared-core-embeds.sh +9 -20
  500. package/scripts/test-agent-task-metrics-hooks.mjs +1 -1
  501. package/scripts/test-chain-team-phases-coverage.mjs +411 -0
  502. package/presets/claude/android-kotlin/commands/feature-continue.md +0 -23
  503. package/presets/claude/android-kotlin/commands/feature-start.md +0 -41
  504. package/presets/claude/go/commands/feature-continue.md +0 -23
  505. package/presets/claude/go/commands/feature-start.md +0 -38
  506. package/presets/claude/ios-swift/commands/feature-continue.md +0 -23
  507. package/presets/claude/ios-swift/commands/feature-start.md +0 -41
  508. package/presets/claude/java/commands/feature-continue.md +0 -23
  509. package/presets/claude/java/commands/feature-start.md +0 -38
  510. package/presets/claude/mcp-ts/commands/feature-continue.md +0 -23
  511. package/presets/claude/mcp-ts/commands/feature-start.md +0 -41
  512. package/presets/claude/next/commands/feature-continue.md +0 -23
  513. package/presets/claude/next/commands/feature-start.md +0 -38
  514. package/presets/claude/nuxt/commands/feature-continue.md +0 -23
  515. package/presets/claude/nuxt/commands/feature-start.md +0 -41
  516. package/presets/claude/php-hexagonal/commands/feature-continue.md +0 -23
  517. package/presets/claude/php-hexagonal/commands/feature-start.md +0 -38
  518. package/presets/claude/php-laravel/commands/feature-continue.md +0 -23
  519. package/presets/claude/php-laravel/commands/feature-start.md +0 -38
  520. package/presets/claude/svelte/commands/feature-continue.md +0 -23
  521. package/presets/claude/svelte/commands/feature-start.md +0 -41
  522. package/presets/cursor/android-kotlin/commands/feature-continue.md +0 -23
  523. package/presets/cursor/android-kotlin/commands/feature-start.md +0 -41
  524. package/presets/cursor/go/commands/feature-continue.md +0 -23
  525. package/presets/cursor/go/commands/feature-start.md +0 -41
  526. package/presets/cursor/ios-swift/commands/feature-continue.md +0 -23
  527. package/presets/cursor/ios-swift/commands/feature-start.md +0 -41
  528. package/presets/cursor/java/commands/feature-continue.md +0 -23
  529. package/presets/cursor/java/commands/feature-start.md +0 -41
  530. package/presets/cursor/mcp-ts/commands/feature-continue.md +0 -23
  531. package/presets/cursor/mcp-ts/commands/feature-start.md +0 -41
  532. package/presets/cursor/next/commands/feature-continue.md +0 -23
  533. package/presets/cursor/next/commands/feature-start.md +0 -41
  534. package/presets/cursor/nuxt/commands/feature-continue.md +0 -23
  535. package/presets/cursor/nuxt/commands/feature-start.md +0 -41
  536. package/presets/cursor/php-hexagonal/commands/feature-continue.md +0 -23
  537. package/presets/cursor/php-hexagonal/commands/feature-start.md +0 -41
  538. package/presets/cursor/php-laravel/commands/feature-continue.md +0 -23
  539. package/presets/cursor/php-laravel/commands/feature-start.md +0 -41
  540. package/presets/cursor/svelte/commands/feature-continue.md +0 -23
  541. package/presets/cursor/svelte/commands/feature-start.md +0 -41
@@ -5,71 +5,84 @@ paths:
5
5
  - "**/*.test.{ts,tsx}"
6
6
  ---
7
7
 
8
- # General testing rules
8
+ # Testing principles
9
9
 
10
- - **File names:** for **new** tests use the **`*.spec.ts` / `*.spec.ts`** suffix. Do not rename existing **`*.test.ts` / `*.test.tsx`** without a separate task (legacy).
11
- - **Runner and matchers** — as in the project (often Jest or Vitest); for components — **@vue/test-utils**.
12
- - Primary goal of tests:
13
- - verify **behavior and business rules**, not implementation or internal details.
14
- - **Unit test naming** (strings in `describe` / `it` / `test`):
15
- - consumer apps **may use Russian locale** for titles — clear business phrases (what is checked and expected outcome);
16
- - when ESLint enforces Russian (see below), each sentence in the title **must start with a capital letter** (including after `.`, `!`, `?` and with multiple sentences on one line); the first letter of the whole string is capitalized too.
17
- - **CI check (when configured):** ESLint (`jest/valid-title` in `eslint.config.mjs`) may require titles to start with a Russian capital letter and forbid a space after `.` followed immediately by a lowercase letter (typical "capital after period" violation).
10
+ Stack-agnostic; concrete paths, runners, and selectors live in the stack adapter (`## Stack notes`).
11
+
12
+ ## Behavior vs. implementation
13
+
14
+ - Verify **behavior and business rules**, not implementation or internal details.
15
+
16
+ ## File naming
17
+
18
+ - For **new** tests use `*.spec.ts` / `*.spec.tsx`. Do not rename existing `*.test.ts` / `*.test.tsx` without a separate task (legacy).
19
+
20
+ ## Runner and matchers
21
+
22
+ - Use the project's runner (Jest or Vitest are common); components — the project's Testing Library integration. Reuse existing matchers — no new micro-framework.
23
+
24
+ ## Test title locale
25
+
26
+ - Consumer apps **may use the project locale** (often Russian) — clear business phrases stating what is checked and the expected outcome.
27
+ - When ESLint enforces the locale (e.g. `jest/valid-title`): each sentence must start with a **capital letter** (including after `.`, `!`, `?`); a space after `.` followed by a lowercase letter is forbidden ("capital after period" violation).
18
28
 
19
29
  Good (Russian locale in consumer app):
20
30
 
21
31
  - `it('Возвращает пустой список. Пользователь не авторизован', () => {})` <!-- i18n-keep: E5 --> (Returns empty list. User is not authorized)
22
- - `it('При ошибке сети показывается сообщение об ошибке', () => {})` <!-- i18n-keep: E5 --> (On network error, an error message is shown)
23
32
 
24
33
  Bad (no capital after period; or wrong locale for configured ESLint):
25
34
 
26
35
  - `it('Возвращает пустой список. пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
27
- - `it('Returns empty list when user is guest', () => {})`
36
+ - `it('Returns empty list when user is guest', () => {})` (wrong locale if ESLint enforces Russian)
28
37
 
29
- # Component tests
38
+ ## Isolation and mocks
30
39
 
31
- - Use `render` from `@vue/test-utils`.
32
- - Assertions:
33
- - DOM matchers for Testing Library as wired in the project (`toBeInTheDocument`, `toHaveTextContent`, etc.).
34
- - Interactions:
35
- - `userEvent` from `@testing-library/user-event`.
40
+ - Mock at the **public-contract boundary**; use the project's accepted HTTP/API/store mock approach. Do not mock what is part of the feature's public contract if that breaks the test's meaning.
36
41
 
37
- # Isolation and mocks
42
+ ## Coverage of cross-cutting modules
38
43
 
39
- - For API/store work:
40
- - mock the store (via test-store) or use the project's accepted HTTP/API mock approach.
41
- - Do not mock what is part of the feature's public contract if that breaks the test's meaning.
44
+ - When changing a **shared cross-cutting module** (e.g. HTTP client body parsing, headers, error / auth handling) — **update or add behavior tests** covering success, error, and edge branches relevant to the module under change.
42
45
 
43
- # HTTP client
46
+ ## Data transformation coverage
44
47
 
45
- - When changing the **shared HTTP client implementation** (body parsing, headers, error branches, 401/refresh, `FormData`, `blob`, etc.) — **update or add behavior tests** next to the client module in `lib/clients/**` (prefer `*.spec.ts`; legacy `*.test.ts` do not touch without a task).
46
- - Cover meaningful branches: successful JSON, HTTP error, network, auth scenarios relevant to the project.
48
+ - Data transformation functions with computed fields and branches must have unit tests covering edge cases (boundary values, missing fields, unexpected value combinations).
47
49
 
48
- # Mappers and data transformation
50
+ ## Reuse fixtures over ad-hoc random data
49
51
 
50
- - Data mapping functions (DTO domain model and back), especially with computed fields and branches, must have unit tests.
51
- - In mapper tests, pay special attention to edge cases and business-rule regression (for example, boundary values, missing fields, unexpected value combinations).
52
+ - Prefer shared fixtures / handlers from the project's accepted mocks module; do not duplicate interfaces in tests. Use the API response types (DTO types) and the **target domain types** from the project's public type surface.
52
53
 
53
- # Agent requirement
54
+ ## E2E: one canonical scenario plan per feature
54
55
 
55
- When adding tests:
56
- - Follow existing test structure and patterns in the repository: `*.spec.ts(x)` next to the module or in a shared test directory — as in neighboring features.
57
- - Add tests for critical logic branches and edge cases.
58
- - When working with data:
59
- - use **response types** from the API (DTO types) and **target domain types** from `@/types`; do not duplicate interfaces in tests;
60
- - when possible, rely on data and handlers from `mocks/**` (or repo equivalent), not ad-hoc random test data.
61
- - Placement:
62
- - for **UI components** — **do not create** a `__tests__` subdirectory inside the component folder; the test is a sibling `*.spec.ts`.
63
- - in **other modules** (for example `api/services`) an existing `__tests__` layout is acceptable — do not break it for UI uniformity.
64
- - **new** files — `*.spec.ts` / `*.spec.ts` (see "File names" above).
65
- ## Incorrect
56
+ - For each feature keep a **single canonical scenario plan** (distinct from implementation specs; the stack adapter names the file — typically `*.cases.md`).
66
57
 
67
- ```ts
68
- it('returns empty list when guest', () => {})
69
- ```
58
+ ## E2E: scenario ↔ test traceability
70
59
 
71
- - `it('Возвращает пустой список. пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
60
+ - Every scenario has a corresponding test. **Do not weaken** assertions to match an outdated implementation — tests must reflect business expectations from the plan. Colocate plan and executable tests in the same directory.
61
+
62
+ ## E2E: page objects / shared helpers
63
+
64
+ - Prefer page objects and shared helpers over scattered selectors and per-test setup duplication.
65
+
66
+ ## E2E: stable identifiers (PREFIX-XXX)
67
+
68
+ - When scenarios need stable IDs, prefix the title with `PREFIX-XXX`: `PREFIX` = first letters of words in the entity under test (Latin uppercase); `XXX` = sequential number with three digits and leading zeros. Within one `PREFIX`, numbers must form a consistent sequence with no duplicates.
69
+ - Example: `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed)
70
+
71
+ ## E2E: selector priority
72
+
73
+ - Prefer role/label selectors for accessibility and forms; fall back to `data-testid` for stable elements. Use a **hierarchical naming convention** on page roots and key interactive elements (stack adapter defines the scheme — typically `{parent}__{element}`).
74
+
75
+ ## E2E: keep plans and selectors in sync with UI
76
+
77
+ - When changing UI: update selectors in page objects and cross-check with the scenario plan. When adding/changing tests: read the matching plan and sync scenario titles first.
72
78
 
73
- ## Correct
79
+ ## Stack notes
74
80
 
75
- - `it('Возвращает пустой список. Пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
81
+ - `render` and DOM matchers (`toBeInTheDocument`, `toHaveTextContent`, ) from `@vue/test-utils`.
82
+ - `userEvent` from `@testing-library/user-event`.
83
+ - `jest/valid-title` ESLint rule in `eslint.config.mjs` (Nuxt project root; no `app/` prefix) — capital-after-period.
84
+ - HTTP-client behavior tests next to `lib/clients/**` (Nuxt convention, no `app/` prefix).
85
+ - Shared fixtures live in `mocks/**`; DTO types from API + `@/types` for domain types — never duplicate interfaces in tests.
86
+ - Mock the store via `test-store` (Pinia) or the project's accepted HTTP/API mock approach.
87
+ - UI placement: sibling `*.spec.ts` (no `__tests__/` inside component folder); `api/services` `__tests__` layout is acceptable.
88
+ - `## Stack notes` content is stripped by `scripts/check-shared-core-drift.sh` before byte-comparing this file against `_shared/core/testing/testing-principles.md`; keep prose above (core content) verbatim against the core file.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Orchestrates the agent team via task-router and pipeline.json. Use for /task, /task-continue, /feature-start, task decomposition, or when the user describes a feature, bug, or review request.
2
+ description: Orchestrates the agent team via task-router and pipeline.json. Use for /task, /task-continue, task decomposition, or when the user describes a feature, bug, or review request.
3
3
  paths: .claude/team/**
4
4
  ---
5
5
 
@@ -17,8 +17,6 @@ Work request without `/task` — see **`agent-team-intake.mdc`** (when to sugges
17
17
  |---------|------|
18
18
  | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
19
19
  | `/task-continue <slug>` | After human gate or pause |
20
- | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
21
- | `/feature-continue <slug>` | Alias of task-continue |
22
20
  | `/spec-start [desc]` | Generate/bootstrap `docs/specs` — router intent `spec-gen` → analyst author mode → human gate |
23
21
  | `/technical-retro [slug]` | Retro with agent team block |
24
22
 
@@ -50,6 +48,7 @@ Work request without `/task` — see **`agent-team-intake.mdc`** (when to sugges
50
48
  | `playwright-test-generator` | e2e tests | e2e spec generation |
51
49
  | `playwright-test-healer` | e2e fixes | failing/flaky e2e fixes |
52
50
  | `tech-writer` | docs / team | docs-only, feature/migration docs |
51
+ | `openspec-author` | `openspec/**` only | openspec-change (`/opsx:propose`, `/opsx:apply`, `/opsx:archive`, openspec refresh) |
53
52
 
54
53
  **Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write `.cursor/team/**`. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true` (Cursor blocks *all* file writes, including team artifacts).
55
54
 
@@ -57,7 +56,7 @@ Full prompts: `.cursor/agents/*.md`. Artifact conventions: `.cursor/team/README.
57
56
 
58
57
  **Behavioral UX:** `task-analyst` loads requestable skill `ux-design` for standalone intent `ux-design` and embedded required-signal / advisory UI AC. No `ux-designer` agent in v1.
59
58
 
60
- **Product specs:** When `/task`, `/feature-start`, or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
59
+ **Product specs:** When `/task` or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
61
60
 
62
61
  When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
63
62
 
@@ -180,7 +179,7 @@ After each agent completes, verify its terminal manifest receipt, then let the o
180
179
 
181
180
  ## Legacy mode
182
181
 
183
- If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
182
+ If `pipeline.json` is missing, fall back to fixed phases: analysis → development → review → testing. Hook supports both.
184
183
 
185
184
  ## Skip pipeline when
186
185
 
@@ -196,3 +195,7 @@ Borderline work requests — see **`agent-team-intake.mdc`**.
196
195
  ## Auto-detection (optional)
197
196
 
198
197
  When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
198
+
199
+ ## Preset authoring
200
+
201
+ When the work edits `packages/ai-rules/presets/**` (or dogfood `.claude/` sync of presets), follow meta-rules: **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Local overlay from .ai.local/ (consumer-owned rules with priority over preset rules) — MANDATORY
3
+ paths:
4
+ - "**/.ai.local/**"
5
+ - "**/AGENTS.md"
6
+ - "**/CLAUDE.md"
7
+ alwaysApply: false
8
+ impact: CRITICAL
9
+ ---
10
+
11
+ # Local overlay (`.ai.local/`) — MANDATORY
12
+
13
+ This rule is mandatory. **You MUST** obey it on every turn, without exception.
14
+
15
+ ## On every turn
16
+
17
+ 1. **Probe** — before answering, run `ls -la .ai.local` from the repository root.
18
+ 2. **Walk** — if `.ai.local/` exists at multiple levels (monorepo), read every level from root to leaf. **Deeper wins** in practice: more specific rules appear later in the assembled context and take precedence.
19
+ 3. **Apply** — treat every `.ai.local/rules/*.md` and `.ai.local/conventions.md` as a higher-priority rule for this repo. The block below ("Authoring `.ai.local/rules/*.md`") defines the conventions.
20
+ 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.
21
+ 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.
22
+
23
+ If `.ai.local/` does not exist → **no-op**, do not error. Do not produce any log line about its absence.
24
+
25
+ ## Authoring `.ai.local/rules/*.md` (consumer-side reference)
26
+
27
+ Each `.ai.local/rules/<name>.md` is a plain-markdown rule body. The model parses it as:
28
+
29
+ - Lines before `## Body` are scope metadata. Only `glob:` / `globs:` / `override:` lines are recognised.
30
+ - Everything from `## Body` onward is the rule body.
31
+ - `glob: always` → always-on. Counts against your context budget.
32
+ - `globs: <comma-separated globs>` → on-demand; applies only when matching files are in focus.
33
+ - `override: kill <preset-rule-name>` → drop that preset rule from context.
34
+
35
+ Keep files ≤ 120 lines. Match the style of preset rules (short sections, bullets, code examples).
36
+
37
+ ## Limitations (read this)
38
+
39
+ - Cursor/Claude do **not** natively read `.ai.local/`. This rule is a **prompt-only** mechanism: it asks you, the model, to read and apply the files. Reliability is high but not 100%.
40
+ - If a user adds a file to `.ai.local/` mid-session, **restart the session** to be sure it is picked up.
41
+ - "Priority" is **contextual**, not enforced. Always re-read the local rule before answering questions that touch it.
42
+ - This rule is **not** session-start (Claude convention); it loads on touch of `.ai.local/**` or `AGENTS.md`/`CLAUDE.md`. The "every turn" mandate is enforced by the body text, not by Cursor/Claude loading semantics.
43
+
44
+ ## Pointers
45
+
46
+ - Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
47
+ - Living gotchas alternative: `.claude/team/conventions.md`.
48
+ - Root `AGENTS.md` reinforces this rule with a `MANDATORY` section.
@@ -15,11 +15,15 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
15
15
  - [ ] **Core:** if `_shared/core/**` changed — all `<!-- shared-core: … -->` consumers updated (or documented intentional fork)
16
16
  - [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, nuxt, svelte, ios-swift, android-kotlin, go, java, mcp-ts, php-hexagonal, and php-laravel — see `preset-twin-sync`)
17
17
  - [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
18
- - [ ] **Token budget:** alwaysApply / session-start 3; meta rules not always-on
18
+ - [ ] **Token budget:** Cursor `alwaysApply` 4 (4th slot reserved for `ai-local-overlay`); Claude session-start exactly 3; meta rules not always-on
19
+ - [ ] **Local overlay coverage:** every installable stack ships `ai-local-overlay.mdc` (Cursor) and `ai-local-overlay.md` (Claude) with `MANDATORY` + acknowledgement format + `docs/LOCAL-OVERLAY.md` pointer; Claude twin listed in `claude/<stack>/rules/README.md` mapping table. Run `packages/ai-rules/scripts/check-local-overlay.sh`.
19
20
  - [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
21
+ - [ ] **Hook-only lifecycle:** `status.json` / `metrics.json` writes happen only inside `hooks/`; agents read but never rewrite lifecycle fields. Run `packages/ai-rules/scripts/check-hook-only-lifecycle.sh`.
22
+ - [ ] **Chain fork:** the byte-wise MD5 uniqueness of `chain-team-phases.sh` across the 10 stacks × 2 platforms (20 hooks) holds. Run `packages/ai-rules/scripts/check-chain-hook-coverage.sh` and `packages/ai-rules/scripts/test-chain-team-phases-coverage.mjs`.
20
23
  - [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
21
24
  - [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
22
25
  - [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
26
+ - [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
23
27
  - [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
24
28
  - [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
25
29
 
@@ -14,12 +14,16 @@ Invariants for rule loading in an **installed** preset (consumer app).
14
14
 
15
15
  | Platform | Always-on | Cap |
16
16
  |----------|-----------|-----|
17
- | Cursor | `alwaysApply: true` | **≤ 3** |
17
+ | Cursor | `alwaysApply: true` | **≤ 4** |
18
18
  | Claude | rules **without** `paths:` | **exactly 3** |
19
19
 
20
+ **Cursor 4th slot is reserved for `ai-local-overlay`** (consumer-owned `.ai.local/` rules). If you do not need local overlay, demote that rule to `globs: ["**/.ai.local/**"]` and revert to ≤3.
21
+
20
22
  **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
21
23
 
22
- Session-start body budget (where documented): ≤140 lines total (stretch ≤120).
24
+ Session-start body budget:
25
+ - Claude trio: ≤140 lines total (stretch ≤120).
26
+ - Cursor 4-set: ≤170 lines total (4 rules including `ai-local-overlay`).
23
27
 
24
28
  ## Meta / author rules
25
29
 
@@ -35,4 +39,4 @@ Orchestrator, feature-delivery, code-review, post-change gates, domain globs —
35
39
 
36
40
  ## Verifier
37
41
 
38
- build-verifier **FAIL** if alwaysApply / session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
42
+ build-verifier **FAIL** if Cursor `alwaysApply` count exceeds 4, Claude session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
@@ -35,6 +35,8 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
35
35
 
36
36
  - **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
37
37
  - **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
38
+ - **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter than 15 lines **if and only if** the body is a pointer into shared-core / stack-prose (no standalone prose). Examples live in stack `rules/README.md` (e.g. `cursor/next/rules/README.md` "UI-edit bundle" intent).
39
+ - **Mechanical enforcement is pending.** Today build-verifier excludes only `agent-team-intake` / `technical-retro` / `preset-layering`; slim-companion rules currently pass under the same human-judgement path as thin aliases. Follow-up: add `allow_slim_stems` to `packages/ai-rules/scripts/check-preset-token-budget.sh` analogous to `trio_stems_allowlist`.
38
40
 
39
41
  ## Severity (build-verifier)
40
42
 
@@ -33,6 +33,12 @@ Lead with findings ordered by severity. Required shape (also in `code-review-mr`
33
33
 
34
34
  For agent team tasks, write `.claude/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
35
35
 
36
+ ## Receiving review feedback
37
+
38
+ <!-- shared-core: review/receiving-code-review.md -->
39
+
40
+ When **implementing** review comments (not when issuing them): verify each item against the codebase before changing code; do not perform agreement (`You're absolutely right!`). Unclear items → ask, do not guess.
41
+
36
42
  ## Design guidance
37
43
 
38
44
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -3,19 +3,36 @@ name: debug-investigation
3
3
  description: Investigates bugs, failing tests, crashes, and incorrect behavior with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, regressions, and flaky test diagnosis.
4
4
  ---
5
5
 
6
- # Debug Investigation
6
+ <!-- shared-core: quality/debug-investigation.md -->
7
7
 
8
- ## Process
8
+ # Debug investigation
9
9
 
10
- 1. Reproduce the issue or collect the closest available evidence: error output, failing test, browser snapshot, logs, or user steps.
11
- 2. Define expected vs actual behavior in one sentence.
12
- 3. Trace the failing path through the smallest relevant slice of the codebase.
13
- 4. Identify the root cause before editing. Avoid broad refactors during bugfixes.
14
- 5. Apply the smallest fix that preserves existing architecture and public contracts.
15
- 6. Add or update a regression test when the behavior is user-facing or likely to recur.
16
- 7. Run the narrow failing check first, then relevant lint/type/test validation.
10
+ Stack-agnostic root-cause loop. Consumed by skill `debug-investigation` and agent `debugger`. Platform paths, MCP, and stack commands belong in adapter **Stack notes**.
17
11
 
18
- ## Artifacts
12
+ ## When
13
+
14
+ Any bug, test failure, build failure, or unexpected behavior — **before** proposing a fix.
15
+
16
+ ## Phases (in order)
17
+
18
+ 1. **Evidence** — reproduce, or collect the closest evidence (error output, failing test, logs, user steps).
19
+ 2. **Isolate** — expected vs actual in one sentence; smallest relevant slice of the codebase.
20
+ 3. **Root cause** — name the cause before editing. One hypothesis at a time; do not stack speculative fixes.
21
+ 4. **Minimal fix + verify** — smallest change that preserves architecture and public contracts. Add a regression test when the behavior is user-facing or likely to recur. Re-run the **failing** check first, then the relevant lint/type/test slice.
22
+
23
+ ## 3-fix architecture gate
24
+
25
+ If **three** fix attempts fail, or the same symptom returns after two supposed fixes: **STOP**. Do not attempt fix #4. Escalate — the design is likely wrong (human partner or `solution-architect`). Chasing symptoms is the failure mode.
26
+
27
+ ## Do not
28
+
29
+ - Broad refactor during a bugfix.
30
+ - Fix only where the error surfaces if invalid data originates elsewhere.
31
+ - Claim `fixApplied: true` without re-running the failing check (see `quality/verification-before-completion.md`).
32
+
33
+ ## Stack notes
34
+
35
+ ### Artifacts
19
36
 
20
37
  For agent team tasks, write `.claude/team/tasks/<slug>/debug-report.md` with:
21
38
 
@@ -28,7 +45,7 @@ For agent team tasks, write `.claude/team/tasks/<slug>/debug-report.md` with:
28
45
  Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
29
46
 
30
47
 
31
- ## MCP usage
48
+ ### MCP usage
32
49
 
33
50
  Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
34
51
 
@@ -39,6 +56,6 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
39
56
  If a Sentry/Datadog (or similar) MCP is ready and the task is a production error, event, or trace, use it. Do not invent telemetry.
40
57
 
41
58
 
42
- ## Design guidance
59
+ ### Design guidance
43
60
 
44
61
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -106,8 +106,6 @@ Prefer **`executing`** for pipeline mode. Legacy: `analysis`, `development`, `re
106
106
  /technical-retro <slug>
107
107
  ```
108
108
 
109
- Legacy: `/feature-start`, `/feature-continue`.
110
-
111
109
  ## Creating task dirs
112
110
 
113
111
  Bootstrap `<slug>/` by **writing** `pipeline.json` (Write tool). Runtime/hook owns `status.json` lifecycle; parent may only create a minimal bootstrap if missing. Do **not** use Shell `mkdir -p` — Cursor’s default sandbox returns `Operation not permitted` (especially for repos on macOS Desktop/Documents).
@@ -116,7 +114,6 @@ Bootstrap `<slug>/` by **writing** `pipeline.json` (Write tool). Runtime/hook ow
116
114
 
117
115
  Commit task artifacts if you want them to survive `ai-rules clean cursor`. Or copy finished tasks to `docs/agent-workflow/tasks/<slug>/`.
118
116
 
119
-
120
117
  ## specMode, applyReadiness, memlog
121
118
 
122
119
  - **`specMode`:** `consume` | `generate` | `none` — primary in `brief.md` `## Spec mode`; optional top-level `pipeline.json` `specMode`. `none` skips INDEX/author mode (spike/research).
@@ -16,7 +16,7 @@ Preset for PHP backends using ports & adapters (PSR / Composer-first).
16
16
 
17
17
  - **21 agents** — `agents/README.md` (no a11y / Playwright / XCUITest)
18
18
  - **10 skills** — feature-delivery, spec-authoring, spec-discovery, unit-testing, integration-testing, ci-investigation, debug-investigation, code-review, technical-retro, write-adr
19
- - **5 commands** — `/task`, `/task-continue`, `/feature-start`, `/feature-continue`, `/technical-retro`
19
+ - **3 commands** — `/task`, `/task-continue`, `/technical-retro`
20
20
 
21
21
  ## Dogfood (5 scenarios)
22
22
 
@@ -8,7 +8,7 @@ Role subagents for the Claude Code agent-team pipeline (PHP hexagonal).
8
8
  |-------|------|-----------------|
9
9
  | Codebase analyzer | `codebase-analyzer.md` | no (explain-as-is only) |
10
10
 
11
- ## Roster (21)
11
+ ## Roster (22)
12
12
 
13
13
  | Agent | Production writes |
14
14
  |-------|-------------------|
@@ -19,6 +19,7 @@ Role subagents for the Claude Code agent-team pipeline (PHP hexagonal).
19
19
  | debugger, ci-investigator | minimal |
20
20
  | code-reviewer, security-reviewer, performance-auditor | team only |
21
21
  | migration-specialist, api-contract-reviewer, tech-writer | team / docs |
22
+ | openspec-author | `openspec/**` only — used only when the consumer repo has `openspec/` initialized |
22
23
  | qa-tester, unit-test-*, integration-test-* | tests |
23
24
 
24
25
  **No** `accessibility-reviewer`, Playwright, or XCUITest stems. Replace those intents with **`integration-test-*`**.
@@ -28,5 +29,5 @@ Role subagents for the Claude Code agent-team pipeline (PHP hexagonal).
28
29
  | Tier | Agents |
29
30
  |------|--------|
30
31
  | **cheap** | router, analyst, build-verifier, code-reviewer, tech-writer, codebase-analyzer |
31
- | **standard** | developer, debugger, ci-investigator, api-contract, qa, unit-*, integration-* |
32
+ | **standard** | developer, debugger, ci-investigator, api-contract, qa, unit-*, integration-*, openspec-author |
32
33
  | **strong** | solution-architect, migration-specialist, security-reviewer, performance-auditor |
@@ -17,6 +17,12 @@ You are the build verifier for **PHP hexagonal** services (and for **ai-rules pr
17
17
 
18
18
  **Never** require Playwright, XCUITest, `lint:js`/`lint:css`, `xcodebuild`/`SwiftLint`, `mvn`, or `gradlew` as the PHP gate.
19
19
 
20
+ ## Verification before completion
21
+
22
+ <!-- shared-core: quality/verification-before-completion.md -->
23
+
24
+ Before writing `validation-report.md` or claiming PASS: IDENTIFY the commands, RUN them, READ exit codes, VERIFY they match the verdict, THEN claim. Do not mark PASS from memory of a prior developer run.
25
+
20
26
  ## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
21
27
 
22
28
  From `packages/ai-rules/`:
@@ -27,3 +27,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
27
27
  ## Anti-sycophancy discipline
28
28
 
29
29
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
30
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -16,6 +16,8 @@ You are a senior PHP hexagonal code reviewer. Write only review artifacts under
16
16
 
17
17
  Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundaries.mdc`, `domain-layer.mdc`, `application-usecases.mdc`, `ports-interfaces.mdc`, `adapters-driving.mdc`, `adapters-driven.mdc`, `composition-root.mdc`, `php-conventions.mdc`, `tests-unit.mdc`, `tests-integration.mdc`, `security-php.mdc`.
18
18
 
19
+ You **issue** reviews. Implementers acting on your findings must verify each item against the codebase and must not perform agreement. Do not require gratitude in replies.
20
+
19
21
  ## Review focus (PHP hexagonal)
20
22
 
21
23
  - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
@@ -6,6 +6,8 @@ readonly: false
6
6
 
7
7
  Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/phpunit` output, logs, stack traces, minimal repro.
8
8
 
9
+ Use the **`debug-investigation` skill** for the investigation loop.
10
+
9
11
  ## Approach
10
12
 
11
13
  1. Reproduce with `composer test` / `vendor/bin/phpunit` / focused class/package tests.
@@ -21,6 +23,10 @@ Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/php
21
23
  Write `.claude/team/tasks/<slug>/debug-report.md`.
22
24
 
23
25
 
26
+ ## 3-fix architecture gate
27
+
28
+ After **three** unsuccessful fix attempts (or the same symptom returning twice): STOP. Do not attempt fix #4. Escalate architecture with the human or `solution-architect`. Follow skill `debug-investigation`. Before `fixApplied: true`, re-run the failing check.
29
+
24
30
  ## MCP usage
25
31
 
26
32
  Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
@@ -35,3 +41,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
35
41
  ## Anti-sycophancy discipline
36
42
 
37
43
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
44
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -45,6 +45,13 @@ Update `.claude/team/tasks/<slug>/implementation.md` and the owned implementatio
45
45
  ## Anti-sycophancy discipline
46
46
 
47
47
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
48
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
49
+
50
+ ## Verification before completion
51
+
52
+ <!-- shared-core: quality/verification-before-completion.md -->
53
+
54
+ Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
48
55
 
49
56
  ## Product specs (docs/specs)
50
57