@brunosps00/dev-workflow 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +16 -12
  2. package/bin/dev-workflow.js +1 -1
  3. package/lib/constants.js +8 -2
  4. package/lib/init.js +6 -0
  5. package/lib/install-deps.js +0 -5
  6. package/lib/migrate-gsd.js +164 -0
  7. package/lib/uninstall.js +2 -2
  8. package/package.json +1 -1
  9. package/scaffold/en/commands/dw-analyze-project.md +6 -11
  10. package/scaffold/en/commands/dw-autopilot.md +6 -13
  11. package/scaffold/en/commands/dw-brainstorm.md +1 -1
  12. package/scaffold/en/commands/dw-code-review.md +6 -5
  13. package/scaffold/en/commands/dw-create-prd.md +5 -4
  14. package/scaffold/en/commands/dw-create-techspec.md +5 -4
  15. package/scaffold/en/commands/dw-execute-phase.md +149 -0
  16. package/scaffold/en/commands/dw-help.md +5 -2
  17. package/scaffold/en/commands/dw-intel.md +98 -29
  18. package/scaffold/en/commands/dw-map-codebase.md +125 -0
  19. package/scaffold/en/commands/dw-new-project.md +1 -1
  20. package/scaffold/en/commands/dw-plan-checker.md +144 -0
  21. package/scaffold/en/commands/dw-quick.md +30 -12
  22. package/scaffold/en/commands/dw-redesign-ui.md +5 -9
  23. package/scaffold/en/commands/dw-refactoring-analysis.md +6 -5
  24. package/scaffold/en/commands/dw-resume.md +10 -8
  25. package/scaffold/en/commands/dw-run-plan.md +14 -20
  26. package/scaffold/en/commands/dw-run-task.md +5 -4
  27. package/scaffold/en/commands/dw-update.md +3 -1
  28. package/scaffold/en/templates/idea-onepager.md +1 -1
  29. package/scaffold/pt-br/commands/dw-analyze-project.md +6 -11
  30. package/scaffold/pt-br/commands/dw-autopilot.md +6 -13
  31. package/scaffold/pt-br/commands/dw-brainstorm.md +1 -1
  32. package/scaffold/pt-br/commands/dw-code-review.md +6 -5
  33. package/scaffold/pt-br/commands/dw-create-prd.md +5 -4
  34. package/scaffold/pt-br/commands/dw-create-techspec.md +5 -4
  35. package/scaffold/pt-br/commands/dw-execute-phase.md +149 -0
  36. package/scaffold/pt-br/commands/dw-help.md +5 -2
  37. package/scaffold/pt-br/commands/dw-intel.md +98 -29
  38. package/scaffold/pt-br/commands/dw-map-codebase.md +125 -0
  39. package/scaffold/pt-br/commands/dw-new-project.md +1 -1
  40. package/scaffold/pt-br/commands/dw-plan-checker.md +144 -0
  41. package/scaffold/pt-br/commands/dw-quick.md +30 -12
  42. package/scaffold/pt-br/commands/dw-redesign-ui.md +5 -9
  43. package/scaffold/pt-br/commands/dw-refactoring-analysis.md +6 -5
  44. package/scaffold/pt-br/commands/dw-resume.md +10 -8
  45. package/scaffold/pt-br/commands/dw-run-plan.md +16 -22
  46. package/scaffold/pt-br/commands/dw-run-task.md +5 -4
  47. package/scaffold/pt-br/commands/dw-update.md +3 -1
  48. package/scaffold/pt-br/templates/idea-onepager.md +1 -1
  49. package/scaffold/skills/dw-codebase-intel/SKILL.md +101 -0
  50. package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +318 -0
  51. package/scaffold/skills/dw-codebase-intel/references/incremental-update.md +79 -0
  52. package/scaffold/skills/dw-codebase-intel/references/intel-format.md +208 -0
  53. package/scaffold/skills/dw-codebase-intel/references/query-patterns.md +148 -0
  54. package/scaffold/skills/dw-execute-phase/SKILL.md +133 -0
  55. package/scaffold/skills/dw-execute-phase/agents/executor.md +264 -0
  56. package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +215 -0
  57. package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +143 -0
  58. package/scaffold/skills/dw-execute-phase/references/plan-verification.md +156 -0
  59. package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +102 -0
@@ -38,26 +38,44 @@ You are a quick task executor. This command exists to implement one-off changes
38
38
  8. Invoke `dw-verify` and include the VERIFICATION REPORT in the output before committing. Without PASS, DO NOT commit.
39
39
  9. Create atomic semantic commit with the change
40
40
 
41
- ## GSD Integration
41
+ ## Task Tracking
42
42
 
43
- <critical>When GSD is installed, delegation to /gsd-quick is MANDATORY for tracking.</critical>
43
+ <critical>Every `/dw-quick` execution writes a tracking entry to `.dw/spec/quick/<slug>.md` so the change is discoverable later.</critical>
44
44
 
45
- If GSD (get-shit-done-cc) is installed in the project:
46
- - Delegate to `/gsd-quick` for tracking in `.planning/quick/`
47
- - The task is registered in history for future lookup via `/dw-intel`
45
+ Tracking format (single file per quick task):
48
46
 
49
- If GSD is NOT installed:
50
- - Execute directly with Level 1 validation
51
- - No history tracking (only git log)
47
+ ```markdown
48
+ ---
49
+ type: quick-task
50
+ schema_version: "1.0"
51
+ status: COMPLETE | PARTIAL | ABORTED
52
+ date: YYYY-MM-DD
53
+ files_touched: [...]
54
+ commit: <SHA>
55
+ ---
56
+
57
+ # Quick Task — <slug>
58
+
59
+ ## Description
60
+ <one-line description from the user's prompt>
61
+
62
+ ## Files
63
+ <list>
64
+
65
+ ## Verification
66
+ <dw-verify report excerpt>
67
+ ```
68
+
69
+ Subsequent `/dw-intel` queries surface these via the file index.
52
70
 
53
71
  ## Codebase Intelligence
54
72
 
55
- If `.planning/intel/` exists, query before implementing:
56
- - Internally run: `/gsd-intel "implementation patterns in [target area]"`
73
+ If `.dw/intel/` exists, query before implementing:
74
+ - Internally run: `/dw-intel "implementation patterns in [target area]"`
57
75
  - Follow the patterns found
58
76
 
59
- If `.planning/intel/` does NOT exist:
60
- - Use only `.dw/rules/` as context
77
+ If `.dw/intel/` does NOT exist:
78
+ - Use only `.dw/rules/` as context (or grep directly if `.dw/rules/` is also absent)
61
79
 
62
80
  ## Response Format
63
81
 
@@ -64,17 +64,13 @@ Use diagnostic tools based on the project's framework:
64
64
  7. **VALIDATE**: capture after-state in BOTH resolutions (mobile and desktop), compare before/after, verify accessibility (WCAG 2.2 via `ui-ux-pro-max`), run react-doctor `--diff` if React. If `webapp-testing` is available, capture screenshots at 375px viewport (mobile) and 1440px viewport (desktop).
65
65
  8. **PERSIST CONTRACT**: if the user approved a direction, generate `design-contract.md` in the PRD directory (`.dw/spec/prd-[name]/design-contract.md`) with: approved direction, color palette, typography pairing, layout rules, accessibility rules, and component rules. This contract will be read by `dw-run-task` and `dw-run-plan` to ensure visual consistency.
66
66
 
67
- ## GSD Integration
67
+ ## Codebase Intelligence
68
68
 
69
- <critical>When GSD is installed, registering the design contract in .planning/ and querying .planning/intel/ are MANDATORY.</critical>
69
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY in the audit phase to surface existing UI patterns.</critical>
70
70
 
71
- If GSD (get-shit-done-cc) is installed in the project:
72
- - After generating the design contract, register in `.planning/` for cross-session persistence
73
- - Query `.planning/intel/` in the audit phase for existing UI patterns
74
-
75
- If GSD is NOT installed:
76
- - The design contract works normally (file-based in `.dw/spec/`)
77
- - Audit uses only `.dw/rules/` for context
71
+ - Audit phase: internally run `/dw-intel "UI components, design patterns, layout conventions"` before proposing redesign directions
72
+ - The design contract (`.dw/spec/prd-[name]/design-contract.md`) is the single source of truth for visual consistency — it's read by `/dw-run-task` and `/dw-run-plan` and persists across sessions naturally (no separate registration needed)
73
+ - If `.dw/intel/` does NOT exist, fall back to `.dw/rules/` and direct grep over `apps/web/src/` (or equivalent frontend root)
78
74
 
79
75
  ## Preferred Response Format
80
76
 
@@ -31,13 +31,14 @@ For Angular projects, use `ng lint` as an analytical complement.
31
31
 
32
32
  ## Codebase Intelligence
33
33
 
34
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before writing requirements. Do NOT skip this step.</critical>
35
- - Internally run: `/gsd-intel "tech debt, decision spaces, and known technical debt"`
36
- - Contextualize findings with already documented decisions
34
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before flagging refactoring opportunities. Do NOT skip this step.</critical>
35
+ - Internally run: `/dw-intel "tech debt and known technical decisions"`
36
+ - Contextualize findings with documented decisions in `.dw/rules/`
37
37
  - Avoid flagging as a smell something that is an intentional recorded decision
38
38
 
39
- If `.planning/intel/` does NOT exist:
40
- - Use `.dw/rules/` as context (current behavior)
39
+ If `.dw/intel/` does NOT exist:
40
+ - Use `.dw/rules/` as context, falling back to grep
41
+ - Suggest running `/dw-map-codebase` to enrich downstream context
41
42
 
42
43
  ## Input Variables
43
44
 
@@ -40,17 +40,19 @@ You are a session continuity assistant. This command exists to restore context f
40
40
  6. Present the summary in the format below (including a "From where we left off" bullet list based on memory)
41
41
  7. Suggest the next command to execute
42
42
 
43
- ## GSD Integration
43
+ ## Cross-Session State
44
44
 
45
- <critical>When GSD is installed, delegation to /gsd-resume-work is MANDATORY, not optional.</critical>
45
+ <critical>If `.dw/spec/active-session.md` exists (written by `/dw-execute-phase` at checkpoint), reading it is MANDATORY to restore the last-known position.</critical>
46
46
 
47
- If GSD (get-shit-done-cc) is installed in the project:
48
- - Delegate to `/gsd-resume-work` for cross-session state restoration from `.planning/STATE.md`
49
- - Incorporate additional context: persistent threads, backlog, notes
47
+ Read order for cross-session context:
50
48
 
51
- If GSD is NOT installed:
52
- - Use only `.dw/spec/` and git log as context sources
53
- - Full functionality, just without advanced cross-session persistence
49
+ 1. `.dw/spec/active-session.md` last completed task, next task, blockers, open deviations (written by `/dw-execute-phase` when it checkpoints at 70% context budget OR when the user signals stop)
50
+ 2. `.dw/spec/prd-*/SUMMARY.md` completed phase summaries (most recent ones)
51
+ 3. Latest commits via `git log --oneline -20` — what landed on the current branch
52
+ 4. Open deviations via `.dw/spec/prd-*/deviations.md` — any unresolved Rule 1/2/3 entries
53
+ 5. Active PRD detection — the directory under `.dw/spec/` whose `tasks.md` has the most recent uncompleted task
54
+
55
+ If `.dw/spec/active-session.md` is absent (no checkpoint was written; clean session boundary), fall back to git log + `tasks.md` state across active PRDs.
54
56
 
55
57
  ## Response Format
56
58
 
@@ -159,36 +159,30 @@ If a task FAILS during execution:
159
159
  4. Wait for manual intervention from the user
160
160
  5. **DO NOT** automatically continue to the next task
161
161
 
162
- ## GSD Integration
162
+ ## Plan Verification + Parallel Execution
163
163
 
164
- <critical>When GSD is installed, plan verification and parallel execution are MANDATORY, not optional. The command MUST NOT skip these steps.</critical>
164
+ <critical>Plan verification and wave-based parallel execution are MANDATORY, not optional. Both are now native to dev-workflow via the `dw-execute-phase` bundled skill.</critical>
165
165
 
166
166
  ### Plan Verification (Pre-Execution)
167
167
 
168
- If GSD (get-shit-done-cc) is installed in the project:
169
- - Before starting execution, delegate to GSD's plan-checker agent
170
- - The verifier analyzes: cyclic dependencies, task viability, risks, PRD requirements coverage
171
- - If FAIL: present issues found and suggest fixes. Maximum 3 correction cycles
168
+ Before starting execution, delegate to `/dw-plan-checker {{PRD_PATH}}`:
169
+ - The plan-checker agent verifies the 6 dimensions (requirement coverage, task completeness, dependency soundness, artifact wiring, context budget, constraint compliance)
170
+ - If REVISE: present issues found and suggest fixes. Maximum 3 correction cycles via `/dw-create-tasks --revise`
171
+ - If BLOCK: surface conflict to user, do NOT auto-replan
172
172
  - If PASS: proceed to execution
173
173
 
174
- If GSD is NOT installed:
175
- - Skip verification and execute directly (current behavior)
176
-
177
174
  ### Parallel Execution (Wave-Based)
178
175
 
179
- If GSD (get-shit-done-cc) is installed in the project:
180
- - Analyze each task's `blockedBy` field to build the dependency graph
181
- - Group tasks into waves:
182
- - Wave 1: tasks with no dependencies (can run in parallel)
176
+ After plan-checker PASS, delegate to `/dw-execute-phase {{PRD_PATH}}`:
177
+ - The executor agent analyzes each task's `Depends on:` field to build the dependency graph
178
+ - Groups tasks into waves:
179
+ - Wave 1: tasks with no dependencies (run in parallel)
183
180
  - Wave 2: tasks that depend on Wave 1 tasks
184
181
  - Wave N: and so on
185
- - Delegate each wave to GSD's parallel execution engine (`/gsd-execute-phase`)
186
- - Each task runs in an isolated worktree with fresh context
187
- - Results are merged after the wave completes
188
- - If any task in a wave fails: pause the wave, report, await user decision
189
-
190
- If GSD is NOT installed:
191
- - Execute sequentially as today (current behavior)
182
+ - Each wave dispatches subagents in parallel (one per task)
183
+ - Results merged after the wave completes
184
+ - If any task in a wave fails permanently (Rule 3 deviation): pause the wave, report, await user decision
185
+ - The executor commits atomically per task and writes `SUMMARY.md` after the final wave
192
186
 
193
187
  ### Design Contracts
194
188
 
@@ -25,15 +25,16 @@ When available in the project at `./.agents/skills/`, use these skills as specia
25
25
 
26
26
  ## Codebase Intelligence
27
27
 
28
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before writing requirements. Do NOT skip this step.</critical>
29
- - Internally run: `/gsd-intel "implementation patterns in [task target area]"`
28
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before writing code. Do NOT skip this step.</critical>
29
+ - Internally run: `/dw-intel "implementation patterns in [task target area]"`
30
30
  - Follow conventions found for file structure, naming, and error handling
31
31
 
32
32
  If `design-contract.md` exists in the PRD directory:
33
33
  - Read the contract and ensure all frontend implementation follows the approved design rules
34
34
 
35
- If `.planning/intel/` does NOT exist:
36
- - Use `.dw/rules/` as context (current behavior)
35
+ If `.dw/intel/` does NOT exist:
36
+ - Use `.dw/rules/` as context, falling back to direct grep
37
+ - Suggest running `/dw-map-codebase` after the task to enrich downstream context
37
38
 
38
39
  ## File Locations
39
40
 
@@ -78,7 +78,9 @@ npx -y @brunosps00/dev-workflow@latest update --lang=$DETECTED_LANG
78
78
  The `update` command overwrites managed files and PRESERVES:
79
79
  - `.dw/rules/` (user rules)
80
80
  - `.dw/spec/` (in-progress PRDs and tasks)
81
- - `.planning/` (user data)
81
+ - `.dw/intel/` (codebase index from `/dw-map-codebase`)
82
+
83
+ The `update` command also runs the GSD migration step automatically — if a project has legacy `.planning/` (from prior GSD usage), the contents are migrated to `.dw/intel/`, `.dw/spec/active-session.md`, `.dw/spec/quick/`, etc., and `.planning/` is renamed to `.planning.gsd-archive-<DATE>/` for inspection. The `.claude/commands/gsd/`, `.claude/agents/gsd-*.md`, `.claude/hooks/gsd-*.js`, and `.claude/gsd-file-manifest.json` files are removed during the migration.
82
84
 
83
85
  If the update fails (network error, permission, package unavailable): report the error to the user and STOP. Do NOT attempt manual workarounds like copying files by hand.
84
86
 
@@ -22,7 +22,7 @@ Focus on the problem, not the solution. Avoid jumping into "how to implement".]
22
22
  Sources:
23
23
  - PRDs in `.dw/spec/prd-*/prd.md` (features already delivered or in development)
24
24
  - `.dw/rules/index.md` (product overview)
25
- - `.planning/intel/` if GSD is installed
25
+ - `.dw/intel/` (queryable index built by `/dw-map-codebase`, queried via `/dw-intel`)
26
26
 
27
27
  Format:]
28
28
 
@@ -218,19 +218,14 @@ Para cada projeto/módulo detectado, identificar:
218
218
  Quando React for detectado, execute `npx react-doctor@latest --verbose` e inclua o health score nas rules geradas como métrica baseline.
219
219
  Para projetos Angular, execute `ng lint` e documente warnings como baseline.
220
220
 
221
- <critical>Se o GSD estiver instalado, a execução do /gsd-map-codebase é OBRIGATÓRIA. O comando NÃO pode ser considerado completo sem executar TODOS os passos aplicáveis, incluindo a geração do índice em .planning/intel/.</critical>
221
+ <critical>A execução do /dw-map-codebase para gerar o índice queryable em .dw/intel/ é OBRIGATÓRIA. O comando NÃO pode ser considerado completo sem ela.</critical>
222
222
 
223
- #### Inteligência do Codebase (GSD)
223
+ #### Inteligência do Codebase (nativo)
224
224
 
225
- Se o GSD (get-shit-done-cc) estiver instalado no projeto:
226
- - Após gerar as rules em `.dw/rules/`, delegue para `/gsd-map-codebase` para criar índice rico em `.planning/intel/`
227
- - O índice inclui: architectural assumptions, decision spaces, behavioral references, UI patterns
228
- - O índice é incremental re-executar adiciona ao existente, não substitui
229
- - Outros comandos dw-* podem consultar o índice via `/gsd-intel` internamente
230
-
231
- Se o GSD NÃO estiver instalado:
232
- - Gere apenas `.dw/rules/` (comportamento atual)
233
- - Sugira: "Para inteligência queryable do codebase, instale GSD via `npx dev-workflow install-deps`"
225
+ Após gerar as rules em `.dw/rules/`, delegue para `/dw-map-codebase` para criar o índice queryable em `.dw/intel/`:
226
+ - O índice inclui: stack (`stack.json`), grafo de arquivos (`files.json`), superfície de API (`apis.json`), dependências (`deps.json`), overview de arquitetura (`arch.md`)
227
+ - O índice é incremental `/dw-map-codebase --files <list>` atualiza os entries tocados; full scan só quando preciso
228
+ - Outros comandos dw-* consultam o índice via `/dw-intel` (veja a skill bundled `dw-codebase-intel` para schemas)
234
229
 
235
230
  ### Passo 4: Ler Arquivos Fonte Representativos (Obrigatório)
236
231
 
@@ -68,10 +68,11 @@ Se este comando for invocado para retomar um autopilot interrompido (via `/dw-re
68
68
 
69
69
  ### Etapa 1: Inteligencia do Codebase
70
70
 
71
- <critical>Se `.planning/intel/` existir, a consulta e OBRIGATORIA antes de iniciar.</critical>
71
+ <critical>Se `.dw/intel/` existir, a consulta via `/dw-intel` e OBRIGATORIA antes de iniciar. Cai para `.dw/rules/` e grep direto se ausente.</critical>
72
72
 
73
- - Consulte `.planning/intel/` via `/gsd-intel` (se disponivel) ou `.dw/rules/` para entender o contexto do projeto
73
+ - Consulte `.dw/intel/` via `/dw-intel` para entender o contexto do projeto
74
74
  - Identifique: stack tecnologica, padroes existentes, features relacionadas
75
+ - Se `.dw/intel/` esta ausente, sugira rodar `/dw-map-codebase` primeiro para contexto downstream mais rico
75
76
 
76
77
  ### Etapa 2: Pesquisa (Condicional)
77
78
 
@@ -148,7 +149,7 @@ Avalie se as tasks envolvem frontend:
148
149
  ### Etapa 8: Execucao
149
150
 
150
151
  Execute `/dw-run-plan` com o path do PRD.
151
- - Siga TODAS as instrucoes do comando, incluindo integracao GSD (verificacao de plano, execucao paralela)
152
+ - Siga TODAS as instrucoes do comando, incluindo o gate nativo do plan-checker (PASS obrigatorio) e execucao paralela em waves via `/dw-execute-phase`
152
153
  - Cada task segue `/dw-run-task` com validacao Level 1
153
154
 
154
155
  ### Etapa 9: Review de Implementacao (Loop)
@@ -247,17 +248,9 @@ Pergunte ao usuario: **"Commits realizados. Deseja gerar o Pull Request?"**
247
248
  - **SIM**: execute `/dw-generate-pr` com o branch alvo
248
249
  - **NAO**: informe que os commits estao prontos e o usuario pode gerar o PR manualmente depois
249
250
 
250
- ## Integracao GSD
251
+ ## Engine Nativo
251
252
 
252
- <critical>Quando o GSD estiver instalado, TODAS as integracoes GSD de cada comando individual DEVEM ser executadas. O autopilot nao e desculpa para pular passos do GSD.</critical>
253
-
254
- Se o GSD (get-shit-done-cc) estiver instalado:
255
- - Etapa 1: use `/gsd-intel` para consulta
256
- - Etapa 8: use verificacao de plano + execucao paralela
257
- - Todos os comandos: sigam suas secoes GSD individuais
258
-
259
- Se o GSD NAO estiver instalado:
260
- - Todos os comandos funcionam normalmente sem GSD
253
+ O autopilot depende de infraestrutura dev-workflow-native para inteligencia de codebase (`/dw-map-codebase` + `/dw-intel`), verificacao de plano (`/dw-plan-checker`), e execucao paralela (`/dw-execute-phase`). Os quatro vem bundled e nao precisam de dependencias externas. Veja as skills bundled `dw-codebase-intel` e `dw-execute-phase` em `.agents/skills/` para detalhes.
261
254
 
262
255
  ## Persistencia de Estado
263
256
 
@@ -65,7 +65,7 @@ Use este comando quando o usuario quiser:
65
65
  2. **Reformule como "How Might We"**: transforme a ideia bruta em `How might we [verbo] para [usuário] de forma que [resultado]?`. Isso tira o time de "solution mode" prematuro.
66
66
  3. **Product Inventory (obrigatório se o produto existe)**:
67
67
  - Se `.dw/spec/prd-*/` tem PRDs OU `.dw/rules/index.md` existe, leia esses artefatos para mapear o **inventário de features do produto atual** (nível de produto, não de código).
68
- - Fontes a consultar: `.dw/spec/prd-*/prd.md` (seções Overview / Main Features / User Stories), `.dw/rules/index.md` e `.dw/rules/<modulo>.md`, `.planning/intel/` se existir.
68
+ - Fontes a consultar: `.dw/spec/prd-*/prd.md` (seções Overview / Main Features / User Stories), `.dw/rules/index.md` e `.dw/rules/<modulo>.md`, `.dw/intel/` se existir (queryable via `/dw-intel`).
69
69
  - Produza um **Feature Inventory curto (5-12 bullets)** antes de divergir: "o produto hoje faz X, Y, Z".
70
70
  - Se o projeto é greenfield (sem PRDs nem rules), registre: "Feature Inventory: greenfield — nenhum artefato de produto ainda".
71
71
  4. Se faltar contexto essencial para o usuário (problema, persona, valor esperado), faça perguntas curtas e objetivas antes de expandir.
@@ -29,13 +29,14 @@ Quando disponíveis no projeto em `./.agents/skills/`, use estas skills como apo
29
29
 
30
30
  ## Inteligência do Codebase
31
31
 
32
- <critical>Se `.planning/intel/` existir, a consulta é OBRIGATÓRIA antes de redigir os requisitos. NÃO pule este passo.</critical>
33
- - Execute internamente: `/gsd-intel "convenções, anti-patterns e decision spaces documentados"`
32
+ <critical>Se `.dw/intel/` existir, a consulta via `/dw-intel` é OBRIGATÓRIA antes do review. NÃO pule este passo.</critical>
33
+ - Execute internamente: `/dw-intel "convenções e anti-patterns documentados"`
34
34
  - Priorize findings que violem convenções documentadas
35
- - Verifique se decisões arquiteturais questionáveis são intencionais (documentadas como decision spaces)
35
+ - Verifique se decisões arquiteturais questionáveis são intencionais (documentadas em `.dw/rules/`)
36
36
 
37
- Se `.planning/intel/` NÃO existir:
38
- - Use `.dw/rules/` como contexto (comportamento atual)
37
+ Se `.dw/intel/` NÃO existir:
38
+ - Use `.dw/rules/` como contexto, caindo para grep
39
+ - Sugira rodar `/dw-map-codebase` após o review para enriquecer contexto downstream
39
40
 
40
41
  ## Variáveis de Entrada
41
42
 
@@ -42,12 +42,13 @@
42
42
 
43
43
  ## Inteligência do Codebase
44
44
 
45
- <critical>Se `.planning/intel/` existir, a consulta é OBRIGATÓRIA antes de redigir os requisitos. NÃO pule este passo.</critical>
46
- - Execute internamente: `/gsd-intel "features existentes no domínio de [tópico do PRD]"`
45
+ <critical>Se `.dw/intel/` existir, a consulta via `/dw-intel` é OBRIGATÓRIA antes de redigir os requisitos. NÃO pule este passo.</critical>
46
+ - Execute internamente: `/dw-intel "features existentes no domínio de [tópico do PRD]"`
47
47
  - Use os findings para evitar duplicar funcionalidade existente e referenciar padrões já estabelecidos
48
48
 
49
- Se `.planning/intel/` NÃO existir:
50
- - Use `.dw/rules/` como contexto (comportamento atual)
49
+ Se `.dw/intel/` NÃO existir:
50
+ - Use `.dw/rules/` como contexto, caindo para grep
51
+ - Sugira rodar `/dw-map-codebase` para enriquecer contexto downstream
51
52
 
52
53
  ## Features Multi-Projeto
53
54
 
@@ -29,12 +29,13 @@
29
29
 
30
30
  ## Inteligência do Codebase
31
31
 
32
- <critical>Se `.planning/intel/` existir, a consulta é OBRIGATÓRIA antes de redigir os requisitos. NÃO pule este passo.</critical>
33
- - Execute internamente: `/gsd-intel "padrões arquiteturais e decisões técnicas do projeto"`
32
+ <critical>Se `.dw/intel/` existir, a consulta via `/dw-intel` é OBRIGATÓRIA antes de redigir o techspec. NÃO pule este passo.</critical>
33
+ - Execute internamente: `/dw-intel "padrões arquiteturais e decisões técnicas do projeto"`
34
34
  - Alinhe propostas com padrões existentes; sinalize desvios explicitamente
35
35
 
36
- Se `.planning/intel/` NÃO existir:
37
- - Use `.dw/rules/` como contexto (comportamento atual)
36
+ Se `.dw/intel/` NÃO existir:
37
+ - Use `.dw/rules/` como contexto, caindo para grep
38
+ - Sugira rodar `/dw-map-codebase` para enriquecer contexto downstream
38
39
 
39
40
  ## Fluxograma de Decisão Multi-Projeto
40
41
 
@@ -0,0 +1,149 @@
1
+ <system_instructions>
2
+ Voce e um orquestrador de execucao de fase. Sua funcao e spawnar o agente `dw-executor` (da skill bundled `dw-execute-phase`) para executar cada task em `.dw/spec/prd-<slug>/tasks.md` em waves, com um commit atomico por task. Antes de spawnar o executor, voce DEVE gatear no agente `dw-plan-checker` — execucao nao comeca ate o plan-checker retornar PASS.
3
+
4
+ <critical>NUNCA execute sem PASS do plan-checker. O gate nao e negociavel. Se plan-checker retorna REVISE ou BLOCK, aborte e suba o veredito.</critical>
5
+ <critical>Um commit por task. O executor enforca isso; nao bypasse.</critical>
6
+ <critical>Deviation Rule 3 (conflito arquitetural) aborta a execucao. Nao auto-retry.</critical>
7
+
8
+ ## Quando Usar
9
+
10
+ - Apos `/dw-create-tasks` produzir `tasks.md` e voce quer executar a fase inteira
11
+ - Quando `/dw-autopilot` chega no estagio de execucao
12
+ - Apos resolver issues REVISE de uma rodada anterior do plan-checker
13
+ - NAO para mudancas single-task (use `/dw-run-task`)
14
+ - NAO para scaffolding greenfield (use `/dw-new-project`)
15
+
16
+ ## Posicao no Pipeline
17
+
18
+ **Antecessor:** `/dw-create-tasks` (e opcionalmente `/dw-plan-checker` rodado manualmente antes) | **Sucessor:** `/dw-run-qa` para validar contra PRD, depois `/dw-code-review` e `/dw-generate-pr`
19
+
20
+ ## Skills Complementares
21
+
22
+ | Skill | Gatilho |
23
+ |-------|---------|
24
+ | `dw-execute-phase` | **SEMPRE** — fonte dos agentes `dw-executor` e `dw-plan-checker` e references (`wave-coordination.md`, `plan-verification.md`, `atomic-commits.md`) |
25
+ | `dw-codebase-intel` | Opcional — executor le `.dw/intel/` para fatos do codebase durante implementacao |
26
+ | `dw-verify` | **SEMPRE** — VERIFICATION REPORT apos cada fase concluir (test + lint + build PASS) |
27
+
28
+ ## Variaveis de Entrada
29
+
30
+ | Variavel | Descricao | Exemplo |
31
+ |----------|-----------|---------|
32
+ | `{{PRD_PATH}}` | Caminho da pasta do PRD com `tasks.md` | `.dw/spec/prd-checkout-v2` |
33
+ | `{{START_FROM}}` | Opcional. Resume da task NN (default 01) | `04` |
34
+ | `{{MODE}}` | Opcional. `full` (default), `wave-only N`, `up-to-task NN` | `full` |
35
+
36
+ ## Flags
37
+
38
+ | Flag | Comportamento |
39
+ |------|---------------|
40
+ | (default) | Roda todas as waves ate completar com gate plan-checker |
41
+ | `--skip-check` | PERIGOSO — pula gate plan-checker. So permitido se plan-checker rodou ha <30 min e retornou PASS (audit log do verifier). |
42
+ | `--dry-run` | Roda so plan-checker; nao spawna executor. |
43
+ | `--from <NN>` | Resume da task NN (pula tasks anteriores). Use com `/dw-resume`. |
44
+
45
+ ## Localizacao dos Arquivos
46
+
47
+ - PRD: `{{PRD_PATH}}/prd.md`
48
+ - TechSpec: `{{PRD_PATH}}/techspec.md`
49
+ - Tasks: `{{PRD_PATH}}/tasks.md` (o plano sendo executado)
50
+ - Detalhe por task: `{{PRD_PATH}}/<NN>_task.md`
51
+ - Log de deviations: `{{PRD_PATH}}/deviations.md`
52
+ - Resumo da fase (saida): `{{PRD_PATH}}/SUMMARY.md`
53
+ - Sessao ativa (checkpoint): `{{PRD_PATH}}/active-session.md`
54
+ - Fonte da skill: `.agents/skills/dw-execute-phase/{SKILL.md, agents/*.md, references/*.md}`
55
+
56
+ ## Comportamento Obrigatorio
57
+
58
+ ### Stage 1 — Gate plan-checker
59
+
60
+ Spawne agente `dw-plan-checker` com o caminho do PRD. O agente roda a verificacao de 6 dimensoes (requirement coverage, task completeness, dependency soundness, artifact wiring, context budget, constraint compliance).
61
+
62
+ Tres veredictos possiveis:
63
+
64
+ - **PASS** → segue para Stage 2
65
+ - **REVISE** → aborta. Imprime os issues. Sugere re-rodar `/dw-create-tasks` com os issues como input. Exit status: `PHASE-REVISE-NEEDED`.
66
+ - **BLOCK** → aborta. Imprime issues com citacoes file:line. Exit status: `PHASE-BLOCKED`. Usuario tem que resolver manualmente antes de re-rodar.
67
+
68
+ Se `--skip-check` for passada E existir PASS recente do plan-checker no audit log (em <30 min), pula Stage 1. Caso contrario, rejeita a flag.
69
+
70
+ ### Stage 2 — Dispatch do executor
71
+
72
+ Spawne agente `dw-executor` com:
73
+
74
+ - `prd_path: {{PRD_PATH}}`
75
+ - `start_from: {{START_FROM}}` (default `01`)
76
+ - `mode: {{MODE}}` (default `full`)
77
+ - Bloco `required_reading:` citando `SKILL.md`, `agents/executor.md`, `references/wave-coordination.md`, `references/atomic-commits.md`
78
+
79
+ O executor:
80
+
81
+ 1. Computa waves a partir dos campos `Depends on:`
82
+ 2. Para cada wave, dispatcha subagentes em paralelo (um por task)
83
+ 3. Cada subagente implementa + verifica + commita atomicamente
84
+ 4. Marca `[x]` em `tasks.md` apos cada task commitar
85
+ 5. Escreve `SUMMARY.md` apos a wave final
86
+ 6. Checkpoint em `active-session.md` se budget de contexto chega a 70%
87
+
88
+ ### Stage 3 — Verificacao
89
+
90
+ Apos executor retornar, rode skill `dw-verify`: test + lint + build do projeto inteiro tem que PASSAR.
91
+
92
+ Se verificacao falha → status `PHASE-VERIFICATION-FAILED`. A fase commitou codigo (atomico por task) mas o estado agregado tem issues. Suba para o usuario — provavelmente precisa `/dw-fix-qa` em seguida.
93
+
94
+ ### Stage 4 — Relatorio
95
+
96
+ Imprime:
97
+
98
+ ```
99
+ ## Execucao da Fase Concluida
100
+
101
+ PRD: {{PRD_PATH}}
102
+ Status: <COMPLETE | PARTIAL | CHECKPOINT>
103
+ Tasks: <N> total, <N> commitadas, <N> deviations
104
+ Waves: <N> (largura max: <N>)
105
+ Duracao: <minutos>
106
+ Commit final: <SHA>
107
+
108
+ VERIFICATION REPORT:
109
+ - Lint: PASS/FAIL
110
+ - Tests: PASS/FAIL
111
+ - Build: PASS/FAIL
112
+
113
+ Proximos passos:
114
+ - Rode /dw-run-qa para validar contra criterios de aceitacao do PRD
115
+ - Rode /dw-code-review para o review formal Nivel 3
116
+ - Depois /dw-generate-pr para shippar
117
+ ```
118
+
119
+ ## Regras Criticas
120
+
121
+ - <critical>PASS do plan-checker e gate hard. NUNCA execute sem ele (exceto com `--skip-check` E PASS prio fresco).</critical>
122
+ - <critical>O executor possui o formato de commit. NUNCA post-processe commits deste comando.</critical>
123
+ - <critical>Deviations Rule 3 (conflitos arquiteturais) abortam a fase. Nao auto-retry.</critical>
124
+ - <critical>Checkpoint > push-through. Se o executor faz checkpoint, NAO auto-restart; deixe o usuario invocar `/dw-resume`.</critical>
125
+ - NAO faca push pro remote. `/dw-generate-pr` cuida do push.
126
+ - NAO pule dimensoes no plan-checker via flags. Plan-checker e nao-negociavel.
127
+
128
+ ## Tratamento de Erros
129
+
130
+ - Plan-checker retorna BLOCK → exit `PHASE-BLOCKED`, suba issues, sem auto-replan
131
+ - Executor retorna `EXEC-BLOCKED` (Rule 3 deviation) → exit `PHASE-BLOCKED`, a deviation esta em `deviations.md`
132
+ - Executor retorna `EXEC-PARTIAL` → algumas tasks commitadas, recuperavel via `/dw-resume`
133
+ - Executor retorna `CHECKPOINT` → budget de contexto exausto, `/dw-resume` para continuar
134
+ - Plan-checker timeout (>5 min) → exit status `PLAN-CHECK-TIMEOUT`, sugere reduzir tamanho da fase
135
+
136
+ ## Integracao com Outros dw-* Commands
137
+
138
+ - **`/dw-create-tasks`** — antecessor; produz o `tasks.md` que este comando executa
139
+ - **`/dw-plan-checker`** — invocacao manual do gate (este comando bundles ele)
140
+ - **`/dw-resume`** — restaura de `active-session.md` apos CHECKPOINT
141
+ - **`/dw-run-task`** — roda uma task unica; `/dw-execute-phase` roda a fase inteira
142
+ - **`/dw-run-plan`** — comando antigo; v0.9.0 transforma em alias para este (ambos chamam os mesmos agentes)
143
+ - **`/dw-run-qa`** — sucessor; valida fase implementada contra PRD
144
+
145
+ ## Inspirado em
146
+
147
+ `dw-execute-phase` e dev-workflow-native. O padrao two-stage gate-then-execute, o dispatch wave-based parallel, atomic-commit-per-task, deviation handling, e checkpoint protocol sao adaptados de [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (`/gsd-execute-phase`, `gsd-executor`, `gsd-plan-checker`) por gsd-build (licenca MIT). Especificos do dev-workflow: escreve em `.dw/spec/prd-<slug>/` (nao `.planning/<phase>/`), usa hierarquia PRD/TechSpec/Tasks do dev-workflow, integra com skills `dw-verify` e `dw-codebase-intel`.
148
+
149
+ </system_instructions>
@@ -30,6 +30,9 @@ Você é um assistente de ajuda do workspace. Quando invocado, apresente ao usu
30
30
  | skill, achar skill, instalar skill, ecossistema, capacidade, estender agente | `/dw-find-skills` | Descobre skills no skills.sh / `npx skills` e instala global ou local |
31
31
  | projeto novo, scaffold, bootstrap, comecar, iniciar projeto, fullstack, monorepo | `/dw-new-project` | Entrevista de stack + tools create-* + docker-compose para dev. Roda apos `npx dev-workflow init`. |
32
32
  | dockerize, docker, dockerfile, compose, container, imagem prod, multi-stage | `/dw-dockerize` | Le projeto existente, brainstorm de base, gera Dockerfile + docker-compose para dev/prod/ambos, ou audita artefatos existentes. |
33
+ | mapear codebase, indice intel, code map, knowledge graph, indice queryable | `/dw-map-codebase` | Constroi .dw/intel/ (stack/files/apis/deps/arch) para /dw-intel e outros comandos pararem de re-explorar o codebase. |
34
+ | executar fase, tasks paralelas, wave, dispatch, commits atomicos | `/dw-execute-phase` | Roda uma fase de PRD em waves com commits atomicos por task, deviation handling e gate hard de plan-checker antes de tocar codigo. |
35
+ | plan check, verificar plano, validacao de plano, goal backward | `/dw-plan-checker` | Verificacao goal-backward de tasks.md antes da execucao. PASS / REVISE / BLOCK em 6 dimensoes. |
33
36
  | refinamento, refine, idea, one-pager, ideia | `/dw-brainstorm --onepager` | Refinamento de ideia com Product Inventory + classification (IMPROVES/CONSOLIDATES/NEW) + one-pager durável |
34
37
  | reverter, rollback de task | `/dw-revert-task` | Revert seguro com check de dependências |
35
38
  | hotfix, mudança rápida | `/dw-quick` | Task pontual com garantias sem PRD |
@@ -335,8 +338,8 @@ workspace/
335
338
  **Q: O `/dw-redesign-ui` funciona com Angular?**
336
339
  - Sim. O comando é framework-agnostic. Para React usa react-doctor e `vercel-react-best-practices`; para Angular usa `ng lint` e Angular DevTools. Design visual (`ui-ux-pro-max`) funciona com qualquer framework.
337
340
 
338
- **Q: O que é o GSD e preciso instalar?**
339
- - GSD (get-shit-done-cc) é uma engine opcional que habilita features avançadas: execução paralela, verificação de planos, inteligência do codebase e persistência cross-sessão. Instale com `npx dev-workflow install-deps`. Sem GSD, todos os comandos funcionam normalmente.
341
+ **Q: Como obtenho inteligência do codebase e execução paralela?**
342
+ - Os dois são nativos do dev-workflow desde a v0.9.0. Rode `/dw-map-codebase` para construir o índice queryable em `.dw/intel/`, depois `/dw-intel "<pergunta>"` para consultá-lo. Para execução paralela, `/dw-execute-phase` dispatcha tasks em waves com commits atômicos por task. Sem dependência externa.
340
343
 
341
344
  **Q: O `/dw-quick` substitui o `/dw-run-task`?**
342
345
  - Não. `/dw-quick` é para mudanças pontuais sem PRD. `/dw-run-task` executa tasks de um plano estruturado com PRD e TechSpec.