@bonesofspring/ai-rules 0.2.2 → 0.2.3

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 (287) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +26 -4
  3. package/bin/cli.js +259 -72
  4. package/package.json +3 -2
  5. package/presets/claude/ios-swift/CLAUDE.md +28 -20
  6. package/presets/claude/ios-swift/README.md +16 -15
  7. package/presets/claude/ios-swift/agents/README.md +55 -0
  8. package/presets/claude/ios-swift/agents/accessibility-reviewer.md +67 -0
  9. package/presets/claude/ios-swift/agents/api-contract-reviewer.md +72 -0
  10. package/presets/claude/ios-swift/agents/build-verifier.md +64 -0
  11. package/presets/claude/ios-swift/agents/ci-investigator.md +73 -0
  12. package/presets/claude/ios-swift/agents/code-reviewer.md +75 -0
  13. package/presets/claude/ios-swift/agents/debugger.md +72 -0
  14. package/presets/claude/ios-swift/agents/feature-developer.md +35 -0
  15. package/presets/claude/ios-swift/agents/migration-specialist.md +73 -0
  16. package/presets/claude/ios-swift/agents/performance-auditor.md +72 -0
  17. package/presets/claude/ios-swift/agents/qa-tester.md +65 -0
  18. package/presets/claude/ios-swift/agents/security-reviewer.md +69 -0
  19. package/presets/claude/ios-swift/agents/solution-architect.md +17 -0
  20. package/presets/claude/ios-swift/agents/task-analyst.md +25 -0
  21. package/presets/claude/ios-swift/agents/task-router.md +62 -0
  22. package/presets/claude/ios-swift/agents/tech-writer.md +63 -0
  23. package/presets/claude/ios-swift/agents/unit-test-generator.md +54 -0
  24. package/presets/claude/ios-swift/agents/unit-test-healer.md +53 -0
  25. package/presets/claude/ios-swift/agents/unit-test-planner.md +64 -0
  26. package/presets/claude/ios-swift/agents/xcuitest-test-generator.md +47 -0
  27. package/presets/claude/ios-swift/agents/xcuitest-test-healer.md +47 -0
  28. package/presets/claude/ios-swift/agents/xcuitest-test-planner.md +67 -0
  29. package/presets/claude/ios-swift/commands/README.md +12 -2
  30. package/presets/claude/ios-swift/commands/feature-continue.md +51 -0
  31. package/presets/claude/ios-swift/commands/feature-start.md +30 -0
  32. package/presets/claude/ios-swift/commands/task-continue.md +49 -0
  33. package/presets/claude/ios-swift/commands/task.md +50 -0
  34. package/presets/claude/ios-swift/commands/technical-retro.md +58 -0
  35. package/presets/claude/ios-swift/hooks/README.md +10 -0
  36. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +382 -0
  37. package/presets/claude/ios-swift/hooks/guard-shell-command.sh +79 -0
  38. package/presets/claude/ios-swift/rules/README.md +25 -14
  39. package/presets/claude/ios-swift/rules/api-and-data/README.md +2 -1
  40. package/presets/claude/ios-swift/rules/api-and-data/networking.md +2 -2
  41. package/presets/claude/ios-swift/rules/api-and-data/persistence.md +30 -0
  42. package/presets/claude/ios-swift/rules/architecture/README.md +3 -1
  43. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +10 -2
  44. package/presets/claude/ios-swift/rules/architecture/module-public-api.md +25 -0
  45. package/presets/claude/ios-swift/rules/architecture/reference-features.md +50 -0
  46. package/presets/claude/ios-swift/rules/stack/ios-app-core.md +2 -1
  47. package/presets/claude/ios-swift/rules/testing/ui.md +2 -0
  48. package/presets/claude/ios-swift/rules/tooling-and-review/README.md +6 -1
  49. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-intake.md +18 -0
  50. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +47 -0
  51. package/presets/claude/ios-swift/rules/tooling-and-review/code-review.md +5 -0
  52. package/presets/claude/ios-swift/rules/tooling-and-review/post-change-build.md +5 -0
  53. package/presets/claude/ios-swift/rules/tooling-and-review/security-ios.md +36 -0
  54. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +14 -0
  55. package/presets/claude/ios-swift/rules/tooling-and-review/xcode-tooling.md +24 -0
  56. package/presets/claude/ios-swift/rules/ui-and-accessibility/README.md +2 -1
  57. package/presets/claude/ios-swift/rules/ui-and-accessibility/navigation.md +28 -0
  58. package/presets/claude/ios-swift/skills/README.md +13 -0
  59. package/presets/claude/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  60. package/presets/claude/ios-swift/skills/code-review/SKILL.md +27 -0
  61. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  62. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  63. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +10 -0
  64. package/presets/claude/ios-swift/skills/unit-testing/SKILL.md +32 -0
  65. package/presets/claude/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  66. package/presets/claude/ios-swift/team/README.md +27 -0
  67. package/presets/claude/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  68. package/presets/claude/ios-swift/team/fixtures/feature-full.json +48 -0
  69. package/presets/claude/ios-swift/team/fixtures/feature-light.json +36 -0
  70. package/presets/claude/next/CLAUDE.md +29 -5
  71. package/presets/claude/next/README.md +10 -0
  72. package/presets/claude/next/agents/README.md +155 -1
  73. package/presets/claude/next/agents/accessibility-reviewer.md +65 -0
  74. package/presets/claude/next/agents/api-contract-reviewer.md +69 -0
  75. package/presets/claude/next/agents/build-verifier.md +64 -0
  76. package/presets/claude/next/agents/ci-investigator.md +62 -0
  77. package/presets/claude/next/agents/code-reviewer.md +63 -0
  78. package/presets/claude/next/agents/debugger.md +63 -0
  79. package/presets/claude/next/agents/feature-developer.md +27 -0
  80. package/presets/claude/next/agents/migration-specialist.md +69 -0
  81. package/presets/claude/next/agents/performance-auditor.md +68 -0
  82. package/presets/claude/next/agents/qa-tester.md +56 -0
  83. package/presets/claude/next/agents/security-reviewer.md +64 -0
  84. package/presets/claude/next/agents/solution-architect.md +70 -0
  85. package/presets/claude/next/agents/task-analyst.md +111 -0
  86. package/presets/claude/next/agents/task-router.md +94 -0
  87. package/presets/claude/next/agents/tech-writer.md +61 -0
  88. package/presets/claude/next/agents/unit-test-generator.md +37 -0
  89. package/presets/claude/next/agents/unit-test-healer.md +38 -0
  90. package/presets/claude/next/agents/unit-test-planner.md +62 -0
  91. package/presets/claude/next/commands/README.md +10 -2
  92. package/presets/claude/next/commands/feature-continue.md +51 -0
  93. package/presets/claude/next/commands/feature-start.md +30 -0
  94. package/presets/claude/next/commands/task-continue.md +49 -0
  95. package/presets/claude/next/commands/task.md +50 -0
  96. package/presets/claude/next/commands/technical-retro.md +58 -0
  97. package/presets/claude/next/hooks/README.md +5 -2
  98. package/presets/claude/next/hooks/chain-team-phases.sh +380 -0
  99. package/presets/claude/next/hooks/guard-shell-command.sh +77 -0
  100. package/presets/claude/next/rules/README.md +42 -11
  101. package/presets/claude/next/rules/api-and-data/README.md +7 -1
  102. package/presets/claude/next/rules/api-and-data/api-services.md +57 -0
  103. package/presets/claude/next/rules/api-and-data/http-client.md +40 -0
  104. package/presets/claude/next/rules/api-and-data/store-rtk.md +65 -0
  105. package/presets/claude/next/rules/architecture/README.md +11 -2
  106. package/presets/claude/next/rules/architecture/architecture-boundaries-ui.md +15 -0
  107. package/presets/claude/next/rules/architecture/architecture-boundaries.md +75 -0
  108. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +79 -0
  109. package/presets/claude/next/rules/architecture/layer-barrel-exports.md +58 -0
  110. package/presets/claude/next/rules/architecture/public-imports.md +46 -0
  111. package/presets/claude/next/rules/architecture/reference-features.md +37 -0
  112. package/presets/claude/next/rules/stack/README.md +10 -1
  113. package/presets/claude/next/rules/stack/arrow-functions.md +45 -0
  114. package/presets/claude/next/rules/stack/navigation-router-ui.md +15 -0
  115. package/presets/claude/next/rules/stack/navigation-router.md +64 -0
  116. package/presets/claude/next/rules/stack/next-app-core.md +33 -0
  117. package/presets/claude/next/rules/stack/next-app-router.md +36 -0
  118. package/presets/claude/next/rules/stack/no-type-assertion.md +59 -0
  119. package/presets/claude/next/rules/stack/types-jsdoc.md +37 -0
  120. package/presets/claude/next/rules/testing/README.md +9 -1
  121. package/presets/claude/next/rules/testing/playwright-agents.md +74 -0
  122. package/presets/claude/next/rules/testing/tests-e2e-structure.md +52 -0
  123. package/presets/claude/next/rules/testing/tests-unit.md +66 -0
  124. package/presets/claude/next/rules/tooling-and-review/README.md +12 -1
  125. package/presets/claude/next/rules/tooling-and-review/agent-team-intake.md +15 -0
  126. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +141 -0
  127. package/presets/claude/next/rules/tooling-and-review/code-quality.md +42 -0
  128. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +30 -0
  129. package/presets/claude/next/rules/tooling-and-review/package-manager.md +11 -0
  130. package/presets/claude/next/rules/tooling-and-review/post-change-lint.md +44 -0
  131. package/presets/claude/next/rules/ui-and-accessibility/README.md +10 -1
  132. package/presets/claude/next/rules/ui-and-accessibility/css-property-order.md +14 -0
  133. package/presets/claude/next/rules/ui-and-accessibility/no-props-spread.md +57 -0
  134. package/presets/claude/next/rules/ui-and-accessibility/react-a11y-coding.md +37 -0
  135. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +91 -0
  136. package/presets/claude/next/skills/README.md +11 -1
  137. package/presets/claude/next/skills/ci-investigation/SKILL.md +36 -0
  138. package/presets/claude/next/skills/code-review/SKILL.md +26 -0
  139. package/presets/claude/next/skills/debug-investigation/SKILL.md +28 -0
  140. package/presets/claude/next/skills/feature-delivery/SKILL.md +15 -0
  141. package/presets/claude/next/skills/playwright-e2e/SKILL.md +31 -0
  142. package/presets/claude/next/skills/technical-retro/SKILL.md +40 -0
  143. package/presets/claude/next/skills/unit-testing/SKILL.md +32 -0
  144. package/presets/claude/next/team/README.md +105 -0
  145. package/presets/claude/next/team/fixtures/bugfix-standard.json +15 -0
  146. package/presets/claude/next/team/fixtures/feature-full.json +16 -0
  147. package/presets/claude/next/team/fixtures/feature-light.json +17 -0
  148. package/presets/claude/next/team/tasks/.gitkeep +1 -0
  149. package/presets/cursor/ios-swift/AGENTS.md +47 -0
  150. package/presets/cursor/ios-swift/BUGBOT.md +15 -0
  151. package/presets/cursor/ios-swift/README.md +26 -7
  152. package/presets/cursor/ios-swift/agents/README.md +55 -0
  153. package/presets/cursor/ios-swift/agents/accessibility-reviewer.md +67 -0
  154. package/presets/cursor/ios-swift/agents/api-contract-reviewer.md +72 -0
  155. package/presets/cursor/ios-swift/agents/build-verifier.md +64 -0
  156. package/presets/cursor/ios-swift/agents/ci-investigator.md +73 -0
  157. package/presets/cursor/ios-swift/agents/code-reviewer.md +75 -0
  158. package/presets/cursor/ios-swift/agents/debugger.md +72 -0
  159. package/presets/cursor/ios-swift/agents/feature-developer.md +35 -0
  160. package/presets/cursor/ios-swift/agents/migration-specialist.md +73 -0
  161. package/presets/cursor/ios-swift/agents/performance-auditor.md +72 -0
  162. package/presets/cursor/ios-swift/agents/qa-tester.md +65 -0
  163. package/presets/cursor/ios-swift/agents/security-reviewer.md +69 -0
  164. package/presets/cursor/ios-swift/agents/solution-architect.md +17 -0
  165. package/presets/cursor/ios-swift/agents/task-analyst.md +25 -0
  166. package/presets/cursor/ios-swift/agents/task-router.md +62 -0
  167. package/presets/cursor/ios-swift/agents/tech-writer.md +63 -0
  168. package/presets/cursor/ios-swift/agents/unit-test-generator.md +54 -0
  169. package/presets/cursor/ios-swift/agents/unit-test-healer.md +53 -0
  170. package/presets/cursor/ios-swift/agents/unit-test-planner.md +64 -0
  171. package/presets/cursor/ios-swift/agents/xcuitest-test-generator.md +47 -0
  172. package/presets/cursor/ios-swift/agents/xcuitest-test-healer.md +47 -0
  173. package/presets/cursor/ios-swift/agents/xcuitest-test-planner.md +67 -0
  174. package/presets/cursor/ios-swift/commands/README.md +49 -1
  175. package/presets/cursor/ios-swift/commands/feature-continue.md +19 -0
  176. package/presets/cursor/ios-swift/commands/feature-start.md +33 -0
  177. package/presets/cursor/ios-swift/commands/task-continue.md +49 -0
  178. package/presets/cursor/ios-swift/commands/task.md +50 -0
  179. package/presets/cursor/ios-swift/commands/technical-retro.md +81 -0
  180. package/presets/cursor/ios-swift/hooks/README.md +8 -0
  181. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +382 -0
  182. package/presets/cursor/ios-swift/hooks/guard-shell-command.sh +79 -0
  183. package/presets/cursor/ios-swift/hooks.json +17 -0
  184. package/presets/cursor/ios-swift/rules/README.md +45 -13
  185. package/presets/cursor/ios-swift/rules/agent-team-intake.mdc +16 -0
  186. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +80 -0
  187. package/presets/cursor/ios-swift/rules/code-review-mr.mdc +1 -0
  188. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +1 -1
  189. package/presets/cursor/ios-swift/rules/ios-app-core.mdc +2 -1
  190. package/presets/cursor/ios-swift/rules/module-public-api.mdc +26 -0
  191. package/presets/cursor/ios-swift/rules/navigation-coordinators.mdc +29 -0
  192. package/presets/cursor/ios-swift/rules/networking-services.mdc +2 -2
  193. package/presets/cursor/ios-swift/rules/persistence-data.mdc +31 -0
  194. package/presets/cursor/ios-swift/rules/reference-features.mdc +53 -0
  195. package/presets/cursor/ios-swift/rules/security-ios.mdc +35 -0
  196. package/presets/cursor/ios-swift/rules/technical-retro.mdc +12 -0
  197. package/presets/cursor/ios-swift/rules/tests-ui.mdc +1 -0
  198. package/presets/cursor/ios-swift/rules/xcode-tooling.mdc +20 -0
  199. package/presets/cursor/ios-swift/skills/README.md +13 -0
  200. package/presets/cursor/ios-swift/skills/ci-investigation/SKILL.md +39 -0
  201. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +27 -0
  202. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +30 -0
  203. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +27 -0
  204. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +10 -0
  205. package/presets/cursor/ios-swift/skills/unit-testing/SKILL.md +32 -0
  206. package/presets/cursor/ios-swift/skills/xcuitest-e2e/SKILL.md +33 -0
  207. package/presets/cursor/ios-swift/team/README.md +27 -0
  208. package/presets/cursor/ios-swift/team/fixtures/bugfix-standard.json +33 -0
  209. package/presets/cursor/ios-swift/team/fixtures/feature-full.json +48 -0
  210. package/presets/cursor/ios-swift/team/fixtures/feature-light.json +36 -0
  211. package/presets/cursor/next/AGENTS.md +36 -0
  212. package/presets/cursor/next/BUGBOT.md +14 -0
  213. package/presets/cursor/next/agents/README.md +165 -0
  214. package/presets/cursor/next/agents/accessibility-reviewer.md +67 -0
  215. package/presets/cursor/next/agents/api-contract-reviewer.md +71 -0
  216. package/presets/cursor/next/agents/build-verifier.md +66 -0
  217. package/presets/cursor/next/agents/ci-investigator.md +64 -0
  218. package/presets/cursor/next/agents/code-reviewer.md +64 -0
  219. package/presets/cursor/next/agents/debugger.md +64 -0
  220. package/presets/cursor/next/agents/feature-developer.md +28 -0
  221. package/presets/cursor/next/agents/migration-specialist.md +71 -0
  222. package/presets/cursor/next/agents/performance-auditor.md +70 -0
  223. package/presets/cursor/next/agents/playwright-test-generator.md +27 -0
  224. package/presets/cursor/next/agents/playwright-test-healer.md +27 -0
  225. package/presets/cursor/next/agents/playwright-test-planner.md +28 -0
  226. package/presets/cursor/next/agents/qa-tester.md +58 -0
  227. package/presets/cursor/next/agents/security-reviewer.md +66 -0
  228. package/presets/cursor/next/agents/solution-architect.md +71 -0
  229. package/presets/cursor/next/agents/task-analyst.md +112 -0
  230. package/presets/cursor/next/agents/task-router.md +95 -0
  231. package/presets/cursor/next/agents/tech-writer.md +62 -0
  232. package/presets/cursor/next/agents/unit-test-generator.md +39 -0
  233. package/presets/cursor/next/agents/unit-test-healer.md +40 -0
  234. package/presets/cursor/next/agents/unit-test-planner.md +64 -0
  235. package/presets/cursor/next/commands/README.md +49 -1
  236. package/presets/cursor/next/commands/feature-continue.md +19 -0
  237. package/presets/cursor/next/commands/feature-start.md +33 -0
  238. package/presets/cursor/next/commands/task-continue.md +49 -0
  239. package/presets/cursor/next/commands/task.md +50 -0
  240. package/presets/cursor/next/commands/technical-retro.md +81 -0
  241. package/presets/cursor/next/hooks/README.md +8 -0
  242. package/presets/cursor/next/hooks/chain-team-phases.sh +380 -0
  243. package/presets/cursor/next/hooks/guard-shell-command.sh +77 -0
  244. package/presets/cursor/next/hooks.json +17 -0
  245. package/presets/cursor/next/rules/README.md +67 -0
  246. package/presets/cursor/next/rules/agent-team-intake.mdc +14 -0
  247. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +141 -0
  248. package/presets/cursor/next/rules/api-services.mdc +12 -10
  249. package/presets/cursor/next/rules/architecture-boundaries-ui.mdc +15 -0
  250. package/presets/cursor/next/rules/architecture-boundaries.mdc +31 -12
  251. package/presets/cursor/next/rules/arrow-functions.mdc +46 -0
  252. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +5 -4
  253. package/presets/cursor/next/rules/code-review-mr.mdc +21 -40
  254. package/presets/cursor/next/rules/css-property-order-stylelint.mdc +16 -0
  255. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +76 -0
  256. package/presets/cursor/next/rules/http-client.mdc +42 -0
  257. package/presets/cursor/next/rules/layer-barrel-exports.mdc +59 -0
  258. package/presets/cursor/next/rules/navigation-router-stack.mdc +62 -0
  259. package/presets/cursor/next/rules/navigation-router-ui.mdc +16 -0
  260. package/presets/cursor/next/rules/next-app-core.mdc +18 -61
  261. package/presets/cursor/next/rules/next-app-router.mdc +36 -0
  262. package/presets/cursor/next/rules/no-props-spread.mdc +27 -4
  263. package/presets/cursor/next/rules/no-type-assertion-as-import-export.mdc +60 -0
  264. package/presets/cursor/next/rules/package-manager.mdc +16 -0
  265. package/presets/cursor/next/rules/playwright-agents.mdc +2 -1
  266. package/presets/cursor/next/rules/post-change-lint.mdc +40 -0
  267. package/presets/cursor/next/rules/public-imports.mdc +48 -0
  268. package/presets/cursor/next/rules/react-a11y-coding.mdc +37 -0
  269. package/presets/cursor/next/rules/react-ui.mdc +33 -3
  270. package/presets/cursor/next/rules/reference-features.mdc +39 -0
  271. package/presets/cursor/next/rules/store-rtk.mdc +13 -6
  272. package/presets/cursor/next/rules/technical-retro.mdc +12 -0
  273. package/presets/cursor/next/rules/tests-unit.mdc +30 -10
  274. package/presets/cursor/next/rules/types-jsdoc.mdc +42 -0
  275. package/presets/cursor/next/skills/README.md +15 -0
  276. package/presets/cursor/next/skills/ci-investigation/SKILL.md +36 -0
  277. package/presets/cursor/next/skills/code-review/SKILL.md +26 -0
  278. package/presets/cursor/next/skills/debug-investigation/SKILL.md +28 -0
  279. package/presets/cursor/next/skills/feature-delivery/SKILL.md +15 -0
  280. package/presets/cursor/next/skills/playwright-e2e/SKILL.md +31 -0
  281. package/presets/cursor/next/skills/technical-retro/SKILL.md +40 -0
  282. package/presets/cursor/next/skills/unit-testing/SKILL.md +32 -0
  283. package/presets/cursor/next/team/README.md +105 -0
  284. package/presets/cursor/next/team/fixtures/bugfix-standard.json +15 -0
  285. package/presets/cursor/next/team/fixtures/feature-full.json +16 -0
  286. package/presets/cursor/next/team/fixtures/feature-light.json +17 -0
  287. package/presets/cursor/next/team/tasks/.gitkeep +0 -0
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: unit-test-healer
3
+ description: Unit test healer. Fixes failing or flaky unit tests after refactors while preserving behavior assertions. Tests only — minimal production changes only when tests expose a real bug.
4
+ readonly: false
5
+ model: inherit
6
+ ---
7
+
8
+ You debug and fix failing unit tests.
9
+
10
+ ## Inputs
11
+
12
+ - Failing test output and command.
13
+ - Matching `*.spec.ts` / `*.spec.tsx` and `.cursor/team/tasks/<slug>/unit-test-plan.md` if present.
14
+ - Recent diff that may have caused the failure.
15
+
16
+ Use **`unit-testing` skill**, **`debug-investigation` skill**, and **`tests-unit.mdc`**.
17
+
18
+ ## Rules
19
+
20
+ 1. Treat `unit-test-plan.md` and AC in `brief.md` as the behavior contract when present.
21
+ 2. Fix mocks, selectors, async timing, and outdated snapshots — not business assertions.
22
+ 3. If production code is wrong and tests are correct → document in handoff; apply minimal fix only with clear evidence.
23
+ 4. Prefer targeted fixes in the affected spec over broad test infrastructure changes.
24
+ 5. Re-run the affected test file when feasible.
25
+
26
+ ## Completion
27
+
28
+ Report root cause, files changed, validation result, and remaining risk.
29
+
30
+ Update `status.json`:
31
+
32
+ ```json
33
+ {
34
+ "slug": "<slug>",
35
+ "currentAgent": "unit-test-healer",
36
+ "phase": "executing",
37
+ "state": "completed",
38
+ "updatedAt": "<ISO8601>"
39
+ }
40
+ ```
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: unit-test-planner
3
+ description: Unit test planning specialist. Creates coverage plans for mappers, thunks, HTTP client behavior, and component logic. Writes unit-test-plan.md and team status; never edits production code.
4
+ readonly: false
5
+ model: inherit
6
+ ---
7
+
8
+ You are a unit test planner for a Next.js frontend with Jest/Vitest and Testing Library.
9
+
10
+ Use the **`unit-testing` skill** and **`tests-unit.mdc`**.
11
+
12
+ ## Inputs
13
+
14
+ 1. `.cursor/team/tasks/<slug>/brief.md` and `decomposition.md`.
15
+ 2. Changed or target modules under `app/src/**`.
16
+ 3. Existing `*.spec.ts` / `*.spec.tsx` in the same areas.
17
+
18
+ ## Work
19
+
20
+ 1. Map acceptance criteria to test scenarios (mappers, store logic, client behavior, components).
21
+ 2. Identify gaps vs existing specs — do not duplicate covered cases.
22
+ 3. Specify file paths for planned specs (colocated with source per project convention).
23
+ 4. List behavior branches: happy path, edge cases, error paths.
24
+
25
+ ## Output
26
+
27
+ Write `.cursor/team/tasks/<slug>/unit-test-plan.md`:
28
+
29
+ ```markdown
30
+ # Unit test plan: <slug>
31
+
32
+ ## Scope
33
+ Modules and layers covered.
34
+
35
+ ## Scenarios
36
+ ### <module-path>
37
+ | # | Scenario (RU title for it()) | Type | Priority |
38
+ |---|------------------------------|------|----------|
39
+ | 1 | ... | mapper / thunk / component / client | must |
40
+
41
+ ## Out of scope
42
+ ...
43
+
44
+ ## Notes for generator
45
+ Fixtures, mocks, test-store patterns to reuse.
46
+ ```
47
+
48
+ Test titles in the plan must follow Russian capitalization rules from `tests-unit.mdc`.
49
+
50
+ ## On completion
51
+
52
+ Update `status.json`:
53
+
54
+ ```json
55
+ {
56
+ "slug": "<slug>",
57
+ "currentAgent": "unit-test-planner",
58
+ "phase": "executing",
59
+ "state": "completed",
60
+ "updatedAt": "<ISO8601>"
61
+ }
62
+ ```
63
+
64
+ Do not write `*.spec.ts` files — that is `unit-test-generator`'s job.
@@ -1,3 +1,51 @@
1
1
  # Cursor commands (next preset)
2
2
 
3
- Place command definitions for this preset here. They are copied to `.cursor/commands` when you run `ai-rules init cursor --preset next`.
3
+ Slash-команды копируются в `.cursor/commands/` при `ai-rules init cursor --preset next`.
4
+
5
+ ## Команда агентов
6
+
7
+ | Command | Назначение |
8
+ |---------|------------|
9
+ | **`/task <описание>`** | **Главная точка входа:** router → pipeline.json → нужные роли по порядку |
10
+ | `/task-continue <slug>` | После human gate или паузы |
11
+ | `/feature-start <описание>` | Legacy: только analyst (без router) |
12
+ | `/feature-continue <slug>` | Alias task-continue |
13
+ | `/technical-retro [slug]` | Ретро; с slug — блок «Работа агентов» |
14
+
15
+ ## Примеры `/task`
16
+
17
+ ```
18
+ /task Добавить фильтр по дате в Order History
19
+ → analyst → developer → reviewer → QA
20
+
21
+ /task Order History падает при пустом списке
22
+ → debugger → developer → reviewer → QA (regression)
23
+
24
+ /task CI упал на lint в PR #142
25
+ → ci-investigator → developer → reviewer
26
+
27
+ /task Миграция на Next.js 15
28
+ → analyst → migration-specialist → developer → reviewer → QA
29
+
30
+ /task Проверь доступность модалки оплаты
31
+ → analyst → developer → a11y-reviewer → code-reviewer
32
+
33
+ /task Покрой unit-тестами mapper orders
34
+ → unit-planner → unit-generator
35
+
36
+ /task Напиши README для новой фичи фильтров
37
+ → analyst → tech-writer
38
+
39
+ /task Сделай ревью изменений в store/orders
40
+ → reviewer only
41
+ ```
42
+
43
+ ## Связанные файлы
44
+
45
+ - Subagents: `../agents/` (20 ролей, включая `task-router.md`)
46
+ - Оркестратор: `../rules/agent-team-orchestrator.mdc`
47
+ - Skills: `../skills/` (`feature-delivery`, `code-review`, `debug-investigation`, `ci-investigation`, `unit-testing`, `playwright-e2e`, `technical-retro`)
48
+ - Артефакты: `../team/README.md` (`pipeline.json`, `status.json`)
49
+ - Hooks: `../hooks.json`, `../hooks/chain-team-phases.sh`
50
+
51
+ Создавать и редактировать команды можно через `/commands` в Cursor или напрямую в этой папке пресета.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: feature-continue
3
+ description: Legacy alias for /task-continue that resumes a feature pipeline after human approval or pause.
4
+ ---
5
+
6
+ # Feature continue — legacy alias
7
+
8
+ > **Предпочтительно:** `/task-continue <slug>` — то же поведение, учитывает `pipeline.json`.
9
+
10
+ Продолжение после human gate. Полная логика — в **`task-continue.md`**.
11
+
12
+ ## Кратко
13
+
14
+ 1. Прочитай `pipeline.json` (если есть) и `status.json`.
15
+ 2. Сбрось `awaitingHumanGate`; определи следующий step по `pipelineIndex`.
16
+ 3. Вызови subagent для `currentAgent`.
17
+ 4. Hook продолжит цепочку при `autoChain: true`.
18
+
19
+ См. `task-continue.md` для деталей и таблицы handoff.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: feature-start
3
+ description: Legacy analyst-only feature intake. Prefer /task for new work because it uses router and dynamic pipeline.
4
+ ---
5
+
6
+ # Feature start — legacy (analyst only)
7
+
8
+ > **Предпочтительно:** `/task <описание>` — router выберет роли и порядок автоматически.
9
+
10
+ Запуск **фазы анализа** без router. Родительский агент действует как оркестратор (см. `agent-team-orchestrator.mdc`).
11
+
12
+ ## Что делать
13
+
14
+ 1. Извлеки описание задачи из аргументов команды (всё после `/feature-start`).
15
+ 2. Сгенерируй **slug** (kebab-case, до 48 символов) из заголовка задачи.
16
+ 3. Создай каталог `.cursor/team/tasks/<slug>/` если его ещё нет.
17
+ 4. Запиши `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`.
18
+ 5. Опционально: минимальный `pipeline.json` с фиксированными steps (analyst → developer → reviewer → qa-tester).
19
+ 6. Вызови subagent **task-analyst** (Task tool) с полным описанием задачи и путём к артефактам.
20
+ 7. Дождись завершения аналитика. **Не вызывай developer** на этом этапе.
21
+
22
+ ## Human gate
23
+
24
+ После аналитика:
25
+
26
+ - Покажи пользователю ссылки на `brief.md` и `decomposition.md`.
27
+ - Попроси проверить и утвердить или прислать правки.
28
+ - Для продолжения: `/task-continue <slug>` или `/feature-continue <slug>`.
29
+
30
+ ## Если slug уже существует
31
+
32
+ - Если `status.json` в `awaiting_approval` — предложи ревью или continue.
33
+ - Если задача в работе — спроси, продолжать или начать новый slug.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: task-continue
3
+ description: Continue an agent-team task after a human gate, pause, or review changes request using pipeline.json and status.json.
4
+ ---
5
+
6
+ # Task continue — после human gate или паузы
7
+
8
+ Продолжение пайплайна из `pipeline.json`. Алиас по смыслу: `/feature-continue`.
9
+
10
+ ## Аргументы
11
+
12
+ `<slug>` — идентификатор задачи.
13
+
14
+ ## Preconditions
15
+
16
+ 1. Прочитай `.cursor/team/tasks/<slug>/pipeline.json` и `status.json`.
17
+ 2. Продолжай если:
18
+ - `awaitingHumanGate: true` или `state: awaiting_approval`, **или**
19
+ - `state: changes_requested` (после review), **или**
20
+ - задача прервана и нужно возобновить с `pipelineIndex`.
21
+
22
+ ## Алгоритм
23
+
24
+ 1. Запиши `.cursor/team/active-task.json` → `{ "slug": "<slug>" }`.
25
+ 2. Сбрось gate: `awaitingHumanGate: false`.
26
+ 3. Определи **следующий шаг**:
27
+ - После approval analyst/architect: `pipelineIndex + 1` → следующий agent в `steps`.
28
+ - После `changes_requested`: снова **feature-developer** (тот же index или найди developer в steps).
29
+ 4. Обнови `status.json`:
30
+ ```json
31
+ {
32
+ "pipelineIndex": <n>,
33
+ "currentAgent": "<steps[n].agent>",
34
+ "phase": "executing",
35
+ "state": "in_progress",
36
+ "awaitingHumanGate": false
37
+ }
38
+ ```
39
+ 5. Вызови subagent для `currentAgent` с контекстом slug и артефактов.
40
+ 6. Hook `chain-team-phases.sh` продолжит цепочку по `pipeline.json`, если `autoChain: true`.
41
+
42
+ ## Артефакты для handoff
43
+
44
+ | Agent | Прочитать |
45
+ |-------|-----------|
46
+ | feature-developer | brief.md, decomposition.md, validation-report.md (if retry), review.md (if retry), architecture.md |
47
+ | build-verifier | git diff, decomposition.md |
48
+ | code-reviewer | brief.md, validation-report.md, git diff |
49
+ | qa-tester | brief.md, decomposition.md, scope from pipeline step |
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: task
3
+ description: Route a natural-language task through the agent-team pipeline: task-router, pipeline.json, and the first planned specialist.
4
+ ---
5
+
6
+ # Task — единая точка входа (router + pipeline)
7
+
8
+ Главная команда для постановки задачи. Родительский агент = оркестратор (`agent-team-orchestrator.mdc`). Intake для work-запросов без `/task` — `agent-team-intake.mdc`.
9
+
10
+ ## Аргументы
11
+
12
+ Всё после `/task` — описание задачи на естественном языке.
13
+
14
+ Примеры:
15
+
16
+ - `/task Добавить фильтр по дате в Order History`
17
+ - `/task Order History падает при пустом списке — пофикси`
18
+ - `/task CI упал на type-check в PR`
19
+ - `/task Миграция HTTP-клиента на fetch`
20
+ - `/task Проверь a11y формы логина`
21
+ - `/task Покрой unit-тестами mapper payments`
22
+ - `/task Напиши changelog для релиза фильтров`
23
+ - `/task Сделай ревью моих изменений в store/orders`
24
+ - `/task Напиши e2e для сценария оплаты`
25
+
26
+ ## Алгоритм
27
+
28
+ 1. **Slug** — kebab-case из описания (≤48 символов). Создай `.cursor/team/tasks/<slug>/`.
29
+ 2. **Router** — вызови subagent **task-router** с описанием задачи и путём к slug.
30
+ 3. **План** — покажи пользователю таблицу из `pipeline.json`: intent, steps, skipped, humanGates.
31
+ 4. **Intent retro** — если `intent === "retro"`, выполни `/technical-retro` и **остановись**.
32
+ 5. **Старт** — вызови subagent для `pipeline.steps[0].agent`:
33
+ - передай slug, пути к артефактам, scope из step (если есть);
34
+ - обнови `status.json`: `pipelineIndex: 0`, `currentAgent`, `state: in_progress`.
35
+ 6. **Human gate** — если после текущего шага есть gate в `humanGates` (`after:<agent>`), после завершения агента **остановись** и попроси `/task-continue <slug>` (или `/feature-continue <slug>`).
36
+
37
+ ## Не делать
38
+
39
+ - Не вызывать developer до router и (если в pipeline) analyst/architect.
40
+ - Не hardcode порядок ролей — только `pipeline.json`.
41
+ - Не пропускать human gate без явного continue.
42
+
43
+ ## Если slug занят
44
+
45
+ - `awaitingHumanGate` / `state: awaiting_approval` → предложи ревью артефактов или `/task-continue <slug>`.
46
+ - `in_progress` → спроси: продолжить или новый slug.
47
+
48
+ ## Legacy
49
+
50
+ `/feature-start` и `/feature-continue` остаются совместимыми; для новых задач предпочитай `/task`.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: technical-retro
3
+ description: Facilitate a technical retrospective for a period, incident, release, or completed agent-team task slug.
4
+ ---
5
+
6
+ # Техническое ретро
7
+
8
+ Агент выступает как **нейтральный фасилитатор технической ретроспективы**, а не как ревьюер кода или оценщик людей. Используй skill **`technical-retro`** как основной сценарий.
9
+
10
+ ## Когда включать
11
+
12
+ - Пользователь просит: «ретро», «техническое ретро», «разбор спринта/итерации», «action items после релиза».
13
+ - После завершения пайплайна команды агентов (`/feature-start` → `/feature-continue`).
14
+ - Есть контекст: период, тема (релиз, инцидент), slug задачи, заметки.
15
+
16
+ ## Входные данные (собрать, не выдумывать)
17
+
18
+ Запросить при нехватке:
19
+
20
+ - **Период и фокус**.
21
+ - **Slug задачи** (если ретро по работе команды агентов).
22
+ - **Участники/роли** (если важно).
23
+ - **Ограничения**: время, формат (async vs синхрон).
24
+
25
+ ### Артефакты команды агентов (если есть slug)
26
+
27
+ Прочитать из репозитория:
28
+
29
+ - `.cursor/team/tasks/<slug>/pipeline.json`
30
+ - `.cursor/team/tasks/<slug>/brief.md`
31
+ - `.cursor/team/tasks/<slug>/decomposition.md`
32
+ - `.cursor/team/tasks/<slug>/status.json`
33
+ - Git diff / `git status` для изменённых файлов
34
+
35
+ Не приписывать факты, которых нет в артефактах, diff или сообщении пользователя.
36
+
37
+ ## Принципы фасилитации
38
+
39
+ - **Безопасность**: процесс и система, не «виноватые».
40
+ - **Конкретика**: от абстракций к наблюдаемым событиям.
41
+ - **Баланс**: позитив и зоны роста.
42
+ - **Action items**: владелец и срок у каждого.
43
+ - **Не смешивать с code review** — развести блоки, если запросили оба.
44
+
45
+ ## Структура сессии (по умолчанию)
46
+
47
+ 1. **Цель и рамки**.
48
+ 2. **Сбор фактов**: хорошо / мешало / сюрпризы.
49
+ 3. **Группировка тем** (3–7).
50
+ 4. **Корневые причины** для 1–2 болезненных тем.
51
+ 5. **Эксперименты** (1–3 изменения процесса).
52
+ 6. **Action items**: что / владелец / до когда / критерий успеха.
53
+
54
+ ## Блок «Работа агентов» (обязателен при slug)
55
+
56
+ Если ретро связано с пайплайном `/feature-start`:
57
+
58
+ | Вопрос | Что фиксировать |
59
+ |--------|-----------------|
60
+ | Router | Ошибка intent, лишние/пропущенные steps в pipeline |
61
+ | Аналитик | Ошибки в assumptions, пропущенные AC, лишние/недостающие таски |
62
+ | Декомпозиция | Неполное покрытие слоёв, неверный порядок, blocked-зависимости |
63
+ | Developer | Scope creep, пропущенные правила, lint/type gaps |
64
+ | Reviewer | Пропущенные дефекты, false positives, качество чеклиста |
65
+ | QA | Покрытие AC тестами, flakiness, пробелы в e2e планах |
66
+
67
+ **Action items** в этом блоке — на улучшение **промптов, subagents и rules** (не только кода).
68
+
69
+ ## Формат ответа
70
+
71
+ - Шапка: период, фокус, slug (если есть), допущения.
72
+ - Повестка по этапам.
73
+ - Блок **«Работа агентов»** (если применимо).
74
+ - Темы — буллеты; спорное — **вопросы команде**.
75
+ - **Action items** в конце.
76
+
77
+ ## Ограничения
78
+
79
+ - Не приписывать цитаты и факты без входа.
80
+ - Не выдавать HR‑рекомендации.
81
+ - Если просят только шаблон — **шаблон повестки** без выдуманного контента.
@@ -0,0 +1,8 @@
1
+ # `.cursor/hooks` (preset next)
2
+
3
+ | File | Purpose |
4
+ |------|---------|
5
+ | `chain-team-phases.sh` | Continues pipeline after subagent completes; supports `skipIf`, parallel steps, `validation_failed`, `retryAfterFix` |
6
+ | `guard-shell-command.sh` | Blocks/asks on destructive git commands and package-manager mismatches (`failClosed: true`) |
7
+
8
+ `hooks.json`: `loop_limit: 15` for long pipelines (build-verifier + parallel reviewers + e2e).