@bonesofspring/ai-rules 0.2.12 → 0.2.14

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 (660) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +6 -2
  3. package/bin/cli.js +4 -0
  4. package/package.json +1 -1
  5. package/presets/_shared/README.md +1 -1
  6. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +114 -0
  7. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +64 -5
  8. package/presets/_shared/core/meta/preset-layering.md +1 -1
  9. package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +15 -1
  10. package/presets/_shared/core/meta/preset-pr-checklist.md +1 -1
  11. package/presets/_shared/core/meta/preset-twin-sync.md +4 -0
  12. package/presets/claude/go/agents/build-verifier.md +10 -3
  13. package/presets/claude/go/agents/code-reviewer.md +8 -1
  14. package/presets/claude/go/agents/feature-developer.md +8 -1
  15. package/presets/claude/go/agents/task-analyst.md +8 -1
  16. package/presets/claude/go/agents/task-router.md +33 -5
  17. package/presets/claude/go/commands/task.md +8 -6
  18. package/presets/claude/go/hooks/chain-team-phases.sh +195 -53
  19. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
  20. package/presets/claude/go/rules/tooling-and-review/preset-layering.md +2 -1
  21. package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  22. package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  23. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +1 -0
  24. package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +5 -0
  25. package/presets/claude/go/team/README.md +13 -2
  26. package/presets/claude/ios-swift/agents/build-verifier.md +10 -3
  27. package/presets/claude/ios-swift/agents/code-reviewer.md +9 -14
  28. package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
  29. package/presets/claude/ios-swift/agents/task-analyst.md +8 -1
  30. package/presets/claude/ios-swift/agents/task-router.md +31 -3
  31. package/presets/claude/ios-swift/commands/task.md +8 -6
  32. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +177 -54
  33. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +33 -2
  34. package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +2 -1
  35. package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  36. package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  37. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +1 -0
  38. package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +5 -0
  39. package/presets/claude/ios-swift/team/README.md +13 -2
  40. package/presets/claude/java/agents/build-verifier.md +9 -2
  41. package/presets/claude/java/agents/code-reviewer.md +8 -1
  42. package/presets/claude/java/agents/feature-developer.md +8 -1
  43. package/presets/claude/java/agents/task-analyst.md +8 -1
  44. package/presets/claude/java/agents/task-router.md +31 -3
  45. package/presets/claude/java/commands/task.md +8 -6
  46. package/presets/claude/java/hooks/chain-team-phases.sh +195 -53
  47. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
  48. package/presets/claude/java/rules/tooling-and-review/preset-layering.md +2 -1
  49. package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  50. package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  51. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +1 -0
  52. package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +5 -0
  53. package/presets/claude/java/team/README.md +13 -2
  54. package/presets/claude/mcp-ts/agents/build-verifier.md +10 -3
  55. package/presets/claude/mcp-ts/agents/feature-developer.md +7 -1
  56. package/presets/claude/mcp-ts/agents/task-analyst.md +8 -1
  57. package/presets/claude/mcp-ts/agents/task-router.md +33 -5
  58. package/presets/claude/mcp-ts/commands/task.md +8 -6
  59. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +181 -39
  60. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
  61. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +2 -1
  62. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  63. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  64. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +1 -0
  65. package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +5 -0
  66. package/presets/claude/mcp-ts/team/README.md +13 -2
  67. package/presets/claude/next/agents/accessibility-reviewer.md +6 -12
  68. package/presets/claude/next/agents/api-contract-reviewer.md +6 -12
  69. package/presets/claude/next/agents/build-verifier.md +10 -14
  70. package/presets/claude/next/agents/ci-investigator.md +7 -13
  71. package/presets/claude/next/agents/code-reviewer.md +9 -14
  72. package/presets/claude/next/agents/debugger.md +6 -12
  73. package/presets/claude/next/agents/feature-developer.md +8 -1
  74. package/presets/claude/next/agents/migration-specialist.md +6 -12
  75. package/presets/claude/next/agents/performance-auditor.md +5 -11
  76. package/presets/claude/next/agents/qa-tester.md +6 -12
  77. package/presets/claude/next/agents/security-reviewer.md +6 -12
  78. package/presets/claude/next/agents/solution-architect.md +6 -12
  79. package/presets/claude/next/agents/task-analyst.md +10 -16
  80. package/presets/claude/next/agents/task-router.md +31 -3
  81. package/presets/claude/next/agents/tech-writer.md +6 -13
  82. package/presets/claude/next/agents/unit-test-generator.md +6 -10
  83. package/presets/claude/next/agents/unit-test-healer.md +6 -10
  84. package/presets/claude/next/agents/unit-test-planner.md +5 -11
  85. package/presets/claude/next/commands/task.md +8 -6
  86. package/presets/claude/next/hooks/chain-team-phases.sh +197 -54
  87. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +29 -4
  88. package/presets/claude/next/rules/tooling-and-review/preset-layering.md +2 -1
  89. package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  90. package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  91. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -0
  92. package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +5 -0
  93. package/presets/claude/next/team/README.md +15 -3
  94. package/presets/claude/next/team/fixtures/artifact-manifest.example.json +61 -0
  95. package/presets/claude/next/team/fixtures/bugfix-standard.json +10 -0
  96. package/presets/claude/next/team/fixtures/feature-full.json +10 -0
  97. package/presets/claude/next/team/fixtures/feature-light.json +10 -0
  98. package/presets/claude/nuxt/CLAUDE.md +39 -0
  99. package/presets/claude/nuxt/MCP.md +16 -0
  100. package/presets/claude/nuxt/README.md +39 -0
  101. package/presets/claude/nuxt/REPO_AGENTS.md +49 -0
  102. package/presets/claude/nuxt/agents/README.md +199 -0
  103. package/presets/claude/nuxt/agents/accessibility-reviewer.md +59 -0
  104. package/presets/claude/nuxt/agents/api-contract-reviewer.md +63 -0
  105. package/presets/claude/nuxt/agents/build-verifier.md +89 -0
  106. package/presets/claude/nuxt/agents/ci-investigator.md +60 -0
  107. package/presets/claude/nuxt/agents/code-reviewer.md +62 -0
  108. package/presets/claude/nuxt/agents/codebase-analyzer.md +28 -0
  109. package/presets/claude/nuxt/agents/debugger.md +65 -0
  110. package/presets/claude/nuxt/agents/feature-developer.md +59 -0
  111. package/presets/claude/nuxt/agents/migration-specialist.md +67 -0
  112. package/presets/claude/nuxt/agents/performance-auditor.md +66 -0
  113. package/presets/claude/nuxt/agents/playwright-test-generator.md +75 -0
  114. package/presets/claude/nuxt/agents/playwright-test-healer.md +61 -0
  115. package/presets/claude/nuxt/agents/playwright-test-planner.md +67 -0
  116. package/presets/claude/nuxt/agents/qa-tester.md +54 -0
  117. package/presets/claude/nuxt/agents/security-reviewer.md +60 -0
  118. package/presets/claude/nuxt/agents/solution-architect.md +68 -0
  119. package/presets/claude/nuxt/agents/task-analyst.md +109 -0
  120. package/presets/claude/nuxt/agents/task-router.md +140 -0
  121. package/presets/claude/nuxt/agents/tech-writer.md +54 -0
  122. package/presets/claude/nuxt/agents/unit-test-generator.md +37 -0
  123. package/presets/claude/nuxt/agents/unit-test-healer.md +38 -0
  124. package/presets/claude/nuxt/agents/unit-test-planner.md +60 -0
  125. package/presets/claude/nuxt/commands/README.md +13 -0
  126. package/presets/claude/nuxt/commands/feature-continue.md +51 -0
  127. package/presets/claude/nuxt/commands/feature-start.md +30 -0
  128. package/presets/claude/nuxt/commands/task-continue.md +50 -0
  129. package/presets/claude/nuxt/commands/task.md +56 -0
  130. package/presets/claude/nuxt/commands/technical-retro.md +62 -0
  131. package/presets/claude/nuxt/hooks/README.md +14 -0
  132. package/presets/claude/nuxt/hooks/chain-team-phases.sh +723 -0
  133. package/presets/claude/nuxt/hooks/examples/README.md +18 -0
  134. package/presets/claude/nuxt/hooks/examples/format-edited.example.sh +11 -0
  135. package/presets/claude/nuxt/hooks/examples/secret-guard.example.sh +10 -0
  136. package/presets/claude/nuxt/hooks/examples/test-on-save.example.sh +8 -0
  137. package/presets/claude/nuxt/hooks/guard-shell-command.sh +77 -0
  138. package/presets/claude/nuxt/mcp.json +20 -0
  139. package/presets/claude/nuxt/rules/README.md +90 -0
  140. package/presets/claude/nuxt/rules/anti-hallucination/vue-nuxt-anti-hallucination.md +72 -0
  141. package/presets/claude/nuxt/rules/api-and-data/README.md +9 -0
  142. package/presets/claude/nuxt/rules/api-and-data/api-services.md +76 -0
  143. package/presets/claude/nuxt/rules/api-and-data/http-client.md +16 -0
  144. package/presets/claude/nuxt/rules/api-and-data/store-pinia.md +67 -0
  145. package/presets/claude/nuxt/rules/architecture/README.md +12 -0
  146. package/presets/claude/nuxt/rules/architecture/architecture-boundaries-ui.md +15 -0
  147. package/presets/claude/nuxt/rules/architecture/architecture-boundaries.md +98 -0
  148. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +88 -0
  149. package/presets/claude/nuxt/rules/architecture/layer-barrel-exports.md +71 -0
  150. package/presets/claude/nuxt/rules/architecture/public-imports.md +60 -0
  151. package/presets/claude/nuxt/rules/architecture/reference-features.md +49 -0
  152. package/presets/claude/nuxt/rules/stack/README.md +12 -0
  153. package/presets/claude/nuxt/rules/stack/navigation-router-ui.md +14 -0
  154. package/presets/claude/nuxt/rules/stack/navigation-router.md +59 -0
  155. package/presets/claude/nuxt/rules/stack/no-type-assertion.md +61 -0
  156. package/presets/claude/nuxt/rules/stack/nuxt-app-core.md +43 -0
  157. package/presets/claude/nuxt/rules/stack/nuxt-pages-routing.md +39 -0
  158. package/presets/claude/nuxt/rules/stack/script-setup-conventions.md +12 -0
  159. package/presets/claude/nuxt/rules/stack/types-jsdoc.md +40 -0
  160. package/presets/claude/nuxt/rules/testing/README.md +11 -0
  161. package/presets/claude/nuxt/rules/testing/playwright-agents.md +78 -0
  162. package/presets/claude/nuxt/rules/testing/tests-e2e-structure.md +49 -0
  163. package/presets/claude/nuxt/rules/testing/tests-unit.md +75 -0
  164. package/presets/claude/nuxt/rules/tooling-and-review/README.md +15 -0
  165. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-intake.md +15 -0
  166. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +191 -0
  167. package/presets/claude/nuxt/rules/tooling-and-review/anti-sycophancy-discipline.md +33 -0
  168. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +49 -0
  169. package/presets/claude/nuxt/rules/tooling-and-review/code-review-mr.md +63 -0
  170. package/presets/claude/nuxt/rules/tooling-and-review/design-guidance.md +114 -0
  171. package/presets/claude/nuxt/rules/tooling-and-review/package-manager.md +16 -0
  172. package/presets/claude/nuxt/rules/tooling-and-review/post-change-lint.md +43 -0
  173. package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +32 -0
  174. package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +79 -0
  175. package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +35 -0
  176. package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +39 -0
  177. package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +50 -0
  178. package/presets/claude/nuxt/rules/tooling-and-review/security-nuxt.md +37 -0
  179. package/presets/claude/nuxt/rules/tooling-and-review/technical-retro.md +15 -0
  180. package/presets/claude/nuxt/rules/ui-and-accessibility/README.md +12 -0
  181. package/presets/claude/nuxt/rules/ui-and-accessibility/css-property-order.md +11 -0
  182. package/presets/claude/nuxt/rules/ui-and-accessibility/no-v-bind-spread.md +12 -0
  183. package/presets/claude/nuxt/rules/ui-and-accessibility/vue-a11y-coding.md +16 -0
  184. package/presets/claude/nuxt/rules/ui-and-accessibility/vue-ui.md +34 -0
  185. package/presets/claude/nuxt/skills/README.md +17 -0
  186. package/presets/claude/nuxt/skills/ci-investigation/SKILL.md +36 -0
  187. package/presets/claude/nuxt/skills/code-review/SKILL.md +38 -0
  188. package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +32 -0
  189. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +34 -0
  190. package/presets/claude/nuxt/skills/playwright-e2e/SKILL.md +37 -0
  191. package/presets/claude/nuxt/skills/technical-retro/SKILL.md +54 -0
  192. package/presets/claude/nuxt/skills/unit-testing/SKILL.md +32 -0
  193. package/presets/claude/nuxt/skills/vue-performance/SKILL.md +53 -0
  194. package/presets/claude/nuxt/skills/write-adr/SKILL.md +41 -0
  195. package/presets/claude/nuxt/team/README.md +136 -0
  196. package/presets/claude/nuxt/team/conventions.md +21 -0
  197. package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
  198. package/presets/claude/nuxt/team/fixtures/bugfix-standard.json +25 -0
  199. package/presets/claude/nuxt/team/fixtures/feature-full.json +28 -0
  200. package/presets/claude/nuxt/team/fixtures/feature-light.json +27 -0
  201. package/presets/claude/nuxt/team/tasks/.gitkeep +1 -0
  202. package/presets/claude/php-hexagonal/agents/build-verifier.md +10 -3
  203. package/presets/claude/php-hexagonal/agents/code-reviewer.md +8 -1
  204. package/presets/claude/php-hexagonal/agents/feature-developer.md +8 -1
  205. package/presets/claude/php-hexagonal/agents/task-analyst.md +8 -1
  206. package/presets/claude/php-hexagonal/agents/task-router.md +31 -3
  207. package/presets/claude/php-hexagonal/commands/task.md +8 -6
  208. package/presets/claude/php-hexagonal/hooks/README.md +1 -1
  209. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +195 -53
  210. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
  211. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +2 -1
  212. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  213. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  214. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +1 -0
  215. package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +5 -0
  216. package/presets/claude/php-hexagonal/team/README.md +13 -2
  217. package/presets/claude/php-laravel/agents/build-verifier.md +10 -3
  218. package/presets/claude/php-laravel/agents/code-reviewer.md +8 -1
  219. package/presets/claude/php-laravel/agents/feature-developer.md +8 -1
  220. package/presets/claude/php-laravel/agents/task-analyst.md +8 -1
  221. package/presets/claude/php-laravel/agents/task-router.md +31 -3
  222. package/presets/claude/php-laravel/commands/task.md +8 -6
  223. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +195 -53
  224. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +30 -5
  225. package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +2 -1
  226. package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +16 -1
  227. package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -1
  228. package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +1 -0
  229. package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +5 -0
  230. package/presets/claude/php-laravel/team/README.md +13 -2
  231. package/presets/claude/svelte/CLAUDE.md +39 -0
  232. package/presets/claude/svelte/MCP.md +16 -0
  233. package/presets/claude/svelte/README.md +13 -0
  234. package/presets/claude/svelte/REPO_AGENTS.md +49 -0
  235. package/presets/claude/svelte/agents/README.md +199 -0
  236. package/presets/claude/svelte/agents/accessibility-reviewer.md +59 -0
  237. package/presets/claude/svelte/agents/api-contract-reviewer.md +63 -0
  238. package/presets/claude/svelte/agents/build-verifier.md +89 -0
  239. package/presets/claude/svelte/agents/ci-investigator.md +60 -0
  240. package/presets/claude/svelte/agents/code-reviewer.md +62 -0
  241. package/presets/claude/svelte/agents/codebase-analyzer.md +28 -0
  242. package/presets/claude/svelte/agents/debugger.md +65 -0
  243. package/presets/claude/svelte/agents/feature-developer.md +59 -0
  244. package/presets/claude/svelte/agents/migration-specialist.md +67 -0
  245. package/presets/claude/svelte/agents/performance-auditor.md +66 -0
  246. package/presets/claude/svelte/agents/playwright-test-generator.md +75 -0
  247. package/presets/claude/svelte/agents/playwright-test-healer.md +61 -0
  248. package/presets/claude/svelte/agents/playwright-test-planner.md +67 -0
  249. package/presets/claude/svelte/agents/qa-tester.md +54 -0
  250. package/presets/claude/svelte/agents/security-reviewer.md +60 -0
  251. package/presets/claude/svelte/agents/solution-architect.md +68 -0
  252. package/presets/claude/svelte/agents/task-analyst.md +109 -0
  253. package/presets/claude/svelte/agents/task-router.md +140 -0
  254. package/presets/claude/svelte/agents/tech-writer.md +54 -0
  255. package/presets/claude/svelte/agents/unit-test-generator.md +37 -0
  256. package/presets/claude/svelte/agents/unit-test-healer.md +38 -0
  257. package/presets/claude/svelte/agents/unit-test-planner.md +60 -0
  258. package/presets/claude/svelte/commands/README.md +13 -0
  259. package/presets/claude/svelte/commands/feature-continue.md +51 -0
  260. package/presets/claude/svelte/commands/feature-start.md +30 -0
  261. package/presets/claude/svelte/commands/task-continue.md +50 -0
  262. package/presets/claude/svelte/commands/task.md +56 -0
  263. package/presets/claude/svelte/commands/technical-retro.md +62 -0
  264. package/presets/claude/svelte/hooks/README.md +14 -0
  265. package/presets/claude/svelte/hooks/chain-team-phases.sh +723 -0
  266. package/presets/claude/svelte/hooks/examples/README.md +18 -0
  267. package/presets/claude/svelte/hooks/examples/format-edited.example.sh +13 -0
  268. package/presets/claude/svelte/hooks/examples/secret-guard.example.sh +10 -0
  269. package/presets/claude/svelte/hooks/examples/test-on-save.example.sh +14 -0
  270. package/presets/claude/svelte/hooks/guard-shell-command.sh +77 -0
  271. package/presets/claude/svelte/mcp.json +20 -0
  272. package/presets/claude/svelte/rules/README.md +90 -0
  273. package/presets/claude/svelte/rules/anti-hallucination/svelte-sveltekit-anti-hallucination.md +71 -0
  274. package/presets/claude/svelte/rules/api-and-data/README.md +9 -0
  275. package/presets/claude/svelte/rules/api-and-data/api-services.md +45 -0
  276. package/presets/claude/svelte/rules/api-and-data/http-client.md +17 -0
  277. package/presets/claude/svelte/rules/api-and-data/store-svelte.md +67 -0
  278. package/presets/claude/svelte/rules/architecture/README.md +12 -0
  279. package/presets/claude/svelte/rules/architecture/architecture-boundaries-ui.md +16 -0
  280. package/presets/claude/svelte/rules/architecture/architecture-boundaries.md +65 -0
  281. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +61 -0
  282. package/presets/claude/svelte/rules/architecture/layer-barrel-exports.md +73 -0
  283. package/presets/claude/svelte/rules/architecture/public-imports.md +43 -0
  284. package/presets/claude/svelte/rules/architecture/reference-features.md +50 -0
  285. package/presets/claude/svelte/rules/stack/README.md +12 -0
  286. package/presets/claude/svelte/rules/stack/navigation-router-ui.md +26 -0
  287. package/presets/claude/svelte/rules/stack/navigation-router.md +41 -0
  288. package/presets/claude/svelte/rules/stack/no-type-assertion.md +59 -0
  289. package/presets/claude/svelte/rules/stack/svelte-app-core.md +44 -0
  290. package/presets/claude/svelte/rules/stack/svelte-script-conventions.md +33 -0
  291. package/presets/claude/svelte/rules/stack/sveltekit-routing.md +40 -0
  292. package/presets/claude/svelte/rules/stack/types-jsdoc.md +42 -0
  293. package/presets/claude/svelte/rules/testing/README.md +11 -0
  294. package/presets/claude/svelte/rules/testing/playwright-agents.md +80 -0
  295. package/presets/claude/svelte/rules/testing/tests-e2e-structure.md +51 -0
  296. package/presets/claude/svelte/rules/testing/tests-unit.md +40 -0
  297. package/presets/claude/svelte/rules/tooling-and-review/README.md +15 -0
  298. package/presets/claude/svelte/rules/tooling-and-review/agent-team-intake.md +17 -0
  299. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +193 -0
  300. package/presets/claude/svelte/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  301. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +50 -0
  302. package/presets/claude/svelte/rules/tooling-and-review/code-review-mr.md +64 -0
  303. package/presets/claude/svelte/rules/tooling-and-review/design-guidance.md +110 -0
  304. package/presets/claude/svelte/rules/tooling-and-review/package-manager.md +17 -0
  305. package/presets/claude/svelte/rules/tooling-and-review/post-change-lint.md +44 -0
  306. package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +36 -0
  307. package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +83 -0
  308. package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +39 -0
  309. package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +41 -0
  310. package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +54 -0
  311. package/presets/claude/svelte/rules/tooling-and-review/security-sveltekit.md +41 -0
  312. package/presets/claude/svelte/rules/tooling-and-review/technical-retro.md +17 -0
  313. package/presets/claude/svelte/rules/ui-and-accessibility/README.md +12 -0
  314. package/presets/claude/svelte/rules/ui-and-accessibility/css-property-order.md +12 -0
  315. package/presets/claude/svelte/rules/ui-and-accessibility/no-rest-props-spread.md +32 -0
  316. package/presets/claude/svelte/rules/ui-and-accessibility/svelte-a11y-coding.md +28 -0
  317. package/presets/claude/svelte/rules/ui-and-accessibility/svelte-ui.md +38 -0
  318. package/presets/claude/svelte/skills/README.md +17 -0
  319. package/presets/claude/svelte/skills/ci-investigation/SKILL.md +36 -0
  320. package/presets/claude/svelte/skills/code-review/SKILL.md +38 -0
  321. package/presets/claude/svelte/skills/debug-investigation/SKILL.md +32 -0
  322. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +34 -0
  323. package/presets/claude/svelte/skills/playwright-e2e/SKILL.md +37 -0
  324. package/presets/claude/svelte/skills/svelte-performance/SKILL.md +52 -0
  325. package/presets/claude/svelte/skills/technical-retro/SKILL.md +54 -0
  326. package/presets/claude/svelte/skills/unit-testing/SKILL.md +32 -0
  327. package/presets/claude/svelte/skills/write-adr/SKILL.md +41 -0
  328. package/presets/claude/svelte/team/README.md +136 -0
  329. package/presets/claude/svelte/team/conventions.md +21 -0
  330. package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +61 -0
  331. package/presets/claude/svelte/team/fixtures/bugfix-standard.json +25 -0
  332. package/presets/claude/svelte/team/fixtures/feature-full.json +28 -0
  333. package/presets/claude/svelte/team/fixtures/feature-light.json +27 -0
  334. package/presets/claude/svelte/team/tasks/.gitkeep +1 -0
  335. package/presets/cursor/go/agents/build-verifier.md +9 -2
  336. package/presets/cursor/go/agents/code-reviewer.md +8 -1
  337. package/presets/cursor/go/agents/feature-developer.md +8 -1
  338. package/presets/cursor/go/agents/task-analyst.md +8 -1
  339. package/presets/cursor/go/agents/task-router.md +31 -3
  340. package/presets/cursor/go/commands/task.md +8 -6
  341. package/presets/cursor/go/hooks/chain-team-phases.sh +195 -53
  342. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +30 -5
  343. package/presets/cursor/go/rules/preset-layering.mdc +2 -1
  344. package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +16 -1
  345. package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -1
  346. package/presets/cursor/go/rules/preset-token-budget.mdc +1 -0
  347. package/presets/cursor/go/rules/preset-twin-sync.mdc +5 -0
  348. package/presets/cursor/go/team/README.md +13 -2
  349. package/presets/cursor/ios-swift/agents/build-verifier.md +10 -3
  350. package/presets/cursor/ios-swift/agents/code-reviewer.md +9 -14
  351. package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
  352. package/presets/cursor/ios-swift/agents/task-analyst.md +8 -1
  353. package/presets/cursor/ios-swift/agents/task-router.md +31 -3
  354. package/presets/cursor/ios-swift/commands/task.md +8 -6
  355. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +195 -54
  356. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +23 -2
  357. package/presets/cursor/ios-swift/rules/preset-layering.mdc +2 -1
  358. package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +16 -1
  359. package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -1
  360. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +1 -0
  361. package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +5 -0
  362. package/presets/cursor/ios-swift/team/README.md +13 -2
  363. package/presets/cursor/java/agents/build-verifier.md +9 -2
  364. package/presets/cursor/java/agents/code-reviewer.md +8 -1
  365. package/presets/cursor/java/agents/feature-developer.md +8 -1
  366. package/presets/cursor/java/agents/task-analyst.md +8 -1
  367. package/presets/cursor/java/agents/task-router.md +31 -3
  368. package/presets/cursor/java/commands/task.md +8 -6
  369. package/presets/cursor/java/hooks/chain-team-phases.sh +195 -53
  370. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +30 -5
  371. package/presets/cursor/java/rules/preset-layering.mdc +2 -1
  372. package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +16 -1
  373. package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -1
  374. package/presets/cursor/java/rules/preset-token-budget.mdc +1 -0
  375. package/presets/cursor/java/rules/preset-twin-sync.mdc +5 -0
  376. package/presets/cursor/java/team/README.md +13 -2
  377. package/presets/cursor/mcp-ts/agents/build-verifier.md +9 -2
  378. package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -1
  379. package/presets/cursor/mcp-ts/agents/task-analyst.md +8 -1
  380. package/presets/cursor/mcp-ts/agents/task-router.md +31 -3
  381. package/presets/cursor/mcp-ts/commands/task.md +8 -6
  382. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +181 -39
  383. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +30 -5
  384. package/presets/cursor/mcp-ts/rules/preset-layering.mdc +2 -1
  385. package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +16 -1
  386. package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -1
  387. package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +1 -0
  388. package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +5 -0
  389. package/presets/cursor/mcp-ts/team/README.md +13 -2
  390. package/presets/cursor/next/agents/accessibility-reviewer.md +7 -14
  391. package/presets/cursor/next/agents/api-contract-reviewer.md +7 -14
  392. package/presets/cursor/next/agents/build-verifier.md +10 -15
  393. package/presets/cursor/next/agents/ci-investigator.md +7 -14
  394. package/presets/cursor/next/agents/code-reviewer.md +9 -14
  395. package/presets/cursor/next/agents/debugger.md +6 -12
  396. package/presets/cursor/next/agents/feature-developer.md +8 -1
  397. package/presets/cursor/next/agents/migration-specialist.md +7 -14
  398. package/presets/cursor/next/agents/performance-auditor.md +6 -13
  399. package/presets/cursor/next/agents/qa-tester.md +6 -13
  400. package/presets/cursor/next/agents/security-reviewer.md +7 -14
  401. package/presets/cursor/next/agents/solution-architect.md +6 -12
  402. package/presets/cursor/next/agents/task-analyst.md +10 -16
  403. package/presets/cursor/next/agents/task-router.md +31 -3
  404. package/presets/cursor/next/agents/tech-writer.md +6 -13
  405. package/presets/cursor/next/agents/unit-test-generator.md +6 -11
  406. package/presets/cursor/next/agents/unit-test-healer.md +6 -11
  407. package/presets/cursor/next/agents/unit-test-planner.md +6 -13
  408. package/presets/cursor/next/commands/task.md +8 -6
  409. package/presets/cursor/next/hooks/chain-team-phases.sh +197 -54
  410. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +30 -5
  411. package/presets/cursor/next/rules/preset-layering.mdc +2 -1
  412. package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +16 -1
  413. package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -1
  414. package/presets/cursor/next/rules/preset-token-budget.mdc +1 -0
  415. package/presets/cursor/next/rules/preset-twin-sync.mdc +5 -0
  416. package/presets/cursor/next/team/README.md +16 -4
  417. package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +61 -0
  418. package/presets/cursor/next/team/fixtures/bugfix-standard.json +10 -0
  419. package/presets/cursor/next/team/fixtures/feature-full.json +10 -0
  420. package/presets/cursor/next/team/fixtures/feature-light.json +10 -0
  421. package/presets/cursor/nuxt/AGENTS.md +39 -0
  422. package/presets/cursor/nuxt/BUGBOT.md +14 -0
  423. package/presets/cursor/nuxt/MCP.md +16 -0
  424. package/presets/cursor/nuxt/README.md +47 -0
  425. package/presets/cursor/nuxt/REPO_AGENTS.md +49 -0
  426. package/presets/cursor/nuxt/agents/README.md +206 -0
  427. package/presets/cursor/nuxt/agents/accessibility-reviewer.md +60 -0
  428. package/presets/cursor/nuxt/agents/api-contract-reviewer.md +64 -0
  429. package/presets/cursor/nuxt/agents/build-verifier.md +90 -0
  430. package/presets/cursor/nuxt/agents/ci-investigator.md +61 -0
  431. package/presets/cursor/nuxt/agents/code-reviewer.md +63 -0
  432. package/presets/cursor/nuxt/agents/codebase-analyzer.md +28 -0
  433. package/presets/cursor/nuxt/agents/debugger.md +66 -0
  434. package/presets/cursor/nuxt/agents/feature-developer.md +60 -0
  435. package/presets/cursor/nuxt/agents/migration-specialist.md +68 -0
  436. package/presets/cursor/nuxt/agents/performance-auditor.md +67 -0
  437. package/presets/cursor/nuxt/agents/playwright-test-generator.md +27 -0
  438. package/presets/cursor/nuxt/agents/playwright-test-healer.md +27 -0
  439. package/presets/cursor/nuxt/agents/playwright-test-planner.md +28 -0
  440. package/presets/cursor/nuxt/agents/qa-tester.md +55 -0
  441. package/presets/cursor/nuxt/agents/security-reviewer.md +61 -0
  442. package/presets/cursor/nuxt/agents/solution-architect.md +69 -0
  443. package/presets/cursor/nuxt/agents/task-analyst.md +110 -0
  444. package/presets/cursor/nuxt/agents/task-router.md +141 -0
  445. package/presets/cursor/nuxt/agents/tech-writer.md +55 -0
  446. package/presets/cursor/nuxt/agents/unit-test-generator.md +38 -0
  447. package/presets/cursor/nuxt/agents/unit-test-healer.md +39 -0
  448. package/presets/cursor/nuxt/agents/unit-test-planner.md +61 -0
  449. package/presets/cursor/nuxt/commands/README.md +51 -0
  450. package/presets/cursor/nuxt/commands/feature-continue.md +19 -0
  451. package/presets/cursor/nuxt/commands/feature-start.md +33 -0
  452. package/presets/cursor/nuxt/commands/task-continue.md +50 -0
  453. package/presets/cursor/nuxt/commands/task.md +56 -0
  454. package/presets/cursor/nuxt/commands/technical-retro.md +85 -0
  455. package/presets/cursor/nuxt/hooks/README.md +12 -0
  456. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +727 -0
  457. package/presets/cursor/nuxt/hooks/examples/README.md +18 -0
  458. package/presets/cursor/nuxt/hooks/examples/format-edited.example.sh +11 -0
  459. package/presets/cursor/nuxt/hooks/examples/secret-guard.example.sh +10 -0
  460. package/presets/cursor/nuxt/hooks/examples/test-on-save.example.sh +8 -0
  461. package/presets/cursor/nuxt/hooks/guard-shell-command.sh +77 -0
  462. package/presets/cursor/nuxt/hooks.json +17 -0
  463. package/presets/cursor/nuxt/mcp.json +19 -0
  464. package/presets/cursor/nuxt/rules/README.md +108 -0
  465. package/presets/cursor/nuxt/rules/agent-team-intake.mdc +16 -0
  466. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +192 -0
  467. package/presets/cursor/nuxt/rules/anti-sycophancy-discipline.mdc +30 -0
  468. package/presets/cursor/nuxt/rules/api-services.mdc +79 -0
  469. package/presets/cursor/nuxt/rules/architecture-boundaries-ui.mdc +15 -0
  470. package/presets/cursor/nuxt/rules/architecture-boundaries.mdc +97 -0
  471. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +51 -0
  472. package/presets/cursor/nuxt/rules/code-review-mr.mdc +58 -0
  473. package/presets/cursor/nuxt/rules/css-property-order-stylelint.mdc +12 -0
  474. package/presets/cursor/nuxt/rules/design-guidance.mdc +111 -0
  475. package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +83 -0
  476. package/presets/cursor/nuxt/rules/http-client.mdc +15 -0
  477. package/presets/cursor/nuxt/rules/layer-barrel-exports.mdc +74 -0
  478. package/presets/cursor/nuxt/rules/navigation-router-stack.mdc +61 -0
  479. package/presets/cursor/nuxt/rules/navigation-router-ui.mdc +16 -0
  480. package/presets/cursor/nuxt/rules/no-type-assertion-as-import-export.mdc +60 -0
  481. package/presets/cursor/nuxt/rules/no-v-bind-spread.mdc +13 -0
  482. package/presets/cursor/nuxt/rules/nuxt-app-core.mdc +45 -0
  483. package/presets/cursor/nuxt/rules/nuxt-pages-routing.mdc +37 -0
  484. package/presets/cursor/nuxt/rules/package-manager.mdc +18 -0
  485. package/presets/cursor/nuxt/rules/playwright-agents.mdc +80 -0
  486. package/presets/cursor/nuxt/rules/post-change-lint.mdc +42 -0
  487. package/presets/cursor/nuxt/rules/preset-layering.mdc +37 -0
  488. package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +84 -0
  489. package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +40 -0
  490. package/presets/cursor/nuxt/rules/preset-token-budget.mdc +42 -0
  491. package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +55 -0
  492. package/presets/cursor/nuxt/rules/public-imports.mdc +62 -0
  493. package/presets/cursor/nuxt/rules/reference-features.mdc +49 -0
  494. package/presets/cursor/nuxt/rules/script-setup-conventions.mdc +13 -0
  495. package/presets/cursor/nuxt/rules/security-nuxt.mdc +34 -0
  496. package/presets/cursor/nuxt/rules/store-pinia.mdc +68 -0
  497. package/presets/cursor/nuxt/rules/technical-retro.mdc +16 -0
  498. package/presets/cursor/nuxt/rules/tests-e2e-structure.mdc +51 -0
  499. package/presets/cursor/nuxt/rules/tests-unit.mdc +78 -0
  500. package/presets/cursor/nuxt/rules/types-jsdoc.mdc +42 -0
  501. package/presets/cursor/nuxt/rules/vue-a11y-coding.mdc +15 -0
  502. package/presets/cursor/nuxt/rules/vue-nuxt-anti-hallucination.mdc +68 -0
  503. package/presets/cursor/nuxt/rules/vue-ui.mdc +33 -0
  504. package/presets/cursor/nuxt/skills/README.md +17 -0
  505. package/presets/cursor/nuxt/skills/ci-investigation/SKILL.md +36 -0
  506. package/presets/cursor/nuxt/skills/code-review/SKILL.md +38 -0
  507. package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +32 -0
  508. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +34 -0
  509. package/presets/cursor/nuxt/skills/playwright-e2e/SKILL.md +37 -0
  510. package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +54 -0
  511. package/presets/cursor/nuxt/skills/unit-testing/SKILL.md +32 -0
  512. package/presets/cursor/nuxt/skills/vue-performance/SKILL.md +53 -0
  513. package/presets/cursor/nuxt/skills/write-adr/SKILL.md +41 -0
  514. package/presets/cursor/nuxt/team/README.md +140 -0
  515. package/presets/cursor/nuxt/team/conventions.md +21 -0
  516. package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +61 -0
  517. package/presets/cursor/nuxt/team/fixtures/bugfix-standard.json +25 -0
  518. package/presets/cursor/nuxt/team/fixtures/feature-full.json +28 -0
  519. package/presets/cursor/nuxt/team/fixtures/feature-light.json +27 -0
  520. package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  521. package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  522. package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  523. package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  524. package/presets/cursor/nuxt/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  525. package/presets/cursor/nuxt/team/fixtures/metrics.example.json +54 -0
  526. package/presets/cursor/nuxt/team/tasks/.gitkeep +0 -0
  527. package/presets/cursor/php-hexagonal/agents/build-verifier.md +9 -2
  528. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +8 -1
  529. package/presets/cursor/php-hexagonal/agents/feature-developer.md +8 -1
  530. package/presets/cursor/php-hexagonal/agents/task-analyst.md +8 -1
  531. package/presets/cursor/php-hexagonal/agents/task-router.md +31 -3
  532. package/presets/cursor/php-hexagonal/commands/task.md +8 -6
  533. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +195 -53
  534. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +30 -5
  535. package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +2 -1
  536. package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +16 -1
  537. package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -1
  538. package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +1 -0
  539. package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +5 -0
  540. package/presets/cursor/php-hexagonal/team/README.md +13 -2
  541. package/presets/cursor/php-laravel/agents/build-verifier.md +9 -2
  542. package/presets/cursor/php-laravel/agents/code-reviewer.md +8 -1
  543. package/presets/cursor/php-laravel/agents/feature-developer.md +8 -1
  544. package/presets/cursor/php-laravel/agents/task-analyst.md +8 -1
  545. package/presets/cursor/php-laravel/agents/task-router.md +31 -3
  546. package/presets/cursor/php-laravel/commands/task.md +8 -6
  547. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +195 -53
  548. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +30 -5
  549. package/presets/cursor/php-laravel/rules/preset-layering.mdc +2 -1
  550. package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +16 -1
  551. package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -1
  552. package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +1 -0
  553. package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +5 -0
  554. package/presets/cursor/php-laravel/team/README.md +13 -2
  555. package/presets/cursor/svelte/AGENTS.md +39 -0
  556. package/presets/cursor/svelte/BUGBOT.md +14 -0
  557. package/presets/cursor/svelte/MCP.md +16 -0
  558. package/presets/cursor/svelte/README.md +47 -0
  559. package/presets/cursor/svelte/REPO_AGENTS.md +49 -0
  560. package/presets/cursor/svelte/agents/README.md +206 -0
  561. package/presets/cursor/svelte/agents/accessibility-reviewer.md +60 -0
  562. package/presets/cursor/svelte/agents/api-contract-reviewer.md +64 -0
  563. package/presets/cursor/svelte/agents/build-verifier.md +90 -0
  564. package/presets/cursor/svelte/agents/ci-investigator.md +61 -0
  565. package/presets/cursor/svelte/agents/code-reviewer.md +63 -0
  566. package/presets/cursor/svelte/agents/codebase-analyzer.md +28 -0
  567. package/presets/cursor/svelte/agents/debugger.md +66 -0
  568. package/presets/cursor/svelte/agents/feature-developer.md +60 -0
  569. package/presets/cursor/svelte/agents/migration-specialist.md +68 -0
  570. package/presets/cursor/svelte/agents/performance-auditor.md +67 -0
  571. package/presets/cursor/svelte/agents/playwright-test-generator.md +27 -0
  572. package/presets/cursor/svelte/agents/playwright-test-healer.md +27 -0
  573. package/presets/cursor/svelte/agents/playwright-test-planner.md +28 -0
  574. package/presets/cursor/svelte/agents/qa-tester.md +55 -0
  575. package/presets/cursor/svelte/agents/security-reviewer.md +61 -0
  576. package/presets/cursor/svelte/agents/solution-architect.md +69 -0
  577. package/presets/cursor/svelte/agents/task-analyst.md +110 -0
  578. package/presets/cursor/svelte/agents/task-router.md +141 -0
  579. package/presets/cursor/svelte/agents/tech-writer.md +55 -0
  580. package/presets/cursor/svelte/agents/unit-test-generator.md +38 -0
  581. package/presets/cursor/svelte/agents/unit-test-healer.md +39 -0
  582. package/presets/cursor/svelte/agents/unit-test-planner.md +61 -0
  583. package/presets/cursor/svelte/commands/README.md +51 -0
  584. package/presets/cursor/svelte/commands/feature-continue.md +19 -0
  585. package/presets/cursor/svelte/commands/feature-start.md +33 -0
  586. package/presets/cursor/svelte/commands/task-continue.md +50 -0
  587. package/presets/cursor/svelte/commands/task.md +56 -0
  588. package/presets/cursor/svelte/commands/technical-retro.md +85 -0
  589. package/presets/cursor/svelte/hooks/README.md +12 -0
  590. package/presets/cursor/svelte/hooks/chain-team-phases.sh +727 -0
  591. package/presets/cursor/svelte/hooks/examples/README.md +18 -0
  592. package/presets/cursor/svelte/hooks/examples/format-edited.example.sh +13 -0
  593. package/presets/cursor/svelte/hooks/examples/secret-guard.example.sh +10 -0
  594. package/presets/cursor/svelte/hooks/examples/test-on-save.example.sh +14 -0
  595. package/presets/cursor/svelte/hooks/guard-shell-command.sh +77 -0
  596. package/presets/cursor/svelte/hooks.json +17 -0
  597. package/presets/cursor/svelte/mcp.json +19 -0
  598. package/presets/cursor/svelte/rules/README.md +86 -0
  599. package/presets/cursor/svelte/rules/agent-team-intake.mdc +16 -0
  600. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +192 -0
  601. package/presets/cursor/svelte/rules/anti-sycophancy-discipline.mdc +30 -0
  602. package/presets/cursor/svelte/rules/api-services.mdc +46 -0
  603. package/presets/cursor/svelte/rules/architecture-boundaries-ui.mdc +15 -0
  604. package/presets/cursor/svelte/rules/architecture-boundaries.mdc +61 -0
  605. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +51 -0
  606. package/presets/cursor/svelte/rules/code-review-mr.mdc +58 -0
  607. package/presets/cursor/svelte/rules/css-property-order-stylelint.mdc +12 -0
  608. package/presets/cursor/svelte/rules/design-guidance.mdc +111 -0
  609. package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +55 -0
  610. package/presets/cursor/svelte/rules/http-client.mdc +16 -0
  611. package/presets/cursor/svelte/rules/layer-barrel-exports.mdc +74 -0
  612. package/presets/cursor/svelte/rules/navigation-router-stack.mdc +40 -0
  613. package/presets/cursor/svelte/rules/navigation-router-ui.mdc +25 -0
  614. package/presets/cursor/svelte/rules/no-rest-props-spread.mdc +32 -0
  615. package/presets/cursor/svelte/rules/no-type-assertion-as-import-export.mdc +60 -0
  616. package/presets/cursor/svelte/rules/package-manager.mdc +18 -0
  617. package/presets/cursor/svelte/rules/playwright-agents.mdc +80 -0
  618. package/presets/cursor/svelte/rules/post-change-lint.mdc +42 -0
  619. package/presets/cursor/svelte/rules/preset-layering.mdc +37 -0
  620. package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +84 -0
  621. package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +40 -0
  622. package/presets/cursor/svelte/rules/preset-token-budget.mdc +42 -0
  623. package/presets/cursor/svelte/rules/preset-twin-sync.mdc +55 -0
  624. package/presets/cursor/svelte/rules/public-imports.mdc +45 -0
  625. package/presets/cursor/svelte/rules/reference-features.mdc +51 -0
  626. package/presets/cursor/svelte/rules/security-sveltekit.mdc +38 -0
  627. package/presets/cursor/svelte/rules/store-svelte.mdc +66 -0
  628. package/presets/cursor/svelte/rules/svelte-a11y-coding.mdc +27 -0
  629. package/presets/cursor/svelte/rules/svelte-app-core.mdc +45 -0
  630. package/presets/cursor/svelte/rules/svelte-script-conventions.mdc +33 -0
  631. package/presets/cursor/svelte/rules/svelte-sveltekit-anti-hallucination.mdc +69 -0
  632. package/presets/cursor/svelte/rules/svelte-ui.mdc +37 -0
  633. package/presets/cursor/svelte/rules/sveltekit-routing.mdc +39 -0
  634. package/presets/cursor/svelte/rules/technical-retro.mdc +16 -0
  635. package/presets/cursor/svelte/rules/tests-e2e-structure.mdc +51 -0
  636. package/presets/cursor/svelte/rules/tests-unit.mdc +42 -0
  637. package/presets/cursor/svelte/rules/types-jsdoc.mdc +42 -0
  638. package/presets/cursor/svelte/skills/README.md +17 -0
  639. package/presets/cursor/svelte/skills/ci-investigation/SKILL.md +36 -0
  640. package/presets/cursor/svelte/skills/code-review/SKILL.md +38 -0
  641. package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +32 -0
  642. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +34 -0
  643. package/presets/cursor/svelte/skills/playwright-e2e/SKILL.md +37 -0
  644. package/presets/cursor/svelte/skills/svelte-performance/SKILL.md +52 -0
  645. package/presets/cursor/svelte/skills/technical-retro/SKILL.md +54 -0
  646. package/presets/cursor/svelte/skills/unit-testing/SKILL.md +32 -0
  647. package/presets/cursor/svelte/skills/write-adr/SKILL.md +41 -0
  648. package/presets/cursor/svelte/team/README.md +140 -0
  649. package/presets/cursor/svelte/team/conventions.md +21 -0
  650. package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +61 -0
  651. package/presets/cursor/svelte/team/fixtures/bugfix-standard.json +25 -0
  652. package/presets/cursor/svelte/team/fixtures/feature-full.json +28 -0
  653. package/presets/cursor/svelte/team/fixtures/feature-light.json +27 -0
  654. package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
  655. package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
  656. package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
  657. package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
  658. package/presets/cursor/svelte/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
  659. package/presets/cursor/svelte/team/fixtures/metrics.example.json +54 -0
  660. package/presets/cursor/svelte/team/tasks/.gitkeep +0 -0
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: Unit tests — Vitest + Testing Library Svelte; colocated *.spec.ts
3
+ paths:
4
+ - "**/*.{spec,test}.ts"
5
+ ---
6
+
7
+ # Общие правила тестирования
8
+
9
+ - **Имена файлов:** новые тесты — **`*.spec.ts`**. Существующие `*.test.ts` не переименовывать без задачи.
10
+ - **Runner:** Vitest (или как в проекте). Компоненты — **`@testing-library/svelte`** (не `@vue/test-utils`, не React Testing Library as default).
11
+ - Проверять **поведение**, не внутренности.
12
+ - **Именование** `describe` / `it`: формулировки **на русском**, каждое предложение с заглавной (как в ESLint `jest/valid-title` если включён).
13
+
14
+ ```typescript
15
+ // ✅
16
+ it('Возвращает пустой список. Пользователь не авторизован', () => {})
17
+
18
+ // ❌
19
+ it('Returns empty list when user is guest', () => {})
20
+ ```
21
+
22
+ # Компоненты
23
+
24
+ - `render` из `@testing-library/svelte`.
25
+ - Взаимодействия: `userEvent` из `@testing-library/user-event` когда принято в репо.
26
+
27
+ # Изоляция
28
+
29
+ - Мокать `$lib/api` / stores по паттерну соседей.
30
+ - Не мокать публичный контракт фичи без нужды.
31
+
32
+ # HTTP / mappers
33
+
34
+ - Изменения общего HTTP‑клиента — behavior‑тесты рядом с `src/lib/clients/**`.
35
+ - Мапперы DTO→domain — unit‑тесты на edge‑кейсы.
36
+
37
+ # Размещение
38
+
39
+ - UI: соседний `*.spec.ts` (не обязательный `__tests__/` внутри компонента).
40
+ - Другие модули — как у соседей.
@@ -0,0 +1,15 @@
1
+ # Tooling and review
2
+
3
+ Lint, package manager, качество кода, agent team, code review MR.
4
+
5
+ | Файл | Содержание | Загрузка |
6
+ |------|------------|----------|
7
+ | `package-manager.md` | yarn / pnpm / npm / bun — определить по lockfile | session start |
8
+ | `post-change-lint.md` | `lint:js` + `lint:css` после изменений (**обязателен** при code edits) | `paths:` commands/team/agents + `app/**` |
9
+ | `code-quality.md` | Boy scout rule, рефакторинг, ESLint | session start |
10
+ | `agent-team-intake.md` | Когда предлагать `/task` и router pipeline | `paths:` commands/team |
11
+ | `agent-team-orchestrator.md` | Dynamic agent team: router, pipeline, gates | `paths:` commands/team/agents |
12
+ | `code-review-mr.md` | Чеклист ревью merge request + output contract | `paths:` review-related |
13
+ | `security-sveltekit.md` | Secrets, auth, XSS, Server Actions (coding-time) | `paths:` app/auth/env |
14
+
15
+ On-demand (не rule): **`commands/technical-retro.md`** (фасилитация ретро).
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Use when user posts a work request without /task — suggest or use /task to run the agent team router. Lightweight intake hint only.
3
+ paths:
4
+ - .claude/team/**
5
+ ---
6
+
7
+ <!-- shared-core: agent-team/agent-team-intake.md -->
8
+
9
+ # Agent team intake
10
+
11
+ When the user message looks like a **work request** (implement, add, fix, refactor, review MR, write tests, spike) — not a question about how code works:
12
+
13
+ 1. Prefer **`/task <their request>`** or invoke **task-router** first.
14
+ 2. Do not jump straight to coding without router + pipeline when scope is non-trivial.
15
+ 3. Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** (explain-as-is); trivial one-liners may be answered inline. Do not open `/task`.
16
+
17
+ Exceptions: user explicitly says «без pipeline», «просто сделай», or continues an active slug.
@@ -0,0 +1,193 @@
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.
3
+ paths:
4
+ - .claude/team/**
5
+ ---
6
+
7
+ <!-- shared-core: agent-team/agent-team-orchestrator.md -->
8
+
9
+ # Agent team orchestrator
10
+
11
+ Parent agent = **manager**. Router plans; specialists execute. Artifacts: `.cursor/team/tasks/<slug>/`.
12
+
13
+ Work request без `/task` — см. **`agent-team-intake.mdc`** (когда предлагать router вместо прямого кодинга).
14
+
15
+ ## Entry points
16
+
17
+ | Command | When |
18
+ |---------|------|
19
+ | **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
20
+ | `/task-continue <slug>` | After human gate or pause |
21
+ | `/feature-start <desc>` | Legacy: analyst-only start (no router) |
22
+ | `/feature-continue <slug>` | Alias of task-continue |
23
+ | `/technical-retro [slug]` | Retro with agent team block |
24
+
25
+ ## Stack notes
26
+
27
+ ### Roles
28
+
29
+ | Agent | App / prod writes | Typical intent |
30
+ |-------|-------------------|----------------|
31
+ | `task-router` | no (team only) | Every `/task` — writes `pipeline.json` |
32
+ | `task-analyst` | no (team only) | feature, refactor, test-only, a11y, docs-only, migration |
33
+ | `solution-architect` | no (team only) | spike, complex cross-layer feature |
34
+ | `migration-specialist` | no (team only) | migration — phased upgrade plan |
35
+ | `api-contract-reviewer` | no (team only) | new/changed backend API contracts |
36
+ | `debugger` | minimal fix | bugfix |
37
+ | `ci-investigator` | minimal CI fix | ci-fix — minimal CI repair |
38
+ | `feature-developer` | yes | feature, bugfix, refactor, migration, a11y |
39
+ | `build-verifier` | no (team only) | lint/typecheck/unit gate after developer; preset-structure when editing presets |
40
+ | `accessibility-reviewer` | no (team only) | a11y, UI-heavy feature |
41
+ | `performance-auditor` | no (team only) | perf-audit, perf-sensitive feature |
42
+ | `code-reviewer` | no (team only) | most pipelines, review-only |
43
+ | `security-reviewer` | no (team only) | auth, forms, sensitive data |
44
+ | `qa-tester` | tests only | feature, bugfix, test-only |
45
+ | `unit-test-planner` | no (team only) | unit-only — coverage plan |
46
+ | `unit-test-generator` | tests only | unit-only — spec generation |
47
+ | `unit-test-healer` | tests only | failing/flaky unit tests |
48
+ | `playwright-test-planner` | e2e plans | e2e scenario planning |
49
+ | `playwright-test-generator` | e2e tests | e2e spec generation |
50
+ | `playwright-test-healer` | e2e fixes | failing/flaky e2e fixes |
51
+ | `tech-writer` | docs / team | docs-only, feature/migration docs |
52
+
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).
54
+
55
+ Full prompts: `.cursor/agents/*.md`. Artifact conventions: `.cursor/team/README.md`; schema SoT: **agent-artifact-contracts**.
56
+
57
+ When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
58
+
59
+ ## Dynamic pipeline
60
+
61
+ ```mermaid
62
+ flowchart TD
63
+ task["/task prompt"]
64
+ router["task-router"]
65
+ pipeline["pipeline.json"]
66
+ step0["steps 0..N"]
67
+ gate{"humanGates?"}
68
+ hook["subagentStop hook"]
69
+ retro["/technical-retro"]
70
+
71
+ task --> router
72
+ router --> pipeline
73
+ pipeline --> step0
74
+ step0 --> gate
75
+ gate -->|"/task-continue"| step0
76
+ step0 --> hook
77
+ hook --> step0
78
+ step0 --> retro
79
+ ```
80
+
81
+ **Source of truth for order:** `pipeline.json` → `steps[]`. Never hardcode analyst → dev → review → QA when `pipeline.json` exists.
82
+
83
+ New pipelines retain top-level `profile` and include `routingDecision` with `complexity`, `riskFlags`, non-empty `routingReasons`, `estimatedWorkPackages`, and `openDecisionCount`. The stack `task-router` owns heuristics; this metadata is auditable evidence and does not change hook semantics.
84
+
85
+ ## Metrics lifecycle
86
+
87
+ Use the local `metrics.json` ledger described by **agent-task-metrics**: the orchestration runtime initializes attempts before invocation, hooks record host-clock ends, and agents never guess a parallel completion from `currentAgent`.
88
+
89
+ ## Artifact context index and receipts
90
+
91
+ Each slug has one `artifact-manifest.json`: `.cursor/team/tasks/<slug>/` or `.claude/team/tasks/<slug>/`. Schema SoT: **agent-artifact-contracts**.
92
+
93
+ - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
94
+ - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
95
+ - Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
96
+ - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
97
+ - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
98
+
99
+ ## status.json (pipeline mode)
100
+
101
+ ```json
102
+ {
103
+ "slug": "...",
104
+ "intent": "feature",
105
+ "pipelineIndex": 0,
106
+ "currentAgent": "task-analyst",
107
+ "phase": "executing",
108
+ "state": "in_progress",
109
+ "awaitingHumanGate": false,
110
+ "activeAttempts": {},
111
+ "lastCompletedAttempt": null,
112
+ "parallelCompleted": [],
113
+ "parallelOutcomes": {}
114
+ }
115
+ ```
116
+
117
+ | Field | Meaning |
118
+ |-------|---------|
119
+ | `activeAttempts` | Transient timing bridge keyed by `attemptId` |
120
+ | `lastCompletedAttempt` | Diagnostic pointer to the latest finished attempt |
121
+ | `parallelCompleted` | Agents that have stopped in the current parallel step |
122
+ | `parallelOutcomes` | Per-agent `{ outcome, attemptId, confidence }` for the current parallel join; cleared when the step advances or retries |
123
+
124
+ On each `subagentStop`, the hook reconciles `status.state` from the completing producer's terminal `artifact-manifest.json` receipt when agents left lifecycle fields untouched. Wait for that handoff before invoking the next step.
125
+
126
+ | state | Meaning |
127
+ |-------|---------|
128
+ | `in_progress` | Current step running |
129
+ | `completed` | Current step done; hook advances |
130
+ | `awaiting_approval` | Human gate; wait for `/task-continue` |
131
+ | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
132
+ | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
133
+
134
+ ## Pipeline step options
135
+
136
+ | Field | Use |
137
+ |-------|-----|
138
+ | `skipIf` | `debugger.fixed` / `ci-investigator.resolved` — hook skips step when artifact says fix applied |
139
+ | `parallel: true` | `agent` is array — invoke **all** agents in one parent turn; each appends to `parallelCompleted` |
140
+ | `scope` | e.g. `unit-in-dev`, `e2e-only` — passed to developer/qa |
141
+ | `model` | `cheap` \| `standard` \| `strong` — optional tier override (see below) |
142
+
143
+ ## Rules (strict)
144
+
145
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
146
+ 2. Read `pipeline.json` before every subagent invocation.
147
+ 3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
148
+ 4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
149
+ 5. Persist handoffs to disk and update the producer-owned terminal receipt in `artifact-manifest.json`; Markdown remains detailed evidence.
150
+ 6. On `changes_requested` from reviewers: hook sets `retryAfterFix` → developer → same reviewer.
151
+ 7. On `validation_failed` from `build-verifier`: hook sets `retryAfterFix: build-verifier` → developer → build-verifier.
152
+ 8. When all steps complete, suggest `/technical-retro <slug>`.
153
+ 9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
154
+
155
+ ## Team artifact I/O (Cursor Shell sandbox)
156
+
157
+ - Create/update `.cursor/team/tasks/<slug>/**` with the **Write** tool (parents are created automatically). Do **not** bootstrap slug dirs with Shell `mkdir -p` — default sandbox returns `Operation not permitted` (worse on macOS Desktop/Documents with TCC `com.apple.macl`).
158
+ - If Shell must touch team paths and fails with EPERM, retry with `required_permissions: ["all"]`. Prefer Write for artifacts.
159
+ - Prefer repo under `~/Projects` / `WebstormProjects` over `~/Desktop` when using agent team heavily.
160
+
161
+ ## Invoking agents
162
+
163
+ Use Task tool or `/agent-name`. Pass: slug, artifact paths, step `scope` if set.
164
+
165
+ ### Model when invoking (Task)
166
+
167
+ 1. Read `steps[i].model` if present; else use the agent’s frontmatter `model` (see `agents/README.md` matrix).
168
+ 2. Map abstract tiers:
169
+ - **`cheap`** → pass Task `model: "fast"` when the tool accepts it (or rely on agent `fast`).
170
+ - **`standard`** → omit Task `model` (frontmatter `inherit` / mid default).
171
+ - **`strong`** → **never** pass `fast`; rely on agent pin (`claude-opus-4-8[effort=high]`) or parent Max model. If Task allows an explicit model ID from the allowed list, prefer the strong agent’s frontmatter ID.
172
+ 3. Parallel steps: apply the step-level `model` to **each** agent in the array (or omit → each agent’s own frontmatter).
173
+
174
+ After each agent completes, verify its terminal manifest receipt, then let the orchestration runtime/hook reconcile `status.json` (`completed`, a blocking outcome, or `awaiting_approval`) from that receipt. Do not ask the agent to mutate shared lifecycle fields, and do not invoke the next specialist until the hook has written the handoff / updated `status.json`.
175
+
176
+ ## Legacy mode
177
+
178
+ If `pipeline.json` is missing (old `/feature-start` tasks), fall back to fixed phases: analysis → development → review → testing. Hook supports both.
179
+
180
+ ## Skip pipeline when
181
+
182
+ Do **not** run `/task` + router for:
183
+
184
+ - Pure questions («как работает X», «объясни») — prefer agent **`codebase-analyzer`** for deep traces; inline OK for trivial one-liners.
185
+ - Typo / one-file fix / trivial config with no architecture risk.
186
+ - User explicitly says «без pipeline», «просто сделай», or continues an active slug.
187
+ - Single-line `docs-only` with no code impact.
188
+
189
+ Borderline work requests — см. **`agent-team-intake.mdc`**.
190
+
191
+ ## Auto-detection (optional)
192
+
193
+ When user describes a **non-trivial task** (not a question), suggest `/task <message>` or run router if they agree.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
3
+ paths:
4
+ - "**/*.{ts,tsx,svelte}"
5
+ ---
6
+
7
+ <!-- shared-core: quality/anti-sycophancy-discipline.md -->
8
+
9
+ # Anti-sycophancy discipline (requestable)
10
+
11
+ Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
12
+
13
+ 1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
14
+ 2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
15
+ 3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
16
+ 4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
17
+ 5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
18
+ 6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
19
+ 7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
20
+ 8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
21
+ 9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
22
+ 10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
23
+ 11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
24
+ 12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
25
+ 13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
26
+ 14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
27
+ 15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
28
+ 16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
29
+ 17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Поддержка и улучшение качества кода и архитектуры
3
+ ---
4
+
5
+ <!-- shared-core: quality/code-quality-and-refactoring.md -->
6
+
7
+ # Поддержка существующего стиля
8
+
9
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
10
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
11
+
12
+ # Принципы
13
+
14
+ - **KISS:** самое простое изменение в паттернах репозитория.
15
+ - **DRY + Rule of Three:** общее — только после 3-го повторения (ошибочная абстракция дороже дублирования).
16
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
17
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
18
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
19
+ - **Composition over inheritance;** Law of Demeter — без цепочек `a.b.c.d`; через public API / facade.
20
+
21
+ # Рефакторинг при изменениях
22
+
23
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
24
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
25
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
26
+
27
+ # Требование к агенту
28
+
29
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
30
+
31
+ ## Agent discipline (anti-sycophancy)
32
+
33
+ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-discipline`**.
34
+
35
+ - Unverifiable third-party API → mark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
36
+ - Before «is this correct?» — ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
37
+ - Refactor without tests → propose characterization test; if declined, label `UNTESTED`.
38
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
39
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
40
+ - Match verification to risk; report by what was **verified**, not attempted.
41
+
42
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
43
+
44
+ > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
45
+ ## Stack notes
46
+
47
+ - Перед новым UI‑контролом проверять существующий Svelte UI‑код и пакеты проекта.
48
+ - Public API: index/barrel‑файлы и явно экспортируемые сущности под `$lib` (`public-imports`, `layer-barrel-exports`).
49
+ - Допустимые примеры: общий facade/утилита; типизация `any`/`unknown`; разделение крупного `.svelte`; CSS‑токены вместо «магических» значений.
50
+ - Lint/stylelint — только **`post-change-lint`**; ESLint (`eslint-plugin-svelte`) + Stylelint configs at SvelteKit root (e.g. `eslint.config.js` / `eslint.config.mjs`, `.stylelintrc*`). Отключение правила (`eslint-disable`) — только **точечно** с кратким комментарием «зачем».
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: Требования к code review агентами Cursor для merge requests
3
+ paths:
4
+ - src/routes/**/*
5
+ - src/lib/components/**/*
6
+ - src/lib/stores/**/*
7
+ - api/**/*
8
+ - src/lib/**/*
9
+ - types/**/*
10
+ ---
11
+
12
+ <!-- shared-core: review/code-review-mr.md -->
13
+
14
+ # Code review merge requests
15
+
16
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
17
+
18
+ ## When to load
19
+
20
+ - User asks for review/MR/diff
21
+ - Pipeline step `code-reviewer`
22
+ - Platform automated review (e.g. BUGBOT) when present
23
+
24
+ ## Checklist references (abstract)
25
+
26
+ - Architecture layers and stack core rules
27
+ - Public imports / module boundaries
28
+ - UI conventions of the stack
29
+ - Unit and e2e/UI test conventions
30
+ - Post-change lint/build gate before final report
31
+ - Design smells **in MR diff scope** — load `design-guidance`; не разворачивать полный каталог Fowler вне диффа
32
+ - Pattern name (GoF) — только если репозиторий уже использует эту форму или match минимален
33
+ - Principles (KISS / DRY+Ro3 / YAGNI / SOLID / CUPID) — через always-on `code-quality-and-refactoring`, не дублировать эссе в review
34
+
35
+ Concrete rule stems — in **Stack notes**.
36
+
37
+ ## Constraints
38
+
39
+ - Focus on MR diff, not the whole repo.
40
+ - Use local `git diff` — do not invent hosting metadata.
41
+ - Boy scout rule: suggest fixes feasible within the MR scope.
42
+ - No «большие рефакторинги» without an explicit request (`code-quality-and-refactoring`).
43
+
44
+ ## Output contract
45
+
46
+ Procedure details live in skill `code-review`. Required shape:
47
+
48
+ - Each finding cites **`path:line`**, the problem, impact, and a concrete fix direction.
49
+ - Rank by severity: **`blocker` | `important` | `nit`** (list blocker → nit).
50
+ - Vague («looks risky») is not a finding — cite evidence or ask for surrounding file context.
51
+ - End with a verdict on its own line: **`Safe to merge | needs changes | reject`**.
52
+
53
+ ## Stack notes
54
+
55
+ On-demand rule for review flows. **Procedure and output format:** skill `code-review`.
56
+
57
+ ### Checklist references
58
+
59
+ - Architecture layers: `architecture-boundaries.mdc`, `svelte-app-core.mdc`; network: `http-client.mdc`
60
+ - Imports: `public-imports.mdc`, `layer-barrel-exports.mdc`
61
+ - UI: `svelte-ui.mdc`
62
+ - Security: `security-sveltekit.mdc`
63
+ - Tests: `tests-unit.mdc`, `playwright-agents.mdc`, `tests-e2e-structure.mdc`
64
+ - Lint gate before final report: `post-change-lint.mdc`
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: Design smells (Fowler) and curated GoF patterns for agents. Load when assessing structure, smells, or pattern fit.
3
+ paths:
4
+ - "**/*.{ts,tsx,svelte}"
5
+ ---
6
+
7
+ <!-- shared-core: quality/design-guidance.md -->
8
+
9
+ # Design guidance (smells & patterns)
10
+
11
+ Словарь **code smells** (Fowler) и **design patterns** (GoF) для агентов при implement / review / debug.
12
+
13
+ Применять только в scope задачи или MR. Лёгкий refactor — да; «большой» rewrite без явного запроса — нет.
14
+
15
+ Называть паттерн **только если** репозиторий уже так делает или это минимальный match. Иначе — extract/split/move без ярлыка GoF.
16
+
17
+ Не заменяет always-on Principles в `code-quality-and-refactoring` (KISS, DRY + Rule of Three, YAGNI, SOLID, CUPID, composition, Demeter).
18
+
19
+ ## When to load
20
+
21
+ - **Feature delivery / implement** — оценка структуры модулей, границ и дублирования.
22
+ - **Code review** — smells и pattern fit **в диффе MR**, не по всему репо.
23
+ - **Debug** — root-cause похож на wrong abstraction, Feature Envy, Message Chains, Shotgun Surgery.
24
+ - **Light refactor only** — улучшения в рамках boy-scout / MR scope; не расширять задачу ради каталога.
25
+
26
+ Агенты и skills подгружают stem по one-liner wiring — не копировать этот каталог в промпт агента.
27
+
28
+ ## How to use (agent rules of thumb)
29
+
30
+ 1. Сначала сверить с Principles (always-on): проще ли решение, нет ли ранней абстракции, соблюдён ли public API.
31
+ 2. Затем отметить smells **в изменённых файлах** задачи/MR; предложить fix только если он укладывается в light refactor.
32
+ 3. Паттерн GoF — опциональный ярлык после того, как структура уже ясна; не начинать дизайн с выбора паттерна.
33
+ 4. Если smell и паттерн конфликтуют с границами слоёв стека — побеждают stack boundaries и existing repo patterns.
34
+ 5. Не требовать переименования «под GoF», если поведение уже корректно и читаемо.
35
+
36
+ ## Code smells (Fowler, curated ≤12)
37
+
38
+ Таблица: smell → detect hint → fix hint (одна линия каждый). Без механических меню рефакторинга.
39
+
40
+ | # | Smell | Detect | Fix hint |
41
+ |---|-------|--------|----------|
42
+ | 1 | Duplicate Code | одинаковая логика в ≥2 местах | dedupe после Rule of Three |
43
+ | 2 | Long Method / Long Module | единица делает слишком много | extract в рамках scope; без big rewrite |
44
+ | 3 | Feature Envy | метод чаще трогает чужие данные, чем свои | сдвинуть логику к данным / public API |
45
+ | 4 | Data Clumps | одни и те же группы аргументов кочуют вместе | сгруппировать в type / value object |
46
+ | 5 | Primitive Obsession | сырые string/int вместо доменных понятий | typed ids / value objects при нужде домена |
47
+ | 6 | Speculative Generality | неиспользуемые хуки, флаги, абстракции «на будущее» | удалить (YAGNI) |
48
+ | 7 | Message Chains | цепочки `a.b.c.d` | Demeter; facade / public API модуля |
49
+ | 8 | Middle Man | класс почти только прокидывает вызовы | убрать pass-through **или** оставить как boundary |
50
+ | 9 | Divergent Change | один модуль меняется по разным причинам | split по поводам изменения |
51
+ | 10 | Shotgun Surgery | одно смысловое изменение разъезжается по многим файлам | consolidate ответственность |
52
+ | 11 | Inappropriate Intimacy | доступ к чужим internals / private деталям | только public API / ports / facades |
53
+ | 12 | Refused Bequest / Parallel Inheritance | подтип игнорирует базу; зеркальные иерархии классов | composition; не плодить параллельные деревья |
54
+
55
+ **Skip Fowler (не в core):** Lazy Class, Incomplete Library Class, Comments-as-smell dogma, полный каталог 70+, пошаговые recipe-меню.
56
+
57
+ Приоритет при конфликте smells: Inappropriate Intimacy и Message Chains (границы модулей) > Duplicate Code (после Rule of Three) > Long Method внутри уже правильного модуля.
58
+
59
+ ## Design patterns (GoF, curated ≤8)
60
+
61
+ Suggest only when repo already uses the shape or the match is minimal. Prefer extract-function over naming Strategy ради ярлыка.
62
+
63
+ Паттерны ниже — **разрешённый минимум** для агентов; остальной GoF по умолчанию в Skip.
64
+
65
+ | Pattern | When to suggest | Anti-trigger |
66
+ |---------|-----------------|--------------|
67
+ | Strategy | взаимозаменяемые алгоритмы уже (или явно скоро) выбираются политикой | один алгоритм без ветвления политики |
68
+ | Adapter | обернуть внешний / чужой API под локальный port | лишняя обёртка вокруг своего же API |
69
+ | Facade | упростить multi-step subsystem за public API | facade превращается в god-object |
70
+ | Factory Method | полиморфное создание уже принято в стиле репо | factory на каждый тривиальный `new` |
71
+ | Decorator | аддитивное поведение без взрыва subclass-иерархий | decorator «для слоёв» без реальной нужды |
72
+ | Observer | events / subscriptions уже есть в архитектуре | самодельный pub/sub без прецедента в репо |
73
+ | Template Method | общий algorithm skeleton + вариативные hooks | наследование ради пары отличающихся строк |
74
+ | Composite | дерево однородных узлов (UI/domain), как уже в репо | Composite на плоский список без иерархии |
75
+
76
+ Если сомневаешься между двумя паттернами — выбери более простой extract/compose без имени; ярлык можно добавить на review, если репо уже так говорит.
77
+
78
+ ## Skip / avoid by default
79
+
80
+ | Catalog | Skip |
81
+ |---------|------|
82
+ | GoF | Singleton, Abstract Factory, Flyweight, Memento, Interpreter, Visitor, Bridge, Prototype |
83
+ | GoF (conditional) | Command, Chain of Responsibility, State — упоминать **только если** репо уже использует |
84
+ | Fowler | всё сверх 12 smells выше |
85
+ | DDD | Aggregates, bounded-context maps, event sourcing, CQRS — **не в core** |
86
+ | DDD (pointer) | ubiquitous language anti-pattern — расширять в `feature-delivery-workflow`, не здесь |
87
+ | GRASP | список Larman как отдельные правила — skip (перекрывается SOLID/CUPID) |
88
+ | Clean Code dogma | жёсткие caps на строки функции / «ровно один assert» — skip |
89
+
90
+ Не вводить второй stem (`refactoring-smells` / `design-patterns-for-agents`) — один каталог: `design-guidance`.
91
+
92
+ ## Out of scope for this stem
93
+
94
+ - Полный GoF (23) и полный Fowler catalog.
95
+ - Stack-specific рецепты (пути модулей, lint-команды) — только в **Stack notes** адаптера.
96
+ - Security, a11y, perf — отдельные review-правила; здесь только структурные smells/patterns.
97
+ - Четвёртое always-on правило — запрещено; этот stem только requestable / agent-load.
98
+
99
+ ## Cross-refs
100
+
101
+ - Always-on Principles: `code-quality-and-refactoring`.
102
+ - DIP / ports vs adapters: stack `architecture-boundaries` (детали стека — в Stack notes адаптеров).
103
+ - Ubiquitous language: `feature-delivery-workflow` (lineage).
104
+ - MR checklist (smells in scope; pattern name only if repo uses it): `code-review-mr`.
105
+ - Token / twin policy for authors: `preset-token-budget`, `preset-twin-sync` (meta, not consumer always-on).
106
+
107
+ ## Stack notes
108
+
109
+ - Prefer hooks/mappers over HOC or new pattern names when the repo already extracts that way.
110
+ - Suggest Strategy/Adapter only when ports or policy branching already exist in `**`.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Перед командами в терминале определять менеджер пакетов репозитория и использовать только его
3
+ ---
4
+
5
+ # Менеджер пакетов (терминал)
6
+
7
+ Перед **`npm install` / `yarn` / `pnpm` / `bun`** и **`… run …`** определи менеджер репозитория и **используй только его**.
8
+
9
+ ## Как определить
10
+
11
+ 1. **`packageManager`** в `package.json` (корень SvelteKit / workspace root, где живут scripts / `svelte.config.*`).
12
+ 2. **Lockfile** рядом: `yarn.lock` → yarn; `pnpm-lock.yaml` → pnpm; `package-lock.json` → npm; `bun.lock(b)` → bun.
13
+ 3. Если неоднозначно — где `node_modules` и какой lockfile в CI.
14
+
15
+ ## Stack notes
16
+
17
+ Рабочий каталог для scripts — **корень SvelteKit** (каталог с `svelte.config.*`), **не** Next `app/` и не предполагать `nuxt.config.*`. Примеры: `yarn lint:js`, `pnpm run check`. Не угадывай — проверь файлы.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Прогон ESLint, Stylelint и svelte-check после изменений кода. Requestable — подгружать после правок src/**; агенты обязаны запускать после code edits.
3
+ paths:
4
+ - src/routes/**/*
5
+ - src/lib/components/**/*
6
+ ---
7
+
8
+ # Линтеры после изменений кода
9
+
10
+ **Requestable, но обязателен при изменениях кода:** правило не always-on (экономия контекста); после правок исходников агент **должен** следовать этому чеклисту.
11
+
12
+ ## Когда применять
13
+
14
+ После **любого** изменения исходников в `src/routes/**`, `src/lib/**`, `src/hooks.*.ts`, `src/params/**`, `tests/**` (Svelte/TS/JS, CSS, `<style>`).
15
+
16
+ Исключения: правки документации, конфигов CI, `.cursor/rules/**`, если исполняемый код приложения не менялся.
17
+
18
+ **Pipeline exception:** если задача идёт через agent team и следующий шаг — `build-verifier`, developer может ограничиться lint/check **изменённых файлов**; полный прогон — обязанность `build-verifier`. В single-agent режиме (без pipeline) — всегда полный прогон.
19
+
20
+ ## Обязательные команды
21
+
22
+ Рабочий каталог — **корень SvelteKit** (где `svelte.config.*`). Менеджер пакетов — **`package-manager`**.
23
+
24
+ 1. **`lint:js`** — полный ESLint по проекту (`eslint-plugin-svelte` when configured).
25
+ 2. **`lint:css`** — полный Stylelint.
26
+
27
+ Точечный lint на один файл **не заменяет** полный прогон перед завершением задачи (кроме pipeline exception выше).
28
+
29
+ ## Алгоритм
30
+
31
+ 1. Завершить правки кода.
32
+ 2. Запустить **`lint:js`** и **`lint:css`** из корня SvelteKit.
33
+ 3. Проанализировать весь вывод; исправить errors/warnings в изменённых файлах; для Stylelint — autofix если доступен.
34
+ 4. Повторить до exit code 0 или зафиксировать блокер в ответе пользователю.
35
+ 5. **`check`** (`svelte-kit sync && svelte-check`) при изменениях TypeScript / `.svelte` / SvelteKit config. CI-уровень: **`lint`** (= `lint:js` + `lint:css` + `check`).
36
+
37
+ **Имя скрипта type/svelte gate — `check`**, не next-овский `type-check` и не nuxt-овский `typecheck`. Бинарь — `svelte-check`; package script — **`check`**.
38
+
39
+ ## Что исправлять
40
+
41
+ - **Errors** — обязательно.
42
+ - **Warnings** — обязательно в файлах задачи; вне скоупа — упомянуть, если мешают нулевому exit code.
43
+
44
+ Конфиги: `eslint.config.js` / `eslint.config.mjs` / `.eslintrc*`, `.stylelintrc*` (порядок CSS — `css-property-order-stylelint`).
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Preset authoring: Core → Stack → Platform layering. Use when editing packages/ai-rules/presets/**.
3
+ paths:
4
+ - packages/ai-rules/presets/**/*
5
+ - .cursor/rules/**/*
6
+ - .cursor/team/tasks/**/*
7
+ ---
8
+
9
+ <!-- shared-core: meta/preset-layering.md -->
10
+
11
+
12
+ # Preset layering
13
+
14
+ Правила для **авторов пресетов** (`packages/ai-rules/presets/**`). Не always-on в consumer apps.
15
+
16
+ ## Слои
17
+
18
+ | Слой | Где | Что класть |
19
+ |------|-----|------------|
20
+ | **Core** | `presets/_shared/core/**` | Stack-agnostic prose + checklists; без frontmatter; без путей `app/**`, `Features/**`, Playwright, xcodebuild |
21
+ | **Stack** | `presets/{cursor\|claude}/<stack>/` | Domain/tooling, always-on trio стека, stack examples в **Stack notes** |
22
+ | **Platform** | Cursor `.mdc` / Claude `.md` | Frontmatter (`alwaysApply`/`globs` vs `paths:`), platform-only (`BUGBOT.md`, `CLAUDE.md`) |
23
+
24
+ ## Куда класть новое правило
25
+
26
+ 1. Общие принципы для всех стеков → **core** + адаптеры с `<!-- shared-core: … -->`.
27
+ 2. Только один из installable стеков (`next` / `nuxt` / `svelte` / `ios-swift` / `go` / `java` / `mcp-ts` / `php-hexagonal` / `php-laravel`) → **stack-specific** (не в `_shared`).
28
+ 3. Только Cursor или только Claude packaging → platform artifact / frontmatter, не дублировать семантику.
29
+
30
+ ## SoT
31
+
32
+ - Packages path — SoT; root `.cursor/` — dogfood sync.
33
+ - Per stack: **Cursor** `presets/cursor/<stack>/` → Claude twin same PR.
34
+ - `_shared` **не** `--preset` и не копируется CLI `init`.
35
+
36
+ См. также: `preset-twin-sync`, `preset-token-budget`, `preset-pr-checklist`, `preset-no-cross-stack-leakage`.