@brunosps00/dev-workflow 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,24 +19,24 @@ 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, Trivy, Semgrep, gitleaks, Docker):
22
+ Optional dependencies (Playwright browsers, react-doctor, Trivy, Semgrep, gitleaks, syft, Docker):
23
23
  ```bash
24
24
  npx @brunosps00/dev-workflow install-deps
25
25
  ```
26
26
 
27
27
  ## Commands
28
28
 
29
- dev-workflow v1.0.6 ships **31 commands** organized into four tiers. Most users only invoke Tier 1 + Tier 2.
29
+ dev-workflow v1.1.1 ships **31 commands** organized into four tiers. Most users only invoke Tier 1 + Tier 2.
30
30
 
31
31
  ### Tier 1 — Gateway (3)
32
32
 
33
33
  | Command | When |
34
34
  |---------|------|
35
- | **`/dw-autopilot "wish"`** | Default entry point in two invocations. First run completes PRD → TechSpec → Tasks and stops. Second run resumes from state, executes `/dw-goal --from-autopilot <slug>` for Run → Review → QA/Fix → Review, then Commit → PR. |
35
+ | **`/dw-autopilot "wish"`** | Default entry point in two invocations. First run completes PRD → TechSpec → Tasks and stops. Second run resumes from state, executes `/dw-goal --from-autopilot <slug>` for Run → Review → QA/Fix → Review, then Security Gate → Commit → PR. |
36
36
  | **`/dw-bugfix "description"`** | A bug report or pasted error. Triages bug-vs-feature-vs-scope, surgical fix or routes to a PRD. |
37
37
  | **`/dw-help [keyword]`** | Discover commands. Pass a keyword for shortcuts; `--advanced` reveals internal commands. |
38
38
 
39
- ### Tier 2 — Pipeline granular (7)
39
+ ### Tier 2 — Pipeline granular (9)
40
40
 
41
41
  Use these when you want step-by-step control instead of `/dw-autopilot`.
42
42
 
@@ -52,13 +52,13 @@ Use these when you want step-by-step control instead of `/dw-autopilot`.
52
52
  | **`/dw-commit`** | Atomic Conventional Commits for pending changes. Applies `dw-git-discipline` (one intent per commit, lint+tests+build green before). |
53
53
  | **`/dw-generate-pr [target]`** | Push the branch, draft a PR body with summary + test plan, open the browser. Hard gates: dw-verify PASS + secure-audit. |
54
54
 
55
- ### Tier 3 — Specialty (8)
55
+ ### Tier 3 — Specialty (10)
56
56
 
57
57
  | Command | What |
58
58
  |---------|------|
59
- | **`/dw-analyze-project`** | Scans the repo, writes `.dw/rules/` (per-module conventions, anti-patterns, naming). Step 8 offers to generate `.dw/constitution.md` (declarative principles the team commits to). Step 9 generates `.dw/rules/concerns.md` (risk map: hot spots, fragile integrations, hostile code, bug history). Run once per project; refresh after major refactors. |
60
- | **`/dw-redesign-ui "target"`** | Audits a frontend page, runs the `dw-ui-discipline` 4-question grounding, proposes 2-3 design directions, ships the redesign. WCAG 2.2 AA accessibility floor is non-negotiable. |
61
- | **`/dw-functional-doc`** | Maps screens + user flows into a functional doc, validated end-to-end with Playwright. |
59
+ | **`/dw-analyze-project`** | Scans the repo, writes `.dw/rules/` (per-module conventions, anti-patterns, naming). Step 8 offers `.dw/constitution.md`; Step 9 writes `.dw/rules/concerns.md`; Step 10 can synthesize a frontend `DESIGN.md` from existing tokens. Run once per project; refresh after major refactors. |
60
+ | **`/dw-redesign-ui "target"`** | Audits a frontend page, runs the `dw-ui-discipline` 4-question grounding, proposes 2-3 design directions, ships the redesign. WCAG 2.2 AA accessibility floor is non-negotiable; UI diffs can also run the deterministic impeccable slop detector. |
61
+ | **`/dw-functional-doc`** | Maps screens + user flows into a functional doc, validated end-to-end with Playwright. Uses the WSL-resilient browser resolver and can capture guided functional video evidence. |
62
62
  | **`/dw-context-budget`** | Audits context overhead from commands, skills, agents, instruction files, and MCPs. |
63
63
  | **`/dw-harness-audit`** | Deterministic health scorecard for the dev-workflow install, agents, wrappers, MCPs, and gates. |
64
64
  | **`/dw-skill-health`** | Audits installed skills and agents for bloat, duplication, and missing references. |
@@ -75,7 +75,7 @@ These are auto-invoked by Tier 1-3 commands. Available standalone via `/dw-help
75
75
  |---------|------|------------|
76
76
  | **`/dw-adr "decision"`** | Records an Architecture Decision Record at `.dw/spec/<prd>/adrs/`. | `/dw-plan techspec --council`; deviations from constitution |
77
77
  | **`/dw-intel "question"`** | Query codebase intelligence (`.dw/intel/`). `--build` (re)creates the index. | `/dw-plan`, `/dw-review`, `/dw-bugfix` |
78
- | **`/dw-secure-audit`** | **Security Gate** (phase after review/QA, before commit/PR): OWASP + Semgrep SAST (diff/generated code) + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain + outdated. Rigoroso: secrets/CRITICAL/HIGH block (secrets have no ADR escape). Flags: `--scan-only`, `--plan`, `--execute`. See [docs/security-gate.md](docs/security-gate.md). | `/dw-autopilot` (explicit step), enforced by `/dw-generate-pr` |
78
+ | **`/dw-secure-audit`** | **Security Gate** (phase after review/QA, before commit/PR): OWASP + Semgrep SAST (diff/generated code) + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain + outdated. Rigoroso: secrets/CRITICAL/HIGH block (secrets have no ADR escape). Flags: `--scan-only`, `--plan`, `--execute`. See [docs/security-gate.md](docs/security-gate.md). | `/dw-review`, `/dw-autopilot` (explicit step), enforced by `/dw-generate-pr` |
79
79
  | **`/dw-goal "<objective>"`** | Durable objective contract. Uses Codex native `/goal` when available and `.dw/goals/` everywhere for Codex, Copilot, Claude Code, and OpenCode. | `/dw-autopilot` after planning |
80
80
  | **`/dw-find-skills "query"`** | Searches `npx skills` ecosystem, vets, installs. | manual when extending the bundle |
81
81
  | **`/dw-update`** | Updates dev-workflow to latest npm release with rollback snapshot. | manual maintenance |
@@ -87,17 +87,17 @@ These are auto-invoked by Tier 1-3 commands. Available standalone via `/dw-help
87
87
 
88
88
  ```
89
89
  /dw-autopilot "wish" ------> First invocation: PRD → TechSpec → Tasks → STOP
90
- /dw-autopilot ------> Second invocation: /dw-goal → Commit → PR
90
+ /dw-autopilot ------> Second invocation: /dw-goal → Security Gate → Commit → PR
91
91
  --- OR step-by-step ---
92
92
 
93
93
  /dw-brainstorm --> /dw-plan --> .dw/spec/prd-{name}/{prd,techspec,tasks}.md
94
94
  |
95
- /dw-goal --> /dw-run → /dw-review → /dw-qa → /dw-review
95
+ /dw-goal --> /dw-run → /dw-review → /dw-qa → /dw-review → /dw-secure-audit
96
96
  |
97
97
  /dw-commit + /dw-generate-pr
98
98
 
99
99
  Manual alternative after /dw-plan:
100
- /dw-run → /dw-review → /dw-qa → /dw-review → /dw-commit → /dw-generate-pr
100
+ /dw-run → /dw-review → /dw-qa → /dw-review → /dw-secure-audit → /dw-commit → /dw-generate-pr
101
101
 
102
102
  Shortcuts:
103
103
  /dw-intel "question" Query codebase intelligence
@@ -116,19 +116,30 @@ A **constitution** is a declarative list of principles your team commits to (e.g
116
116
  **How it works:**
117
117
 
118
118
  - `/dw-analyze-project` offers three paths: synthesize from observed patterns (with your approval), install canonical defaults, or skip.
119
- - If `/dw-create-prd`, `/dw-create-techspec`, or `/dw-code-review` run **without** a constitution, they auto-install the defaults template (10 canonical principles at `severity: info`), notify in chat, and continue. Ausência nunca bloqueia.
119
+ - If `/dw-plan` or `/dw-review` run **without** a constitution, they auto-install the defaults template (10 canonical principles at `severity: info`), notify in chat, and continue. Ausência nunca bloqueia.
120
120
  - Once principles exist:
121
121
  - `severity: info` → reported, never blocks.
122
122
  - `severity: high` → blocks PR/techspec when violated, unless an ADR justifies the deviation.
123
123
  - `severity: critical` → blocks plus requires reviewer sign-off in the ADR.
124
124
  - Defaults start at `info`; you promote severities as your team trusts enforcement.
125
125
 
126
- **Tasks consistency check.** At the end of `/dw-create-tasks`, a 5-dimension consistency check validates PRD ↔ TechSpec ↔ Tasks alignment (FR coverage, task grounding, test coverage, dependency DAG, constitution alignment) and writes `.dw/spec/prd-<feature>/tasks-validation.md`. Any FAIL blocks user approval until resolved or explicitly overridden.
126
+ **Tasks consistency check.** At the end of `/dw-plan tasks`, a 5-dimension consistency check validates PRD ↔ TechSpec ↔ Tasks alignment (FR coverage, task grounding, test coverage, dependency DAG, constitution alignment) and writes `.dw/spec/prd-<feature>/tasks-validation.md`. Any FAIL blocks user approval until resolved or explicitly overridden.
127
127
 
128
128
  ## Template Overrides
129
129
 
130
130
  Customize templates locally without losing dev-workflow updates. Drop a file at `.dw/templates/overrides/<name>.md`; the override is used in place of the bundled core template on every `update`. Subdirectories work too (e.g., `.dw/templates/overrides/functional-doc/e2e-runbook.md`). See `.dw/templates/overrides/README.md` (created on init) for the workflow and `diff` cadence guidance.
131
131
 
132
+ ## Post-Update Actions
133
+
134
+ `dev-workflow update` refreshes managed files only: commands, templates, references, scripts, bundled skills, wrappers, agents, and MCP config. It does **not** overwrite project-derived docs such as `.dw/rules/`, `.dw/constitution.md`, `.dw/rules/concerns.md`, `.dw/intel/`, or frontend `DESIGN.md`.
135
+
136
+ After an update, the CLI prints **Post-update agent actions**. When `/dw-update` runs inside an agent, it should execute the listed commands in order:
137
+
138
+ 1. `/dw-analyze-project` when project-derived docs are missing or need refresh; this owns `.dw/rules/`, constitution, concerns map, and frontend `DESIGN.md`.
139
+ 2. `/dw-intel --build` when the codebase index is missing or stale.
140
+ 3. `/dw-harness-audit` to validate the install after managed files changed.
141
+ 4. `/dw-skill-health` to inspect refreshed skills and agents.
142
+
132
143
  ## Auto-Trigger (CLAUDE.md / AGENTS.md)
133
144
 
134
145
  `dev-workflow init` seeds two files at the project root with the same content: `CLAUDE.md` (read by Claude Code) and `AGENTS.md` (read by Codex CLI, Copilot CLI, and OpenCode). Together they tell the agent **when to invoke each `dw-*` command without being explicitly asked**.
@@ -188,6 +199,8 @@ your-project/
188
199
  │ ├── scripts/ # Utility scripts
189
200
  │ ├── spec/ # PRD directories — each contains tasks-validation.md
190
201
  │ ├── bugfixes/ # Persistent bugfix records: NNN-<slug>/{TASK.md, SUMMARY.md, fix-report.md} + review/, QA/
202
+ │ ├── goals/ # Durable goal state used by /dw-goal and /dw-autopilot
203
+ │ ├── secure-audit/ # Security Gate summaries and per-layer reports
191
204
  │ ├── subtasks/ # Local ephemeral subagent input packets and handoffs (pending/archive ignored by Git)
192
205
  │ └── STATE.md # Session state: Decisions, Blockers, Todos, Open Loops, Deferred Ideas, Lessons, Preferences (managed by /dw-pause + /dw-resume)
193
206
  ├── CLAUDE.md # Auto-trigger decision tree for Claude Code (merge-aware, includes Auto-Sizing Matrix)
@@ -224,6 +237,7 @@ Subagent handoffs use local packets under `.dw/subtasks/`:
224
237
  npx @brunosps00/dev-workflow subtask create --agent=dw-code-explorer --goal="Map the auth flow"
225
238
  npx @brunosps00/dev-workflow subtask complete --slug=<slug> --file=<handoff.md>
226
239
  npx @brunosps00/dev-workflow subtask consume
240
+ npx @brunosps00/dev-workflow subtask list
227
241
  ```
228
242
 
229
243
  ## Bundled Skills
@@ -245,15 +259,15 @@ These are not slash commands — they are primitives other commands call to enfo
245
259
 
246
260
  | Skill | Description | Invoked by | Inspired by |
247
261
  |-------|-------------|------------|-------------|
248
- | **dw-verify** | Enforces fresh verification evidence before any completion, commit, or PR claim — with Iron Law, gate function, and Verification Report template | `dw-run-task`, `dw-run-plan`, `dw-fix-qa`, `dw-bugfix`, `dw-code-review`, `dw-generate-pr` | [Compozy](https://github.com/compozy/compozy) `cy-final-verify` |
249
- | **dw-memory** | Two-tier workflow memory (shared `MEMORY.md` + per-task `<N>_memory.md`) with promotion test and compaction rules, so cross-task context persists cleanly | `dw-run-task`, `dw-run-plan`, `dw-autopilot` | [Compozy](https://github.com/compozy/compozy) `cy-workflow-memory` |
250
- | **dw-review-rigor** | Review discipline: de-duplication, severity ordering, verify-intent-before-flagging, skip-linter-issues, signal-over-volume | `dw-code-review`, `dw-review-implementation`, `dw-refactoring-analysis` | [Compozy](https://github.com/compozy/compozy) `cy-review-round` |
251
- | **dw-council** | Multi-advisor debate (3-5 archetypes) with steel-manning, concession tracking, and dissent-preserving synthesis. Opt-in only. | `dw-brainstorm --council`, `dw-create-techspec --council` | [Compozy](https://github.com/compozy/compozy) `cy-idea-factory` |
252
- | **dw-codebase-intel** | Codebase intelligence (`stack.json`, `files.json`, `apis.json`, `deps.json`, `arch.md`) with incremental updates and query patterns. Cross-cutting reference: `api-design-discipline` (Hyrum's Law, contract-first, error semantics) used when techspecs design API endpoints. | `/dw-intel`, `/dw-map-codebase`, `dw-create-techspec` | [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (MIT) + [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
253
- | **dw-execute-phase** | Goal-backward 6-dimension plan verification (`plan-checker`) and wave-based parallel task execution (`executor`) with atomic commit, deviation handling, and checkpoint recovery | `dw-run-plan`, `dw-autopilot` | [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (MIT) |
254
- | **dw-source-grounding** | Detect → Fetch → Implement → Cite protocol with `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]` citations. Strict source-priority hierarchy (Tier 1 official docs > Tier 2 maintainer blogs > Tier 3 Stack Overflow as discovery only). | `dw-create-techspec`, `dw-deps-audit`, `dw-deep-research` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
255
- | **dw-simplification** | Chesterton's Fence (understand WHY before changing), behavior-preserving refactor protocol (test gate before/after), complexity metrics (cyclomatic, cognitive, depth, fan-out), Rule of 500 for large refactors | `dw-code-review`, `dw-refactoring-analysis` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
256
- | **dw-debug-protocol** | Stop-the-line discipline plus six-step triage (Reproduce → Localize → Reduce → Fix Root Cause → Guard → Verify End-to-End). Error categorization matrix; instrument-first non-reproducible-bug strategy. | `dw-bugfix`, `dw-fix-qa` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
262
+ | **dw-verify** | Enforces fresh verification evidence before any completion, commit, or PR claim — with Iron Law, gate function, and Verification Report template | `/dw-run`, `/dw-goal`, `/dw-qa --fix`, `/dw-bugfix`, `/dw-review`, `/dw-generate-pr` | [Compozy](https://github.com/compozy/compozy) `cy-final-verify` |
263
+ | **dw-memory** | Two-tier workflow memory (shared `MEMORY.md` + per-task `<N>_memory.md`) with promotion test and compaction rules, so cross-task context persists cleanly | `/dw-run`, `/dw-goal`, `/dw-autopilot`, `/dw-pause`, `/dw-resume` | [Compozy](https://github.com/compozy/compozy) `cy-workflow-memory` |
264
+ | **dw-review-rigor** | Review discipline: de-duplication, severity ordering, verify-intent-before-flagging, skip-linter-issues, signal-over-volume | `/dw-review`, `/dw-brainstorm --refactor` | [Compozy](https://github.com/compozy/compozy) `cy-review-round` |
265
+ | **dw-council** | Multi-advisor debate (3-5 archetypes) with steel-manning, concession tracking, and dissent-preserving synthesis. Opt-in only. | `/dw-brainstorm --council`, `/dw-plan techspec --council` | [Compozy](https://github.com/compozy/compozy) `cy-idea-factory` |
266
+ | **dw-codebase-intel** | Codebase intelligence (`stack.json`, `files.json`, `apis.json`, `deps.json`, `arch.md`) with incremental updates and query patterns. Cross-cutting reference: `api-design-discipline` (Hyrum's Law, contract-first, error semantics) used when techspecs design API endpoints. | `/dw-intel`, `/dw-intel --build`, `/dw-plan techspec` | [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (MIT) + [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
267
+ | **dw-execute-phase** | Goal-backward 6-dimension plan verification (`plan-checker`) and wave-based parallel task execution (`executor`) with atomic commit, deviation handling, and checkpoint recovery | `/dw-run`, `/dw-goal`, `/dw-autopilot` | [`get-shit-done-cc`](https://github.com/gsd-build/get-shit-done) (MIT) |
268
+ | **dw-source-grounding** | Detect → Fetch → Implement → Cite protocol with `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]` citations. Strict source-priority hierarchy (Tier 1 official docs > Tier 2 maintainer blogs > Tier 3 Stack Overflow as discovery only). | `/dw-plan techspec`, `/dw-secure-audit --plan`, `/dw-brainstorm --research` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
269
+ | **dw-simplification** | Chesterton's Fence (understand WHY before changing), behavior-preserving refactor protocol (test gate before/after), complexity metrics (cyclomatic, cognitive, depth, fan-out), Rule of 500 for large refactors | `/dw-review`, `/dw-brainstorm --refactor` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
270
+ | **dw-debug-protocol** | Stop-the-line discipline plus six-step triage (Reproduce → Localize → Reduce → Fix Root Cause → Guard → Verify End-to-End). Error categorization matrix; instrument-first non-reproducible-bug strategy. | `/dw-bugfix`, `/dw-qa --fix` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
257
271
  | **dw-git-discipline** | Trunk-based pattern (1-3 day branches, daily rebase, feature flags), atomic commit discipline (one intent per commit; refactor separate from feature), Conventional Commits, branch hygiene | `dw-commit`, `dw-generate-pr` | [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) (MIT) |
258
272
 
259
273
  ### Domain expertise
@@ -278,7 +292,10 @@ Installed via `npx @brunosps00/dev-workflow install-deps`:
278
292
  | **Playwright** | Browser automation for QA, E2E tests, and visual validation | [playwright.dev](https://playwright.dev/) |
279
293
  | **Context7 MCP** | Contextual documentation lookup for AI assistants | [upstash/context7-mcp](https://github.com/upstash/context7-mcp) |
280
294
  | **react-doctor** | Health score and diagnostics for React projects | [react.doctor](https://www.react.doctor/) |
281
- | **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/) |
295
+ | **Trivy** | Native binary scanner used by `/dw-secure-audit` 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/) |
296
+ | **Semgrep** | SAST layer for `/dw-secure-audit`, focused on generated-code diffs with pinned security rulesets. `install-deps` detects presence and prints OS-specific install instructions. | [semgrep.dev](https://semgrep.dev/) |
297
+ | **gitleaks** | Dedicated secret scanner for `/dw-secure-audit`; any confirmed secret blocks without ADR exception. `install-deps` detects presence and prints OS-specific install instructions. | [github.com/gitleaks/gitleaks](https://github.com/gitleaks/gitleaks) |
298
+ | **syft** | Optional SBOM/license inventory layer for `/dw-secure-audit`; advisory and non-blocking. `install-deps` detects presence and prints OS-specific install instructions. | [github.com/anchore/syft](https://github.com/anchore/syft) |
282
299
  | **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/) |
283
300
 
284
301
  ## Options
@@ -288,12 +305,17 @@ npx @brunosps00/dev-workflow init # Interactive languag
288
305
  npx @brunosps00/dev-workflow init --lang=en # English, skip prompt
289
306
  npx @brunosps00/dev-workflow init --lang=pt-br # Portuguese, skip prompt
290
307
  npx @brunosps00/dev-workflow init --force # Overwrite existing files
291
- npx @brunosps00/dev-workflow update # Update commands/templates only
292
- npx @brunosps00/dev-workflow install-deps # Install Playwright, react-doctor; check Trivy, Docker
308
+ npx @brunosps00/dev-workflow update # Update managed files + print post-update agent actions
309
+ npx @brunosps00/dev-workflow list-installed # Show managed install state
310
+ npx @brunosps00/dev-workflow doctor # Check wrappers, agents, skills, MCPs, gates
311
+ npx @brunosps00/dev-workflow repair # Reconcile managed files from recorded install state
312
+ npx @brunosps00/dev-workflow install-deps # Install Playwright, react-doctor; check security scanners + Docker
313
+ npx @brunosps00/dev-workflow setup-wsl-browser # WSL NAT: build CDP relay + add Hyper-V firewall rule
293
314
  npx @brunosps00/dev-workflow install-azure-skills # Opt-in: Azure skills + Microsoft Learn MCP
294
315
  npx @brunosps00/dev-workflow install-azure-skills --products=azure-aks,azure-openai # Subset override
295
316
  npx @brunosps00/dev-workflow install-aws-skills # Opt-in: AWS skills + AWS MCP Server (needs uv + aws cli + creds)
296
317
  npx @brunosps00/dev-workflow install-aws-skills --region=eu-central-1 # Region override
318
+ npx @brunosps00/dev-workflow uninstall # Remove managed files while preserving user data
297
319
  npx @brunosps00/dev-workflow help # Show help
298
320
  ```
299
321
 
@@ -304,12 +326,12 @@ After running `npx @brunosps00/dev-workflow init`:
304
326
  1. **Run `/dw-analyze-project`** in your AI assistant to generate project rules
305
327
  2. **Run `/dw-brainstorm`** to start planning a new feature
306
328
  3. **Run `/dw-help`** to see all available commands and workflows
307
- 4. **(Optional) Run `npx @brunosps00/dev-workflow install-deps`** to install Playwright + react-doctor and check Trivy + Docker
308
- 5. **Run `/dw-map-codebase`** once your project has source files to build the queryable index in `.dw/intel/`
329
+ 4. **(Optional) Run `npx @brunosps00/dev-workflow install-deps`** to install Playwright + react-doctor and check Trivy/Semgrep/gitleaks/syft + Docker
330
+ 5. **Run `/dw-intel --build`** once your project has source files to build the queryable index in `.dw/intel/`
309
331
 
310
332
  ## Acknowledgements
311
333
 
312
- Codebase intelligence (`/dw-intel`, `/dw-map-codebase`, the `dw-codebase-intel` bundled skill) and phase execution patterns (the `dw-execute-phase` bundled skill, with its `plan-checker` and `executor` agents) 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.
334
+ Codebase intelligence (`/dw-intel`, `/dw-intel --build`, the `dw-codebase-intel` bundled skill) and phase execution patterns (the `dw-execute-phase` bundled skill, with its `plan-checker` and `executor` agents) 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.
313
335
 
314
336
  Source-driven development, code simplification, debugging discipline, and git workflow patterns adapted from [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) by Addy Osmani (MIT) into the bundled `dw-source-grounding`, `dw-simplification`, `dw-debug-protocol`, and `dw-git-discipline` skills. Performance-optimization workflow (`vercel-react-best-practices/references/perf-discipline.md`) and API-design discipline (`dw-codebase-intel/references/api-design-discipline.md`) also incorporated as enhancements to existing bundled skills. Browser security-boundary and three-workflow-patterns (originally from `addyosmani/agent-skills/browser-devtools`) now live inside `dw-testing-discipline/references/`.
315
337
 
@@ -40,6 +40,7 @@ const HELP_TEXT = `
40
40
  Commands:
41
41
  init Scaffold .dw/ (commands, templates, references, scripts, skills, rules, MCPs)
42
42
  update Update managed files (commands, templates, references, scripts, skills, wrappers, MCPs)
43
+ and print post-update agent actions for project-derived docs/health checks
43
44
  Preserves: .dw/rules/, .dw/spec/, .dw/bugfixes/, .dw/STATE.md, .agents/skills/azure/, user data
44
45
  list-installed Show dev-workflow install state for this project
45
46
  doctor Check managed files, wrappers, agents, and MCP configuration
package/lib/init.js CHANGED
@@ -10,6 +10,7 @@ const { migrate: migrateSkills } = require('./migrate-skills');
10
10
  const { hasExistingInstall, readInstallState, writeInstallState, listManagedFiles } = require('./install-state');
11
11
  const { resolveInstallSelection } = require('./profiles');
12
12
  const { ensureSubtaskLayout } = require('./subtasks');
13
+ const { printPostUpdateActions } = require('./post-update');
13
14
 
14
15
  const SCAFFOLD_DIR = path.join(__dirname, '..', 'scaffold');
15
16
 
@@ -315,10 +316,19 @@ async function run({ force = false, lang = null, mode = 'init', profile = null,
315
316
  console.log(` ${'='.repeat(40)}`);
316
317
  console.log(` Done! ${totalCreated} created, ${totalSkipped} skipped, ${totalOverwritten} overwritten`);
317
318
  console.log();
319
+ if (isUpdate) {
320
+ printPostUpdateActions(projectRoot);
321
+ }
318
322
  console.log(' Next steps:');
319
- console.log(' 1. Run /dw-analyze-project to generate project rules');
320
- console.log(' 2. Run /dw-brainstorm to start a new feature');
321
- console.log(' 3. Run /dw-help to see all available commands');
323
+ if (isUpdate) {
324
+ console.log(' 1. If running inside an agent, run the post-update actions now');
325
+ console.log(' 2. Otherwise reload/restart the agent session before invoking them');
326
+ console.log(' 3. Run /dw-help to see all available commands');
327
+ } else {
328
+ console.log(' 1. Run /dw-analyze-project to generate project rules');
329
+ console.log(' 2. Run /dw-brainstorm to start a new feature');
330
+ console.log(' 3. Run /dw-help to see all available commands');
331
+ }
322
332
  console.log();
323
333
  }
324
334
 
@@ -124,7 +124,7 @@ function migrate(projectRoot) {
124
124
  if (stats.agents_removed) console.log(` - .claude/agents/gsd-*.md (${stats.agents_removed} files removed; native dw-* agents bundled in skills)`);
125
125
  if (stats.hooks_removed) console.log(` - .claude/hooks/gsd-*.js (${stats.hooks_removed} files removed; not used by dev-workflow)`);
126
126
  if (stats.manifest_removed) console.log(' - .claude/gsd-file-manifest.json (removed)');
127
- console.log(' Done. Native /dw-intel, /dw-map-codebase, /dw-run-plan (with bundled phase-execution agents) now provide what GSD provided.');
127
+ console.log(' Done. Native /dw-intel, /dw-intel --build, and /dw-run (with bundled phase-execution agents) now provide what GSD provided.');
128
128
  console.log();
129
129
 
130
130
  return stats;
@@ -0,0 +1,153 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const SKIP_DIRS = new Set([
5
+ '.git',
6
+ '.dw',
7
+ '.agents',
8
+ '.claude',
9
+ '.codex',
10
+ '.github',
11
+ '.opencode',
12
+ 'node_modules',
13
+ 'dist',
14
+ 'build',
15
+ 'coverage',
16
+ '.next',
17
+ 'out',
18
+ ]);
19
+
20
+ const FRONTEND_DEPS = [
21
+ '@angular/core',
22
+ '@remix-run/react',
23
+ 'astro',
24
+ 'next',
25
+ 'nuxt',
26
+ 'react',
27
+ 'solid-js',
28
+ 'svelte',
29
+ 'vue',
30
+ ];
31
+
32
+ function listPostUpdateActions(projectRoot) {
33
+ const actions = [];
34
+ const analysisReasons = [];
35
+
36
+ if (!exists(projectRoot, '.dw/rules/index.md')) {
37
+ analysisReasons.push('missing .dw/rules/index.md');
38
+ }
39
+ if (!exists(projectRoot, '.dw/rules/concerns.md')) {
40
+ analysisReasons.push('missing .dw/rules/concerns.md');
41
+ }
42
+ if (!exists(projectRoot, '.dw/constitution.md')) {
43
+ analysisReasons.push('missing .dw/constitution.md');
44
+ }
45
+
46
+ const frontendProjects = findFrontendProjects(projectRoot);
47
+ const missingDesignAuthority = frontendProjects.filter((dir) => !hasDesignAuthority(dir));
48
+ if (missingDesignAuthority.length) {
49
+ analysisReasons.push(
50
+ `frontend design authority missing for ${formatPaths(projectRoot, missingDesignAuthority)}`,
51
+ );
52
+ }
53
+
54
+ if (analysisReasons.length) {
55
+ actions.push({
56
+ command: '/dw-analyze-project',
57
+ reason: `refresh project-derived docs (${analysisReasons.join('; ')})`,
58
+ });
59
+ }
60
+
61
+ if (!hasCodebaseIntel(projectRoot)) {
62
+ actions.push({
63
+ command: '/dw-intel --build',
64
+ reason: 'build .dw/intel/ codebase index for the refreshed command surface',
65
+ });
66
+ }
67
+
68
+ actions.push({
69
+ command: '/dw-harness-audit',
70
+ reason: 'validate commands, wrappers, agents, MCPs, and gates after update',
71
+ });
72
+ actions.push({
73
+ command: '/dw-skill-health',
74
+ reason: 'audit refreshed bundled skills and agents for bloat, duplication, and stale references',
75
+ });
76
+
77
+ return actions;
78
+ }
79
+
80
+ function printPostUpdateActions(projectRoot) {
81
+ const actions = listPostUpdateActions(projectRoot);
82
+ console.log(' Post-update agent actions:');
83
+ console.log(' The CLI refreshed managed files. Project-derived docs require the agent to run commands:');
84
+ for (const action of actions) {
85
+ console.log(` - ${action.command} - ${action.reason}`);
86
+ }
87
+ console.log(' /dw-update consumes this list and runs the applicable commands after the update.');
88
+ console.log();
89
+ }
90
+
91
+ function hasCodebaseIntel(projectRoot) {
92
+ return ['.dw/intel/stack.json', '.dw/intel/files.json', '.dw/intel/arch.md'].every((rel) =>
93
+ exists(projectRoot, rel),
94
+ );
95
+ }
96
+
97
+ function findFrontendProjects(projectRoot) {
98
+ const projects = [];
99
+ walk(projectRoot, (dir) => {
100
+ const pkgPath = path.join(dir, 'package.json');
101
+ if (!fs.existsSync(pkgPath)) return;
102
+ try {
103
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
104
+ const deps = {
105
+ ...(pkg.dependencies || {}),
106
+ ...(pkg.devDependencies || {}),
107
+ ...(pkg.peerDependencies || {}),
108
+ };
109
+ if (FRONTEND_DEPS.some((dep) => Object.prototype.hasOwnProperty.call(deps, dep))) {
110
+ projects.push(dir);
111
+ }
112
+ } catch {
113
+ // Ignore malformed package.json here; doctor handles managed-file validation.
114
+ }
115
+ });
116
+ return projects;
117
+ }
118
+
119
+ function walk(dir, visit) {
120
+ if (!fs.existsSync(dir)) return;
121
+ visit(dir);
122
+ let entries;
123
+ try {
124
+ entries = fs.readdirSync(dir, { withFileTypes: true });
125
+ } catch {
126
+ return;
127
+ }
128
+ for (const entry of entries) {
129
+ if (!entry.isDirectory() || SKIP_DIRS.has(entry.name)) continue;
130
+ walk(path.join(dir, entry.name), visit);
131
+ }
132
+ }
133
+
134
+ function hasDesignAuthority(projectDir) {
135
+ return ['DESIGN.md', 'BRAND.md', 'STYLE_GUIDE.md'].some((name) =>
136
+ fs.existsSync(path.join(projectDir, name)),
137
+ );
138
+ }
139
+
140
+ function exists(projectRoot, relativePath) {
141
+ return fs.existsSync(path.join(projectRoot, relativePath));
142
+ }
143
+
144
+ function formatPaths(projectRoot, dirs) {
145
+ const formatted = dirs.slice(0, 3).map((dir) => path.relative(projectRoot, dir) || '.');
146
+ if (dirs.length > formatted.length) formatted.push(`+${dirs.length - formatted.length} more`);
147
+ return formatted.join(', ');
148
+ }
149
+
150
+ module.exports = {
151
+ listPostUpdateActions,
152
+ printPostUpdateActions,
153
+ };
package/lib/uninstall.js CHANGED
@@ -117,7 +117,7 @@ function run() {
117
117
  console.log(' Preserved (user data):');
118
118
  console.log(' .dw/rules/ (project rules)');
119
119
  console.log(' .dw/spec/ (PRDs and specs)');
120
- console.log(' .dw/intel/ (codebase index from /dw-map-codebase)');
120
+ console.log(' .dw/intel/ (codebase index from /dw-intel --build)');
121
121
  console.log();
122
122
  }
123
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
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"
@@ -72,7 +72,7 @@ Before picking a command from the Trigger Map, gauge the change's actual scope.
72
72
  - **`.dw/constitution.md`**: principles with `severity: high` or `critical` block PRs / techspecs without an ADR justifying the deviation. Missing constitution? Commands auto-install defaults at `severity: info` (non-blocking) and continue — never blocks on absence.
73
73
  - **`.dw/spec/<prd>/tasks-validation.md`**: auto-generated at the end of `/dw-plan tasks`. Any FAIL dimension blocks user approval until resolved or explicitly overridden.
74
74
  - **Verification**: `/dw-generate-pr` requires a fresh `dw-verify` PASS (tests + lint + build) after the last edit.
75
- - **Security**: TS / Python / C# / Rust projects must pass `/dw-secure-audit` (Trivy + OWASP + lockfile audit) before the PR opens.
75
+ - **Security**: TS / Python / C# / Rust projects must pass `/dw-secure-audit` (OWASP + Semgrep + gitleaks + Trivy + lockfile audit) before the PR opens.
76
76
 
77
77
  ## Escape Hatches — do NOT auto-trigger
78
78
 
@@ -19,41 +19,45 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
19
19
 
20
20
  | Command | When |
21
21
  |---------|------|
22
- | `/dw-autopilot "wish"` | Default entry point in two invocations. First run plans and stops; second run resumes through `/dw-goal`, commit, and PR. |
22
+ | `/dw-autopilot "wish"` | Default entry point in two invocations. First run plans and stops; second run resumes through `/dw-goal`, Security Gate, commit, and PR. |
23
23
  | `/dw-bugfix "description"` | A bug or error report. Surgical fix or PRD route. |
24
24
  | `/dw-help [keyword]` | This screen. Pass a keyword for shortcuts. `--advanced` reveals internal commands. |
25
25
 
26
- ## Tier 2 — Pipeline granular (7)
26
+ ## Tier 2 — Pipeline granular (9)
27
27
 
28
28
  | Command | What |
29
29
  |---------|------|
30
30
  | `/dw-brainstorm "idea"` | Refine an idea before PRD. Flags: `--onepager`, `--council`, `--research`, `--refactor`. |
31
31
  | `/dw-plan "feature"` | PRD → TechSpec → Tasks sequentially with checkpoints. Stages: `prd`, `techspec`, `tasks`. |
32
32
  | `/dw-run [task-id]` | Execute all pending tasks or a single one. Flag `--resume`. |
33
- | `/dw-review` | Level 2 (PRD coverage) + Level 3 (code quality). Flags: `--coverage-only`, `--code-only`. |
34
- | `/dw-qa` | Mode-aware QA (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`. |
33
+ | `/dw-review` | Level 2 (PRD coverage) + Level 3 (code quality/security). Flags: `--coverage-only`, `--code-only`, `--bugfix <slug>`. |
34
+ | `/dw-qa` | Mode-aware QA (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`, `--uat`, `--bugfix <slug>`. |
35
+ | `/dw-pause` | Save session state, decisions, blockers, todos, and open loops into `.dw/STATE.md`. |
36
+ | `/dw-resume` | Read `.dw/STATE.md`, show a TLDR, and suggest the next `dw-*` command. |
35
37
  | `/dw-commit` | Atomic Conventional Commits for pending work. |
36
38
  | `/dw-generate-pr [target]` | Push branch, draft PR body, open browser. |
37
39
 
38
- ## Tier 3 — Specialty (8)
40
+ ## Tier 3 — Specialty (10)
39
41
 
40
42
  | Command | What |
41
43
  |---------|------|
42
- | `/dw-analyze-project` | Scan the repo, write `.dw/rules/` + offer to generate `.dw/constitution.md`. |
43
- | `/dw-redesign-ui "target"` | Audit, propose 2-3 design directions, ship. Enforces UI grounding + WCAG. |
44
- | `/dw-functional-doc` | Map screens + flows into a functional doc validated with Playwright. |
44
+ | `/dw-analyze-project` | Scan the repo, write `.dw/rules/`, offer `.dw/constitution.md`, generate `.dw/rules/concerns.md`, and synthesize frontend `DESIGN.md` when tokens exist. |
45
+ | `/dw-redesign-ui "target"` | Audit, propose 2-3 design directions, ship. Enforces UI grounding + WCAG; can run the deterministic impeccable slop detector. |
46
+ | `/dw-functional-doc` | Map screens + flows into a functional doc validated with Playwright; uses WSL-resilient browser resolution. |
45
47
  | `/dw-context-budget` | Audit context overhead from commands, skills, agents, instructions, and MCPs. |
46
48
  | `/dw-harness-audit` | Score dev-workflow install health: wrappers, agents, MCPs, gates. |
47
49
  | `/dw-skill-health` | Audit skills and agents for bloat, duplication, and missing references. |
48
50
  | `/dw-new-project` | Interview-driven bootstrap (stack + infra + docker-compose + CI). |
49
51
  | `/dw-dockerize` | Detect stack, propose Dockerfile + docker-compose for dev/prod. |
52
+ | `/dw-install-azure-skills` | Opt-in Azure skills + Microsoft Learn MCP setup. Interactive category selection. |
53
+ | `/dw-install-aws-skills` | Opt-in AWS skills + AWS MCP Server setup. Requires `uv`, AWS CLI, and credentials. |
50
54
 
51
55
  ## Workflow at a glance
52
56
 
53
- `/dw-autopilot "wish"` runs planning first and stops. Reinvoke it to resume through `/dw-goal`, commit, and PR. Step-by-step:
57
+ `/dw-autopilot "wish"` runs planning first and stops. Reinvoke it to resume through `/dw-goal`, Security Gate, commit, and PR. Step-by-step:
54
58
 
55
59
  ```
56
- /dw-brainstorm → /dw-plan → /dw-goal → /dw-commit → /dw-generate-pr
60
+ /dw-brainstorm → /dw-plan → /dw-goal → /dw-secure-audit → /dw-commit → /dw-generate-pr
57
61
  ```
58
62
 
59
63
  ## Advanced / internal commands
@@ -76,10 +80,10 @@ These are auto-invoked by primary commands but available standalone.
76
80
  |---------|------|------------|
77
81
  | `/dw-adr "decision"` | Record an Architecture Decision Record at `.dw/spec/<prd>/adrs/`. | `/dw-plan techspec --council`, deviations from constitution |
78
82
  | `/dw-intel "question"` | Query codebase intelligence; `--build` (re)indexes `.dw/intel/`. | `/dw-plan`, `/dw-review`, `/dw-bugfix` |
79
- | `/dw-secure-audit` | OWASP + Trivy + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-generate-pr` |
83
+ | `/dw-secure-audit` | OWASP + Semgrep SAST + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-autopilot`, `/dw-generate-pr` |
80
84
  | `/dw-goal "<objective>"` | Durable objective contract with `.dw/goals/`; bridges to Codex native `/goal` when available. | `/dw-autopilot` after planning |
81
85
  | `/dw-find-skills "query"` | Search npx skills ecosystem, vet, install. | manual when extending the bundle |
82
- | `/dw-update` | Update dev-workflow to latest npm release with rollback snapshot. | manual maintenance |
86
+ | `/dw-update` | Update dev-workflow to latest npm release with rollback snapshot, then run listed post-update actions (`/dw-analyze-project`, `/dw-intel --build`, `/dw-harness-audit`, `/dw-skill-health`) when applicable. | manual maintenance |
83
87
  | `/dw-subtask-start "goal"` | Create a minimal input packet for a subagent. | parent agent before delegation |
84
88
  | `/dw-subtask-complete <slug>` | Record a structured child-session handoff. | subagent / child session |
85
89
  | `/dw-subtask-resume` | Consume and archive pending handoffs for parent synthesis. | parent agent after delegation |
@@ -95,6 +99,8 @@ Match the keyword and suggest:
95
99
  | `bug`, `error`, `broken`, `fix` | `/dw-bugfix` |
96
100
  | `run`, `execute`, `implement` | `/dw-run` |
97
101
  | `goal`, `objective`, `long-running`, `resume autopilot` | `/dw-goal` or `/dw-autopilot` if `autopilot-state.json` exists |
102
+ | `pause`, `save state`, `end session` | `/dw-pause` |
103
+ | `resume`, `continue`, `where did we stop` | `/dw-resume` |
98
104
  | `review`, `quality`, `audit code` | `/dw-review` |
99
105
  | `qa`, `test plan`, `e2e` | `/dw-qa` |
100
106
  | `commit`, `git` | `/dw-commit` |
@@ -106,15 +112,21 @@ Match the keyword and suggest:
106
112
  | `intel`, `where is`, `what uses` | `/dw-intel` (or `--build` to (re)create the index) |
107
113
  | `context`, `tokens`, `slow agent` | `/dw-context-budget` |
108
114
  | `harness`, `install`, `wrappers`, `agents` | `/dw-harness-audit` |
115
+ | `update`, `upgrade`, `latest`, `post-update` | `/dw-update` |
116
+ | `design.md`, `design authority`, `concerns map` | `/dw-analyze-project` (also listed as a post-update action when missing) |
109
117
  | `subagent`, `subtask`, `handoff`, `delegate` | `/dw-subtask-start` or `/dw-subtask-resume` |
110
118
  | `skills`, `skill health`, `bloat` | `/dw-skill-health` |
111
119
  | `analyze`, `rules`, `conventions` | `/dw-analyze-project` |
112
120
  | `constitution`, `principles` | `/dw-analyze-project` (Step 8 generates the constitution) |
113
121
  | `security`, `vulnerabilities`, `cve`, `deps`, `audit deps` | `/dw-secure-audit` |
122
+ | `secret`, `sast`, `semgrep`, `gitleaks`, `trivy` | `/dw-secure-audit` |
114
123
  | `adr`, `decision` | `/dw-adr` (also auto-invoked from `/dw-plan --council`) |
115
124
  | `docker`, `compose`, `container` | `/dw-dockerize` |
116
125
  | `new project`, `bootstrap`, `scaffold` | `/dw-new-project` |
117
126
  | `functional doc`, `screen map`, `e2e doc` | `/dw-functional-doc` |
127
+ | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` when WSL NAT must drive the real Windows browser |
128
+ | `azure`, `microsoft learn`, `azure skills` | `/dw-install-azure-skills` |
129
+ | `aws`, `aws mcp`, `aws skills` | `/dw-install-aws-skills` |
118
130
  | `incident`, `outage`, `postmortem`, `sev-1`, `sev-2` | (Skill `dw-incident-response` auto-invoked from `/dw-bugfix` for prod-critical) |
119
131
  | `eval`, `llm`, `ai feature`, `rag` | (Skill `dw-llm-eval` invoked from `/dw-plan tasks`, `/dw-review`, `/dw-qa --ai`) |
120
132
 
@@ -123,10 +135,10 @@ If no keyword matches, show the default surface and a note: "Keyword `<word>` no
123
135
  ## FAQ
124
136
 
125
137
  **Q: I'm not sure where to start with a new feature.**
126
- - Use `/dw-autopilot "what you want"`. First invocation runs PRD → TechSpec → Tasks and stops; second invocation resumes through `/dw-goal`, commit, and PR.
138
+ - Use `/dw-autopilot "what you want"`. First invocation runs PRD → TechSpec → Tasks and stops; second invocation resumes through `/dw-goal`, Security Gate, commit, and PR.
127
139
 
128
140
  **Q: Do I have to use `/dw-autopilot`?**
129
- - No. The granular pipeline (`/dw-brainstorm` → `/dw-plan` → `/dw-goal` or `/dw-run`/`/dw-qa`/`/dw-review` → `/dw-commit` → `/dw-generate-pr`) gives you control at each step.
141
+ - No. The granular pipeline (`/dw-brainstorm` → `/dw-plan` → `/dw-goal` or `/dw-run`/`/dw-qa`/`/dw-review` → `/dw-secure-audit` → `/dw-commit` → `/dw-generate-pr`) gives you control at each step.
130
142
 
131
143
  **Q: I just want to fix a bug.**
132
144
  - `/dw-bugfix "<bug description>"`. It triages (bug vs feature vs scope), asks 3 questions, then fixes or routes to a PRD if scope is large.
@@ -134,6 +146,9 @@ If no keyword matches, show the default surface and a note: "Keyword `<word>` no
134
146
  **Q: How do I check if my project follows good patterns?**
135
147
  - `/dw-analyze-project` writes `.dw/rules/`. Then any command reads those rules for compliance.
136
148
 
149
+ **Q: Where does security fit?**
150
+ - `/dw-review` auto-invokes `/dw-secure-audit` for supported stacks; `/dw-autopilot` treats it as the named gate before commit/PR; `/dw-generate-pr` enforces the latest approved summary.
151
+
137
152
  **Q: How do I get more flow recommendations during ideation?**
138
153
  - `/dw-brainstorm "idea" --council` adds a multi-advisor stress-test debate.
139
154
  - `/dw-brainstorm "topic" --research` runs a deep multi-source citation pipeline.
@@ -79,6 +79,7 @@ The `update` command overwrites managed files and PRESERVES:
79
79
  - `.dw/rules/` (user rules)
80
80
  - `.dw/spec/` (in-progress PRDs and tasks)
81
81
  - `.dw/intel/` (codebase index from `/dw-intel --build`)
82
+ - project-derived docs such as `.dw/constitution.md`, `.dw/rules/concerns.md`, and frontend `DESIGN.md`
82
83
 
83
84
  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.
84
85
 
@@ -96,9 +97,23 @@ Present to the user:
96
97
  - Detected language (`DETECTED_LANG`)
97
98
  - Previous version → new version
98
99
  - Summary of what the `update` output showed (files copied, wrappers generated, MCPs configured)
100
+ - The `Post-update agent actions` printed by the CLI
99
101
  - Any warnings or errors
100
102
 
101
- ### 6. Suggest Next Step
103
+ ### 6. Run Post-Update Agent Actions (Required)
104
+
105
+ <critical>The CLI cannot execute slash commands or inspect product-specific design authority by itself. When the update output prints `Post-update agent actions`, treat that list as work for this agent to run now, unless the user explicitly asked for "update files only".</critical>
106
+
107
+ Run listed commands in this order:
108
+
109
+ 1. `/dw-analyze-project` when listed — refreshes project-derived docs. This is the command that creates or refreshes `.dw/rules/`, offers `.dw/constitution.md`, writes `.dw/rules/concerns.md`, and for frontend projects synthesizes `DESIGN.md` from existing design tokens when no design authority exists.
110
+ 2. `/dw-intel --build` when listed — rebuilds the queryable codebase index after rules/docs refresh.
111
+ 3. `/dw-harness-audit` — validates commands, wrappers, agents, MCPs, and gates after managed files changed.
112
+ 4. `/dw-skill-health` — audits refreshed bundled skills and agents for bloat, overlap, and stale references.
113
+
114
+ If `/dw-analyze-project` asks clarification or approval questions, ask them and continue. Do not fabricate `DESIGN.md`, `concerns.md`, or constitution content directly inside `/dw-update`; delegate to the command that owns those artifacts.
115
+
116
+ ### 7. Suggest Next Step
102
117
 
103
118
  If commands/skills were updated, remind the user:
104
119
  - Restart the agent session (or reload skills) so the new instructions take effect — skills are usually loaded at session start
@@ -72,7 +72,7 @@ Antes de escolher um comando da Trigger Map, dimensione o escopo real da mudanç
72
72
  - **`.dw/constitution.md`**: princípios com `severity: high` ou `critical` bloqueiam PRs / techspecs sem um ADR justificando o desvio. Constitution ausente? Os comandos auto-instalam defaults em `severity: info` (não-bloqueante) e seguem — ausência nunca bloqueia.
73
73
  - **`.dw/spec/<prd>/tasks-validation.md`**: auto-gerado no fim do `/dw-plan tasks`. Qualquer dimensão FAIL bloqueia approval do usuário até resolver ou override explícito.
74
74
  - **Verification**: `/dw-generate-pr` exige `dw-verify` PASS fresco (testes + lint + build) depois do último edit.
75
- - **Segurança**: projetos TS / Python / C# / Rust precisam passar `/dw-secure-audit` (Trivy + OWASP + lockfile audit) antes do PR abrir.
75
+ - **Segurança**: projetos TS / Python / C# / Rust precisam passar `/dw-secure-audit` (OWASP + Semgrep + gitleaks + Trivy + lockfile audit) antes do PR abrir.
76
76
 
77
77
  ## Escape Hatches — NÃO auto-trigger
78
78
 
@@ -17,41 +17,45 @@ Use `/dw-autopilot "desejo"` como gateway pra maior parte do trabalho. Comandos
17
17
 
18
18
  | Comando | Quando |
19
19
  |---------|--------|
20
- | `/dw-autopilot "desejo"` | Entry point padrão em duas invocações. Primeira roda plan e para; segunda retoma via `/dw-goal`, commit e PR. |
20
+ | `/dw-autopilot "desejo"` | Entry point padrão em duas invocações. Primeira roda plan e para; segunda retoma via `/dw-goal`, Security Gate, commit e PR. |
21
21
  | `/dw-bugfix "descrição"` | Bug ou error report. Fix cirúrgico ou rota pra PRD. |
22
22
  | `/dw-help [palavra-chave]` | Esta tela. Passe palavra-chave pra atalhos. `--advanced` revela comandos internos. |
23
23
 
24
- ## Tier 2 — Pipeline granular (7)
24
+ ## Tier 2 — Pipeline granular (9)
25
25
 
26
26
  | Comando | O que |
27
27
  |---------|-------|
28
28
  | `/dw-brainstorm "ideia"` | Refina ideia antes do PRD. Flags: `--onepager`, `--council`, `--research`, `--refactor`. |
29
29
  | `/dw-plan "feature"` | PRD → TechSpec → Tasks sequencial com checkpoints. Stages: `prd`, `techspec`, `tasks`. |
30
30
  | `/dw-run [task-id]` | Executa todas tasks pendentes ou uma específica. Flag `--resume`. |
31
- | `/dw-review` | Level 2 (cobertura PRD) + Level 3 (qualidade). Flags: `--coverage-only`, `--code-only`. |
32
- | `/dw-qa` | QA mode-aware (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`. |
31
+ | `/dw-review` | Level 2 (cobertura PRD) + Level 3 (qualidade/segurança). Flags: `--coverage-only`, `--code-only`, `--bugfix <slug>`. |
32
+ | `/dw-qa` | QA mode-aware (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`, `--uat`, `--bugfix <slug>`. |
33
+ | `/dw-pause` | Salva estado da sessão, decisões, bloqueios, todos e open loops em `.dw/STATE.md`. |
34
+ | `/dw-resume` | Lê `.dw/STATE.md`, mostra um TLDR e sugere o próximo comando `dw-*`. |
33
35
  | `/dw-commit` | Commits atômicos Conventional pra trabalho pendente. |
34
36
  | `/dw-generate-pr [target]` | Push branch, draft do PR body, abre browser. |
35
37
 
36
- ## Tier 3 — Especialidade (8)
38
+ ## Tier 3 — Especialidade (10)
37
39
 
38
40
  | Comando | O que |
39
41
  |---------|-------|
40
- | `/dw-analyze-project` | Scan do repo, escreve `.dw/rules/` + oferece gerar `.dw/constitution.md`. |
41
- | `/dw-redesign-ui "target"` | Audit, propõe 2-3 direções, entrega. Enforça UI grounding + WCAG. |
42
- | `/dw-functional-doc` | Mapeia screens + flows em doc funcional validado com Playwright. |
42
+ | `/dw-analyze-project` | Scan do repo, escreve `.dw/rules/`, oferece `.dw/constitution.md`, gera `.dw/rules/concerns.md` e sintetiza `DESIGN.md` em frontend quando há tokens. |
43
+ | `/dw-redesign-ui "target"` | Audit, propõe 2-3 direções, entrega. Enforça UI grounding + WCAG; pode rodar o detector determinístico do impeccable. |
44
+ | `/dw-functional-doc` | Mapeia screens + flows em doc funcional validado com Playwright; usa resolução de browser resiliente no WSL. |
43
45
  | `/dw-context-budget` | Audita contexto de commands, skills, agentes, instrucoes e MCPs. |
44
46
  | `/dw-harness-audit` | Pontua saude da instalacao: wrappers, agentes, MCPs e gates. |
45
47
  | `/dw-skill-health` | Audita skills e agentes por bloat, duplicacao e referencias quebradas. |
46
48
  | `/dw-new-project` | Bootstrap por entrevista (stack + infra + docker-compose + CI). |
47
49
  | `/dw-dockerize` | Detecta stack, propõe Dockerfile + docker-compose pra dev/prod. |
50
+ | `/dw-install-azure-skills` | Opt-in: skills Azure + Microsoft Learn MCP. Seleção interativa de categorias. |
51
+ | `/dw-install-aws-skills` | Opt-in: skills AWS + AWS MCP Server. Requer `uv`, AWS CLI e credenciais. |
48
52
 
49
53
  ## Workflow em resumo
50
54
 
51
- `/dw-autopilot "desejo"` roda planejamento primeiro e para. Reinvoque para retomar via `/dw-goal`, commit e PR. Passo a passo:
55
+ `/dw-autopilot "desejo"` roda planejamento primeiro e para. Reinvoque para retomar via `/dw-goal`, Security Gate, commit e PR. Passo a passo:
52
56
 
53
57
  ```
54
- /dw-brainstorm → /dw-plan → /dw-goal → /dw-commit → /dw-generate-pr
58
+ /dw-brainstorm → /dw-plan → /dw-goal → /dw-secure-audit → /dw-commit → /dw-generate-pr
55
59
  ```
56
60
 
57
61
  ## Comandos avançados / internos
@@ -74,10 +78,10 @@ Auto-invocados por comandos primários mas disponíveis standalone.
74
78
  |---------|-------|--------------|
75
79
  | `/dw-adr "decisão"` | Registra um ADR em `.dw/spec/<prd>/adrs/`. | `/dw-plan techspec --council`, desvios de constitution |
76
80
  | `/dw-intel "pergunta"` | Query de codebase intel; `--build` (re)indexa `.dw/intel/`. | `/dw-plan`, `/dw-review`, `/dw-bugfix` |
77
- | `/dw-secure-audit` | OWASP + Trivy + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-generate-pr` |
81
+ | `/dw-secure-audit` | OWASP + Semgrep SAST + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain scan. Hard gate. Flags: `--scan-only`, `--plan`, `--execute`. | `/dw-review`, `/dw-autopilot`, `/dw-generate-pr` |
78
82
  | `/dw-goal "<objetivo>"` | Contrato de objetivo duravel com `.dw/goals/`; faz ponte com `/goal` nativo do Codex quando disponivel. | `/dw-autopilot` apos planejamento |
79
83
  | `/dw-find-skills "query"` | Busca npx skills ecosystem, valida, instala. | manual ao estender bundle |
80
- | `/dw-update` | Atualiza dev-workflow pro último release npm com snapshot rollback. | manutenção manual |
84
+ | `/dw-update` | Atualiza dev-workflow pro último release npm com snapshot rollback, depois roda ações pós-update listadas (`/dw-analyze-project`, `/dw-intel --build`, `/dw-harness-audit`, `/dw-skill-health`) quando aplicável. | manutenção manual |
81
85
  | `/dw-subtask-start "goal"` | Cria um input packet minimo para subagente. | parent antes de delegar |
82
86
  | `/dw-subtask-complete <slug>` | Registra handoff estruturado da sessao child. | subagente / sessao child |
83
87
  | `/dw-subtask-resume` | Consome e arquiva handoffs pendentes para sintese do parent. | parent apos delegacao |
@@ -91,6 +95,8 @@ Auto-invocados por comandos primários mas disponíveis standalone.
91
95
  | `bug`, `erro`, `quebrado`, `fix` | `/dw-bugfix` |
92
96
  | `run`, `executa`, `implementa` | `/dw-run` |
93
97
  | `goal`, `objetivo`, `long-running`, `retomar autopilot` | `/dw-goal` ou `/dw-autopilot` se `autopilot-state.json` existir |
98
+ | `pausa`, `salvar estado`, `encerrar sessão` | `/dw-pause` |
99
+ | `retomar`, `continuar`, `onde paramos` | `/dw-resume` |
94
100
  | `review`, `qualidade`, `audit code` | `/dw-review` |
95
101
  | `qa`, `test plan`, `e2e` | `/dw-qa` |
96
102
  | `commit`, `git` | `/dw-commit` |
@@ -102,15 +108,21 @@ Auto-invocados por comandos primários mas disponíveis standalone.
102
108
  | `intel`, `onde está`, `o que usa` | `/dw-intel` (ou `--build`) |
103
109
  | `contexto`, `tokens`, `agente lento` | `/dw-context-budget` |
104
110
  | `harness`, `install`, `wrappers`, `agentes` | `/dw-harness-audit` |
111
+ | `update`, `upgrade`, `latest`, `pós-update` | `/dw-update` |
112
+ | `design.md`, `autoridade de design`, `mapa de concerns` | `/dw-analyze-project` (também listado como ação pós-update quando ausente) |
105
113
  | `subagent`, `subtask`, `handoff`, `delegate`, `delegar` | `/dw-subtask-start` ou `/dw-subtask-resume` |
106
114
  | `skills`, `skill health`, `bloat` | `/dw-skill-health` |
107
115
  | `analyze`, `rules`, `convenções` | `/dw-analyze-project` |
108
116
  | `constitution`, `princípios` | `/dw-analyze-project` (Step 8) |
109
117
  | `security`, `vulnerabilidades`, `cve`, `deps` | `/dw-secure-audit` |
118
+ | `secret`, `sast`, `semgrep`, `gitleaks`, `trivy` | `/dw-secure-audit` |
110
119
  | `adr`, `decisão` | `/dw-adr` |
111
120
  | `docker`, `compose`, `container` | `/dw-dockerize` |
112
121
  | `new project`, `bootstrap`, `scaffold` | `/dw-new-project` |
113
122
  | `functional doc`, `screen map` | `/dw-functional-doc` |
123
+ | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` quando WSL NAT precisa dirigir o browser real do Windows |
124
+ | `azure`, `microsoft learn`, `azure skills` | `/dw-install-azure-skills` |
125
+ | `aws`, `aws mcp`, `aws skills` | `/dw-install-aws-skills` |
114
126
  | `incident`, `outage`, `postmortem`, `sev-1` | (Skill `dw-incident-response` auto-invocada de `/dw-bugfix`) |
115
127
  | `eval`, `llm`, `ai feature`, `rag` | (Skill `dw-llm-eval` invocada de `/dw-plan`, `/dw-review`, `/dw-qa --ai`) |
116
128
 
@@ -119,10 +131,10 @@ Sem match: surface padrão + nota.
119
131
  ## FAQ
120
132
 
121
133
  **P: Onde começo com uma nova feature?**
122
- - `/dw-autopilot "o que voce quer"`. Primeira invocacao roda PRD → TechSpec → Tasks e para; segunda invocacao retoma via `/dw-goal`, commit e PR.
134
+ - `/dw-autopilot "o que voce quer"`. Primeira invocacao roda PRD → TechSpec → Tasks e para; segunda invocacao retoma via `/dw-goal`, Security Gate, commit e PR.
123
135
 
124
136
  **P: Tenho que usar `/dw-autopilot`?**
125
- - Não. Pipeline granular dá controle a cada step, com `/dw-goal` quando quiser executar run/review/QA/review como objetivo duravel.
137
+ - Não. Pipeline granular dá controle a cada step, com `/dw-goal` quando quiser executar run/review/QA/review como objetivo duravel, seguido por `/dw-secure-audit`, `/dw-commit` e `/dw-generate-pr`.
126
138
 
127
139
  **P: Só quero corrigir um bug.**
128
140
  - `/dw-bugfix "<descrição>"`. Tria, 3 perguntas, fixa ou roteia.
@@ -133,6 +145,9 @@ Sem match: surface padrão + nota.
133
145
  **P: Onde features AI são avaliadas?**
134
146
  - Skill `dw-llm-eval` auto-invocada de `/dw-plan tasks`, `/dw-review`, `/dw-qa --ai`.
135
147
 
148
+ **P: Onde entra segurança?**
149
+ - `/dw-review` auto-invoca `/dw-secure-audit` para stacks suportadas; `/dw-autopilot` trata como gate nomeado antes de commit/PR; `/dw-generate-pr` reforça o summary aprovado mais recente.
150
+
136
151
  **P: O que aconteceu com outros comandos?**
137
152
  - v1.0.0 consolidou a surface antiga de comandos. Mergers: create-prd/techspec/tasks → `/dw-plan`; run-task/run-plan → `/dw-run`; code-review/review-implementation → `/dw-review`; run-qa/fix-qa → `/dw-qa`; security-check/deps-audit → `/dw-secure-audit`; map-codebase → `/dw-intel --build`; deep-research e refactoring-analysis → `/dw-brainstorm --research/--refactor`. Removidos: revert-task (use `git revert` direto).
138
153
 
@@ -80,6 +80,7 @@ O comando `update` sobrescreve arquivos gerenciados e PRESERVA:
80
80
  - `.dw/rules/` (rules do usuário)
81
81
  - `.dw/spec/` (PRDs e tasks em andamento)
82
82
  - `.dw/intel/` (índice de codebase do `/dw-intel --build`)
83
+ - docs derivados do projeto como `.dw/constitution.md`, `.dw/rules/concerns.md` e `DESIGN.md` em frontend
83
84
 
84
85
  O comando `update` também roda o passo de migração GSD automaticamente — se o projeto tem `.planning/` legado (de uso prévio do GSD), o conteúdo é migrado para `.dw/intel/`, `.dw/spec/active-session.md`, `.dw/spec/quick/`, etc., e `.planning/` é renomeado para `.planning.gsd-archive-<DATA>/` para inspeção. Os arquivos `.claude/commands/gsd/`, `.claude/agents/gsd-*.md`, `.claude/hooks/gsd-*.js` e `.claude/gsd-file-manifest.json` são removidos durante a migração.
85
86
 
@@ -97,9 +98,23 @@ Apresente ao usuário:
97
98
  - Idioma detectado (`DETECTED_LANG`)
98
99
  - Versão anterior → nova versão
99
100
  - Resumo do que o output do `update` mostrou (arquivos copiados, wrappers gerados, MCPs configurados)
101
+ - As `Post-update agent actions` impressas pelo CLI
100
102
  - Quaisquer avisos ou erros
101
103
 
102
- ### 6. Sugerir Próximo Passo
104
+ ### 6. Executar Ações de Agente Pós-Update (Obrigatório)
105
+
106
+ <critical>O CLI não consegue executar slash commands nem inspecionar sozinho a autoridade de design específica do produto. Quando o output do update imprimir `Post-update agent actions`, trate essa lista como trabalho para este agente executar agora, exceto se o usuário pediu explicitamente "só atualize os arquivos".</critical>
107
+
108
+ Rode os comandos listados nesta ordem:
109
+
110
+ 1. `/dw-analyze-project` quando listado — refresca docs derivados do projeto. Este é o comando que cria ou atualiza `.dw/rules/`, oferece `.dw/constitution.md`, escreve `.dw/rules/concerns.md` e, em projetos frontend, sintetiza `DESIGN.md` a partir dos tokens existentes quando não há autoridade de design.
111
+ 2. `/dw-intel --build` quando listado — reconstrói o índice queryable do codebase depois do refresh de rules/docs.
112
+ 3. `/dw-harness-audit` — valida commands, wrappers, agentes, MCPs e gates depois que arquivos gerenciados mudaram.
113
+ 4. `/dw-skill-health` — audita bundled skills e agentes atualizados por bloat, sobreposição e referências antigas.
114
+
115
+ Se `/dw-analyze-project` fizer perguntas de esclarecimento ou aprovação, faça-as e continue. Não fabrique `DESIGN.md`, `concerns.md` ou constitution diretamente dentro de `/dw-update`; delegue para o comando dono desses artefatos.
116
+
117
+ ### 7. Sugerir Próximo Passo
103
118
 
104
119
  Se comandos/skills foram atualizados, lembre o usuário:
105
120
  - Reinicie a sessão do agente (ou recarregue skills) para que as instruções novas tenham efeito — skills costumam ser carregadas no início da sessão