@dewtech/dare-cli 2.14.0 → 2.16.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.
- package/README.md +561 -561
- package/dist/commands/dag.d.ts.map +1 -1
- package/dist/commands/dag.js +27 -9
- package/dist/commands/dag.js.map +1 -1
- package/dist/utils/excalidraw-renderer.d.ts +79 -0
- package/dist/utils/excalidraw-renderer.d.ts.map +1 -0
- package/dist/utils/excalidraw-renderer.js +188 -0
- package/dist/utils/excalidraw-renderer.js.map +1 -0
- package/dist/utils/excalidraw-renderer.test.d.ts +2 -0
- package/dist/utils/excalidraw-renderer.test.d.ts.map +1 -0
- package/dist/utils/excalidraw-renderer.test.js +135 -0
- package/dist/utils/excalidraw-renderer.test.js.map +1 -0
- package/dist/utils/project-generator.js +12 -2
- package/dist/utils/project-generator.js.map +1 -1
- package/dist/utils/stack-bootstrap.js +18 -1
- package/dist/utils/stack-bootstrap.js.map +1 -1
- package/package.json +1 -1
- package/templates/DARE-dag-example.yaml +280 -0
- package/templates/ide/claude/.claude/commands/dare-dag-viz.md +197 -0
package/README.md
CHANGED
|
@@ -1,561 +1,561 @@
|
|
|
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
|
-
[](https://www.npmjs.com/package/@dewtech/dare-cli)
|
|
8
|
-
[](https://github.com/dewtech-technologies/dare-method/blob/main/LICENSE)
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## ⚠ Read this first — How `dare init` runs the official scaffold
|
|
13
|
-
|
|
14
|
-
`dare init` invokes the **official scaffold** of the stack you pick. That
|
|
15
|
-
means it literally runs:
|
|
16
|
-
|
|
17
|
-
| Stack | What `dare init` runs |
|
|
18
|
-
|-------|----------------------|
|
|
19
|
-
| `php-laravel` | `composer create-project laravel/laravel:^11 .` |
|
|
20
|
-
| `node-nestjs` | `npx @nestjs/cli new . --strict --skip-git` |
|
|
21
|
-
| `python-fastapi` | `python -m venv .venv && python -m pip install -r requirements.txt` |
|
|
22
|
-
| `rust-axum` | `cargo init` + write `Cargo.toml` (axum, sqlx, tokio…) |
|
|
23
|
-
| `go-gin` | `go mod init` + `go get gin/godotenv` + starter files |
|
|
24
|
-
| `go-stdlib` | `go mod init` + starter usando só `net/http` (zero deps externas) |
|
|
25
|
-
| `react`, `vue` | `npx degit vitejs/vite/packages/create-vite/template-<x> .` + `npm install` |
|
|
26
|
-
| `rust-leptos` | Cargo workspace with `crates/server` (Axum) + `crates/web` (Leptos 0.7 SSR+hydrate) + `cargo fetch` |
|
|
27
|
-
| `rust-leptos-csr` | Cargo workspace with `crates/server` (Axum) + `crates/web` (Leptos 0.7 CSR) + Trunk.toml + `cargo fetch` |
|
|
28
|
-
| `mcp-server-node-ts` | `npm init` + `@modelcontextprotocol/sdk` |
|
|
29
|
-
| `mcp-server-python` | `python -m venv .venv` + `pip install mcp[cli]` |
|
|
30
|
-
|
|
31
|
-
These need a working `composer` / `npm` / `cargo` / `python` / `go`
|
|
32
|
-
**somewhere**. There are three ways to provide it — you pick at init time
|
|
33
|
-
(prompt below), and the choice is saved in `dare.config.json` so
|
|
34
|
-
`dare bootstrap` reuses it later.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
? Toolchain for scaffolding (composer / npm / cargo / python / go):
|
|
38
|
-
❯ 🤖 Auto — use native if on PATH, else Docker (recommended)
|
|
39
|
-
🔧 Native only — require the CLI on PATH (faster, no Docker pulls)
|
|
40
|
-
🐳 Docker only — always use the official image (hermetic, no host install)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 🤖 Auto (default)
|
|
44
|
-
|
|
45
|
-
Tries the native CLI first. If missing, falls back to the official Docker
|
|
46
|
-
image automatically. If neither is present, fails fast with both install
|
|
47
|
-
links.
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
which composer → ✓ found? use native
|
|
51
|
-
→ ✗ missing? which docker
|
|
52
|
-
→ ✓ found? docker run composer:latest …
|
|
53
|
-
→ ✗ missing? error: install Composer or Docker
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**When:** you don't know exactly what's installed; mixed teams (some
|
|
57
|
-
machines have the toolchain, some only have Docker). The same project
|
|
58
|
-
config (`dare.config.json` with `toolchain: auto`) works on every machine.
|
|
59
|
-
|
|
60
|
-
### 🔧 Native only
|
|
61
|
-
|
|
62
|
-
Requires the CLI on PATH. **Fails immediately** if missing — no Docker
|
|
63
|
-
fallback even if Docker is available.
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
which composer → ✓ found? use native
|
|
67
|
-
→ ✗ missing? error: "Install Composer: https://getcomposer.org/"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**When:** you already have the toolchain and want **maximum speed** (no
|
|
71
|
-
`docker pull`, no bind-mount overhead, no container startup); you're in CI
|
|
72
|
-
with the toolchain pre-installed; you want to avoid Docker Desktop edge
|
|
73
|
-
cases (Windows volume throttling, Linux uid/gid issues, etc.).
|
|
74
|
-
|
|
75
|
-
### 🐳 Docker only
|
|
76
|
-
|
|
77
|
-
**Always** runs the scaffold inside the official Docker image — even if
|
|
78
|
-
the native CLI is on PATH. Fails if Docker isn't installed.
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
which docker → ✓ found? docker run --rm -v ".:/app" composer:latest create-project …
|
|
82
|
-
→ ✗ missing? error: "Install Docker Desktop"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**When:** you don't want to install PHP / Cargo / Python / Go on the
|
|
86
|
-
host (keep host clean); you want **hermetic, reproducible** builds (every
|
|
87
|
-
dev uses the exact toolchain version baked into the image); you want to
|
|
88
|
-
mirror your CI locally.
|
|
89
|
-
|
|
90
|
-
### Quick decision table
|
|
91
|
-
|
|
92
|
-
| Your situation | Pick |
|
|
93
|
-
|----------------|------|
|
|
94
|
-
| Already have the toolchain installed, want speed | **🔧 Native** |
|
|
95
|
-
| Don't want to install PHP/Cargo/Python/Go on the host | **🐳 Docker** |
|
|
96
|
-
| Mixed team, varying setups | **🤖 Auto** |
|
|
97
|
-
| Just want it to work | **🤖 Auto** |
|
|
98
|
-
| Want bit-for-bit toolchain reproducibility | **🐳 Docker** |
|
|
99
|
-
| Solo dev with everything installed | **🔧 Native** |
|
|
100
|
-
|
|
101
|
-
### Override later
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
dare bootstrap --toolchain docker # rerun scaffold inside Docker
|
|
105
|
-
dare bootstrap --toolchain native --force # rerun native, overwriting framework files
|
|
106
|
-
dare bootstrap --toolchain auto # back to auto-detect
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### ⚠ Important caveat — Ralph Loop
|
|
110
|
-
|
|
111
|
-
`dare execute --complete` runs the stack's quality gates
|
|
112
|
-
(`composer dump-autoload`, `php artisan test`, `cargo build`, etc.)
|
|
113
|
-
**directly on the host** — it does **not** automatically wrap them in
|
|
114
|
-
Docker even if you picked `docker only` at init time.
|
|
115
|
-
|
|
116
|
-
If you don't have the native toolchain installed, the agent should run
|
|
117
|
-
the gates inside the container created by **task-001** (the Containerize
|
|
118
|
-
task), e.g. `docker compose exec app php artisan test`. The skills
|
|
119
|
-
shipped with `dare init` already nudge the agent toward that pattern.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Prerequisites
|
|
124
|
-
|
|
125
|
-
### Required for the CLI itself
|
|
126
|
-
|
|
127
|
-
| Tool | Why | Install |
|
|
128
|
-
|------|-----|---------|
|
|
129
|
-
| **Node.js 18+** | runs `dare`, `dare-mcp-server` and the bundled GraphRAG engine | https://nodejs.org/ |
|
|
130
|
-
|
|
131
|
-
### Required to scaffold the chosen stack
|
|
132
|
-
|
|
133
|
-
`dare init` runs the **official scaffold** of the stack you pick (e.g.
|
|
134
|
-
`composer create-project laravel/laravel`, `npm create vite@latest`,
|
|
135
|
-
`go mod init`). It tries the native toolchain first; if it isn't on PATH,
|
|
136
|
-
it falls back to running the equivalent **Docker image** automatically.
|
|
137
|
-
|
|
138
|
-
Pick **one** of the two paths per stack:
|
|
139
|
-
|
|
140
|
-
| Stack | Native toolchain | Docker fallback (used if native missing) |
|
|
141
|
-
|-------|------------------|------------------------------------------|
|
|
142
|
-
| `php-laravel` | PHP 8.2+ · Composer 2+ — https://getcomposer.org/ | `composer:latest` |
|
|
143
|
-
| `node-nestjs` | Node 18+ (bundles `npx`) | `node:20-alpine` |
|
|
144
|
-
| `python-fastapi` | Python 3.11+ — https://www.python.org/downloads/ | `python:3.12-slim` |
|
|
145
|
-
| `rust-axum` | Rust 1.83+ (rustup) — https://www.rust-lang.org/tools/install | `rust:1.83` |
|
|
146
|
-
| `go-gin` | Go 1.25+ — https://go.dev/dl/ | `golang:1.25` |
|
|
147
|
-
| `go-stdlib` | Go 1.22+ — https://go.dev/dl/ | `golang:1.25` |
|
|
148
|
-
| `react`, `vue` | Node 18+ (bundles `npm`) | `node:20-alpine` |
|
|
149
|
-
| `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` |
|
|
150
|
-
| `rust-leptos-csr` | Rust 1.83+ (rustup) + **trunk** — `cargo install trunk` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
|
|
151
|
-
| `mcp-server-node-ts` | Node 18+ | `node:20-alpine` |
|
|
152
|
-
| `mcp-server-python` | Python 3.11+ | `python:3.12-slim` |
|
|
153
|
-
|
|
154
|
-
> **TL;DR:** if you have **Docker Desktop** installed, you don't strictly need
|
|
155
|
-
> any other toolchain — `dare init` will pull the right image on demand.
|
|
156
|
-
> Native toolchains are faster and don't depend on Docker pulling images.
|
|
157
|
-
|
|
158
|
-
If neither the native CLI **nor** Docker is available, `dare init` fails
|
|
159
|
-
fast with a clear error message — it never falls back to a fake template.
|
|
160
|
-
|
|
161
|
-
### Choose the toolchain at init time
|
|
162
|
-
|
|
163
|
-
The 3 modes (`auto` / `native` / `docker`) are explained in detail at the
|
|
164
|
-
top of this README — see [⚠ Read this first](#-read-this-first--how-dare-init-runs-the-official-scaffold).
|
|
165
|
-
|
|
166
|
-
Quick recap:
|
|
167
|
-
|
|
168
|
-
| Mode | Behavior |
|
|
169
|
-
|------|----------|
|
|
170
|
-
| `auto` (default) | Native if available, else Docker. Recommended. |
|
|
171
|
-
| `native` | Requires the native CLI; fails if missing. |
|
|
172
|
-
| `docker` | Always uses the official Docker image. |
|
|
173
|
-
|
|
174
|
-
The choice is persisted in `dare.config.json` (`"toolchain": "..."`).
|
|
175
|
-
Override at any time:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
dare bootstrap --toolchain docker # rerun scaffold inside Docker
|
|
179
|
-
dare bootstrap --toolchain native --force # rerun native, overwriting
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### Required for the Ralph Loop (per project)
|
|
183
|
-
|
|
184
|
-
Once the project is scaffolded, every `dare execute --complete` runs the
|
|
185
|
-
stack's gates: `build → test → lint`. The same toolchain (native or Docker)
|
|
186
|
-
that scaffolded the project is needed to run those gates. Plan accordingly:
|
|
187
|
-
if you chose `php-laravel` and only have Docker, `dare execute --complete`
|
|
188
|
-
needs to invoke `php artisan test` somehow — typically by running it inside
|
|
189
|
-
your `docker-compose` app service (this is the kind of thing the
|
|
190
|
-
`task-001 = Containerize app` task sets up).
|
|
191
|
-
|
|
192
|
-
## Installation
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
npm install -g @dewtech/dare-cli
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## Commands
|
|
199
|
-
|
|
200
|
-
### `dare init`
|
|
201
|
-
|
|
202
|
-
Interactive project initialization — creates the full project structure with DARE methodology files, IDE rules and stack templates.
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
dare init my-project
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Prompts:
|
|
209
|
-
- **Structure:** Monorepo · Backend only · Frontend only · **MCP Server** ← new
|
|
210
|
-
- **MCP Server:** language (TypeScript / Python), transport (stdio / SSE / HTTP Stream), capabilities (Tools / Resources / Prompts)
|
|
211
|
-
- **Backend stack:** Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib
|
|
212
|
-
- **Frontend stack:** React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR-only (Rust WASM)
|
|
213
|
-
- **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`)
|
|
214
|
-
- **IDE / Agent:** Claude Code · Cursor · Antigravity · Hybrid
|
|
215
|
-
- **GraphRAG backend:** SQLite · JSON · Neo4j
|
|
216
|
-
- **DARE MCP Server:** context query server (saves ~95% tokens)
|
|
217
|
-
|
|
218
|
-
Generates:
|
|
219
|
-
- `dare.config.json` — project config
|
|
220
|
-
- `CLAUDE.md` + `.claude/commands/` + `.claude/settings.json` — Claude Code rules and slash commands (includes `/dare-security`)
|
|
221
|
-
- `.cursorrules` / `.antigravityrules` — Cursor / Antigravity rules
|
|
222
|
-
- `.cursor/rules/*.mdc` — stack-specific skills
|
|
223
|
-
- `.cursor/commands/` — Cursor slash commands
|
|
224
|
-
- `.agents/skills/` — Antigravity agent skills
|
|
225
|
-
- `DARE/` — methodology directory (DESIGN, BLUEPRINT, TASKS, dag)
|
|
226
|
-
- Full project template ready to run (MCP server, backend or frontend)
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
### `dare discover` ← new in v0.3.0
|
|
231
|
-
|
|
232
|
-
Detects an existing project's stack automatically and installs DARE files without touching your source code.
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
# Run inside an existing project
|
|
236
|
-
cd my-existing-project
|
|
237
|
-
dare discover
|
|
238
|
-
|
|
239
|
-
# Inspect only, no changes
|
|
240
|
-
dare discover --check
|
|
241
|
-
|
|
242
|
-
# Target a specific directory
|
|
243
|
-
dare discover --dir ./path/to/project
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Auto-detects from: `package.json`, `Cargo.toml`, `requirements.txt`, `pyproject.toml`, `composer.json`.
|
|
247
|
-
|
|
248
|
-
Recognizes: NestJS · React · Vue · Nuxt · Rust/Axum · FastAPI · Laravel · **MCP Server** (`@modelcontextprotocol/sdk`, `FastMCP`).
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
### `dare design`
|
|
253
|
-
|
|
254
|
-
Generate `DARE/DESIGN.md` from a project description.
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
dare design "Build a REST API for user authentication with JWT"
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
### `dare blueprint`
|
|
263
|
-
|
|
264
|
-
Generate `DARE/BLUEPRINT.md` from `DESIGN.md`. Stops here — requires human review and approval before tasks are created.
|
|
265
|
-
|
|
266
|
-
```bash
|
|
267
|
-
dare blueprint
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
### `dare tasks`
|
|
273
|
-
|
|
274
|
-
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.
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
dare tasks
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
### `dare execute`
|
|
283
|
-
|
|
284
|
-
Orchestrate DAG execution. **The IDE is the executor** (Cursor / Antigravity
|
|
285
|
-
/ Claude Code) — `dare execute` only coordinates state, composes prompts
|
|
286
|
-
with parent context, updates the live canvas at `DARE/.canvas.md`, and
|
|
287
|
-
ingests finished tasks into the knowledge graph.
|
|
288
|
-
|
|
289
|
-
> **No API keys, no extra token costs.** You use the plan of the IDE you're
|
|
290
|
-
> already logged into.
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
# Print next executable tasks (with composed prompts)
|
|
294
|
-
dare execute --next
|
|
295
|
-
|
|
296
|
-
# Mark a task DONE after the agent finishes it
|
|
297
|
-
dare execute --complete task-001 --output "Created src/auth.ts and tests/auth.test.ts; all tests green."
|
|
298
|
-
|
|
299
|
-
# Mark a task FAILED — descendants are cascade-skipped automatically
|
|
300
|
-
dare execute --fail task-002 --reason "Schema migration conflict in users table"
|
|
301
|
-
|
|
302
|
-
# Reset a task back to PENDING (for retry)
|
|
303
|
-
dare execute --reset task-002
|
|
304
|
-
|
|
305
|
-
# Show snapshot of canvas + summary (default action)
|
|
306
|
-
dare execute --status
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
#### Typical flow inside the IDE agent
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
dare execute --next # → tasks ready in current rank
|
|
313
|
-
# (agent executes each task: code, build, test, lint)
|
|
314
|
-
dare execute --complete task-001 --output "…"
|
|
315
|
-
dare execute --complete task-002 --output "…"
|
|
316
|
-
dare execute --next # → next rank
|
|
317
|
-
# (repeat until "✅ All tasks resolved")
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
The skills shipped by `dare init` (`.cursor/rules/skill-dag-runner.mdc`,
|
|
321
|
-
`.agents/skills/dare-dag-runner/SKILL.md`, `.claude/commands/dare-dag-run.md`)
|
|
322
|
-
guide the IDE agent through this loop.
|
|
323
|
-
|
|
324
|
-
#### Stack-specific skills
|
|
325
|
-
|
|
326
|
-
`dare init` also ships skills focused on architectural decisions for
|
|
327
|
-
specific stacks. As of v2.
|
|
328
|
-
|
|
329
|
-
- **`skill-rust-workspace.mdc`** (Cursor) /
|
|
330
|
-
**`dare-rust-workspace/SKILL.md`** (Antigravity) /
|
|
331
|
-
**`/dare-rust-workspace`** (Claude command) — guides the agent on
|
|
332
|
-
whether a Rust project should start single-crate or as a Cargo
|
|
333
|
-
workspace, and gives a step-by-step PR-by-PR migration plan when an
|
|
334
|
-
existing single-crate project has outgrown its layout. Active during
|
|
335
|
-
`/dare-design` and `/dare-blueprint` for `rust-axum` projects, plus on
|
|
336
|
-
demand for migration analysis.
|
|
337
|
-
|
|
338
|
-
- **`skill-rust-leptos.mdc`** (Cursor) /
|
|
339
|
-
**`dare-rust-leptos/SKILL.md`** (Antigravity) /
|
|
340
|
-
**`/dare-rust-leptos`** (Claude command) — full guide for Leptos
|
|
341
|
-
development: CSR vs fullstack decision table, Leptos 0.7 idioms
|
|
342
|
-
(signals, Resource, Action, Show, For, `#[server]`), shared types with
|
|
343
|
-
`cfg_attr`, mixed workspace configuration (WASM + native crates), and
|
|
344
|
-
antipatterns to avoid (`cargo leptos test` does not exist; no global
|
|
345
|
-
`[build] target` in `.cargo/config.toml`). Ships 3 ready-to-use DARE
|
|
346
|
-
task templates for Leptos projects.
|
|
347
|
-
|
|
348
|
-
### `dare bootstrap`
|
|
349
|
-
|
|
350
|
-
Run the official scaffold for a project's stack on **an existing project**
|
|
351
|
-
(created in older versions or with `--skip-bootstrap`). Reads
|
|
352
|
-
`dare.config.json` and dispatches to:
|
|
353
|
-
|
|
354
|
-
- `composer create-project laravel/laravel` for `php-laravel`
|
|
355
|
-
- `npx @nestjs/cli new` for `node-nestjs`
|
|
356
|
-
- `npm create vite` for `react` / `vue`
|
|
357
|
-
- `python -m venv` + `pip install` for `python-fastapi`
|
|
358
|
-
- `cargo init` + axum-ready `Cargo.toml` for `rust-axum`
|
|
359
|
-
- `npm init` + `@modelcontextprotocol/sdk` for `mcp-server-node`
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
dare bootstrap # refuses if vendor/ or node_modules/ already exist
|
|
363
|
-
dare bootstrap --force # runs anyway (may overwrite framework files)
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
Your DARE artifacts (`.cursor/`, `DARE/`, `dare.config.json`, `dare-graph.yml`)
|
|
367
|
-
are preserved.
|
|
368
|
-
|
|
369
|
-
### `dare info`
|
|
370
|
-
|
|
371
|
-
Read-only diagnostic of the current project: CLI version, platform, presence
|
|
372
|
-
of each canonical DARE artifact, active GraphRAG backend, and task progress.
|
|
373
|
-
|
|
374
|
-
```bash
|
|
375
|
-
dare info
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### `dare validate`
|
|
379
|
-
|
|
380
|
-
Static checks on `dare-dag.yaml` — ideal for pre-commit hooks and CI.
|
|
381
|
-
Verifies unique kebab-case ids, valid `depends_on`, absence of cycles,
|
|
382
|
-
non-empty prompts, and parallelism (warning when only one task at rank 0).
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
dare validate # errors fail; warnings printed
|
|
386
|
-
dare validate --strict # warnings also fail (CI-friendly)
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
A pre-commit hook template is shipped at
|
|
390
|
-
`templates/hooks/pre-commit-dare-validate` — copy to `.git/hooks/pre-commit`
|
|
391
|
-
(or use with husky) to validate the DAG before every commit.
|
|
392
|
-
|
|
393
|
-
### `dare execute --watch`
|
|
394
|
-
|
|
395
|
-
Interactive loop: the CLI watches `.dare/state.json` and re-prints the next
|
|
396
|
-
ready tasks every time the state changes. Pair with the IDE agent firing
|
|
397
|
-
`--complete`/`--fail` from another terminal.
|
|
398
|
-
|
|
399
|
-
```bash
|
|
400
|
-
dare execute --watch
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
### `dare dag`
|
|
404
|
-
|
|
405
|
-
Inspect and visualize the **static task DAG** declared in `dare-dag.yaml` —
|
|
406
|
-
distinct from `dare graph`, which inspects the populated knowledge graph
|
|
407
|
-
(only contains tasks already executed).
|
|
408
|
-
|
|
409
|
-
```bash
|
|
410
|
-
dare dag viz # Mermaid to stdout
|
|
411
|
-
dare dag viz -o DARE/dag-graph.mmd # Mermaid file
|
|
412
|
-
dare dag viz -f dot -o DARE/dag-graph.dot # DOT (Graphviz)
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
The Mermaid output groups tasks into rank subgraphs and colors nodes by
|
|
416
|
-
status (`PENDING` / `RUNNING` / `DONE` / `FAILED` / `SKIPPED`), so you can
|
|
417
|
-
**see the execution plan before running any task**.
|
|
418
|
-
|
|
419
|
-
> `dare tasks` writes `DARE/dag-graph.mmd` automatically — open it in
|
|
420
|
-
> your editor with a Mermaid preview to see the static graph immediately.
|
|
421
|
-
|
|
422
|
-
### `dare graph`
|
|
423
|
-
|
|
424
|
-
Inspect the project's knowledge graph. The graph is populated automatically
|
|
425
|
-
by `dare execute --complete/--fail` (task nodes, file nodes, `depends_on` and
|
|
426
|
-
`implements` edges). Backend is whatever `dare-graph.yml` declares
|
|
427
|
-
(`sqlite` default, `json` available, `neo4j` planned).
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
dare graph stats # totals + breakdown by type
|
|
431
|
-
dare graph query auth # search nodes by label/description
|
|
432
|
-
dare graph query auth --limit 20
|
|
433
|
-
|
|
434
|
-
dare graph viz # Mermaid to stdout
|
|
435
|
-
dare graph viz -f dot # DOT for Graphviz
|
|
436
|
-
dare graph viz -o docs/graph.mmd # write to file
|
|
437
|
-
|
|
438
|
-
dare graph ingest # re-sync from dare-dag.yaml + state
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
---
|
|
442
|
-
|
|
443
|
-
## Full Workflow
|
|
444
|
-
|
|
445
|
-
```bash
|
|
446
|
-
# New project
|
|
447
|
-
dare init my-project
|
|
448
|
-
cd my-project
|
|
449
|
-
dare design "Describe what you're building"
|
|
450
|
-
dare blueprint
|
|
451
|
-
dare execute --parallel
|
|
452
|
-
|
|
453
|
-
# Existing project
|
|
454
|
-
cd my-existing-project
|
|
455
|
-
dare discover
|
|
456
|
-
dare design "Describe what you're building"
|
|
457
|
-
dare blueprint
|
|
458
|
-
dare execute --parallel
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
## Claude Code Workflow
|
|
462
|
-
|
|
463
|
-
```bash
|
|
464
|
-
dare init my-project
|
|
465
|
-
# → IDE: Claude Code
|
|
466
|
-
# → Structure: Backend / Frontend / MCP Server
|
|
467
|
-
|
|
468
|
-
cd my-project
|
|
469
|
-
# Claude Code slash commands available:
|
|
470
|
-
# /dare-design → generates DARE/DESIGN.md
|
|
471
|
-
# /dare-blueprint → generates BLUEPRINT.md + DAG
|
|
472
|
-
# /dare-execute task-001 → implements with Ralph Loop
|
|
473
|
-
# /dare-tasks → shows task status table
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
Files generated for Claude Code:
|
|
477
|
-
```
|
|
478
|
-
CLAUDE.md ← main context (stack rules + DARE methodology)
|
|
479
|
-
.claude/
|
|
480
|
-
settings.json ← permissions + Ralph Loop hook
|
|
481
|
-
commands/
|
|
482
|
-
dare-design.md ← /dare-design
|
|
483
|
-
dare-blueprint.md ← /dare-blueprint
|
|
484
|
-
dare-execute.md ← /dare-execute
|
|
485
|
-
dare-tasks.md ← /dare-tasks
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
---
|
|
489
|
-
|
|
490
|
-
## MCP Server Workflow
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
dare init my-mcp-server
|
|
494
|
-
# → Structure: MCP Server
|
|
495
|
-
# → Language: TypeScript
|
|
496
|
-
# → Transport: stdio
|
|
497
|
-
# → Capabilities: Tools, Resources
|
|
498
|
-
|
|
499
|
-
cd my-mcp-server
|
|
500
|
-
npm install
|
|
501
|
-
dare design "MCP server that exposes ZIP code lookup tools"
|
|
502
|
-
dare blueprint
|
|
503
|
-
dare execute --parallel
|
|
504
|
-
|
|
505
|
-
# Test with MCP Inspector
|
|
506
|
-
npm run inspect
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
---
|
|
510
|
-
|
|
511
|
-
## Performance
|
|
512
|
-
|
|
513
|
-
| Mode | Estimated Time |
|
|
514
|
-
|------|----------------|
|
|
515
|
-
| Sequential | ~280 minutes |
|
|
516
|
-
| Parallel DAG | ~70 minutes |
|
|
517
|
-
| **Improvement** | **75% faster** |
|
|
518
|
-
|
|
519
|
-
---
|
|
520
|
-
|
|
521
|
-
## Supported Stacks
|
|
522
|
-
|
|
523
|
-
| Type | Options |
|
|
524
|
-
|------|---------|
|
|
525
|
-
| **Backend** | Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib |
|
|
526
|
-
| **Frontend** | React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR (Rust WASM) |
|
|
527
|
-
| **MCP Server** | TypeScript/Node.js · Python — stdio / SSE / HTTP Stream |
|
|
528
|
-
| **IDE / Agent** | Claude Code · Cursor · Antigravity · Hybrid |
|
|
529
|
-
|
|
530
|
-
---
|
|
531
|
-
|
|
532
|
-
## O que vem com o pacote (v2.0+)
|
|
533
|
-
|
|
534
|
-
A partir da v2.0 o `@dewtech/dare-cli` é um **pacote único** que inclui todas as
|
|
535
|
-
funcionalidades do framework DARE. Você não precisa instalar nada além dele:
|
|
536
|
-
|
|
537
|
-
```bash
|
|
538
|
-
npm install -g @dewtech/dare-cli
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
Isso já dá:
|
|
542
|
-
|
|
543
|
-
| Componente | O que é |
|
|
544
|
-
|------------|---------|
|
|
545
|
-
| CLI `dare` | `init`, `design`, `blueprint`, `execute`, `discover` |
|
|
546
|
-
| CLI `dare-mcp-server` | Servidor MCP local de contexto (~95% economia de tokens) |
|
|
547
|
-
| Engine GraphRAG | Grafo de conhecimento com SQLite + FTS5 |
|
|
548
|
-
| DAG Task Runner | Execução paralela de tasks com Kahn's algorithm |
|
|
549
|
-
| Tipos e templates | Tudo embutido — sem dependências externas do `@dewtech/*` |
|
|
550
|
-
|
|
551
|
-
> **Histórico (v1.x):** os pacotes `@dewtech/dare-core`, `@dewtech/dare-graphrag` e
|
|
552
|
-
> `@dewtech/dare-mcp-server` foram consolidados em `@dewtech/dare-cli` e estão
|
|
553
|
-
> **deprecated** no npm. Não há mais subpacotes para gerenciar.
|
|
554
|
-
|
|
555
|
-
---
|
|
556
|
-
|
|
557
|
-
## Links
|
|
558
|
-
|
|
559
|
-
- [GitHub](https://github.com/dewtech-technologies/dare-method)
|
|
560
|
-
- [DARE Methodology](https://github.com/dewtech-technologies/dare-method#-o-método)
|
|
561
|
-
- [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
|
+
[](https://www.npmjs.com/package/@dewtech/dare-cli)
|
|
8
|
+
[](https://github.com/dewtech-technologies/dare-method/blob/main/LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ⚠ Read this first — How `dare init` runs the official scaffold
|
|
13
|
+
|
|
14
|
+
`dare init` invokes the **official scaffold** of the stack you pick. That
|
|
15
|
+
means it literally runs:
|
|
16
|
+
|
|
17
|
+
| Stack | What `dare init` runs |
|
|
18
|
+
|-------|----------------------|
|
|
19
|
+
| `php-laravel` | `composer create-project laravel/laravel:^11 .` |
|
|
20
|
+
| `node-nestjs` | `npx @nestjs/cli new . --strict --skip-git` |
|
|
21
|
+
| `python-fastapi` | `python -m venv .venv && python -m pip install -r requirements.txt` |
|
|
22
|
+
| `rust-axum` | `cargo init` + write `Cargo.toml` (axum, sqlx, tokio…) |
|
|
23
|
+
| `go-gin` | `go mod init` + `go get gin/godotenv` + starter files |
|
|
24
|
+
| `go-stdlib` | `go mod init` + starter usando só `net/http` (zero deps externas) |
|
|
25
|
+
| `react`, `vue` | `npx degit vitejs/vite/packages/create-vite/template-<x> .` + `npm install` |
|
|
26
|
+
| `rust-leptos` | Cargo workspace with `crates/server` (Axum) + `crates/web` (Leptos 0.7 SSR+hydrate) + `cargo fetch` |
|
|
27
|
+
| `rust-leptos-csr` | Cargo workspace with `crates/server` (Axum) + `crates/web` (Leptos 0.7 CSR) + Trunk.toml + `cargo fetch` |
|
|
28
|
+
| `mcp-server-node-ts` | `npm init` + `@modelcontextprotocol/sdk` |
|
|
29
|
+
| `mcp-server-python` | `python -m venv .venv` + `pip install mcp[cli]` |
|
|
30
|
+
|
|
31
|
+
These need a working `composer` / `npm` / `cargo` / `python` / `go`
|
|
32
|
+
**somewhere**. There are three ways to provide it — you pick at init time
|
|
33
|
+
(prompt below), and the choice is saved in `dare.config.json` so
|
|
34
|
+
`dare bootstrap` reuses it later.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
? Toolchain for scaffolding (composer / npm / cargo / python / go):
|
|
38
|
+
❯ 🤖 Auto — use native if on PATH, else Docker (recommended)
|
|
39
|
+
🔧 Native only — require the CLI on PATH (faster, no Docker pulls)
|
|
40
|
+
🐳 Docker only — always use the official image (hermetic, no host install)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 🤖 Auto (default)
|
|
44
|
+
|
|
45
|
+
Tries the native CLI first. If missing, falls back to the official Docker
|
|
46
|
+
image automatically. If neither is present, fails fast with both install
|
|
47
|
+
links.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
which composer → ✓ found? use native
|
|
51
|
+
→ ✗ missing? which docker
|
|
52
|
+
→ ✓ found? docker run composer:latest …
|
|
53
|
+
→ ✗ missing? error: install Composer or Docker
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**When:** you don't know exactly what's installed; mixed teams (some
|
|
57
|
+
machines have the toolchain, some only have Docker). The same project
|
|
58
|
+
config (`dare.config.json` with `toolchain: auto`) works on every machine.
|
|
59
|
+
|
|
60
|
+
### 🔧 Native only
|
|
61
|
+
|
|
62
|
+
Requires the CLI on PATH. **Fails immediately** if missing — no Docker
|
|
63
|
+
fallback even if Docker is available.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
which composer → ✓ found? use native
|
|
67
|
+
→ ✗ missing? error: "Install Composer: https://getcomposer.org/"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**When:** you already have the toolchain and want **maximum speed** (no
|
|
71
|
+
`docker pull`, no bind-mount overhead, no container startup); you're in CI
|
|
72
|
+
with the toolchain pre-installed; you want to avoid Docker Desktop edge
|
|
73
|
+
cases (Windows volume throttling, Linux uid/gid issues, etc.).
|
|
74
|
+
|
|
75
|
+
### 🐳 Docker only
|
|
76
|
+
|
|
77
|
+
**Always** runs the scaffold inside the official Docker image — even if
|
|
78
|
+
the native CLI is on PATH. Fails if Docker isn't installed.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
which docker → ✓ found? docker run --rm -v ".:/app" composer:latest create-project …
|
|
82
|
+
→ ✗ missing? error: "Install Docker Desktop"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**When:** you don't want to install PHP / Cargo / Python / Go on the
|
|
86
|
+
host (keep host clean); you want **hermetic, reproducible** builds (every
|
|
87
|
+
dev uses the exact toolchain version baked into the image); you want to
|
|
88
|
+
mirror your CI locally.
|
|
89
|
+
|
|
90
|
+
### Quick decision table
|
|
91
|
+
|
|
92
|
+
| Your situation | Pick |
|
|
93
|
+
|----------------|------|
|
|
94
|
+
| Already have the toolchain installed, want speed | **🔧 Native** |
|
|
95
|
+
| Don't want to install PHP/Cargo/Python/Go on the host | **🐳 Docker** |
|
|
96
|
+
| Mixed team, varying setups | **🤖 Auto** |
|
|
97
|
+
| Just want it to work | **🤖 Auto** |
|
|
98
|
+
| Want bit-for-bit toolchain reproducibility | **🐳 Docker** |
|
|
99
|
+
| Solo dev with everything installed | **🔧 Native** |
|
|
100
|
+
|
|
101
|
+
### Override later
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
dare bootstrap --toolchain docker # rerun scaffold inside Docker
|
|
105
|
+
dare bootstrap --toolchain native --force # rerun native, overwriting framework files
|
|
106
|
+
dare bootstrap --toolchain auto # back to auto-detect
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### ⚠ Important caveat — Ralph Loop
|
|
110
|
+
|
|
111
|
+
`dare execute --complete` runs the stack's quality gates
|
|
112
|
+
(`composer dump-autoload`, `php artisan test`, `cargo build`, etc.)
|
|
113
|
+
**directly on the host** — it does **not** automatically wrap them in
|
|
114
|
+
Docker even if you picked `docker only` at init time.
|
|
115
|
+
|
|
116
|
+
If you don't have the native toolchain installed, the agent should run
|
|
117
|
+
the gates inside the container created by **task-001** (the Containerize
|
|
118
|
+
task), e.g. `docker compose exec app php artisan test`. The skills
|
|
119
|
+
shipped with `dare init` already nudge the agent toward that pattern.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Prerequisites
|
|
124
|
+
|
|
125
|
+
### Required for the CLI itself
|
|
126
|
+
|
|
127
|
+
| Tool | Why | Install |
|
|
128
|
+
|------|-----|---------|
|
|
129
|
+
| **Node.js 18+** | runs `dare`, `dare-mcp-server` and the bundled GraphRAG engine | https://nodejs.org/ |
|
|
130
|
+
|
|
131
|
+
### Required to scaffold the chosen stack
|
|
132
|
+
|
|
133
|
+
`dare init` runs the **official scaffold** of the stack you pick (e.g.
|
|
134
|
+
`composer create-project laravel/laravel`, `npm create vite@latest`,
|
|
135
|
+
`go mod init`). It tries the native toolchain first; if it isn't on PATH,
|
|
136
|
+
it falls back to running the equivalent **Docker image** automatically.
|
|
137
|
+
|
|
138
|
+
Pick **one** of the two paths per stack:
|
|
139
|
+
|
|
140
|
+
| Stack | Native toolchain | Docker fallback (used if native missing) |
|
|
141
|
+
|-------|------------------|------------------------------------------|
|
|
142
|
+
| `php-laravel` | PHP 8.2+ · Composer 2+ — https://getcomposer.org/ | `composer:latest` |
|
|
143
|
+
| `node-nestjs` | Node 18+ (bundles `npx`) | `node:20-alpine` |
|
|
144
|
+
| `python-fastapi` | Python 3.11+ — https://www.python.org/downloads/ | `python:3.12-slim` |
|
|
145
|
+
| `rust-axum` | Rust 1.83+ (rustup) — https://www.rust-lang.org/tools/install | `rust:1.83` |
|
|
146
|
+
| `go-gin` | Go 1.25+ — https://go.dev/dl/ | `golang:1.25` |
|
|
147
|
+
| `go-stdlib` | Go 1.22+ — https://go.dev/dl/ | `golang:1.25` |
|
|
148
|
+
| `react`, `vue` | Node 18+ (bundles `npm`) | `node:20-alpine` |
|
|
149
|
+
| `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` |
|
|
150
|
+
| `rust-leptos-csr` | Rust 1.83+ (rustup) + **trunk** — `cargo install trunk` | `ghcr.io/dewtech-technologies/dare-rust-leptos:1` |
|
|
151
|
+
| `mcp-server-node-ts` | Node 18+ | `node:20-alpine` |
|
|
152
|
+
| `mcp-server-python` | Python 3.11+ | `python:3.12-slim` |
|
|
153
|
+
|
|
154
|
+
> **TL;DR:** if you have **Docker Desktop** installed, you don't strictly need
|
|
155
|
+
> any other toolchain — `dare init` will pull the right image on demand.
|
|
156
|
+
> Native toolchains are faster and don't depend on Docker pulling images.
|
|
157
|
+
|
|
158
|
+
If neither the native CLI **nor** Docker is available, `dare init` fails
|
|
159
|
+
fast with a clear error message — it never falls back to a fake template.
|
|
160
|
+
|
|
161
|
+
### Choose the toolchain at init time
|
|
162
|
+
|
|
163
|
+
The 3 modes (`auto` / `native` / `docker`) are explained in detail at the
|
|
164
|
+
top of this README — see [⚠ Read this first](#-read-this-first--how-dare-init-runs-the-official-scaffold).
|
|
165
|
+
|
|
166
|
+
Quick recap:
|
|
167
|
+
|
|
168
|
+
| Mode | Behavior |
|
|
169
|
+
|------|----------|
|
|
170
|
+
| `auto` (default) | Native if available, else Docker. Recommended. |
|
|
171
|
+
| `native` | Requires the native CLI; fails if missing. |
|
|
172
|
+
| `docker` | Always uses the official Docker image. |
|
|
173
|
+
|
|
174
|
+
The choice is persisted in `dare.config.json` (`"toolchain": "..."`).
|
|
175
|
+
Override at any time:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
dare bootstrap --toolchain docker # rerun scaffold inside Docker
|
|
179
|
+
dare bootstrap --toolchain native --force # rerun native, overwriting
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Required for the Ralph Loop (per project)
|
|
183
|
+
|
|
184
|
+
Once the project is scaffolded, every `dare execute --complete` runs the
|
|
185
|
+
stack's gates: `build → test → lint`. The same toolchain (native or Docker)
|
|
186
|
+
that scaffolded the project is needed to run those gates. Plan accordingly:
|
|
187
|
+
if you chose `php-laravel` and only have Docker, `dare execute --complete`
|
|
188
|
+
needs to invoke `php artisan test` somehow — typically by running it inside
|
|
189
|
+
your `docker-compose` app service (this is the kind of thing the
|
|
190
|
+
`task-001 = Containerize app` task sets up).
|
|
191
|
+
|
|
192
|
+
## Installation
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm install -g @dewtech/dare-cli
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Commands
|
|
199
|
+
|
|
200
|
+
### `dare init`
|
|
201
|
+
|
|
202
|
+
Interactive project initialization — creates the full project structure with DARE methodology files, IDE rules and stack templates.
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
dare init my-project
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Prompts:
|
|
209
|
+
- **Structure:** Monorepo · Backend only · Frontend only · **MCP Server** ← new
|
|
210
|
+
- **MCP Server:** language (TypeScript / Python), transport (stdio / SSE / HTTP Stream), capabilities (Tools / Resources / Prompts)
|
|
211
|
+
- **Backend stack:** Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib
|
|
212
|
+
- **Frontend stack:** React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR-only (Rust WASM)
|
|
213
|
+
- **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`)
|
|
214
|
+
- **IDE / Agent:** Claude Code · Cursor · Antigravity · Hybrid
|
|
215
|
+
- **GraphRAG backend:** SQLite · JSON · Neo4j
|
|
216
|
+
- **DARE MCP Server:** context query server (saves ~95% tokens)
|
|
217
|
+
|
|
218
|
+
Generates:
|
|
219
|
+
- `dare.config.json` — project config
|
|
220
|
+
- `CLAUDE.md` + `.claude/commands/` + `.claude/settings.json` — Claude Code rules and slash commands (includes `/dare-security`)
|
|
221
|
+
- `.cursorrules` / `.antigravityrules` — Cursor / Antigravity rules
|
|
222
|
+
- `.cursor/rules/*.mdc` — stack-specific skills
|
|
223
|
+
- `.cursor/commands/` — Cursor slash commands
|
|
224
|
+
- `.agents/skills/` — Antigravity agent skills
|
|
225
|
+
- `DARE/` — methodology directory (DESIGN, BLUEPRINT, TASKS, dag)
|
|
226
|
+
- Full project template ready to run (MCP server, backend or frontend)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### `dare discover` ← new in v0.3.0
|
|
231
|
+
|
|
232
|
+
Detects an existing project's stack automatically and installs DARE files without touching your source code.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Run inside an existing project
|
|
236
|
+
cd my-existing-project
|
|
237
|
+
dare discover
|
|
238
|
+
|
|
239
|
+
# Inspect only, no changes
|
|
240
|
+
dare discover --check
|
|
241
|
+
|
|
242
|
+
# Target a specific directory
|
|
243
|
+
dare discover --dir ./path/to/project
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Auto-detects from: `package.json`, `Cargo.toml`, `requirements.txt`, `pyproject.toml`, `composer.json`.
|
|
247
|
+
|
|
248
|
+
Recognizes: NestJS · React · Vue · Nuxt · Rust/Axum · FastAPI · Laravel · **MCP Server** (`@modelcontextprotocol/sdk`, `FastMCP`).
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
### `dare design`
|
|
253
|
+
|
|
254
|
+
Generate `DARE/DESIGN.md` from a project description.
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
dare design "Build a REST API for user authentication with JWT"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### `dare blueprint`
|
|
263
|
+
|
|
264
|
+
Generate `DARE/BLUEPRINT.md` from `DESIGN.md`. Stops here — requires human review and approval before tasks are created.
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
dare blueprint
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### `dare tasks`
|
|
273
|
+
|
|
274
|
+
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.
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
dare tasks
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### `dare execute`
|
|
283
|
+
|
|
284
|
+
Orchestrate DAG execution. **The IDE is the executor** (Cursor / Antigravity
|
|
285
|
+
/ Claude Code) — `dare execute` only coordinates state, composes prompts
|
|
286
|
+
with parent context, updates the live canvas at `DARE/.canvas.md`, and
|
|
287
|
+
ingests finished tasks into the knowledge graph.
|
|
288
|
+
|
|
289
|
+
> **No API keys, no extra token costs.** You use the plan of the IDE you're
|
|
290
|
+
> already logged into.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# Print next executable tasks (with composed prompts)
|
|
294
|
+
dare execute --next
|
|
295
|
+
|
|
296
|
+
# Mark a task DONE after the agent finishes it
|
|
297
|
+
dare execute --complete task-001 --output "Created src/auth.ts and tests/auth.test.ts; all tests green."
|
|
298
|
+
|
|
299
|
+
# Mark a task FAILED — descendants are cascade-skipped automatically
|
|
300
|
+
dare execute --fail task-002 --reason "Schema migration conflict in users table"
|
|
301
|
+
|
|
302
|
+
# Reset a task back to PENDING (for retry)
|
|
303
|
+
dare execute --reset task-002
|
|
304
|
+
|
|
305
|
+
# Show snapshot of canvas + summary (default action)
|
|
306
|
+
dare execute --status
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
#### Typical flow inside the IDE agent
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
dare execute --next # → tasks ready in current rank
|
|
313
|
+
# (agent executes each task: code, build, test, lint)
|
|
314
|
+
dare execute --complete task-001 --output "…"
|
|
315
|
+
dare execute --complete task-002 --output "…"
|
|
316
|
+
dare execute --next # → next rank
|
|
317
|
+
# (repeat until "✅ All tasks resolved")
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
The skills shipped by `dare init` (`.cursor/rules/skill-dag-runner.mdc`,
|
|
321
|
+
`.agents/skills/dare-dag-runner/SKILL.md`, `.claude/commands/dare-dag-run.md`)
|
|
322
|
+
guide the IDE agent through this loop.
|
|
323
|
+
|
|
324
|
+
#### Stack-specific skills
|
|
325
|
+
|
|
326
|
+
`dare init` also ships skills focused on architectural decisions for
|
|
327
|
+
specific stacks. As of v2.15.0:
|
|
328
|
+
|
|
329
|
+
- **`skill-rust-workspace.mdc`** (Cursor) /
|
|
330
|
+
**`dare-rust-workspace/SKILL.md`** (Antigravity) /
|
|
331
|
+
**`/dare-rust-workspace`** (Claude command) — guides the agent on
|
|
332
|
+
whether a Rust project should start single-crate or as a Cargo
|
|
333
|
+
workspace, and gives a step-by-step PR-by-PR migration plan when an
|
|
334
|
+
existing single-crate project has outgrown its layout. Active during
|
|
335
|
+
`/dare-design` and `/dare-blueprint` for `rust-axum` projects, plus on
|
|
336
|
+
demand for migration analysis.
|
|
337
|
+
|
|
338
|
+
- **`skill-rust-leptos.mdc`** (Cursor) /
|
|
339
|
+
**`dare-rust-leptos/SKILL.md`** (Antigravity) /
|
|
340
|
+
**`/dare-rust-leptos`** (Claude command) — full guide for Leptos
|
|
341
|
+
development: CSR vs fullstack decision table, Leptos 0.7 idioms
|
|
342
|
+
(signals, Resource, Action, Show, For, `#[server]`), shared types with
|
|
343
|
+
`cfg_attr`, mixed workspace configuration (WASM + native crates), and
|
|
344
|
+
antipatterns to avoid (`cargo leptos test` does not exist; no global
|
|
345
|
+
`[build] target` in `.cargo/config.toml`). Ships 3 ready-to-use DARE
|
|
346
|
+
task templates for Leptos projects.
|
|
347
|
+
|
|
348
|
+
### `dare bootstrap`
|
|
349
|
+
|
|
350
|
+
Run the official scaffold for a project's stack on **an existing project**
|
|
351
|
+
(created in older versions or with `--skip-bootstrap`). Reads
|
|
352
|
+
`dare.config.json` and dispatches to:
|
|
353
|
+
|
|
354
|
+
- `composer create-project laravel/laravel` for `php-laravel`
|
|
355
|
+
- `npx @nestjs/cli new` for `node-nestjs`
|
|
356
|
+
- `npm create vite` for `react` / `vue`
|
|
357
|
+
- `python -m venv` + `pip install` for `python-fastapi`
|
|
358
|
+
- `cargo init` + axum-ready `Cargo.toml` for `rust-axum`
|
|
359
|
+
- `npm init` + `@modelcontextprotocol/sdk` for `mcp-server-node`
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
dare bootstrap # refuses if vendor/ or node_modules/ already exist
|
|
363
|
+
dare bootstrap --force # runs anyway (may overwrite framework files)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Your DARE artifacts (`.cursor/`, `DARE/`, `dare.config.json`, `dare-graph.yml`)
|
|
367
|
+
are preserved.
|
|
368
|
+
|
|
369
|
+
### `dare info`
|
|
370
|
+
|
|
371
|
+
Read-only diagnostic of the current project: CLI version, platform, presence
|
|
372
|
+
of each canonical DARE artifact, active GraphRAG backend, and task progress.
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
dare info
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### `dare validate`
|
|
379
|
+
|
|
380
|
+
Static checks on `dare-dag.yaml` — ideal for pre-commit hooks and CI.
|
|
381
|
+
Verifies unique kebab-case ids, valid `depends_on`, absence of cycles,
|
|
382
|
+
non-empty prompts, and parallelism (warning when only one task at rank 0).
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
dare validate # errors fail; warnings printed
|
|
386
|
+
dare validate --strict # warnings also fail (CI-friendly)
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
A pre-commit hook template is shipped at
|
|
390
|
+
`templates/hooks/pre-commit-dare-validate` — copy to `.git/hooks/pre-commit`
|
|
391
|
+
(or use with husky) to validate the DAG before every commit.
|
|
392
|
+
|
|
393
|
+
### `dare execute --watch`
|
|
394
|
+
|
|
395
|
+
Interactive loop: the CLI watches `.dare/state.json` and re-prints the next
|
|
396
|
+
ready tasks every time the state changes. Pair with the IDE agent firing
|
|
397
|
+
`--complete`/`--fail` from another terminal.
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
dare execute --watch
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### `dare dag`
|
|
404
|
+
|
|
405
|
+
Inspect and visualize the **static task DAG** declared in `dare-dag.yaml` —
|
|
406
|
+
distinct from `dare graph`, which inspects the populated knowledge graph
|
|
407
|
+
(only contains tasks already executed).
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
dare dag viz # Mermaid to stdout
|
|
411
|
+
dare dag viz -o DARE/dag-graph.mmd # Mermaid file
|
|
412
|
+
dare dag viz -f dot -o DARE/dag-graph.dot # DOT (Graphviz)
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
The Mermaid output groups tasks into rank subgraphs and colors nodes by
|
|
416
|
+
status (`PENDING` / `RUNNING` / `DONE` / `FAILED` / `SKIPPED`), so you can
|
|
417
|
+
**see the execution plan before running any task**.
|
|
418
|
+
|
|
419
|
+
> `dare tasks` writes `DARE/dag-graph.mmd` automatically — open it in
|
|
420
|
+
> your editor with a Mermaid preview to see the static graph immediately.
|
|
421
|
+
|
|
422
|
+
### `dare graph`
|
|
423
|
+
|
|
424
|
+
Inspect the project's knowledge graph. The graph is populated automatically
|
|
425
|
+
by `dare execute --complete/--fail` (task nodes, file nodes, `depends_on` and
|
|
426
|
+
`implements` edges). Backend is whatever `dare-graph.yml` declares
|
|
427
|
+
(`sqlite` default, `json` available, `neo4j` planned).
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
dare graph stats # totals + breakdown by type
|
|
431
|
+
dare graph query auth # search nodes by label/description
|
|
432
|
+
dare graph query auth --limit 20
|
|
433
|
+
|
|
434
|
+
dare graph viz # Mermaid to stdout
|
|
435
|
+
dare graph viz -f dot # DOT for Graphviz
|
|
436
|
+
dare graph viz -o docs/graph.mmd # write to file
|
|
437
|
+
|
|
438
|
+
dare graph ingest # re-sync from dare-dag.yaml + state
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Full Workflow
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# New project
|
|
447
|
+
dare init my-project
|
|
448
|
+
cd my-project
|
|
449
|
+
dare design "Describe what you're building"
|
|
450
|
+
dare blueprint
|
|
451
|
+
dare execute --parallel
|
|
452
|
+
|
|
453
|
+
# Existing project
|
|
454
|
+
cd my-existing-project
|
|
455
|
+
dare discover
|
|
456
|
+
dare design "Describe what you're building"
|
|
457
|
+
dare blueprint
|
|
458
|
+
dare execute --parallel
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
## Claude Code Workflow
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
dare init my-project
|
|
465
|
+
# → IDE: Claude Code
|
|
466
|
+
# → Structure: Backend / Frontend / MCP Server
|
|
467
|
+
|
|
468
|
+
cd my-project
|
|
469
|
+
# Claude Code slash commands available:
|
|
470
|
+
# /dare-design → generates DARE/DESIGN.md
|
|
471
|
+
# /dare-blueprint → generates BLUEPRINT.md + DAG
|
|
472
|
+
# /dare-execute task-001 → implements with Ralph Loop
|
|
473
|
+
# /dare-tasks → shows task status table
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Files generated for Claude Code:
|
|
477
|
+
```
|
|
478
|
+
CLAUDE.md ← main context (stack rules + DARE methodology)
|
|
479
|
+
.claude/
|
|
480
|
+
settings.json ← permissions + Ralph Loop hook
|
|
481
|
+
commands/
|
|
482
|
+
dare-design.md ← /dare-design
|
|
483
|
+
dare-blueprint.md ← /dare-blueprint
|
|
484
|
+
dare-execute.md ← /dare-execute
|
|
485
|
+
dare-tasks.md ← /dare-tasks
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## MCP Server Workflow
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
dare init my-mcp-server
|
|
494
|
+
# → Structure: MCP Server
|
|
495
|
+
# → Language: TypeScript
|
|
496
|
+
# → Transport: stdio
|
|
497
|
+
# → Capabilities: Tools, Resources
|
|
498
|
+
|
|
499
|
+
cd my-mcp-server
|
|
500
|
+
npm install
|
|
501
|
+
dare design "MCP server that exposes ZIP code lookup tools"
|
|
502
|
+
dare blueprint
|
|
503
|
+
dare execute --parallel
|
|
504
|
+
|
|
505
|
+
# Test with MCP Inspector
|
|
506
|
+
npm run inspect
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Performance
|
|
512
|
+
|
|
513
|
+
| Mode | Estimated Time |
|
|
514
|
+
|------|----------------|
|
|
515
|
+
| Sequential | ~280 minutes |
|
|
516
|
+
| Parallel DAG | ~70 minutes |
|
|
517
|
+
| **Improvement** | **75% faster** |
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
## Supported Stacks
|
|
522
|
+
|
|
523
|
+
| Type | Options |
|
|
524
|
+
|------|---------|
|
|
525
|
+
| **Backend** | Rust/Axum · Node.js/NestJS · Python/FastAPI · PHP/Laravel · Go/Gin · Go/stdlib |
|
|
526
|
+
| **Frontend** | React 18+ · Vue 3+ · Leptos fullstack (Rust SSR+WASM) · Leptos CSR (Rust WASM) |
|
|
527
|
+
| **MCP Server** | TypeScript/Node.js · Python — stdio / SSE / HTTP Stream |
|
|
528
|
+
| **IDE / Agent** | Claude Code · Cursor · Antigravity · Hybrid |
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## O que vem com o pacote (v2.0+)
|
|
533
|
+
|
|
534
|
+
A partir da v2.0 o `@dewtech/dare-cli` é um **pacote único** que inclui todas as
|
|
535
|
+
funcionalidades do framework DARE. Você não precisa instalar nada além dele:
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
npm install -g @dewtech/dare-cli
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
Isso já dá:
|
|
542
|
+
|
|
543
|
+
| Componente | O que é |
|
|
544
|
+
|------------|---------|
|
|
545
|
+
| CLI `dare` | `init`, `design`, `blueprint`, `execute`, `discover` |
|
|
546
|
+
| CLI `dare-mcp-server` | Servidor MCP local de contexto (~95% economia de tokens) |
|
|
547
|
+
| Engine GraphRAG | Grafo de conhecimento com SQLite + FTS5 |
|
|
548
|
+
| DAG Task Runner | Execução paralela de tasks com Kahn's algorithm |
|
|
549
|
+
| Tipos e templates | Tudo embutido — sem dependências externas do `@dewtech/*` |
|
|
550
|
+
|
|
551
|
+
> **Histórico (v1.x):** os pacotes `@dewtech/dare-core`, `@dewtech/dare-graphrag` e
|
|
552
|
+
> `@dewtech/dare-mcp-server` foram consolidados em `@dewtech/dare-cli` e estão
|
|
553
|
+
> **deprecated** no npm. Não há mais subpacotes para gerenciar.
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## Links
|
|
558
|
+
|
|
559
|
+
- [GitHub](https://github.com/dewtech-technologies/dare-method)
|
|
560
|
+
- [DARE Methodology](https://github.com/dewtech-technologies/dare-method#-o-método)
|
|
561
|
+
- [Dewtech](https://dewtech.tech)
|