@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
package/README.md CHANGED
@@ -19,7 +19,7 @@ This will:
19
19
 
20
20
  > **Compozy-inspired disciplines.** Since 0.5.0, dev-workflow bundles three primitives — `dw-verify`, `dw-memory`, `dw-review-rigor` — adapted from the [Compozy](https://github.com/compozy/compozy) project and invoked internally by existing commands. See [docs/compozy-integration.md](docs/compozy-integration.md) for what was ported and what was not.
21
21
 
22
- Optional dependencies (Playwright browsers, react-doctor, GSD):
22
+ Optional dependencies (Playwright browsers, react-doctor, Trivy, Docker):
23
23
  ```bash
24
24
  npx @brunosps00/dev-workflow install-deps
25
25
  ```
@@ -32,7 +32,7 @@ npx @brunosps00/dev-workflow install-deps
32
32
  Facilitates structured ideation before opening a PRD or implementation. Explores multiple directions — conservative, balanced, and bold — with trade-offs for each, then converges on concrete next steps. **Product-aware**: when PRDs or rules exist, automatically reads them to produce a Feature Inventory and tags each option as `[IMPROVES: <feature>]`, `[CONSOLIDATES: <A>+<B>]`, or `[NEW]`. With optional `--onepager` flag, generates a durable one-pager at `.dw/spec/ideas/<slug>.md` that `/dw-create-prd` can consume to reduce clarification questions. Inspired by [`addyosmani/agent-skills@idea-refine`](https://skills.sh/addyosmani/agent-skills/idea-refine), adapted to product-level (features) rather than code-level grounding. No code is written or project files modified by the brainstorm itself.
33
33
 
34
34
  #### `/dw-autopilot`
35
- Full pipeline orchestrator that takes a wish and automatically runs the entire development flow: codebase intelligence, research (conditional), brainstorm, PRD, techspec, tasks, execution, QA, review, and commit. Stops at 3 gates: PRD approval, tasks approval, and PR confirmation. With GSD installed, leverages plan verification and parallel execution.
35
+ Full pipeline orchestrator that takes a wish and automatically runs the entire development flow: codebase intelligence (`/dw-map-codebase` + `/dw-intel`), research (conditional), brainstorm, PRD, techspec, tasks, execution (with `/dw-plan-checker` gate and `/dw-execute-phase` wave-based parallel dispatch), QA, review, and commit. Stops at 3 gates: PRD approval, tasks approval, and PR confirmation.
36
36
 
37
37
  #### `/dw-create-prd`
38
38
  Creates a Product Requirements Document by first asking at least 7 clarification questions to fully understand the feature. Generates a structured PRD with numbered functional requirements focused on what and why, saved to `.dw/spec/prd-[feature-name]/prd.md`.
@@ -49,7 +49,7 @@ Breaks down the PRD and TechSpec into implementable tasks with a target of ~6 ta
49
49
  Executes a single task from the task list, implementing code that follows project patterns and includes mandatory unit tests. Performs Level 1 validation (acceptance criteria + tests + standards check) and creates a commit upon completion.
50
50
 
51
51
  #### `/dw-run-plan`
52
- Executes all pending tasks sequentially and automatically, with Level 1 validation after each task. After all tasks are complete, performs a final Level 2 review (PRD compliance) with an interactive corrections cycle until no gaps remain or the user accepts pending items. With GSD installed, supports plan verification gates and wave-based parallel execution for independent tasks.
52
+ Executes all pending tasks via `/dw-execute-phase`, which gates on `/dw-plan-checker` (6-dimension goal-backward verification) before any code is touched. Wave-based parallel dispatch for independent tasks; atomic commit per task; deviation handling. After all tasks complete, performs a final Level 2 review (PRD compliance) with an interactive corrections cycle until no gaps remain or the user accepts pending items.
53
53
 
54
54
  #### `/dw-bugfix`
55
55
  Analyzes and fixes bugs with automatic triage that distinguishes between bugs, feature requests, and excessive scope. Asks exactly 3 clarification questions before proposing a solution. Supports Direct mode (executes fix immediately) and Analysis mode (`--analysis`) that generates a document for the techspec/tasks pipeline.
@@ -112,13 +112,13 @@ Records an Architecture Decision Record (ADR) for a non-trivial decision during
112
112
  ### Intelligence
113
113
 
114
114
  #### `/dw-resume`
115
- Restores context from the last session by reading pending tasks, recent git history, and active branches. Suggests the next command to execute. With GSD installed, also restores cross-session state from `.planning/STATE.md`.
115
+ Restores context from the last session by reading `.dw/spec/active-session.md` (written by `/dw-execute-phase` at checkpoint), pending tasks, recent git history, and active branches. Suggests the next command to execute.
116
116
 
117
117
  #### `/dw-intel`
118
- Queries codebase intelligence to answer questions about patterns, conventions, and architecture. Uses `.planning/intel/` (if GSD) or `.dw/rules/` as knowledge sources, complemented with direct codebase search. Always cites sources with file paths and line numbers.
118
+ Queries codebase intelligence to answer questions about patterns, conventions, and architecture. Reads `.dw/intel/` (built by `/dw-map-codebase`) as primary source, falls back to `.dw/rules/` and direct grep when absent. Surfaces stale-index warnings (>7 days). Always cites sources with file paths and line numbers.
119
119
 
120
120
  #### `/dw-analyze-project`
121
- Scans the repository to identify tech stack, architectural patterns, naming conventions, and anti-patterns. Generates structured documentation in `.dw/rules/` with a project overview (`index.md`) and per-module rule files containing real code examples. With GSD installed, also creates a queryable index in `.planning/intel/`.
121
+ Scans the repository to identify tech stack, architectural patterns, naming conventions, and anti-patterns. Generates structured documentation in `.dw/rules/` with a project overview (`index.md`) and per-module rule files containing real code examples. Also invokes `/dw-map-codebase` to build the queryable index in `.dw/intel/` (the two are complementary — rules are human-readable, intel is machine-queryable).
122
122
 
123
123
  #### `/dw-deep-research`
124
124
  Conducts multi-source research with citation tracking and verification across quick, standard, deep, and ultradeep modes. Executes parallel information gathering, triangulation, and cross-reference verification through 8+ phases, producing a professional report with complete bibliography.
@@ -149,7 +149,7 @@ Discovers skills from the open agent skills ecosystem (`npx skills` / [skills.sh
149
149
  |
150
150
  /dw-run-task (one at a time)
151
151
  | or
152
- /dw-run-plan (all tasks — parallel with GSD)
152
+ /dw-run-plan (all tasks — wave-based parallel native)
153
153
  |
154
154
  /dw-run-qa --> .dw/spec/prd-{name}/QA/
155
155
  |
@@ -193,8 +193,7 @@ your-project/
193
193
  │ ├── skills/ # Claude Code wrappers
194
194
  │ └── settings.json # MCP servers (Context7, Playwright)
195
195
  ├── .agents/skills/ # Codex/Copilot wrappers + bundled skills
196
- ├── .opencode/commands/ # OpenCode wrappers
197
- └── .planning/ # GSD state (if installed via install-deps)
196
+ └── .opencode/commands/ # OpenCode wrappers
198
197
  ```
199
198
 
200
199
  ## Bundled Skills
@@ -232,8 +231,8 @@ Installed via `npx @brunosps00/dev-workflow install-deps`:
232
231
  | **Playwright** | Browser automation for QA, E2E tests, and visual validation | [playwright.dev](https://playwright.dev/) |
233
232
  | **Context7 MCP** | Contextual documentation lookup for AI assistants | [upstash/context7-mcp](https://github.com/upstash/context7-mcp) |
234
233
  | **react-doctor** | Health score and diagnostics for React projects | [react.doctor](https://www.react.doctor/) |
235
- | **GSD (get-shit-done-cc)** | Optional engine: parallel execution, plan verification, codebase intelligence, cross-session persistence | [gsd-build/get-shit-done](https://github.com/gsd-build/get-shit-done) |
236
234
  | **Trivy** | Native binary scanner used by `/dw-security-check` for CVE, secret, and IaC scanning. `install-deps` detects presence and prints OS-specific install instructions (brew / curl script / choco / Docker) — does not install automatically. | [aquasecurity.github.io/trivy](https://aquasecurity.github.io/trivy/) |
235
+ | **Docker + Docker Compose** | Required by `/dw-new-project` and `/dw-dockerize` for dev dependency seeding and image generation. `install-deps` detects presence and prints OS-specific install instructions — does not install automatically. | [docs.docker.com](https://docs.docker.com/engine/install/) |
237
236
 
238
237
  ## Options
239
238
 
@@ -243,7 +242,7 @@ npx @brunosps00/dev-workflow init --lang=en # English, skip prompt
243
242
  npx @brunosps00/dev-workflow init --lang=pt-br # Portuguese, skip prompt
244
243
  npx @brunosps00/dev-workflow init --force # Overwrite existing files
245
244
  npx @brunosps00/dev-workflow update # Update commands/templates only
246
- npx @brunosps00/dev-workflow install-deps # Install Playwright, react-doctor, GSD
245
+ npx @brunosps00/dev-workflow install-deps # Install Playwright, react-doctor; check Trivy, Docker
247
246
  npx @brunosps00/dev-workflow help # Show help
248
247
  ```
249
248
 
@@ -254,7 +253,12 @@ After running `npx @brunosps00/dev-workflow init`:
254
253
  1. **Run `/dw-analyze-project`** in your AI assistant to generate project rules
255
254
  2. **Run `/dw-brainstorm`** to start planning a new feature
256
255
  3. **Run `/dw-help`** to see all available commands and workflows
257
- 4. **(Optional) Run `npx @brunosps00/dev-workflow install-deps`** for Playwright, react-doctor, and GSD
256
+ 4. **(Optional) Run `npx @brunosps00/dev-workflow install-deps`** to install Playwright + react-doctor and check Trivy + Docker
257
+ 5. **Run `/dw-map-codebase`** once your project has source files to build the queryable index in `.dw/intel/`
258
+
259
+ ## Acknowledgements
260
+
261
+ Codebase intelligence (`/dw-intel`, `/dw-map-codebase`, the `dw-codebase-intel` bundled skill) and phase execution patterns (`/dw-execute-phase`, `/dw-plan-checker`, the `dw-execute-phase` bundled skill) were adapted from [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) by gsd-build (MIT). Schemas (`stack.json`, `files.json`, `apis.json`, `deps.json`, `arch.md`), the goal-backward verification protocol, and the wave-based parallel execution pattern come from there. dev-workflow specifics: `.dw/` namespace instead of `.planning/`, agent-driven runtime instead of `gsd-sdk` CLI, integration with the rest of the `dw-*` command surface.
258
262
 
259
263
  ## License
260
264
 
@@ -30,7 +30,7 @@ const HELP_TEXT = `
30
30
  Preserves: .dw/rules/, .dw/spec/, user data
31
31
  install-deps Install system dependencies (Playwright browsers, MCP servers)
32
32
  uninstall Remove all managed files (commands, templates, wrappers, skills, MCPs)
33
- Preserves: .dw/rules/, .dw/spec/, .planning/ (user data)
33
+ Preserves: .dw/rules/, .dw/spec/, .dw/intel/ (user data)
34
34
  help Show this help message
35
35
 
36
36
  Options:
package/lib/constants.js CHANGED
@@ -13,13 +13,16 @@ const COMMANDS = {
13
13
  { name: 'dw-deep-research', description: 'Researches a topic across sources, tracks citations, and flags claims that don\'t check out.' },
14
14
  { name: 'dw-deps-audit', description: 'Finds outdated and supply-chain-compromised packages, drafts a per-package update plan, and runs scoped QA after each upgrade.' },
15
15
  { name: 'dw-dockerize', description: 'Reads a project, detects the stack and runtime deps, then proposes Dockerfile and docker-compose for dev and prod with explicit trade-offs.' },
16
+ { name: 'dw-execute-phase', description: 'Executes a PRD phase in waves with atomic commits per task, deviation handling, and a hard plan-checker gate before any code is touched.' },
16
17
  { name: 'dw-find-skills', description: 'Searches the npx skills ecosystem for a skill matching what you need, vets it, and installs it where you choose.' },
17
18
  { name: 'dw-fix-qa', description: 'Fixes bugs found in QA and retests them with screenshot evidence until they stay fixed.' },
18
19
  { name: 'dw-functional-doc', description: 'Maps screens and user flows into a functional doc, validated end-to-end with Playwright.' },
19
20
  { name: 'dw-generate-pr', description: 'Pushes the branch and opens a PR with a body that explains what changed and how to test it.' },
20
21
  { name: 'dw-help', description: 'Lists every command and the flows that connect them. Pass a keyword for a contextual shortcut.' },
21
- { name: 'dw-intel', description: 'Answers questions about the codebase using its own rules and intel as the source of truth.' },
22
+ { name: 'dw-intel', description: 'Answers questions about the codebase by querying .dw/intel/ (built by /dw-map-codebase) with .dw/rules/ and grep as fallbacks.' },
23
+ { name: 'dw-map-codebase', description: 'Builds a queryable index in .dw/intel/ (stack, files, apis, deps, arch) so other commands stop re-exploring the codebase.' },
22
24
  { name: 'dw-new-project', description: 'Interviews you about stack and infra, then scaffolds a working monorepo with docker-compose for dev, .env, scripts, CI, and seeded rules.' },
25
+ { name: 'dw-plan-checker', description: 'Goal-backward verification of a phase tasks.md before execution. Returns PASS, REVISE, or BLOCK across 6 dimensions.' },
23
26
  { name: 'dw-quick', description: 'Runs a small, well-defined change with workflow guarantees, no PRD needed.' },
24
27
  { name: 'dw-redesign-ui', description: 'Audits a frontend page, proposes design directions you choose from, then ships the redesign.' },
25
28
  { name: 'dw-refactoring-analysis', description: 'Catalogs code smells in Fowler\'s vocabulary and ranks them by impact, P0 to P3.' },
@@ -46,13 +49,16 @@ const COMMANDS = {
46
49
  { name: 'dw-deep-research', description: 'Pesquisa um topico em varias fontes, rastreia citacoes e marca o que nao confere.' },
47
50
  { name: 'dw-deps-audit', description: 'Encontra pacotes desatualizados e comprometidos por supply-chain, monta plano de update por pacote e roda QA do que foi afetado.' },
48
51
  { name: 'dw-dockerize', description: 'Le um projeto, detecta stack e deps de runtime, e propoe Dockerfile e docker-compose para dev e prod com trade-offs explicitos.' },
52
+ { name: 'dw-execute-phase', description: 'Executa uma fase de PRD em waves com commits atomicos por task, deviation handling e gate hard de plan-checker antes de tocar codigo.' },
49
53
  { name: 'dw-find-skills', description: 'Busca no ecossistema npx skills uma skill que resolva o que voce precisa, valida e instala onde voce escolher.' },
50
54
  { name: 'dw-fix-qa', description: 'Corrige bugs do QA e retesta com evidencia em screenshot ate ficarem estaveis.' },
51
55
  { name: 'dw-functional-doc', description: 'Mapeia telas e fluxos em um dossie funcional, validado E2E com Playwright.' },
52
56
  { name: 'dw-generate-pr', description: 'Faz push da branch e abre um PR com corpo explicando o que mudou e como testar.' },
53
57
  { name: 'dw-help', description: 'Lista todos os commands e os fluxos que os conectam. Passe uma keyword para atalho contextual.' },
54
- { name: 'dw-intel', description: 'Responde perguntas sobre o codebase usando suas proprias rules e intel como fonte.' },
58
+ { name: 'dw-intel', description: 'Responde perguntas sobre o codebase consultando .dw/intel/ (do /dw-map-codebase) com .dw/rules/ e grep como fallback.' },
59
+ { name: 'dw-map-codebase', description: 'Constroi um indice queryable em .dw/intel/ (stack, files, apis, deps, arch) para outros comandos pararem de re-explorar o codebase.' },
55
60
  { name: 'dw-new-project', description: 'Entrevista voce sobre stack e infra, depois faz scaffold de um monorepo com docker-compose para dev, .env, scripts, CI e rules seed.' },
61
+ { name: 'dw-plan-checker', description: 'Verificacao goal-backward de tasks.md de uma fase antes da execucao. Retorna PASS, REVISE ou BLOCK em 6 dimensoes.' },
56
62
  { name: 'dw-quick', description: 'Roda uma mudanca pequena e bem definida com garantias do workflow, sem precisar de PRD.' },
57
63
  { name: 'dw-redesign-ui', description: 'Audita uma pagina frontend, propoe direcoes de design que voce escolhe, e entrega o redesign.' },
58
64
  { name: 'dw-refactoring-analysis', description: 'Cataloga code smells no vocabulario de Fowler e ranqueia por impacto, P0 a P3.' },
package/lib/init.js CHANGED
@@ -4,6 +4,7 @@ const { ensureDir, copyDir, writeFile, log } = require('./utils');
4
4
  const { selectLanguage } = require('./prompts');
5
5
  const { generateWrappers } = require('./wrappers');
6
6
  const { installMCPs } = require('./mcp');
7
+ const { migrate: migrateGsd } = require('./migrate-gsd');
7
8
 
8
9
  const SCAFFOLD_DIR = path.join(__dirname, '..', 'scaffold');
9
10
 
@@ -18,6 +19,11 @@ async function run({ force = false, lang = null, mode = 'init' }) {
18
19
  console.log(`\n dev-workflow ${isUpdate ? 'update' : 'init'}`);
19
20
  console.log(` ${'='.repeat(40)}\n`);
20
21
 
22
+ // 0. GSD migration (idempotent; only runs if legacy GSD artifacts are detected)
23
+ if (isUpdate) {
24
+ migrateGsd(projectRoot);
25
+ }
26
+
21
27
  // 1. Select language
22
28
  const selectedLang = await selectLanguage(lang);
23
29
  console.log(`\n Language: ${selectedLang}\n`);
@@ -20,11 +20,6 @@ function run() {
20
20
  check: null,
21
21
  install: 'npx react-doctor@latest --help',
22
22
  },
23
- {
24
- name: 'GSD (Get Shit Done)',
25
- check: null,
26
- install: 'npx get-shit-done-cc@latest --claude --codex --copilot --opencode --local -y',
27
- },
28
23
  {
29
24
  name: 'Trivy (security scanner)',
30
25
  check: 'trivy --version',
@@ -0,0 +1,164 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ /**
5
+ * One-shot GSD migration. Detects legacy GSD artifacts in a project,
6
+ * migrates the parts dev-workflow now provides natively, and removes
7
+ * the rest.
8
+ *
9
+ * Idempotent: returns silently when nothing to do.
10
+ *
11
+ * Run automatically from lib/init.js when mode === 'update'.
12
+ */
13
+ function migrate(projectRoot) {
14
+ const planning = path.join(projectRoot, '.planning');
15
+ const dotClaude = path.join(projectRoot, '.claude');
16
+ const claudeCmdsGsd = path.join(dotClaude, 'commands', 'gsd');
17
+ const claudeManifest = path.join(dotClaude, 'gsd-file-manifest.json');
18
+
19
+ const hasPlanning = fs.existsSync(planning);
20
+ const hasGsdCmds = fs.existsSync(claudeCmdsGsd);
21
+ const hasGsdManifest = fs.existsSync(claudeManifest);
22
+
23
+ // Detect any gsd-* file in .claude/agents/ or .claude/hooks/
24
+ const gsdAgents = listMatching(path.join(dotClaude, 'agents'), /^gsd-.*\.md$/);
25
+ const gsdHooks = listMatching(path.join(dotClaude, 'hooks'), /^gsd-.*\.(js|cjs|mjs)$/);
26
+
27
+ const detected =
28
+ hasPlanning || hasGsdCmds || hasGsdManifest || gsdAgents.length > 0 || gsdHooks.length > 0;
29
+
30
+ if (!detected) return null; // nothing to migrate
31
+
32
+ console.log('\n GSD legacy artifacts detected — migrating to dev-workflow native namespace.');
33
+
34
+ const stats = {
35
+ intel_files: 0,
36
+ state_migrated: false,
37
+ quick_files: 0,
38
+ threads_files: 0,
39
+ planning_archived: false,
40
+ cmds_removed: false,
41
+ agents_removed: 0,
42
+ hooks_removed: 0,
43
+ manifest_removed: false,
44
+ };
45
+
46
+ // 1. Migrate .planning/intel/* → .dw/intel/*
47
+ if (hasPlanning) {
48
+ const planningIntel = path.join(planning, 'intel');
49
+ if (fs.existsSync(planningIntel)) {
50
+ const dwIntel = path.join(projectRoot, '.dw', 'intel');
51
+ stats.intel_files = copyDirRecursive(planningIntel, dwIntel);
52
+ }
53
+
54
+ // 2. Migrate .planning/STATE.md → .dw/spec/active-session.md
55
+ const stateFile = path.join(planning, 'STATE.md');
56
+ if (fs.existsSync(stateFile)) {
57
+ const target = path.join(projectRoot, '.dw', 'spec', 'active-session.md');
58
+ ensureDir(path.dirname(target));
59
+ fs.copyFileSync(stateFile, target);
60
+ stats.state_migrated = true;
61
+ }
62
+
63
+ // 3. Migrate .planning/quick/* → .dw/spec/quick/*
64
+ const planningQuick = path.join(planning, 'quick');
65
+ if (fs.existsSync(planningQuick)) {
66
+ const dwQuick = path.join(projectRoot, '.dw', 'spec', 'quick');
67
+ stats.quick_files = copyDirRecursive(planningQuick, dwQuick);
68
+ }
69
+
70
+ // 4. Migrate .planning/threads/* → .dw/threads/*
71
+ const planningThreads = path.join(planning, 'threads');
72
+ if (fs.existsSync(planningThreads)) {
73
+ const dwThreads = path.join(projectRoot, '.dw', 'threads');
74
+ stats.threads_files = copyDirRecursive(planningThreads, dwThreads);
75
+ }
76
+
77
+ // 5. Rename .planning/ → .planning.gsd-archive-<DATE>/ (preserve for inspection)
78
+ const date = new Date().toISOString().split('T')[0];
79
+ const archive = path.join(projectRoot, `.planning.gsd-archive-${date}`);
80
+ if (!fs.existsSync(archive)) {
81
+ try {
82
+ fs.renameSync(planning, archive);
83
+ stats.planning_archived = true;
84
+ } catch (err) {
85
+ console.log(` \x1b[33m! Could not rename .planning → ${path.basename(archive)}: ${err.message}\x1b[0m`);
86
+ }
87
+ } else {
88
+ console.log(` \x1b[33m! Archive ${path.basename(archive)} already exists; leaving .planning/ in place\x1b[0m`);
89
+ }
90
+ }
91
+
92
+ // 6. Remove .claude/commands/gsd/
93
+ if (hasGsdCmds) {
94
+ rmRecursive(claudeCmdsGsd);
95
+ stats.cmds_removed = true;
96
+ }
97
+
98
+ // 7. Remove .claude/agents/gsd-*.md
99
+ for (const file of gsdAgents) {
100
+ fs.unlinkSync(path.join(dotClaude, 'agents', file));
101
+ stats.agents_removed++;
102
+ }
103
+
104
+ // 8. Remove .claude/hooks/gsd-*.js
105
+ for (const file of gsdHooks) {
106
+ fs.unlinkSync(path.join(dotClaude, 'hooks', file));
107
+ stats.hooks_removed++;
108
+ }
109
+
110
+ // 9. Remove .claude/gsd-file-manifest.json
111
+ if (hasGsdManifest) {
112
+ fs.unlinkSync(claudeManifest);
113
+ stats.manifest_removed = true;
114
+ }
115
+
116
+ // 10. Print summary
117
+ console.log(' Migration summary:');
118
+ if (stats.intel_files) console.log(` + .dw/intel/ (${stats.intel_files} files migrated from .planning/intel/)`);
119
+ if (stats.state_migrated) console.log(' + .dw/spec/active-session.md (migrated from .planning/STATE.md)');
120
+ if (stats.quick_files) console.log(` + .dw/spec/quick/ (${stats.quick_files} files migrated from .planning/quick/)`);
121
+ if (stats.threads_files) console.log(` + .dw/threads/ (${stats.threads_files} files migrated from .planning/threads/)`);
122
+ if (stats.planning_archived) console.log(` ~ .planning/ (renamed to .planning.gsd-archive-${new Date().toISOString().split('T')[0]}/ — review and delete when ready)`);
123
+ if (stats.cmds_removed) console.log(' - .claude/commands/gsd/ (removed; native /dw-* commands cover the use cases)');
124
+ if (stats.agents_removed) console.log(` - .claude/agents/gsd-*.md (${stats.agents_removed} files removed; native dw-* agents bundled in skills)`);
125
+ if (stats.hooks_removed) console.log(` - .claude/hooks/gsd-*.js (${stats.hooks_removed} files removed; not used by dev-workflow)`);
126
+ if (stats.manifest_removed) console.log(' - .claude/gsd-file-manifest.json (removed)');
127
+ console.log(' Done. Native /dw-intel, /dw-map-codebase, /dw-execute-phase, /dw-plan-checker, /dw-resume now provide what GSD provided.');
128
+ console.log();
129
+
130
+ return stats;
131
+ }
132
+
133
+ function listMatching(dir, regex) {
134
+ if (!fs.existsSync(dir)) return [];
135
+ return fs.readdirSync(dir).filter((name) => regex.test(name));
136
+ }
137
+
138
+ function ensureDir(dir) {
139
+ fs.mkdirSync(dir, { recursive: true });
140
+ }
141
+
142
+ function copyDirRecursive(src, dst) {
143
+ if (!fs.existsSync(src)) return 0;
144
+ ensureDir(dst);
145
+ let count = 0;
146
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
147
+ const srcPath = path.join(src, entry.name);
148
+ const dstPath = path.join(dst, entry.name);
149
+ if (entry.isDirectory()) {
150
+ count += copyDirRecursive(srcPath, dstPath);
151
+ } else if (entry.isFile()) {
152
+ fs.copyFileSync(srcPath, dstPath);
153
+ count++;
154
+ }
155
+ }
156
+ return count;
157
+ }
158
+
159
+ function rmRecursive(target) {
160
+ if (!fs.existsSync(target)) return;
161
+ fs.rmSync(target, { recursive: true, force: true });
162
+ }
163
+
164
+ module.exports = { migrate };
package/lib/uninstall.js CHANGED
@@ -97,14 +97,14 @@ function run() {
97
97
  // 6. Remove legacy .codex/skills/
98
98
  removeDir(path.join(projectRoot, '.codex', 'skills'));
99
99
 
100
- // Note: .dw/rules/, .dw/spec/, .planning/ are USER DATA — never removed
100
+ // Note: .dw/rules/, .dw/spec/, .dw/intel/ are USER DATA — never removed
101
101
  console.log(`\n ${'='.repeat(40)}`);
102
102
  console.log(` Done! ${removed} removed, ${skipped} already absent`);
103
103
  console.log();
104
104
  console.log(' Preserved (user data):');
105
105
  console.log(' .dw/rules/ (project rules)');
106
106
  console.log(' .dw/spec/ (PRDs and specs)');
107
- console.log(' .planning/ (GSD state)');
107
+ console.log(' .dw/intel/ (codebase index from /dw-map-codebase)');
108
108
  console.log();
109
109
  }
110
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
5
5
  "bin": {
6
6
  "dev-workflow": "./bin/dev-workflow.js"
@@ -230,19 +230,14 @@ For each module/project detected, identify:
230
230
  When React is detected, run `npx react-doctor@latest --verbose` and include the health score in the generated rules as a baseline metric.
231
231
  For Angular projects, run `ng lint` and document any warnings as baseline.
232
232
 
233
- <critical>If GSD is installed, running /gsd-map-codebase is MANDATORY. The command CANNOT be considered complete without executing ALL applicable steps, including generating the index in .planning/intel/.</critical>
233
+ <critical>Running /dw-map-codebase to generate the queryable index in .dw/intel/ is MANDATORY. The command CANNOT be considered complete without it.</critical>
234
234
 
235
- #### Codebase Intelligence (GSD)
235
+ #### Codebase Intelligence (native)
236
236
 
237
- If GSD (get-shit-done-cc) is installed in the project:
238
- - After generating rules in `.dw/rules/`, delegate to `/gsd-map-codebase` to create a rich index in `.planning/intel/`
239
- - The index includes: architectural assumptions, decision spaces, behavioral references, UI patterns
240
- - The index is incremental re-running adds to the existing index, does not replace
241
- - Other dw-* commands can query the index via `/gsd-intel` internally
242
-
243
- If GSD is NOT installed:
244
- - Generate only `.dw/rules/` (current behavior)
245
- - Suggest: "For queryable codebase intelligence, install GSD via `npx dev-workflow install-deps`"
237
+ After generating rules in `.dw/rules/`, delegate to `/dw-map-codebase` to create the queryable index in `.dw/intel/`:
238
+ - The index includes: stack (`stack.json`), file graph (`files.json`), API surface (`apis.json`), dependencies (`deps.json`), architecture overview (`arch.md`)
239
+ - The index is incremental `/dw-map-codebase --files <list>` updates only the touched entries; full scan only when needed
240
+ - Other dw-* commands query the index via `/dw-intel` (see the `dw-codebase-intel` bundled skill for schemas)
246
241
 
247
242
  ### Step 4: Detect Code Patterns and Conventions
248
243
 
@@ -68,10 +68,11 @@ If this command is invoked to resume an interrupted autopilot (via `/dw-resume`)
68
68
 
69
69
  ### Step 1: Codebase Intelligence
70
70
 
71
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before starting.</critical>
71
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before starting. Falls back to `.dw/rules/` and direct grep if absent.</critical>
72
72
 
73
- - Query `.planning/intel/` via `/gsd-intel` (if available) or `.dw/rules/` to understand project context
73
+ - Query `.dw/intel/` via `/dw-intel` to understand project context
74
74
  - Identify: tech stack, existing patterns, related features
75
+ - If `.dw/intel/` is absent, suggest running `/dw-map-codebase` first for richer downstream context
75
76
 
76
77
  ### Step 2: Research (Conditional)
77
78
 
@@ -148,7 +149,7 @@ Evaluate whether tasks involve frontend:
148
149
  ### Step 8: Execution
149
150
 
150
151
  Run `/dw-run-plan` with the PRD path.
151
- - Follow ALL command instructions, including GSD integration (plan verification, parallel execution)
152
+ - Follow ALL command instructions, including the native plan-checker gate (PASS required) and wave-based parallel execution via `/dw-execute-phase`
152
153
  - Each task follows `/dw-run-task` with Level 1 validation
153
154
 
154
155
  ### Step 9: Implementation Review (Loop)
@@ -247,17 +248,9 @@ Ask the user: **"Commits completed. Do you want to generate the Pull Request?"**
247
248
  - **YES**: run `/dw-generate-pr` with the target branch
248
249
  - **NO**: inform that commits are ready and the user can generate the PR manually later
249
250
 
250
- ## GSD Integration
251
+ ## Native Engine
251
252
 
252
- <critical>When GSD is installed, ALL GSD integrations from each individual command MUST be executed. The autopilot is not an excuse to skip GSD steps.</critical>
253
-
254
- If GSD (get-shit-done-cc) is installed:
255
- - Step 1: use `/gsd-intel` for querying
256
- - Step 8: use plan verification + parallel execution
257
- - All commands: follow their individual GSD sections
258
-
259
- If GSD is NOT installed:
260
- - All commands work normally without GSD
253
+ The autopilot relies on dev-workflow-native infrastructure for codebase intelligence (`/dw-map-codebase` + `/dw-intel`), plan verification (`/dw-plan-checker`), and parallel execution (`/dw-execute-phase`). All four are bundled and require no external dependencies. See the `dw-codebase-intel` and `dw-execute-phase` bundled skills under `.agents/skills/` for details.
261
254
 
262
255
  ## State Persistence
263
256
 
@@ -65,7 +65,7 @@ Use this command when the user wants to:
65
65
  2. **Reframe as "How Might We"**: turn the raw idea into `How might we [verb] for [user] so that [outcome]?`. This pulls the team out of premature "solution mode".
66
66
  3. **Product Inventory (required if the product exists)**:
67
67
  - If `.dw/spec/prd-*/` has PRDs OR `.dw/rules/index.md` exists, read these artifacts to map the **current product's feature inventory** (product level, not code level).
68
- - Sources to consult: `.dw/spec/prd-*/prd.md` (Overview / Main Features / User Stories sections), `.dw/rules/index.md` and `.dw/rules/<module>.md`, `.planning/intel/` if present.
68
+ - Sources to consult: `.dw/spec/prd-*/prd.md` (Overview / Main Features / User Stories sections), `.dw/rules/index.md` and `.dw/rules/<module>.md`, `.dw/intel/` if present (queryable via `/dw-intel`).
69
69
  - Produce a **short Feature Inventory (5-12 bullets)** before diverging: "the product today does X, Y, Z".
70
70
  - If the project is greenfield (no PRDs or rules), record: "Feature Inventory: greenfield — no product artifacts yet".
71
71
  4. If essential context is missing for the user (problem, persona, expected value), ask short and objective questions before expanding.
@@ -29,13 +29,14 @@ When available in the project under `./.agents/skills/`, use these skills as ana
29
29
 
30
30
  ## Codebase Intelligence
31
31
 
32
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before writing requirements. Do NOT skip this step.</critical>
33
- - Internally run: `/gsd-intel "documented conventions, anti-patterns, and decision spaces"`
32
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before reviewing. Do NOT skip this step.</critical>
33
+ - Internally run: `/dw-intel "documented conventions and anti-patterns"`
34
34
  - Prioritize findings that violate documented conventions
35
- - Check if questionable architectural decisions are intentional (documented as decision spaces)
35
+ - Check if questionable architectural decisions are intentional (documented in `.dw/rules/`)
36
36
 
37
- If `.planning/intel/` does NOT exist:
38
- - Use `.dw/rules/` as context (current behavior)
37
+ If `.dw/intel/` does NOT exist:
38
+ - Use `.dw/rules/` as context, falling back to grep
39
+ - Suggest running `/dw-map-codebase` after the review for richer downstream context
39
40
 
40
41
  ## Input Variables
41
42
 
@@ -42,12 +42,13 @@
42
42
 
43
43
  ## Codebase Intelligence
44
44
 
45
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before writing requirements. Do NOT skip this step.</critical>
46
- - Internally run: `/gsd-intel "existing features in the [PRD topic] domain"`
45
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before writing requirements. Do NOT skip this step.</critical>
46
+ - Internally run: `/dw-intel "existing features in the [PRD topic] domain"`
47
47
  - Use findings to avoid duplicating existing functionality and reference established patterns
48
48
 
49
- If `.planning/intel/` does NOT exist:
50
- - Use `.dw/rules/` as context (current behavior)
49
+ If `.dw/intel/` does NOT exist:
50
+ - Use `.dw/rules/` as context, falling back to grep
51
+ - Suggest running `/dw-map-codebase` for richer downstream context
51
52
 
52
53
  ## Multi-Project Features
53
54
 
@@ -29,12 +29,13 @@
29
29
 
30
30
  ## Codebase Intelligence
31
31
 
32
- <critical>If `.planning/intel/` exists, querying it is MANDATORY before writing requirements. Do NOT skip this step.</critical>
33
- - Internally run: `/gsd-intel "architectural patterns and technical decisions in the project"`
32
+ <critical>If `.dw/intel/` exists, querying it via `/dw-intel` is MANDATORY before writing the techspec. Do NOT skip this step.</critical>
33
+ - Internally run: `/dw-intel "architectural patterns and technical decisions in the project"`
34
34
  - Align proposals with existing patterns; flag deviations explicitly
35
35
 
36
- If `.planning/intel/` does NOT exist:
37
- - Use `.dw/rules/` as context (current behavior)
36
+ If `.dw/intel/` does NOT exist:
37
+ - Use `.dw/rules/` as context, falling back to grep
38
+ - Suggest running `/dw-map-codebase` to enrich downstream context
38
39
 
39
40
  ## Multi-Project Decision Flowchart
40
41