@brunosps00/dev-workflow 0.11.0 → 0.13.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 (111) hide show
  1. package/README.md +48 -5
  2. package/lib/constants.js +20 -20
  3. package/lib/init.js +24 -1
  4. package/lib/migrate-skills.js +129 -0
  5. package/lib/removed-bundled-skills.js +16 -0
  6. package/lib/uninstall.js +6 -2
  7. package/lib/utils.js +43 -1
  8. package/package.json +1 -1
  9. package/scaffold/en/agent-instructions.md +68 -0
  10. package/scaffold/en/commands/dw-autopilot.md +1 -1
  11. package/scaffold/en/commands/dw-brainstorm.md +1 -1
  12. package/scaffold/en/commands/dw-bugfix.md +3 -3
  13. package/scaffold/en/commands/dw-create-techspec.md +1 -1
  14. package/scaffold/en/commands/dw-deps-audit.md +1 -1
  15. package/scaffold/en/commands/dw-fix-qa.md +1 -1
  16. package/scaffold/en/commands/dw-functional-doc.md +2 -2
  17. package/scaffold/en/commands/dw-help.md +1 -1
  18. package/scaffold/en/commands/dw-redesign-ui.md +7 -7
  19. package/scaffold/en/commands/dw-run-qa.md +4 -4
  20. package/scaffold/en/commands/dw-run-task.md +2 -2
  21. package/scaffold/en/templates/constitution-template.md +1 -1
  22. package/scaffold/pt-br/agent-instructions.md +68 -0
  23. package/scaffold/pt-br/commands/dw-autopilot.md +1 -1
  24. package/scaffold/pt-br/commands/dw-brainstorm.md +1 -1
  25. package/scaffold/pt-br/commands/dw-bugfix.md +3 -3
  26. package/scaffold/pt-br/commands/dw-create-techspec.md +1 -1
  27. package/scaffold/pt-br/commands/dw-deps-audit.md +1 -1
  28. package/scaffold/pt-br/commands/dw-fix-qa.md +1 -1
  29. package/scaffold/pt-br/commands/dw-functional-doc.md +2 -2
  30. package/scaffold/pt-br/commands/dw-help.md +1 -1
  31. package/scaffold/pt-br/commands/dw-redesign-ui.md +7 -7
  32. package/scaffold/pt-br/commands/dw-run-qa.md +4 -4
  33. package/scaffold/pt-br/commands/dw-run-task.md +2 -2
  34. package/scaffold/pt-br/templates/constitution-template.md +1 -1
  35. package/scaffold/skills/dw-council/SKILL.md +1 -1
  36. package/scaffold/skills/dw-testing-discipline/SKILL.md +148 -0
  37. package/scaffold/skills/dw-testing-discipline/references/ai-agent-gates.md +170 -0
  38. package/scaffold/skills/dw-testing-discipline/references/anti-patterns.md +336 -0
  39. package/scaffold/skills/dw-testing-discipline/references/flaky-discipline.md +163 -0
  40. package/scaffold/skills/dw-testing-discipline/references/iron-laws.md +128 -0
  41. package/scaffold/skills/dw-testing-discipline/references/playwright-recipes.md +282 -0
  42. package/scaffold/skills/dw-testing-discipline/references/positive-patterns.md +241 -0
  43. package/scaffold/skills/{webapp-testing → dw-testing-discipline}/references/security-boundary.md +1 -1
  44. package/scaffold/skills/dw-ui-discipline/SKILL.md +128 -0
  45. package/scaffold/skills/dw-ui-discipline/references/accessibility-floor.md +225 -0
  46. package/scaffold/skills/dw-ui-discipline/references/anti-slop.md +162 -0
  47. package/scaffold/skills/dw-ui-discipline/references/curated-defaults.md +195 -0
  48. package/scaffold/skills/dw-ui-discipline/references/hard-gate.md +142 -0
  49. package/scaffold/skills/dw-ui-discipline/references/state-matrix.md +101 -0
  50. package/scaffold/skills/ui-ux-pro-max/LICENSE +0 -21
  51. package/scaffold/skills/ui-ux-pro-max/SKILL.md +0 -659
  52. package/scaffold/skills/ui-ux-pro-max/data/_sync_all.py +0 -414
  53. package/scaffold/skills/ui-ux-pro-max/data/app-interface.csv +0 -31
  54. package/scaffold/skills/ui-ux-pro-max/data/charts.csv +0 -26
  55. package/scaffold/skills/ui-ux-pro-max/data/colors.csv +0 -162
  56. package/scaffold/skills/ui-ux-pro-max/data/design.csv +0 -1776
  57. package/scaffold/skills/ui-ux-pro-max/data/draft.csv +0 -1779
  58. package/scaffold/skills/ui-ux-pro-max/data/google-fonts.csv +0 -1924
  59. package/scaffold/skills/ui-ux-pro-max/data/icons.csv +0 -106
  60. package/scaffold/skills/ui-ux-pro-max/data/landing.csv +0 -35
  61. package/scaffold/skills/ui-ux-pro-max/data/products.csv +0 -162
  62. package/scaffold/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  63. package/scaffold/skills/ui-ux-pro-max/data/stacks/angular.csv +0 -51
  64. package/scaffold/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -54
  65. package/scaffold/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  66. package/scaffold/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  67. package/scaffold/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  68. package/scaffold/skills/ui-ux-pro-max/data/stacks/laravel.csv +0 -51
  69. package/scaffold/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  70. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  71. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  72. package/scaffold/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  73. package/scaffold/skills/ui-ux-pro-max/data/stacks/react.csv +0 -54
  74. package/scaffold/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  75. package/scaffold/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  76. package/scaffold/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  77. package/scaffold/skills/ui-ux-pro-max/data/stacks/threejs.csv +0 -54
  78. package/scaffold/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  79. package/scaffold/skills/ui-ux-pro-max/data/styles.csv +0 -85
  80. package/scaffold/skills/ui-ux-pro-max/data/typography.csv +0 -74
  81. package/scaffold/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -162
  82. package/scaffold/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  83. package/scaffold/skills/ui-ux-pro-max/scripts/core.py +0 -262
  84. package/scaffold/skills/ui-ux-pro-max/scripts/design_system.py +0 -1148
  85. package/scaffold/skills/ui-ux-pro-max/scripts/search.py +0 -114
  86. package/scaffold/skills/ui-ux-pro-max/skills/brand/SKILL.md +0 -97
  87. package/scaffold/skills/ui-ux-pro-max/skills/design/SKILL.md +0 -302
  88. package/scaffold/skills/ui-ux-pro-max/skills/design-system/SKILL.md +0 -244
  89. package/scaffold/skills/ui-ux-pro-max/templates/base/quick-reference.md +0 -297
  90. package/scaffold/skills/ui-ux-pro-max/templates/base/skill-content.md +0 -358
  91. package/scaffold/skills/ui-ux-pro-max/templates/platforms/agent.json +0 -21
  92. package/scaffold/skills/ui-ux-pro-max/templates/platforms/augment.json +0 -18
  93. package/scaffold/skills/ui-ux-pro-max/templates/platforms/claude.json +0 -21
  94. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codebuddy.json +0 -21
  95. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codex.json +0 -21
  96. package/scaffold/skills/ui-ux-pro-max/templates/platforms/continue.json +0 -21
  97. package/scaffold/skills/ui-ux-pro-max/templates/platforms/copilot.json +0 -21
  98. package/scaffold/skills/ui-ux-pro-max/templates/platforms/cursor.json +0 -21
  99. package/scaffold/skills/ui-ux-pro-max/templates/platforms/droid.json +0 -21
  100. package/scaffold/skills/ui-ux-pro-max/templates/platforms/gemini.json +0 -21
  101. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kilocode.json +0 -21
  102. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kiro.json +0 -21
  103. package/scaffold/skills/ui-ux-pro-max/templates/platforms/opencode.json +0 -21
  104. package/scaffold/skills/ui-ux-pro-max/templates/platforms/qoder.json +0 -21
  105. package/scaffold/skills/ui-ux-pro-max/templates/platforms/roocode.json +0 -21
  106. package/scaffold/skills/ui-ux-pro-max/templates/platforms/trae.json +0 -21
  107. package/scaffold/skills/ui-ux-pro-max/templates/platforms/warp.json +0 -18
  108. package/scaffold/skills/ui-ux-pro-max/templates/platforms/windsurf.json +0 -21
  109. package/scaffold/skills/webapp-testing/SKILL.md +0 -138
  110. package/scaffold/skills/webapp-testing/assets/test-helper.js +0 -56
  111. /package/scaffold/skills/{webapp-testing → dw-testing-discipline}/references/three-workflow-patterns.md +0 -0
package/README.md CHANGED
@@ -13,7 +13,7 @@ This will:
13
13
  2. Create `.dw/commands/` with 31 workflow commands
14
14
  3. Create `.dw/templates/` with document templates (PRD, TechSpec, Tasks, ADR, etc.)
15
15
  4. Create `.dw/rules/` (populated by `/dw-analyze-project`)
16
- 5. Install bundled skills (`dw-verify`, `dw-memory`, `dw-review-rigor`, `ui-ux-pro-max`, `security-review`, etc.) to `.agents/skills/`
16
+ 5. Install bundled skills (`dw-verify`, `dw-memory`, `dw-review-rigor`, `dw-ui-discipline`, `dw-testing-discipline`, `security-review`, etc.) to `.agents/skills/`
17
17
  6. Generate skill wrappers for Claude Code, Codex, Copilot, and OpenCode
18
18
  7. Configure MCP servers (Context7 + Playwright)
19
19
 
@@ -55,7 +55,7 @@ Executes all pending tasks via the `dw-execute-phase` bundled skill — gated by
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.
56
56
 
57
57
  #### `/dw-redesign-ui`
58
- Audits existing frontend pages or components, proposes 2-3 design directions using `ui-ux-pro-max` (colors, typography, layout), waits for user approval, then implements the redesign following the project's CSS methodology. Framework-agnostic (React, Angular, Vue). Generates a design contract persisted for consistency across tasks.
58
+ Audits existing frontend pages or components, then runs the `dw-ui-discipline` hard-gate (brand authorities or curated defaults, surface job sentence, complete state matrix, scene sentence) before proposing 2-3 design directions. Each direction self-checks against the 14 anti-slop patterns. WCAG 2.2 AA floor is non-negotiable at validation. Framework-agnostic (React, Angular, Vue). Generates a design contract persisted for consistency across tasks.
59
59
 
60
60
  ### Quality
61
61
 
@@ -183,6 +183,34 @@ A **constitution** is a declarative list of principles your team commits to (e.g
183
183
 
184
184
  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.
185
185
 
186
+ ## Auto-Trigger (CLAUDE.md / AGENTS.md)
187
+
188
+ `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**.
189
+
190
+ **What's inside:**
191
+
192
+ - **Trigger Map** — 15 mappings from user intent ("Implement X", "Bug in Y", "Review my PR", ...) to the `dw-*` command the agent should run. `/dw-autopilot` is the safest default for non-trivial feature requests.
193
+ - **Hard Gates** — reminders that constitution violations (high/critical), missing `dw-verify` PASS, and security failures block downstream commands.
194
+ - **Escape Hatches** — explicit cases where the agent should NOT auto-trigger (typos, exploration, aesthetic edits, user opt-out).
195
+
196
+ **Why two files:** Claude Code, Codex, Copilot, and OpenCode all support agent-instruction conventions but use different filenames. Shipping both means every supported platform picks up the same trigger logic out of the box.
197
+
198
+ **Why descriptions, too:** every `dw-*` command's description leads with `Trigger when <user signal>...` so the agent can pick the right one even without consulting the trigger map. Both mechanisms reinforce each other.
199
+
200
+ **Merge-aware update.** The content lives between `<!-- dev-workflow:start -->` and `<!-- dev-workflow:end -->` markers. Anything you add **outside** the markers (your own house rules, project-specific guidelines) is preserved on every `dev-workflow update` — only the block inside is refreshed.
201
+
202
+ ```bash
203
+ # After init, both files exist at project root
204
+ ls CLAUDE.md AGENTS.md
205
+
206
+ # Edit OUTSIDE the markers freely — survives updates
207
+ echo "## My team's house rules" >> CLAUDE.md
208
+ echo "..." >> CLAUDE.md
209
+
210
+ # Run update — block is refreshed, your additions stay
211
+ npx @brunosps00/dev-workflow update
212
+ ```
213
+
186
214
  ## Platform Support
187
215
 
188
216
  | Platform | Wrapper Location | Status |
@@ -207,6 +235,8 @@ your-project/
207
235
  │ ├── references/ # Reference documentation
208
236
  │ ├── scripts/ # Utility scripts
209
237
  │ └── spec/ # PRD directories — each contains tasks-validation.md
238
+ ├── CLAUDE.md # Auto-trigger decision tree for Claude Code (merge-aware)
239
+ ├── AGENTS.md # Same content for Codex / Copilot / OpenCode
210
240
  ├── .claude/
211
241
  │ ├── skills/ # Claude Code wrappers
212
242
  │ └── settings.json # MCP servers (Context7, Playwright)
@@ -239,12 +269,12 @@ These are not slash commands — they are primitives other commands call to enfo
239
269
 
240
270
  | Skill | Description | Source | License |
241
271
  |-------|-------------|--------|---------|
242
- | **ui-ux-pro-max** | Design intelligence: 50+ styles, 161 color palettes, 57 font pairings, 99 UX guidelines across 10 stacks | [Next Level Builder](https://github.com/skills-sh) | MIT |
272
+ | **dw-ui-discipline** | UI doctrine: 4-checkpoint hard-gate (brand authorities or curated defaults, surface job sentence, state matrix, scene sentence), 14 anti-slop patterns + 17 anti-defaults, WCAG 2.2 AA floor with verification recipes, 10 curated palette/font defaults for bootstrap | [pedronauck/skills](https://github.com/pedronauck/skills) `ui-craft` | MIT |
273
+ | **dw-testing-discipline** | Testing doctrine: Six Iron Laws, 12 positive patterns, 25 anti-patterns across 5 families (Brittleness/Flakiness/Mock-misuse/Process/AI-specific), 7 mandatory AI agent gates, flaky discipline + SLOs, Playwright recipes, browser security-boundary patterns | [pedronauck/skills](https://github.com/pedronauck/skills) `testing-boss` + [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) | MIT |
243
274
  | **vercel-react-best-practices** | 67 React/Next.js performance optimization rules across 8 priority categories. Wraps the rules with `references/perf-discipline.md` (measure → identify → fix → verify → guard) so perf work is data-driven, not vibes-based | [Vercel Labs](https://github.com/vercel-labs/agent-skills) + [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) | MIT |
244
275
  | **security-review** | Systematic vulnerability review based on OWASP with confidence-based reporting | [OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/) | CC BY-SA 4.0 |
245
276
  | **humanizer** | Detects and removes 24 AI writing patterns based on Wikipedia's "Signs of AI Writing" guide | [Wikipedia AI Writing Guide](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) | -- |
246
277
  | **remotion-best-practices** | 25+ rules for video creation in React with Remotion | [Remotion](https://www.remotion.dev/) | -- |
247
- | **webapp-testing** | Playwright-based browser testing toolkit for E2E validation and screenshots. Cross-cutting references: `security-boundary` (every byte from a browser is potentially attacker-controlled) and `three-workflow-patterns` (UI bugs vs network issues vs perf — distinct workflows, don't conflate) | [Playwright](https://playwright.dev/) + [`addyosmani/agent-skills`](https://github.com/addyosmani/agent-skills) | -- |
248
278
 
249
279
  ## Dependencies
250
280
 
@@ -284,10 +314,23 @@ After running `npx @brunosps00/dev-workflow init`:
284
314
 
285
315
  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.
286
316
 
287
- 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`), API-design discipline (`dw-codebase-intel/references/api-design-discipline.md`), and browser-DevTools patterns (`webapp-testing/references/{security-boundary, three-workflow-patterns}`) also incorporated as enhancements to existing bundled skills.
317
+ 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/`.
288
318
 
289
319
  Spec-Driven Development patterns — declarative constitution (`.dw/constitution.md`), cross-artifact consistency check (PRD ↔ TechSpec ↔ Tasks), and template override layer (`.dw/templates/overrides/`) — adapted from [`github/spec-kit`](https://github.com/github/spec-kit) by GitHub (MIT). dev-workflow specifics: embedded into existing commands instead of new slash commands, severity-graded enforcement (`info`/`high`/`critical`) with ADR-justified deviation as the escape hatch, ausência-of-constitution never blocks (auto-installs defaults and continues), and integration with the analytical `.dw/rules/` already produced by `/dw-analyze-project`.
290
320
 
321
+ UI discipline (hard-gate, 14 anti-slop patterns, 17 anti-defaults, WCAG 2.2 AA floor) and testing doctrine (Six Iron Laws, 25 anti-patterns across 5 families, 7 AI agent gates, flaky discipline) adapted from [`pedronauck/skills`](https://github.com/pedronauck/skills) `ui-craft` and `testing-boss` (MIT) into the bundled `dw-ui-discipline` and `dw-testing-discipline` skills. dev-workflow specifics: 10 curated palette/font defaults bootstrap discipline when no design authority exists; Playwright recipes from earlier `webapp-testing` migrate into `dw-testing-discipline/references/playwright-recipes.md`; both skills wire into 11 commands across the pipeline.
322
+
323
+ ## Migration from v0.12.x
324
+
325
+ The `dev-workflow update` command automatically removes the two replaced skills and installs the new ones — no manual action required:
326
+
327
+ - `ui-ux-pro-max` → replaced by `dw-ui-discipline` (auto-removed on update)
328
+ - `webapp-testing` → replaced by `dw-testing-discipline` (auto-removed on update)
329
+
330
+ The cleanup also detects and removes any **orphan `dw-*` wrappers** in `.claude/skills/`, `.agents/skills/`, and `.opencode/commands/` whose names no longer exist in the current scaffold (e.g., commands removed in v0.10 like `dw-execute-phase`, `dw-quick` that may still have wrappers from older installs).
331
+
332
+ If you had **custom edits** inside `.agents/skills/ui-ux-pro-max/` or `.agents/skills/webapp-testing/`, back them up before running update — the migrator removes the entire directory. If you customized templates instead, those live in `.dw/templates/overrides/` (introduced in v0.11) and are preserved.
333
+
291
334
  ## License
292
335
 
293
336
  MIT
package/lib/constants.js CHANGED
@@ -2,21 +2,21 @@ const COMMANDS = {
2
2
  en: [
3
3
  { name: 'dw-adr', description: 'Records an architectural decision and the trade-offs accepted, before they get lost.' },
4
4
  { name: 'dw-analyze-project', description: 'Scans the repo to learn its stack and conventions, then writes the rules other commands rely on.' },
5
- { name: 'dw-autopilot', description: 'Takes a wish and runs the full PRD-to-PR pipeline, stopping only at three approval gates.' },
5
+ { name: 'dw-autopilot', description: 'Trigger when user asks to implement, build, create, or add a feature non-trivially. Runs full PRD-to-PR pipeline with three gates.' },
6
6
  { name: 'dw-brainstorm', description: 'Refines an idea using the product\'s existing features as ground truth, before any PRD.' },
7
- { name: 'dw-bugfix', description: 'Triages a bug report, asks three sharp questions, then fixes it or routes it to a PRD.' },
8
- { name: 'dw-code-review', description: 'Level-3 review against PRD, rules, tests, and security; saves a verdict you can act on.' },
9
- { name: 'dw-commit', description: 'Groups changes by intent and writes Conventional Commits messages that read clean.' },
10
- { name: 'dw-create-prd', description: 'Writes a PRD after asking the questions that would otherwise haunt the techspec later.' },
11
- { name: 'dw-create-tasks', description: 'Breaks the PRD and techspec into tasks small enough to ship one at a time.' },
12
- { name: 'dw-create-techspec', description: 'Translates a finished PRD into a techspec the team can actually build from.' },
7
+ { name: 'dw-bugfix', description: 'Trigger when user reports a bug, pastes an error, or describes broken behavior. Triages with three questions, then fixes or routes to PRD.' },
8
+ { name: 'dw-code-review', description: 'Trigger when user asks to review code, check quality, or verify PR readiness. Level-3 review with APPROVED/REJECTED verdict.' },
9
+ { name: 'dw-commit', description: 'Trigger when implementation is complete and pending changes need to be committed. Atomic commits with Conventional Commits messages.' },
10
+ { name: 'dw-create-prd', description: 'Trigger when user has a feature idea and needs a written spec before implementation. Asks the questions a techspec would otherwise inherit.' },
11
+ { name: 'dw-create-tasks', description: 'Trigger after PRD + techspec exist and the team is ready to break work into shippable units. Includes a 5-dimension consistency check.' },
12
+ { name: 'dw-create-techspec', description: 'Trigger when a PRD is approved and architecture must be defined before tasks. Adds framework choices, test strategy, and constitution alignment.' },
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
16
  { 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
17
  { name: 'dw-fix-qa', description: 'Fixes bugs found in QA and retests them with screenshot evidence until they stay fixed.' },
18
18
  { name: 'dw-functional-doc', description: 'Maps screens and user flows into a functional doc, validated end-to-end with Playwright.' },
19
- { name: 'dw-generate-pr', description: 'Pushes the branch and opens a PR with a body that explains what changed and how to test it.' },
19
+ { name: 'dw-generate-pr', description: 'Trigger when commits are ready and the branch needs a PR. Pushes branch and opens PR with summary + test plan + hard verify gate.' },
20
20
  { name: 'dw-help', description: 'Lists every command and the flows that connect them. Pass a keyword for a contextual shortcut.' },
21
21
  { 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.' },
22
22
  { 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.' },
@@ -25,30 +25,30 @@ const COMMANDS = {
25
25
  { name: 'dw-refactoring-analysis', description: 'Catalogs code smells in Fowler\'s vocabulary and ranks them by impact, P0 to P3.' },
26
26
  { name: 'dw-review-implementation', description: 'Maps every PRD requirement to the code that delivers it, then runs /dw-code-review for the Level 3 quality layer.' },
27
27
  { name: 'dw-revert-task', description: 'Reverts the commits of one task, but only after checking nothing downstream depends on it.' },
28
- { name: 'dw-run-plan', description: 'Runs every pending task in order, with PRD-compliance review at the end.' },
28
+ { name: 'dw-run-plan', description: 'Trigger when user wants to execute all pending tasks. Goal-backward plan check, then wave-based parallel execution with atomic commits.' },
29
29
  { name: 'dw-run-qa', description: 'Drives the browser to test happy paths, edge cases, and accessibility, with screenshot proof.' },
30
- { name: 'dw-run-task', description: 'Implements one task, runs the validation that comes with it, and commits when it passes.' },
30
+ { name: 'dw-run-task', description: 'Trigger when user wants to execute one specific task by ID. Implements, validates with mandatory tests, commits when passing.' },
31
31
  { name: 'dw-security-check', description: 'OWASP review plus Trivy CVE/secret/IaC scan for TS, Python, C#, or Rust. CRITICAL or HIGH blocks the PR.' },
32
32
  { name: 'dw-update', description: 'Updates dev-workflow to the latest npm release in-place, with a snapshot you can roll back to.' },
33
33
  ],
34
34
  'pt-br': [
35
35
  { name: 'dw-adr', description: 'Registra uma decisao arquitetural e os trade-offs aceitos, antes que se percam.' },
36
36
  { name: 'dw-analyze-project', description: 'Escaneia o repo para aprender stack e convencoes, e escreve as regras que os outros commands usam.' },
37
- { name: 'dw-autopilot', description: 'Pega um desejo e roda do PRD ao PR, parando so em tres gates de aprovacao.' },
37
+ { name: 'dw-autopilot', description: 'Trigger quando usuario pede pra implementar, criar ou adicionar uma feature nao-trivial. Roda pipeline completo PRD-ao-PR com tres gates.' },
38
38
  { name: 'dw-brainstorm', description: 'Refina uma ideia usando as features existentes do produto como base, antes de qualquer PRD.' },
39
- { name: 'dw-bugfix', description: 'Tria um bug, faz tres perguntas certas, e entao corrige ou redireciona para PRD.' },
40
- { name: 'dw-code-review', description: 'Review Nivel 3 contra PRD, rules, testes e seguranca; gera um veredicto acionavel.' },
41
- { name: 'dw-commit', description: 'Agrupa as mudancas por intencao e escreve mensagens Conventional Commits limpas.' },
42
- { name: 'dw-create-prd', description: 'Escreve um PRD depois de fazer as perguntas que assombrariam o techspec depois.' },
43
- { name: 'dw-create-tasks', description: 'Quebra PRD e techspec em tasks pequenas o suficiente para entregar uma de cada vez.' },
44
- { name: 'dw-create-techspec', description: 'Traduz um PRD pronto em um techspec que o time consegue construir de fato.' },
39
+ { name: 'dw-bugfix', description: 'Trigger quando usuario reporta bug, cola erro ou descreve comportamento quebrado. Tria com tres perguntas, depois corrige ou roteia pra PRD.' },
40
+ { name: 'dw-code-review', description: 'Trigger quando usuario pede pra revisar codigo, checar qualidade ou validar prontidao pra PR. Review Nivel 3 com veredicto APROVADO/REPROVADO.' },
41
+ { name: 'dw-commit', description: 'Trigger quando implementacao esta completa e ha mudancas pendentes pra commit. Commits atomicos com mensagens Conventional Commits.' },
42
+ { name: 'dw-create-prd', description: 'Trigger quando usuario tem ideia de feature e precisa de spec escrito antes de implementar. Faz as perguntas que o techspec herdaria.' },
43
+ { name: 'dw-create-tasks', description: 'Trigger depois que PRD + techspec existem e o time vai quebrar em unidades entregaveis. Inclui consistency check em 5 dimensoes.' },
44
+ { name: 'dw-create-techspec', description: 'Trigger quando PRD esta aprovado e arquitetura precisa ser definida antes das tasks. Adiciona escolhas de framework, testes e alinhamento de constitution.' },
45
45
  { name: 'dw-deep-research', description: 'Pesquisa um topico em varias fontes, rastreia citacoes e marca o que nao confere.' },
46
46
  { 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.' },
47
47
  { 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.' },
48
48
  { name: 'dw-find-skills', description: 'Busca no ecossistema npx skills uma skill que resolva o que voce precisa, valida e instala onde voce escolher.' },
49
49
  { name: 'dw-fix-qa', description: 'Corrige bugs do QA e retesta com evidencia em screenshot ate ficarem estaveis.' },
50
50
  { name: 'dw-functional-doc', description: 'Mapeia telas e fluxos em um dossie funcional, validado E2E com Playwright.' },
51
- { name: 'dw-generate-pr', description: 'Faz push da branch e abre um PR com corpo explicando o que mudou e como testar.' },
51
+ { name: 'dw-generate-pr', description: 'Trigger quando commits estao prontos e branch precisa de PR. Push da branch e abre PR com summary + test plan + hard verify gate.' },
52
52
  { name: 'dw-help', description: 'Lista todos os commands e os fluxos que os conectam. Passe uma keyword para atalho contextual.' },
53
53
  { name: 'dw-intel', description: 'Responde perguntas sobre o codebase consultando .dw/intel/ (do /dw-map-codebase) com .dw/rules/ e grep como fallback.' },
54
54
  { 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.' },
@@ -57,9 +57,9 @@ const COMMANDS = {
57
57
  { name: 'dw-refactoring-analysis', description: 'Cataloga code smells no vocabulario de Fowler e ranqueia por impacto, P0 a P3.' },
58
58
  { name: 'dw-review-implementation', description: 'Mapeia cada requisito do PRD ao codigo que o entrega, e roda /dw-code-review para a camada de qualidade Nivel 3.' },
59
59
  { name: 'dw-revert-task', description: 'Reverte os commits de uma task, mas so depois de checar que nada a frente depende dela.' },
60
- { name: 'dw-run-plan', description: 'Roda todas as tasks pendentes em ordem, com review de PRD compliance no final.' },
60
+ { name: 'dw-run-plan', description: 'Trigger quando usuario quer executar todas as tasks pendentes. Plan check goal-backward, depois execucao paralela em ondas com commits atomicos.' },
61
61
  { name: 'dw-run-qa', description: 'Pilota o browser para testar fluxo feliz, edge cases e acessibilidade, com screenshot.' },
62
- { name: 'dw-run-task', description: 'Implementa uma task, roda a validacao que vem com ela, e commita quando passa.' },
62
+ { name: 'dw-run-task', description: 'Trigger quando usuario quer executar uma task especifica por ID. Implementa, valida com testes obrigatorios, commita quando passa.' },
63
63
  { name: 'dw-security-check', description: 'Review OWASP + scan Trivy CVE/secret/IaC para TS, Python, C# ou Rust. CRITICAL ou HIGH bloqueia PR.' },
64
64
  { name: 'dw-update', description: 'Atualiza o dev-workflow para o release mais recente no npm, com snapshot para rollback.' },
65
65
  ],
package/lib/init.js CHANGED
@@ -1,10 +1,11 @@
1
1
  const path = require('path');
2
2
  const { COMMANDS } = require('./constants');
3
- const { ensureDir, copyDir, writeFile, log } = require('./utils');
3
+ const { ensureDir, copyDir, writeFile, upsertDelimitedBlock, log } = require('./utils');
4
4
  const { selectLanguage } = require('./prompts');
5
5
  const { generateWrappers } = require('./wrappers');
6
6
  const { installMCPs } = require('./mcp');
7
7
  const { migrate: migrateGsd } = require('./migrate-gsd');
8
+ const { migrate: migrateSkills } = require('./migrate-skills');
8
9
 
9
10
  const SCAFFOLD_DIR = path.join(__dirname, '..', 'scaffold');
10
11
 
@@ -20,8 +21,10 @@ async function run({ force = false, lang = null, mode = 'init' }) {
20
21
  console.log(` ${'='.repeat(40)}\n`);
21
22
 
22
23
  // 0. GSD migration (idempotent; only runs if legacy GSD artifacts are detected)
24
+ // 0.1. Skill migration: removed bundled skills + orphan dw-* wrappers (idempotent)
23
25
  if (isUpdate) {
24
26
  migrateGsd(projectRoot);
27
+ migrateSkills(projectRoot);
25
28
  }
26
29
 
27
30
  // 1. Select language
@@ -144,6 +147,26 @@ async function run({ force = false, lang = null, mode = 'init' }) {
144
147
  console.log(` ${skillsResults.created} created, ${skillsResults.skipped} skipped, ${skillsResults.overwritten} overwritten\n`);
145
148
  }
146
149
 
150
+ // 5.7. Install CLAUDE.md + AGENTS.md with auto-trigger decision tree
151
+ // Both files receive the same content (Claude Code reads CLAUDE.md; Codex/Copilot/OpenCode
152
+ // converge on AGENTS.md). Merge-aware: user edits outside the dev-workflow markers are preserved.
153
+ const agentInstructionsSrc = path.join(langDir, 'agent-instructions.md');
154
+ if (require('fs').existsSync(agentInstructionsSrc)) {
155
+ console.log(' Agent instructions:');
156
+ const blockContent = require('fs').readFileSync(agentInstructionsSrc, 'utf-8');
157
+ const startMarker = '<!-- dev-workflow:start -->';
158
+ const endMarker = '<!-- dev-workflow:end -->';
159
+ for (const fileName of ['CLAUDE.md', 'AGENTS.md']) {
160
+ const target = path.join(projectRoot, fileName);
161
+ const status = upsertDelimitedBlock(target, blockContent, startMarker, endMarker);
162
+ log(status === 'unchanged' ? 'skipped' : (status === 'created' ? 'created' : 'overwritten'), target);
163
+ if (status === 'created') totalCreated++;
164
+ else if (status === 'updated') totalOverwritten++;
165
+ else totalSkipped++;
166
+ }
167
+ console.log();
168
+ }
169
+
147
170
  // 6. Create .opencode/package.json
148
171
  const opencodePackageJson = path.join(projectRoot, '.opencode', 'package.json');
149
172
  const opencodeContent = JSON.stringify({ dependencies: { '@opencode-ai/plugin': '1.2.17' } }, null, 2) + '\n';
@@ -0,0 +1,129 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const { COMMANDS } = require('./constants');
4
+ const removedSkills = require('./removed-bundled-skills');
5
+
6
+ /**
7
+ * Cleanup-on-update for dev-workflow.
8
+ *
9
+ * Two complementary scans:
10
+ *
11
+ * 1. Removed bundled skills (data-driven from `removed-bundled-skills.js`):
12
+ * Detects `.agents/skills/<name>/` directories that match the manifest of
13
+ * skills removed in past releases. Removes them and notes the replacement.
14
+ *
15
+ * 2. Orphan command wrappers (state-comparison vs `constants.js`):
16
+ * Lists `.claude/skills/dw-*`, `.agents/skills/dw-*`, and
17
+ * `.opencode/commands/dw-*.md` wrappers on disk. Any `dw-*` wrapper whose
18
+ * base name is NOT present in the current `COMMANDS[lang]` is removed.
19
+ *
20
+ * Only touches names with prefix `dw-` (or names explicitly listed in the
21
+ * manifest). Never touches third-party skills/commands.
22
+ *
23
+ * Idempotent: silent when nothing to clean.
24
+ *
25
+ * Run automatically from lib/init.js when mode === 'update'.
26
+ */
27
+ function migrate(projectRoot) {
28
+ const removed = scanRemovedBundledSkills(projectRoot);
29
+ const orphans = scanOrphanCommandWrappers(projectRoot);
30
+
31
+ if (removed.length === 0 && orphans.length === 0) {
32
+ return null; // silent — nothing to clean
33
+ }
34
+
35
+ console.log('\n Skill migration:');
36
+
37
+ for (const entry of removed) {
38
+ console.log(
39
+ ` \x1b[33m-\x1b[0m [v${entry.removedIn}] Removing legacy skill ${entry.name} (replaced by ${entry.replacedBy})`
40
+ );
41
+ rmRecursive(entry.path);
42
+ }
43
+
44
+ for (const entry of orphans) {
45
+ const rel = path.relative(projectRoot, entry.path);
46
+ console.log(
47
+ ` \x1b[33m-\x1b[0m [orphan] Removing wrapper ${rel} — command no longer exists`
48
+ );
49
+ rmRecursive(entry.path);
50
+ }
51
+
52
+ console.log();
53
+ return { removed: removed.length, orphans: orphans.length };
54
+ }
55
+
56
+ function scanRemovedBundledSkills(projectRoot) {
57
+ const matches = [];
58
+ const agentsSkillsDir = path.join(projectRoot, '.agents', 'skills');
59
+
60
+ if (!fs.existsSync(agentsSkillsDir)) return matches;
61
+
62
+ for (const entry of removedSkills) {
63
+ const target = path.join(agentsSkillsDir, entry.name);
64
+ if (fs.existsSync(target)) {
65
+ matches.push({ ...entry, path: target });
66
+ }
67
+ }
68
+ return matches;
69
+ }
70
+
71
+ function scanOrphanCommandWrappers(projectRoot) {
72
+ const orphans = [];
73
+
74
+ // Build the canonical "known names" set:
75
+ // - Commands from constants.js (en + pt-br union) — these become wrappers.
76
+ // - Bundled skills from scaffold/skills/ — these are copied verbatim into
77
+ // .agents/skills/ and .claude/skills/ alongside wrappers. They're NOT
78
+ // orphans even though they share the .agents/skills/ directory with
79
+ // command wrappers.
80
+ const canonical = new Set();
81
+ for (const lang of Object.keys(COMMANDS)) {
82
+ for (const cmd of COMMANDS[lang]) {
83
+ canonical.add(cmd.name);
84
+ }
85
+ }
86
+ const scaffoldSkillsDir = path.join(__dirname, '..', 'scaffold', 'skills');
87
+ if (fs.existsSync(scaffoldSkillsDir)) {
88
+ for (const entry of fs.readdirSync(scaffoldSkillsDir, { withFileTypes: true })) {
89
+ if (entry.isDirectory()) canonical.add(entry.name);
90
+ }
91
+ }
92
+
93
+ // Scan locations
94
+ const locations = [
95
+ { dir: path.join(projectRoot, '.claude', 'skills'), type: 'directory' },
96
+ { dir: path.join(projectRoot, '.agents', 'skills'), type: 'directory' },
97
+ { dir: path.join(projectRoot, '.opencode', 'commands'), type: 'file', suffix: '.md' },
98
+ ];
99
+
100
+ for (const loc of locations) {
101
+ if (!fs.existsSync(loc.dir)) continue;
102
+ const entries = fs.readdirSync(loc.dir, { withFileTypes: true });
103
+
104
+ for (const entry of entries) {
105
+ const name = loc.suffix ? entry.name.replace(loc.suffix, '') : entry.name;
106
+
107
+ // Only scan dw-* prefix
108
+ if (!name.startsWith('dw-')) continue;
109
+
110
+ // Skip if it matches a canonical command OR a bundled skill
111
+ if (canonical.has(name)) continue;
112
+
113
+ // Match the expected entry type (directory or file)
114
+ const isExpected = loc.type === 'directory' ? entry.isDirectory() : entry.isFile();
115
+ if (!isExpected) continue;
116
+
117
+ orphans.push({ path: path.join(loc.dir, entry.name) });
118
+ }
119
+ }
120
+
121
+ return orphans;
122
+ }
123
+
124
+ function rmRecursive(target) {
125
+ if (!fs.existsSync(target)) return;
126
+ fs.rmSync(target, { recursive: true, force: true });
127
+ }
128
+
129
+ module.exports = { migrate };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Manifest of bundled skills removed in past releases.
3
+ *
4
+ * APPEND-ONLY: never modify or remove entries. A removed skill stays in
5
+ * this manifest forever so old installs still get cleaned up when the
6
+ * user runs `dev-workflow update`.
7
+ *
8
+ * Each entry triggers `.agents/skills/<name>/` removal during update
9
+ * (see lib/migrate-skills.js).
10
+ */
11
+ module.exports = [
12
+ // v0.13.0 — replaced TASTE catalog (161 palettes) with discipline (hard-gate + anti-slop + WCAG floor)
13
+ { name: 'ui-ux-pro-max', removedIn: '0.13.0', replacedBy: 'dw-ui-discipline' },
14
+ // v0.13.0 — replaced Playwright recipes wrapper with full testing doctrine (Iron Laws + 25 anti-patterns + 7 AI gates)
15
+ { name: 'webapp-testing', removedIn: '0.13.0', replacedBy: 'dw-testing-discipline' },
16
+ ];
package/lib/uninstall.js CHANGED
@@ -56,13 +56,17 @@ function run() {
56
56
 
57
57
  // 3. Remove bundled skills from .agents/skills/
58
58
  console.log(' Bundled skills:');
59
+ // Currently-active bundled skills. If a skill is removed in a future release,
60
+ // add it to lib/removed-bundled-skills.js (append-only manifest used by
61
+ // migrate-skills.js during `dev-workflow update`); this list is just for
62
+ // wholesale uninstall.
59
63
  const bundledSkills = [
64
+ 'dw-ui-discipline',
65
+ 'dw-testing-discipline',
60
66
  'humanizer',
61
67
  'remotion-best-practices',
62
68
  'security-review',
63
- 'ui-ux-pro-max',
64
69
  'vercel-react-best-practices',
65
- 'webapp-testing',
66
70
  ];
67
71
  for (const skill of bundledSkills) {
68
72
  removeDir(path.join(projectRoot, '.agents', 'skills', skill));
package/lib/utils.js CHANGED
@@ -60,6 +60,48 @@ function copyDir(srcDir, destDir, force = false, overridesDir = null) {
60
60
  return results;
61
61
  }
62
62
 
63
+ /**
64
+ * Upsert a delimited block inside an existing file.
65
+ *
66
+ * - If the file does not exist, creates it with the new block content.
67
+ * - If the file exists with markers, replaces only the content between markers.
68
+ * - If the file exists WITHOUT markers, appends the block (preserves existing content).
69
+ *
70
+ * Returns 'created' | 'updated' | 'unchanged'.
71
+ */
72
+ function upsertDelimitedBlock(filePath, blockContent, startMarker, endMarker) {
73
+ const exists = fileExists(filePath);
74
+ ensureDir(path.dirname(filePath));
75
+
76
+ // The block content already includes its own start/end markers (so the scaffold
77
+ // file can be read verbatim). Validate that.
78
+ if (!blockContent.includes(startMarker) || !blockContent.includes(endMarker)) {
79
+ throw new Error(`Block content for ${filePath} is missing its markers`);
80
+ }
81
+
82
+ if (!exists) {
83
+ fs.writeFileSync(filePath, blockContent.endsWith('\n') ? blockContent : blockContent + '\n', 'utf-8');
84
+ return 'created';
85
+ }
86
+
87
+ const current = fs.readFileSync(filePath, 'utf-8');
88
+ const hasMarkers = current.includes(startMarker) && current.includes(endMarker);
89
+
90
+ if (!hasMarkers) {
91
+ const separator = current.endsWith('\n') ? '\n' : '\n\n';
92
+ const next = current + separator + (blockContent.endsWith('\n') ? blockContent : blockContent + '\n');
93
+ fs.writeFileSync(filePath, next, 'utf-8');
94
+ return 'updated';
95
+ }
96
+
97
+ const before = current.slice(0, current.indexOf(startMarker));
98
+ const after = current.slice(current.indexOf(endMarker) + endMarker.length);
99
+ const next = before + blockContent.trim() + after;
100
+ if (next === current) return 'unchanged';
101
+ fs.writeFileSync(filePath, next, 'utf-8');
102
+ return 'updated';
103
+ }
104
+
63
105
  function log(status, filePath) {
64
106
  const icons = {
65
107
  created: '\x1b[32m+\x1b[0m',
@@ -71,4 +113,4 @@ function log(status, filePath) {
71
113
  console.log(` ${icon} ${relative} [${status}]`);
72
114
  }
73
115
 
74
- module.exports = { ensureDir, fileExists, copyFile, writeFile, copyDir, log };
116
+ module.exports = { ensureDir, fileExists, copyFile, writeFile, copyDir, upsertDelimitedBlock, log };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "0.11.0",
3
+ "version": "0.13.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"
@@ -0,0 +1,68 @@
1
+ <!-- dev-workflow:start -->
2
+ # dev-workflow — AI Agent Instructions
3
+
4
+ This project uses [`@brunosps00/dev-workflow`](https://www.npmjs.com/package/@brunosps00/dev-workflow) (`dw-*` commands) for structured AI-driven development. The commands compose into a PRD → TechSpec → Tasks → Implement → Review → Commit → PR pipeline with hard gates for security, constitution compliance, and verification.
5
+
6
+ **The whole point of this file:** when the user states an intent that matches the Trigger Map below, run the matching `dw-*` command **without asking permission first** — unless the change is genuinely trivial (see Escape Hatches).
7
+
8
+ ## Trigger Map
9
+
10
+ | User intent (literal or paraphrased) | Auto-trigger |
11
+ |--------------------------------------|--------------|
12
+ | "Implement X" / "Build Y" / "Add feature Z" / "I need ..." / "Create ..." | `/dw-autopilot "X"` |
13
+ | Pasted error / "X is broken" / "Bug in Y" / failing test screenshot | `/dw-bugfix "X"` |
14
+ | "Run this task" (with task ID) | `/dw-run-task <ID>` |
15
+ | "Run all pending tasks" / "Execute the plan" | `/dw-run-plan` |
16
+ | "Review my PR" / "Check code quality" / "Is this ready to ship?" | `/dw-code-review` |
17
+ | "Time to commit" / changes are validated and ready | `/dw-commit` |
18
+ | "Open a PR" / "Ship this" | `/dw-generate-pr` |
19
+ | "Write a PRD for X" / "Spec out Y" | `/dw-create-prd` |
20
+ | "Design the architecture" / "Make the techspec" | `/dw-create-techspec` |
21
+ | "Break this into tasks" | `/dw-create-tasks` |
22
+ | "Where is X?" / "What uses Y?" / "How is Z structured?" | `/dw-intel "<question>"` |
23
+ | "Audit our dependencies" / "Are we behind on packages?" | `/dw-deps-audit` |
24
+ | "Scan for vulnerabilities" / "Security check" | `/dw-security-check` |
25
+ | "QA this feature" / "Run the test plan" | `/dw-run-qa` |
26
+ | "Fix the QA bugs" | `/dw-fix-qa` |
27
+
28
+ **Priority:** when in doubt between two commands, `/dw-autopilot` is the safest default for any non-trivial feature request — it composes the rest.
29
+
30
+ ## Hard Gates (the commands enforce these — don't bypass)
31
+
32
+ - **`.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.
33
+ - **`.dw/spec/<prd>/tasks-validation.md`**: auto-generated at the end of `/dw-create-tasks`. Any FAIL dimension blocks user approval until resolved or explicitly overridden.
34
+ - **Verification**: `/dw-generate-pr` requires a fresh `dw-verify` PASS (tests + lint + build) after the last edit.
35
+ - **Security**: TS / Python / C# / Rust projects must pass `/dw-security-check` (Trivy + OWASP + lockfile audit) before the PR opens.
36
+
37
+ ## Escape Hatches — do NOT auto-trigger
38
+
39
+ When any of these apply, answer directly and do **not** invoke a `dw-*` command:
40
+
41
+ - One-line typo, rename, import sort, comment fix.
42
+ - Pure exploration: "how does this work?", "show me X", "explain Y".
43
+ - Aesthetic preference: "I prefer this style" — apply, don't run a pipeline.
44
+ - User explicitly says "do this directly" / "skip autopilot" / "no need for a PRD" — honor it.
45
+ - The conversation is already inside a `dw-*` flow (you're already executing tasks; don't start a new pipeline).
46
+
47
+ ## Workflow Reference
48
+
49
+ ```
50
+ /dw-autopilot "wish" ────► Runs entire pipeline automatically
51
+ (3 gates: PRD approval, Tasks approval, PR confirmation)
52
+
53
+ --- OR step-by-step ---
54
+
55
+ /dw-brainstorm ─► /dw-create-prd ─► /dw-create-techspec ─► /dw-create-tasks
56
+
57
+
58
+ /dw-commit + /dw-generate-pr ◄──── /dw-code-review ◄──── /dw-run-plan
59
+ ```
60
+
61
+ Full command list and contextual help: `/dw-help`.
62
+
63
+ ## Editing this section
64
+
65
+ This block lives between `<!-- dev-workflow:start -->` and `<!-- dev-workflow:end -->` markers. Anything you write **outside** these markers in `CLAUDE.md` / `AGENTS.md` is preserved on every `dev-workflow update`. Anything **inside** is refreshed from the package — your edits inside the block will be overwritten.
66
+
67
+ To customize the trigger map permanently, copy the block content to outside the markers (or to a separate file like `.dw/agent-instructions-custom.md`) and edit there.
68
+ <!-- dev-workflow:end -->
@@ -141,7 +141,7 @@ Present to the user:
141
141
  ### Step 7: Design Contract (Conditional)
142
142
 
143
143
  Evaluate whether tasks involve frontend:
144
- - **YES** (run `/dw-redesign-ui`): if there are tasks with visual components AND the `ui-ux-pro-max` skill is available
144
+ - **YES** (run `/dw-redesign-ui`): if there are tasks with visual components AND the `dw-ui-discipline` skill is available
145
145
  - Generate the design contract in `.dw/spec/prd-[name]/design-contract.md`
146
146
  - Present a summary of the design contract to the user (palette, typography, mobile/desktop layout) as a visual checkpoint before proceeding
147
147
  - **NO** (skip to step 8): purely backend/infra tasks
@@ -41,7 +41,7 @@ digraph brainstorm_decision {
41
41
  When available in the project under `./.agents/skills/`, use these skills to enrich ideation:
42
42
 
43
43
  - `dw-council` (opt-in via `--council`): multi-advisor stress-test of the most promising options with mandatory steel-manning and concession tracking. **DO NOT invoke by default** — only when the flag is present or when consensus forms too quickly (false-consensus signal).
44
- - `ui-ux-pro-max`: use when brainstorming involves frontend, UI style direction, design system choices, or visual identity exploration
44
+ - `dw-ui-discipline`: use when brainstorming involves frontend or UI direction — its hard-gate (scene sentence, surface job) is a generative forcing function during ideation, not just a review check
45
45
  - `vercel-react-best-practices`: use when brainstorming React/Next.js architecture or performance trade-offs
46
46
  - `security-review`: use when brainstorming touches auth, data handling, or security-sensitive features
47
47
 
@@ -18,7 +18,7 @@
18
18
  - `dw-debug-protocol`: **ALWAYS** — runs the bug through the six-step triage (Reproduce → Localize → Reduce → Fix Root Cause → Guard → Verify End-to-End). Stop-the-line discipline; root-cause over symptom; regression test committed in the same atomic commit. Non-reproducible bugs follow the instrument-first sub-protocol — no guess fixes without explicit acknowledgement.
19
19
  - `dw-verify`: **ALWAYS** — in Direct mode, invoked before committing the fix. The VERIFICATION REPORT must show the original bug symptom no longer reproduces (not just that tests pass).
20
20
  - `vercel-react-best-practices`: use when the bug affects React/Next.js and there is suspicion of render, hydration, fetching, waterfall, bundle, or re-render issues
21
- - `webapp-testing`: use when the fix requires a reproducible E2E/retest flow in a web app
21
+ - `dw-testing-discipline`: use when the fix requires a reproducible E2E/retest flow in a web app — `references/playwright-recipes.md` for recipes, Iron Laws + 7 AI Gates for any test the fix adds, flaky-discipline if the bug surfaces intermittently.
22
22
  - `security-review`: use when the root cause touches auth, authorization, external input, upload, secrets, SQL, XSS, SSRF, or other sensitive surfaces
23
23
 
24
24
  ## Input Variables
@@ -159,7 +159,7 @@
159
159
  - Related error messages
160
160
  - Stack traces
161
161
  - Recently modified files
162
- - If the bug is UI-related or depends on browser flow, supplement collection with `webapp-testing`
162
+ - If the bug is UI-related or depends on browser flow, supplement collection with `dw-testing-discipline` (playwright-recipes + three-workflow-patterns to pick the right verification mode)
163
163
 
164
164
  ### 3. Clarification Questions (MANDATORY - EXACTLY 3)
165
165
 
@@ -197,7 +197,7 @@
197
197
  - **Probable Cause**: Based on the evidence
198
198
  - **Affected Files**: List of files to modify
199
199
  - **Impact**: Other components that may be affected
200
- - **Skills used**: explicitly record if the analysis used `vercel-react-best-practices`, `webapp-testing`, or `security-review`
200
+ - **Skills used**: explicitly record if the analysis used `vercel-react-best-practices`, `dw-testing-discipline`, or `security-review`
201
201
 
202
202
  ### 4.1 Scope Checkpoint (MANDATORY)
203
203
 
@@ -25,7 +25,7 @@
25
25
  - `dw-council` (opt-in via `--council`): multi-advisor debate on the primary architectural decision with steel-manning. **DO NOT invoke by default**.
26
26
  - `dw-source-grounding` (**ALWAYS**): every framework/library decision must follow Detect → Fetch → Implement → Cite. The techspec emits inline citations `[source: <url>, version: X.Y, retrieved: YYYY-MM-DD]` next to each architectural decision.
27
27
  - `vercel-react-best-practices`: use when defining frontend architecture for React/Next.js projects
28
- - `ui-ux-pro-max`: use when defining design system decisions, color palettes, typography, and UI style for the TechSpec
28
+ - `dw-ui-discipline`: use when the TechSpec includes UI sections — enforces the 4-checkpoint hard-gate (brand authorities / surface job / state matrix / scene sentence), the 14 anti-slop patterns, and the WCAG 2.2 AA floor BEFORE design decisions land.
29
29
  - `security-review`: use when the feature touches auth, authorization, or sensitive data handling
30
30
 
31
31
  ## Codebase Intelligence