@arimakouyou/spec-workflow-mcp 2.2.7

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 (472) hide show
  1. package/.claude-plugin/.mcp.json +8 -0
  2. package/.claude-plugin/agents/code-simplifier.md +80 -0
  3. package/.claude-plugin/agents/integ-test-auditor.md +91 -0
  4. package/.claude-plugin/agents/integ-test-worker.md +73 -0
  5. package/.claude-plugin/agents/parallel-worker.md +136 -0
  6. package/.claude-plugin/agents/review-worker.md +279 -0
  7. package/.claude-plugin/agents/unit-test-engineer.md +148 -0
  8. package/.claude-plugin/agents/wave-harness-worker.md +158 -0
  9. package/.claude-plugin/hooks/hooks.json +16 -0
  10. package/.claude-plugin/hooks/tasks-read-guard.sh +17 -0
  11. package/.claude-plugin/marketplace.json +33 -0
  12. package/.claude-plugin/plugin.json +11 -0
  13. package/.claude-plugin/rules/axum.md +154 -0
  14. package/.claude-plugin/rules/cargo-toml.md +63 -0
  15. package/.claude-plugin/rules/context7.md +17 -0
  16. package/.claude-plugin/rules/design-conformance.md +82 -0
  17. package/.claude-plugin/rules/design-principles.md +53 -0
  18. package/.claude-plugin/rules/diesel.md +176 -0
  19. package/.claude-plugin/rules/feedback-loop.md +33 -0
  20. package/.claude-plugin/rules/leptos.md +319 -0
  21. package/.claude-plugin/rules/project-architecture.md +134 -0
  22. package/.claude-plugin/rules/quality-checks.md +265 -0
  23. package/.claude-plugin/rules/rust-style.md +242 -0
  24. package/.claude-plugin/rules/security.md +67 -0
  25. package/.claude-plugin/rules/spec-workflow-enforcement.md +47 -0
  26. package/.claude-plugin/rules/valkey.md +167 -0
  27. package/.claude-plugin/skills/integration-test/SKILL.md +230 -0
  28. package/.claude-plugin/skills/integration-test/references/auditor-prompt.md +78 -0
  29. package/.claude-plugin/skills/integration-test/references/external-api-mock.md +98 -0
  30. package/.claude-plugin/skills/integration-test/references/fixture-catalog.md +155 -0
  31. package/.claude-plugin/skills/integration-test/references/parallel-execution.md +124 -0
  32. package/.claude-plugin/skills/integration-test/references/quality-gate.md +80 -0
  33. package/.claude-plugin/skills/integration-test/references/test-case-design.md +88 -0
  34. package/.claude-plugin/skills/integration-test/references/test-patterns.md +215 -0
  35. package/.claude-plugin/skills/integration-test/references/whiteboard-template.md +81 -0
  36. package/.claude-plugin/skills/integration-test/references/worker-prompt.md +70 -0
  37. package/.claude-plugin/skills/knowhow-capture/SKILL.md +143 -0
  38. package/.claude-plugin/skills/phase-review-team/SKILL.md +380 -0
  39. package/.claude-plugin/skills/spec-design/SKILL.md +282 -0
  40. package/.claude-plugin/skills/spec-e2e-implement/SKILL.md +259 -0
  41. package/.claude-plugin/skills/spec-impl-code/SKILL.md +101 -0
  42. package/.claude-plugin/skills/spec-impl-review/SKILL.md +115 -0
  43. package/.claude-plugin/skills/spec-impl-test-run/SKILL.md +98 -0
  44. package/.claude-plugin/skills/spec-impl-test-write/SKILL.md +121 -0
  45. package/.claude-plugin/skills/spec-implement/SKILL.md +822 -0
  46. package/.claude-plugin/skills/spec-requirements/SKILL.md +130 -0
  47. package/.claude-plugin/skills/spec-review/SKILL.md +274 -0
  48. package/.claude-plugin/skills/spec-tasks/SKILL.md +372 -0
  49. package/.claude-plugin/skills/spec-test-design/SKILL.md +233 -0
  50. package/.claude-plugin/skills/tdd-skills/SKILL.md +95 -0
  51. package/.claude-plugin/skills/tdd-skills/references/advanced-techniques.md +49 -0
  52. package/.claude-plugin/skills/tdd-skills/references/green-strategies.md +70 -0
  53. package/.claude-plugin/skills/tdd-skills/references/tdd-and-design.md +48 -0
  54. package/.claude-plugin/skills/tdd-skills/references/test-design.md +43 -0
  55. package/.claude-plugin/skills/tdd-skills/references/test-doubles.md +53 -0
  56. package/.claude-plugin/skills/tdd-skills/references/test-patterns.md +40 -0
  57. package/.claude-plugin/skills/tdd-skills-rust/SKILL.md +128 -0
  58. package/.claude-plugin/skills/tdd-skills-rust/references/advanced-techniques.md +205 -0
  59. package/.claude-plugin/skills/tdd-skills-rust/references/green-strategies.md +166 -0
  60. package/.claude-plugin/skills/tdd-skills-rust/references/tdd-and-design.md +215 -0
  61. package/.claude-plugin/skills/tdd-skills-rust/references/test-design.md +128 -0
  62. package/.claude-plugin/skills/tdd-skills-rust/references/test-doubles.md +208 -0
  63. package/.claude-plugin/skills/tdd-skills-rust/references/test-patterns.md +223 -0
  64. package/.claude-plugin/with-dashboard/.mcp.json +8 -0
  65. package/.claude-plugin/with-dashboard/plugin.json +10 -0
  66. package/CHANGELOG.md +1007 -0
  67. package/LICENSE +674 -0
  68. package/README.ja.md +380 -0
  69. package/README.md +437 -0
  70. package/dist/__tests__/config.test.d.ts +2 -0
  71. package/dist/__tests__/config.test.d.ts.map +1 -0
  72. package/dist/__tests__/config.test.js +264 -0
  73. package/dist/__tests__/config.test.js.map +1 -0
  74. package/dist/__tests__/index-args.test.d.ts +2 -0
  75. package/dist/__tests__/index-args.test.d.ts.map +1 -0
  76. package/dist/__tests__/index-args.test.js +43 -0
  77. package/dist/__tests__/index-args.test.js.map +1 -0
  78. package/dist/__tests__/index-entrypoint.test.d.ts +2 -0
  79. package/dist/__tests__/index-entrypoint.test.d.ts.map +1 -0
  80. package/dist/__tests__/index-entrypoint.test.js +23 -0
  81. package/dist/__tests__/index-entrypoint.test.js.map +1 -0
  82. package/dist/config.d.ts +26 -0
  83. package/dist/config.d.ts.map +1 -0
  84. package/dist/config.js +188 -0
  85. package/dist/config.js.map +1 -0
  86. package/dist/core/__tests__/git-utils.test.d.ts +2 -0
  87. package/dist/core/__tests__/git-utils.test.d.ts.map +1 -0
  88. package/dist/core/__tests__/git-utils.test.js +179 -0
  89. package/dist/core/__tests__/git-utils.test.js.map +1 -0
  90. package/dist/core/__tests__/mdx-validator.test.d.ts +2 -0
  91. package/dist/core/__tests__/mdx-validator.test.d.ts.map +1 -0
  92. package/dist/core/__tests__/mdx-validator.test.js +42 -0
  93. package/dist/core/__tests__/mdx-validator.test.js.map +1 -0
  94. package/dist/core/__tests__/path-utils.test.d.ts +2 -0
  95. package/dist/core/__tests__/path-utils.test.d.ts.map +1 -0
  96. package/dist/core/__tests__/path-utils.test.js +342 -0
  97. package/dist/core/__tests__/path-utils.test.js.map +1 -0
  98. package/dist/core/__tests__/project-registry.test.d.ts +2 -0
  99. package/dist/core/__tests__/project-registry.test.d.ts.map +1 -0
  100. package/dist/core/__tests__/project-registry.test.js +62 -0
  101. package/dist/core/__tests__/project-registry.test.js.map +1 -0
  102. package/dist/core/__tests__/security-utils.test.d.ts +2 -0
  103. package/dist/core/__tests__/security-utils.test.d.ts.map +1 -0
  104. package/dist/core/__tests__/security-utils.test.js +657 -0
  105. package/dist/core/__tests__/security-utils.test.js.map +1 -0
  106. package/dist/core/__tests__/task-parser.test.d.ts +2 -0
  107. package/dist/core/__tests__/task-parser.test.d.ts.map +1 -0
  108. package/dist/core/__tests__/task-parser.test.js +222 -0
  109. package/dist/core/__tests__/task-parser.test.js.map +1 -0
  110. package/dist/core/__tests__/task-validator.test.d.ts +2 -0
  111. package/dist/core/__tests__/task-validator.test.d.ts.map +1 -0
  112. package/dist/core/__tests__/task-validator.test.js +308 -0
  113. package/dist/core/__tests__/task-validator.test.js.map +1 -0
  114. package/dist/core/archive-service.d.ts +10 -0
  115. package/dist/core/archive-service.d.ts.map +1 -0
  116. package/dist/core/archive-service.js +99 -0
  117. package/dist/core/archive-service.js.map +1 -0
  118. package/dist/core/dashboard-session.d.ts +49 -0
  119. package/dist/core/dashboard-session.d.ts.map +1 -0
  120. package/dist/core/dashboard-session.js +132 -0
  121. package/dist/core/dashboard-session.js.map +1 -0
  122. package/dist/core/git-utils.d.ts +25 -0
  123. package/dist/core/git-utils.d.ts.map +1 -0
  124. package/dist/core/git-utils.js +87 -0
  125. package/dist/core/git-utils.js.map +1 -0
  126. package/dist/core/global-dir.d.ts +44 -0
  127. package/dist/core/global-dir.d.ts.map +1 -0
  128. package/dist/core/global-dir.js +74 -0
  129. package/dist/core/global-dir.js.map +1 -0
  130. package/dist/core/implementation-log-migrator.d.ts +41 -0
  131. package/dist/core/implementation-log-migrator.d.ts.map +1 -0
  132. package/dist/core/implementation-log-migrator.js +258 -0
  133. package/dist/core/implementation-log-migrator.js.map +1 -0
  134. package/dist/core/mdx-validator.d.ts +14 -0
  135. package/dist/core/mdx-validator.d.ts.map +1 -0
  136. package/dist/core/mdx-validator.js +34 -0
  137. package/dist/core/mdx-validator.js.map +1 -0
  138. package/dist/core/parser.d.ts +11 -0
  139. package/dist/core/parser.d.ts.map +1 -0
  140. package/dist/core/parser.js +128 -0
  141. package/dist/core/parser.js.map +1 -0
  142. package/dist/core/path-utils.d.ts +68 -0
  143. package/dist/core/path-utils.d.ts.map +1 -0
  144. package/dist/core/path-utils.js +302 -0
  145. package/dist/core/path-utils.js.map +1 -0
  146. package/dist/core/project-registry.d.ts +94 -0
  147. package/dist/core/project-registry.d.ts.map +1 -0
  148. package/dist/core/project-registry.js +297 -0
  149. package/dist/core/project-registry.js.map +1 -0
  150. package/dist/core/security-utils.d.ts +99 -0
  151. package/dist/core/security-utils.d.ts.map +1 -0
  152. package/dist/core/security-utils.js +275 -0
  153. package/dist/core/security-utils.js.map +1 -0
  154. package/dist/core/task-parser.d.ts +90 -0
  155. package/dist/core/task-parser.d.ts.map +1 -0
  156. package/dist/core/task-parser.js +477 -0
  157. package/dist/core/task-parser.js.map +1 -0
  158. package/dist/core/task-validator.d.ts +37 -0
  159. package/dist/core/task-validator.d.ts.map +1 -0
  160. package/dist/core/task-validator.js +499 -0
  161. package/dist/core/task-validator.js.map +1 -0
  162. package/dist/core/workspace-initializer.d.ts +16 -0
  163. package/dist/core/workspace-initializer.d.ts.map +1 -0
  164. package/dist/core/workspace-initializer.js +168 -0
  165. package/dist/core/workspace-initializer.js.map +1 -0
  166. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts +2 -0
  167. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts.map +1 -0
  168. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js +78 -0
  169. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js.map +1 -0
  170. package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts +2 -0
  171. package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts.map +1 -0
  172. package/dist/dashboard/__tests__/multi-server-approvals-content.test.js +115 -0
  173. package/dist/dashboard/__tests__/multi-server-approvals-content.test.js.map +1 -0
  174. package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts +2 -0
  175. package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts.map +1 -0
  176. package/dist/dashboard/__tests__/watcher-error-handling.test.js +118 -0
  177. package/dist/dashboard/__tests__/watcher-error-handling.test.js.map +1 -0
  178. package/dist/dashboard/approval-storage.d.ts +139 -0
  179. package/dist/dashboard/approval-storage.d.ts.map +1 -0
  180. package/dist/dashboard/approval-storage.js +608 -0
  181. package/dist/dashboard/approval-storage.js.map +1 -0
  182. package/dist/dashboard/execution-history-manager.d.ts +52 -0
  183. package/dist/dashboard/execution-history-manager.d.ts.map +1 -0
  184. package/dist/dashboard/execution-history-manager.js +161 -0
  185. package/dist/dashboard/execution-history-manager.js.map +1 -0
  186. package/dist/dashboard/implementation-log-manager.d.ts +97 -0
  187. package/dist/dashboard/implementation-log-manager.d.ts.map +1 -0
  188. package/dist/dashboard/implementation-log-manager.js +617 -0
  189. package/dist/dashboard/implementation-log-manager.js.map +1 -0
  190. package/dist/dashboard/job-scheduler.d.ts +91 -0
  191. package/dist/dashboard/job-scheduler.d.ts.map +1 -0
  192. package/dist/dashboard/job-scheduler.js +321 -0
  193. package/dist/dashboard/job-scheduler.js.map +1 -0
  194. package/dist/dashboard/multi-server.d.ts +42 -0
  195. package/dist/dashboard/multi-server.d.ts.map +1 -0
  196. package/dist/dashboard/multi-server.js +1460 -0
  197. package/dist/dashboard/multi-server.js.map +1 -0
  198. package/dist/dashboard/parser.d.ts +18 -0
  199. package/dist/dashboard/parser.d.ts.map +1 -0
  200. package/dist/dashboard/parser.js +269 -0
  201. package/dist/dashboard/parser.js.map +1 -0
  202. package/dist/dashboard/project-manager.d.ts +82 -0
  203. package/dist/dashboard/project-manager.d.ts.map +1 -0
  204. package/dist/dashboard/project-manager.js +257 -0
  205. package/dist/dashboard/project-manager.js.map +1 -0
  206. package/dist/dashboard/public/assets/Inter-Bold-CD3Pr7BX.woff2 +0 -0
  207. package/dist/dashboard/public/assets/Inter-Medium-B_8v_WHh.woff2 +0 -0
  208. package/dist/dashboard/public/assets/Inter-Regular-DRVdRqcI.woff2 +0 -0
  209. package/dist/dashboard/public/assets/Inter-SemiBold-CtskMddL.woff2 +0 -0
  210. package/dist/dashboard/public/assets/JetBrainsMono-Bold-D4WEaHbo.woff2 +0 -0
  211. package/dist/dashboard/public/assets/JetBrainsMono-Medium-3S3k2nMz.woff2 +0 -0
  212. package/dist/dashboard/public/assets/JetBrainsMono-Regular-BQaDgvhP.woff2 +0 -0
  213. package/dist/dashboard/public/assets/Tableau10-B-NsZVaP.js +1 -0
  214. package/dist/dashboard/public/assets/apl-B4CMkyY2.js +1 -0
  215. package/dist/dashboard/public/assets/arc-a5wW942W.js +1 -0
  216. package/dist/dashboard/public/assets/array-BKyUJesY.js +1 -0
  217. package/dist/dashboard/public/assets/asciiarmor-Df11BRmG.js +1 -0
  218. package/dist/dashboard/public/assets/asn1-EdZsLKOL.js +1 -0
  219. package/dist/dashboard/public/assets/asterisk-B-8jnY81.js +1 -0
  220. package/dist/dashboard/public/assets/blockDiagram-c4efeb88-CvjTuK-w.js +118 -0
  221. package/dist/dashboard/public/assets/brainfuck-C4LP7Hcl.js +1 -0
  222. package/dist/dashboard/public/assets/c4Diagram-c83219d4-NwVQo5kf.js +10 -0
  223. package/dist/dashboard/public/assets/channel-Bi16YZhk.js +1 -0
  224. package/dist/dashboard/public/assets/classDiagram-beda092f-BmSeXDdU.js +2 -0
  225. package/dist/dashboard/public/assets/classDiagram-v2-2358418a-D7GvvuPr.js +2 -0
  226. package/dist/dashboard/public/assets/clike-B9uivgTg.js +1 -0
  227. package/dist/dashboard/public/assets/clojure-BMjYHr_A.js +1 -0
  228. package/dist/dashboard/public/assets/clone-BpKTiq7P.js +1 -0
  229. package/dist/dashboard/public/assets/cmake-BQqOBYOt.js +1 -0
  230. package/dist/dashboard/public/assets/cobol-CWcv1MsR.js +1 -0
  231. package/dist/dashboard/public/assets/coffeescript-S37ZYGWr.js +1 -0
  232. package/dist/dashboard/public/assets/commonlisp-DBKNyK5s.js +1 -0
  233. package/dist/dashboard/public/assets/createText-1719965b-qASbqHUP.js +7 -0
  234. package/dist/dashboard/public/assets/crystal-SjHAIU92.js +1 -0
  235. package/dist/dashboard/public/assets/css-BnMrqG3P.js +1 -0
  236. package/dist/dashboard/public/assets/cypher-C_CwsFkJ.js +1 -0
  237. package/dist/dashboard/public/assets/d-pRatUO7H.js +1 -0
  238. package/dist/dashboard/public/assets/diff-DbItnlRl.js +1 -0
  239. package/dist/dashboard/public/assets/dockerfile-BKs6k2Af.js +1 -0
  240. package/dist/dashboard/public/assets/dtd-DF_7sFjM.js +1 -0
  241. package/dist/dashboard/public/assets/dylan-DwRh75JA.js +1 -0
  242. package/dist/dashboard/public/assets/ebnf-CDyGwa7X.js +1 -0
  243. package/dist/dashboard/public/assets/ecl-Cabwm37j.js +1 -0
  244. package/dist/dashboard/public/assets/edges-96097737-BItTSnH7.js +4 -0
  245. package/dist/dashboard/public/assets/eiffel-CnydiIhH.js +1 -0
  246. package/dist/dashboard/public/assets/elm-vLlmbW-K.js +1 -0
  247. package/dist/dashboard/public/assets/erDiagram-0228fc6a-DT224olg.js +51 -0
  248. package/dist/dashboard/public/assets/erlang-BNw1qcRV.js +1 -0
  249. package/dist/dashboard/public/assets/factor-kuTfRLto.js +1 -0
  250. package/dist/dashboard/public/assets/fcl-Kvtd6kyn.js +1 -0
  251. package/dist/dashboard/public/assets/flowDb-c6c81e3f-D9_ukKtv.js +10 -0
  252. package/dist/dashboard/public/assets/flowDiagram-50d868cf-CylE8siG.js +4 -0
  253. package/dist/dashboard/public/assets/flowDiagram-v2-4f6560a1-B2O3JN7Y.js +1 -0
  254. package/dist/dashboard/public/assets/flowchart-elk-definition-6af322e1-BCaqFKf3.js +139 -0
  255. package/dist/dashboard/public/assets/forth-Ffai-XNe.js +1 -0
  256. package/dist/dashboard/public/assets/fortran-DYz_wnZ1.js +1 -0
  257. package/dist/dashboard/public/assets/ganttDiagram-a2739b55-WQUL1QW_.js +257 -0
  258. package/dist/dashboard/public/assets/gas-Bneqetm1.js +1 -0
  259. package/dist/dashboard/public/assets/gherkin-heZmZLOM.js +1 -0
  260. package/dist/dashboard/public/assets/gitGraphDiagram-82fe8481-CttZrdmr.js +70 -0
  261. package/dist/dashboard/public/assets/graph-Ch-rVueN.js +1 -0
  262. package/dist/dashboard/public/assets/groovy-D9Dt4D0W.js +1 -0
  263. package/dist/dashboard/public/assets/haskell-Cw1EW3IL.js +1 -0
  264. package/dist/dashboard/public/assets/haxe-H-WmDvRZ.js +1 -0
  265. package/dist/dashboard/public/assets/http-DBlCnlav.js +1 -0
  266. package/dist/dashboard/public/assets/idl-BEugSyMb.js +1 -0
  267. package/dist/dashboard/public/assets/index--kbPpDKv.js +1 -0
  268. package/dist/dashboard/public/assets/index-3scDwWm6.js +1 -0
  269. package/dist/dashboard/public/assets/index-5325376f-BL2zVOJU.js +1 -0
  270. package/dist/dashboard/public/assets/index-BZdjbO25.js +1 -0
  271. package/dist/dashboard/public/assets/index-BmA_batZ.js +1 -0
  272. package/dist/dashboard/public/assets/index-Bu0u99kF.js +2 -0
  273. package/dist/dashboard/public/assets/index-Ch-lr7F4.js +1 -0
  274. package/dist/dashboard/public/assets/index-ClgWbdoq.js +1 -0
  275. package/dist/dashboard/public/assets/index-CzLwOMQ_.js +3 -0
  276. package/dist/dashboard/public/assets/index-DAOEjGO7.js +1 -0
  277. package/dist/dashboard/public/assets/index-DXqf0B9c.js +1 -0
  278. package/dist/dashboard/public/assets/index-DegWdR16.js +1 -0
  279. package/dist/dashboard/public/assets/index-DiHyYGim.js +1 -0
  280. package/dist/dashboard/public/assets/index-DlZtG7I5.js +1 -0
  281. package/dist/dashboard/public/assets/index-DmhGE2M8.js +1 -0
  282. package/dist/dashboard/public/assets/index-QEGvld4x.js +1 -0
  283. package/dist/dashboard/public/assets/index-RfZPGAJu.js +1 -0
  284. package/dist/dashboard/public/assets/index-UybBj_7u.js +319 -0
  285. package/dist/dashboard/public/assets/index-bVekzPnl.js +7 -0
  286. package/dist/dashboard/public/assets/index-f5bysQzW.css +1 -0
  287. package/dist/dashboard/public/assets/infoDiagram-8eee0895-DjzkkE3o.js +7 -0
  288. package/dist/dashboard/public/assets/init-Gi6I4Gst.js +1 -0
  289. package/dist/dashboard/public/assets/javascript-iXu5QeM3.js +1 -0
  290. package/dist/dashboard/public/assets/journeyDiagram-c64418c1-CxPZkNdB.js +139 -0
  291. package/dist/dashboard/public/assets/julia-DuME0IfC.js +1 -0
  292. package/dist/dashboard/public/assets/katex-XbL3y5x-.js +261 -0
  293. package/dist/dashboard/public/assets/layout-DX7DNTRm.js +1 -0
  294. package/dist/dashboard/public/assets/line-DfvpmKOn.js +1 -0
  295. package/dist/dashboard/public/assets/linear-gQbBPHO5.js +1 -0
  296. package/dist/dashboard/public/assets/livescript-BwQOo05w.js +1 -0
  297. package/dist/dashboard/public/assets/lua-BgMRiT3U.js +1 -0
  298. package/dist/dashboard/public/assets/mathematica-DTrFuWx2.js +1 -0
  299. package/dist/dashboard/public/assets/mbox-CNhZ1qSd.js +1 -0
  300. package/dist/dashboard/public/assets/mindmap-definition-8da855dc-CNxmpyG6.js +415 -0
  301. package/dist/dashboard/public/assets/mirc-CjQqDB4T.js +1 -0
  302. package/dist/dashboard/public/assets/mllike-CXdrOF99.js +1 -0
  303. package/dist/dashboard/public/assets/modelica-Dc1JOy9r.js +1 -0
  304. package/dist/dashboard/public/assets/mscgen-BA5vi2Kp.js +1 -0
  305. package/dist/dashboard/public/assets/mumps-BT43cFF4.js +1 -0
  306. package/dist/dashboard/public/assets/nginx-DdIZxoE0.js +1 -0
  307. package/dist/dashboard/public/assets/nsis-LdVXkNf5.js +1 -0
  308. package/dist/dashboard/public/assets/ntriples-BfvgReVJ.js +1 -0
  309. package/dist/dashboard/public/assets/octave-Ck1zUtKM.js +1 -0
  310. package/dist/dashboard/public/assets/ordinal-Cboi1Yqb.js +1 -0
  311. package/dist/dashboard/public/assets/oz-BzwKVEFT.js +1 -0
  312. package/dist/dashboard/public/assets/pascal--L3eBynH.js +1 -0
  313. package/dist/dashboard/public/assets/path-CbwjOpE9.js +1 -0
  314. package/dist/dashboard/public/assets/perl-CdXCOZ3F.js +1 -0
  315. package/dist/dashboard/public/assets/pieDiagram-a8764435-D-xy_NSA.js +35 -0
  316. package/dist/dashboard/public/assets/pig-CevX1Tat.js +1 -0
  317. package/dist/dashboard/public/assets/powershell-CFHJl5sT.js +1 -0
  318. package/dist/dashboard/public/assets/properties-C78fOPTZ.js +1 -0
  319. package/dist/dashboard/public/assets/protobuf-ChK-085T.js +1 -0
  320. package/dist/dashboard/public/assets/pug-DeIclll2.js +1 -0
  321. package/dist/dashboard/public/assets/puppet-DMA9R1ak.js +1 -0
  322. package/dist/dashboard/public/assets/python-BuPzkPfP.js +1 -0
  323. package/dist/dashboard/public/assets/q-pXgVlZs6.js +1 -0
  324. package/dist/dashboard/public/assets/quadrantDiagram-1e28029f-BoL2wzz0.js +7 -0
  325. package/dist/dashboard/public/assets/r-B6wPVr8A.js +1 -0
  326. package/dist/dashboard/public/assets/requirementDiagram-08caed73-BujFz0q1.js +52 -0
  327. package/dist/dashboard/public/assets/rpm-CTu-6PCP.js +1 -0
  328. package/dist/dashboard/public/assets/ruby-B2Rjki9n.js +1 -0
  329. package/dist/dashboard/public/assets/sankeyDiagram-a04cb91d-D03_NARm.js +8 -0
  330. package/dist/dashboard/public/assets/sas-B4kiWyti.js +1 -0
  331. package/dist/dashboard/public/assets/scheme-C41bIUwD.js +1 -0
  332. package/dist/dashboard/public/assets/sequenceDiagram-c5b8d532-B65eFcaT.js +122 -0
  333. package/dist/dashboard/public/assets/shell-CjFT_Tl9.js +1 -0
  334. package/dist/dashboard/public/assets/sieve-C3Gn_uJK.js +1 -0
  335. package/dist/dashboard/public/assets/simple-mode-GW_nhZxv.js +1 -0
  336. package/dist/dashboard/public/assets/smalltalk-CnHTOXQT.js +1 -0
  337. package/dist/dashboard/public/assets/solr-DehyRSwq.js +1 -0
  338. package/dist/dashboard/public/assets/sparql-DkYu6x3z.js +1 -0
  339. package/dist/dashboard/public/assets/spreadsheet-BCZA_wO0.js +1 -0
  340. package/dist/dashboard/public/assets/sql-D0XecflT.js +1 -0
  341. package/dist/dashboard/public/assets/stateDiagram-1ecb1508-BDbqu0Vl.js +1 -0
  342. package/dist/dashboard/public/assets/stateDiagram-v2-c2b004d7-CBHvk4b8.js +1 -0
  343. package/dist/dashboard/public/assets/stex-C3f8Ysf7.js +1 -0
  344. package/dist/dashboard/public/assets/styles-b4e223ce-CELsPqaO.js +160 -0
  345. package/dist/dashboard/public/assets/styles-ca3715f6-BRqMqT6F.js +207 -0
  346. package/dist/dashboard/public/assets/styles-d45a18b0-e8N-oLPy.js +116 -0
  347. package/dist/dashboard/public/assets/stylus-B533Al4x.js +1 -0
  348. package/dist/dashboard/public/assets/svgDrawCommon-b86b1483-vNDtmQc-.js +1 -0
  349. package/dist/dashboard/public/assets/swift-BzpIVaGY.js +1 -0
  350. package/dist/dashboard/public/assets/tcl-DVfN8rqt.js +1 -0
  351. package/dist/dashboard/public/assets/textile-CnDTJFAw.js +1 -0
  352. package/dist/dashboard/public/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  353. package/dist/dashboard/public/assets/tiki-DGYXhP31.js +1 -0
  354. package/dist/dashboard/public/assets/timeline-definition-faaaa080-Dh2_A5VU.js +61 -0
  355. package/dist/dashboard/public/assets/toml-Bm5Em-hy.js +1 -0
  356. package/dist/dashboard/public/assets/troff-wAsdV37c.js +1 -0
  357. package/dist/dashboard/public/assets/ttcn-CfJYG6tj.js +1 -0
  358. package/dist/dashboard/public/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  359. package/dist/dashboard/public/assets/turtle-B1tBg_DP.js +1 -0
  360. package/dist/dashboard/public/assets/vb-CmGdzxic.js +1 -0
  361. package/dist/dashboard/public/assets/vbscript-BuJXcnF6.js +1 -0
  362. package/dist/dashboard/public/assets/velocity-D8B20fx6.js +1 -0
  363. package/dist/dashboard/public/assets/verilog-C6RDOZhf.js +1 -0
  364. package/dist/dashboard/public/assets/vhdl-lSbBsy5d.js +1 -0
  365. package/dist/dashboard/public/assets/webidl-ZXfAyPTL.js +1 -0
  366. package/dist/dashboard/public/assets/xquery-DzFWVndE.js +1 -0
  367. package/dist/dashboard/public/assets/xychartDiagram-f5964ef8-B76v1AVF.js +7 -0
  368. package/dist/dashboard/public/assets/yacas-BJ4BC0dw.js +1 -0
  369. package/dist/dashboard/public/assets/z80-Hz9HOZM7.js +1 -0
  370. package/dist/dashboard/public/claude-icon-dark.svg +1 -0
  371. package/dist/dashboard/public/claude-icon.svg +1 -0
  372. package/dist/dashboard/public/index.html +16 -0
  373. package/dist/dashboard/settings-manager.d.ts +47 -0
  374. package/dist/dashboard/settings-manager.d.ts.map +1 -0
  375. package/dist/dashboard/settings-manager.js +180 -0
  376. package/dist/dashboard/settings-manager.js.map +1 -0
  377. package/dist/dashboard/utils.d.ts +31 -0
  378. package/dist/dashboard/utils.d.ts.map +1 -0
  379. package/dist/dashboard/utils.js +102 -0
  380. package/dist/dashboard/utils.js.map +1 -0
  381. package/dist/dashboard/watcher.d.ts +32 -0
  382. package/dist/dashboard/watcher.d.ts.map +1 -0
  383. package/dist/dashboard/watcher.js +173 -0
  384. package/dist/dashboard/watcher.js.map +1 -0
  385. package/dist/index.d.ts +13 -0
  386. package/dist/index.d.ts.map +1 -0
  387. package/dist/index.js +380 -0
  388. package/dist/index.js.map +1 -0
  389. package/dist/markdown/templates/design-template.md +126 -0
  390. package/dist/markdown/templates/product-template.md +51 -0
  391. package/dist/markdown/templates/requirements-template.md +50 -0
  392. package/dist/markdown/templates/structure-template.md +145 -0
  393. package/dist/markdown/templates/tasks-template.md +100 -0
  394. package/dist/markdown/templates/tech-template.md +99 -0
  395. package/dist/markdown/templates/test-design-template.md +221 -0
  396. package/dist/prompts/create-spec.d.ts +3 -0
  397. package/dist/prompts/create-spec.d.ts.map +1 -0
  398. package/dist/prompts/create-spec.js +97 -0
  399. package/dist/prompts/create-spec.js.map +1 -0
  400. package/dist/prompts/create-steering-doc.d.ts +3 -0
  401. package/dist/prompts/create-steering-doc.d.ts.map +1 -0
  402. package/dist/prompts/create-steering-doc.js +75 -0
  403. package/dist/prompts/create-steering-doc.js.map +1 -0
  404. package/dist/prompts/implement-task.d.ts +3 -0
  405. package/dist/prompts/implement-task.d.ts.map +1 -0
  406. package/dist/prompts/implement-task.js +174 -0
  407. package/dist/prompts/implement-task.js.map +1 -0
  408. package/dist/prompts/index.d.ts +20 -0
  409. package/dist/prompts/index.d.ts.map +1 -0
  410. package/dist/prompts/index.js +103 -0
  411. package/dist/prompts/index.js.map +1 -0
  412. package/dist/prompts/inject-spec-workflow-guide.d.ts +3 -0
  413. package/dist/prompts/inject-spec-workflow-guide.d.ts.map +1 -0
  414. package/dist/prompts/inject-spec-workflow-guide.js +60 -0
  415. package/dist/prompts/inject-spec-workflow-guide.js.map +1 -0
  416. package/dist/prompts/inject-steering-guide.d.ts +3 -0
  417. package/dist/prompts/inject-steering-guide.d.ts.map +1 -0
  418. package/dist/prompts/inject-steering-guide.js +64 -0
  419. package/dist/prompts/inject-steering-guide.js.map +1 -0
  420. package/dist/prompts/refresh-tasks.d.ts +3 -0
  421. package/dist/prompts/refresh-tasks.d.ts.map +1 -0
  422. package/dist/prompts/refresh-tasks.js +237 -0
  423. package/dist/prompts/refresh-tasks.js.map +1 -0
  424. package/dist/prompts/spec-status.d.ts +3 -0
  425. package/dist/prompts/spec-status.d.ts.map +1 -0
  426. package/dist/prompts/spec-status.js +77 -0
  427. package/dist/prompts/spec-status.js.map +1 -0
  428. package/dist/prompts/types.d.ts +13 -0
  429. package/dist/prompts/types.d.ts.map +1 -0
  430. package/dist/prompts/types.js +2 -0
  431. package/dist/prompts/types.js.map +1 -0
  432. package/dist/server.d.ts +17 -0
  433. package/dist/server.d.ts.map +1 -0
  434. package/dist/server.js +175 -0
  435. package/dist/server.js.map +1 -0
  436. package/dist/tools/__tests__/log-implementation-review-process.test.d.ts +2 -0
  437. package/dist/tools/__tests__/log-implementation-review-process.test.d.ts.map +1 -0
  438. package/dist/tools/__tests__/log-implementation-review-process.test.js +190 -0
  439. package/dist/tools/__tests__/log-implementation-review-process.test.js.map +1 -0
  440. package/dist/tools/__tests__/projectPath.test.d.ts +2 -0
  441. package/dist/tools/__tests__/projectPath.test.d.ts.map +1 -0
  442. package/dist/tools/__tests__/projectPath.test.js +187 -0
  443. package/dist/tools/__tests__/projectPath.test.js.map +1 -0
  444. package/dist/tools/approvals.d.ts +14 -0
  445. package/dist/tools/approvals.d.ts.map +1 -0
  446. package/dist/tools/approvals.js +505 -0
  447. package/dist/tools/approvals.js.map +1 -0
  448. package/dist/tools/index.d.ts +5 -0
  449. package/dist/tools/index.d.ts.map +1 -0
  450. package/dist/tools/index.js +52 -0
  451. package/dist/tools/index.js.map +1 -0
  452. package/dist/tools/log-implementation.d.ts +5 -0
  453. package/dist/tools/log-implementation.d.ts.map +1 -0
  454. package/dist/tools/log-implementation.js +498 -0
  455. package/dist/tools/log-implementation.js.map +1 -0
  456. package/dist/tools/spec-status.d.ts +5 -0
  457. package/dist/tools/spec-status.d.ts.map +1 -0
  458. package/dist/tools/spec-status.js +192 -0
  459. package/dist/tools/spec-status.js.map +1 -0
  460. package/dist/tools/spec-workflow-guide.d.ts +5 -0
  461. package/dist/tools/spec-workflow-guide.d.ts.map +1 -0
  462. package/dist/tools/spec-workflow-guide.js +116 -0
  463. package/dist/tools/spec-workflow-guide.js.map +1 -0
  464. package/dist/tools/steering-guide.d.ts +5 -0
  465. package/dist/tools/steering-guide.d.ts.map +1 -0
  466. package/dist/tools/steering-guide.js +192 -0
  467. package/dist/tools/steering-guide.js.map +1 -0
  468. package/dist/types.d.ts +183 -0
  469. package/dist/types.d.ts.map +1 -0
  470. package/dist/types.js +13 -0
  471. package/dist/types.js.map +1 -0
  472. package/package.json +106 -0
@@ -0,0 +1,82 @@
1
+ ---
2
+ always_apply: true
3
+ ---
4
+
5
+ # Design Conformance
6
+
7
+ Rules to prevent deviations from the approved design.md.
8
+
9
+ ## Principle
10
+
11
+ **Do not change the approved design during the implementation phase.** The DB schema, API design, and data model defined in design.md are a "contract" for the implementation; implementers must not change them unilaterally.
12
+
13
+ ## Prohibited Actions During Implementation
14
+
15
+ ### DB Schema
16
+ - Do not add tables or columns not defined in design.md
17
+ - Do not change the type or constraints of already-defined columns
18
+ - Do not add or remove indexes without authorization
19
+ - **Implement FK ON DELETE behavior exactly as defined in design.md** (do not change or add CASCADE / RESTRICT / SET NULL without authorization)
20
+ - Follow design.md for NULL / NOT NULL definitions
21
+
22
+ ### API
23
+ - Do not add endpoints not defined in design.md
24
+ - Do not change defined HTTP methods, paths, or status codes
25
+ - Do not add, remove, or change the type of request/response fields
26
+ - Do not change the format of error responses
27
+ - **Error codes**: Use only the error codes defined in the Error Handling section of design.md. If an undefined error case arises during implementation, handle it in the following order:
28
+ 1. Consider whether an error code already defined in design.md can serve as a substitute (e.g., if `Conflict` is undefined, substitute with `BadRequest("duplicate key")`)
29
+ 2. If substitution is not possible, escalate and confirm with the user
30
+
31
+ ### Data Model
32
+ - Do not add fields to Model / DTO that are not defined in design.md
33
+ - Do not create mismatches between DTO and API definitions
34
+
35
+ ## When a Design Change Is Needed
36
+
37
+ If a design problem is discovered during implementation:
38
+
39
+ 1. Stop the implementation
40
+ 2. Clearly describe the problem and the proposed change
41
+ 3. Escalate to the user (review-worker's `review_action: escalate`)
42
+
43
+ Based on the user's judgment, proceed with one of the following:
44
+
45
+ **Decision criteria (guidance for choosing A vs B):**
46
+
47
+ | Indicator | A (Implementation Adjustment) | B (Phase Reset) |
48
+ |-----------|-------------------------------|-----------------|
49
+ | Scope of change | Only the implementation approach of a single task | The DB schema / API spec / data model definitions themselves |
50
+ | Impact on existing implementation | Does not affect other completed tasks | Requires rewriting code for other tasks |
51
+ | Change to design.md | Not required (only appending to Restrictions) | Required |
52
+ | Typical example | Misinterpretation of DTO field usage, change to an existing component in use | Table definition change, addition/removal of response types, FK spec change |
53
+
54
+ ### A. Adjust Implementation Within the Scope of design.md (Minor Cases)
55
+
56
+ - Append the adjustment details to the Restrictions in `_Prompt`, and return to parallel-worker via rework
57
+ - Do not change design.md
58
+
59
+ ### B. design.md Change Required (Fundamental Problems) — Phase Reset
60
+
61
+ **If design.md must be changed, discard all implementation so far and restart from Phase 2.** Partial fixes are not permitted.
62
+
63
+ Phase Reset procedure:
64
+ 1. **Suspend Phase 5**: Revert in-progress tasks (`[-]`) to `[ ]`
65
+ 2. **Discard implementation code**: Undo code implemented and committed in Phase 5 using `git revert`
66
+ 3. **Delete tasks.md**: Delete `.spec-workflow/specs/{spec-name}/tasks.md` (Phase 4 artifact)
67
+ 4. **Fix design.md**: Return to Phase 2 and fix design.md
68
+ 5. **Re-review**: Re-validate design.md with spec-review (check)
69
+ 6. **Re-approval**: Obtain re-approval of design.md via the Approval Workflow
70
+ 7. **Re-run Phase 3-4**: Re-create test-design.md with `/spec-test-design`, then tasks.md with `/spec-tasks`
71
+ 8. **Re-run Phase 5**: Restart implementation from the beginning with `/spec-implement`
72
+
73
+ **Note:** Phase Reset carries a high cost. To avoid this, conduct thorough design reviews in Phase 2 (DB Schema, API Design, Data Model, Error Handling).
74
+
75
+ ## Verification in review-worker
76
+
77
+ When performing a code review, review-worker reads `design.md` and checks the following:
78
+
79
+ - Whether the implemented DB migrations match the schema definitions in design.md
80
+ - Whether the paths, methods, and request/response types of implemented endpoints match the API definitions in design.md
81
+ - Whether the fields of implemented Model / DTO match the data model definitions in design.md
82
+ - Whether there are any additions not defined in design.md
@@ -0,0 +1,53 @@
1
+ ---
2
+ always_apply: true
3
+ ---
4
+
5
+ # Design Principles
6
+
7
+ Design principles to apply during code reviews and implementation.
8
+
9
+ ## Separation of Concerns
10
+
11
+ - Each function, struct, or module should focus on a single responsibility
12
+ - Do not write business logic in handlers. Handlers should be limited to "accepting input → calling services/repositories → building responses"
13
+ - Place validation, data transformation, and business rules in their appropriate layers
14
+ - If you cannot explain "what this function does" in one sentence, consider splitting it
15
+
16
+ ## Direction of Dependencies
17
+
18
+ - Higher layers depend on lower layers (handler → service/repository → model)
19
+ - Reverse dependencies (e.g., model referencing handler) are prohibited
20
+ - Do not create circular dependencies
21
+ - Abstract dependencies on external services using traits; avoid direct dependencies on concrete types
22
+
23
+ ## Minimizing the Public API
24
+
25
+ - Do not add unnecessary `pub`. Keep things private if they do not need to be accessed from outside the module
26
+ - Do not expose internal implementation details (helper functions, intermediate types)
27
+ - Use `pub(crate)` to limit visibility to the minimum necessary
28
+
29
+ ## Consistent Error Handling
30
+
31
+ - Use the project-wide shared error type (e.g., `AppError`) and convert errors from each layer using `From`
32
+ - `unwrap()` / `expect()` are only permitted in test code or as invariants during initialization. Use the `?` operator in business logic
33
+ - Error messages should include "what happened" and "what was expected"
34
+ - Separate user-facing errors from internal log errors (do not return internal details to the client)
35
+
36
+ ## Naming Appropriateness
37
+
38
+ - Type names, function names, and variable names should accurately express their intent
39
+ - Avoid abbreviations; use searchable names (`usr` → `user`; `ctx` is conventionally acceptable)
40
+ - Prefix bool variables and functions with `is_`, `has_`, `can_`, etc. to make intent explicit
41
+ - Avoid negative naming (`is_not_empty` → express as the negation of `is_empty`)
42
+
43
+ ## DRY (Don't Repeat Yourself)
44
+
45
+ - If the same logic appears in two or more places, consider consolidating it
46
+ - However, do not force consolidation for coincidental similarity (code that happens to look the same). Judge by "do they change for the same reason?"
47
+ - Consider consolidation in this order: function extraction, trait extraction, generics — and choose the simplest approach
48
+
49
+ ## YAGNI (You Aren't Gonna Need It)
50
+
51
+ - Do not preemptively implement features, abstractions, or configuration options that are not currently needed
52
+ - "Might be used in the future" is not a reason to implement something. Add it when it becomes necessary
53
+ - Prioritize concrete, understandable implementations over excessive generalization
@@ -0,0 +1,176 @@
1
+ ---
2
+ paths:
3
+ - "**/*.rs"
4
+ - "**/migrations/**"
5
+ - "**/diesel.toml"
6
+ globs:
7
+ - "**/Cargo.toml"
8
+ ---
9
+
10
+ # Diesel / diesel-async Best Practices
11
+
12
+ ## Project Structure
13
+
14
+ - Configure the schema output path in `diesel.toml` (`file = "src/schema.rs"`)
15
+ - Do not manually edit `schema.rs` — it is an auto-generated file
16
+ - Place model definitions in a separate `models/` directory
17
+ - Create migrations with `diesel migration generate`
18
+
19
+ ```
20
+ src/
21
+ ├── db/
22
+ │ ├── mod.rs # DB connection and pool initialization
23
+ │ └── repository/ # Repository layer
24
+ │ ├── mod.rs
25
+ │ └── users.rs
26
+ ├── models/
27
+ │ ├── mod.rs
28
+ │ └── user.rs # Queryable, Insertable, etc.
29
+ ├── schema.rs # Auto-generated (diesel print-schema)
30
+ └── ...
31
+ ```
32
+
33
+ ## Model Definitions
34
+
35
+ - Use `#[derive(Queryable, Selectable)]` for read models
36
+ - Use `#[derive(Insertable)]` for insert models
37
+ - Use `#[derive(AsChangeset)]` for update models
38
+ - Explicitly specify the table with `#[diesel(table_name = ...)]`
39
+ - Use `#[diesel(check_for_backend(Pg))]` to verify backend compatibility at compile time
40
+
41
+ ```rust
42
+ #[derive(Debug, Queryable, Selectable)]
43
+ #[diesel(table_name = users)]
44
+ #[diesel(check_for_backend(Pg))]
45
+ pub struct User {
46
+ pub id: i64,
47
+ pub name: String,
48
+ pub email: Option<String>,
49
+ pub created_at: NaiveDateTime,
50
+ }
51
+
52
+ #[derive(Debug, Insertable)]
53
+ #[diesel(table_name = users)]
54
+ pub struct NewUser<'a> {
55
+ pub name: &'a str,
56
+ pub email: Option<&'a str>,
57
+ }
58
+
59
+ #[derive(Debug, AsChangeset)]
60
+ #[diesel(table_name = users)]
61
+ pub struct UpdateUser<'a> {
62
+ pub name: Option<&'a str>,
63
+ pub email: Option<Option<&'a str>>, // Option<Option<T>> controls NULL behavior
64
+ }
65
+ ```
66
+
67
+ ## Queries
68
+
69
+ - Use `.select(Model::as_select())` to select columns in a type-safe manner
70
+ - Chain filters with `.filter()`
71
+ - Implement pagination with `.limit()` + `.offset()`
72
+ - Use `get_result()` to retrieve values after INSERT/UPDATE (PostgreSQL RETURNING)
73
+ - Implement complex queries as repository layer methods
74
+
75
+ ```rust
76
+ // Recommended: type-safe selection with as_select()
77
+ let users: Vec<User> = users::table
78
+ .filter(users::name.like(format!("%{query}%")))
79
+ .select(User::as_select())
80
+ .order(users::created_at.desc())
81
+ .limit(20)
82
+ .offset(0)
83
+ .load(conn)
84
+ .await?;
85
+
86
+ // upsert (PostgreSQL)
87
+ diesel::insert_into(users::table)
88
+ .values(&new_user)
89
+ .on_conflict(users::email)
90
+ .do_update()
91
+ .set(&update_user)
92
+ .get_result::<User>(conn)
93
+ .await?;
94
+ ```
95
+
96
+ ## diesel-async Connection Pool
97
+
98
+ - deadpool is recommended (lightweight, simple configuration)
99
+ - Create a pool manager with `AsyncDieselConnectionManager`
100
+ - Store the pool in `AppState` and pass it via Axum's `State` extractor
101
+ - Handle connection acquisition failures with proper error handling
102
+
103
+ ```rust
104
+ use diesel_async::pooled_connection::AsyncDieselConnectionManager;
105
+ use diesel_async::pooled_connection::deadpool::Pool;
106
+ use diesel_async::AsyncPgConnection;
107
+
108
+ pub type DbPool = Pool<AsyncPgConnection>;
109
+
110
+ pub fn create_pool(database_url: &str) -> DbPool {
111
+ let config = AsyncDieselConnectionManager::<AsyncPgConnection>::new(database_url);
112
+ Pool::builder(config)
113
+ .build()
114
+ .expect("Failed to create pool")
115
+ }
116
+ ```
117
+
118
+ ## Transactions
119
+
120
+ - Always use transactions when multiple DB operations must be executed atomically
121
+ - In diesel-async, pass a `scope_boxed()` closure to `connection.transaction()`
122
+ - Errors automatically trigger a rollback
123
+ - Use `test_transaction` in tests to guarantee rollback
124
+
125
+ ```rust
126
+ conn.transaction::<_, diesel::result::Error, _>(|conn| {
127
+ async move {
128
+ let user = diesel::insert_into(users::table)
129
+ .values(&new_user)
130
+ .get_result::<User>(conn)
131
+ .await?;
132
+
133
+ diesel::insert_into(profiles::table)
134
+ .values(&NewProfile { user_id: user.id })
135
+ .execute(conn)
136
+ .await?;
137
+
138
+ Ok(user)
139
+ }
140
+ .scope_boxed()
141
+ })
142
+ .await?;
143
+ ```
144
+
145
+ ## Migrations
146
+
147
+ - Create migrations with `diesel migration generate create_users`
148
+ - Always create `up.sql` and `down.sql` as a pair
149
+ - `down.sql` must precisely reverse the operations in `up.sql`
150
+ - Migrations must be idempotent
151
+ - Run `diesel migration run` in the CI/CD pipeline for production environments
152
+ - Make table changes non-destructively (add column → migrate data → drop column)
153
+
154
+ ```sql
155
+ -- up.sql
156
+ CREATE TABLE users (
157
+ id BIGSERIAL PRIMARY KEY,
158
+ name VARCHAR(255) NOT NULL,
159
+ email VARCHAR(255) UNIQUE,
160
+ created_at TIMESTAMP NOT NULL DEFAULT NOW(),
161
+ updated_at TIMESTAMP NOT NULL DEFAULT NOW()
162
+ );
163
+
164
+ CREATE INDEX idx_users_email ON users(email);
165
+
166
+ -- down.sql
167
+ DROP TABLE users;
168
+ ```
169
+
170
+ ## Performance
171
+
172
+ - Avoid N+1 queries. Fetch related data using JOINs or batch queries
173
+ - Specify only the necessary columns with `.select()`
174
+ - Use `.limit()` + `.offset()` when fetching large amounts of data
175
+ - Perform bulk inserts in a single call with `.values(&vec_of_insertables)`
176
+ - Write queries that can make use of indexes
@@ -0,0 +1,33 @@
1
+ ---
2
+ always_apply: true
3
+ ---
4
+
5
+ # Feedback Loop
6
+
7
+ ## Distinction from Built-in Memory
8
+
9
+ - **know-how** (`.claude/_docs/know-how/`): Project-specific practical knowledge. Managed under Git and shared with the team. Technical decisions, pitfalls, and best practices.
10
+ - **built-in memory** (`~/.claude/projects/.../memory/`): Personal preferences and working style. Not under Git management.
11
+
12
+ When in doubt, ask "Should team members know this?" Yes → know-how, No → memory.
13
+
14
+ ## Referencing at Task Start
15
+
16
+ Before starting a task, check `.claude/_docs/know-how/INDEX.md`, and if there is relevant know-how, Read the corresponding file.
17
+
18
+ Reference flow:
19
+ 1. Check the domain list in INDEX.md
20
+ 2. Identify domains that match the task's keywords (e.g., "testing", "migration", "cache")
21
+ 3. Reflect the relevant know-how's "checklists" and "counter-examples" in your implementation decisions
22
+
23
+ If INDEX.md is empty or no matching domain exists, you may skip this step.
24
+
25
+ ## Detecting and Recording Feedback
26
+
27
+ When any of the following is detected, use the `/knowhow-capture` skill to record know-how:
28
+
29
+ - The user says something like "remember this" or "from next time, do ~" → Skill Pattern A (record immediately)
30
+ - The user corrects or negates an AI judgment → Skill Pattern B (proposal type)
31
+ - The same feedback has been received two or more times → Skill Pattern B (proposal type)
32
+
33
+ For recording procedures, format, and rule promotion, follow the `/knowhow-capture` skill.
@@ -0,0 +1,319 @@
1
+ ---
2
+ paths:
3
+ - "**/*.rs"
4
+ globs:
5
+ - "**/Cargo.toml"
6
+ ---
7
+
8
+ # Leptos Best Practices
9
+
10
+ When using a Leptos full-stack configuration, this rule takes precedence over `project-architecture.md`.
11
+ All Diesel, Valkey, and Axum code must be wrapped in `#[cfg(feature = "ssr")]`.
12
+
13
+ ## Project Structure
14
+
15
+ - In a full-stack configuration, separate compilation targets using `ssr` / `hydrate` / `csr` feature flags
16
+ - Wrap server-only code (Diesel, Valkey, Axum) with `#[cfg(feature = "ssr")]`
17
+ - Use `cargo-leptos` as the build tool
18
+ - Enable the `ssr` feature in rust-analyzer settings
19
+
20
+ ```toml
21
+ [lib]
22
+ crate-type = ["cdylib", "rlib"]
23
+
24
+ [features]
25
+ csr = ["leptos/csr"]
26
+ hydrate = ["leptos/hydrate"]
27
+ ssr = [
28
+ "leptos/ssr",
29
+ "dep:leptos_axum",
30
+ "dep:axum",
31
+ "dep:diesel",
32
+ "dep:diesel-async",
33
+ "dep:redis",
34
+ "dep:tokio",
35
+ "dep:tower",
36
+ "dep:tower-http",
37
+ ]
38
+ ```
39
+
40
+ ## Directory Structure (Full-Stack)
41
+
42
+ ```
43
+ src/
44
+ ├── lib.rs # Crate root, branching by feature flag
45
+ ├── app.rs # Leptos App component (Router and Routes definitions)
46
+ ├── main.rs # Entry point (SSR/CSR branching by feature flag)
47
+ ├── server/ # Everything under #[cfg(feature = "ssr")]
48
+ │ ├── mod.rs # Axum server startup
49
+ │ ├── app_state.rs # AppState definition (DbPool, Valkey, Config)
50
+ │ ├── db/
51
+ │ │ ├── mod.rs # DB pool initialization
52
+ │ │ └── repository/ # Repository layer
53
+ │ ├── cache/
54
+ │ │ ├── mod.rs # Valkey connection initialization
55
+ │ │ └── keys.rs
56
+ │ └── middleware/
57
+ │ └── auth.rs
58
+ ├── pages/ # Page components (corresponding to routes)
59
+ ├── components/ # Reusable UI components
60
+ ├── models/ # Diesel models (cfg(feature = "ssr"))
61
+ ├── dto/ # Shared types (used by both server and client)
62
+ ├── server_fns/ # #[server] functions
63
+ ├── schema.rs # Diesel auto-generated (cfg(feature = "ssr"))
64
+ └── error_template.rs # Error display component
65
+ style/
66
+ ├── main.css
67
+ migrations/
68
+ └── ...
69
+ ```
70
+
71
+ ## Axum Integration (SSR)
72
+
73
+ - Use `leptos_axum`'s `LeptosRoutes` trait to integrate Leptos routes into the Axum Router
74
+ - Receive server function endpoints at `/api/{*fn_name}`
75
+ - Inject the DB pool and other resources into Leptos context with `provide_context`
76
+
77
+ ```rust
78
+ #[cfg(feature = "ssr")]
79
+ #[tokio::main]
80
+ async fn main() {
81
+ let routes = generate_route_list(App);
82
+ let state = AppState { /* db_pool, valkey, leptos_options, routes */ };
83
+
84
+ let app = Router::new()
85
+ .route("/api/{*fn_name}", get(server_fn_handler).post(server_fn_handler))
86
+ .leptos_routes_with_handler(routes, get(leptos_routes_handler))
87
+ .fallback(file_and_error_handler)
88
+ .layer(TraceLayer::new_for_http())
89
+ .with_state(state);
90
+
91
+ let listener = TcpListener::bind(&addr).await?;
92
+ axum::serve(listener, app)
93
+ .with_graceful_shutdown(shutdown_signal())
94
+ .await?;
95
+ }
96
+ ```
97
+
98
+ ## Separation by Feature Flag
99
+
100
+ ```rust
101
+ // src/lib.rs
102
+ pub mod app;
103
+ pub mod dto;
104
+ pub mod pages;
105
+ pub mod components;
106
+ pub mod server_fns;
107
+
108
+ #[cfg(feature = "ssr")]
109
+ pub mod server;
110
+
111
+ #[cfg(feature = "ssr")]
112
+ pub mod models;
113
+
114
+ #[cfg(feature = "ssr")]
115
+ pub mod schema;
116
+ ```
117
+
118
+ ## Components
119
+
120
+ - Define components with the `#[component]` macro. Component names must be `UpperCamelCase`
121
+ - Define props as function arguments and control optional values and defaults with the `#[prop]` attribute
122
+ - Keep components small and single-responsibility
123
+ - Place reusable components in the `components/` directory
124
+
125
+ ```rust
126
+ #[component]
127
+ fn UserCard(
128
+ /// User name
129
+ name: String,
130
+ /// Email address (optional)
131
+ #[prop(optional)]
132
+ email: Option<String>,
133
+ /// Avatar size
134
+ #[prop(default = 48)]
135
+ avatar_size: u32,
136
+ /// Click handler
137
+ #[prop(into)]
138
+ on_click: Callback<()>,
139
+ ) -> impl IntoView {
140
+ view! {
141
+ <div class="user-card" on:click=move |_| on_click.run(())>
142
+ <span>{name}</span>
143
+ {email.map(|e| view! { <span class="email">{e}</span> })}
144
+ </div>
145
+ }
146
+ }
147
+ ```
148
+
149
+ ## Signals and the Reactive System
150
+
151
+ - Create read/write signal pairs with `signal()`
152
+ - Express derived state as closures (`move || ...`). Avoid creating unnecessary signals
153
+ - Use `Memo` for expensive derived computations (avoids recomputation when dependencies have not changed)
154
+ - Share global state with `provide_context` / `use_context`
155
+ - Use `RwSignal` when you want to combine reading and writing into a single value
156
+
157
+ ```rust
158
+ let (count, set_count) = signal(0);
159
+
160
+ // Derived state: use a closure, not a signal
161
+ let is_even = move || count.get() % 2 == 0;
162
+ let double_count = move || count.get() * 2;
163
+
164
+ // Use Memo for expensive computations
165
+ let expensive = Memo::new(move |_| heavy_computation(count.get()));
166
+ ```
167
+
168
+ ## Conditional Rendering and List Rendering
169
+
170
+ - Use `move || if ... { ... } else { ... }` for conditional rendering. Unify different types with `.into_any()`
171
+ - Use the keyed `For` component for list rendering
172
+ - Only use `Vec<impl IntoView>` directly for static lists
173
+
174
+ ```rust
175
+ // Conditional rendering
176
+ {move || if is_loading.get() {
177
+ view! { <p>"Loading..."</p> }.into_any()
178
+ } else {
179
+ view! { <UserList users=users.get()/> }.into_any()
180
+ }}
181
+
182
+ // List rendering
183
+ <For
184
+ each=move || items.get()
185
+ key=|item| item.id
186
+ let(item)
187
+ >
188
+ <ItemRow item=item/>
189
+ </For>
190
+ ```
191
+
192
+ ## Server Functions
193
+
194
+ - Define server-only functions with the `#[server]` macro
195
+ - Use `Result<T, ServerFnError>` as the return type
196
+ - Perform all DB access, authentication, and external API calls inside server functions
197
+ - Use `use_context` inside server functions to obtain the DB pool and other resources
198
+ - Define a custom error type and implement `FromServerFnError`
199
+
200
+ ```rust
201
+ #[server]
202
+ pub async fn get_user(id: i64) -> Result<UserDto, ServerFnError> {
203
+ use crate::db::repository::users;
204
+ let pool = use_context::<DbPool>()
205
+ .ok_or_else(|| ServerFnError::new("No DB pool"))?;
206
+ let mut conn = pool.get().await
207
+ .map_err(|e| ServerFnError::new(e.to_string()))?;
208
+ let user = users::find_by_id(&mut conn, id).await
209
+ .map_err(|e| ServerFnError::new(e.to_string()))?;
210
+ Ok(user.into())
211
+ }
212
+ ```
213
+
214
+ ## Resources and Async Data
215
+
216
+ - Fetch server data with `Resource` and display loading states with `Suspense`
217
+ - Declare reactive dependencies in the first argument (source) of `Resource::new`
218
+ - Use `Transition` to reload data in the background while displaying existing content
219
+
220
+ ```rust
221
+ let user_resource = Resource::new(
222
+ move || user_id.get(),
223
+ |id| get_user(id),
224
+ );
225
+
226
+ view! {
227
+ <Suspense fallback=|| view! { <p>"Loading..."</p> }>
228
+ {move || Suspend::new(async move {
229
+ user_resource.await.map(|user| {
230
+ view! { <UserProfile user=user/> }
231
+ })
232
+ })}
233
+ </Suspense>
234
+ }
235
+ ```
236
+
237
+ ## Forms and Actions
238
+
239
+ - Use `ServerAction` + `ActionForm` to create progressively enhanced forms
240
+ - Forms must work even when JavaScript is disabled
241
+ - Use `action.value()` to get the latest result and `action.pending()` to get the loading state
242
+
243
+ ```rust
244
+ let create_user = ServerAction::<CreateUser>::new();
245
+
246
+ view! {
247
+ <ActionForm action=create_user>
248
+ <input type="text" name="name" required/>
249
+ <input type="email" name="email"/>
250
+ <button type="submit" disabled=move || create_user.pending().get()>
251
+ "Create"
252
+ </button>
253
+ </ActionForm>
254
+ }
255
+ ```
256
+
257
+ ## Routing
258
+
259
+ - Configure client-side routing with `leptos_router`
260
+ - Define routes with `<Routes>` + `<Route>`
261
+ - Define path parameters with `path!("/users/:id")` and retrieve them with `use_params`
262
+ - Choose an SSR mode from `ssr=SsrMode::OutOfOrder` (default), `PartiallyBlocked`, or `Async`
263
+
264
+ ```rust
265
+ view! {
266
+ <Router>
267
+ <nav>
268
+ <A href="/">"Home"</A>
269
+ <A href="/users">"Users"</A>
270
+ </nav>
271
+ <main>
272
+ <Routes fallback=|| view! { <p>"Not Found"</p> }>
273
+ <Route path=path!("/") view=HomePage/>
274
+ <Route path=path!("/users") view=UsersPage/>
275
+ <Route path=path!("/users/:id") view=UserDetailPage/>
276
+ </Routes>
277
+ </main>
278
+ </Router>
279
+ }
280
+ ```
281
+
282
+ ## Error Handling
283
+
284
+ - Use the `ErrorBoundary` component to catch errors from child components
285
+ - Propagate server function errors via `Result` and handle them on the UI side with `match`
286
+ - Separate user-facing error messages from detailed internal error logs
287
+
288
+ ## Styling
289
+
290
+ - Toggle classes dynamically with `class:name=signal`
291
+ - Set inline styles dynamically with `style:property=signal`
292
+ - Specify CSS files via `style-file` in `[package.metadata.leptos]` in `Cargo.toml`
293
+
294
+ ## Build Verification
295
+
296
+ In a Leptos full-stack project, `cargo build` and `cargo test` only compile for the **host target** (SSR). WASM frontend code is not compiled or verified by these commands. You **must** run:
297
+
298
+ ```bash
299
+ cargo leptos build
300
+ ```
301
+
302
+ This command builds both SSR and WASM targets. Common WASM-only compilation errors include:
303
+ - Using `std::fs`, `std::net`, or other APIs unavailable in `wasm32-unknown-unknown`
304
+ - Calling `tokio::spawn` or other runtime-specific code outside `#[cfg(feature = "ssr")]`
305
+ - Missing `#[cfg(feature = "ssr")]` guards on server-only dependencies
306
+
307
+ ### TDD with Leptos
308
+
309
+ - `cargo test` runs tests for the SSR target only. This is sufficient for server functions and repository logic
310
+ - Component rendering tests use `leptos::mount_to` in `#[cfg(test)]` blocks
311
+ - After Green phase in TDD, always run `cargo leptos build` to verify WASM compilation before proceeding to Refactor
312
+ - WASM compilation failure after Green is a signal that `#[cfg(feature = "ssr")]` guards are missing
313
+
314
+ ## Performance
315
+
316
+ - Keep signal granularity fine. Avoid wrapping large structs in a single signal
317
+ - Use `Memo` to prevent unnecessary recomputation
318
+ - Set keys correctly on the `For` component to minimize list re-rendering
319
+ - Use `Suspense` to isolate async data loading and reduce rendering blocks