@bonesofspring/ai-rules 0.2.16 → 0.2.17

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 (347) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +19 -2
  3. package/bin/cli.js +39 -0
  4. package/package.json +3 -1
  5. package/presets/_shared/README.md +2 -2
  6. package/presets/_shared/assets/docs-specs/INDEX.md +9 -0
  7. package/presets/_shared/assets/docs-specs/_templates/feature.md +32 -0
  8. package/presets/_shared/assets/docs-specs/_templates/page.md +47 -0
  9. package/presets/_shared/assets/docs-specs/schemas/frontmatter-v1.schema.json +22 -0
  10. package/presets/_shared/core/architecture/product-specs-authoring.md +107 -0
  11. package/presets/_shared/core/architecture/product-specs.md +49 -0
  12. package/presets/claude/android-kotlin/agents/build-verifier.md +3 -0
  13. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
  14. package/presets/claude/android-kotlin/agents/feature-developer.md +7 -0
  15. package/presets/claude/android-kotlin/agents/task-analyst.md +19 -0
  16. package/presets/claude/android-kotlin/agents/task-router.md +11 -0
  17. package/presets/claude/android-kotlin/agents/tech-writer.md +5 -0
  18. package/presets/claude/android-kotlin/commands/feature-continue.md +4 -0
  19. package/presets/claude/android-kotlin/commands/feature-start.md +8 -0
  20. package/presets/claude/android-kotlin/commands/spec-start.md +29 -0
  21. package/presets/claude/android-kotlin/commands/task-continue.md +6 -3
  22. package/presets/claude/android-kotlin/rules/README.md +2 -0
  23. package/presets/claude/android-kotlin/rules/architecture/feature-delivery.md +4 -0
  24. package/presets/claude/android-kotlin/rules/architecture/product-specs-authoring.md +121 -0
  25. package/presets/claude/android-kotlin/rules/architecture/product-specs.md +62 -0
  26. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  27. package/presets/claude/android-kotlin/skills/feature-delivery/SKILL.md +5 -4
  28. package/presets/claude/android-kotlin/skills/spec-authoring/SKILL.md +26 -0
  29. package/presets/claude/go/agents/build-verifier.md +3 -0
  30. package/presets/claude/go/agents/code-reviewer.md +2 -0
  31. package/presets/claude/go/agents/feature-developer.md +7 -0
  32. package/presets/claude/go/agents/task-analyst.md +19 -0
  33. package/presets/claude/go/agents/task-router.md +11 -0
  34. package/presets/claude/go/agents/tech-writer.md +5 -0
  35. package/presets/claude/go/commands/feature-continue.md +1 -0
  36. package/presets/claude/go/commands/feature-start.md +8 -0
  37. package/presets/claude/go/commands/spec-start.md +29 -0
  38. package/presets/claude/go/commands/task-continue.md +6 -3
  39. package/presets/claude/go/rules/README.md +2 -0
  40. package/presets/claude/go/rules/architecture/feature-delivery.md +4 -0
  41. package/presets/claude/go/rules/architecture/product-specs-authoring.md +121 -0
  42. package/presets/claude/go/rules/architecture/product-specs.md +63 -0
  43. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  44. package/presets/claude/go/skills/feature-delivery/SKILL.md +5 -4
  45. package/presets/claude/go/skills/spec-authoring/SKILL.md +26 -0
  46. package/presets/claude/ios-swift/agents/build-verifier.md +3 -0
  47. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
  48. package/presets/claude/ios-swift/agents/feature-developer.md +7 -0
  49. package/presets/claude/ios-swift/agents/task-analyst.md +19 -0
  50. package/presets/claude/ios-swift/agents/task-router.md +11 -0
  51. package/presets/claude/ios-swift/agents/tech-writer.md +2 -15
  52. package/presets/claude/ios-swift/commands/feature-continue.md +4 -0
  53. package/presets/claude/ios-swift/commands/feature-start.md +8 -0
  54. package/presets/claude/ios-swift/commands/spec-start.md +29 -0
  55. package/presets/claude/ios-swift/commands/task-continue.md +6 -3
  56. package/presets/claude/ios-swift/rules/README.md +3 -0
  57. package/presets/claude/ios-swift/rules/architecture/feature-delivery.md +4 -0
  58. package/presets/claude/ios-swift/rules/architecture/product-specs-authoring.md +121 -0
  59. package/presets/claude/ios-swift/rules/architecture/product-specs.md +62 -0
  60. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  61. package/presets/claude/ios-swift/skills/feature-delivery/SKILL.md +5 -4
  62. package/presets/claude/ios-swift/skills/spec-authoring/SKILL.md +26 -0
  63. package/presets/claude/java/agents/build-verifier.md +3 -0
  64. package/presets/claude/java/agents/code-reviewer.md +2 -0
  65. package/presets/claude/java/agents/feature-developer.md +7 -0
  66. package/presets/claude/java/agents/task-analyst.md +19 -0
  67. package/presets/claude/java/agents/task-router.md +11 -0
  68. package/presets/claude/java/agents/tech-writer.md +5 -0
  69. package/presets/claude/java/commands/feature-continue.md +1 -0
  70. package/presets/claude/java/commands/feature-start.md +8 -0
  71. package/presets/claude/java/commands/spec-start.md +29 -0
  72. package/presets/claude/java/commands/task-continue.md +6 -3
  73. package/presets/claude/java/rules/README.md +2 -0
  74. package/presets/claude/java/rules/architecture/feature-delivery.md +4 -0
  75. package/presets/claude/java/rules/architecture/product-specs-authoring.md +121 -0
  76. package/presets/claude/java/rules/architecture/product-specs.md +63 -0
  77. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  78. package/presets/claude/java/skills/feature-delivery/SKILL.md +5 -4
  79. package/presets/claude/java/skills/spec-authoring/SKILL.md +26 -0
  80. package/presets/claude/mcp-ts/agents/build-verifier.md +3 -0
  81. package/presets/claude/mcp-ts/agents/feature-developer.md +7 -0
  82. package/presets/claude/mcp-ts/agents/task-analyst.md +21 -0
  83. package/presets/claude/mcp-ts/agents/task-router.md +11 -0
  84. package/presets/claude/mcp-ts/commands/feature-continue.md +4 -0
  85. package/presets/claude/mcp-ts/commands/feature-start.md +8 -0
  86. package/presets/claude/mcp-ts/commands/spec-start.md +29 -0
  87. package/presets/claude/mcp-ts/commands/task-continue.md +6 -3
  88. package/presets/claude/mcp-ts/rules/README.md +2 -0
  89. package/presets/claude/mcp-ts/rules/architecture/feature-delivery.md +4 -0
  90. package/presets/claude/mcp-ts/rules/architecture/product-specs-authoring.md +121 -0
  91. package/presets/claude/mcp-ts/rules/architecture/product-specs.md +63 -0
  92. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  93. package/presets/claude/mcp-ts/skills/feature-delivery/SKILL.md +4 -3
  94. package/presets/claude/mcp-ts/skills/spec-authoring/SKILL.md +26 -0
  95. package/presets/claude/next/agents/build-verifier.md +3 -0
  96. package/presets/claude/next/agents/code-reviewer.md +1 -0
  97. package/presets/claude/next/agents/feature-developer.md +7 -0
  98. package/presets/claude/next/agents/task-analyst.md +19 -0
  99. package/presets/claude/next/agents/task-router.md +11 -0
  100. package/presets/claude/next/agents/tech-writer.md +5 -0
  101. package/presets/claude/next/commands/feature-continue.md +1 -0
  102. package/presets/claude/next/commands/feature-start.md +8 -0
  103. package/presets/claude/next/commands/spec-start.md +29 -0
  104. package/presets/claude/next/commands/task-continue.md +6 -3
  105. package/presets/claude/next/rules/README.md +3 -0
  106. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +4 -0
  107. package/presets/claude/next/rules/architecture/product-specs-authoring.md +121 -0
  108. package/presets/claude/next/rules/architecture/product-specs.md +63 -0
  109. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  110. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -3
  111. package/presets/claude/next/skills/spec-authoring/SKILL.md +26 -0
  112. package/presets/claude/nuxt/agents/build-verifier.md +3 -0
  113. package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
  114. package/presets/claude/nuxt/agents/feature-developer.md +7 -0
  115. package/presets/claude/nuxt/agents/task-analyst.md +19 -0
  116. package/presets/claude/nuxt/agents/task-router.md +11 -0
  117. package/presets/claude/nuxt/agents/tech-writer.md +5 -0
  118. package/presets/claude/nuxt/commands/feature-continue.md +4 -0
  119. package/presets/claude/nuxt/commands/feature-start.md +8 -0
  120. package/presets/claude/nuxt/commands/spec-start.md +29 -0
  121. package/presets/claude/nuxt/commands/task-continue.md +6 -3
  122. package/presets/claude/nuxt/rules/README.md +3 -0
  123. package/presets/claude/nuxt/rules/architecture/feature-delivery-workflow.md +4 -0
  124. package/presets/claude/nuxt/rules/architecture/product-specs-authoring.md +121 -0
  125. package/presets/claude/nuxt/rules/architecture/product-specs.md +62 -0
  126. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  127. package/presets/claude/nuxt/skills/feature-delivery/SKILL.md +4 -3
  128. package/presets/claude/nuxt/skills/spec-authoring/SKILL.md +26 -0
  129. package/presets/claude/php-hexagonal/agents/build-verifier.md +3 -0
  130. package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
  131. package/presets/claude/php-hexagonal/agents/feature-developer.md +7 -0
  132. package/presets/claude/php-hexagonal/agents/task-analyst.md +19 -0
  133. package/presets/claude/php-hexagonal/agents/task-router.md +11 -0
  134. package/presets/claude/php-hexagonal/agents/tech-writer.md +5 -0
  135. package/presets/claude/php-hexagonal/commands/feature-continue.md +1 -0
  136. package/presets/claude/php-hexagonal/commands/feature-start.md +8 -0
  137. package/presets/claude/php-hexagonal/commands/spec-start.md +29 -0
  138. package/presets/claude/php-hexagonal/commands/task-continue.md +6 -3
  139. package/presets/claude/php-hexagonal/rules/README.md +2 -0
  140. package/presets/claude/php-hexagonal/rules/architecture/feature-delivery.md +4 -0
  141. package/presets/claude/php-hexagonal/rules/architecture/product-specs-authoring.md +121 -0
  142. package/presets/claude/php-hexagonal/rules/architecture/product-specs.md +63 -0
  143. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  144. package/presets/claude/php-hexagonal/skills/feature-delivery/SKILL.md +5 -4
  145. package/presets/claude/php-hexagonal/skills/spec-authoring/SKILL.md +26 -0
  146. package/presets/claude/php-laravel/agents/build-verifier.md +3 -0
  147. package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
  148. package/presets/claude/php-laravel/agents/feature-developer.md +7 -0
  149. package/presets/claude/php-laravel/agents/task-analyst.md +19 -0
  150. package/presets/claude/php-laravel/agents/task-router.md +11 -0
  151. package/presets/claude/php-laravel/agents/tech-writer.md +5 -0
  152. package/presets/claude/php-laravel/commands/feature-continue.md +1 -0
  153. package/presets/claude/php-laravel/commands/feature-start.md +8 -0
  154. package/presets/claude/php-laravel/commands/spec-start.md +29 -0
  155. package/presets/claude/php-laravel/commands/task-continue.md +6 -3
  156. package/presets/claude/php-laravel/rules/README.md +2 -0
  157. package/presets/claude/php-laravel/rules/architecture/feature-delivery.md +4 -0
  158. package/presets/claude/php-laravel/rules/architecture/product-specs-authoring.md +121 -0
  159. package/presets/claude/php-laravel/rules/architecture/product-specs.md +63 -0
  160. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  161. package/presets/claude/php-laravel/skills/feature-delivery/SKILL.md +5 -4
  162. package/presets/claude/php-laravel/skills/spec-authoring/SKILL.md +26 -0
  163. package/presets/claude/svelte/agents/build-verifier.md +3 -0
  164. package/presets/claude/svelte/agents/code-reviewer.md +2 -0
  165. package/presets/claude/svelte/agents/feature-developer.md +7 -0
  166. package/presets/claude/svelte/agents/task-analyst.md +19 -0
  167. package/presets/claude/svelte/agents/task-router.md +11 -0
  168. package/presets/claude/svelte/agents/tech-writer.md +5 -0
  169. package/presets/claude/svelte/commands/feature-continue.md +4 -0
  170. package/presets/claude/svelte/commands/feature-start.md +8 -0
  171. package/presets/claude/svelte/commands/spec-start.md +29 -0
  172. package/presets/claude/svelte/commands/task-continue.md +6 -3
  173. package/presets/claude/svelte/rules/README.md +3 -0
  174. package/presets/claude/svelte/rules/architecture/feature-delivery-workflow.md +4 -0
  175. package/presets/claude/svelte/rules/architecture/product-specs-authoring.md +121 -0
  176. package/presets/claude/svelte/rules/architecture/product-specs.md +62 -0
  177. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +2 -0
  178. package/presets/claude/svelte/skills/feature-delivery/SKILL.md +4 -3
  179. package/presets/claude/svelte/skills/spec-authoring/SKILL.md +26 -0
  180. package/presets/cursor/android-kotlin/agents/build-verifier.md +3 -0
  181. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
  182. package/presets/cursor/android-kotlin/agents/feature-developer.md +7 -0
  183. package/presets/cursor/android-kotlin/agents/task-analyst.md +19 -0
  184. package/presets/cursor/android-kotlin/agents/task-router.md +11 -0
  185. package/presets/cursor/android-kotlin/agents/tech-writer.md +5 -0
  186. package/presets/cursor/android-kotlin/commands/feature-continue.md +4 -0
  187. package/presets/cursor/android-kotlin/commands/feature-start.md +8 -0
  188. package/presets/cursor/android-kotlin/commands/spec-start.md +29 -0
  189. package/presets/cursor/android-kotlin/commands/task-continue.md +6 -3
  190. package/presets/cursor/android-kotlin/rules/README.md +3 -0
  191. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +2 -0
  192. package/presets/cursor/android-kotlin/rules/feature-delivery-workflow.mdc +4 -0
  193. package/presets/cursor/android-kotlin/rules/product-specs-authoring.mdc +123 -0
  194. package/presets/cursor/android-kotlin/rules/product-specs.mdc +64 -0
  195. package/presets/cursor/android-kotlin/skills/feature-delivery/SKILL.md +5 -4
  196. package/presets/cursor/android-kotlin/skills/spec-authoring/SKILL.md +26 -0
  197. package/presets/cursor/go/agents/build-verifier.md +3 -0
  198. package/presets/cursor/go/agents/code-reviewer.md +2 -0
  199. package/presets/cursor/go/agents/feature-developer.md +7 -0
  200. package/presets/cursor/go/agents/task-analyst.md +19 -0
  201. package/presets/cursor/go/agents/task-router.md +11 -0
  202. package/presets/cursor/go/agents/tech-writer.md +5 -0
  203. package/presets/cursor/go/commands/feature-continue.md +4 -0
  204. package/presets/cursor/go/commands/feature-start.md +8 -0
  205. package/presets/cursor/go/commands/spec-start.md +29 -0
  206. package/presets/cursor/go/commands/task-continue.md +6 -3
  207. package/presets/cursor/go/rules/README.md +4 -1
  208. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -0
  209. package/presets/cursor/go/rules/feature-delivery-workflow.mdc +4 -0
  210. package/presets/cursor/go/rules/product-specs-authoring.mdc +123 -0
  211. package/presets/cursor/go/rules/product-specs.mdc +65 -0
  212. package/presets/cursor/go/skills/feature-delivery/SKILL.md +5 -4
  213. package/presets/cursor/go/skills/spec-authoring/SKILL.md +26 -0
  214. package/presets/cursor/ios-swift/agents/build-verifier.md +3 -0
  215. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
  216. package/presets/cursor/ios-swift/agents/feature-developer.md +7 -0
  217. package/presets/cursor/ios-swift/agents/task-analyst.md +19 -0
  218. package/presets/cursor/ios-swift/agents/task-router.md +11 -0
  219. package/presets/cursor/ios-swift/agents/tech-writer.md +2 -15
  220. package/presets/cursor/ios-swift/commands/feature-continue.md +4 -0
  221. package/presets/cursor/ios-swift/commands/feature-start.md +8 -0
  222. package/presets/cursor/ios-swift/commands/spec-start.md +29 -0
  223. package/presets/cursor/ios-swift/commands/task-continue.md +6 -3
  224. package/presets/cursor/ios-swift/rules/README.md +4 -1
  225. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +2 -0
  226. package/presets/cursor/ios-swift/rules/feature-delivery-workflow.mdc +4 -0
  227. package/presets/cursor/ios-swift/rules/product-specs-authoring.mdc +123 -0
  228. package/presets/cursor/ios-swift/rules/product-specs.mdc +64 -0
  229. package/presets/cursor/ios-swift/skills/feature-delivery/SKILL.md +5 -4
  230. package/presets/cursor/ios-swift/skills/spec-authoring/SKILL.md +26 -0
  231. package/presets/cursor/java/agents/build-verifier.md +3 -0
  232. package/presets/cursor/java/agents/code-reviewer.md +2 -0
  233. package/presets/cursor/java/agents/feature-developer.md +7 -0
  234. package/presets/cursor/java/agents/task-analyst.md +19 -0
  235. package/presets/cursor/java/agents/task-router.md +11 -0
  236. package/presets/cursor/java/agents/tech-writer.md +5 -0
  237. package/presets/cursor/java/commands/feature-continue.md +4 -0
  238. package/presets/cursor/java/commands/feature-start.md +8 -0
  239. package/presets/cursor/java/commands/spec-start.md +29 -0
  240. package/presets/cursor/java/commands/task-continue.md +6 -3
  241. package/presets/cursor/java/rules/README.md +4 -1
  242. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -0
  243. package/presets/cursor/java/rules/feature-delivery-workflow.mdc +4 -0
  244. package/presets/cursor/java/rules/product-specs-authoring.mdc +123 -0
  245. package/presets/cursor/java/rules/product-specs.mdc +65 -0
  246. package/presets/cursor/java/skills/feature-delivery/SKILL.md +5 -4
  247. package/presets/cursor/java/skills/spec-authoring/SKILL.md +26 -0
  248. package/presets/cursor/mcp-ts/agents/build-verifier.md +3 -0
  249. package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -0
  250. package/presets/cursor/mcp-ts/agents/task-analyst.md +21 -0
  251. package/presets/cursor/mcp-ts/agents/task-router.md +11 -0
  252. package/presets/cursor/mcp-ts/commands/feature-continue.md +4 -0
  253. package/presets/cursor/mcp-ts/commands/feature-start.md +8 -0
  254. package/presets/cursor/mcp-ts/commands/spec-start.md +29 -0
  255. package/presets/cursor/mcp-ts/commands/task-continue.md +6 -3
  256. package/presets/cursor/mcp-ts/rules/README.md +2 -0
  257. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -0
  258. package/presets/cursor/mcp-ts/rules/feature-delivery-workflow.mdc +4 -0
  259. package/presets/cursor/mcp-ts/rules/product-specs-authoring.mdc +123 -0
  260. package/presets/cursor/mcp-ts/rules/product-specs.mdc +65 -0
  261. package/presets/cursor/mcp-ts/skills/feature-delivery/SKILL.md +4 -3
  262. package/presets/cursor/mcp-ts/skills/spec-authoring/SKILL.md +26 -0
  263. package/presets/cursor/next/agents/build-verifier.md +3 -0
  264. package/presets/cursor/next/agents/code-reviewer.md +1 -0
  265. package/presets/cursor/next/agents/feature-developer.md +7 -0
  266. package/presets/cursor/next/agents/task-analyst.md +19 -0
  267. package/presets/cursor/next/agents/task-router.md +11 -0
  268. package/presets/cursor/next/agents/tech-writer.md +5 -0
  269. package/presets/cursor/next/commands/feature-continue.md +4 -0
  270. package/presets/cursor/next/commands/feature-start.md +8 -0
  271. package/presets/cursor/next/commands/spec-start.md +29 -0
  272. package/presets/cursor/next/commands/task-continue.md +6 -3
  273. package/presets/cursor/next/rules/README.md +3 -1
  274. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +2 -0
  275. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +4 -0
  276. package/presets/cursor/next/rules/product-specs-authoring.mdc +123 -0
  277. package/presets/cursor/next/rules/product-specs.mdc +65 -0
  278. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -3
  279. package/presets/cursor/next/skills/spec-authoring/SKILL.md +26 -0
  280. package/presets/cursor/nuxt/agents/build-verifier.md +3 -0
  281. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
  282. package/presets/cursor/nuxt/agents/feature-developer.md +7 -0
  283. package/presets/cursor/nuxt/agents/task-analyst.md +19 -0
  284. package/presets/cursor/nuxt/agents/task-router.md +11 -0
  285. package/presets/cursor/nuxt/agents/tech-writer.md +5 -0
  286. package/presets/cursor/nuxt/commands/feature-continue.md +4 -0
  287. package/presets/cursor/nuxt/commands/feature-start.md +8 -0
  288. package/presets/cursor/nuxt/commands/spec-start.md +29 -0
  289. package/presets/cursor/nuxt/commands/task-continue.md +6 -3
  290. package/presets/cursor/nuxt/rules/README.md +3 -1
  291. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +2 -0
  292. package/presets/cursor/nuxt/rules/feature-delivery-workflow.mdc +4 -0
  293. package/presets/cursor/nuxt/rules/product-specs-authoring.mdc +123 -0
  294. package/presets/cursor/nuxt/rules/product-specs.mdc +64 -0
  295. package/presets/cursor/nuxt/skills/feature-delivery/SKILL.md +4 -3
  296. package/presets/cursor/nuxt/skills/spec-authoring/SKILL.md +26 -0
  297. package/presets/cursor/php-hexagonal/agents/build-verifier.md +3 -0
  298. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
  299. package/presets/cursor/php-hexagonal/agents/feature-developer.md +7 -0
  300. package/presets/cursor/php-hexagonal/agents/task-analyst.md +19 -0
  301. package/presets/cursor/php-hexagonal/agents/task-router.md +11 -0
  302. package/presets/cursor/php-hexagonal/agents/tech-writer.md +5 -0
  303. package/presets/cursor/php-hexagonal/commands/feature-continue.md +4 -0
  304. package/presets/cursor/php-hexagonal/commands/feature-start.md +8 -0
  305. package/presets/cursor/php-hexagonal/commands/spec-start.md +29 -0
  306. package/presets/cursor/php-hexagonal/commands/task-continue.md +6 -3
  307. package/presets/cursor/php-hexagonal/rules/README.md +4 -1
  308. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -0
  309. package/presets/cursor/php-hexagonal/rules/feature-delivery-workflow.mdc +4 -0
  310. package/presets/cursor/php-hexagonal/rules/product-specs-authoring.mdc +123 -0
  311. package/presets/cursor/php-hexagonal/rules/product-specs.mdc +65 -0
  312. package/presets/cursor/php-hexagonal/skills/feature-delivery/SKILL.md +5 -4
  313. package/presets/cursor/php-hexagonal/skills/spec-authoring/SKILL.md +26 -0
  314. package/presets/cursor/php-laravel/agents/build-verifier.md +3 -0
  315. package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
  316. package/presets/cursor/php-laravel/agents/feature-developer.md +7 -0
  317. package/presets/cursor/php-laravel/agents/task-analyst.md +19 -0
  318. package/presets/cursor/php-laravel/agents/task-router.md +11 -0
  319. package/presets/cursor/php-laravel/agents/tech-writer.md +5 -0
  320. package/presets/cursor/php-laravel/commands/feature-continue.md +4 -0
  321. package/presets/cursor/php-laravel/commands/feature-start.md +8 -0
  322. package/presets/cursor/php-laravel/commands/spec-start.md +29 -0
  323. package/presets/cursor/php-laravel/commands/task-continue.md +6 -3
  324. package/presets/cursor/php-laravel/rules/README.md +4 -1
  325. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -0
  326. package/presets/cursor/php-laravel/rules/feature-delivery-workflow.mdc +4 -0
  327. package/presets/cursor/php-laravel/rules/product-specs-authoring.mdc +123 -0
  328. package/presets/cursor/php-laravel/rules/product-specs.mdc +65 -0
  329. package/presets/cursor/php-laravel/skills/feature-delivery/SKILL.md +5 -4
  330. package/presets/cursor/php-laravel/skills/spec-authoring/SKILL.md +26 -0
  331. package/presets/cursor/svelte/agents/build-verifier.md +3 -0
  332. package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
  333. package/presets/cursor/svelte/agents/feature-developer.md +7 -0
  334. package/presets/cursor/svelte/agents/task-analyst.md +19 -0
  335. package/presets/cursor/svelte/agents/task-router.md +11 -0
  336. package/presets/cursor/svelte/agents/tech-writer.md +5 -0
  337. package/presets/cursor/svelte/commands/feature-continue.md +4 -0
  338. package/presets/cursor/svelte/commands/feature-start.md +8 -0
  339. package/presets/cursor/svelte/commands/spec-start.md +29 -0
  340. package/presets/cursor/svelte/commands/task-continue.md +6 -3
  341. package/presets/cursor/svelte/rules/README.md +3 -1
  342. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +2 -0
  343. package/presets/cursor/svelte/rules/feature-delivery-workflow.mdc +4 -0
  344. package/presets/cursor/svelte/rules/product-specs-authoring.mdc +123 -0
  345. package/presets/cursor/svelte/rules/product-specs.mdc +64 -0
  346. package/presets/cursor/svelte/skills/feature-delivery/SKILL.md +4 -3
  347. package/presets/cursor/svelte/skills/spec-authoring/SKILL.md +26 -0
@@ -6,10 +6,11 @@ description: Delivers Laravel backend features end-to-end across routes, Form Re
6
6
  # Feature Delivery (Laravel)
7
7
 
8
8
  1. Read brief, AC, and decomposition.
9
- 2. Follow `feature-delivery-workflow.mdc` + `reference-features.mdc`: routes Form Request/Policy Action/Service Eloquent Controller/Resource optional Job/Event tests.
10
- 3. Wire bindings only in Service Providers when needed.
11
- 4. Add Feature tests for HTTP/DB paths; Unit tests for non-trivial Actions.
12
- 5. After PHP edits: **invoke** `post-change-test.mdc` (+ `php-tooling.mdc`) `php artisan test` / `composer test`.
9
+ 2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss — do not invent behavior). If generation was requested but not yet approved, stop for human gate do not implement against draft-only gaps.
10
+ 3. Follow `feature-delivery-workflow.mdc` + `reference-features.mdc`: routes → Form Request/Policy → Action/Service Eloquent → Controller/Resource → optional Job/Event → tests.
11
+ 4. Wire bindings only in Service Providers when needed.
12
+ 5. Add Feature tests for HTTP/DB paths; Unit tests for non-trivial Actions.
13
+ 6. After PHP edits: **invoke** `post-change-test.mdc` (+ `php-tooling.mdc`) → `php artisan test` / `composer test`.
13
14
 
14
15
  ## Do / Don't
15
16
 
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: spec-authoring
3
+ description: Author or bootstrap consumer docs/specs (INDEX, page/feature templates, frontmatter v1). Use with task-analyst author mode, /spec-start, or when brief AC requests Generate/Bootstrap.
4
+ ---
5
+
6
+ # Spec authoring
7
+
8
+ Requestable — not always-on. Load **`product-specs`** + **`product-specs-authoring`** first.
9
+
10
+ ## Steps
11
+
12
+ 1. **Resolve mode** — Generate (tree exists) vs Bootstrap (create INDEX + templates + first spec). Refuse inventing INDEX without explicit intent/AC/`/spec-start`.
13
+ 2. **Ensure templates** — if consumer `docs/specs/_templates/` missing, copy from package SoT `presets/_shared/assets/docs-specs/_templates/` (or seeded init assets).
14
+ 3. **Fill frontmatter v1** — all array keys present (may be `[]`); prefer `type: feature` on backend/MCP; default `status: draft`.
15
+ 4. **Fill required body headings** — page: Overview, Entry/actors, Primary flows, States, Acceptance criteria; feature: Overview, Shared behavior/constraints, Related pages. Use `N/A` explicitly when needed.
16
+ 5. **Update INDEX** in the **same change set** (columns: id, type, domain, title, path, optional routes/aliases/status).
17
+ 6. **Self-check** against `product-specs-authoring` checklist; put blockers in `open_questions`.
18
+ 7. **Handoff** — list created/updated paths + INDEX diff for human gate (`after:task-analyst`). Approve before feature-developer.
19
+
20
+ ## Sources
21
+
22
+ Cite AC / user / Figma / labeled code inference. Do not invent product behavior.
23
+
24
+ ## mcp-ts
25
+
26
+ Analyst-only path (no tech-writer). `routes` = tool names; `ui`/`store` = `[]`.
@@ -45,6 +45,9 @@ When validating **preset packaging** changes (paths under `packages/ai-rules/pre
45
45
  11. **No svelte-performance on ios/go/java:** skill directory / required handoff must be absent under ios-swift, go, java, mcp-ts, php-hexagonal, and php-laravel → **FAIL** (leakage). Prefer `check:preset-leakage`.
46
46
  12. **Rule eval (WARN):** `scripts/check-rule-eval.mjs` / `yarn check:rule-eval` should exist for maintainers; smoke optional. Hard fail only when the opt-in eval job runs — not part of default `check:preset-structure`.
47
47
 
48
+ 13. **Product-specs assets (FAIL):** package must ship `presets/_shared/assets/docs-specs/INDEX.md`, `_templates/page.md`, `_templates/feature.md`. Cursor+Claude twins for `product-specs` and `product-specs-authoring` must embed matching shared-core markers; both stems **requestable** (`alwaysApply: false` / Claude `paths: docs/specs/**`) — never session-start.
49
+ 14. **Optional consumer check (WARN default):** `scripts/check-product-specs.sh` + schema stub may exist for opt-in consumer CI; **FAIL** only with `--strict` or AC that requires named specs — do not force consumer CI.
50
+
48
51
  ### Soft notes
49
52
 
50
53
  - Thin aliases may be <15 body lines.
@@ -22,6 +22,8 @@ Apply the **`code-review` skill** and **`rules/tooling-and-review/code-review-mr
22
22
 
23
23
  ## Review artifact
24
24
 
25
+ - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
26
+
25
27
  Write `.claude/team/tasks/<slug>/review.md` with this format:
26
28
 
27
29
  ```markdown
@@ -51,6 +51,13 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
51
51
 
52
52
  - When editing `pages|components|stores|api|src/lib/**/*.{svelte,ts}`, load / follow rule `svelte-sveltekit-anti-hallucination`.
53
53
 
54
+ ## Product specs (docs/specs)
55
+
56
+ When work touches a page/feature/route/alias: if `docs/specs/INDEX.md` exists (or brief lists approved specs), load **`product-specs`** and treat **approved** specs from brief/handoff as **behavior SoT**. Soft-fail on miss (`open_questions` + code / `.ai/context` fallback); **never invent** product behavior.
57
+
58
+ Mechanical INDEX/frontmatter fixes only when implementation renames routes/ids. Substantive behavior edits → hand back to task-analyst (or tech-writer where present). If INDEX is absent and generation was not approved, treat specs as optional (greenfield).
59
+
60
+
54
61
  ## Artifact contract
55
62
 
56
63
  - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
@@ -101,6 +101,25 @@ Do not invoke the developer or any implementation subagent.
101
101
 
102
102
  - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
103
103
 
104
+ ## Product specs (docs/specs)
105
+
106
+ **Consume (default):** When work touches a page/feature/route/alias and `docs/specs/INDEX.md` exists, load **`product-specs`**, resolve the linked page/feature spec, and cite it under **Related specs** in `brief.md`. Soft-fail on miss (`open_questions` + code / `.ai/context` fallback); **never invent** product behavior. If INDEX is absent, treat specs as optional unless author mode applies.
107
+
108
+ **Author mode (Generate / Bootstrap):** When the user runs `/spec-start`, router intent is `spec-gen` / bootstrap, or brief/AC requests generation: load **`product-specs`** + **`product-specs-authoring`** and skill **`spec-authoring`**. You are the **primary author** (INDEX bootstrap included). Follow frontmatter v1 + required headings; update INDEX in the **same change set**; default `status: draft`. Block handoff via `open_questions` until the authoring self-check passes.
109
+
110
+ ### Brief sections (when author mode or INDEX exists)
111
+
112
+ Add to `brief.md`:
113
+
114
+ ```markdown
115
+ ## Related specs
116
+ - path or id (or N/A)
117
+
118
+ ## Spec gaps / generation requested
119
+ - [ ] none | generate | bootstrap — sources: …
120
+ ```
121
+
122
+
104
123
  ## Artifact contract
105
124
 
106
125
  - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
@@ -129,6 +129,17 @@ Write `.claude/team/tasks/<slug>/pipeline.json` and initialize the routing entry
129
129
 
130
130
  Do not invoke implementation agents yourself.
131
131
 
132
+ ## Spec generation intents
133
+
134
+ Detect and set routing reasons when the user asks to **generate / bootstrap product specs**, mentions `docs/specs`, or runs `/spec-start`:
135
+
136
+ | Signal | Intent | Steps |
137
+ |--------|--------|-------|
138
+ | `/spec-start`, "bootstrap docs/specs", "generate product spec" | `spec-gen` | task-analyst (**author mode**) → human gate → stop (or continue to feature-developer only if implement-after) |
139
+ | Feature/task with AC "generate specs" / missing INDEX + bootstrap AC | `spec-gen` inside feature profile | task-analyst author mode first; **not** a separate agent step |
140
+
141
+ Do **not** add a dedicated `spec-author` agent. Do not require solution-architect for routine spec authoring.
142
+
132
143
  ## Runtime initialization
133
144
 
134
145
  Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
@@ -42,6 +42,11 @@ Conventional commit / release note snippet.
42
42
  - Do not duplicate entire decomposition — summarize outcomes and how to use/extend.
43
43
  - May create or update files under `docs/**` when the task explicitly requests it; otherwise keep primary output in team artifacts.
44
44
 
45
+ ## Product specs (docs/specs)
46
+
47
+ Post-delivery: when behavior or public docs changed and `docs/specs/` is in play, load **`product-specs`** (+ **`product-specs-authoring`** if updating specs). Sync page/feature specs + INDEX in the **same change set**. **Never invent** product behavior without AC/code source; label inferred lines `status: draft`. Soft-fail on miss; no-op if INDEX absent and sync not requested.
48
+
49
+
45
50
  ## Artifact contract
46
51
 
47
52
  - **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and available architecture/migration/review artifacts.
@@ -17,3 +17,7 @@ Continue after a human gate. Full logic — in **`task-continue.md`**.
17
17
  4. The hook continues the chain when `autoChain: true`.
18
18
 
19
19
  See `task-continue.md` for details and the handoff table.
20
+
21
+ ## Product specs (docs/specs)
22
+
23
+ When the next agent is **feature-developer** (or other implementer): if `docs/specs/INDEX.md` exists, instruct them to load **`product-specs`** and honor **Related specs** from `brief.md` (behavior SoT). Soft-fail on miss; never invent product behavior. No-op if INDEX is absent.
@@ -19,11 +19,19 @@ Starts the **analysis phase** without the router. The parent agent acts as orche
19
19
  6. Invoke subagent **task-analyst** (Task tool) with the full task description and artifact paths.
20
20
  7. Wait for the analyst to finish. **Do not invoke the developer** at this stage.
21
21
 
22
+ ## Product specs (docs/specs)
23
+
24
+ When invoking **task-analyst**: if `docs/specs/INDEX.md` exists, instruct consume via **`product-specs`** and cite **Related specs**. Soft-fail on miss; never invent behavior.
25
+
26
+ If the user/AC requests generation or bootstrap, or INDEX is missing **with** bootstrap AC / `/spec-start` intent: instruct **author mode** inside the same analyst step — load **`product-specs-authoring`** + skill **`spec-authoring`**. Authoring is **not** a separate pipeline agent. Handoff must list created paths + INDEX diff; human gate must approve generated specs before feature-developer.
27
+
28
+
22
29
  ## Human gate
23
30
 
24
31
  After the analyst:
25
32
 
26
33
  - Show the user links to `brief.md` and `decomposition.md`.
34
+ - Also ask them to check **Related specs** in `brief.md` when `docs/specs/INDEX.md` exists.
27
35
  - Ask them to review and approve or send edits.
28
36
  - To continue: `/task-continue <slug>` or `/feature-continue <slug>`.
29
37
 
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: spec-start
3
+ description: Bootstrap or generate docs/specs (INDEX + page/feature) via task-analyst author mode. Optional docs-only path with human gate.
4
+ ---
5
+
6
+ # Spec start — generate / bootstrap product specs
7
+
8
+ Routes intent **`spec-gen`** (or bootstrap) → **task-analyst** in **author mode** → human gate (`after:task-analyst`) → stop, or continue to feature-developer if the user asked to implement after.
9
+
10
+ ## What to do
11
+
12
+ 1. Extract description from arguments after `/spec-start` (domain, page/feature ids, sources).
13
+ 2. Generate a **slug** (kebab-case, ≤48 chars), e.g. `spec-<domain>-<id>`.
14
+ 3. Ensure `.claude/team/tasks/<slug>/` exists (Write artifacts; not Shell mkdir).
15
+ 4. Write `.claude/team/active-task.json` → `{ "slug": "<slug>" }`.
16
+ 5. Write minimal `pipeline.json`: task-analyst → (optional stop) → feature-developer only if user asked implement-after. **No separate spec-author agent.**
17
+ 6. Invoke **task-analyst** with: author mode; load **`product-specs`** + **`product-specs-authoring`** + skill **`spec-authoring`**; Bootstrap if `docs/specs/` absent, else Generate.
18
+ 7. Wait for analyst. **Do not** invoke feature-developer until human gate passes.
19
+
20
+ ## Human gate
21
+
22
+ - Show created/updated spec paths and INDEX diff.
23
+ - Ask user to approve drafts (`status: draft` → promote) or send edits.
24
+ - Continue: `/task-continue <slug>` only after approval when implementation follows; otherwise stop after docs.
25
+
26
+ ## Notes
27
+
28
+ - Greenfield invent of INDEX is allowed **only** via this command, explicit ask, or AC bootstrap language.
29
+ - mcp-ts: analyst-only author/sync (no tech-writer).
@@ -40,11 +40,14 @@ printf '%s\n' '{"status":"completed","action":"end_human_gate","activateNext":tr
40
40
 
41
41
  | Agent | Read |
42
42
  |-------|------|
43
- | feature-developer | brief.md, decomposition.md, validation-report.md (if retry), review.md (if retry), architecture.md |
43
+ | feature-developer | brief.md (incl. **Related specs**), decomposition.md, validation-report.md (if retry), review.md (if retry), architecture.md; if `docs/specs/INDEX.md` exists → load **`product-specs`** |
44
44
  | build-verifier | git diff, decomposition.md |
45
45
  | code-reviewer | brief.md, validation-report.md, git diff |
46
46
  | qa-tester | brief.md, decomposition.md, scope from pipeline step |
47
47
 
48
- ## Metrics
48
+ ## Product specs (docs/specs)
49
+
50
+ When the next agent is **feature-developer** (or other implementer): if `docs/specs/INDEX.md` exists or brief lists approved specs, instruct them to load **`product-specs`** and honor **Related specs** / approved generated specs as behavior SoT. Soft-fail on miss; never invent product behavior.
51
+
52
+ If analyst ran **author mode**, confirm human approved drafts before developer. Pass spec paths + INDEX diff in the handoff. No-op if INDEX is absent and no approved specs.
49
53
 
50
- On human-gate resume, the hook action above appends `human_gate_ended` under the per-task lock **before** any new `attempt_started`. Agents must not calculate durations.
@@ -38,6 +38,8 @@ In Claude Code all `.md` under `rules/` are **discovered recursively**. Bodies a
38
38
  | `architecture-boundaries-ui.mdc` | `architecture/architecture-boundaries-ui.md` |
39
39
  | `feature-delivery-workflow.mdc` | `architecture/feature-delivery-workflow.md` |
40
40
  | `reference-features.mdc` | `architecture/reference-features.md` |
41
+ | `product-specs.mdc` | `architecture/product-specs.md` |
42
+ | `product-specs-authoring.mdc` | `architecture/product-specs-authoring.md` | Generate/Bootstrap; requestable |
41
43
  | `public-imports.mdc` | `architecture/public-imports.md` |
42
44
  | `layer-barrel-exports.mdc` | `architecture/layer-barrel-exports.md` |
43
45
  | `api-services.mdc` | `api-and-data/api-services.md` |
@@ -73,6 +75,7 @@ In Claude Code all `.md` under `rules/` are **discovered recursively**. Bodies a
73
75
  | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin alias |
74
76
  | `architecture/feature-delivery-workflow.md` | `feature-delivery-workflow.mdc` | SvelteKit layer checklist |
75
77
  | `architecture/reference-features.template.md` | `reference-features.mdc` | path table |
78
+ | `architecture/product-specs.md` | `product-specs.mdc` | INDEX discovery; Stack notes |
76
79
  | `review/code-review-mr.md` | `code-review-mr.mdc` | SvelteKit checklist refs |
77
80
  | `review/technical-retro.md` | `technical-retro.mdc` | thin alias |
78
81
  | `meta/preset-*.md` | `preset-*.mdc` | author globs only |
@@ -59,3 +59,7 @@ Canonical paths: `src/routes/**`, `src/lib/{components,stores,api,clients,types}
59
59
  | `src/lib/components/**`, `src/routes/**` | `svelte-ui`, `no-rest-props-spread`, `public-imports` |
60
60
  | `src/lib/types/**` | `public-imports`, `types-jsdoc`, `layer-barrel-exports` |
61
61
  | `tests/e2e/**` | `tests-e2e-structure`, `playwright-agents` |
62
+
63
+ ## Related
64
+
65
+ - Product behavior discovery: requestable **`product-specs`** (`docs/specs/INDEX.md`) — do not paste the discovery algorithm here.
@@ -0,0 +1,121 @@
1
+ ---
2
+ paths:
3
+ - docs/specs/**/*
4
+ ---
5
+
6
+ <!-- shared-core: architecture/product-specs-authoring.md -->
7
+
8
+ # Product specs authoring
9
+
10
+ Load when **Generate** or **Bootstrap** is requested (`/spec-start`, router `spec-gen`, brief AC, or analyst author mode). Discovery-only work stays on **`product-specs`**.
11
+
12
+ ## Modes
13
+
14
+ 1. **Consume** — default; never invent INDEX/specs (see `product-specs`).
15
+ 2. **Generate** — create/update page/feature specs + INDEX rows from brief AC, user intent, Figma, or code archaeology. Inventing *product* behavior is forbidden without a stated source (AC / user / UI copy / code-observed behavior labeled `status: draft` or `inferred`).
16
+ 3. **Bootstrap** — create `INDEX.md` + `_templates/` copies + first domain spec under greenfield policy.
17
+
18
+ ## Greenfield policy
19
+
20
+ Agents **may** create INDEX + first specs **only when** one of:
21
+
22
+ 1. User runs `/spec-start` or explicitly asks to bootstrap `docs/specs`.
23
+ 2. Brief/AC includes generation or bootstrap language.
24
+ 3. Router detects `spec-gen` intent.
25
+
26
+ Otherwise: missing INDEX → optional tree; do **not** invent INDEX merely because discovery loaded.
27
+
28
+ ## Conflict precedence
29
+
30
+ 1. **Human gate** decision (approved brief/spec edits).
31
+ 2. **Current task `brief.md` AC** — if AC contradicts an existing spec, analyst must reconcile (update spec as `draft` or revise AC) before developer; no silent contradiction.
32
+ 3. **Approved `docs/specs/**`** — behavior SoT for feature-developer once gate passed.
33
+ 4. **Code / `.ai/context`** — discovery evidence only; never override approved spec without gate.
34
+
35
+ Label inferred-from-code lines with `status: draft` until human promotes.
36
+
37
+ ## INDEX.md contract (v1)
38
+
39
+ | Column | Required | Notes |
40
+ |--------|----------|-------|
41
+ | `id` | yes | Stable kebab/id matching frontmatter `id` |
42
+ | `type` | yes | `page` \| `feature` |
43
+ | `domain` | yes | Domain folder under `docs/specs/domains/<domain>/` |
44
+ | `title` | yes | Human label |
45
+ | `path` | yes | Repo-relative path to markdown file |
46
+ | `routes` | no | Summary; may duplicate frontmatter |
47
+ | `aliases` | no | Comma-separated PageName / deep-link aliases |
48
+ | `status` | no | `draft` \| `active` \| `deprecated` |
49
+
50
+ Layout: `docs/specs/domains/<domain>/<id>.md` (page) and optional `docs/specs/domains/<domain>/feature.md`. Adding/renaming/removing a linked file **must** update INDEX in the **same change set**.
51
+
52
+ ## Frontmatter v1
53
+
54
+ | Field | Type | Required | Notes |
55
+ |-------|------|----------|-------|
56
+ | `id` | string | yes | Unique; matches INDEX |
57
+ | `type` | enum `page` \| `feature` | yes | Backend/MCP: prefer `feature` |
58
+ | `domain` | string | yes | |
59
+ | `routes` | string[] | yes (may be `[]`) | Web: URL paths; mobile: deep links/screens; backend: HTTP paths; mcp-ts: tool names |
60
+ | `ui` | string[] | yes (may be `[]`) | Component/screen refs; empty on backend/mcp |
61
+ | `store` | string[] | yes (may be `[]`) | Slice/module refs; empty when N/A |
62
+ | `api` | string[] | yes (may be `[]`) | Services/ports/tools |
63
+ | `aliases` | string[] | yes (may be `[]`) | |
64
+ | `e2e` | string[] | yes (may be `[]`) | Stack-appropriate test paths |
65
+ | `status` | enum | no | default `draft` on agent generate |
66
+ | `owners` | string[] | no | |
67
+ | `related` | string[] | no | Spec ids or paths |
68
+
69
+ Arrays are **always present** (empty allowed). Do not omit keys for N/A stacks.
70
+
71
+ ## Body headings (minimum)
72
+
73
+ **`page` required:** Overview; Entry / actors; Primary flows; States (loading / empty / error / success as applicable — mark N/A explicitly); Acceptance criteria (links or bullets to brief AC / product source).
74
+
75
+ **`page` optional:** Analytics, Accessibility, Edge cases, Related specs.
76
+
77
+ **`feature` required:** Overview; Shared behavior / constraints; Related pages (links).
78
+
79
+ **`feature` optional:** Cross-cutting states, Analytics.
80
+
81
+ Compliant = valid frontmatter + all required headings present (non-empty prose or explicit `N/A`) + INDEX row with resolvable `path`.
82
+
83
+ ## Templates & assets
84
+
85
+ **Package SoT:** `packages/ai-rules/presets/_shared/assets/docs-specs/` (`INDEX.md` stub, `_templates/page.md`, `_templates/feature.md`; optional `schemas/frontmatter-v1.schema.json`).
86
+
87
+ **CLI `init`:** when consumer `docs/specs/` is **absent**, copy INDEX stub + `_templates/*` (idempotent; **never overwrite** existing INDEX). When the tree already exists, skip seed entirely.
88
+
89
+ **Skill fallback:** if consumer `_templates/` missing during author mode, copy from package/skill assets before authoring.
90
+
91
+ ## Author roles
92
+
93
+ | Role | Responsibility |
94
+ |------|----------------|
95
+ | **task-analyst** | Primary author (Generate + Bootstrap); INDEX bootstrap; brief **Related specs** + **Spec gaps / generation requested**; loads this stem + skill `spec-authoring` |
96
+ | **tech-writer** | Post-delivery sync where present; never invent product behavior without AC/code source |
97
+ | **feature-developer** | Consumes approved specs as SoT; mechanical INDEX/frontmatter fixes only on renames |
98
+ | **mcp-ts** | No tech-writer — author + post-sync via **task-analyst** only |
99
+
100
+ ## Self-check before handoff (soft block)
101
+
102
+ Block handoff via `open_questions` until fixed:
103
+
104
+ - [ ] Required frontmatter keys present; arrays always present (may be `[]`)
105
+ - [ ] Required body headings present (or explicit `N/A`)
106
+ - [ ] INDEX row added/updated with resolvable `path` in the **same change set**
107
+ - [ ] Sources cited; invented product behavior absent (or labeled `draft` / `inferred`)
108
+ - [ ] Conflict with brief AC reconciled or flagged
109
+
110
+ ## Related
111
+
112
+ - `product-specs` — discovery / consume
113
+ - Skill `spec-authoring` — procedural checklist
114
+ - Optional consumer script `scripts/check-product-specs.sh` (WARN default; `--strict` FAIL)
115
+
116
+
117
+ ## Stack notes
118
+
119
+ - Author via skill `spec-authoring`; templates from package assets / consumer `docs/specs/_templates/`.
120
+ - Field semantics match discovery stem (`routes` = URL paths; `e2e` = Playwright).
121
+ - Requestable — not always-on / session-start.
@@ -0,0 +1,62 @@
1
+ ---
2
+ paths:
3
+ - docs/specs/**/*
4
+ ---
5
+
6
+ <!-- shared-core: architecture/product-specs.md -->
7
+
8
+ # Product specs (docs/specs)
9
+
10
+ Product page/feature **behavior** specs live under the consumer repo `docs/specs/**`. This stem covers **discovery and presence** — not layer implementation order (see `feature-delivery-workflow`) and not code-structure mirroring (see `reference-features`).
11
+
12
+ **Authoring** (Generate / Bootstrap modes, INDEX/frontmatter v1, body checklist, greenfield, conflict precedence) → load **`product-specs-authoring`** when generation is requested (`/spec-start`, brief AC, or router `spec-gen`).
13
+
14
+ ## Modes (summary)
15
+
16
+ | Mode | When | Behavior |
17
+ |------|------|----------|
18
+ | **Consume** (default) | INDEX exists or globs hit `docs/specs/**` without generate intent | Discover via INDEX; soft-fail on miss; **never invent** INDEX/specs |
19
+ | **Generate** | Explicit generate intent / AC / `/spec-start` with existing tree | Create/update page/feature specs + INDEX from stated sources |
20
+ | **Bootstrap** | Explicit bootstrap / `/spec-start` when tree absent | Create INDEX + templates + first domain spec |
21
+
22
+ Greenfield: agents may create INDEX/specs **only** on explicit intent, AC, or `/spec-start`. Missing INDEX alone does **not** authorize inventing the tree.
23
+
24
+ ## Presence policy
25
+
26
+ - If `docs/specs/INDEX.md` is **missing** → the tree is **optional** (greenfield OK for *consume*). Continue with code/brief discovery; do not invent an INDEX solely because this stem loaded.
27
+ - If INDEX **exists** → it is the **required discovery path** for work that touches a listed page, feature, route, or alias.
28
+
29
+ ## Discovery algorithm
30
+
31
+ 1. Always start at `docs/specs/INDEX.md` when present.
32
+ 2. Resolve the entry by: route, stable `id`, PageName / alias, or domain folder.
33
+ 3. Read the linked page spec (and optional domain `feature.md` when the INDEX or page Related links it).
34
+
35
+ ## Miss policy (INDEX present, row or file missing)
36
+
37
+ - Record the gap in `open_questions` / handoff gaps.
38
+ - Fall back to code discovery and consumer `.ai/context/**` when present.
39
+ - **Do not invent** product behavior, states, interactions, or contracts.
40
+ - Hard-fail / block only when the task’s acceptance criteria explicitly require a named spec that is absent (human/gate decision).
41
+
42
+ ## Authoring pointer
43
+
44
+ Same-changeset INDEX updates, frontmatter v1, required body headings, templates, and conflict precedence live in **`product-specs-authoring`**. Do not paste the full checklist here.
45
+
46
+ ## Non-goals
47
+
48
+ - Not a replacement for `.ai/context/**` (external AI Code Review glossary) or `reference-features` (file-layout mirror).
49
+ - Not Tessl / an external host as primary SoT.
50
+ - No stack filesystem path recipes in this core body — path examples belong only in adapter **Stack notes**.
51
+
52
+ ## Related
53
+
54
+ - `product-specs-authoring` — generation modes, contracts, self-check.
55
+ - `reference-features` — code structure mirror (how to layout files), not product behavior.
56
+ - Consumer `.ai/context/**` when present — review/domain glossary; cross-link, do not replace.
57
+
58
+
59
+ ## Stack notes
60
+
61
+ - `routes`: SvelteKit URL paths. `ui` / `store`: routes/components + store modules. `e2e`: Playwright paths under repo `tests/e2e/**` (or equivalent).
62
+ - Requestable / `docs/specs/**` globs — not always-on / session-start.
@@ -54,6 +54,8 @@ Work request without `/task` — see **`agent-team-intake.md`** (when to suggest
54
54
 
55
55
  Full prompts: `.claude/agents/*.md`. Artifact conventions: `.claude/team/README.md`; schema SoT: **agent-artifact-contracts**.
56
56
 
57
+ **Product specs:** When `/task`, `/feature-start`, or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
58
+
57
59
  When editing `packages/ai-rules/presets/**`, follow **`preset-pr-checklist.mdc`** (+ twin-sync / layering / token-budget / leakage meta-rules).
58
60
 
59
61
  ## Dynamic pipeline
@@ -6,9 +6,10 @@ description: Delivers SvelteKit frontend features end-to-end across domain types
6
6
  # Feature Delivery
7
7
 
8
8
  1. Read task brief, acceptance criteria, and decomposition if present.
9
- 2. Read **`feature-delivery-workflow`** and **`reference-features`**follow layer order and mirror closest reference feature.
10
- 3. Add or update focused tests for changed behavior.
11
- 4. Validation from SvelteKit root: **invoke** **`post-change-lint`** after code edits (requestable, not always-on — but **must** when code changed). Pipeline: scoped lint OK if next step is `build-verifier`.
9
+ 2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss do not invent behavior). If generation was requested but not yet approved, stop for human gate — do not implement against draft-only gaps.
10
+ 3. Read **`feature-delivery-workflow`** and **`reference-features`** follow layer order and mirror closest reference feature.
11
+ 4. Add or update focused tests for changed behavior.
12
+ 5. Validation from SvelteKit root: **invoke** **`post-change-lint`** after code edits (requestable, not always-on — but **must** when code changed). Pipeline: scoped lint OK if next step is `build-verifier`.
12
13
 
13
14
  ## Scope discipline
14
15
 
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: spec-authoring
3
+ description: Author or bootstrap consumer docs/specs (INDEX, page/feature templates, frontmatter v1). Use with task-analyst author mode, /spec-start, or when brief AC requests Generate/Bootstrap.
4
+ ---
5
+
6
+ # Spec authoring
7
+
8
+ Requestable — not always-on. Load **`product-specs`** + **`product-specs-authoring`** first.
9
+
10
+ ## Steps
11
+
12
+ 1. **Resolve mode** — Generate (tree exists) vs Bootstrap (create INDEX + templates + first spec). Refuse inventing INDEX without explicit intent/AC/`/spec-start`.
13
+ 2. **Ensure templates** — if consumer `docs/specs/_templates/` missing, copy from package SoT `presets/_shared/assets/docs-specs/_templates/` (or seeded init assets).
14
+ 3. **Fill frontmatter v1** — all array keys present (may be `[]`); prefer `type: feature` on backend/MCP; default `status: draft`.
15
+ 4. **Fill required body headings** — page: Overview, Entry/actors, Primary flows, States, Acceptance criteria; feature: Overview, Shared behavior/constraints, Related pages. Use `N/A` explicitly when needed.
16
+ 5. **Update INDEX** in the **same change set** (columns: id, type, domain, title, path, optional routes/aliases/status).
17
+ 6. **Self-check** against `product-specs-authoring` checklist; put blockers in `open_questions`.
18
+ 7. **Handoff** — list created/updated paths + INDEX diff for human gate (`after:task-analyst`). Approve before feature-developer.
19
+
20
+ ## Sources
21
+
22
+ Cite AC / user / Figma / labeled code inference. Do not invent product behavior.
23
+
24
+ ## mcp-ts
25
+
26
+ Analyst-only path (no tech-writer). `routes` = tool names; `ui`/`store` = `[]`.
@@ -65,3 +65,6 @@ Write the owned validation receipt (`completed` or `validation_failed`). Do not
65
65
  - **Owned outputs:** `validation-report.md`; upsert only the assigned manifest entry; preserve foreign entries.
66
66
  - **Terminal receipt:** cover applicable AC/task IDs; emit `completed` or `validation_failed`.
67
67
  - **Shared state:** never mutate `status.json` or `metrics.json`.
68
+
69
+ 13. **Product-specs assets (FAIL):** package must ship `presets/_shared/assets/docs-specs/INDEX.md`, `_templates/page.md`, `_templates/feature.md`. Cursor+Claude twins for `product-specs` and `product-specs-authoring` must embed matching shared-core markers; both stems **requestable** (`alwaysApply: false` / Claude `paths: docs/specs/**`) — never session-start.
70
+ 14. **Optional consumer check (WARN default):** `scripts/check-product-specs.sh` + schema stub may exist for opt-in consumer CI; **FAIL** only with `--strict` or AC that requires named specs — do not force consumer CI.
@@ -18,6 +18,8 @@ Apply the **`code-review` skill** and `code-review-mr.mdc` checklist. Also weigh
18
18
 
19
19
  ## Review focus (Android)
20
20
 
21
+ - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
22
+
21
23
  - **Layers:** View does not call API / know DTO; ViewModel does not depend on Data implementations; Domain has no Jetpack Compose/Android View system; Data does not pull Presentation.
22
24
  - **DI / modules:** composition root in `applications/`; protocol-based dependencies; no deep-imports across Features; Gradle modules public API when relevant (`module-public-api.mdc`).
23
25
  - **Kotlin concurrency:** `main-safe / viewModelScope` on UI surfaces; typed errors; no unjustified `!!`; Task cancellation where needed (`kotlin-conventions.mdc`).
@@ -55,6 +55,13 @@ Emit the owned implementation receipt with outcome `completed`. Handoff by layer
55
55
 
56
56
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
57
57
 
58
+ ## Product specs (docs/specs)
59
+
60
+ When work touches a page/feature/route/alias: if `docs/specs/INDEX.md` exists (or brief lists approved specs), load **`product-specs`** and treat **approved** specs from brief/handoff as **behavior SoT**. Soft-fail on miss (`open_questions` + code / `.ai/context` fallback); **never invent** product behavior.
61
+
62
+ Mechanical INDEX/frontmatter fixes only when implementation renames routes/ids. Substantive behavior edits → hand back to task-analyst (or tech-writer where present). If INDEX is absent and generation was not approved, treat specs as optional (greenfield).
63
+
64
+
58
65
  ## Artifact contract
59
66
 
60
67
  - **Authoritative inputs:** read `.cursor/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
@@ -28,6 +28,25 @@ Do not invent architecture or persistence stacks — frame “as in the repo”.
28
28
 
29
29
  - Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit — only when decomposing refactor/architecture tasks (not default).
30
30
 
31
+ ## Product specs (docs/specs)
32
+
33
+ **Consume (default):** When work touches a page/feature/route/alias and `docs/specs/INDEX.md` exists, load **`product-specs`**, resolve the linked page/feature spec, and cite it under **Related specs** in `brief.md`. Soft-fail on miss (`open_questions` + code / `.ai/context` fallback); **never invent** product behavior. If INDEX is absent, treat specs as optional unless author mode applies.
34
+
35
+ **Author mode (Generate / Bootstrap):** When the user runs `/spec-start`, router intent is `spec-gen` / bootstrap, or brief/AC requests generation: load **`product-specs`** + **`product-specs-authoring`** and skill **`spec-authoring`**. You are the **primary author** (INDEX bootstrap included). Follow frontmatter v1 + required headings; update INDEX in the **same change set**; default `status: draft`. Block handoff via `open_questions` until the authoring self-check passes.
36
+
37
+ ### Brief sections (when author mode or INDEX exists)
38
+
39
+ Add to `brief.md`:
40
+
41
+ ```markdown
42
+ ## Related specs
43
+ - path or id (or N/A)
44
+
45
+ ## Spec gaps / generation requested
46
+ - [ ] none | generate | bootstrap — sources: …
47
+ ```
48
+
49
+
31
50
  ## Artifact contract
32
51
 
33
52
  - **Authoritative inputs:** read `.cursor/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
@@ -91,6 +91,17 @@ Write `.cursor/team/tasks/<slug>/pipeline.json` and initialize the routing entry
91
91
 
92
92
  Intent + steps table + skipped + gates → invoke `steps[0].agent` (unless retro).
93
93
 
94
+ ## Spec generation intents
95
+
96
+ Detect and set routing reasons when the user asks to **generate / bootstrap product specs**, mentions `docs/specs`, or runs `/spec-start`:
97
+
98
+ | Signal | Intent | Steps |
99
+ |--------|--------|-------|
100
+ | `/spec-start`, "bootstrap docs/specs", "generate product spec" | `spec-gen` | task-analyst (**author mode**) → human gate → stop (or continue to feature-developer only if implement-after) |
101
+ | Feature/task with AC "generate specs" / missing INDEX + bootstrap AC | `spec-gen` inside feature profile | task-analyst author mode first; **not** a separate agent step |
102
+
103
+ Do **not** add a dedicated `spec-author` agent. Do not require solution-architect for routine spec authoring.
104
+
94
105
  ## Runtime initialization
95
106
 
96
107
  Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
@@ -48,6 +48,11 @@ Conventional commit / release note snippet.
48
48
 
49
49
  Write the owned terminal receipt described under **Artifact contract**.
50
50
 
51
+ ## Product specs (docs/specs)
52
+
53
+ Post-delivery: when behavior or public docs changed and `docs/specs/` is in play, load **`product-specs`** (+ **`product-specs-authoring`** if updating specs). Sync page/feature specs + INDEX in the **same change set**. **Never invent** product behavior without AC/code source; label inferred lines `status: draft`. Soft-fail on miss; no-op if INDEX absent and sync not requested.
54
+
55
+
51
56
  ## Artifact contract
52
57
 
53
58
  - **Authoritative inputs:** read `.cursor/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, and other authoritative prior artifacts for this step.
@@ -17,3 +17,7 @@ Continue after a human gate. Full logic is in **`task-continue.md`**.
17
17
  4. The hook continues the chain when `autoChain: true`.
18
18
 
19
19
  See `task-continue.md` for details and the handoff table.
20
+
21
+ ## Product specs (docs/specs)
22
+
23
+ When the next agent is **feature-developer** (or other implementer): if `docs/specs/INDEX.md` exists, instruct them to load **`product-specs`** and honor **Related specs** from `brief.md` (behavior SoT). Soft-fail on miss; never invent product behavior. No-op if INDEX is absent.
@@ -19,11 +19,19 @@ Starts the **analysis phase** without the router. The parent agent acts as orche
19
19
  6. Invoke subagent **task-analyst** (Task tool) with the full task description and artifact paths.
20
20
  7. Wait for the analyst to finish. **Do not invoke developer** at this stage.
21
21
 
22
+ ## Product specs (docs/specs)
23
+
24
+ When invoking **task-analyst**: if `docs/specs/INDEX.md` exists, instruct consume via **`product-specs`** and cite **Related specs**. Soft-fail on miss; never invent behavior.
25
+
26
+ If the user/AC requests generation or bootstrap, or INDEX is missing **with** bootstrap AC / `/spec-start` intent: instruct **author mode** inside the same analyst step — load **`product-specs-authoring`** + skill **`spec-authoring`**. Authoring is **not** a separate pipeline agent. Handoff must list created paths + INDEX diff; human gate must approve generated specs before feature-developer.
27
+
28
+
22
29
  ## Human gate
23
30
 
24
31
  After the analyst:
25
32
 
26
33
  - Show the user links to `brief.md` and `decomposition.md`.
34
+ - Also ask them to check **Related specs** in `brief.md` when `docs/specs/INDEX.md` exists.
27
35
  - Ask them to review and approve or send edits.
28
36
  - To continue: `/task-continue <slug>` or `/feature-continue <slug>`.
29
37