@dewtech/dare-cli 3.3.0 → 3.5.0

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 (750) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +764 -764
  3. package/dist/__tests__/confidence.test.js +13 -13
  4. package/dist/__tests__/dag-converter.test.js +56 -56
  5. package/dist/__tests__/dag-runner/buildLocateContext.test.d.ts +2 -0
  6. package/dist/__tests__/dag-runner/buildLocateContext.test.d.ts.map +1 -0
  7. package/dist/__tests__/dag-runner/buildLocateContext.test.js +53 -0
  8. package/dist/__tests__/dag-runner/buildLocateContext.test.js.map +1 -0
  9. package/dist/__tests__/dual-graph.test.d.ts +2 -0
  10. package/dist/__tests__/dual-graph.test.d.ts.map +1 -0
  11. package/dist/__tests__/dual-graph.test.js +141 -0
  12. package/dist/__tests__/dual-graph.test.js.map +1 -0
  13. package/dist/__tests__/graphrag/contract/traverse.contract.d.ts +9 -0
  14. package/dist/__tests__/graphrag/contract/traverse.contract.d.ts.map +1 -0
  15. package/dist/__tests__/graphrag/contract/traverse.contract.js +58 -0
  16. package/dist/__tests__/graphrag/contract/traverse.contract.js.map +1 -0
  17. package/dist/__tests__/graphrag/contract/traverse.contract.test.d.ts +2 -0
  18. package/dist/__tests__/graphrag/contract/traverse.contract.test.d.ts.map +1 -0
  19. package/dist/__tests__/graphrag/contract/traverse.contract.test.js +100 -0
  20. package/dist/__tests__/graphrag/contract/traverse.contract.test.js.map +1 -0
  21. package/dist/__tests__/graphrag/factory.test.js +10 -1
  22. package/dist/__tests__/graphrag/factory.test.js.map +1 -1
  23. package/dist/__tests__/graphrag/fixtures/dual-graph/build-fixture-graph.d.ts +11 -0
  24. package/dist/__tests__/graphrag/fixtures/dual-graph/build-fixture-graph.d.ts.map +1 -0
  25. package/dist/__tests__/graphrag/fixtures/dual-graph/build-fixture-graph.js +34 -0
  26. package/dist/__tests__/graphrag/fixtures/dual-graph/build-fixture-graph.js.map +1 -0
  27. package/dist/__tests__/graphrag/fixtures/dual-graph/fixtures.test.d.ts +2 -0
  28. package/dist/__tests__/graphrag/fixtures/dual-graph/fixtures.test.d.ts.map +1 -0
  29. package/dist/__tests__/graphrag/fixtures/dual-graph/fixtures.test.js +46 -0
  30. package/dist/__tests__/graphrag/fixtures/dual-graph/fixtures.test.js.map +1 -0
  31. package/dist/__tests__/graphrag/graph-rag.test.js +31 -0
  32. package/dist/__tests__/graphrag/graph-rag.test.js.map +1 -1
  33. package/dist/__tests__/graphrag/json-graph.test.js +57 -0
  34. package/dist/__tests__/graphrag/json-graph.test.js.map +1 -1
  35. package/dist/__tests__/graphrag/neo4j-graph.test.d.ts +2 -0
  36. package/dist/__tests__/graphrag/neo4j-graph.test.d.ts.map +1 -0
  37. package/dist/__tests__/graphrag/neo4j-graph.test.js +104 -0
  38. package/dist/__tests__/graphrag/neo4j-graph.test.js.map +1 -0
  39. package/dist/__tests__/graphrag/neo4j-persistence.test.d.ts +2 -0
  40. package/dist/__tests__/graphrag/neo4j-persistence.test.d.ts.map +1 -0
  41. package/dist/__tests__/graphrag/neo4j-persistence.test.js +110 -0
  42. package/dist/__tests__/graphrag/neo4j-persistence.test.js.map +1 -0
  43. package/dist/__tests__/mcp-server/server.test.js +3 -16
  44. package/dist/__tests__/mcp-server/server.test.js.map +1 -1
  45. package/dist/__tests__/project-generator.test.js +2 -2
  46. package/dist/__tests__/project-generator.test.js.map +1 -1
  47. package/dist/__tests__/refine.test.js +49 -49
  48. package/dist/__tests__/reverse-collection.test.js +6 -6
  49. package/dist/__tests__/review.test.js +38 -38
  50. package/dist/__tests__/security-hardening.test.d.ts +2 -0
  51. package/dist/__tests__/security-hardening.test.d.ts.map +1 -0
  52. package/dist/__tests__/security-hardening.test.js +101 -0
  53. package/dist/__tests__/security-hardening.test.js.map +1 -0
  54. package/dist/__tests__/validate.test.js +65 -65
  55. package/dist/bin/dare.js +0 -0
  56. package/dist/commands/__tests__/execute.telemetry.spec.js +9 -0
  57. package/dist/commands/__tests__/execute.telemetry.spec.js.map +1 -1
  58. package/dist/commands/__tests__/graph-viz-layers.test.d.ts +2 -0
  59. package/dist/commands/__tests__/graph-viz-layers.test.d.ts.map +1 -0
  60. package/dist/commands/__tests__/graph-viz-layers.test.js +36 -0
  61. package/dist/commands/__tests__/graph-viz-layers.test.js.map +1 -0
  62. package/dist/commands/__tests__/impact.test.d.ts +2 -0
  63. package/dist/commands/__tests__/impact.test.d.ts.map +1 -0
  64. package/dist/commands/__tests__/impact.test.js +26 -0
  65. package/dist/commands/__tests__/impact.test.js.map +1 -0
  66. package/dist/commands/__tests__/init-validation.test.d.ts +2 -0
  67. package/dist/commands/__tests__/init-validation.test.d.ts.map +1 -0
  68. package/dist/commands/__tests__/init-validation.test.js +81 -0
  69. package/dist/commands/__tests__/init-validation.test.js.map +1 -0
  70. package/dist/commands/__tests__/init.integration.spec.js +6 -4
  71. package/dist/commands/__tests__/init.integration.spec.js.map +1 -1
  72. package/dist/commands/__tests__/init.spec.d.ts +2 -0
  73. package/dist/commands/__tests__/init.spec.d.ts.map +1 -0
  74. package/dist/commands/__tests__/init.spec.js +88 -0
  75. package/dist/commands/__tests__/init.spec.js.map +1 -0
  76. package/dist/commands/__tests__/locate.test.d.ts +2 -0
  77. package/dist/commands/__tests__/locate.test.d.ts.map +1 -0
  78. package/dist/commands/__tests__/locate.test.js +35 -0
  79. package/dist/commands/__tests__/locate.test.js.map +1 -0
  80. package/dist/commands/__tests__/owners.test.d.ts +2 -0
  81. package/dist/commands/__tests__/owners.test.d.ts.map +1 -0
  82. package/dist/commands/__tests__/owners.test.js +34 -0
  83. package/dist/commands/__tests__/owners.test.js.map +1 -0
  84. package/dist/commands/__tests__/trace.test.d.ts +2 -0
  85. package/dist/commands/__tests__/trace.test.d.ts.map +1 -0
  86. package/dist/commands/__tests__/trace.test.js +29 -0
  87. package/dist/commands/__tests__/trace.test.js.map +1 -0
  88. package/dist/commands/blueprint.js +122 -122
  89. package/dist/commands/design.js +20 -20
  90. package/dist/commands/execute.d.ts.map +1 -1
  91. package/dist/commands/execute.js +11 -6
  92. package/dist/commands/execute.js.map +1 -1
  93. package/dist/commands/graph-queries.d.ts +48 -0
  94. package/dist/commands/graph-queries.d.ts.map +1 -0
  95. package/dist/commands/graph-queries.js +204 -0
  96. package/dist/commands/graph-queries.js.map +1 -0
  97. package/dist/commands/graph.d.ts +13 -0
  98. package/dist/commands/graph.d.ts.map +1 -1
  99. package/dist/commands/graph.js +212 -8
  100. package/dist/commands/graph.js.map +1 -1
  101. package/dist/commands/init-validation.d.ts +22 -0
  102. package/dist/commands/init-validation.d.ts.map +1 -0
  103. package/dist/commands/init-validation.js +54 -0
  104. package/dist/commands/init-validation.js.map +1 -0
  105. package/dist/commands/init.d.ts.map +1 -1
  106. package/dist/commands/init.js +26 -10
  107. package/dist/commands/init.js.map +1 -1
  108. package/dist/dag-runner/__tests__/fixtures/src/math.d.ts +3 -0
  109. package/dist/dag-runner/__tests__/fixtures/src/math.d.ts.map +1 -0
  110. package/dist/dag-runner/__tests__/fixtures/src/math.js +7 -0
  111. package/dist/dag-runner/__tests__/fixtures/src/math.js.map +1 -0
  112. package/dist/dag-runner/__tests__/graph-ingest-symbols.test.d.ts +2 -0
  113. package/dist/dag-runner/__tests__/graph-ingest-symbols.test.d.ts.map +1 -0
  114. package/dist/dag-runner/__tests__/graph-ingest-symbols.test.js +81 -0
  115. package/dist/dag-runner/__tests__/graph-ingest-symbols.test.js.map +1 -0
  116. package/dist/dag-runner/graph-ingest.d.ts.map +1 -1
  117. package/dist/dag-runner/graph-ingest.js +46 -0
  118. package/dist/dag-runner/graph-ingest.js.map +1 -1
  119. package/dist/dag-runner/graph-locate.d.ts +11 -0
  120. package/dist/dag-runner/graph-locate.d.ts.map +1 -0
  121. package/dist/dag-runner/graph-locate.js +74 -0
  122. package/dist/dag-runner/graph-locate.js.map +1 -0
  123. package/dist/dag-runner/run_dag.d.ts +3 -1
  124. package/dist/dag-runner/run_dag.d.ts.map +1 -1
  125. package/dist/dag-runner/run_dag.js +2 -1
  126. package/dist/dag-runner/run_dag.js.map +1 -1
  127. package/dist/dag-runner/utils/stitch-context.d.ts +3 -1
  128. package/dist/dag-runner/utils/stitch-context.d.ts.map +1 -1
  129. package/dist/dag-runner/utils/stitch-context.js +8 -2
  130. package/dist/dag-runner/utils/stitch-context.js.map +1 -1
  131. package/dist/graphrag/__tests__/code-index.test.d.ts +2 -0
  132. package/dist/graphrag/__tests__/code-index.test.d.ts.map +1 -0
  133. package/dist/graphrag/__tests__/code-index.test.js +75 -0
  134. package/dist/graphrag/__tests__/code-index.test.js.map +1 -0
  135. package/dist/graphrag/__tests__/fixtures/code-index/sample.d.ts +5 -0
  136. package/dist/graphrag/__tests__/fixtures/code-index/sample.d.ts.map +1 -0
  137. package/dist/graphrag/__tests__/fixtures/code-index/sample.js +10 -0
  138. package/dist/graphrag/__tests__/fixtures/code-index/sample.js.map +1 -0
  139. package/dist/graphrag/__tests__/locate.test.d.ts +2 -0
  140. package/dist/graphrag/__tests__/locate.test.d.ts.map +1 -0
  141. package/dist/graphrag/__tests__/locate.test.js +43 -0
  142. package/dist/graphrag/__tests__/locate.test.js.map +1 -0
  143. package/dist/graphrag/__tests__/requirement-ingest.test.d.ts +2 -0
  144. package/dist/graphrag/__tests__/requirement-ingest.test.d.ts.map +1 -0
  145. package/dist/graphrag/__tests__/requirement-ingest.test.js +66 -0
  146. package/dist/graphrag/__tests__/requirement-ingest.test.js.map +1 -0
  147. package/dist/graphrag/__tests__/traverse.test.d.ts +2 -0
  148. package/dist/graphrag/__tests__/traverse.test.d.ts.map +1 -0
  149. package/dist/graphrag/__tests__/traverse.test.js +71 -0
  150. package/dist/graphrag/__tests__/traverse.test.js.map +1 -0
  151. package/dist/graphrag/__tests__/types.test.d.ts +2 -0
  152. package/dist/graphrag/__tests__/types.test.d.ts.map +1 -0
  153. package/dist/graphrag/__tests__/types.test.js +52 -0
  154. package/dist/graphrag/__tests__/types.test.js.map +1 -0
  155. package/dist/graphrag/code-index.d.ts +15 -0
  156. package/dist/graphrag/code-index.d.ts.map +1 -0
  157. package/dist/graphrag/code-index.js +205 -0
  158. package/dist/graphrag/code-index.js.map +1 -0
  159. package/dist/graphrag/factory.d.ts.map +1 -1
  160. package/dist/graphrag/factory.js +5 -0
  161. package/dist/graphrag/factory.js.map +1 -1
  162. package/dist/graphrag/graph-rag.d.ts +6 -2
  163. package/dist/graphrag/graph-rag.d.ts.map +1 -1
  164. package/dist/graphrag/graph-rag.js +64 -26
  165. package/dist/graphrag/graph-rag.js.map +1 -1
  166. package/dist/graphrag/index.d.ts +8 -2
  167. package/dist/graphrag/index.d.ts.map +1 -1
  168. package/dist/graphrag/index.js +5 -1
  169. package/dist/graphrag/index.js.map +1 -1
  170. package/dist/graphrag/json-graph.d.ts +8 -0
  171. package/dist/graphrag/json-graph.d.ts.map +1 -1
  172. package/dist/graphrag/json-graph.js +50 -4
  173. package/dist/graphrag/json-graph.js.map +1 -1
  174. package/dist/graphrag/knowledge-graph.d.ts +8 -3
  175. package/dist/graphrag/knowledge-graph.d.ts.map +1 -1
  176. package/dist/graphrag/neo4j-graph.d.ts +19 -18
  177. package/dist/graphrag/neo4j-graph.d.ts.map +1 -1
  178. package/dist/graphrag/neo4j-graph.js +164 -38
  179. package/dist/graphrag/neo4j-graph.js.map +1 -1
  180. package/dist/graphrag/requirement-ingest.d.ts +15 -0
  181. package/dist/graphrag/requirement-ingest.d.ts.map +1 -0
  182. package/dist/graphrag/requirement-ingest.js +158 -0
  183. package/dist/graphrag/requirement-ingest.js.map +1 -0
  184. package/dist/graphrag/traverse.d.ts +5 -0
  185. package/dist/graphrag/traverse.d.ts.map +1 -0
  186. package/dist/graphrag/traverse.js +139 -0
  187. package/dist/graphrag/traverse.js.map +1 -0
  188. package/dist/graphrag/types.d.ts +60 -2
  189. package/dist/graphrag/types.d.ts.map +1 -1
  190. package/dist/graphrag/types.js +34 -1
  191. package/dist/graphrag/types.js.map +1 -1
  192. package/dist/mcp-server/__tests__/auth.test.d.ts +2 -0
  193. package/dist/mcp-server/__tests__/auth.test.d.ts.map +1 -0
  194. package/dist/mcp-server/__tests__/auth.test.js +72 -0
  195. package/dist/mcp-server/__tests__/auth.test.js.map +1 -0
  196. package/dist/mcp-server/__tests__/boot-config.test.d.ts +2 -0
  197. package/dist/mcp-server/__tests__/boot-config.test.d.ts.map +1 -0
  198. package/dist/mcp-server/__tests__/boot-config.test.js +29 -0
  199. package/dist/mcp-server/__tests__/boot-config.test.js.map +1 -0
  200. package/dist/mcp-server/__tests__/error-sanitize.test.d.ts +2 -0
  201. package/dist/mcp-server/__tests__/error-sanitize.test.d.ts.map +1 -0
  202. package/dist/mcp-server/__tests__/error-sanitize.test.js +66 -0
  203. package/dist/mcp-server/__tests__/error-sanitize.test.js.map +1 -0
  204. package/dist/mcp-server/__tests__/mcp-graph.test.d.ts +2 -0
  205. package/dist/mcp-server/__tests__/mcp-graph.test.d.ts.map +1 -0
  206. package/dist/mcp-server/__tests__/mcp-graph.test.js +85 -0
  207. package/dist/mcp-server/__tests__/mcp-graph.test.js.map +1 -0
  208. package/dist/mcp-server/__tests__/path-confinement.test.d.ts +2 -0
  209. package/dist/mcp-server/__tests__/path-confinement.test.d.ts.map +1 -0
  210. package/dist/mcp-server/__tests__/path-confinement.test.js +135 -0
  211. package/dist/mcp-server/__tests__/path-confinement.test.js.map +1 -0
  212. package/dist/mcp-server/bin/server.js +18 -6
  213. package/dist/mcp-server/bin/server.js.map +1 -1
  214. package/dist/mcp-server/boot-config.d.ts +6 -0
  215. package/dist/mcp-server/boot-config.d.ts.map +1 -0
  216. package/dist/mcp-server/boot-config.js +17 -0
  217. package/dist/mcp-server/boot-config.js.map +1 -0
  218. package/dist/mcp-server/middleware/auth.d.ts +10 -0
  219. package/dist/mcp-server/middleware/auth.d.ts.map +1 -0
  220. package/dist/mcp-server/middleware/auth.js +44 -0
  221. package/dist/mcp-server/middleware/auth.js.map +1 -0
  222. package/dist/mcp-server/middleware/cors.d.ts +6 -0
  223. package/dist/mcp-server/middleware/cors.d.ts.map +1 -0
  224. package/dist/mcp-server/middleware/cors.js +30 -0
  225. package/dist/mcp-server/middleware/cors.js.map +1 -0
  226. package/dist/mcp-server/middleware/error-handler.d.ts +11 -0
  227. package/dist/mcp-server/middleware/error-handler.d.ts.map +1 -0
  228. package/dist/mcp-server/middleware/error-handler.js +14 -0
  229. package/dist/mcp-server/middleware/error-handler.js.map +1 -0
  230. package/dist/mcp-server/server.d.ts +7 -2
  231. package/dist/mcp-server/server.d.ts.map +1 -1
  232. package/dist/mcp-server/server.js +290 -105
  233. package/dist/mcp-server/server.js.map +1 -1
  234. package/dist/skills/registry-mock.json +109 -109
  235. package/dist/skills/tests/manifest.spec.js +20 -20
  236. package/dist/stacks/__tests__/dna-emitter.spec.js +6 -6
  237. package/dist/stacks/dna-emitter.js +69 -69
  238. package/dist/stacks/ruby-rails-8/scaffold.js +15 -15
  239. package/dist/utils/__tests__/static-analyzer-exports.test.d.ts +2 -0
  240. package/dist/utils/__tests__/static-analyzer-exports.test.d.ts.map +1 -0
  241. package/dist/utils/__tests__/static-analyzer-exports.test.js +21 -0
  242. package/dist/utils/__tests__/static-analyzer-exports.test.js.map +1 -0
  243. package/dist/utils/project-generator.d.ts.map +1 -1
  244. package/dist/utils/project-generator.js +266 -252
  245. package/dist/utils/project-generator.js.map +1 -1
  246. package/dist/utils/stack-bootstrap.js +371 -371
  247. package/dist/utils/static-analyzer.d.ts +9 -0
  248. package/dist/utils/static-analyzer.d.ts.map +1 -1
  249. package/dist/utils/static-analyzer.js +2 -2
  250. package/dist/utils/static-analyzer.js.map +1 -1
  251. package/dist/utils/templates.js +394 -394
  252. package/dist/verification/__tests__/anti-tamper.test.js +13 -13
  253. package/dist/verification/__tests__/telemetry.test.js +9 -0
  254. package/dist/verification/__tests__/telemetry.test.js.map +1 -1
  255. package/package.json +96 -93
  256. package/templates/DARE-dag-example.yaml +280 -280
  257. package/templates/UPDATE-MANIFEST.json +68 -68
  258. package/templates/backend/node-nestjs/.env.example +9 -9
  259. package/templates/backend/node-nestjs/nest-cli.json +8 -8
  260. package/templates/backend/node-nestjs/package.json +50 -50
  261. package/templates/backend/node-nestjs/src/app.controller.ts +12 -12
  262. package/templates/backend/node-nestjs/src/app.module.ts +15 -15
  263. package/templates/backend/node-nestjs/src/app.service.ts +8 -8
  264. package/templates/backend/node-nestjs/src/main.ts +24 -24
  265. package/templates/backend/node-nestjs/tsconfig.json +21 -21
  266. package/templates/backend/php-laravel/.env.example +22 -22
  267. package/templates/backend/php-laravel/app/Http/Controllers/HealthController.php +15 -15
  268. package/templates/backend/php-laravel/composer.json +40 -40
  269. package/templates/backend/python-fastapi/.env.example +4 -4
  270. package/templates/backend/python-fastapi/app/api/router.py +8 -8
  271. package/templates/backend/python-fastapi/app/core/config.py +20 -20
  272. package/templates/backend/python-fastapi/main.py +35 -35
  273. package/templates/backend/python-fastapi/requirements.txt +13 -13
  274. package/templates/backend/rust-axum/.env.example +3 -3
  275. package/templates/backend/rust-axum/Cargo.toml +23 -23
  276. package/templates/backend/rust-axum/src/errors.rs +30 -30
  277. package/templates/backend/rust-axum/src/main.rs +32 -32
  278. package/templates/backend/rust-axum/src/routes.rs +6 -6
  279. package/templates/frontend/leptos-csr/.cargo/config.toml +2 -2
  280. package/templates/frontend/leptos-csr/Cargo.toml +16 -16
  281. package/templates/frontend/leptos-csr/Trunk.toml +10 -10
  282. package/templates/frontend/leptos-csr/index.html +11 -11
  283. package/templates/frontend/leptos-csr/src/lib.rs +20 -20
  284. package/templates/frontend/leptos-csr/style/main.scss +19 -19
  285. package/templates/frontend/leptos-fullstack/.cargo/config.toml +4 -4
  286. package/templates/frontend/leptos-fullstack/Cargo.toml +56 -56
  287. package/templates/frontend/leptos-fullstack/src/app.rs +49 -49
  288. package/templates/frontend/leptos-fullstack/src/lib.rs +9 -9
  289. package/templates/frontend/leptos-fullstack/src/main.rs +29 -29
  290. package/templates/frontend/leptos-fullstack/style/main.scss +19 -19
  291. package/templates/frontend/react/index.html +12 -12
  292. package/templates/frontend/react/package.json +35 -35
  293. package/templates/frontend/react/src/App.tsx +25 -25
  294. package/templates/frontend/react/src/main.tsx +9 -9
  295. package/templates/frontend/vue/package.json +32 -32
  296. package/templates/frontend/vue/src/App.vue +7 -7
  297. package/templates/frontend/vue/src/main.ts +10 -10
  298. package/templates/frontend/vue/src/router/index.ts +14 -14
  299. package/templates/frontend/vue/src/views/HomeView.vue +6 -6
  300. package/templates/hooks/pre-commit-dare-validate +24 -24
  301. package/templates/ide/antigravity/.agents/skills/dare-ax/SKILL.md +152 -152
  302. package/templates/ide/antigravity/.agents/skills/dare-bench/SKILL.md +21 -21
  303. package/templates/ide/antigravity/.agents/skills/dare-blueprint/SKILL.md +368 -368
  304. package/templates/ide/antigravity/.agents/skills/dare-bootstrap/SKILL.md +32 -32
  305. package/templates/ide/antigravity/.agents/skills/dare-bugfix-design/SKILL.md +76 -76
  306. package/templates/ide/antigravity/.agents/skills/dare-dag/SKILL.md +32 -32
  307. package/templates/ide/antigravity/.agents/skills/dare-dag-build/SKILL.md +154 -154
  308. package/templates/ide/antigravity/.agents/skills/dare-dag-run/SKILL.md +130 -130
  309. package/templates/ide/antigravity/.agents/skills/dare-dag-runner/SKILL.md +203 -203
  310. package/templates/ide/antigravity/.agents/skills/dare-design/SKILL.md +180 -180
  311. package/templates/ide/antigravity/.agents/skills/dare-discover/SKILL.md +33 -33
  312. package/templates/ide/antigravity/.agents/skills/dare-dna/SKILL.md +63 -63
  313. package/templates/ide/antigravity/.agents/skills/dare-docker/SKILL.md +315 -315
  314. package/templates/ide/antigravity/.agents/skills/dare-execute/SKILL.md +264 -264
  315. package/templates/ide/antigravity/.agents/skills/dare-feature-design/SKILL.md +74 -74
  316. package/templates/ide/antigravity/.agents/skills/dare-frontend-design/SKILL.md +192 -192
  317. package/templates/ide/antigravity/.agents/skills/dare-graph/SKILL.md +35 -35
  318. package/templates/ide/antigravity/.agents/skills/dare-info/SKILL.md +31 -31
  319. package/templates/ide/antigravity/.agents/skills/dare-init/SKILL.md +35 -35
  320. package/templates/ide/antigravity/.agents/skills/dare-laravel-api/SKILL.md +337 -337
  321. package/templates/ide/antigravity/.agents/skills/dare-layered-design/SKILL.md +166 -166
  322. package/templates/ide/antigravity/.agents/skills/dare-llm-integration/SKILL.md +217 -217
  323. package/templates/ide/antigravity/.agents/skills/dare-migrate/SKILL.md +61 -61
  324. package/templates/ide/antigravity/.agents/skills/dare-quality-telemetry/SKILL.md +187 -187
  325. package/templates/ide/antigravity/.agents/skills/dare-realtime/SKILL.md +217 -217
  326. package/templates/ide/antigravity/.agents/skills/dare-refine/SKILL.md +114 -114
  327. package/templates/ide/antigravity/.agents/skills/dare-reverse/SKILL.md +108 -108
  328. package/templates/ide/antigravity/.agents/skills/dare-review/SKILL.md +111 -111
  329. package/templates/ide/antigravity/.agents/skills/dare-rust-leptos/SKILL.md +263 -263
  330. package/templates/ide/antigravity/.agents/skills/dare-rust-workspace/SKILL.md +275 -275
  331. package/templates/ide/antigravity/.agents/skills/dare-security/SKILL.md +274 -274
  332. package/templates/ide/antigravity/.agents/skills/dare-skill/SKILL.md +35 -35
  333. package/templates/ide/antigravity/.agents/skills/dare-tasks/SKILL.md +265 -265
  334. package/templates/ide/antigravity/.agents/skills/dare-telemetry/SKILL.md +188 -188
  335. package/templates/ide/antigravity/.agents/skills/dare-update/SKILL.md +33 -33
  336. package/templates/ide/antigravity/.agents/skills/dare-validate/SKILL.md +33 -33
  337. package/templates/ide/antigravity/.agents/skills/dare-welcome/SKILL.md +30 -30
  338. package/templates/ide/antigravity/.agents/skills/skill-fastapi-api/SKILL.md +343 -343
  339. package/templates/ide/antigravity/.agents/skills/skill-go-gin-api/SKILL.md +377 -377
  340. package/templates/ide/antigravity/.agents/skills/skill-mcp-server/SKILL.md +382 -382
  341. package/templates/ide/antigravity/.agents/skills/skill-nestjs-api/SKILL.md +326 -326
  342. package/templates/ide/antigravity/.agents/skills/skill-rails-api/SKILL.md +393 -393
  343. package/templates/ide/antigravity/templates/BLUEPRINT-template.md +193 -193
  344. package/templates/ide/antigravity/templates/DESIGN-template.md +129 -129
  345. package/templates/ide/antigravity/templates/TASK-SPEC-template.md +141 -141
  346. package/templates/ide/antigravity/templates/TASKS-template.md +26 -26
  347. package/templates/ide/antigravity/templates/TELEMETRY-template.md +125 -125
  348. package/templates/ide/claude/.claude/commands/dare-ax.md +131 -131
  349. package/templates/ide/claude/.claude/commands/dare-bench.md +18 -18
  350. package/templates/ide/claude/.claude/commands/dare-blueprint.md +134 -134
  351. package/templates/ide/claude/.claude/commands/dare-bootstrap.md +27 -27
  352. package/templates/ide/claude/.claude/commands/dare-bugfix-design.md +119 -119
  353. package/templates/ide/claude/.claude/commands/dare-dag-build.md +151 -151
  354. package/templates/ide/claude/.claude/commands/dare-dag-run.md +109 -109
  355. package/templates/ide/claude/.claude/commands/dare-dag-runner.md +117 -117
  356. package/templates/ide/claude/.claude/commands/dare-dag-viz.md +197 -197
  357. package/templates/ide/claude/.claude/commands/dare-dag.md +27 -27
  358. package/templates/ide/claude/.claude/commands/dare-design.md +69 -69
  359. package/templates/ide/claude/.claude/commands/dare-discover.md +28 -28
  360. package/templates/ide/claude/.claude/commands/dare-dna.md +75 -75
  361. package/templates/ide/claude/.claude/commands/dare-docker.md +207 -207
  362. package/templates/ide/claude/.claude/commands/dare-execute.md +152 -152
  363. package/templates/ide/claude/.claude/commands/dare-feature-design.md +147 -147
  364. package/templates/ide/claude/.claude/commands/dare-frontend-design.md +149 -149
  365. package/templates/ide/claude/.claude/commands/dare-graph.md +30 -30
  366. package/templates/ide/claude/.claude/commands/dare-info.md +26 -26
  367. package/templates/ide/claude/.claude/commands/dare-init.md +30 -30
  368. package/templates/ide/claude/.claude/commands/dare-laravel-api.md +211 -211
  369. package/templates/ide/claude/.claude/commands/dare-layered-design.md +124 -124
  370. package/templates/ide/claude/.claude/commands/dare-llm-integration.md +148 -148
  371. package/templates/ide/claude/.claude/commands/dare-migrate.md +72 -72
  372. package/templates/ide/claude/.claude/commands/dare-quality-telemetry.md +166 -166
  373. package/templates/ide/claude/.claude/commands/dare-realtime.md +159 -159
  374. package/templates/ide/claude/.claude/commands/dare-refine.md +145 -145
  375. package/templates/ide/claude/.claude/commands/dare-reverse.md +139 -139
  376. package/templates/ide/claude/.claude/commands/dare-review.md +113 -113
  377. package/templates/ide/claude/.claude/commands/dare-rust-leptos.md +269 -269
  378. package/templates/ide/claude/.claude/commands/dare-rust-workspace.md +209 -209
  379. package/templates/ide/claude/.claude/commands/dare-security.md +232 -232
  380. package/templates/ide/claude/.claude/commands/dare-skill.md +30 -30
  381. package/templates/ide/claude/.claude/commands/dare-tasks.md +70 -70
  382. package/templates/ide/claude/.claude/commands/dare-telemetry.md +132 -132
  383. package/templates/ide/claude/.claude/commands/dare-update.md +28 -28
  384. package/templates/ide/claude/.claude/commands/dare-validate.md +28 -28
  385. package/templates/ide/claude/.claude/commands/dare-welcome.md +25 -25
  386. package/templates/ide/claude/.claude/commands/skill-fastapi-api.md +205 -205
  387. package/templates/ide/claude/.claude/commands/skill-go-gin-api.md +232 -232
  388. package/templates/ide/claude/.claude/commands/skill-mcp-server.md +228 -228
  389. package/templates/ide/claude/.claude/commands/skill-nestjs-api.md +210 -210
  390. package/templates/ide/claude/.claude/commands/skill-rails-api.md +236 -236
  391. package/templates/ide/claude/.claude/settings.example.json +35 -35
  392. package/templates/ide/claude/CLAUDE.md +146 -146
  393. package/templates/ide/claude/templates/BLUEPRINT-template.md +193 -193
  394. package/templates/ide/claude/templates/DESIGN-template.md +129 -129
  395. package/templates/ide/claude/templates/TASK-SPEC-template.md +141 -141
  396. package/templates/ide/claude/templates/TASKS-template.md +26 -26
  397. package/templates/ide/claude/templates/TELEMETRY-template.md +125 -125
  398. package/templates/ide/cursor/.cursor/commands/dare-bench.md +18 -18
  399. package/templates/ide/cursor/.cursor/commands/dare-blueprint.md +86 -86
  400. package/templates/ide/cursor/.cursor/commands/dare-bootstrap.md +27 -27
  401. package/templates/ide/cursor/.cursor/commands/dare-bugfix-design.md +64 -64
  402. package/templates/ide/cursor/.cursor/commands/dare-dag-run.md +110 -110
  403. package/templates/ide/cursor/.cursor/commands/dare-dag-viz.md +139 -139
  404. package/templates/ide/cursor/.cursor/commands/dare-dag.md +27 -27
  405. package/templates/ide/cursor/.cursor/commands/dare-design.md +35 -35
  406. package/templates/ide/cursor/.cursor/commands/dare-discover.md +28 -28
  407. package/templates/ide/cursor/.cursor/commands/dare-dna.md +75 -75
  408. package/templates/ide/cursor/.cursor/commands/dare-docker-compose.md +18 -18
  409. package/templates/ide/cursor/.cursor/commands/dare-dockerfile.md +17 -17
  410. package/templates/ide/cursor/.cursor/commands/dare-execute.md +19 -19
  411. package/templates/ide/cursor/.cursor/commands/dare-feature-design.md +64 -64
  412. package/templates/ide/cursor/.cursor/commands/dare-graph.md +30 -30
  413. package/templates/ide/cursor/.cursor/commands/dare-info.md +26 -26
  414. package/templates/ide/cursor/.cursor/commands/dare-init.md +30 -30
  415. package/templates/ide/cursor/.cursor/commands/dare-migrate.md +72 -72
  416. package/templates/ide/cursor/.cursor/commands/dare-refine.md +107 -107
  417. package/templates/ide/cursor/.cursor/commands/dare-reverse.md +139 -139
  418. package/templates/ide/cursor/.cursor/commands/dare-review.md +91 -91
  419. package/templates/ide/cursor/.cursor/commands/dare-skill.md +30 -30
  420. package/templates/ide/cursor/.cursor/commands/dare-tasks.md +184 -184
  421. package/templates/ide/cursor/.cursor/commands/dare-telemetry.md +42 -42
  422. package/templates/ide/cursor/.cursor/commands/dare-update.md +28 -28
  423. package/templates/ide/cursor/.cursor/commands/dare-validate.md +28 -28
  424. package/templates/ide/cursor/.cursor/commands/dare-welcome.md +25 -25
  425. package/templates/ide/cursor/.cursor/rules/skill-ax.mdc +263 -263
  426. package/templates/ide/cursor/.cursor/rules/skill-bugfix-design.mdc +51 -51
  427. package/templates/ide/cursor/.cursor/rules/skill-dag-build.mdc +173 -173
  428. package/templates/ide/cursor/.cursor/rules/skill-dag-run.mdc +134 -134
  429. package/templates/ide/cursor/.cursor/rules/skill-dag-runner.mdc +221 -221
  430. package/templates/ide/cursor/.cursor/rules/skill-dna.mdc +63 -63
  431. package/templates/ide/cursor/.cursor/rules/skill-docker.mdc +33 -33
  432. package/templates/ide/cursor/.cursor/rules/skill-fastapi-api.mdc +352 -352
  433. package/templates/ide/cursor/.cursor/rules/skill-feature-design.mdc +43 -43
  434. package/templates/ide/cursor/.cursor/rules/skill-frontend-design.mdc +244 -244
  435. package/templates/ide/cursor/.cursor/rules/skill-go-gin-api.mdc +371 -371
  436. package/templates/ide/cursor/.cursor/rules/skill-laravel-api.mdc +44 -44
  437. package/templates/ide/cursor/.cursor/rules/skill-layered-design.mdc +266 -266
  438. package/templates/ide/cursor/.cursor/rules/skill-llm-integration.mdc +295 -295
  439. package/templates/ide/cursor/.cursor/rules/skill-mcp-server.mdc +367 -367
  440. package/templates/ide/cursor/.cursor/rules/skill-migrate.mdc +58 -58
  441. package/templates/ide/cursor/.cursor/rules/skill-nestjs-api.mdc +346 -346
  442. package/templates/ide/cursor/.cursor/rules/skill-quality-telemetry.mdc +248 -248
  443. package/templates/ide/cursor/.cursor/rules/skill-rails-api.mdc +400 -400
  444. package/templates/ide/cursor/.cursor/rules/skill-realtime.mdc +262 -262
  445. package/templates/ide/cursor/.cursor/rules/skill-reverse.mdc +107 -107
  446. package/templates/ide/cursor/.cursor/rules/skill-rust-leptos.mdc +281 -281
  447. package/templates/ide/cursor/.cursor/rules/skill-rust-workspace.mdc +312 -312
  448. package/templates/ide/cursor/.cursor/rules/skill-security.mdc +245 -245
  449. package/templates/ide/cursor/.cursor/rules/skill-telemetry.mdc +156 -156
  450. package/templates/ide/cursor/templates/BLUEPRINT-template.md +193 -193
  451. package/templates/ide/cursor/templates/DESIGN-template.md +129 -129
  452. package/templates/ide/cursor/templates/TASK-SPEC-template.md +141 -141
  453. package/templates/ide/cursor/templates/TASKS-template.md +26 -26
  454. package/templates/ide/cursor/templates/TELEMETRY-template.md +125 -125
  455. package/templates/shared/docker-compose.yml +41 -41
  456. package/templates/stacks/go-gin/.dare/skills.yml +11 -11
  457. package/templates/stacks/go-gin/.env.example +24 -24
  458. package/templates/stacks/go-gin/.github/workflows/dare-ci.yml +42 -42
  459. package/templates/stacks/go-gin/README.md.tpl +38 -38
  460. package/templates/stacks/go-gin/cmd/server/main.go.tpl +78 -78
  461. package/templates/stacks/go-gin/db/migrations/0001_create_users.down.sql +2 -2
  462. package/templates/stacks/go-gin/db/migrations/0001_create_users.up.sql +12 -12
  463. package/templates/stacks/go-gin/db/queries/users.sql +23 -23
  464. package/templates/stacks/go-gin/gitignore +7 -7
  465. package/templates/stacks/go-gin/go.mod.tpl +17 -17
  466. package/templates/stacks/go-gin/internal/config/config.go +41 -41
  467. package/templates/stacks/go-gin/internal/db/postgres.go.tpl +25 -25
  468. package/templates/stacks/go-gin/internal/handler/auth_handler.go.tpl +72 -72
  469. package/templates/stacks/go-gin/internal/handler/users_handler.go.tpl +72 -72
  470. package/templates/stacks/go-gin/internal/handler/ws_handler.go +37 -37
  471. package/templates/stacks/go-gin/internal/llm/dummy.go +14 -14
  472. package/templates/stacks/go-gin/internal/llm/provider.go +8 -8
  473. package/templates/stacks/go-gin/internal/middleware/jwt.go.tpl +58 -58
  474. package/templates/stacks/go-gin/internal/middleware/rate_limit.go +55 -55
  475. package/templates/stacks/go-gin/internal/model/user.go +17 -17
  476. package/templates/stacks/go-gin/internal/repository/users_repository.go.tpl +79 -79
  477. package/templates/stacks/go-gin/internal/service/auth_service.go.tpl +55 -55
  478. package/templates/stacks/go-gin/internal/service/users_service.go.tpl +53 -53
  479. package/templates/stacks/go-gin/llms.txt.tpl +54 -54
  480. package/templates/stacks/go-gin/openapi.json.tpl +46 -46
  481. package/templates/stacks/go-gin/sqlc.yaml +14 -14
  482. package/templates/stacks/go-gin/tests/smoke_test.go.tpl +22 -22
  483. package/templates/stacks/go-stdlib/.dare/skills.yml +11 -11
  484. package/templates/stacks/go-stdlib/.env.example +24 -24
  485. package/templates/stacks/go-stdlib/.github/workflows/dare-ci.yml +42 -42
  486. package/templates/stacks/go-stdlib/README.md.tpl +41 -41
  487. package/templates/stacks/go-stdlib/cmd/server/main.go.tpl +82 -82
  488. package/templates/stacks/go-stdlib/db/migrations/0001_create_users.down.sql +2 -2
  489. package/templates/stacks/go-stdlib/db/migrations/0001_create_users.up.sql +12 -12
  490. package/templates/stacks/go-stdlib/db/queries/users.sql +23 -23
  491. package/templates/stacks/go-stdlib/gitignore +6 -6
  492. package/templates/stacks/go-stdlib/go.mod.tpl +15 -15
  493. package/templates/stacks/go-stdlib/internal/config/config.go +41 -41
  494. package/templates/stacks/go-stdlib/internal/db/postgres.go.tpl +24 -24
  495. package/templates/stacks/go-stdlib/internal/handler/auth_handler.go.tpl +71 -71
  496. package/templates/stacks/go-stdlib/internal/handler/users_handler.go.tpl +84 -84
  497. package/templates/stacks/go-stdlib/internal/handler/ws_handler.go +36 -36
  498. package/templates/stacks/go-stdlib/internal/httpx/json.go +32 -32
  499. package/templates/stacks/go-stdlib/internal/llm/dummy.go +14 -14
  500. package/templates/stacks/go-stdlib/internal/llm/provider.go +8 -8
  501. package/templates/stacks/go-stdlib/internal/middleware/chain.go +21 -21
  502. package/templates/stacks/go-stdlib/internal/middleware/cors.go +27 -27
  503. package/templates/stacks/go-stdlib/internal/middleware/jwt.go.tpl +51 -51
  504. package/templates/stacks/go-stdlib/internal/middleware/rate_limit.go +81 -81
  505. package/templates/stacks/go-stdlib/internal/model/user.go +17 -17
  506. package/templates/stacks/go-stdlib/internal/repository/users_repository.go.tpl +75 -75
  507. package/templates/stacks/go-stdlib/internal/service/auth_service.go.tpl +55 -55
  508. package/templates/stacks/go-stdlib/internal/service/users_service.go.tpl +53 -53
  509. package/templates/stacks/go-stdlib/llms.txt.tpl +60 -60
  510. package/templates/stacks/go-stdlib/openapi.json.tpl +46 -46
  511. package/templates/stacks/go-stdlib/sqlc.yaml +14 -14
  512. package/templates/stacks/go-stdlib/tests/smoke_test.go.tpl +45 -45
  513. package/templates/stacks/mcp-go/.dare/skills.yml +8 -8
  514. package/templates/stacks/mcp-go/.env.example +14 -14
  515. package/templates/stacks/mcp-go/.github/workflows/dare-ci.yml +42 -42
  516. package/templates/stacks/mcp-go/README.md.tpl +50 -50
  517. package/templates/stacks/mcp-go/cmd/server/main.go.tpl +62 -62
  518. package/templates/stacks/mcp-go/gitignore +6 -6
  519. package/templates/stacks/mcp-go/go.mod.tpl +9 -9
  520. package/templates/stacks/mcp-go/internal/prompts/summarize.go +9 -9
  521. package/templates/stacks/mcp-go/internal/server/server.go.tpl +80 -80
  522. package/templates/stacks/mcp-go/internal/tools/echo.go +15 -15
  523. package/templates/stacks/mcp-go/internal/transports/http.go.tpl +21 -21
  524. package/templates/stacks/mcp-go/internal/transports/sse.go.tpl +17 -17
  525. package/templates/stacks/mcp-go/internal/transports/stdio.go.tpl +14 -14
  526. package/templates/stacks/mcp-go/llms.txt.tpl +60 -60
  527. package/templates/stacks/mcp-go/openapi.json.tpl +31 -31
  528. package/templates/stacks/mcp-go/tests/echo_test.go.tpl +37 -37
  529. package/templates/stacks/mcp-node-ts/.dare/skills.yml +8 -8
  530. package/templates/stacks/mcp-node-ts/.env.example +16 -16
  531. package/templates/stacks/mcp-node-ts/.github/workflows/dare-ci.yml +54 -54
  532. package/templates/stacks/mcp-node-ts/README.md.hbs +49 -49
  533. package/templates/stacks/mcp-node-ts/gitignore +7 -7
  534. package/templates/stacks/mcp-node-ts/llms.txt.hbs +61 -61
  535. package/templates/stacks/mcp-node-ts/openapi.json.hbs +39 -39
  536. package/templates/stacks/mcp-node-ts/package.json.hbs +35 -35
  537. package/templates/stacks/mcp-node-ts/src/cli.ts.hbs +71 -71
  538. package/templates/stacks/mcp-node-ts/src/prompts/index.ts +36 -36
  539. package/templates/stacks/mcp-node-ts/src/server.ts.hbs +45 -45
  540. package/templates/stacks/mcp-node-ts/src/tools/echo.ts +23 -23
  541. package/templates/stacks/mcp-node-ts/src/tools/index.ts +18 -18
  542. package/templates/stacks/mcp-node-ts/src/transports/http.ts +68 -68
  543. package/templates/stacks/mcp-node-ts/src/transports/sse.ts +58 -58
  544. package/templates/stacks/mcp-node-ts/src/transports/stdio.ts +5 -5
  545. package/templates/stacks/mcp-node-ts/tests/echo.test.ts +50 -50
  546. package/templates/stacks/mcp-node-ts/tsconfig.json +17 -17
  547. package/templates/stacks/mcp-python/.dare/skills.yml +8 -8
  548. package/templates/stacks/mcp-python/.env.example +14 -14
  549. package/templates/stacks/mcp-python/.github/workflows/dare-ci.yml +42 -42
  550. package/templates/stacks/mcp-python/README.md.j2 +49 -49
  551. package/templates/stacks/mcp-python/gitignore +12 -12
  552. package/templates/stacks/mcp-python/llms.txt.j2 +56 -56
  553. package/templates/stacks/mcp-python/openapi.json.j2 +33 -33
  554. package/templates/stacks/mcp-python/pyproject.toml.j2 +37 -37
  555. package/templates/stacks/mcp-python/src/cli.py.j2 +68 -68
  556. package/templates/stacks/mcp-python/src/prompts/summarize.py +10 -10
  557. package/templates/stacks/mcp-python/src/server.py.j2 +28 -28
  558. package/templates/stacks/mcp-python/src/tools/echo.py +12 -12
  559. package/templates/stacks/mcp-python/src/transports/http.py +12 -12
  560. package/templates/stacks/mcp-python/src/transports/sse.py +13 -13
  561. package/templates/stacks/mcp-python/src/transports/stdio.py +6 -6
  562. package/templates/stacks/mcp-python/tests/test_echo.py +28 -28
  563. package/templates/stacks/mcp-rust/.dare/skills.yml +8 -8
  564. package/templates/stacks/mcp-rust/.env.example +14 -14
  565. package/templates/stacks/mcp-rust/.github/workflows/dare-ci.yml +38 -38
  566. package/templates/stacks/mcp-rust/Cargo.toml.tera +35 -35
  567. package/templates/stacks/mcp-rust/README.md.tera +50 -50
  568. package/templates/stacks/mcp-rust/gitignore +5 -5
  569. package/templates/stacks/mcp-rust/llms.txt.tera +60 -60
  570. package/templates/stacks/mcp-rust/openapi.json.tera +31 -31
  571. package/templates/stacks/mcp-rust/src/cli.rs.tera +33 -33
  572. package/templates/stacks/mcp-rust/src/lib.rs +6 -6
  573. package/templates/stacks/mcp-rust/src/main.rs.tera +30 -30
  574. package/templates/stacks/mcp-rust/src/prompts/mod.rs +1 -1
  575. package/templates/stacks/mcp-rust/src/prompts/summarize.rs +5 -5
  576. package/templates/stacks/mcp-rust/src/server.rs.tera +38 -38
  577. package/templates/stacks/mcp-rust/src/tools/echo.rs +18 -18
  578. package/templates/stacks/mcp-rust/src/tools/mod.rs +22 -22
  579. package/templates/stacks/mcp-rust/src/transports/http.rs +27 -27
  580. package/templates/stacks/mcp-rust/src/transports/mod.rs +3 -3
  581. package/templates/stacks/mcp-rust/src/transports/sse.rs +33 -33
  582. package/templates/stacks/mcp-rust/src/transports/stdio.rs +14 -14
  583. package/templates/stacks/mcp-rust/tests/echo_test.rs.tera +27 -27
  584. package/templates/stacks/node-nestjs/.dare/skills.yml +11 -11
  585. package/templates/stacks/node-nestjs/.env.example +21 -21
  586. package/templates/stacks/node-nestjs/.github/workflows/dare-ci.yml +54 -54
  587. package/templates/stacks/node-nestjs/README.md.hbs +35 -35
  588. package/templates/stacks/node-nestjs/gitignore +7 -7
  589. package/templates/stacks/node-nestjs/llms.txt.hbs +47 -47
  590. package/templates/stacks/node-nestjs/nest-cli.json +16 -16
  591. package/templates/stacks/node-nestjs/openapi.json.hbs +75 -75
  592. package/templates/stacks/node-nestjs/package.json.hbs +57 -57
  593. package/templates/stacks/node-nestjs/prisma/schema.prisma +25 -25
  594. package/templates/stacks/node-nestjs/prisma/seed.ts.hbs +25 -25
  595. package/templates/stacks/node-nestjs/src/app.module.ts +39 -39
  596. package/templates/stacks/node-nestjs/src/auth/auth.controller.ts +29 -29
  597. package/templates/stacks/node-nestjs/src/auth/auth.module.ts +25 -25
  598. package/templates/stacks/node-nestjs/src/auth/auth.service.ts +36 -36
  599. package/templates/stacks/node-nestjs/src/auth/dto/login-response.dto.ts +9 -9
  600. package/templates/stacks/node-nestjs/src/auth/dto/login.dto.ts +17 -17
  601. package/templates/stacks/node-nestjs/src/auth/jwt.strategy.ts +25 -25
  602. package/templates/stacks/node-nestjs/src/common/filters/problem-details.filter.ts +38 -38
  603. package/templates/stacks/node-nestjs/src/common/interceptors/json-response.interceptor.ts +13 -13
  604. package/templates/stacks/node-nestjs/src/main.ts.hbs +44 -44
  605. package/templates/stacks/node-nestjs/src/prisma/prisma.module.ts +9 -9
  606. package/templates/stacks/node-nestjs/src/prisma/prisma.service.ts +9 -9
  607. package/templates/stacks/node-nestjs/src/users/dto/create-user.dto.ts +22 -22
  608. package/templates/stacks/node-nestjs/src/users/dto/user.dto.ts +15 -15
  609. package/templates/stacks/node-nestjs/src/users/users.controller.ts +41 -41
  610. package/templates/stacks/node-nestjs/src/users/users.module.ts +11 -11
  611. package/templates/stacks/node-nestjs/src/users/users.repository.ts +38 -38
  612. package/templates/stacks/node-nestjs/src/users/users.service.ts +38 -38
  613. package/templates/stacks/node-nestjs/tsconfig.build.json +4 -4
  614. package/templates/stacks/node-nestjs/tsconfig.json +28 -28
  615. package/templates/stacks/php-laravel/.dare/skills.yml +11 -11
  616. package/templates/stacks/php-laravel/.env.example +41 -41
  617. package/templates/stacks/php-laravel/.github/workflows/dare-ci.yml +43 -43
  618. package/templates/stacks/php-laravel/README.md.hbs +36 -36
  619. package/templates/stacks/php-laravel/app/Http/Controllers/Api/AuthController.php +36 -36
  620. package/templates/stacks/php-laravel/app/Http/Controllers/Api/UsersController.php +33 -33
  621. package/templates/stacks/php-laravel/app/Http/Requests/CreateUserRequest.php +26 -26
  622. package/templates/stacks/php-laravel/app/Http/Requests/LoginRequest.php +34 -34
  623. package/templates/stacks/php-laravel/app/Llm/Contracts/LlmProvider.php +12 -12
  624. package/templates/stacks/php-laravel/app/Llm/Providers/DummyProvider.php +13 -13
  625. package/templates/stacks/php-laravel/app/Llm/Providers/OpenAiProvider.php +33 -33
  626. package/templates/stacks/php-laravel/app/Models/User.php +44 -44
  627. package/templates/stacks/php-laravel/app/Repositories/UsersRepository.php +32 -32
  628. package/templates/stacks/php-laravel/app/Services/AuthService.php +37 -37
  629. package/templates/stacks/php-laravel/app/Services/UsersService.php +57 -57
  630. package/templates/stacks/php-laravel/artisan +12 -12
  631. package/templates/stacks/php-laravel/bootstrap/app.php +29 -29
  632. package/templates/stacks/php-laravel/bootstrap/providers.php +5 -5
  633. package/templates/stacks/php-laravel/composer.json.hbs +58 -58
  634. package/templates/stacks/php-laravel/config/l5-swagger.php +41 -41
  635. package/templates/stacks/php-laravel/config/reverb.php +34 -34
  636. package/templates/stacks/php-laravel/config/sanctum.php +15 -15
  637. package/templates/stacks/php-laravel/database/migrations/2026_06_01_000001_create_users_table.php +27 -27
  638. package/templates/stacks/php-laravel/database/seeders/DatabaseSeeder.php +21 -21
  639. package/templates/stacks/php-laravel/gitignore +23 -23
  640. package/templates/stacks/php-laravel/llms.txt.hbs +53 -53
  641. package/templates/stacks/php-laravel/openapi.json.hbs +43 -43
  642. package/templates/stacks/php-laravel/phpstan.neon +9 -9
  643. package/templates/stacks/php-laravel/routes/api.php +13 -13
  644. package/templates/stacks/php-laravel/routes/channels.php +7 -7
  645. package/templates/stacks/php-laravel/tests/Feature/AuthTest.php +35 -35
  646. package/templates/stacks/php-laravel/tests/Feature/UsersTest.php +30 -30
  647. package/templates/stacks/php-laravel/tests/Pest.php +5 -5
  648. package/templates/stacks/python-fastapi/.dare/skills.yml +11 -11
  649. package/templates/stacks/python-fastapi/.env.example +21 -21
  650. package/templates/stacks/python-fastapi/.github/workflows/dare-ci.yml +43 -43
  651. package/templates/stacks/python-fastapi/README.md.j2 +35 -35
  652. package/templates/stacks/python-fastapi/alembic/env.py +46 -46
  653. package/templates/stacks/python-fastapi/alembic/script.py.mako +26 -26
  654. package/templates/stacks/python-fastapi/alembic/versions/0001_create_users.py.j2 +37 -37
  655. package/templates/stacks/python-fastapi/alembic.ini.j2 +39 -39
  656. package/templates/stacks/python-fastapi/app/core/config.py +24 -24
  657. package/templates/stacks/python-fastapi/app/core/security.py +34 -34
  658. package/templates/stacks/python-fastapi/app/db/session.py +22 -22
  659. package/templates/stacks/python-fastapi/app/main.py.j2 +36 -36
  660. package/templates/stacks/python-fastapi/app/models/__init__.py +3 -3
  661. package/templates/stacks/python-fastapi/app/models/user.py +30 -30
  662. package/templates/stacks/python-fastapi/app/repositories/user_repository.py +34 -34
  663. package/templates/stacks/python-fastapi/app/routers/auth.py +37 -37
  664. package/templates/stacks/python-fastapi/app/routers/users.py +46 -46
  665. package/templates/stacks/python-fastapi/app/schemas/user.py +56 -56
  666. package/templates/stacks/python-fastapi/app/services/auth_service.py +22 -22
  667. package/templates/stacks/python-fastapi/app/services/user_service.py +31 -31
  668. package/templates/stacks/python-fastapi/gitignore +12 -12
  669. package/templates/stacks/python-fastapi/llms.txt.j2 +53 -53
  670. package/templates/stacks/python-fastapi/openapi.json.j2 +43 -43
  671. package/templates/stacks/python-fastapi/pyproject.toml.j2 +45 -45
  672. package/templates/stacks/python-fastapi/tests/test_auth.py +22 -22
  673. package/templates/stacks/ruby-rails-8/.dare/skills.yml +50 -50
  674. package/templates/stacks/ruby-rails-8/.env.example +20 -20
  675. package/templates/stacks/ruby-rails-8/.github/workflows/dare-ci.yml +112 -112
  676. package/templates/stacks/ruby-rails-8/Gemfile.erb +61 -61
  677. package/templates/stacks/ruby-rails-8/app/channels/application_cable/channel.rb +11 -11
  678. package/templates/stacks/ruby-rails-8/app/channels/application_cable/connection.rb +34 -34
  679. package/templates/stacks/ruby-rails-8/app/channels/dare_updates_channel.rb +18 -18
  680. package/templates/stacks/ruby-rails-8/app/channels/user_updates_channel.rb +23 -23
  681. package/templates/stacks/ruby-rails-8/app/controllers/application_controller.rb +44 -44
  682. package/templates/stacks/ruby-rails-8/app/controllers/concerns/problem_details.rb +93 -93
  683. package/templates/stacks/ruby-rails-8/app/handlers/summarize_handler.rb +33 -33
  684. package/templates/stacks/ruby-rails-8/app/handlers/users_handler.rb +68 -68
  685. package/templates/stacks/ruby-rails-8/app/llm/cache/llm_cache.rb +44 -44
  686. package/templates/stacks/ruby-rails-8/app/llm/prompts/prompt_loader.rb +54 -54
  687. package/templates/stacks/ruby-rails-8/app/llm/prompts/summarize_v1.jinja2 +12 -12
  688. package/templates/stacks/ruby-rails-8/app/llm/providers/dummy_provider.rb +35 -35
  689. package/templates/stacks/ruby-rails-8/app/llm/providers/llm_provider.rb +67 -67
  690. package/templates/stacks/ruby-rails-8/app/llm/providers/openai_provider.rb +62 -62
  691. package/templates/stacks/ruby-rails-8/app/llm/rate_limit/token_bucket.rb +82 -82
  692. package/templates/stacks/ruby-rails-8/app/llm/validators/summarize_output_schema.json +21 -21
  693. package/templates/stacks/ruby-rails-8/app/llm/validators/validator.rb +52 -52
  694. package/templates/stacks/ruby-rails-8/app/models/user.rb +36 -36
  695. package/templates/stacks/ruby-rails-8/app/presenters/user_presenter.rb +48 -48
  696. package/templates/stacks/ruby-rails-8/app/repositories/document_repository.rb +57 -57
  697. package/templates/stacks/ruby-rails-8/app/repositories/user_repository.rb +73 -73
  698. package/templates/stacks/ruby-rails-8/app/services/create_user_service.rb +67 -67
  699. package/templates/stacks/ruby-rails-8/app/services/realtime_service.rb +53 -53
  700. package/templates/stacks/ruby-rails-8/app/services/summarize_document_service.rb +57 -57
  701. package/templates/stacks/ruby-rails-8/config/dare.yml +42 -42
  702. package/templates/stacks/ruby-rails-8/config/initializers/dare.rb +31 -31
  703. package/templates/stacks/ruby-rails-8/config/initializers/rack_attack.rb +64 -64
  704. package/templates/stacks/ruby-rails-8/config/initializers/rswag_api.rb +12 -12
  705. package/templates/stacks/ruby-rails-8/lib/tasks/dare.rake +159 -159
  706. package/templates/stacks/ruby-rails-8/llms.txt.erb +69 -69
  707. package/templates/stacks/ruby-rails-8/spec/api/summarize_spec.rb +56 -56
  708. package/templates/stacks/ruby-rails-8/spec/api/users_spec.rb +72 -72
  709. package/templates/stacks/ruby-rails-8/spec/channels/dare_updates_channel_spec.rb +61 -61
  710. package/templates/stacks/ruby-rails-8/spec/channels/user_updates_channel_spec.rb +56 -56
  711. package/templates/stacks/ruby-rails-8/spec/factories/users.rb +27 -27
  712. package/templates/stacks/ruby-rails-8/spec/handlers/users_handler_spec.rb +88 -88
  713. package/templates/stacks/ruby-rails-8/spec/rails_helper.rb +31 -31
  714. package/templates/stacks/ruby-rails-8/spec/services/create_user_service_spec.rb +88 -88
  715. package/templates/stacks/ruby-rails-8/spec/services/summarize_document_service_spec.rb +142 -142
  716. package/templates/stacks/ruby-rails-8/spec/swagger_helper.rb +73 -73
  717. package/templates/stacks/rust-axum/.dare/skills.yml +11 -11
  718. package/templates/stacks/rust-axum/.env.example +26 -26
  719. package/templates/stacks/rust-axum/.github/workflows/dare-ci.yml +40 -40
  720. package/templates/stacks/rust-axum/Cargo.toml.tera +53 -53
  721. package/templates/stacks/rust-axum/README.md.tera +37 -37
  722. package/templates/stacks/rust-axum/gitignore +5 -5
  723. package/templates/stacks/rust-axum/llms.txt.tera +54 -54
  724. package/templates/stacks/rust-axum/migrations/0001_create_users.sql +13 -13
  725. package/templates/stacks/rust-axum/openapi.json.tera +46 -46
  726. package/templates/stacks/rust-axum/src/config.rs +45 -45
  727. package/templates/stacks/rust-axum/src/errors.rs +48 -48
  728. package/templates/stacks/rust-axum/src/handlers/auth.rs +48 -48
  729. package/templates/stacks/rust-axum/src/handlers/mod.rs +3 -3
  730. package/templates/stacks/rust-axum/src/handlers/users.rs +81 -81
  731. package/templates/stacks/rust-axum/src/handlers/ws.rs +24 -24
  732. package/templates/stacks/rust-axum/src/lib.rs +19 -19
  733. package/templates/stacks/rust-axum/src/llm/mod.rs +1 -1
  734. package/templates/stacks/rust-axum/src/llm/provider.rs +48 -48
  735. package/templates/stacks/rust-axum/src/main.rs.tera +64 -64
  736. package/templates/stacks/rust-axum/src/middleware/auth.rs +20 -20
  737. package/templates/stacks/rust-axum/src/middleware/mod.rs +2 -2
  738. package/templates/stacks/rust-axum/src/middleware/rate_limit.rs +27 -27
  739. package/templates/stacks/rust-axum/src/models/mod.rs +1 -1
  740. package/templates/stacks/rust-axum/src/models/user.rs +13 -13
  741. package/templates/stacks/rust-axum/src/repositories/mod.rs +1 -1
  742. package/templates/stacks/rust-axum/src/repositories/user_repository.rs +62 -62
  743. package/templates/stacks/rust-axum/src/services/auth_service.rs +50 -50
  744. package/templates/stacks/rust-axum/src/services/mod.rs +2 -2
  745. package/templates/stacks/rust-axum/src/services/user_service.rs +53 -53
  746. package/templates/stacks/rust-axum/tests/integration_test.rs.tera +13 -13
  747. package/dist/commands/new.d.ts +0 -16
  748. package/dist/commands/new.d.ts.map +0 -1
  749. package/dist/commands/new.js +0 -104
  750. package/dist/commands/new.js.map +0 -1
package/README.md CHANGED
@@ -1,764 +1,764 @@
1
- # @dewtech/dare-cli
2
-
3
- CLI tool for the **DARE Framework** — Design, Architect, Review, Execute.
4
-
5
- A structured methodology for AI-assisted software development with mandatory human-in-the-loop reviews and parallel task execution.
6
-
7
- [![npm](https://img.shields.io/npm/v/@dewtech/dare-cli)](https://www.npmjs.com/package/@dewtech/dare-cli)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/dewtech-technologies/dare-method/blob/main/LICENSE)
9
-
10
- ---
11
-
12
- ## ⚠ Read this first — How `dare init` scaffolds a project (v3.2)
13
-
14
- `dare init` writes a **complete, DARE-shaped project** from generators
15
- internalized in this package — no shell-out to the framework's official CLI
16
- during init. Each backend + MCP stack lays down its full source tree
17
- (Layered Design, OpenAPI, JWT auth, rate limit, `.env.example`,
18
- `.dare/skills.yml`, CI gates), then prints the install/build steps to run next.
19
-
20
- | Stack | What `dare init` writes |
21
- |-------|-------------------------|
22
- | `ruby-rails-8` | Rails 8 + Layered Design + Action Cable + LLM + RSpec |
23
- | `node-nestjs` | NestJS 10 + Prisma + Swagger + Throttler + JWT |
24
- | `python-fastapi` | FastAPI + Pydantic v2 + SQLAlchemy + Alembic + slowapi |
25
- | `php-laravel` | Laravel 11 + Sanctum + FormRequest + Reverb + l5-swagger |
26
- | `rust-axum` | Axum + Tower + utoipa + jsonwebtoken + argon2 + sqlx |
27
- | `go-gin` | Gin + sqlc + swag + golang-jwt + gorilla/websocket |
28
- | `go-stdlib` | net/http 1.22 (no framework) + sqlc + coder/websocket |
29
- | `mcp-node-ts` | MCP server (`@modelcontextprotocol/sdk`) — stdio/sse/http |
30
- | `mcp-python` | MCP server (`mcp[cli]` / FastMCP) — stdio/sse/http |
31
- | `mcp-rust` (beta) | MCP server (`rmcp`) — stdio/sse/http |
32
- | `mcp-go` (beta) | MCP server (`mark3labs/mcp-go`) — stdio/sse/http |
33
- | `react`, `vue` | Vite scaffold + DARE overlay |
34
- | `rust-leptos` / `-csr` | Cargo workspace (Axum server + Leptos web) |
35
-
36
- Non-interactive: `dare init <name> --stack <id>` or `dare init <name> --mcp <lang> [--transport stdio\|sse\|http]`.
37
-
38
- Generation itself needs **no toolchain**. To build/run the generated project
39
- afterwards you need that stack's `ruby` / `composer` / `npm` / `cargo` / `python` / `go`
40
- **somewhere**. There are three ways to provide it — you pick at init time
41
- (prompt below), and the choice is saved in `dare.config.json` so
42
- `dare bootstrap` reuses it later.
43
-
44
- ```
45
- ? Toolchain for scaffolding (composer / npm / cargo / python / go):
46
- ❯ 🤖 Auto — use native if on PATH, else Docker (recommended)
47
- 🔧 Native only — require the CLI on PATH (faster, no Docker pulls)
48
- 🐳 Docker only — always use the official image (hermetic, no host install)
49
- ```
50
-
51
- ### 🤖 Auto (default)
52
-
53
- Tries the native CLI first. If missing, falls back to the official Docker
54
- image automatically. If neither is present, fails fast with both install
55
- links.
56
-
57
- ```
58
- which composer → ✓ found? use native
59
- → ✗ missing? which docker
60
- → ✓ found? docker run composer:latest …
61
- → ✗ missing? error: install Composer or Docker
62
- ```
63
-
64
- **When:** you don't know exactly what's installed; mixed teams (some
65
- machines have the toolchain, some only have Docker). The same project
66
- config (`dare.config.json` with `toolchain: auto`) works on every machine.
67
-
68
- ### 🔧 Native only
69
-
70
- Requires the CLI on PATH. **Fails immediately** if missing — no Docker
71
- fallback even if Docker is available.
72
-
73
- ```
74
- which composer → ✓ found? use native
75
- → ✗ missing? error: "Install Composer: https://getcomposer.org/"
76
- ```
77
-
78
- **When:** you already have the toolchain and want **maximum speed** (no
79
- `docker pull`, no bind-mount overhead, no container startup); you're in CI
80
- with the toolchain pre-installed; you want to avoid Docker Desktop edge
81
- cases (Windows volume throttling, Linux uid/gid issues, etc.).
82
-
83
- ### 🐳 Docker only
84
-
85
- **Always** runs the scaffold inside the official Docker image — even if
86
- the native CLI is on PATH. Fails if Docker isn't installed.
87
-
88
- ```
89
- which docker → ✓ found? docker run --rm -v ".:/app" composer:latest create-project …
90
- → ✗ missing? error: "Install Docker Desktop"
91
- ```
92
-
93
- **When:** you don't want to install PHP / Cargo / Python / Go on the
94
- host (keep host clean); you want **hermetic, reproducible** builds (every
95
- dev uses the exact toolchain version baked into the image); you want to
96
- mirror your CI locally.
97
-
98
- ### Quick decision table
99
-
100
- | Your situation | Pick |
101
- |----------------|------|
102
- | Already have the toolchain installed, want speed | **🔧 Native** |
103
- | Don't want to install PHP/Cargo/Python/Go on the host | **🐳 Docker** |
104
- | Mixed team, varying setups | **🤖 Auto** |
105
- | Just want it to work | **🤖 Auto** |
106
- | Want bit-for-bit toolchain reproducibility | **🐳 Docker** |
107
- | Solo dev with everything installed | **🔧 Native** |
108
-
109
- ### Override later
110
-
111
- ```bash
112
- dare bootstrap --toolchain docker # rerun scaffold inside Docker
113
- dare bootstrap --toolchain native --force # rerun native, overwriting framework files
114
- dare bootstrap --toolchain auto # back to auto-detect
115
- ```
116
-
117
- ### ⚠ Important caveat — Ralph Loop
118
-
119
- `dare execute --complete` runs the stack's quality gates
120
- (`composer dump-autoload`, `php artisan test`, `cargo build`, etc.)
121
- **directly on the host** — it does **not** automatically wrap them in
122
- Docker even if you picked `docker only` at init time.
123
-
124
- If you don't have the native toolchain installed, the agent should run
125
- the gates inside the container created by **task-001** (the Containerize
126
- task), e.g. `docker compose exec app php artisan test`. The skills
127
- shipped with `dare init` already nudge the agent toward that pattern.
128
-
129
- ---
130
-
131
- ## Prerequisites
132
-
133
- ### Required for the CLI itself
134
-
135
- | Tool | Why | Install |
136
- |------|-----|---------|
137
- | **Node.js 18+** | runs `dare`, `dare-mcp-server` and the bundled GraphRAG engine | https://nodejs.org/ |
138
-
139
- ### Required to build/run the generated project
140
-
141
- `dare init` itself needs no stack toolchain — it writes the project from
142
- internalized templates. To **build and run** what it generates, you need that
143
- stack's toolchain (`composer`/`npm`/`cargo`/`go`/`python`/`ruby`). If you don't
144
- have it natively but have Docker, run the build steps inside the stack's
145
- official image (the `.github/workflows/dare-ci.yml` the project ships shows the
146
- exact commands).
147
-
148
- Pick **one** of the two paths per stack:
149
-
150
- | Stack | Native toolchain | Docker fallback (used if native missing) |
151
- |-------|------------------|------------------------------------------|
152
- | `ruby-rails-8` | Ruby 3.3+ · Bundler 2+ · Rails 8 — https://www.ruby-lang.org/ | `ruby:3.3-slim` |
153
- | `php-laravel` | PHP 8.2+ · Composer 2+ — https://getcomposer.org/ | `composer:latest` |
154
- | `node-nestjs` | Node 18+ (bundles `npx`) | `node:20-alpine` |
155
- | `python-fastapi` | Python 3.11+ — https://www.python.org/downloads/ | `python:3.12-slim` |
156
- | `rust-axum` | Rust 1.83+ (rustup) — https://www.rust-lang.org/tools/install | `rust:1.83` |
157
- | `go-gin` | Go 1.25+ — https://go.dev/dl/ | `golang:1.25` |
158
- | `go-stdlib` | Go 1.22+ — https://go.dev/dl/ | `golang:1.25` |
159
- | `react`, `vue` | Node 18+ (bundles `npm`) | `node:20-alpine` |
160
- | `rust-leptos` | Rust 1.83+ (rustup) + **cargo-leptos 0.2.22** — `cargo install cargo-leptos --version 0.2.22` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
161
- | `rust-leptos-csr` | Rust 1.83+ (rustup) + **trunk** — `cargo install trunk` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
162
- | `mcp-node-ts` | Node 18+ | `node:20-alpine` |
163
- | `mcp-python` | Python 3.11+ | `python:3.12-slim` |
164
- | `mcp-rust` (beta) | Rust 1.78+ (rustup) | `rust:1.83` |
165
- | `mcp-go` (beta) | Go 1.23+ — https://go.dev/dl/ | `golang:1.25` |
166
-
167
- > **v3.3.0:** **Reliable Verification Core** (opt-in via `dare.config.json#verification`) — turns the Ralph Loop's "tests pass" gate into "correct & robust": mutation testing, fail-to-pass specs, anti-tamper, a decay-aware loop policy, best-of-N candidate selection over git worktrees, and a `dare bench` regression harness (solve-rate + Fix·Rate). Absent the `verification` block, behavior is unchanged.
168
-
169
- > **v3.2.0:** full **CLI ↔ IDE parity** — every one of the 18 CLI commands is invocable as `/dare-<cmd>` across all three IDEs (Cursor, Claude Code, Antigravity); a parity test fails the build if a command is missing a skill. Brownfield commands now **collect real data by default**: `dare reverse`/`dna` extract endpoints + entities and render them into `IDEIA.md` and the module specs (no more skeleton-only artifacts).
170
-
171
- > **v3.1.0:** all **11 stacks** ship a full generator internalized in `@dewtech/dare-cli` — 7 backend (ruby-rails-8, node-nestjs, python-fastapi, php-laravel, rust-axum, go-gin, go-stdlib) + 4 MCP (mcp-node-ts, mcp-python, mcp-rust, mcp-go). No isolated stack packages; everything is in one publishable tarball (fixes the `npm install -g` 404 of earlier releases). `dare new` was removed — `dare init` is the only scaffolding entrypoint.
172
-
173
- > **TL;DR:** if you have **Docker Desktop** installed, you don't strictly need
174
- > any other toolchain — `dare init` will pull the right image on demand.
175
- > Native toolchains are faster and don't depend on Docker pulling images.
176
-
177
- If neither the native CLI **nor** Docker is available, `dare init` fails
178
- fast with a clear error message — it never falls back to a fake template.
179
-
180
- ### Choose the toolchain at init time
181
-
182
- The 3 modes (`auto` / `native` / `docker`) are explained in detail at the
183
- top of this README — see [⚠ Read this first](#-read-this-first--how-dare-init-runs-the-official-scaffold).
184
-
185
- Quick recap:
186
-
187
- | Mode | Behavior |
188
- |------|----------|
189
- | `auto` (default) | Native if available, else Docker. Recommended. |
190
- | `native` | Requires the native CLI; fails if missing. |
191
- | `docker` | Always uses the official Docker image. |
192
-
193
- The choice is persisted in `dare.config.json` (`"toolchain": "..."`).
194
- Override at any time:
195
-
196
- ```bash
197
- dare bootstrap --toolchain docker # rerun scaffold inside Docker
198
- dare bootstrap --toolchain native --force # rerun native, overwriting
199
- ```
200
-
201
- ### Required for the Ralph Loop (per project)
202
-
203
- Once the project is scaffolded, every `dare execute --complete` runs the
204
- stack's gates: `build → test → lint`. The same toolchain (native or Docker)
205
- that scaffolded the project is needed to run those gates. Plan accordingly:
206
- if you chose `php-laravel` and only have Docker, `dare execute --complete`
207
- needs to invoke `php artisan test` somehow — typically by running it inside
208
- your `docker-compose` app service (this is the kind of thing the
209
- `task-001 = Containerize app` task sets up).
210
-
211
- ## Installation
212
-
213
- ```bash
214
- npm install -g @dewtech/dare-cli
215
- ```
216
-
217
- ## Commands
218
-
219
- ### `dare init`
220
-
221
- Interactive project initialization — creates the full project structure with DARE methodology files, IDE rules and stack templates.
222
-
223
- ```bash
224
- dare init my-project
225
- ```
226
-
227
- Prompts:
228
- - **Structure:** Monorepo · Backend only · Frontend only · **MCP Server** ← new
229
- - **MCP Server:** language (TypeScript / Python), transport (stdio / SSE / HTTP Stream), capabilities (Tools / Resources / Prompts)
230
- - **Backend stack:** Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib
231
- - **Frontend stack:** React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR-only (Rust WASM)
232
- - **Cargo workspace layout** *(Monorepo + Rust/Axum + Leptos only)*: Single-crate (`crates/server` + `crates/web`) · Multi-crate (`{prefix}-core` + `{prefix}-server` + `{prefix}-web` + `{prefix}-cli`) — prefix suggested from project initials (e.g. `ai-runtime-securyti-rasp` → `arsr`)
233
- - **IDE / Agent:** Claude Code · Cursor · Antigravity · Hybrid
234
- - **GraphRAG backend:** SQLite · JSON · Neo4j
235
- - **DARE MCP Server:** context query server (saves ~95% tokens)
236
-
237
- Generates:
238
- - `dare.config.json` — project config
239
- - `CLAUDE.md` + `.claude/commands/` + `.claude/settings.json` — Claude Code rules and slash commands (includes `/dare-security`)
240
- - `.cursorrules` / `.antigravityrules` — Cursor / Antigravity rules
241
- - `.cursor/rules/*.mdc` — stack-specific skills
242
- - `.cursor/commands/` — Cursor slash commands
243
- - `.agents/skills/` — Antigravity agent skills
244
- - `DARE/` — methodology directory (DESIGN, BLUEPRINT, TASKS, dag)
245
- - Full project template ready to run (MCP server, backend or frontend)
246
-
247
- ---
248
-
249
- ### `dare discover` ← new in v0.3.0
250
-
251
- Detects an existing project's stack automatically and installs DARE files without touching your source code.
252
-
253
- ```bash
254
- # Run inside an existing project
255
- cd my-existing-project
256
- dare discover
257
-
258
- # Inspect only, no changes
259
- dare discover --check
260
-
261
- # Target a specific directory
262
- dare discover --dir ./path/to/project
263
- ```
264
-
265
- Auto-detects from: `package.json`, `Cargo.toml`, `requirements.txt`, `pyproject.toml`, `composer.json`.
266
-
267
- Recognizes: NestJS · React · Vue · Nuxt · Rust/Axum · FastAPI · Laravel · **MCP Server** (`@modelcontextprotocol/sdk`, `FastMCP`).
268
-
269
- ---
270
-
271
- ### `dare reverse` ← brownfield (Phase 0)
272
-
273
- Reverse-engineer an existing codebase into a Phase-0 understanding **without touching the source**.
274
- Deterministically detects module boundaries, sizes them by LOC and infers the dependency graph.
275
-
276
- ```bash
277
- cd my-legacy-project
278
- dare reverse # → DARE/IDEIA.md + REVERSE/module-*.md + reverse-facts.json + architecture.excalidraw
279
- dare reverse --check # detection only, no files
280
- dare reverse --modules api,auth
281
- dare reverse --no-excalidraw
282
- ```
283
-
284
- **Confidence & traceability.** The `/dare-reverse` skill marks each claim 🟢 CONFIRMED (with
285
- `file:line` evidence) · 🟡 INFERRED · 🔴 GAP. Then:
286
-
287
- ```bash
288
- dare reverse --report # deterministic confidence index from the markers (not LLM self-scored)
289
- ```
290
-
291
- → `confidence-report.md` + `traceability/code-spec-matrix.md`; the 🔴 become `gaps.md` + `questions.md`.
292
-
293
- **Deep extraction (framework-agnostic per language):**
294
-
295
- ```bash
296
- dare reverse --deep # + ERD, API surface, C4, domain-rules, state-machines, permissions
297
- ```
298
-
299
- The CLI extracts the data model (`erd.md`) and endpoints (`api-surface.md`) deterministically from
300
- **SQL inline (DDL + query tables), Prisma, ORMs and plain types/classes/structs** — so it works on
301
- legacy projects **with or without a framework** (e.g. raw-PDO PHP without Laravel). Routes cover
302
- multiple dialects per language (Express/Nest/Fastify, Laravel/Slim/Symfony, FastAPI/Flask/Django,
303
- Rails/Sinatra, Gin/stdlib, Axum).
304
-
305
- ---
306
-
307
- ### `dare dna` ← brownfield
308
-
309
- Extract the legacy codebase's **conventions** so the agent follows the house style instead of generic
310
- defaults — for legacy you can't rewrite.
311
-
312
- ```bash
313
- cd my-legacy-project
314
- dare dna # → DARE/PROJECT-DNA.md + dna-facts.json
315
- dare dna --check
316
- ```
317
-
318
- Detects lint/format tooling, naming conventions, architecture layers, test framework, key libraries
319
- (ORM/HTTP/auth/validation) and commit convention. The `/dare-dna` skill turns the facts into
320
- actionable rules. Reuses `reverse-facts.json` if `dare reverse` already ran.
321
-
322
- ---
323
-
324
- ### `dare migrate` ← brownfield (Phase 2)
325
-
326
- Plan a **safe migration** to a target stack, with **Gherkin parity scenarios** that guarantee
327
- behavior is preserved. Requires `dare reverse` first.
328
-
329
- ```bash
330
- cd my-legacy-project
331
- dare migrate --to go-gin # or rust-axum, node-nestjs, python-fastapi, php-laravel, ruby-rails-8…
332
- dare migrate --check
333
- ```
334
-
335
- Consumes `IDEIA` + `DNA`, inherits the **blocking gaps** (🔴) as risks, and generates
336
- `DARE/MIGRATION/MIGRATION.md` (paradigm, strategy, risk register, target architecture, cutover) +
337
- `parity/<module>.feature` (the behavioral acceptance contract). The `/dare-migrate` skill fills the
338
- strategy and the real parity scenarios.
339
-
340
- > **Brownfield loop:** `reverse` (the *what*) → `dna` (the *how*) → `migrate` (reimplement with
341
- > parity) → `design`/`blueprint`/`execute` on the target stack.
342
-
343
- ---
344
-
345
- ### `dare design`
346
-
347
- Generate `DARE/DESIGN.md` from a project description.
348
-
349
- ```bash
350
- dare design "Build a REST API for user authentication with JWT"
351
- ```
352
-
353
- ---
354
-
355
- ### `dare blueprint`
356
-
357
- Generate `DARE/BLUEPRINT.md` from `DESIGN.md`. Stops here — requires human review and approval before tasks are created.
358
-
359
- ```bash
360
- dare blueprint
361
- ```
362
-
363
- ---
364
-
365
- ### `dare tasks`
366
-
367
- Generate `DARE/TASKS.md`, `DARE/dare-dag.yaml` and all `DARE/EXECUTION/task-*.md` specs from an approved `BLUEPRINT.md`. Run this only after reviewing and approving the blueprint.
368
-
369
- ```bash
370
- dare tasks
371
- ```
372
-
373
- ---
374
-
375
- ### `dare execute`
376
-
377
- Orchestrate DAG execution. **The IDE is the executor** (Cursor / Antigravity
378
- / Claude Code) — `dare execute` only coordinates state, composes prompts
379
- with parent context, updates the live canvas at `DARE/.canvas.md`, and
380
- ingests finished tasks into the knowledge graph.
381
-
382
- > **No API keys, no extra token costs.** You use the plan of the IDE you're
383
- > already logged into.
384
-
385
- ```bash
386
- # Print next executable tasks (with composed prompts)
387
- dare execute --next
388
-
389
- # Mark a task DONE after the agent finishes it
390
- dare execute --complete task-001 --output "Created src/auth.ts and tests/auth.test.ts; all tests green."
391
-
392
- # Mark a task FAILED — descendants are cascade-skipped automatically
393
- dare execute --fail task-002 --reason "Schema migration conflict in users table"
394
-
395
- # Reset a task back to PENDING (for retry)
396
- dare execute --reset task-002
397
-
398
- # Show snapshot of canvas + summary (default action)
399
- dare execute --status
400
- ```
401
-
402
- #### Typical flow inside the IDE agent
403
-
404
- ```bash
405
- dare execute --next # → tasks ready in current rank
406
- # (agent executes each task: code, build, test, lint)
407
- dare execute --complete task-001 --output "…"
408
- dare execute --complete task-002 --output "…"
409
- dare execute --next # → next rank
410
- # (repeat until "✅ All tasks resolved")
411
- ```
412
-
413
- The skills shipped by `dare init` (`.cursor/rules/skill-dag-runner.mdc`,
414
- `.agents/skills/dare-dag-runner/SKILL.md`, `.claude/commands/dare-dag-run.md`)
415
- guide the IDE agent through this loop.
416
-
417
- #### Stack-specific skills
418
-
419
- `dare init` also ships skills focused on architectural decisions for
420
- specific stacks. As of v2.15.0:
421
-
422
- - **`skill-rust-workspace.mdc`** (Cursor) /
423
- **`dare-rust-workspace/SKILL.md`** (Antigravity) /
424
- **`/dare-rust-workspace`** (Claude command) — guides the agent on
425
- whether a Rust project should start single-crate or as a Cargo
426
- workspace, and gives a step-by-step PR-by-PR migration plan when an
427
- existing single-crate project has outgrown its layout. Active during
428
- `/dare-design` and `/dare-blueprint` for `rust-axum` projects, plus on
429
- demand for migration analysis.
430
-
431
- - **`skill-rust-leptos.mdc`** (Cursor) /
432
- **`dare-rust-leptos/SKILL.md`** (Antigravity) /
433
- **`/dare-rust-leptos`** (Claude command) — full guide for Leptos
434
- development: CSR vs fullstack decision table, Leptos 0.7 idioms
435
- (signals, Resource, Action, Show, For, `#[server]`), shared types with
436
- `cfg_attr`, mixed workspace configuration (WASM + native crates), and
437
- antipatterns to avoid (`cargo leptos test` does not exist; no global
438
- `[build] target` in `.cargo/config.toml`). Ships 3 ready-to-use DARE
439
- task templates for Leptos projects.
440
-
441
- ### `dare bootstrap`
442
-
443
- Lay down a stack's DARE-shaped source on **an existing project** (created in
444
- older versions or with `--skip-bootstrap`). Reads `dare.config.json` and runs
445
- the internalized generator for the configured stack — the same one `dare init`
446
- uses. Frontend stacks (`react` / `vue` / `rust-leptos`) still use their Vite /
447
- Cargo scaffold.
448
-
449
- ```bash
450
- dare bootstrap # refuses if vendor/ or node_modules/ already exist
451
- dare bootstrap --force # runs anyway (may overwrite framework files)
452
- ```
453
-
454
- Your DARE artifacts (`.cursor/`, `DARE/`, `dare.config.json`, `dare-graph.yml`)
455
- are preserved.
456
-
457
- ### `dare info`
458
-
459
- Read-only diagnostic of the current project: CLI version, platform, presence
460
- of each canonical DARE artifact, active GraphRAG backend, and task progress.
461
-
462
- ```bash
463
- dare info
464
- ```
465
-
466
- ### `dare review` ← new in v2.17.0
467
-
468
- **Anti-stub gate.** Audita os arquivos que uma task tocou e detecta padrões de "fake completeness": `TODO`/`FIXME`, stubs (`throw new Error('not implemented')`, `todo!()`, `NotImplementedError`), funções vazias, retorno-fantasma (`return null` como única statement), mocks fora de testes (`jest.fn`, `vi.mock`, `sinon.stub`, `MagicMock`), comentários-placeholder (`// implement later`).
469
-
470
- A camada estática (regex, determinística) é só metade. A IDE agent pode rodar a skill `dare-review` / `review-task` para validar critério-a-critério se a implementação atende a spec, emitir um `SemanticVerdict` JSON, e o CLI funde os dois numa única decisão.
471
-
472
- ```bash
473
- # Audita os arquivos listados em DARE/EXECUTION/task-034.md
474
- dare review task-034
475
-
476
- # Em CI:
477
- dare review task-034 --strict --format json
478
-
479
- # Lista explícita de arquivos:
480
- dare review task-034 --files src/auth/login.ts src/auth/register.ts
481
-
482
- # Funde com verdito semântico do agente:
483
- dare review task-034 --from-agent .dare/verdict-task-034.json
484
- ```
485
-
486
- **Gate opt-in no Ralph Loop:** com `review.onComplete: true` em `dare.config.json`, `dare execute --complete <id>` bloqueia DONE se a review falhar. Para projetos novos (`dare init` v2.17+) já vem ligado; projetos legados permanecem off até o dev flipar.
487
-
488
- ### `dare refine` ← new in v2.17.0
489
-
490
- **Anti-monstro.** Mede complexidade de uma task e, opcionalmente, propõe quebra em sub-tasks menores. Heurística determinística pesa # arquivos, # funções/endpoints, # testes, # dependências, keywords "pesadas" (refactor/migrate/integrate/multiple) — produz um score em LOW (0–5) / MED (6–12) / HIGH (13–20) / CRITICAL (21+).
491
-
492
- ```bash
493
- # Apenas mede e reporta:
494
- dare refine task-034
495
-
496
- # Mede + propõe quebra em sub-tasks (task-034a, task-034b, ...):
497
- dare refine task-034 --split
498
-
499
- # Anota TASKS.md marcando a task para split (o agente regenera as specs):
500
- dare refine task-034 --split --apply
501
-
502
- # Em CI: exit code 2 se HIGH/CRITICAL:
503
- dare refine task-034 --strict
504
- ```
505
-
506
- A camada determinística agrupa arquivos por diretório raiz. A IDE agent (skills `dare-refine` / `refine-task`) refina o split semanticamente — por camada (Model/Controller/Service), por endpoint, por feature, refactor-then-feature, migration-then-code.
507
-
508
- Thresholds configuráveis em `dare.config.json`:
509
-
510
- ```jsonc
511
- {
512
- "refine": {
513
- "thresholds": { "low": 5, "med": 12, "high": 20 }
514
- }
515
- }
516
- ```
517
-
518
- ### `dare update` ← new in v2.17.0
519
-
520
- Sync the **project's DARE setup** (templates, slash commands, skills, schema)
521
- with the version of the CLI currently installed. Useful when you upgrade the
522
- CLI globally (`npm install -g @dewtech/dare-cli@latest`) and want a previous
523
- project to pick up the new improvements — **without touching your DESIGN /
524
- BLUEPRINT / TASKS / dare-dag.yaml artifacts**.
525
-
526
- Different from upgrading the CLI itself: `npm update -g @dewtech/dare-cli`
527
- changes the binary on your machine; `dare update` changes the *project files
528
- on disk* to match what that binary now ships.
529
-
530
- ```bash
531
- dare update # interactive (recommended)
532
- dare update --dry-run # preview: shows changelog + affected files, writes nothing
533
- dare update --yes # CI: apply, preserve customizations, no prompts
534
- dare update --force # also overwrite files the dev customized (dangerous)
535
- dare update --target 2.17.0 # update to a specific release instead of the installed CLI
536
- ```
537
-
538
- **What it does:**
539
-
540
- 1. Reads `version` from `dare.config.json` (the project's last-known DARE version).
541
- 2. Loads `templates/UPDATE-MANIFEST.json` (ships with the CLI) and lists every
542
- release between the project's version and the CLI's version.
543
- 3. Prints the changelog for each pending release and the list of files
544
- affected for your IDE (cursor / claude-code / antigravity / hybrid).
545
- 4. For each file, classifies the situation:
546
- - **identical** → skip
547
- - **missing** → create
548
- - **apply** → file matches the previous template hash, safe to overwrite
549
- - **customized** → file diverges from the previous template; prompt
550
- (`keep` / `replace`) unless `--yes` (keep) or `--force` (replace).
551
- 5. Backs up every affected file to `.dare/backup-<from-version>/` before
552
- writing.
553
- 6. Runs any schema migrations declared by the release (e.g. renaming a
554
- config field).
555
- 7. Stamps `version` and `updatedAt` in `dare.config.json`.
556
-
557
- **Adding entries when you cut a release:** each new CLI version that ships
558
- template changes needs a corresponding entry in `templates/UPDATE-MANIFEST.json`
559
- listing `changes` (added / modified / removed / renamed) and optional
560
- `migrations`. The applier filters changes by `appliesTo: [ide]`, so a
561
- template that's cursor-only won't be installed in a Claude Code project and
562
- vice versa.
563
-
564
- ### `dare validate`
565
-
566
- Static checks on `dare-dag.yaml` — ideal for pre-commit hooks and CI.
567
- Verifies unique kebab-case ids, valid `depends_on`, absence of cycles,
568
- non-empty prompts, and parallelism (warning when only one task at rank 0).
569
-
570
- ```bash
571
- dare validate # errors fail; warnings printed
572
- dare validate --strict # warnings also fail (CI-friendly)
573
- ```
574
-
575
- A pre-commit hook template is shipped at
576
- `templates/hooks/pre-commit-dare-validate` — copy to `.git/hooks/pre-commit`
577
- (or use with husky) to validate the DAG before every commit.
578
-
579
- ### `dare execute --watch`
580
-
581
- Interactive loop: the CLI watches `.dare/state.json` and re-prints the next
582
- ready tasks every time the state changes. Pair with the IDE agent firing
583
- `--complete`/`--fail` from another terminal.
584
-
585
- ```bash
586
- dare execute --watch
587
- ```
588
-
589
- ### `dare dag`
590
-
591
- Inspect and visualize the **static task DAG** declared in `dare-dag.yaml` —
592
- distinct from `dare graph`, which inspects the populated knowledge graph
593
- (only contains tasks already executed).
594
-
595
- ```bash
596
- dare dag viz # Mermaid to stdout
597
- dare dag viz -o DARE/dag-graph.mmd # Mermaid file
598
- dare dag viz -f dot -o DARE/dag-graph.dot # DOT (Graphviz)
599
- ```
600
-
601
- The Mermaid output groups tasks into rank subgraphs and colors nodes by
602
- status (`PENDING` / `RUNNING` / `DONE` / `FAILED` / `SKIPPED`), so you can
603
- **see the execution plan before running any task**.
604
-
605
- > `dare tasks` writes `DARE/dag-graph.mmd` automatically — open it in
606
- > your editor with a Mermaid preview to see the static graph immediately.
607
-
608
- ### `dare graph`
609
-
610
- Inspect the project's knowledge graph. The graph is populated automatically
611
- by `dare execute --complete/--fail` (task nodes, file nodes, `depends_on` and
612
- `implements` edges). Backend is whatever `dare-graph.yml` declares
613
- (`sqlite` default, `json` available, `neo4j` planned).
614
-
615
- ```bash
616
- dare graph stats # totals + breakdown by type
617
- dare graph query auth # search nodes by label/description
618
- dare graph query auth --limit 20
619
-
620
- dare graph viz # Mermaid to stdout
621
- dare graph viz -f dot # DOT for Graphviz
622
- dare graph viz -o docs/graph.mmd # write to file
623
-
624
- dare graph ingest # re-sync from dare-dag.yaml + state
625
- ```
626
-
627
- ---
628
-
629
- ## Full Workflow
630
-
631
- ```bash
632
- # New project
633
- dare init my-project
634
- cd my-project
635
- dare design "Describe what you're building"
636
- dare blueprint
637
- dare execute --parallel
638
-
639
- # Existing project
640
- cd my-existing-project
641
- dare discover
642
- dare design "Describe what you're building"
643
- dare blueprint
644
- dare execute --parallel
645
- ```
646
-
647
- ## Claude Code Workflow
648
-
649
- ```bash
650
- dare init my-project
651
- # → IDE: Claude Code
652
- # → Structure: Backend / Frontend / MCP Server
653
-
654
- cd my-project
655
- # Claude Code slash commands available:
656
- # /dare-design → generates DARE/DESIGN.md
657
- # /dare-blueprint → generates BLUEPRINT.md + DAG
658
- # /dare-execute task-001 → implements with Ralph Loop
659
- # /dare-tasks → shows task status table
660
- ```
661
-
662
- Files generated for Claude Code:
663
- ```
664
- CLAUDE.md ← main context (stack rules + DARE methodology)
665
- .claude/
666
- settings.json ← permissions + Ralph Loop hook
667
- commands/
668
- dare-design.md ← /dare-design
669
- dare-blueprint.md ← /dare-blueprint
670
- dare-execute.md ← /dare-execute
671
- dare-tasks.md ← /dare-tasks
672
- ```
673
-
674
- ---
675
-
676
- ## MCP Server Workflow
677
-
678
- ```bash
679
- dare init my-mcp-server
680
- # → Structure: MCP Server
681
- # → Language: TypeScript
682
- # → Transport: stdio
683
- # → Capabilities: Tools, Resources
684
-
685
- cd my-mcp-server
686
- npm install
687
- dare design "MCP server that exposes ZIP code lookup tools"
688
- dare blueprint
689
- dare execute --parallel
690
-
691
- # Test with MCP Inspector
692
- npm run inspect
693
- ```
694
-
695
- ---
696
-
697
- ## Performance
698
-
699
- | Mode | Estimated Time |
700
- |------|----------------|
701
- | Sequential | ~280 minutes |
702
- | Parallel DAG | ~70 minutes |
703
- | **Improvement** | **75% faster** |
704
-
705
- ---
706
-
707
- ## Supported Stacks
708
-
709
- | Type | Options |
710
- |------|---------|
711
- | **Backend** | Ruby on Rails 8 · Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib |
712
- | **Frontend** | React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR (Rust WASM) |
713
- | **MCP Server** | TypeScript/Node.js · Python — stdio / SSE / HTTP Stream |
714
- | **IDE / Agent** | Claude Code · Cursor · Antigravity · Hybrid |
715
-
716
- ---
717
-
718
- ## Skills disponíveis (v3.0.0)
719
-
720
- **32 skills em paridade total** nas 3 IDEs (Antigravity, Claude Code, Cursor). Cada skill existe em formato nativo de cada uma e é entregue por `dare init` / `dare update`.
721
-
722
- | Categoria | Skills | Exemplos |
723
- |---|---|---|
724
- | **Método DARE** | 6 | `dare-design`, `dare-blueprint`, `dare-tasks`, `dare-execute`, `dare-review`, `dare-refine` |
725
- | **DAG runner** | 4 | `dare-dag-build`, `dare-dag-run`, `dare-dag-runner`, `dare-dag-viz` |
726
- | **Transversais** | 6 | `dare-ax`, `dare-layered-design`, `dare-llm-integration`, `dare-frontend-design`, `dare-realtime`, `dare-quality-telemetry` |
727
- | **Stack / Tools** | 8 | `dare-docker`, `dare-security`, `dare-telemetry`, `dare-bugfix-design`, `dare-feature-design`, `dare-rust-workspace`, `dare-rust-leptos`, `dare-laravel-api` |
728
- | **Stacks novas v3.0.0** | 5 | `dare-nestjs-api`, `dare-fastapi-api`, `dare-go-gin-api`, `dare-mcp-server`, `dare-rails-api` |
729
- | **Brownfield** | 3 | `dare-reverse`, `dare-dna`, `dare-migrate` |
730
-
731
- Ver tabela cruzada completa em [`docs/skills/INDEX.md`](https://github.com/dewtech-technologies/dare-method/blob/main/docs/skills/INDEX.md).
732
-
733
- ---
734
-
735
- ## O que vem com o pacote (v2.0+)
736
-
737
- A partir da v2.0 o `@dewtech/dare-cli` é um **pacote único** que inclui todas as
738
- funcionalidades do framework DARE. Você não precisa instalar nada além dele:
739
-
740
- ```bash
741
- npm install -g @dewtech/dare-cli
742
- ```
743
-
744
- Isso já dá:
745
-
746
- | Componente | O que é |
747
- |------------|---------|
748
- | CLI `dare` | `init`, `design`, `blueprint`, `execute`, `discover`, `reverse`, `dna`, `migrate` |
749
- | CLI `dare-mcp-server` | Servidor MCP local de contexto (~95% economia de tokens) |
750
- | Engine GraphRAG | Grafo de conhecimento com SQLite + FTS5 |
751
- | DAG Task Runner | Execução paralela de tasks com Kahn's algorithm |
752
- | Tipos e templates | Tudo embutido — sem dependências externas do `@dewtech/*` |
753
-
754
- > **Histórico (v1.x):** os pacotes `@dewtech/dare-core`, `@dewtech/dare-graphrag` e
755
- > `@dewtech/dare-mcp-server` foram consolidados em `@dewtech/dare-cli` e estão
756
- > **deprecated** no npm. Não há mais subpacotes para gerenciar.
757
-
758
- ---
759
-
760
- ## Links
761
-
762
- - [GitHub](https://github.com/dewtech-technologies/dare-method)
763
- - [DARE Methodology](https://github.com/dewtech-technologies/dare-method#-o-método)
764
- - [Dewtech](https://dewtech.tech)
1
+ # @dewtech/dare-cli
2
+
3
+ CLI tool for the **DARE Framework** — Design, Architect, Review, Execute.
4
+
5
+ A structured methodology for AI-assisted software development with mandatory human-in-the-loop reviews and parallel task execution.
6
+
7
+ [![npm](https://img.shields.io/npm/v/@dewtech/dare-cli)](https://www.npmjs.com/package/@dewtech/dare-cli)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/dewtech-technologies/dare-method/blob/main/LICENSE)
9
+
10
+ ---
11
+
12
+ ## ⚠ Read this first — How `dare init` scaffolds a project (v3.2)
13
+
14
+ `dare init` writes a **complete, DARE-shaped project** from generators
15
+ internalized in this package — no shell-out to the framework's official CLI
16
+ during init. Each backend + MCP stack lays down its full source tree
17
+ (Layered Design, OpenAPI, JWT auth, rate limit, `.env.example`,
18
+ `.dare/skills.yml`, CI gates), then prints the install/build steps to run next.
19
+
20
+ | Stack | What `dare init` writes |
21
+ |-------|-------------------------|
22
+ | `ruby-rails-8` | Rails 8 + Layered Design + Action Cable + LLM + RSpec |
23
+ | `node-nestjs` | NestJS 10 + Prisma + Swagger + Throttler + JWT |
24
+ | `python-fastapi` | FastAPI + Pydantic v2 + SQLAlchemy + Alembic + slowapi |
25
+ | `php-laravel` | Laravel 11 + Sanctum + FormRequest + Reverb + l5-swagger |
26
+ | `rust-axum` | Axum + Tower + utoipa + jsonwebtoken + argon2 + sqlx |
27
+ | `go-gin` | Gin + sqlc + swag + golang-jwt + gorilla/websocket |
28
+ | `go-stdlib` | net/http 1.22 (no framework) + sqlc + coder/websocket |
29
+ | `mcp-node-ts` | MCP server (`@modelcontextprotocol/sdk`) — stdio/sse/http |
30
+ | `mcp-python` | MCP server (`mcp[cli]` / FastMCP) — stdio/sse/http |
31
+ | `mcp-rust` (beta) | MCP server (`rmcp`) — stdio/sse/http |
32
+ | `mcp-go` (beta) | MCP server (`mark3labs/mcp-go`) — stdio/sse/http |
33
+ | `react`, `vue` | Vite scaffold + DARE overlay |
34
+ | `rust-leptos` / `-csr` | Cargo workspace (Axum server + Leptos web) |
35
+
36
+ Non-interactive: `dare init <name> --stack <id>` or `dare init <name> --mcp <lang> [--transport stdio\|sse\|http]`.
37
+
38
+ Generation itself needs **no toolchain**. To build/run the generated project
39
+ afterwards you need that stack's `ruby` / `composer` / `npm` / `cargo` / `python` / `go`
40
+ **somewhere**. There are three ways to provide it — you pick at init time
41
+ (prompt below), and the choice is saved in `dare.config.json` so
42
+ `dare bootstrap` reuses it later.
43
+
44
+ ```
45
+ ? Toolchain for scaffolding (composer / npm / cargo / python / go):
46
+ ❯ 🤖 Auto — use native if on PATH, else Docker (recommended)
47
+ 🔧 Native only — require the CLI on PATH (faster, no Docker pulls)
48
+ 🐳 Docker only — always use the official image (hermetic, no host install)
49
+ ```
50
+
51
+ ### 🤖 Auto (default)
52
+
53
+ Tries the native CLI first. If missing, falls back to the official Docker
54
+ image automatically. If neither is present, fails fast with both install
55
+ links.
56
+
57
+ ```
58
+ which composer → ✓ found? use native
59
+ → ✗ missing? which docker
60
+ → ✓ found? docker run composer:latest …
61
+ → ✗ missing? error: install Composer or Docker
62
+ ```
63
+
64
+ **When:** you don't know exactly what's installed; mixed teams (some
65
+ machines have the toolchain, some only have Docker). The same project
66
+ config (`dare.config.json` with `toolchain: auto`) works on every machine.
67
+
68
+ ### 🔧 Native only
69
+
70
+ Requires the CLI on PATH. **Fails immediately** if missing — no Docker
71
+ fallback even if Docker is available.
72
+
73
+ ```
74
+ which composer → ✓ found? use native
75
+ → ✗ missing? error: "Install Composer: https://getcomposer.org/"
76
+ ```
77
+
78
+ **When:** you already have the toolchain and want **maximum speed** (no
79
+ `docker pull`, no bind-mount overhead, no container startup); you're in CI
80
+ with the toolchain pre-installed; you want to avoid Docker Desktop edge
81
+ cases (Windows volume throttling, Linux uid/gid issues, etc.).
82
+
83
+ ### 🐳 Docker only
84
+
85
+ **Always** runs the scaffold inside the official Docker image — even if
86
+ the native CLI is on PATH. Fails if Docker isn't installed.
87
+
88
+ ```
89
+ which docker → ✓ found? docker run --rm -v ".:/app" composer:latest create-project …
90
+ → ✗ missing? error: "Install Docker Desktop"
91
+ ```
92
+
93
+ **When:** you don't want to install PHP / Cargo / Python / Go on the
94
+ host (keep host clean); you want **hermetic, reproducible** builds (every
95
+ dev uses the exact toolchain version baked into the image); you want to
96
+ mirror your CI locally.
97
+
98
+ ### Quick decision table
99
+
100
+ | Your situation | Pick |
101
+ |----------------|------|
102
+ | Already have the toolchain installed, want speed | **🔧 Native** |
103
+ | Don't want to install PHP/Cargo/Python/Go on the host | **🐳 Docker** |
104
+ | Mixed team, varying setups | **🤖 Auto** |
105
+ | Just want it to work | **🤖 Auto** |
106
+ | Want bit-for-bit toolchain reproducibility | **🐳 Docker** |
107
+ | Solo dev with everything installed | **🔧 Native** |
108
+
109
+ ### Override later
110
+
111
+ ```bash
112
+ dare bootstrap --toolchain docker # rerun scaffold inside Docker
113
+ dare bootstrap --toolchain native --force # rerun native, overwriting framework files
114
+ dare bootstrap --toolchain auto # back to auto-detect
115
+ ```
116
+
117
+ ### ⚠ Important caveat — Ralph Loop
118
+
119
+ `dare execute --complete` runs the stack's quality gates
120
+ (`composer dump-autoload`, `php artisan test`, `cargo build`, etc.)
121
+ **directly on the host** — it does **not** automatically wrap them in
122
+ Docker even if you picked `docker only` at init time.
123
+
124
+ If you don't have the native toolchain installed, the agent should run
125
+ the gates inside the container created by **task-001** (the Containerize
126
+ task), e.g. `docker compose exec app php artisan test`. The skills
127
+ shipped with `dare init` already nudge the agent toward that pattern.
128
+
129
+ ---
130
+
131
+ ## Prerequisites
132
+
133
+ ### Required for the CLI itself
134
+
135
+ | Tool | Why | Install |
136
+ |------|-----|---------|
137
+ | **Node.js 18+** | runs `dare`, `dare-mcp-server` and the bundled GraphRAG engine | https://nodejs.org/ |
138
+
139
+ ### Required to build/run the generated project
140
+
141
+ `dare init` itself needs no stack toolchain — it writes the project from
142
+ internalized templates. To **build and run** what it generates, you need that
143
+ stack's toolchain (`composer`/`npm`/`cargo`/`go`/`python`/`ruby`). If you don't
144
+ have it natively but have Docker, run the build steps inside the stack's
145
+ official image (the `.github/workflows/dare-ci.yml` the project ships shows the
146
+ exact commands).
147
+
148
+ Pick **one** of the two paths per stack:
149
+
150
+ | Stack | Native toolchain | Docker fallback (used if native missing) |
151
+ |-------|------------------|------------------------------------------|
152
+ | `ruby-rails-8` | Ruby 3.3+ · Bundler 2+ · Rails 8 — https://www.ruby-lang.org/ | `ruby:3.3-slim` |
153
+ | `php-laravel` | PHP 8.2+ · Composer 2+ — https://getcomposer.org/ | `composer:latest` |
154
+ | `node-nestjs` | Node 18+ (bundles `npx`) | `node:20-alpine` |
155
+ | `python-fastapi` | Python 3.11+ — https://www.python.org/downloads/ | `python:3.12-slim` |
156
+ | `rust-axum` | Rust 1.83+ (rustup) — https://www.rust-lang.org/tools/install | `rust:1.83` |
157
+ | `go-gin` | Go 1.25+ — https://go.dev/dl/ | `golang:1.25` |
158
+ | `go-stdlib` | Go 1.22+ — https://go.dev/dl/ | `golang:1.25` |
159
+ | `react`, `vue` | Node 18+ (bundles `npm`) | `node:20-alpine` |
160
+ | `rust-leptos` | Rust 1.83+ (rustup) + **cargo-leptos 0.2.22** — `cargo install cargo-leptos --version 0.2.22` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
161
+ | `rust-leptos-csr` | Rust 1.83+ (rustup) + **trunk** — `cargo install trunk` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
162
+ | `mcp-node-ts` | Node 18+ | `node:20-alpine` |
163
+ | `mcp-python` | Python 3.11+ | `python:3.12-slim` |
164
+ | `mcp-rust` (beta) | Rust 1.78+ (rustup) | `rust:1.83` |
165
+ | `mcp-go` (beta) | Go 1.23+ — https://go.dev/dl/ | `golang:1.25` |
166
+
167
+ > **v3.3.0:** **Reliable Verification Core** (opt-in via `dare.config.json#verification`) — turns the Ralph Loop's "tests pass" gate into "correct & robust": mutation testing, fail-to-pass specs, anti-tamper, a decay-aware loop policy, best-of-N candidate selection over git worktrees, and a `dare bench` regression harness (solve-rate + Fix·Rate). Absent the `verification` block, behavior is unchanged.
168
+
169
+ > **v3.2.0:** full **CLI ↔ IDE parity** — every one of the 18 CLI commands is invocable as `/dare-<cmd>` across all three IDEs (Cursor, Claude Code, Antigravity); a parity test fails the build if a command is missing a skill. Brownfield commands now **collect real data by default**: `dare reverse`/`dna` extract endpoints + entities and render them into `IDEIA.md` and the module specs (no more skeleton-only artifacts).
170
+
171
+ > **v3.1.0:** all **11 stacks** ship a full generator internalized in `@dewtech/dare-cli` — 7 backend (ruby-rails-8, node-nestjs, python-fastapi, php-laravel, rust-axum, go-gin, go-stdlib) + 4 MCP (mcp-node-ts, mcp-python, mcp-rust, mcp-go). No isolated stack packages; everything is in one publishable tarball (fixes the `npm install -g` 404 of earlier releases). `dare new` was removed — `dare init` is the only scaffolding entrypoint.
172
+
173
+ > **TL;DR:** if you have **Docker Desktop** installed, you don't strictly need
174
+ > any other toolchain — `dare init` will pull the right image on demand.
175
+ > Native toolchains are faster and don't depend on Docker pulling images.
176
+
177
+ If neither the native CLI **nor** Docker is available, `dare init` fails
178
+ fast with a clear error message — it never falls back to a fake template.
179
+
180
+ ### Choose the toolchain at init time
181
+
182
+ The 3 modes (`auto` / `native` / `docker`) are explained in detail at the
183
+ top of this README — see [⚠ Read this first](#-read-this-first--how-dare-init-runs-the-official-scaffold).
184
+
185
+ Quick recap:
186
+
187
+ | Mode | Behavior |
188
+ |------|----------|
189
+ | `auto` (default) | Native if available, else Docker. Recommended. |
190
+ | `native` | Requires the native CLI; fails if missing. |
191
+ | `docker` | Always uses the official Docker image. |
192
+
193
+ The choice is persisted in `dare.config.json` (`"toolchain": "..."`).
194
+ Override at any time:
195
+
196
+ ```bash
197
+ dare bootstrap --toolchain docker # rerun scaffold inside Docker
198
+ dare bootstrap --toolchain native --force # rerun native, overwriting
199
+ ```
200
+
201
+ ### Required for the Ralph Loop (per project)
202
+
203
+ Once the project is scaffolded, every `dare execute --complete` runs the
204
+ stack's gates: `build → test → lint`. The same toolchain (native or Docker)
205
+ that scaffolded the project is needed to run those gates. Plan accordingly:
206
+ if you chose `php-laravel` and only have Docker, `dare execute --complete`
207
+ needs to invoke `php artisan test` somehow — typically by running it inside
208
+ your `docker-compose` app service (this is the kind of thing the
209
+ `task-001 = Containerize app` task sets up).
210
+
211
+ ## Installation
212
+
213
+ ```bash
214
+ npm install -g @dewtech/dare-cli
215
+ ```
216
+
217
+ ## Commands
218
+
219
+ ### `dare init`
220
+
221
+ Interactive project initialization — creates the full project structure with DARE methodology files, IDE rules and stack templates.
222
+
223
+ ```bash
224
+ dare init my-project
225
+ ```
226
+
227
+ Prompts:
228
+ - **Structure:** Monorepo · Backend only · Frontend only · **MCP Server** ← new
229
+ - **MCP Server:** language (TypeScript / Python), transport (stdio / SSE / HTTP Stream), capabilities (Tools / Resources / Prompts)
230
+ - **Backend stack:** Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib
231
+ - **Frontend stack:** React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR-only (Rust WASM)
232
+ - **Cargo workspace layout** *(Monorepo + Rust/Axum + Leptos only)*: Single-crate (`crates/server` + `crates/web`) · Multi-crate (`{prefix}-core` + `{prefix}-server` + `{prefix}-web` + `{prefix}-cli`) — prefix suggested from project initials (e.g. `ai-runtime-securyti-rasp` → `arsr`)
233
+ - **IDE / Agent:** Claude Code · Cursor · Antigravity · Hybrid
234
+ - **GraphRAG backend:** SQLite · JSON · Neo4j
235
+ - **DARE MCP Server:** context query server (saves ~95% tokens)
236
+
237
+ Generates:
238
+ - `dare.config.json` — project config
239
+ - `CLAUDE.md` + `.claude/commands/` + `.claude/settings.json` — Claude Code rules and slash commands (includes `/dare-security`)
240
+ - `.cursorrules` / `.antigravityrules` — Cursor / Antigravity rules
241
+ - `.cursor/rules/*.mdc` — stack-specific skills
242
+ - `.cursor/commands/` — Cursor slash commands
243
+ - `.agents/skills/` — Antigravity agent skills
244
+ - `DARE/` — methodology directory (DESIGN, BLUEPRINT, TASKS, dag)
245
+ - Full project template ready to run (MCP server, backend or frontend)
246
+
247
+ ---
248
+
249
+ ### `dare discover` ← new in v0.3.0
250
+
251
+ Detects an existing project's stack automatically and installs DARE files without touching your source code.
252
+
253
+ ```bash
254
+ # Run inside an existing project
255
+ cd my-existing-project
256
+ dare discover
257
+
258
+ # Inspect only, no changes
259
+ dare discover --check
260
+
261
+ # Target a specific directory
262
+ dare discover --dir ./path/to/project
263
+ ```
264
+
265
+ Auto-detects from: `package.json`, `Cargo.toml`, `requirements.txt`, `pyproject.toml`, `composer.json`.
266
+
267
+ Recognizes: NestJS · React · Vue · Nuxt · Rust/Axum · FastAPI · Laravel · **MCP Server** (`@modelcontextprotocol/sdk`, `FastMCP`).
268
+
269
+ ---
270
+
271
+ ### `dare reverse` ← brownfield (Phase 0)
272
+
273
+ Reverse-engineer an existing codebase into a Phase-0 understanding **without touching the source**.
274
+ Deterministically detects module boundaries, sizes them by LOC and infers the dependency graph.
275
+
276
+ ```bash
277
+ cd my-legacy-project
278
+ dare reverse # → DARE/IDEIA.md + REVERSE/module-*.md + reverse-facts.json + architecture.excalidraw
279
+ dare reverse --check # detection only, no files
280
+ dare reverse --modules api,auth
281
+ dare reverse --no-excalidraw
282
+ ```
283
+
284
+ **Confidence & traceability.** The `/dare-reverse` skill marks each claim 🟢 CONFIRMED (with
285
+ `file:line` evidence) · 🟡 INFERRED · 🔴 GAP. Then:
286
+
287
+ ```bash
288
+ dare reverse --report # deterministic confidence index from the markers (not LLM self-scored)
289
+ ```
290
+
291
+ → `confidence-report.md` + `traceability/code-spec-matrix.md`; the 🔴 become `gaps.md` + `questions.md`.
292
+
293
+ **Deep extraction (framework-agnostic per language):**
294
+
295
+ ```bash
296
+ dare reverse --deep # + ERD, API surface, C4, domain-rules, state-machines, permissions
297
+ ```
298
+
299
+ The CLI extracts the data model (`erd.md`) and endpoints (`api-surface.md`) deterministically from
300
+ **SQL inline (DDL + query tables), Prisma, ORMs and plain types/classes/structs** — so it works on
301
+ legacy projects **with or without a framework** (e.g. raw-PDO PHP without Laravel). Routes cover
302
+ multiple dialects per language (Express/Nest/Fastify, Laravel/Slim/Symfony, FastAPI/Flask/Django,
303
+ Rails/Sinatra, Gin/stdlib, Axum).
304
+
305
+ ---
306
+
307
+ ### `dare dna` ← brownfield
308
+
309
+ Extract the legacy codebase's **conventions** so the agent follows the house style instead of generic
310
+ defaults — for legacy you can't rewrite.
311
+
312
+ ```bash
313
+ cd my-legacy-project
314
+ dare dna # → DARE/PROJECT-DNA.md + dna-facts.json
315
+ dare dna --check
316
+ ```
317
+
318
+ Detects lint/format tooling, naming conventions, architecture layers, test framework, key libraries
319
+ (ORM/HTTP/auth/validation) and commit convention. The `/dare-dna` skill turns the facts into
320
+ actionable rules. Reuses `reverse-facts.json` if `dare reverse` already ran.
321
+
322
+ ---
323
+
324
+ ### `dare migrate` ← brownfield (Phase 2)
325
+
326
+ Plan a **safe migration** to a target stack, with **Gherkin parity scenarios** that guarantee
327
+ behavior is preserved. Requires `dare reverse` first.
328
+
329
+ ```bash
330
+ cd my-legacy-project
331
+ dare migrate --to go-gin # or rust-axum, node-nestjs, python-fastapi, php-laravel, ruby-rails-8…
332
+ dare migrate --check
333
+ ```
334
+
335
+ Consumes `IDEIA` + `DNA`, inherits the **blocking gaps** (🔴) as risks, and generates
336
+ `DARE/MIGRATION/MIGRATION.md` (paradigm, strategy, risk register, target architecture, cutover) +
337
+ `parity/<module>.feature` (the behavioral acceptance contract). The `/dare-migrate` skill fills the
338
+ strategy and the real parity scenarios.
339
+
340
+ > **Brownfield loop:** `reverse` (the *what*) → `dna` (the *how*) → `migrate` (reimplement with
341
+ > parity) → `design`/`blueprint`/`execute` on the target stack.
342
+
343
+ ---
344
+
345
+ ### `dare design`
346
+
347
+ Generate `DARE/DESIGN.md` from a project description.
348
+
349
+ ```bash
350
+ dare design "Build a REST API for user authentication with JWT"
351
+ ```
352
+
353
+ ---
354
+
355
+ ### `dare blueprint`
356
+
357
+ Generate `DARE/BLUEPRINT.md` from `DESIGN.md`. Stops here — requires human review and approval before tasks are created.
358
+
359
+ ```bash
360
+ dare blueprint
361
+ ```
362
+
363
+ ---
364
+
365
+ ### `dare tasks`
366
+
367
+ Generate `DARE/TASKS.md`, `DARE/dare-dag.yaml` and all `DARE/EXECUTION/task-*.md` specs from an approved `BLUEPRINT.md`. Run this only after reviewing and approving the blueprint.
368
+
369
+ ```bash
370
+ dare tasks
371
+ ```
372
+
373
+ ---
374
+
375
+ ### `dare execute`
376
+
377
+ Orchestrate DAG execution. **The IDE is the executor** (Cursor / Antigravity
378
+ / Claude Code) — `dare execute` only coordinates state, composes prompts
379
+ with parent context, updates the live canvas at `DARE/.canvas.md`, and
380
+ ingests finished tasks into the knowledge graph.
381
+
382
+ > **No API keys, no extra token costs.** You use the plan of the IDE you're
383
+ > already logged into.
384
+
385
+ ```bash
386
+ # Print next executable tasks (with composed prompts)
387
+ dare execute --next
388
+
389
+ # Mark a task DONE after the agent finishes it
390
+ dare execute --complete task-001 --output "Created src/auth.ts and tests/auth.test.ts; all tests green."
391
+
392
+ # Mark a task FAILED — descendants are cascade-skipped automatically
393
+ dare execute --fail task-002 --reason "Schema migration conflict in users table"
394
+
395
+ # Reset a task back to PENDING (for retry)
396
+ dare execute --reset task-002
397
+
398
+ # Show snapshot of canvas + summary (default action)
399
+ dare execute --status
400
+ ```
401
+
402
+ #### Typical flow inside the IDE agent
403
+
404
+ ```bash
405
+ dare execute --next # → tasks ready in current rank
406
+ # (agent executes each task: code, build, test, lint)
407
+ dare execute --complete task-001 --output "…"
408
+ dare execute --complete task-002 --output "…"
409
+ dare execute --next # → next rank
410
+ # (repeat until "✅ All tasks resolved")
411
+ ```
412
+
413
+ The skills shipped by `dare init` (`.cursor/rules/skill-dag-runner.mdc`,
414
+ `.agents/skills/dare-dag-runner/SKILL.md`, `.claude/commands/dare-dag-run.md`)
415
+ guide the IDE agent through this loop.
416
+
417
+ #### Stack-specific skills
418
+
419
+ `dare init` also ships skills focused on architectural decisions for
420
+ specific stacks. As of v2.15.0:
421
+
422
+ - **`skill-rust-workspace.mdc`** (Cursor) /
423
+ **`dare-rust-workspace/SKILL.md`** (Antigravity) /
424
+ **`/dare-rust-workspace`** (Claude command) — guides the agent on
425
+ whether a Rust project should start single-crate or as a Cargo
426
+ workspace, and gives a step-by-step PR-by-PR migration plan when an
427
+ existing single-crate project has outgrown its layout. Active during
428
+ `/dare-design` and `/dare-blueprint` for `rust-axum` projects, plus on
429
+ demand for migration analysis.
430
+
431
+ - **`skill-rust-leptos.mdc`** (Cursor) /
432
+ **`dare-rust-leptos/SKILL.md`** (Antigravity) /
433
+ **`/dare-rust-leptos`** (Claude command) — full guide for Leptos
434
+ development: CSR vs fullstack decision table, Leptos 0.7 idioms
435
+ (signals, Resource, Action, Show, For, `#[server]`), shared types with
436
+ `cfg_attr`, mixed workspace configuration (WASM + native crates), and
437
+ antipatterns to avoid (`cargo leptos test` does not exist; no global
438
+ `[build] target` in `.cargo/config.toml`). Ships 3 ready-to-use DARE
439
+ task templates for Leptos projects.
440
+
441
+ ### `dare bootstrap`
442
+
443
+ Lay down a stack's DARE-shaped source on **an existing project** (created in
444
+ older versions or with `--skip-bootstrap`). Reads `dare.config.json` and runs
445
+ the internalized generator for the configured stack — the same one `dare init`
446
+ uses. Frontend stacks (`react` / `vue` / `rust-leptos`) still use their Vite /
447
+ Cargo scaffold.
448
+
449
+ ```bash
450
+ dare bootstrap # refuses if vendor/ or node_modules/ already exist
451
+ dare bootstrap --force # runs anyway (may overwrite framework files)
452
+ ```
453
+
454
+ Your DARE artifacts (`.cursor/`, `DARE/`, `dare.config.json`, `dare-graph.yml`)
455
+ are preserved.
456
+
457
+ ### `dare info`
458
+
459
+ Read-only diagnostic of the current project: CLI version, platform, presence
460
+ of each canonical DARE artifact, active GraphRAG backend, and task progress.
461
+
462
+ ```bash
463
+ dare info
464
+ ```
465
+
466
+ ### `dare review` ← new in v2.17.0
467
+
468
+ **Anti-stub gate.** Audita os arquivos que uma task tocou e detecta padrões de "fake completeness": `TODO`/`FIXME`, stubs (`throw new Error('not implemented')`, `todo!()`, `NotImplementedError`), funções vazias, retorno-fantasma (`return null` como única statement), mocks fora de testes (`jest.fn`, `vi.mock`, `sinon.stub`, `MagicMock`), comentários-placeholder (`// implement later`).
469
+
470
+ A camada estática (regex, determinística) é só metade. A IDE agent pode rodar a skill `dare-review` / `review-task` para validar critério-a-critério se a implementação atende a spec, emitir um `SemanticVerdict` JSON, e o CLI funde os dois numa única decisão.
471
+
472
+ ```bash
473
+ # Audita os arquivos listados em DARE/EXECUTION/task-034.md
474
+ dare review task-034
475
+
476
+ # Em CI:
477
+ dare review task-034 --strict --format json
478
+
479
+ # Lista explícita de arquivos:
480
+ dare review task-034 --files src/auth/login.ts src/auth/register.ts
481
+
482
+ # Funde com verdito semântico do agente:
483
+ dare review task-034 --from-agent .dare/verdict-task-034.json
484
+ ```
485
+
486
+ **Gate opt-in no Ralph Loop:** com `review.onComplete: true` em `dare.config.json`, `dare execute --complete <id>` bloqueia DONE se a review falhar. Para projetos novos (`dare init` v2.17+) já vem ligado; projetos legados permanecem off até o dev flipar.
487
+
488
+ ### `dare refine` ← new in v2.17.0
489
+
490
+ **Anti-monstro.** Mede complexidade de uma task e, opcionalmente, propõe quebra em sub-tasks menores. Heurística determinística pesa # arquivos, # funções/endpoints, # testes, # dependências, keywords "pesadas" (refactor/migrate/integrate/multiple) — produz um score em LOW (0–5) / MED (6–12) / HIGH (13–20) / CRITICAL (21+).
491
+
492
+ ```bash
493
+ # Apenas mede e reporta:
494
+ dare refine task-034
495
+
496
+ # Mede + propõe quebra em sub-tasks (task-034a, task-034b, ...):
497
+ dare refine task-034 --split
498
+
499
+ # Anota TASKS.md marcando a task para split (o agente regenera as specs):
500
+ dare refine task-034 --split --apply
501
+
502
+ # Em CI: exit code 2 se HIGH/CRITICAL:
503
+ dare refine task-034 --strict
504
+ ```
505
+
506
+ A camada determinística agrupa arquivos por diretório raiz. A IDE agent (skills `dare-refine` / `refine-task`) refina o split semanticamente — por camada (Model/Controller/Service), por endpoint, por feature, refactor-then-feature, migration-then-code.
507
+
508
+ Thresholds configuráveis em `dare.config.json`:
509
+
510
+ ```jsonc
511
+ {
512
+ "refine": {
513
+ "thresholds": { "low": 5, "med": 12, "high": 20 }
514
+ }
515
+ }
516
+ ```
517
+
518
+ ### `dare update` ← new in v2.17.0
519
+
520
+ Sync the **project's DARE setup** (templates, slash commands, skills, schema)
521
+ with the version of the CLI currently installed. Useful when you upgrade the
522
+ CLI globally (`npm install -g @dewtech/dare-cli@latest`) and want a previous
523
+ project to pick up the new improvements — **without touching your DESIGN /
524
+ BLUEPRINT / TASKS / dare-dag.yaml artifacts**.
525
+
526
+ Different from upgrading the CLI itself: `npm update -g @dewtech/dare-cli`
527
+ changes the binary on your machine; `dare update` changes the *project files
528
+ on disk* to match what that binary now ships.
529
+
530
+ ```bash
531
+ dare update # interactive (recommended)
532
+ dare update --dry-run # preview: shows changelog + affected files, writes nothing
533
+ dare update --yes # CI: apply, preserve customizations, no prompts
534
+ dare update --force # also overwrite files the dev customized (dangerous)
535
+ dare update --target 2.17.0 # update to a specific release instead of the installed CLI
536
+ ```
537
+
538
+ **What it does:**
539
+
540
+ 1. Reads `version` from `dare.config.json` (the project's last-known DARE version).
541
+ 2. Loads `templates/UPDATE-MANIFEST.json` (ships with the CLI) and lists every
542
+ release between the project's version and the CLI's version.
543
+ 3. Prints the changelog for each pending release and the list of files
544
+ affected for your IDE (cursor / claude-code / antigravity / hybrid).
545
+ 4. For each file, classifies the situation:
546
+ - **identical** → skip
547
+ - **missing** → create
548
+ - **apply** → file matches the previous template hash, safe to overwrite
549
+ - **customized** → file diverges from the previous template; prompt
550
+ (`keep` / `replace`) unless `--yes` (keep) or `--force` (replace).
551
+ 5. Backs up every affected file to `.dare/backup-<from-version>/` before
552
+ writing.
553
+ 6. Runs any schema migrations declared by the release (e.g. renaming a
554
+ config field).
555
+ 7. Stamps `version` and `updatedAt` in `dare.config.json`.
556
+
557
+ **Adding entries when you cut a release:** each new CLI version that ships
558
+ template changes needs a corresponding entry in `templates/UPDATE-MANIFEST.json`
559
+ listing `changes` (added / modified / removed / renamed) and optional
560
+ `migrations`. The applier filters changes by `appliesTo: [ide]`, so a
561
+ template that's cursor-only won't be installed in a Claude Code project and
562
+ vice versa.
563
+
564
+ ### `dare validate`
565
+
566
+ Static checks on `dare-dag.yaml` — ideal for pre-commit hooks and CI.
567
+ Verifies unique kebab-case ids, valid `depends_on`, absence of cycles,
568
+ non-empty prompts, and parallelism (warning when only one task at rank 0).
569
+
570
+ ```bash
571
+ dare validate # errors fail; warnings printed
572
+ dare validate --strict # warnings also fail (CI-friendly)
573
+ ```
574
+
575
+ A pre-commit hook template is shipped at
576
+ `templates/hooks/pre-commit-dare-validate` — copy to `.git/hooks/pre-commit`
577
+ (or use with husky) to validate the DAG before every commit.
578
+
579
+ ### `dare execute --watch`
580
+
581
+ Interactive loop: the CLI watches `.dare/state.json` and re-prints the next
582
+ ready tasks every time the state changes. Pair with the IDE agent firing
583
+ `--complete`/`--fail` from another terminal.
584
+
585
+ ```bash
586
+ dare execute --watch
587
+ ```
588
+
589
+ ### `dare dag`
590
+
591
+ Inspect and visualize the **static task DAG** declared in `dare-dag.yaml` —
592
+ distinct from `dare graph`, which inspects the populated knowledge graph
593
+ (only contains tasks already executed).
594
+
595
+ ```bash
596
+ dare dag viz # Mermaid to stdout
597
+ dare dag viz -o DARE/dag-graph.mmd # Mermaid file
598
+ dare dag viz -f dot -o DARE/dag-graph.dot # DOT (Graphviz)
599
+ ```
600
+
601
+ The Mermaid output groups tasks into rank subgraphs and colors nodes by
602
+ status (`PENDING` / `RUNNING` / `DONE` / `FAILED` / `SKIPPED`), so you can
603
+ **see the execution plan before running any task**.
604
+
605
+ > `dare tasks` writes `DARE/dag-graph.mmd` automatically — open it in
606
+ > your editor with a Mermaid preview to see the static graph immediately.
607
+
608
+ ### `dare graph`
609
+
610
+ Inspect the project's knowledge graph. The graph is populated automatically
611
+ by `dare execute --complete/--fail` (task nodes, file nodes, `depends_on` and
612
+ `implements` edges). Backend is whatever `dare-graph.yml` declares
613
+ (`sqlite` default, `json` available, `neo4j` planned).
614
+
615
+ ```bash
616
+ dare graph stats # totals + breakdown by type
617
+ dare graph query auth # search nodes by label/description
618
+ dare graph query auth --limit 20
619
+
620
+ dare graph viz # Mermaid to stdout
621
+ dare graph viz -f dot # DOT for Graphviz
622
+ dare graph viz -o docs/graph.mmd # write to file
623
+
624
+ dare graph ingest # re-sync from dare-dag.yaml + state
625
+ ```
626
+
627
+ ---
628
+
629
+ ## Full Workflow
630
+
631
+ ```bash
632
+ # New project
633
+ dare init my-project
634
+ cd my-project
635
+ dare design "Describe what you're building"
636
+ dare blueprint
637
+ dare execute --parallel
638
+
639
+ # Existing project
640
+ cd my-existing-project
641
+ dare discover
642
+ dare design "Describe what you're building"
643
+ dare blueprint
644
+ dare execute --parallel
645
+ ```
646
+
647
+ ## Claude Code Workflow
648
+
649
+ ```bash
650
+ dare init my-project
651
+ # → IDE: Claude Code
652
+ # → Structure: Backend / Frontend / MCP Server
653
+
654
+ cd my-project
655
+ # Claude Code slash commands available:
656
+ # /dare-design → generates DARE/DESIGN.md
657
+ # /dare-blueprint → generates BLUEPRINT.md + DAG
658
+ # /dare-execute task-001 → implements with Ralph Loop
659
+ # /dare-tasks → shows task status table
660
+ ```
661
+
662
+ Files generated for Claude Code:
663
+ ```
664
+ CLAUDE.md ← main context (stack rules + DARE methodology)
665
+ .claude/
666
+ settings.json ← permissions + Ralph Loop hook
667
+ commands/
668
+ dare-design.md ← /dare-design
669
+ dare-blueprint.md ← /dare-blueprint
670
+ dare-execute.md ← /dare-execute
671
+ dare-tasks.md ← /dare-tasks
672
+ ```
673
+
674
+ ---
675
+
676
+ ## MCP Server Workflow
677
+
678
+ ```bash
679
+ dare init my-mcp-server
680
+ # → Structure: MCP Server
681
+ # → Language: TypeScript
682
+ # → Transport: stdio
683
+ # → Capabilities: Tools, Resources
684
+
685
+ cd my-mcp-server
686
+ npm install
687
+ dare design "MCP server that exposes ZIP code lookup tools"
688
+ dare blueprint
689
+ dare execute --parallel
690
+
691
+ # Test with MCP Inspector
692
+ npm run inspect
693
+ ```
694
+
695
+ ---
696
+
697
+ ## Performance
698
+
699
+ | Mode | Estimated Time |
700
+ |------|----------------|
701
+ | Sequential | ~280 minutes |
702
+ | Parallel DAG | ~70 minutes |
703
+ | **Improvement** | **75% faster** |
704
+
705
+ ---
706
+
707
+ ## Supported Stacks
708
+
709
+ | Type | Options |
710
+ |------|---------|
711
+ | **Backend** | Ruby on Rails 8 · Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib |
712
+ | **Frontend** | React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR (Rust WASM) |
713
+ | **MCP Server** | TypeScript/Node.js · Python — stdio / SSE / HTTP Stream |
714
+ | **IDE / Agent** | Claude Code · Cursor · Antigravity · Hybrid |
715
+
716
+ ---
717
+
718
+ ## Skills disponíveis (v3.0.0)
719
+
720
+ **32 skills em paridade total** nas 3 IDEs (Antigravity, Claude Code, Cursor). Cada skill existe em formato nativo de cada uma e é entregue por `dare init` / `dare update`.
721
+
722
+ | Categoria | Skills | Exemplos |
723
+ |---|---|---|
724
+ | **Método DARE** | 6 | `dare-design`, `dare-blueprint`, `dare-tasks`, `dare-execute`, `dare-review`, `dare-refine` |
725
+ | **DAG runner** | 4 | `dare-dag-build`, `dare-dag-run`, `dare-dag-runner`, `dare-dag-viz` |
726
+ | **Transversais** | 6 | `dare-ax`, `dare-layered-design`, `dare-llm-integration`, `dare-frontend-design`, `dare-realtime`, `dare-quality-telemetry` |
727
+ | **Stack / Tools** | 8 | `dare-docker`, `dare-security`, `dare-telemetry`, `dare-bugfix-design`, `dare-feature-design`, `dare-rust-workspace`, `dare-rust-leptos`, `dare-laravel-api` |
728
+ | **Stacks novas v3.0.0** | 5 | `dare-nestjs-api`, `dare-fastapi-api`, `dare-go-gin-api`, `dare-mcp-server`, `dare-rails-api` |
729
+ | **Brownfield** | 3 | `dare-reverse`, `dare-dna`, `dare-migrate` |
730
+
731
+ Ver tabela cruzada completa em [`docs/skills/INDEX.md`](https://github.com/dewtech-technologies/dare-method/blob/main/docs/skills/INDEX.md).
732
+
733
+ ---
734
+
735
+ ## O que vem com o pacote (v2.0+)
736
+
737
+ A partir da v2.0 o `@dewtech/dare-cli` é um **pacote único** que inclui todas as
738
+ funcionalidades do framework DARE. Você não precisa instalar nada além dele:
739
+
740
+ ```bash
741
+ npm install -g @dewtech/dare-cli
742
+ ```
743
+
744
+ Isso já dá:
745
+
746
+ | Componente | O que é |
747
+ |------------|---------|
748
+ | CLI `dare` | `init`, `design`, `blueprint`, `execute`, `discover`, `reverse`, `dna`, `migrate` |
749
+ | CLI `dare-mcp-server` | Servidor MCP local de contexto (~95% economia de tokens) |
750
+ | Engine GraphRAG | Grafo de conhecimento com SQLite + FTS5 |
751
+ | DAG Task Runner | Execução paralela de tasks com Kahn's algorithm |
752
+ | Tipos e templates | Tudo embutido — sem dependências externas do `@dewtech/*` |
753
+
754
+ > **Histórico (v1.x):** os pacotes `@dewtech/dare-core`, `@dewtech/dare-graphrag` e
755
+ > `@dewtech/dare-mcp-server` foram consolidados em `@dewtech/dare-cli` e estão
756
+ > **deprecated** no npm. Não há mais subpacotes para gerenciar.
757
+
758
+ ---
759
+
760
+ ## Links
761
+
762
+ - [GitHub](https://github.com/dewtech-technologies/dare-method)
763
+ - [DARE Methodology](https://github.com/dewtech-technologies/dare-method#-o-método)
764
+ - [Dewtech](https://dewtech.tech)