@brunosps00/dev-workflow 1.7.1 → 2.0.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +201 -0
- package/README.md +2 -2
- package/lib/agents.js +6 -1
- package/lib/init.js +14 -0
- package/lib/install-state.js +8 -4
- package/package.json +2 -1
- package/scaffold/agents/core/dw-build-fixer.md +0 -1
- package/scaffold/agents/core/dw-code-explorer.md +0 -1
- package/scaffold/agents/core/dw-code-reviewer.md +0 -1
- package/scaffold/agents/core/dw-planner.md +0 -1
- package/scaffold/agents/core/dw-test-author.md +0 -1
- package/scaffold/agents/csharp/dw-csharp-reviewer.md +0 -1
- package/scaffold/agents/csharp/dw-dotnet-build-fixer.md +0 -1
- package/scaffold/agents/frontend/dw-qa-runner.md +0 -1
- package/scaffold/agents/python/dw-python-build-fixer.md +0 -1
- package/scaffold/agents/python/dw-python-reviewer.md +0 -1
- package/scaffold/agents/rust/dw-rust-build-fixer.md +0 -1
- package/scaffold/agents/rust/dw-rust-reviewer.md +0 -1
- package/scaffold/agents/security/dw-security-reviewer.md +0 -1
- package/scaffold/agents/security/dw-silent-failure-hunter.md +0 -1
- package/scaffold/agents/typescript/dw-typescript-build-fixer.md +0 -1
- package/scaffold/agents/typescript/dw-typescript-reviewer.md +0 -1
- package/scaffold/config/routing.json +60 -0
- package/scaffold/en/commands/dw-claude-run.md +5 -1
- package/scaffold/en/commands/dw-codex-run.md +5 -1
- package/scaffold/en/commands/dw-dockerize.md +14 -7
- package/scaffold/en/commands/dw-generate-pr.md +13 -0
- package/scaffold/en/commands/dw-new-project.md +14 -13
- package/scaffold/en/commands/dw-run.md +1 -1
- package/scaffold/en/templates/project-onepager.md +6 -5
- package/scaffold/en/templates/task-template.md +1 -1
- package/scaffold/en/templates/tasks-template.md +7 -5
- package/scaffold/pt-br/commands/dw-claude-run.md +5 -1
- package/scaffold/pt-br/commands/dw-codex-run.md +5 -1
- package/scaffold/pt-br/commands/dw-dockerize.md +14 -7
- package/scaffold/pt-br/commands/dw-generate-pr.md +13 -0
- package/scaffold/pt-br/commands/dw-new-project.md +14 -13
- package/scaffold/pt-br/commands/dw-plan.md +1 -1
- package/scaffold/pt-br/commands/dw-run.md +1 -1
- package/scaffold/pt-br/templates/project-onepager.md +6 -5
- package/scaffold/pt-br/templates/task-template.md +1 -1
- package/scaffold/pt-br/templates/tasks-template.md +7 -5
- package/scaffold/skills/docker-compose-recipes/SKILL.md +2 -4
- package/scaffold/skills/docker-compose-recipes/references/compose-composition.md +2 -2
- package/scaffold/skills/docker-compose-recipes/references/env-conventions.md +16 -9
- package/scaffold/skills/docker-compose-recipes/references/healthcheck-patterns.md +0 -1
- package/scaffold/skills/docker-compose-recipes/references/prod-vs-dev.md +7 -2
- package/scaffold/skills/docker-compose-recipes/services/elasticsearch.yml +3 -3
- package/scaffold/skills/docker-compose-recipes/services/meilisearch.yml +2 -2
- package/scaffold/skills/docker-compose-recipes/services/minio.yml +8 -4
- package/scaffold/skills/docker-compose-recipes/services/mysql.yml +4 -4
- package/scaffold/skills/docker-compose-recipes/services/postgres.yml +2 -2
- package/scaffold/skills/docker-compose-recipes/services/rabbitmq.yml +3 -3
- package/scaffold/skills/docker-compose-recipes/services/typesense.yml +3 -3
- package/scaffold/skills/dw-cli-run/SKILL.md +42 -38
- package/scaffold/skills/dw-cli-run/references/dispatch-tuning.md +85 -0
- package/scaffold/skills/dw-execute-phase/SKILL.md +4 -2
- package/scaffold/skills/dw-execute-phase/agents/executor.md +4 -2
- package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +9 -7
- package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +12 -8
- package/scaffold/skills/dw-execute-phase/references/plan-verification.md +6 -4
- package/scaffold/skills/docker-compose-recipes/services/mailhog.yml +0 -23
- package/scaffold/skills/docker-compose-recipes/services/postgres-pgvector.yml +0 -31
|
@@ -109,6 +109,19 @@ Build the body following the template below, filling in with collected informati
|
|
|
109
109
|
|
|
110
110
|
3. **Instruct the user** to paste the body (Ctrl+V) in the description field
|
|
111
111
|
|
|
112
|
+
### 6. Record the PR back into the spec
|
|
113
|
+
|
|
114
|
+
The PR URL only exists after the user clicks "Create". Once it does, write it back — otherwise nothing on the `.dw/` side ever records which PR delivered the work, and the trail ends at the branch.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Fast path: resolves once the PR exists. Needs the GitHub CLI; skip silently if absent.
|
|
118
|
+
gh pr view --json url -q .url 2>/dev/null
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
- If a URL resolves, append it to the PRD's `## Related` section as `- PR: <url>`.
|
|
122
|
+
- If `gh` is unavailable or the PR isn't created yet, print the exact line for the user to paste and move on. **Never block the command on this** — it is a record, not a gate.
|
|
123
|
+
- For bugfix branches, append the same line to `.dw/bugfixes/<NNN-slug>/SUMMARY.md` under `## Related` instead.
|
|
124
|
+
|
|
112
125
|
## PR Template (copy to clipboard)
|
|
113
126
|
|
|
114
127
|
```markdown
|
|
@@ -79,10 +79,10 @@ Use `AskUserQuestion` when available; otherwise plain numbered prompts. Ask in *
|
|
|
79
79
|
|
|
80
80
|
#### Layer B — Infra (only ask what fits the shape)
|
|
81
81
|
|
|
82
|
-
6. **Database**: Postgres /
|
|
82
|
+
6. **Database**: Postgres / MySQL / SQLite (file, no service) / MongoDB (out of scope for compose recipes — note and skip if chosen) / none. There is no bundled pgvector recipe: the image carried unfixed upstream CVEs and no bundled artifact could clear them. If the project needs vector search, note it and let the user pick a separately reviewed image or a managed Postgres with the extension enabled.
|
|
83
83
|
7. **Cache**: Redis / Memcached / none
|
|
84
84
|
8. **Queue / message broker**: pg-boss (Node + Postgres, no extra service), BullMQ (Node + Redis), Celery (Python only), RabbitMQ (any), LocalStack SQS (any), none. If chosen, also ask whether the project will have async workers.
|
|
85
|
-
9. **Email — dev capture** (default: **Mailpit**, ask only if user wants to override): Mailpit /
|
|
85
|
+
9. **Email — dev capture** (default: **Mailpit**, ask only if user wants to override): Mailpit / smtp4dev / skip
|
|
86
86
|
10. **Email — prod target** (only ask if user wants email at all): SMTP relay / SendGrid / Resend / Postmark / SES / skip
|
|
87
87
|
11. **Object storage**: S3 (real, no service in compose) / MinIO (dev) / GCS (no service) / none
|
|
88
88
|
12. **Search**: Meilisearch / Typesense / Elasticsearch / none
|
|
@@ -112,7 +112,7 @@ Save all answers in memory for Phase 2.
|
|
|
112
112
|
|
|
113
113
|
### Phase 2 — One-Pager + Plan + Approval Gate
|
|
114
114
|
|
|
115
|
-
1. Render `.dw/spec/projects/{{PROJECT_NAME}}.md` from `.dw/templates/project-onepager.md`. Fill every section: shape, languages, frameworks, services table (name + port +
|
|
115
|
+
1. Render `.dw/spec/projects/{{PROJECT_NAME}}.md` from `.dw/templates/project-onepager.md`. Fill every section: shape, languages, frameworks, services table (name + port + credential requirements, never a working password), architecture diagram (ASCII), generated-files list, open questions.
|
|
116
116
|
2. Build a plan:
|
|
117
117
|
- Commands to run (in order, with arguments)
|
|
118
118
|
- Files to create (with paths under `{{TARGET_DIR}}`)
|
|
@@ -163,11 +163,12 @@ If fullstack:
|
|
|
163
163
|
- Aggregate named volumes under `volumes:`.
|
|
164
164
|
- Resolve port collisions if any.
|
|
165
165
|
- For `everything in Compose`, add the app service(s) at the end (build context = `apps/<name>` or root, Dockerfile.dev, env_file, volumes, depends_on with `condition: service_healthy`). For `apps on host`, compose infrastructure only and use `localhost` endpoints in app-facing environment variables.
|
|
166
|
+
- Preserve each recipe's image tag (do NOT convert any of them to a digest — a digest freezes the base image and never picks up a security rebuild), the required credential vars, and the `127.0.0.1` port binds. Those loopback mappings intentionally support `apps on host`; do not remove them from local dev.
|
|
166
167
|
3. Add a header comment: `# Generated by /dw-new-project on YYYY-MM-DD`.
|
|
167
168
|
|
|
168
169
|
#### 3.4 Generate `.env.example`
|
|
169
170
|
|
|
170
|
-
Consolidate every env var referenced by selected services (per `references/env-conventions.md`). Group by service. Always include the application-side derived URLs (`DATABASE_URL`, `REDIS_URL`, `AMQP_URL`, `SMTP_HOST`/`SMTP_PORT`, `AWS_ENDPOINT_URL`, etc.).
|
|
171
|
+
Consolidate every env var referenced by selected services (per `references/env-conventions.md`). Group by service. Always include the application-side derived URLs (`DATABASE_URL`, `REDIS_URL`, `AMQP_URL`, `SMTP_HOST`/`SMTP_PORT`, `AWS_ENDPOINT_URL`, etc.). Every credential var is emitted empty in `.env.example` (the recipes use `${VAR:?}`, so Compose refuses to start without a real value). Require the user to set unique generated values in the gitignored `.env` before running Compose. Never emit a reusable password.
|
|
171
172
|
|
|
172
173
|
#### 3.5 Generate scripts
|
|
173
174
|
|
|
@@ -217,7 +218,7 @@ Minimal scaffold:
|
|
|
217
218
|
| Database | <db or n/a> |
|
|
218
219
|
| Cache | <cache or n/a> |
|
|
219
220
|
| Queue | <queue or n/a> |
|
|
220
|
-
| Email (dev) | <mailpit|
|
|
221
|
+
| Email (dev) | <mailpit|smtp4dev|none> |
|
|
221
222
|
| Search | <search or n/a> |
|
|
222
223
|
| Observability | <observability or n/a> |
|
|
223
224
|
| Reverse proxy | <traefik|none> |
|
|
@@ -228,7 +229,7 @@ Minimal scaffold:
|
|
|
228
229
|
|
|
229
230
|
## Services in docker-compose.dev.yml
|
|
230
231
|
|
|
231
|
-
(table of selected services with ports and
|
|
232
|
+
(table of selected services with ports and credential requirements; never include a working password)
|
|
232
233
|
|
|
233
234
|
## Conventions
|
|
234
235
|
|
|
@@ -241,8 +242,8 @@ Minimal scaffold:
|
|
|
241
242
|
|
|
242
243
|
Generate a starter README with:
|
|
243
244
|
- Project name + 1-line purpose
|
|
244
|
-
- Quick Start (`cp .env.example .env
|
|
245
|
-
- Local Dev (port table for selected services + UI URLs +
|
|
245
|
+
- Quick Start (`cp .env.example .env`, set every required secret to a unique local value, then `pnpm install && pnpm dev:up`)
|
|
246
|
+
- Local Dev (port table for selected services + UI URLs + credential requirements; never publish a working password)
|
|
246
247
|
- Architecture diagram (ASCII from the one-pager)
|
|
247
248
|
- Project layout (tree of top-level dirs)
|
|
248
249
|
- Dev-workflow integration (mentions `/dw-plan prd`, `/dw-run`, `/dw-qa`, `/dw-secure-audit --plan`, `/dw-secure-audit`)
|
|
@@ -276,7 +277,7 @@ date: YYYY-MM-DD
|
|
|
276
277
|
shape: <frontend|backend|fullstack>
|
|
277
278
|
languages: [typescript, python, ...]
|
|
278
279
|
frameworks: { web: '...', api: '...' }
|
|
279
|
-
services: [postgres
|
|
280
|
+
services: [postgres, mailpit, minio, ...]
|
|
280
281
|
package_manager: <pnpm|npm|yarn|poetry|uv|cargo|dotnet>
|
|
281
282
|
monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
282
283
|
---
|
|
@@ -299,10 +300,10 @@ monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
|
299
300
|
| ... | ... | ... |
|
|
300
301
|
|
|
301
302
|
## Services Composed
|
|
302
|
-
<table of services with port + UI URL +
|
|
303
|
+
<table of services with port + UI URL + credential requirements, sourced from .agents/skills/docker-compose-recipes/>
|
|
303
304
|
|
|
304
305
|
## Next Steps
|
|
305
|
-
1. `cp .env.example .env
|
|
306
|
+
1. `cp .env.example .env`, generate unique local secrets, and set every required value such as `POSTGRES_PASSWORD`.
|
|
306
307
|
2. `pnpm install` (or your chosen package manager).
|
|
307
308
|
3. `pnpm dev:up` to bring up all services. Wait for healthchecks.
|
|
308
309
|
4. Open Mailpit UI at http://localhost:8025 to confirm email capture is wired.
|
|
@@ -323,10 +324,10 @@ monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
|
323
324
|
|
|
324
325
|
- <critical>NEVER bypass the Phase 2 approval gate. If invoked in a non-interactive context, abort with: "/dw-new-project requires an interactive approval; rerun with --dry-run to plan-only."</critical>
|
|
325
326
|
- <critical>NEVER run `create-*` tools outside `{{TARGET_DIR}}`. Each command's CWD is the target dir.</critical>
|
|
326
|
-
- <critical>If
|
|
327
|
+
- <critical>If Mailpit/smtp4dev was selected, NEVER also wire a real SMTP into dev. The dev compose ALWAYS captures.</critical>
|
|
327
328
|
- <critical>If a `create-*` tool fails, STOP execution. Do not skip ahead to compose generation — partial scaffolds confuse later commands.</critical>
|
|
328
329
|
- Do NOT pin Node/Python/.NET/Rust SDK versions inside the project unless the user asks; rely on `package.json` engines / `pyproject.toml` / `global.json` / `rust-toolchain.toml` to express intent without forcing.
|
|
329
|
-
- Do NOT bake secrets into any generated file. `.env.example` has dev defaults
|
|
330
|
+
- Do NOT bake secrets into any generated file. `.env.example` has non-secret dev defaults and empty required secret keys; real values live in untracked `.env`.
|
|
330
331
|
|
|
331
332
|
## Error Handling
|
|
332
333
|
|
|
@@ -75,7 +75,7 @@ When available under `./.agents/skills/`, these skills are invoked per task:
|
|
|
75
75
|
- Atomic commit message: `feat(<scope>): <task title> (#<task-id>)`.
|
|
76
76
|
- Reference the FRs covered.
|
|
77
77
|
- One task = one commit (unless the task explicitly has subtask milestones that earn separate commits).
|
|
78
|
-
6. **Update tasks.md:**
|
|
78
|
+
6. **Update tasks.md:** set this task's `Status` to `Done` and write the short SHA (`git rev-parse --short HEAD`) into its `Commit` column. This is the only record linking a task to its diff — do not skip it.
|
|
79
79
|
7. **Report:** what was done, what tests were added, what was validated.
|
|
80
80
|
|
|
81
81
|
### STOP CONDITIONS
|
|
@@ -24,10 +24,10 @@ services: []
|
|
|
24
24
|
| Shape | frontend / backend / fullstack | [why this shape — single product surface, API for partners, etc.] |
|
|
25
25
|
| Frontend | Next.js / Vite+React / n/a | [why this framework — SSR needs, SPA simplicity, etc.] |
|
|
26
26
|
| Backend | NestJS / Fastify / FastAPI / ASP.NET Core minimal / Axum / n/a | [why this framework — team expertise, ecosystem, latency targets] |
|
|
27
|
-
| Database | Postgres /
|
|
27
|
+
| Database | Postgres / MySQL / SQLite / MongoDB / none | [why this DB — relational, transactional needs, etc. Vector search has no bundled recipe; name the reviewed image or managed service if the project needs it] |
|
|
28
28
|
| Cache | Redis / Memcached / none | [why or why not] |
|
|
29
29
|
| Queue | pg-boss / BullMQ / Celery / RabbitMQ / LocalStack SQS / none | [why or why not + sync vs async workers] |
|
|
30
|
-
| Email — dev | Mailpit (default) /
|
|
30
|
+
| Email — dev | Mailpit (default) / smtp4dev / none | [usually Mailpit — capture only, never sends real mail] |
|
|
31
31
|
| Email — prod | SMTP / SendGrid / Resend / Postmark / SES / none | [why this provider — volume, deliverability, cost] |
|
|
32
32
|
| Object storage | S3 / MinIO (dev) / GCS / none | [why or why not] |
|
|
33
33
|
| Search | Meilisearch / Typesense / Elasticsearch / none | [why this engine — features, scale, simplicity] |
|
|
@@ -44,13 +44,14 @@ services: []
|
|
|
44
44
|
|
|
45
45
|
[Generated services from the docker-compose-recipes skill. Filled by /dw-new-project.]
|
|
46
46
|
|
|
47
|
-
| Service | Port (host) | UI |
|
|
48
|
-
|
|
49
|
-
| postgres | 5432 | — | POSTGRES_USER=app, POSTGRES_PASSWORD
|
|
47
|
+
| Service | Port (host) | UI | Credentials |
|
|
48
|
+
|---------|-------------|----|-------------|
|
|
49
|
+
| postgres | 127.0.0.1:5432 | — | POSTGRES_USER=app, POSTGRES_PASSWORD required in `.env` (no default), POSTGRES_DB=app |
|
|
50
50
|
| redis | 6379 | — | (no auth in dev) |
|
|
51
51
|
| mailpit | 1025 (smtp), 8025 (UI) | http://localhost:8025 | (no auth) |
|
|
52
52
|
| ... | ... | ... | ... |
|
|
53
53
|
|
|
54
|
+
|
|
54
55
|
## Architecture Diagram
|
|
55
56
|
|
|
56
57
|
```
|
|
@@ -12,7 +12,7 @@ status: pending
|
|
|
12
12
|
|
|
13
13
|
[Brief task description]
|
|
14
14
|
|
|
15
|
-
**Functional Requirements covered**: FR
|
|
15
|
+
**Functional Requirements covered**: FR-X.Y, FR-X.Z (maximum 2 per task)
|
|
16
16
|
|
|
17
17
|
<requirements>
|
|
18
18
|
[List of mandatory requirements]
|
|
@@ -19,11 +19,13 @@ feat/prd-[feature-name]
|
|
|
19
19
|
|
|
20
20
|
## Tasks
|
|
21
21
|
|
|
22
|
-
| Task | Description | FRs | Status |
|
|
23
|
-
|
|
24
|
-
| 1.0 | [Title] |
|
|
25
|
-
| 2.0 | [Title] |
|
|
26
|
-
| 3.0 | [Title] |
|
|
22
|
+
| Task | Description | FRs | Status | Commit |
|
|
23
|
+
|------|-------------|-----|--------|--------|
|
|
24
|
+
| 1.0 | [Title] | FR-1.1, FR-1.2 | Pending | — |
|
|
25
|
+
| 2.0 | [Title] | FR-2.1 | Pending | — |
|
|
26
|
+
| 3.0 | [Title] | FR-3.1, FR-3.2 | Pending | — |
|
|
27
|
+
|
|
28
|
+
`Commit` holds the short SHA written back by `/dw-run` when the task closes (step 6). It is what makes a task's diff findable later — leave `—` until the task commits.
|
|
27
29
|
|
|
28
30
|
## Progress
|
|
29
31
|
|
|
@@ -13,7 +13,11 @@ para implementar um prompt/spec ja preparado, captura a execucao inteira num log
|
|
|
13
13
|
|---|---|
|
|
14
14
|
| `DISPATCH` | `UUID=$(cat /proc/sys/kernel/random/uuid); cd <WORKTREE> && claude -p --session-id "$UUID" --model <MODEL> --effort <EFFORT> --output-format stream-json --include-partial-messages --verbose --dangerously-skip-permissions "$(cat <PROMPT>)" </dev/null > <AUDIT>/<slug>.log 2>&1` |
|
|
15
15
|
| `STREAM` | `--output-format stream-json --include-partial-messages --verbose` (`--verbose` e **obrigatorio** com `stream-json` no modo `-p`) |
|
|
16
|
-
| `
|
|
16
|
+
| `MODEL` | `--model <MODEL>` — `opus` · `sonnet` · `haiku` · `fable`, ou um id completo (`claude-opus-5`) |
|
|
17
|
+
| `EFFORT` | `--effort <EFFORT>` — `low` · `medium` · `high` · `xhigh` · `max` |
|
|
18
|
+
| `AUTO` | `--dangerously-skip-permissions` (auto-aprovacao headless para dispatch **WRITE**; justificavel porque a worktree e isolada) |
|
|
19
|
+
| `AUTO_READONLY` | `--permission-mode plan` (opcionalmente `--allowedTools <lista>`). Nunca combine com `AUTO`. |
|
|
20
|
+
| `NO_MCP` | `--strict-mcp-config` sem nenhum `--mcp-config` → sobe zero MCP servers |
|
|
17
21
|
| `RESUME <id>` | `cd <WORKTREE> && claude --resume "$UUID" -p --effort <EFFORT> --output-format stream-json --include-partial-messages --verbose --dangerously-skip-permissions "$(cat <FOLLOWUP_PROMPT>)" </dev/null >> <AUDIT>/<slug>.log 2>&1` |
|
|
18
22
|
| `RESUME_LAST` | `claude -c -p …` (continua a conversa mais recente nesta cwd) |
|
|
19
23
|
| `SESSION_ID` | **FIXADO por voce** — voce passa `--session-id "$UUID"` na 1a run, entao o id e conhecido de antemao. Gere-o (`cat /proc/sys/kernel/random/uuid` ou `uuidgen`) e grave em `<AUDIT>/<slug>.session` ANTES/no dispatch. Sem scraping do stream — o Claude e o caso facil. |
|
|
@@ -13,7 +13,11 @@ implementar um prompt/spec ja preparado, captura a execucao inteira num log de a
|
|
|
13
13
|
|---|---|
|
|
14
14
|
| `DISPATCH` | `cd <WORKTREE> && codex exec --skip-git-repo-check -m <MODEL> --config model_reasoning_effort="<EFFORT>" --dangerously-bypass-approvals-and-sandbox --json -o <AUDIT>/<slug>.last.md "$(cat <PROMPT>)" </dev/null > <AUDIT>/<slug>.log 2>&1` |
|
|
15
15
|
| `STREAM` | `--json` (eventos JSONL) |
|
|
16
|
-
| `
|
|
16
|
+
| `MODEL` | `-m <MODEL>` — `gpt-5.5` · `gpt-5.3-codex` · `gpt-5.4` · `gpt-5.3-codex-spark` · `gpt-5.4-mini` |
|
|
17
|
+
| `EFFORT` | `--config model_reasoning_effort="<EFFORT>"` — `low` · `medium` · `high` · `xhigh` |
|
|
18
|
+
| `AUTO` | `--dangerously-bypass-approvals-and-sandbox` (sem sandbox + sem approvals = full access **com rede**, p/ o CLI rodar o gate; **somente dispatch WRITE**, justificavel porque a worktree e isolada). Edicao sem gate de rede: `--sandbox workspace-write --full-auto`. |
|
|
19
|
+
| `AUTO_READONLY` | `--sandbox read-only` (sem `--full-auto`). Nunca combine com `AUTO`. |
|
|
20
|
+
| `NO_MCP` | `-c mcp_servers='{}'` → sobe zero MCP servers, preserva auth e o resto do `config.toml`. Alternativa mais bruta: `--ignore-user-config` (tambem derruba os defaults de modelo — ai `MODEL` + `EFFORT` viram obrigatorios). |
|
|
17
21
|
| `RESUME <id>` | `cd <WORKTREE> && codex exec resume <THREAD_ID> --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox --json "$(cat <FOLLOWUP_PROMPT>)" </dev/null >> <AUDIT>/<slug>.log 2>&1` |
|
|
18
22
|
| `RESUME_LAST` | `codex exec resume --last …` (filtra por cwd = a worktree) |
|
|
19
23
|
| `SESSION_ID` | Codex **nao tem flag pra fixar** o id → **capture** o thread id do stream da 1a run: `grep -oE '"thread_id":"[^"]*"' <AUDIT>/<slug>.log \| head -1` (do evento `thread.started`) → grave em `<AUDIT>/<slug>.session`. |
|
|
@@ -129,10 +129,12 @@ Cada opcao lista estimativa de tamanho final, notas de attack surface, debug-abi
|
|
|
129
129
|
|
|
130
130
|
Apresente os servicos detectados na Fase 0.3 como checklist. Usuario pode:
|
|
131
131
|
- **Aceitar** — incluir todos os detectados no `docker-compose.dev.yml`
|
|
132
|
-
- **Adicionar** — incluir extras (ex.:
|
|
132
|
+
- **Adicionar** — incluir extras (ex.: Mailpit se SMTP usado em codigo, Jaeger se OTel)
|
|
133
133
|
- **Remover** — dropar um detectado (ex.: Postgres gerenciado em dev tambem)
|
|
134
134
|
|
|
135
|
-
Sempre ofereca
|
|
135
|
+
Sempre ofereca Mailpit se algum lib de envio de email foi detectada e nao tem servico de email no dev.
|
|
136
|
+
|
|
137
|
+
Se pgvector for detectado no projeto, nao ha recipe bundled a que recorrer — ela foi removida porque a imagem carregava CVEs sem correcao upstream. Mantenha a imagem que o projeto ja usa e diga claramente ao usuario que ela precisa de revisao propria: uma imagem reconstruida, ou um Postgres gerenciado com a extensao `vector` habilitada. Nao troque a imagem por conta propria.
|
|
136
138
|
|
|
137
139
|
#### 1.4 Preview de arvore de arquivos
|
|
138
140
|
|
|
@@ -163,8 +165,11 @@ Sem aprovacao: escreve relatorio (Fase 3 com `status: PLANNED`) e para.
|
|
|
163
165
|
**`docker-compose.dev.yml`**:
|
|
164
166
|
- Componha blocos de `.agents/skills/docker-compose-recipes/services/*.yml` segundo `references/compose-composition.md`.
|
|
165
167
|
- Adicione service(s) do app no fim: `build: { context: ., dockerfile: Dockerfile.dev }`, `volumes` para hot reload (bind mount do source, anonymous volume para `node_modules`/`__pycache__`), `env_file: .env`, `depends_on` com `condition: service_healthy` segundo `references/healthcheck-patterns.md`.
|
|
168
|
+
- Preserve a tag da imagem de cada recipe (NAO converta nenhuma para digest — digest congela a base e nunca alcanca um rebuild de seguranca), as vars de credencial obrigatorias e os binds em `127.0.0.1`. As portas loopback mantem intencionalmente a topologia `apps no host` funcionando.
|
|
166
169
|
- Header: `# Generated by /dw-dockerize on YYYY-MM-DD`.
|
|
167
170
|
|
|
171
|
+
**`.env.example`**: emita toda var de credencial sem valor funcional (as recipes usam `${VAR:?}`, entao o Compose recusa subir sem valor). Depois da copia para `.env`, exija que o usuario defina valores locais unicos e gerados antes de rodar Compose. URLs das apps usam `localhost` quando apps rodam no host e DNS do servico quando rodam no Compose.
|
|
172
|
+
|
|
168
173
|
**`Dockerfile.dev`** (multi-stage NAO obrigatorio em dev — single stage tudo bem):
|
|
169
174
|
|
|
170
175
|
| Stack | Forma |
|
|
@@ -176,7 +181,7 @@ Sem aprovacao: escreve relatorio (Fase 3 com `status: PLANNED`) e para.
|
|
|
176
181
|
|
|
177
182
|
**`.dockerignore`** dev: exclua `.git`, `node_modules`, `target`, `dist`, `.dw`, `.agents`, `*.md` (exceto README.md).
|
|
178
183
|
|
|
179
|
-
**README.md secao "Local Dev"** (anexada): tabela de portas dos servicos, credenciais
|
|
184
|
+
**README.md secao "Local Dev"** (anexada): tabela de portas dos servicos, requisitos de credenciais do `.env.example` sem senhas funcionais, os 4 comandos `dev:*`.
|
|
180
185
|
|
|
181
186
|
#### 2.2 Artefatos `--prod`
|
|
182
187
|
|
|
@@ -217,7 +222,8 @@ Requisitos chave (toda linguagem):
|
|
|
217
222
|
- `restart: always`.
|
|
218
223
|
- Network interna. SEM portas publicas exceto via reverse proxy.
|
|
219
224
|
- Secrets via bloco `secrets:` ou manager externo.
|
|
220
|
-
- Drope servicos so-de-dev (sem
|
|
225
|
+
- Drope servicos so-de-dev (sem Mailpit, Mailpit, smtp4dev, LocalStack, MinIO a menos que explicitamente preciso em prod).
|
|
226
|
+
- Para busca vetorial, use imagem revisada separadamente ou servico Postgres gerenciado com a extensao `vector`; este projeto nao distribui imagem pgvector validada.
|
|
221
227
|
|
|
222
228
|
**`.dockerignore`** prod: mais restritivo que dev. Exclua testes, `tests/`, `.github/`, `.dw/`, `.agents/`, todo markdown exceto licenca.
|
|
223
229
|
|
|
@@ -234,6 +240,7 @@ Leia `Dockerfile` e composes existentes. Aplique checks de `security-review/infr
|
|
|
234
240
|
- Compose: servicos sem healthcheck? (flag)
|
|
235
241
|
- Compose: servicos sem `restart` policy? (flag)
|
|
236
242
|
- Compose: bind mounts em compose prod? (flag CRITICAL se `prod` no nome do arquivo)
|
|
243
|
+
- Compose: alguma imagem pinada por digest, ou credencial com default funcional? (flag CRITICAL — ambos bloqueiam rebuild da base ou distribuem credencial usavel)
|
|
237
244
|
|
|
238
245
|
Aplique `dw-review-rigor`: dedupe padroes repetidos, signal-over-volume em nits de estilo.
|
|
239
246
|
|
|
@@ -257,7 +264,7 @@ mode: <dev|prod|both|audit|dry-run>
|
|
|
257
264
|
languages: [...]
|
|
258
265
|
frameworks: { web: '...', api: '...' }
|
|
259
266
|
services_detected: [postgres, redis, ...]
|
|
260
|
-
services_added: [
|
|
267
|
+
services_added: [mailpit, ...]
|
|
261
268
|
base_image_strategy: <conservative|balanced|bold>
|
|
262
269
|
---
|
|
263
270
|
```
|
|
@@ -272,7 +279,7 @@ Secoes:
|
|
|
272
279
|
6. **Files Created** — tabela com path + bytes + papel.
|
|
273
280
|
7. **Audit Findings** (so `--audit`) — tabela de issues com severidade, file:line, recomendacao.
|
|
274
281
|
8. **Next Steps:**
|
|
275
|
-
- Para `--dev`: `cp .env.example .env` (se faltar), `docker compose -f docker-compose.dev.yml up -d`, depois smoke test do app.
|
|
282
|
+
- Para `--dev`: `cp .env.example .env` (se faltar), defina cada secret obrigatorio como `POSTGRES_PASSWORD` com valor local unico, rode `docker compose -f docker-compose.dev.yml up -d`, depois smoke test do app.
|
|
276
283
|
- Para `--prod`: build local primeiro (`docker build -t <name>:dev .`), rode `/dw-secure-audit` no Dockerfile e compose, depois push pro registry.
|
|
277
284
|
- Para `--audit`: aplique fixes manualmente ou rode com `--mode=force-overwrite`.
|
|
278
285
|
- Sempre: rode `/dw-secure-audit --plan` antes de promover a imagem para prod.
|
|
@@ -293,7 +300,7 @@ Secoes:
|
|
|
293
300
|
- <critical>Nunca sobrescreva em silencio. Se `Dockerfile`/`docker-compose.*.yml`/`.dockerignore` existe, default para `--audit`.</critical>
|
|
294
301
|
- <critical>Imagens prod NUNCA incluem secrets, tooling SDK de dev, source nao compilado, ou fixtures de teste.</critical>
|
|
295
302
|
- <critical>Imagens prod SEMPRE rodam como usuario nao-root.</critical>
|
|
296
|
-
- <critical>Compose prod NUNCA inclui
|
|
303
|
+
- <critical>Compose prod NUNCA inclui Mailpit, Mailpit, smtp4dev, LocalStack, ou servicos so-de-dev.</critical>
|
|
297
304
|
- <critical>Se `--audit` acha CRITICAL (secrets em ENV, root user, portas publicas em data tier), Next Steps lista o fix como REQUIRED antes de deploy.</critical>
|
|
298
305
|
- NAO use tag `:latest` em lugar nenhum.
|
|
299
306
|
- NAO execute comandos compose deste comando — gere arquivos, o usuario roda `docker compose up`.
|
|
@@ -106,6 +106,19 @@
|
|
|
106
106
|
|
|
107
107
|
3. **Instruir o usuário** a colar o body (Ctrl+V) no campo de descrição
|
|
108
108
|
|
|
109
|
+
### 6. Registrar a PR de volta na spec
|
|
110
|
+
|
|
111
|
+
A URL da PR só existe depois que o usuário clica em "Create". Assim que existir, escreva de volta — senão nada do lado `.dw/` registra qual PR entregou o trabalho, e a trilha termina na branch.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Caminho rápido: resolve depois que a PR existe. Precisa do GitHub CLI; pule em silêncio se ausente.
|
|
115
|
+
gh pr view --json url -q .url 2>/dev/null
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- Se resolver uma URL, anexe na seção `## Related` do PRD como `- PR: <url>`.
|
|
119
|
+
- Se `gh` não existir ou a PR ainda não foi criada, imprima a linha exata para o usuário colar e siga. **Nunca bloqueie o comando nisso** — é registro, não gate.
|
|
120
|
+
- Para branches de bugfix, anexe a mesma linha em `.dw/bugfixes/<NNN-slug>/SUMMARY.md` sob `## Related`.
|
|
121
|
+
|
|
109
122
|
## Template da PR (copiar para clipboard)
|
|
110
123
|
|
|
111
124
|
```markdown
|
|
@@ -79,10 +79,10 @@ Use `AskUserQuestion` quando disponivel; senao prompts numerados. Pergunte em **
|
|
|
79
79
|
|
|
80
80
|
#### Camada B — Infra (so pergunte o que cabe na forma)
|
|
81
81
|
|
|
82
|
-
6. **Database**: Postgres /
|
|
82
|
+
6. **Database**: Postgres / MySQL / SQLite (arquivo, sem service) / MongoDB (fora do escopo dos compose recipes — anote e siga sem service se escolhido) / nenhum. Nao ha recipe bundled de pgvector: a imagem carregava CVEs sem correcao upstream e nenhum artefato bundled conseguia limpa-las. Se o projeto precisar de busca vetorial, anote e deixe o usuario escolher uma imagem revisada separadamente ou um Postgres gerenciado com a extensao habilitada.
|
|
83
83
|
7. **Cache**: Redis / Memcached / nenhum
|
|
84
84
|
8. **Fila / message broker**: pg-boss (Node + Postgres, sem service extra), BullMQ (so Node + Redis), Celery (so Python), RabbitMQ (qualquer), LocalStack SQS (qualquer), nenhum. Se escolheu, pergunte tambem se vai ter workers async.
|
|
85
|
-
9. **Email — captura em dev** (default: **Mailpit**, so pergunte se quer override): Mailpit /
|
|
85
|
+
9. **Email — captura em dev** (default: **Mailpit**, so pergunte se quer override): Mailpit / smtp4dev / pular
|
|
86
86
|
10. **Email — destino em prod** (so pergunte se quer email): SMTP relay / SendGrid / Resend / Postmark / SES / pular
|
|
87
87
|
11. **Object storage**: S3 (real, sem service) / MinIO (dev) / GCS (sem service) / nenhum
|
|
88
88
|
12. **Search**: Meilisearch / Typesense / Elasticsearch / nenhum
|
|
@@ -112,7 +112,7 @@ Guarde todas as respostas para a Fase 2.
|
|
|
112
112
|
|
|
113
113
|
### Fase 2 — One-Pager + Plano + Gate de Aprovacao
|
|
114
114
|
|
|
115
|
-
1. Renderize `.dw/spec/projects/{{PROJECT_NAME}}.md` a partir de `.dw/templates/project-onepager.md`. Preencha tudo: forma, linguagens, frameworks, tabela de servicos (nome + porta +
|
|
115
|
+
1. Renderize `.dw/spec/projects/{{PROJECT_NAME}}.md` a partir de `.dw/templates/project-onepager.md`. Preencha tudo: forma, linguagens, frameworks, tabela de servicos (nome + porta + requisitos de credenciais, nunca uma senha funcional), diagrama da arquitetura (ASCII), lista de arquivos a gerar, perguntas em aberto.
|
|
116
116
|
2. Monte o plano:
|
|
117
117
|
- Comandos a rodar (em ordem, com argumentos)
|
|
118
118
|
- Arquivos a criar (paths sob `{{TARGET_DIR}}`)
|
|
@@ -163,11 +163,12 @@ Se fullstack:
|
|
|
163
163
|
- Agregue volumes nomeados sob `volumes:`.
|
|
164
164
|
- Resolva colisoes de porta se houver.
|
|
165
165
|
- Se a topologia for `tudo no Compose`, adicione o(s) service(s) do app no fim (build context = `apps/<nome>` ou raiz, Dockerfile.dev, env_file, volumes, depends_on com `condition: service_healthy`). Se for `apps no host`, componha apenas infraestrutura e use endpoints `localhost` nas env vars consumidas pelas apps.
|
|
166
|
+
- Preserve a tag da imagem de cada recipe (NAO converta nenhuma para digest — digest congela a imagem base e nunca alcanca um rebuild de seguranca), as vars de credencial obrigatorias e os binds de porta em `127.0.0.1`. Esses mapeamentos loopback suportam intencionalmente `apps no host`; nao os remova do dev local.
|
|
166
167
|
3. Adicione header: `# Generated by /dw-new-project on YYYY-MM-DD`.
|
|
167
168
|
|
|
168
169
|
#### 3.4 Gerar `.env.example`
|
|
169
170
|
|
|
170
|
-
Consolide cada env var referenciada pelos servicos selecionados (segundo `references/env-conventions.md`). Agrupe por servico. Sempre inclua as URLs derivadas do lado da app (`DATABASE_URL`, `REDIS_URL`, `AMQP_URL`, `SMTP_HOST`/`SMTP_PORT`, `AWS_ENDPOINT_URL`, etc.).
|
|
171
|
+
Consolide cada env var referenciada pelos servicos selecionados (segundo `references/env-conventions.md`). Agrupe por servico. Sempre inclua as URLs derivadas do lado da app (`DATABASE_URL`, `REDIS_URL`, `AMQP_URL`, `SMTP_HOST`/`SMTP_PORT`, `AWS_ENDPOINT_URL`, etc.). Toda var de credencial e emitida vazia no `.env.example` (as recipes usam `${VAR:?}`, entao o Compose recusa subir sem valor real). Exija que o usuario defina valores unicos e gerados no `.env` gitignored antes de rodar Compose. Nunca emita uma senha reutilizavel.
|
|
171
172
|
|
|
172
173
|
#### 3.5 Gerar scripts
|
|
173
174
|
|
|
@@ -217,7 +218,7 @@ Scaffold minimo:
|
|
|
217
218
|
| Database | <db ou n/a> |
|
|
218
219
|
| Cache | <cache ou n/a> |
|
|
219
220
|
| Fila | <fila ou n/a> |
|
|
220
|
-
| Email (dev) | <mailpit|
|
|
221
|
+
| Email (dev) | <mailpit|smtp4dev|nenhum> |
|
|
221
222
|
| Search | <search ou n/a> |
|
|
222
223
|
| Observability | <observability ou n/a> |
|
|
223
224
|
| Reverse proxy | <traefik|nenhum> |
|
|
@@ -228,7 +229,7 @@ Scaffold minimo:
|
|
|
228
229
|
|
|
229
230
|
## Servicos no docker-compose.dev.yml
|
|
230
231
|
|
|
231
|
-
(tabela dos servicos selecionados com portas e credenciais
|
|
232
|
+
(tabela dos servicos selecionados com portas e requisitos de credenciais; nunca inclua senha funcional)
|
|
232
233
|
|
|
233
234
|
## Convencoes
|
|
234
235
|
|
|
@@ -241,8 +242,8 @@ Scaffold minimo:
|
|
|
241
242
|
|
|
242
243
|
Gere um README inicial:
|
|
243
244
|
- Nome do projeto + 1 linha de proposito
|
|
244
|
-
- Quick Start (`cp .env.example .env
|
|
245
|
-
- Local Dev (tabela de portas dos servicos selecionados + URLs das UIs + credenciais
|
|
245
|
+
- Quick Start (`cp .env.example .env`, defina cada secret obrigatorio com valor local unico, depois `pnpm install && pnpm dev:up`)
|
|
246
|
+
- Local Dev (tabela de portas dos servicos selecionados + URLs das UIs + requisitos de credenciais; nunca publique senha funcional)
|
|
246
247
|
- Diagrama da arquitetura (ASCII do one-pager)
|
|
247
248
|
- Layout do projeto (arvore dos diretorios top-level)
|
|
248
249
|
- Integracao com dev-workflow (mencione `/dw-plan prd`, `/dw-run`, `/dw-qa`, `/dw-secure-audit --plan`, `/dw-secure-audit`)
|
|
@@ -276,7 +277,7 @@ date: YYYY-MM-DD
|
|
|
276
277
|
shape: <frontend|backend|fullstack>
|
|
277
278
|
languages: [typescript, python, ...]
|
|
278
279
|
frameworks: { web: '...', api: '...' }
|
|
279
|
-
services: [postgres
|
|
280
|
+
services: [postgres, mailpit, minio, ...]
|
|
280
281
|
package_manager: <pnpm|npm|yarn|poetry|uv|cargo|dotnet>
|
|
281
282
|
monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
282
283
|
---
|
|
@@ -299,10 +300,10 @@ monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
|
299
300
|
| ... | ... | ... |
|
|
300
301
|
|
|
301
302
|
## Servicos Compostos
|
|
302
|
-
<tabela de servicos com porta + URL UI + credenciais
|
|
303
|
+
<tabela de servicos com porta + URL UI + requisitos de credenciais, vinda de .agents/skills/docker-compose-recipes/>
|
|
303
304
|
|
|
304
305
|
## Proximos Passos
|
|
305
|
-
1. `cp .env.example .env
|
|
306
|
+
1. `cp .env.example .env`, gere secrets locais unicos e defina todo valor obrigatorio como `POSTGRES_PASSWORD`.
|
|
306
307
|
2. `pnpm install` (ou seu package manager).
|
|
307
308
|
3. `pnpm dev:up` para subir todos os servicos. Aguarde os healthchecks.
|
|
308
309
|
4. Abra a UI do Mailpit em http://localhost:8025 para confirmar a captura de email.
|
|
@@ -323,10 +324,10 @@ monorepo: <pnpm-workspaces|turborepo|nx|none>
|
|
|
323
324
|
|
|
324
325
|
- <critical>NUNCA pule o gate de aprovacao da Fase 2. Se rodando em contexto nao-interativo, aborte com: "/dw-new-project exige aprovacao interativa; rerode com --dry-run para so planejar."</critical>
|
|
325
326
|
- <critical>NUNCA rode tools `create-*` fora de `{{TARGET_DIR}}`. CWD de cada comando e o target dir.</critical>
|
|
326
|
-
- <critical>Se
|
|
327
|
+
- <critical>Se Mailpit/smtp4dev foi selecionado, NUNCA tambem ligue um SMTP real em dev. O compose de dev SEMPRE captura.</critical>
|
|
327
328
|
- <critical>Se uma tool `create-*` falha, PARE. Nao siga para gerar compose — scaffold parcial confunde os comandos seguintes.</critical>
|
|
328
329
|
- NAO pin de versao SDK Node/Python/.NET/Rust dentro do projeto a nao ser que o usuario peca; use `package.json` engines / `pyproject.toml` / `global.json` / `rust-toolchain.toml` para indicar intencao sem forcar.
|
|
329
|
-
- NAO baked secrets em arquivo gerado. `.env.example`
|
|
330
|
+
- NAO baked secrets em arquivo gerado. `.env.example` contem defaults nao secretos de dev e chaves secretas obrigatorias vazias; valores reais ficam em `.env` nao versionado.
|
|
330
331
|
|
|
331
332
|
## Tratamento de Erros
|
|
332
333
|
|
|
@@ -113,7 +113,7 @@ Roda em modo padrão OU `plan prd`.
|
|
|
113
113
|
|
|
114
114
|
1. **Coverage matrix sobre as dimensões do PRD** (objetivos, usuários-alvo, limites de escopo, métricas de sucesso, estratégia de rollout, pontos de integração, edge cases). Monte a matriz, credite evidência de handoff alinhado e fatos descobertos do repo, e pergunte SOMENTE as dimensões descobertas — uma decisão por vez, cada uma com resposta recomendada — usando a ferramenta de entrevista estruturada quando disponível (registre o fallback em chat caso contrário). Sem contagem fixa de perguntas; nunca re-pergunte uma decisão resolvida num one-pager alinhado.
|
|
115
115
|
2. **Web search MÍNIMO 3 queries** para padrões de mercado, contexto regulatório, abordagens de competidores quando relevante.
|
|
116
|
-
3. **Constitution alignment.** Cada requisito funcional (
|
|
116
|
+
3. **Constitution alignment.** Cada requisito funcional (RF-N.M) inclui linha `Constitution Alignment: respects P-NNN, P-MMM` OU `no applicable principle: <motivo>`.
|
|
117
117
|
4. **Awareness multi-projeto.** Se feature cruza projetos do workspace, consulte `.dw/rules/integrations.md` e documente escopo na seção "Projetos Impactados".
|
|
118
118
|
5. **Output:** `.dw/spec/prd-<feature-slug>/prd.md`.
|
|
119
119
|
|
|
@@ -75,7 +75,7 @@ Quando disponíveis em `./.agents/skills/`, estas skills são invocadas por task
|
|
|
75
75
|
- Mensagem atômica: `feat(<scope>): <título da task> (#<task-id>)`.
|
|
76
76
|
- Referencie FRs cobertos.
|
|
77
77
|
- Uma task = um commit (exceto se task tem subtask milestones explícitos que ganham commits separados).
|
|
78
|
-
6. **Atualizar tasks.md:** marcar task como `Done`
|
|
78
|
+
6. **Atualizar tasks.md:** marcar `Status` da task como `Done` e escrever o SHA curto (`git rev-parse --short HEAD`) na coluna `Commit`. Esse é o único registro que liga a task ao seu diff — não pule.
|
|
79
79
|
7. **Reportar:** o que foi feito, testes adicionados, o que foi validado.
|
|
80
80
|
|
|
81
81
|
### CONDIÇÕES DE PARADA
|
|
@@ -24,10 +24,10 @@ services: []
|
|
|
24
24
|
| Forma | frontend / backend / fullstack | [por que essa forma — superficie unica, API para parceiros, etc.] |
|
|
25
25
|
| Frontend | Next.js / Vite+React / n/a | [por que esse framework — SSR, simplicidade SPA, etc.] |
|
|
26
26
|
| Backend | NestJS / Fastify / FastAPI / ASP.NET Core minimal / Axum / n/a | [por que — expertise do time, ecosystem, alvo de latencia] |
|
|
27
|
-
| Database | Postgres /
|
|
27
|
+
| Database | Postgres / MySQL / SQLite / MongoDB / nenhum | [por que esse DB — relacional, transacional, etc. Busca vetorial nao tem recipe bundled; nomeie a imagem revisada ou servico gerenciado se o projeto precisar] |
|
|
28
28
|
| Cache | Redis / Memcached / nenhum | [por que ou por que nao] |
|
|
29
29
|
| Fila | pg-boss / BullMQ / Celery / RabbitMQ / LocalStack SQS / nenhum | [por que ou nao + sync vs async workers] |
|
|
30
|
-
| Email — dev | Mailpit (default) /
|
|
30
|
+
| Email — dev | Mailpit (default) / smtp4dev / nenhum | [normalmente Mailpit — captura only, nunca envia real] |
|
|
31
31
|
| Email — prod | SMTP / SendGrid / Resend / Postmark / SES / nenhum | [por que esse provider — volume, deliverability, custo] |
|
|
32
32
|
| Object storage | S3 / MinIO (dev) / GCS / nenhum | [por que ou nao] |
|
|
33
33
|
| Search | Meilisearch / Typesense / Elasticsearch / nenhum | [por que esse engine — features, escala, simplicidade] |
|
|
@@ -44,13 +44,14 @@ services: []
|
|
|
44
44
|
|
|
45
45
|
[Servicos gerados a partir da skill docker-compose-recipes. Preenchido pelo /dw-new-project.]
|
|
46
46
|
|
|
47
|
-
| Servico | Porta (host) | UI | Credenciais
|
|
48
|
-
|
|
49
|
-
| postgres | 5432 | — | POSTGRES_USER=app, POSTGRES_PASSWORD
|
|
47
|
+
| Servico | Porta (host) | UI | Credenciais |
|
|
48
|
+
|---------|--------------|----|-------------|
|
|
49
|
+
| postgres | 127.0.0.1:5432 | — | POSTGRES_USER=app, POSTGRES_PASSWORD obrigatoria no `.env` (sem default), POSTGRES_DB=app |
|
|
50
50
|
| redis | 6379 | — | (sem auth em dev) |
|
|
51
51
|
| mailpit | 1025 (smtp), 8025 (UI) | http://localhost:8025 | (sem auth) |
|
|
52
52
|
| ... | ... | ... | ... |
|
|
53
53
|
|
|
54
|
+
|
|
54
55
|
## Diagrama da Arquitetura
|
|
55
56
|
|
|
56
57
|
```
|
|
@@ -12,7 +12,7 @@ status: pending
|
|
|
12
12
|
|
|
13
13
|
[Breve descrição da tarefa]
|
|
14
14
|
|
|
15
|
-
**Requisitos Funcionais cobertos**: RF
|
|
15
|
+
**Requisitos Funcionais cobertos**: RF-X.Y, RF-X.Z (máximo 2 por task)
|
|
16
16
|
|
|
17
17
|
<requirements>
|
|
18
18
|
[Lista de requisitos obrigatórios]
|
|
@@ -19,11 +19,13 @@ feat/prd-[nome-funcionalidade]
|
|
|
19
19
|
|
|
20
20
|
## Tarefas
|
|
21
21
|
|
|
22
|
-
| Task | Descrição | RFs | Status |
|
|
23
|
-
|
|
24
|
-
| 1.0 | [Título] |
|
|
25
|
-
| 2.0 | [Título] |
|
|
26
|
-
| 3.0 | [Título] |
|
|
22
|
+
| Task | Descrição | RFs | Status | Commit |
|
|
23
|
+
|------|-----------|-----|--------|--------|
|
|
24
|
+
| 1.0 | [Título] | RF-1.1, RF-1.2 | Pendente | — |
|
|
25
|
+
| 2.0 | [Título] | RF-2.1 | Pendente | — |
|
|
26
|
+
| 3.0 | [Título] | RF-3.1, RF-3.2 | Pendente | — |
|
|
27
|
+
|
|
28
|
+
`Commit` guarda o SHA curto escrito de volta pelo `/dw-run` quando a task fecha (passo 6). É o que torna o diff da task localizável depois — deixe `—` até a task commitar.
|
|
27
29
|
|
|
28
30
|
## Progresso
|
|
29
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docker-compose-recipes
|
|
3
|
-
description: Use for docker-compose service blocks (postgres,
|
|
3
|
+
description: Use for docker-compose service blocks (postgres, redis, mailpit, minio, meilisearch, jaeger, traefik). Invoked by /dw-new-project, /dw-dockerize, or when composing dev/prod compose files.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Write
|
|
@@ -49,14 +49,12 @@ Each row points to `services/<name>.yml`.
|
|
|
49
49
|
| Service | Use | Default port(s) | Recipe |
|
|
50
50
|
|---------|-----|-----------------|--------|
|
|
51
51
|
| Postgres 16 (alpine) | Relational DB | `5432` | `services/postgres.yml` |
|
|
52
|
-
| PostgreSQL 18 + pgvector 0.8.2 | Relational + vector DB | `5432` | `services/postgres-pgvector.yml` |
|
|
53
52
|
| MySQL 8 | Relational DB | `3306` | `services/mysql.yml` |
|
|
54
53
|
| Redis 7 (alpine) | Cache, pub/sub, BullMQ backend | `6379` | `services/redis.yml` |
|
|
55
54
|
| Memcached 1.6 (alpine) | Cache | `11211` | `services/memcached.yml` |
|
|
56
55
|
| RabbitMQ 3 (management-alpine) | Message broker + UI | `5672`, UI `15672` | `services/rabbitmq.yml` |
|
|
57
56
|
| LocalStack | AWS-compatible local (S3, SQS, SNS, DynamoDB) | `4566` | `services/localstack.yml` |
|
|
58
57
|
| Mailpit | Default email-in-dev (capture only, never sends) | SMTP `1025`, UI `8025` | `services/mailpit.yml` |
|
|
59
|
-
| MailHog | Legacy email capture alternative | SMTP `1025`, UI `8025` | `services/mailhog.yml` |
|
|
60
58
|
| smtp4dev | Windows-friendly SMTP capture | SMTP `2525`, UI `5000` | `services/smtp4dev.yml` |
|
|
61
59
|
| MinIO | S3-compatible local | API `9000`, UI `9001` | `services/minio.yml` |
|
|
62
60
|
| Meilisearch | Search engine (lightweight) | `7700` | `services/meilisearch.yml` |
|
|
@@ -82,7 +80,7 @@ Each row points to `services/<name>.yml`.
|
|
|
82
80
|
|
|
83
81
|
## Inspired by
|
|
84
82
|
|
|
85
|
-
Hand-curated by dev-workflow. Service defaults follow upstream documentation (Docker Hub `postgres`, `
|
|
83
|
+
Hand-curated by dev-workflow. Service defaults follow upstream documentation (Docker Hub `postgres`, `redis`, `axllent/mailpit`, `minio/minio`, `getmeili/meilisearch`, `jaegertracing/all-in-one`, `traefik`). Healthcheck patterns adapted from `docker-library/healthcheck` and the official compose docs.
|
|
86
84
|
|
|
87
85
|
## Structured Return
|
|
88
86
|
|
|
@@ -4,7 +4,7 @@ This file describes how `/dw-new-project` and `/dw-dockerize` merge the standalo
|
|
|
4
4
|
|
|
5
5
|
## The merge algorithm
|
|
6
6
|
|
|
7
|
-
1. **Pick the selected services.** From the interview answers (or from stack detection in `dw-dockerize`), get the list of services to include. Example: `[postgres
|
|
7
|
+
1. **Pick the selected services.** From the interview answers (or from stack detection in `dw-dockerize`), get the list of services to include. Example: `[postgres, mailpit, minio]`.
|
|
8
8
|
2. **Read each `services/<name>.yml`** as a standalone fragment. Each file declares ONE top-level service block (e.g., `postgres:`) plus comments at the bottom describing the volumes block to merge.
|
|
9
9
|
3. **Concatenate under a single `services:` map.** Indent each block under `services:` in the final file. Order does not matter for compose, but for readability sort by tier: storage → cache/queue → search → email → observability → proxy.
|
|
10
10
|
4. **Collect the volumes.** Each recipe's comments list the named volumes it needs. Aggregate them under a top-level `volumes:` block. Example:
|
|
@@ -42,7 +42,7 @@ This file describes how `/dw-new-project` and `/dw-dockerize` merge the standalo
|
|
|
42
42
|
services:
|
|
43
43
|
# --- storage tier ---
|
|
44
44
|
postgres:
|
|
45
|
-
# ... contents from services/postgres
|
|
45
|
+
# ... contents from services/postgres.yml
|
|
46
46
|
|
|
47
47
|
# --- cache tier ---
|
|
48
48
|
redis:
|