@brunosps00/dev-workflow 2.2.0 → 2.3.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 (119) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +46 -0
  3. package/README.md +12 -4
  4. package/lib/constants.js +24 -24
  5. package/lib/init.js +8 -0
  6. package/lib/instruction-health.js +38 -0
  7. package/lib/post-update.js +2 -1
  8. package/lib/validate.js +3 -1
  9. package/package.json +1 -1
  10. package/scaffold/config/routing.json +61 -23
  11. package/scaffold/en/agent-instructions.md +31 -137
  12. package/scaffold/en/commands/dw-analyze-project.md +2 -0
  13. package/scaffold/en/commands/dw-autopilot.md +22 -245
  14. package/scaffold/en/commands/dw-bugfix.md +9 -35
  15. package/scaffold/en/commands/dw-claude-run.md +29 -45
  16. package/scaffold/en/commands/dw-codex-run.md +30 -45
  17. package/scaffold/en/commands/dw-context-budget.md +6 -14
  18. package/scaffold/en/commands/dw-copilot-run.md +29 -41
  19. package/scaffold/en/commands/dw-generate-pr.md +2 -2
  20. package/scaffold/en/commands/dw-goal.md +11 -5
  21. package/scaffold/en/commands/dw-help.md +2 -2
  22. package/scaffold/en/commands/dw-plan.md +14 -7
  23. package/scaffold/en/commands/dw-qa.md +2 -0
  24. package/scaffold/en/commands/dw-resume.md +5 -11
  25. package/scaffold/en/commands/dw-review.md +4 -3
  26. package/scaffold/en/commands/dw-run.md +19 -166
  27. package/scaffold/en/commands/dw-skill-health.md +7 -0
  28. package/scaffold/en/commands/dw-update.md +18 -4
  29. package/scaffold/en/references/command-routing.md +53 -0
  30. package/scaffold/en/references/execution-contract.md +55 -0
  31. package/scaffold/en/templates/frontend-quality-template.md +43 -0
  32. package/scaffold/en/templates/task-template.md +20 -40
  33. package/scaffold/en/templates/tasks-template.md +9 -6
  34. package/scaffold/en/templates/techspec-template.md +4 -0
  35. package/scaffold/pt-br/agent-instructions.md +31 -137
  36. package/scaffold/pt-br/commands/dw-analyze-project.md +2 -0
  37. package/scaffold/pt-br/commands/dw-autopilot.md +22 -245
  38. package/scaffold/pt-br/commands/dw-bugfix.md +9 -35
  39. package/scaffold/pt-br/commands/dw-claude-run.md +29 -46
  40. package/scaffold/pt-br/commands/dw-codex-run.md +30 -45
  41. package/scaffold/pt-br/commands/dw-context-budget.md +6 -14
  42. package/scaffold/pt-br/commands/dw-copilot-run.md +29 -43
  43. package/scaffold/pt-br/commands/dw-generate-pr.md +2 -2
  44. package/scaffold/pt-br/commands/dw-goal.md +11 -5
  45. package/scaffold/pt-br/commands/dw-help.md +2 -2
  46. package/scaffold/pt-br/commands/dw-plan.md +14 -7
  47. package/scaffold/pt-br/commands/dw-qa.md +2 -0
  48. package/scaffold/pt-br/commands/dw-resume.md +7 -11
  49. package/scaffold/pt-br/commands/dw-review.md +4 -3
  50. package/scaffold/pt-br/commands/dw-run.md +19 -166
  51. package/scaffold/pt-br/commands/dw-skill-health.md +7 -0
  52. package/scaffold/pt-br/commands/dw-update.md +18 -4
  53. package/scaffold/pt-br/references/command-routing.md +53 -0
  54. package/scaffold/pt-br/references/execution-contract.md +55 -0
  55. package/scaffold/pt-br/templates/frontend-quality-template.md +43 -0
  56. package/scaffold/pt-br/templates/task-template.md +20 -40
  57. package/scaffold/pt-br/templates/tasks-template.md +9 -6
  58. package/scaffold/pt-br/templates/techspec-template.md +4 -0
  59. package/scaffold/scripts/lib/workflow-contract.mjs +101 -0
  60. package/scaffold/skill-registry.json +23 -23
  61. package/scaffold/skills/dw-cli-run/SKILL.md +33 -217
  62. package/scaffold/skills/dw-cli-run/references/dispatch-tuning.md +14 -72
  63. package/scaffold/skills/dw-codebase-intel/SKILL.md +5 -39
  64. package/scaffold/skills/dw-codebase-intel/agents/intel-updater.md +1 -1
  65. package/scaffold/skills/dw-codebase-intel/references/agents-detail.md +7 -0
  66. package/scaffold/skills/dw-codebase-intel/references/files-in-dw-intel-detail.md +16 -0
  67. package/scaffold/skills/dw-codebase-intel/references/how-dw-intel-reads-this-detail.md +12 -0
  68. package/scaffold/skills/dw-codebase-intel/references/how-to-compose-the-typical-flow-detail.md +11 -0
  69. package/scaffold/skills/dw-council/SKILL.md +2 -17
  70. package/scaffold/skills/dw-council/references/integration-with-other-dw-commands-detail.md +7 -0
  71. package/scaffold/skills/dw-council/references/phase-2-tensions-and-rebuttals-detail.md +15 -0
  72. package/scaffold/skills/dw-domain-modeling/SKILL.md +1 -1
  73. package/scaffold/skills/dw-execute-phase/SKILL.md +12 -32
  74. package/scaffold/skills/dw-execute-phase/agents/executor.md +15 -252
  75. package/scaffold/skills/dw-execute-phase/agents/plan-checker.md +4 -207
  76. package/scaffold/skills/dw-execute-phase/references/atomic-commits.md +8 -18
  77. package/scaffold/skills/dw-execute-phase/references/de-sloppify-pass-optional-cleanup-task-detail.md +12 -0
  78. package/scaffold/skills/dw-execute-phase/references/deviation-rules-during-execution-detail.md +8 -0
  79. package/scaffold/skills/dw-execute-phase/references/how-the-two-agents-compose-detail.md +7 -0
  80. package/scaffold/skills/dw-execute-phase/references/plan-verification.md +9 -155
  81. package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +6 -97
  82. package/scaffold/skills/dw-git-discipline/SKILL.md +2 -2
  83. package/scaffold/skills/dw-grilling/SKILL.md +1 -1
  84. package/scaffold/skills/dw-incident-response/SKILL.md +1 -64
  85. package/scaffold/skills/dw-incident-response/references/the-five-phases-detail.md +66 -0
  86. package/scaffold/skills/dw-llm-eval/SKILL.md +5 -53
  87. package/scaffold/skills/dw-llm-eval/references/agent-tool-use-evaluation-detail.md +23 -0
  88. package/scaffold/skills/dw-llm-eval/references/anti-patterns-will-block-in-dw-review-code-only-detail.md +9 -0
  89. package/scaffold/skills/dw-llm-eval/references/consistency-run-to-run-stability-detail.md +10 -0
  90. package/scaffold/skills/dw-llm-eval/references/integration-with-dev-workflow-commands-detail.md +6 -0
  91. package/scaffold/skills/dw-llm-eval/references/the-oracle-ladder-detail.md +15 -0
  92. package/scaffold/skills/dw-memory/SKILL.md +4 -50
  93. package/scaffold/skills/dw-memory/references/context-budget.md +8 -56
  94. package/scaffold/skills/dw-memory/references/promotion-decision-test-detail.md +30 -0
  95. package/scaffold/skills/dw-minimalism/SKILL.md +4 -5
  96. package/scaffold/skills/dw-review-rigor/SKILL.md +1 -54
  97. package/scaffold/skills/dw-review-rigor/references/the-five-rules-detail.md +56 -0
  98. package/scaffold/skills/dw-simplification/SKILL.md +2 -55
  99. package/scaffold/skills/dw-simplification/references/pattern-recognition-detail.md +11 -0
  100. package/scaffold/skills/dw-simplification/references/the-five-rules-detail.md +48 -0
  101. package/scaffold/skills/dw-source-grounding/SKILL.md +1 -56
  102. package/scaffold/skills/dw-source-grounding/references/the-protocol-detect-fetch-implement-cite-detail.md +58 -0
  103. package/scaffold/skills/dw-testing-discipline/SKILL.md +25 -177
  104. package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +9 -167
  105. package/scaffold/skills/dw-testing-discipline/references/core-rules.md +3 -3
  106. package/scaffold/skills/dw-testing-discipline/references/mutation-testing.md +19 -0
  107. package/scaffold/skills/dw-testing-discipline/references/patterns.md +3 -12
  108. package/scaffold/skills/dw-ui-discipline/SKILL.md +2 -59
  109. package/scaffold/skills/dw-ui-discipline/references/frontend-engineering.md +46 -0
  110. package/scaffold/skills/dw-ui-discipline/references/the-four-grounding-questions-detail.md +61 -0
  111. package/scaffold/skills/dw-verify/SKILL.md +26 -148
  112. package/scaffold/skills/dw-verify/references/verification-discovery-and-attribution.md +2 -2
  113. package/scaffold/skills/humanizer/SKILL.md +2 -1
  114. package/scaffold/skills/security-review/SKILL.md +3 -183
  115. package/scaffold/skills/security-review/references/do-not-flag-detail.md +49 -0
  116. package/scaffold/skills/security-review/references/quick-patterns-reference-detail.md +56 -0
  117. package/scaffold/skills/security-review/references/review-process-detail.md +84 -0
  118. package/scaffold/skills/vercel-react-best-practices/SKILL.md +1 -90
  119. package/scaffold/skills/vercel-react-best-practices/references/quick-reference-detail.md +92 -0
@@ -1,180 +1,33 @@
1
1
  <system_instructions>
2
- You are the task execution orchestrator. Two modes: execute ONE specific task, or execute ALL pending tasks in dependency order. Both modes apply the same task-level guarantees (atomic commit per task, mandatory tests, verify before commit, deviation handling).
2
+ # Execute approved tasks
3
3
 
4
- ## When to Use
5
- - Use `run` after `/dw-plan` has produced `tasks.md` + per-task files and the tasks are approved.
6
- - Use to execute a single targeted task during incremental development.
7
- - Do NOT use for bug fixes — `/dw-bugfix` handles those.
8
- - Do NOT use without an approved tasks breakdown — tasks files MUST exist.
4
+ Use `/dw-run` for all pending tasks, `/dw-run <task-id>` for one, and `/dw-run --resume` to continue. Inputs are the task ID and active `.dw/spec/<prd>/` directory. Tasks and dependencies must exist and be approved. For investigation without a plan use `/dw-bugfix`.
9
5
 
10
- ## Pipeline Position
11
- **Predecessor:** `/dw-plan` (with tasks approved) | **Successor:** `/dw-review` then `/dw-commit` + `/dw-generate-pr`
6
+ ## Assignment and preparation
12
7
 
13
- ## Modes
8
+ Read `.dw/references/execution-contract.md` and the relevant task file. Consume `execution-plan.json` when present; validate it with `node .dw/scripts/lib/workflow-contract.mjs validate <plan.json>`. Cross-check IDs/dependencies against tasks.md. Legacy schema 1.0 tasks without assignments execute locally. Never infer cross-tool authorization from installed CLIs alone.
14
9
 
15
- | Invocation | Behavior |
16
- |------------|----------|
17
- | `/dw-run` | **Default.** Executes ALL pending tasks from `tasks.md` in dependency order. Wave-based parallel dispatch for independent tasks. Atomic commit per task. After all complete, runs Level 2 review (PRD compliance). |
18
- | `/dw-run <task-id>` | Executes ONE specific task by ID (e.g., `1.0`, `2.3`). Includes Level 1 validation. Atomic commit on success. |
19
- | `/dw-run --resume` | Resumes an interrupted multi-task plan from where it stopped. Reads `.dw/spec/<prd>/active-session.md` if present; otherwise continues from first pending task. |
10
+ Respect applicable constitution decisions and the task's requirement IDs (`FR-N.M` / `RF-N.M`). Missing constitution uses non-blocking defaults. Inspect relevant source and project rules; query `.dw/intel/` only when useful and check freshness. Do not require a full repository map before every task.
20
11
 
21
- ## Inputs
12
+ Load skills by need: `dw-verify` for evidence, `dw-memory` for relevant durable decisions/checkpoints, `dw-testing-discipline` when designing tests, `dw-ui-discipline` for UI, `dw-llm-eval` for AI behavior, `dw-execute-phase` for dependency/plan checks. Use `dw-search-first` for new dependencies and `dw-minimalism` for a concrete abstraction/scope decision, not before each new function. Use `dw-simplification` for an explicitly scoped cleanup after verification. For explicitly requested TDD/test first/red-green-refactor, use `dw-testing-discipline/references/tdd-loop.md` for that task.
22
13
 
23
- | Variable | Description | Example |
24
- |----------|-------------|---------|
25
- | `{{TASK_ID}}` | Specific task identifier (optional — defaults to all pending) | `1.0`, `2.3`, `5.1` |
26
- | `{{PRD_PATH}}` | Path to PRD directory containing tasks (optional — auto-detect from active branch) | `.dw/spec/prd-invoice-export` |
14
+ ## Execution loop
27
15
 
28
- ## Complementary Skills
16
+ 1. Arm `/dw-report` once (idempotent, skipped when `DW_REPORT_AUTO=off`). Validate task coverage, dependency graph and acceptance checks using `dw-execute-phase`; repair internal inconsistencies before execution, ask only for missing material decisions.
17
+ 2. Choose the next task whose dependencies are complete on the execution branch. Independent tasks may run concurrently only with approved agents/worktrees and a defined integration path. One writer per worktree; coupled tasks stay sequential.
18
+ 3. Use the approved task executor/model/effort/agents. Local assignments execute in the current workflow. Cross-tool assignments invoke `/dw-codex-run`, `/dw-claude-run`, or `/dw-copilot-run` with the prepared task packet. The parent owns the objective throughout.
19
+ 4. Implement acceptance criteria with project patterns, tests from the approved strategy and necessary failure handling. When a worker returns, independently inspect diff and criteria; inspect/reuse valid evidence or run affected checks through `dw-verify`. Fix in-scope failures automatically, using the same external session when applicable.
20
+ 5. Commit only scoped task changes after valid verification; retain atomic commits and requirement IDs. Include task status in the commit, then record its SHA in the `Commit` column of tasks.md and run-log.md. Commit remaining bookkeeping in the next task or final metadata commit; never `git add .` across unrelated changes.
21
+ 6. Update `execution-state.json`, `active-session.md` and run-log.md with completed tasks, assignments, branch/worktree, exact sessions, verification and next step. Continue remaining approved tasks; `--checkpoint` explicitly requests a pause between waves.
22
+ 7. After all tasks, run `/dw-review` for requirement coverage and code quality. Correct in-scope findings automatically; user decisions are needed only for scope changes or deferrals. Full implementation workflows continue to applicable `/dw-qa` and fixes under `/dw-goal` or the invoking orchestrator. A single-task request ends after that task's validated handoff.
29
23
 
30
- When available under `./.agents/skills/`, these skills are invoked per task:
24
+ ## Resume and blockers
31
25
 
32
- - `dw-verify`: **ALWAYS** — before each task's commit, produces a Verification Report (test + lint + build all GREEN). Without PASS, no commit. The Iron Law of verification.
33
- - `dw-memory`: **ALWAYS** — reads workflow memory at task start; updates at task end with the promotion test (lessons that apply to next task get promoted to shared MEMORY.md).
34
- - Instincts (lazy): at task start, also load any high-confidence instinct (`.dw/memory/instincts/`, confidence ≥0.7) whose `trigger` matches the task — learned project conventions promoted by `/dw-learn`. Match by trigger only; never bulk-load the set.
35
- - `dw-execute-phase`: provides `plan-checker` (6-dimension goal-backward verification before any code is touched in plan mode) and `executor` (atomic commit + deviation handling) agents.
36
- - `dw-testing-discipline`: applies the placement doctrine, 6 agent guardrails, and 25 anti-patterns when adding tests during the task.
37
- - `dw-testing-discipline` test-first mode: ONLY when the task text or user explicitly says `TDD`, `test first`, or `red-green-refactor`, execute that task through `references/tdd-loop.md` (confirm public seams with the user → write ONE red test → run and observe red → implement minimum green → run and observe green → next slice; refactor only after the loop via `dw-simplification`). This is not the default `/dw-run` mode.
38
- - `dw-ui-discipline`: when the task touches UI, the 4 grounding questions must be answered before any visual decision lands.
39
- - `dw-llm-eval`: when the task touches AI feature code paths, the reference dataset + oracle ladder rules apply.
40
- - `dw-minimalism`: **before writing new code** — climb the YAGNI decision ladder (need it? reuse? stdlib? native? installed dep? one line?) at the active intensity, then write the minimum. Hands new dependencies to `dw-search-first`.
41
- - `vercel-react-best-practices`: when the task touches React/Next.js performance.
26
+ A resume request already authorizes continuation. Inspect saved state and actual worktree rather than asking “continue?” again. Keep completed tasks and approved assignments; validate dependencies and prior evidence. Recover missing session IDs only from task-specific logs with identity checks; otherwise reconstruct a new session in the same worktree without discarding changes. See execution-contract for cross-provider limitations.
42
27
 
43
- ## Constitution Gate
28
+ Missing dependency: finish its pending approved task first; ask only if it is outside the plan. Verification failure: diagnose, fix and rerun invalidated checks. Missing test framework: discover the configured runner before asking. Increased complexity: record a deviation and split/reorder within approved scope. New product behavior, architectural conflict or unapproved dependency: propose the material change and wait only on dependent work. Preserve checkpoints at a real impasse or user pause.
44
29
 
45
- <critical>BEFORE executing any task, check `.dw/constitution.md`. If MISSING, auto-install defaults via the v0.11 pattern. If PRESENT, the task's `Constitution Alignment` line (set during `/dw-plan` Stage 3) is consulted as the task executes — code must respect the claimed principles.</critical>
46
-
47
- ## Codebase Intelligence
48
-
49
- <critical>If `.dw/intel/` exists, query it via `/dw-intel` before implementation to align with existing patterns.</critical>
50
- - Per-task: `/dw-intel "patterns for <task topic>"` to surface relevant conventions.
51
-
52
- ## Mode 1: ONE task (`run <task-id>`)
53
-
54
- ### Prerequisites
55
- - `tasks.md` + per-task files exist in `.dw/spec/<prd>/`.
56
- - The target task's dependencies are completed (check `task.md` "Depends on" section).
57
-
58
- ### Behavior
59
-
60
- 1. **Read the task file:** `.dw/spec/<prd>/<task-id>_task.md`. Understand inputs, FRs covered, acceptance criteria, subtasks.
61
- 2. **Plan implementation:**
62
- - List files to create/modify.
63
- - Identify test additions per subtask.
64
- - Confirm dependencies (if missing, STOP and surface).
65
- 3. **Implement:**
66
- - Follow project patterns from `.dw/rules/` and `.dw/intel/`.
67
- - Apply complementary skills (UI gate, test discipline, etc.).
68
- - Mandatory unit tests for backend/services per testspec.
69
- - Match the testing framework specified in `.dw/rules/`.
70
- 4. **Validate (Level 1):**
71
- - Run the project's test command.
72
- - Check acceptance criteria from the task file.
73
- - Run `dw-verify` to produce the Verification Report (test + lint + build GREEN).
74
- - For interactive frontend, also validate real behavior via `dw-testing-discipline` Playwright recipes if regression risk is meaningful.
75
- 5. **Commit:**
76
- - Atomic commit message: `feat(<scope>): <task title> (#<task-id>)`.
77
- - Reference the FRs covered.
78
- - One task = one commit (unless the task explicitly has subtask milestones that earn separate commits).
79
- 6. **Update tasks.md:** set this task's `Status` to `Done` and write the short SHA (`git rev-parse --short HEAD`) into its `Commit` column. This is the only record linking a task to its diff — do not skip it.
80
- 7. **Report:** what was done, what tests were added, what was validated.
81
-
82
- ### STOP CONDITIONS
83
- - Dependencies not satisfied → ask user how to proceed.
84
- - Verification Report FAIL → do not commit; report what's broken.
85
- - Task scope creep detected mid-implementation → STOP and ask user to scope.
86
-
87
- ## Mode 2: ALL pending tasks (default `run`)
88
-
89
- ### Prerequisites
90
- - `tasks.md` + per-task files exist with declared dependencies.
91
- - `tasks-validation.md` shows PASS (or explicit override).
92
- - The branch is created: `feat/prd-<feature-slug>`.
93
-
94
- ### Behavior
95
-
96
- 0. **Arm the progress loop:** invoke `/dw-report` (auto-arm contract — idempotent when `.dw/reports/.active.json` is already live; skipped when `DW_REPORT_AUTO=off`). It reports done / doing / remaining every 10 minutes while the waves run and disarms itself with a final report after the final Level 2 review.
97
- 1. **Plan check (via `dw-execute-phase/plan-checker` agent):**
98
- - 6-dimension goal-backward verification: are these tasks actually going to deliver what the PRD promises?
99
- - If FAIL on any dimension, STOP and report to user before any code is touched.
100
- 2. **Build dependency graph:**
101
- - Topological sort of tasks.
102
- - Identify independent tasks that can run in parallel waves.
103
- 3. **Wave-based parallel dispatch (via `dw-execute-phase/executor` agent):**
104
- - Each wave contains tasks with no inter-dependencies.
105
- - Execute waves serially; within a wave, tasks dispatch in parallel.
106
- - Per-task: same Level 1 flow as Mode 1 (implement → validate → atomic commit).
107
- 4. **Deviation handling:**
108
- - If a task encounters scope creep, STOP that task, surface to user.
109
- - If a task fails verification, the wave halts. No subsequent waves run until resolved.
110
- 5. **Checkpoint between waves:**
111
- - Print wave summary: tasks completed, commits, any deviations.
112
- - Continue automatically unless `--checkpoint` was passed (then wait for user OK).
113
- 6. **Final Level 2 review:**
114
- - After all tasks complete, automatically invoke `/dw-review` (the merged review command — runs both PRD compliance check and code quality review).
115
- - Present consolidated review report.
116
- - Interactive corrections cycle: review surfaces gaps → user decides to fix, defer, or accept.
117
-
118
- ### Output
119
-
120
- ```
121
- .dw/spec/<prd>/
122
- ├── active-session.md # written at checkpoint; consumed by --resume
123
- ├── run-log.md # per-wave execution log with commit SHAs
124
- └── review-consolidated.md # final L2+L3 review (from /dw-review)
125
- ```
126
-
127
- ## Mode 3: Resume (`run --resume`)
128
-
129
- ### Prerequisites
130
- - Previous `run` (Mode 2) was interrupted.
131
- - `active-session.md` exists in the current PRD's `.dw/spec/<prd>/` directory.
132
-
133
- ### Behavior
134
-
135
- 1. Read `active-session.md` to determine which task/wave the session stopped at.
136
- 2. Surface to user: "Resuming from wave N, task X.0. Previously completed: <list>. Continue?"
137
- 3. On confirmation, resume from the next pending task with the same Mode 2 behavior (including step 0 — arm `/dw-report`).
138
-
139
- If `active-session.md` doesn't exist but uncompleted tasks remain, treat as Mode 2 fresh start.
140
-
141
- ## Across all modes: deviation handling
142
-
143
- When implementation cannot proceed as planned:
144
-
145
- | Deviation | Action |
146
- |-----------|--------|
147
- | Task requires new dependency not in TechSpec | STOP. Suggest `/dw-plan techspec --update` to revise. |
148
- | Acceptance criterion is ambiguous | STOP. Ask user for clarification. |
149
- | Test framework decision missing | STOP. Use `dw-testing-discipline` placement doctrine to propose; ask for sign-off. |
150
- | Pattern from `.dw/rules/` doesn't fit cleanly | STOP. Surface the friction; propose either an ADR-justified deviation or a rules update. |
151
- | Hidden complexity emerges (task estimated 2h, looks like 8h) | STOP. Surface; either split the task via `/dw-plan tasks --update` or accept the delay with note. |
152
-
153
- ## Reporting
154
-
155
- After every run (Mode 1, 2, or 3 completion), print:
156
-
157
- - Tasks completed with commit SHAs.
158
- - Files touched count.
159
- - Tests added (unit + E2E if applicable).
160
- - Verification Report verdict per task.
161
- - For Mode 2: final consolidated review status.
162
- - For Mode 2: any deviations encountered and how they were resolved.
163
-
164
- ## Anti-patterns
165
-
166
- - Skipping `dw-verify` to "save time before commit" — produces commits that don't build.
167
- - Running tasks without dependency satisfaction — produces commits that won't work in isolation.
168
- - Letting wave-based parallel run without watching for deviations — silent scope creep compounds.
169
- - Committing multiple tasks in one commit — breaks bisect, breaks revert granularity.
170
- - Skipping the final Level 2 review in Mode 2 — ships features that don't fully match the PRD.
171
-
172
- ## Final Guidelines
173
-
174
- - Atomic commits are non-negotiable. One task = one commit (or one subtask-bundle if explicit).
175
- - Tests are mandatory per the testing strategy section of the TechSpec.
176
- - Verification Report PASS is the gate, not the goal — never weaken assertions to make tests pass.
177
- - Deviation surfacing is a feature, not a bug. Stop and ask. The user prefers an interruption to a wrong implementation.
178
- - For multi-day plans, `--resume` is your friend. Don't restart from zero.
30
+ ## Completion report
179
31
 
32
+ Return completed task IDs and commit SHAs, affected files, valid checks, unresolved findings and next step. `/dw-review` writes `<prd-path>/QA/review-consolidated.md`. Durable state and logs remain in the spec directory; worker audit/session files stay outside disposable worktrees. A passed gate proves its scope only; never weaken assertions or hide a blocking finding. Merge, push and publication require applicable authorization.
180
33
  </system_instructions>
@@ -24,7 +24,14 @@ You are the dev-workflow skill and agent health auditor.
24
24
 
25
25
  `SKILL.md` should be a short router/protocol. Long rules, examples, palettes, recipes, services, and assets must stay in references/assets/rules/recipes and be loaded lazily.
26
26
 
27
+ ## Discovery and context budgets
28
+
29
+ Check managed instructions ≤6000 bytes, skill entrypoints ≤8000 bytes and descriptions ≤250 characters. In package source run `npm run validate`; in consumers inspect installed files. Distinguish discovery metadata from on-demand bodies. Flag unconditional reference loading and broad overlapping triggers, not every platform copy as duplicate live context. Check routed reference paths and preserve attribution/Structured Return when compacting. Model candidates may be stale: propose updates to routing.json after verifying availability; never overwrite owner choices silently.
30
+
27
31
  ## Output
32
+
33
+ When `.dw/config/routing-defaults.json` exists, compare its current candidates with the owner's `.dw/config/routing.json`. Report relevant differences and validate proposed models/capabilities before adoption. Different values can be intentional; do not treat them as failed migration or overwrite them automatically. Approved task assignments take precedence over either candidate file.
34
+
28
35
  Return a concise health report with a structured-return section. Do not delete files.
29
36
 
30
37
  Include:
@@ -38,7 +38,7 @@ Keep only the 3 most recent snapshots (remove older ones) to avoid buildup.
38
38
  Before updating, capture the installed version so you can report the delta:
39
39
 
40
40
  ```bash
41
- node -e "try { console.log(require('@brunosps00/dev-workflow/package.json').version) } catch(e) { console.log('not-cached-locally') }" 2>/dev/null
41
+ node -e 'try { const s = JSON.parse(require("node:fs").readFileSync(".dw/install-state.json", "utf8")); console.log(s.version || "unknown"); } catch { console.log("unknown"); }'
42
42
  ```
43
43
 
44
44
  ### 2. Detect Language of Installed Commands (Required)
@@ -71,7 +71,7 @@ Rules:
71
71
 
72
72
  ### 3. Run the Update (Required)
73
73
 
74
- <critical>Use `npx -y @brunosps00/dev-workflow@latest` to FORCE fetching the latest version from npm (bypass local cache). Pass `--lang=<DETECTED_LANG>` to skip the interactive prompt.</critical>
74
+ <critical>Use `npx -y @brunosps00/dev-workflow@latest` to select the version tagged `latest` on npm. Pass `--lang=<DETECTED_LANG>` to skip the interactive prompt.</critical>
75
75
 
76
76
  ```bash
77
77
  npx -y @brunosps00/dev-workflow@latest update --lang=$DETECTED_LANG
@@ -90,9 +90,23 @@ If the update fails (network error, permission, package unavailable): report the
90
90
  ### 4. Capture New Version
91
91
 
92
92
  ```bash
93
- node -e "console.log(require('@brunosps00/dev-workflow/package.json').version)" 2>/dev/null
93
+ node -e 'const s = JSON.parse(require("node:fs").readFileSync(".dw/install-state.json", "utf8")); if (s.package !== "@brunosps00/dev-workflow" || !s.version) process.exit(1); console.log(s.version);'
94
94
  ```
95
95
 
96
+ ### Upgrade compatibility checks
97
+
98
+ Read the refreshed `.dw/commands/dw-update.md` after the CLI completes. Use `.dw/install-state.json` and the CLI's `Installed version` output for the version delta: an `npx` package need not be resolvable from the consumer's `node_modules`. A missing or invalid new install state is a failed verification; do not claim the update succeeded.
99
+
100
+ For an upgrade from before 2.3.0 (or an unknown legacy version):
101
+
102
+ - Verify `.dw/references/execution-contract.md`, `.dw/scripts/lib/workflow-contract.mjs` and `.dw/templates/frontend-quality-template.md` were delivered. Managed commands, skills, wrappers and instruction blocks refresh through normal `update`; no `--force` is needed.
103
+ - Compare `.dw/config/routing.json` with the newly managed `.dw/config/routing-defaults.json` during `/dw-skill-health`. Keep active owner choices and approved assignments. Propose specific model/effort changes after checking capabilities; updating scaffold files alone does not authorize changing providers.
104
+ - Preserve `.dw/spec/`, `.dw/goals/`, `.dw/STATE.md`, execution/session state, rules and `.dw/templates/overrides/`. Schema 1.0 plans remain valid and local by default. For an active `execution-plan.json`, run `node .dw/scripts/lib/workflow-contract.mjs validate <plan-path>`; report invalid plans without rewriting approvals or resetting progress. New task plans use schema 1.1.
105
+ - Inspect task template overrides for old schemas/routing rules and report any differences that shadow the new managed templates; do not replace owner overrides automatically.
106
+ - If frontend quality documentation is relevant and missing, have `/dw-analyze-project` add the baseline to the existing module rules, scoped to that documentation. Preserve existing gates; propose tooling separately. Skip this action for `update files only`.
107
+
108
+ Do not force-convert active work or globally regenerate product documentation to adopt the release. Record compatibility findings and retain session reload as the final step.
109
+
96
110
  ### 5. Report Result
97
111
 
98
112
  Present to the user:
@@ -156,7 +170,7 @@ E.g.: `npx -y @brunosps00/dev-workflow@0.4.5 update --lang=en`
156
170
  ## Notes
157
171
 
158
172
  - `npx -y` skips the "OK to install" prompt when the package is not cached
159
- - `@latest` bypasses the npx cache and pulls the `latest` tag from the registry
173
+ - `@latest` selects the registry tag; verify the installed result rather than assuming a local package lookup identifies the executed CLI
160
174
  - `--lang=...` skips the interactive language prompt; the value comes from the auto-detection in step 2
161
175
  - This command does NOT update the user project's Node dependencies — only the dev-workflow scaffold
162
176
 
@@ -0,0 +1,53 @@
1
+ # Command routing
2
+
3
+ Use the installed root routing rules first. Consult this catalog only to locate a specialized command. A command suggestion is not authorization to publish, merge, or start an unrelated workflow.
4
+
5
+ ## Trigger Map
6
+
7
+ | User intent (literal or paraphrased) | Auto-trigger |
8
+ |--------------------------------------|--------------|
9
+ | "Implement X" / "Build Y" / "Add feature Z" / "I need ..." / "Create ..." | `/dw-plan` / `/dw-autopilot` |
10
+ | "Autopilot this PRD" / "Take this PRD to PR" / continue a bugfix escalation autonomously | `/dw-autopilot --from-prd <slug>` (existing PRD at `.dw/spec/<slug>/`) |
11
+ | "Resume autopilot" / "continue after plan" / `autopilot-state.json` has `status: plan_complete` | `/dw-autopilot` (or `/dw-goal --from-autopilot <slug>` if the user specifically asks for the goal step) |
12
+ | Pasted error / "X is broken" / "Bug in Y" / failing test screenshot | `/dw-bugfix "X"` |
13
+ | "Plan this feature" / "Write a PRD + techspec + tasks" | `/dw-plan "X"` |
14
+ | "Write a PRD for X" / "Spec out Y" | `/dw-plan prd "X"` |
15
+ | "Design the architecture" / "Make the techspec" | `/dw-plan techspec` |
16
+ | "Break this into tasks" | `/dw-plan tasks` |
17
+ | "Run this task" (with task ID) | `/dw-run <ID>` |
18
+ | "Run all pending tasks" / "Execute the plan" | `/dw-run` |
19
+ | "Run this as a goal" / "durable goal" / "long-running objective" | `/dw-goal "<objective>"` |
20
+ | "Continue where I left off" | `/dw-run --resume` |
21
+ | "Pause work" / "End the session" / "Save where we are" | `/dw-pause` |
22
+ | "Report every N minutes" / "Keep me posted while this runs" / "Give me status reports" | `/dw-report [--every <N>m]` |
23
+ | "Create a worktree for X" / "Clean up the worktrees" / "Merge worktree X" / "How many worktrees are left?" | `/dw-worktree create <slug>` / `/dw-worktree clean --apply` / `/dw-worktree merge <slug>` / `/dw-worktree list` |
24
+ | "Resume" / "Where did we stop?" / "Pick up where we left off" | `/dw-resume` |
25
+ | "QA this feature" / "Run the test plan" | `/dw-qa` |
26
+ | "Fix the QA bugs" | `/dw-qa --fix` |
27
+ | "Evaluate the AI feature" / "Test the RAG / classifier" | `/dw-qa --ai` |
28
+ | "Walk me through this feature" / "UAT this with me" / "Let's do a manual run-through" | `/dw-qa --uat` |
29
+ | "Review this bugfix" / "Code-review fix `<slug>`" | `/dw-review --bugfix <slug>` |
30
+ | "QA this bugfix" / "Validate fix `<slug>`" | `/dw-qa --bugfix <slug>` |
31
+ | "Review my PR" / "Check code quality" / "Is this ready to ship?" | `/dw-review` |
32
+ | "Just the PRD coverage check" | `/dw-review --coverage-only` |
33
+ | "Just the code quality review" | `/dw-review --code-only` |
34
+ | "Time to commit" / changes are validated and ready | `/dw-commit` |
35
+ | "Open a PR" / "Ship this" | `/dw-generate-pr` |
36
+ | "Suggest new ideas" / "What should we build next?" / "Find opportunities" / "Roadmap ideas" | `/dw-opportunities` |
37
+ | "What security improvements should we consider?" / "Find security opportunities" | `/dw-opportunities "security"` |
38
+ | "Brainstorm X" / "Explore this idea" / "Research X" | `/dw-brainstorm "X"` (auto-dispatches grill / prototype / council / research / onepager based on signals) |
39
+ | "Code-health audit" / "Find tech debt" / "Refactor opportunities" / "Smells in X" | `/dw-refactor "X"` |
40
+ | "Where is X?" / "What uses Y?" / "How is Z structured?" | `/dw-intel "<question>"` |
41
+ | "Rebuild the codebase index" / "Refresh intel" | `/dw-intel --build` |
42
+ | "Context is heavy" / "Audit token usage" / "Why is the agent slow?" | `/dw-context-budget` |
43
+ | "Check dev-workflow install" / "Are agents/wrappers healthy?" | `/dw-harness-audit` |
44
+ | "Audit skills" / "Skills feel duplicated or bloated" | `/dw-skill-health` |
45
+ | "Redesign this UI" / "Audit and ship a new design" | `/dw-redesign-ui "<target>"` |
46
+ | "Audit dependencies" / "Are we behind on packages?" | `/dw-secure-audit --plan` |
47
+ | "Scan for vulnerabilities" / "Security check" | `/dw-secure-audit` |
48
+ | "Analyze this project" / "Generate rules" | `/dw-analyze-project` |
49
+ | "Open a new project" / "Bootstrap a stack" | `/dw-new-project` |
50
+ | "Dockerize this" / "Add docker-compose" | `/dw-dockerize` |
51
+ | "Functional doc" / "Map screens and flows" | `/dw-functional-doc` |
52
+ | "Install Azure skills" / "Setup Microsoft docs MCP" / "Add Azure expertise" / "I'm going to work on Azure" | `/dw-install-azure-skills` |
53
+ | "Install AWS skills" / "Setup AWS MCP" / "Add AWS expertise" / "I'm going to work on AWS" | `/dw-install-aws-skills` |
@@ -0,0 +1,55 @@
1
+ # Task execution contract
2
+
3
+ Read during task breakdown, dispatch, or resume. The parent coordinates the approved plan through validation; runner return is a handoff, not the end of the objective.
4
+
5
+ ## Planning assignments
6
+
7
+ Choose development locally or across tools at `/dw-plan tasks`, not on every dispatch. Present a task matrix with complexity, rationale, tool, model, effort, agents, dependencies, and checks. Use `light` for mechanical low-risk work, `standard` for known patterns with bounded decisions, and `heavy` for architecture, uncertainty, or sensitive surfaces. File counts and commit types alone do not determine complexity.
8
+
9
+ Use `.dw/config/routing.json` as model candidates, not proof of availability. Inspect installed CLI version/help for flags and supported configuration; use provider documentation or available model metadata for model IDs. Help/version alone does not prove authentication or account access. Preserve explicit model choices. Prefer configured models that satisfy the task; propose upgrades when useful, citing source/date. Local agents inherit the current session model unless an explicit task override is supported and approved. Do not choose an arbitrary different tier just to call a review independent.
10
+
11
+ Claude orchestration can propose `codex` (`/dw-codex-run`), Codex can propose `claude` (`/dw-claude-run`). Copilot/OpenCode retain local execution and may use explicitly selected adapters. Keep coupled/small work local unless the user chooses otherwise. Use only installed, relevant agents; no mandatory fan-out. Validate agent names against `.dw/agent-registry.json` and the installed profiles.
12
+
13
+ Alongside tasks.md and the per-task Markdown, write `execution-plan.json`:
14
+
15
+ ```json
16
+ {
17
+ "schema_version": "1.1",
18
+ "approved": false,
19
+ "tasks": [{
20
+ "id": "1.0",
21
+ "depends_on": [],
22
+ "execution": {
23
+ "complexity": "standard",
24
+ "rationale": "Known service pattern; bounded behavior change",
25
+ "tool": "local",
26
+ "model": "inherit",
27
+ "effort": "inherit",
28
+ "agents": [],
29
+ "fallbacks": []
30
+ }
31
+ }]
32
+ }
33
+ ```
34
+
35
+ For external tools resolve concrete model/effort before approval. Fallback entries contain `tool`, `model`, `effort`; only approved alternatives may be used. Validate with `node .dw/scripts/lib/workflow-contract.mjs validate <plan.json>` and cross-check the IDs/dependencies against tasks.md. Mark `approved: true` only after user approval of the same assignments; record the approval in the plan's decision log. Changed assignments require approval unless explicitly requested or covered by an approved fallback. An agent-authored boolean is a record, not independent proof of consent.
36
+
37
+ Resolution precedence: current explicit user instruction → approved task assignment → project configuration → tool default. For a saved plan, configuration/defaults are used to propose missing assignments, never silently replace approved ones. Model rejection uses an approved fallback or blocks with evidence; no unapproved provider change. Plans at schema 1.0 without execution metadata run locally; do not force a migration or retroactive delegation decision.
38
+
39
+ ## Dependency and worktree ownership
40
+
41
+ For WRITE dispatch create a dedicated worktree through `/dw-worktree create`. Record its starting revision and branch. Tasks in a dependency chain use the same execution branch/worktree, with one writer at a time, even when successive tasks select different CLIs. The next task sees completed dependency commits on that branch; never create it afresh from main. Use separate worktrees for independent tasks only when the approved plan defines how their branches will be integrated before dependent work. Do not merge into the owner's branch merely to move to the next task.
42
+
43
+ Stage only scoped changes. Commit implementation and task status together; then record the resulting SHA in tasks.md/run-log (a SHA cannot include itself in its own commit). Include that bookkeeping in the next scoped commit or final metadata commit; leave no unreported dirty bookkeeping at delivery. Do not amend or stage unrelated files automatically.
44
+
45
+ ## Durable state and resume
46
+
47
+ Persist `execution-state.json` beside the plan, with schema_version `1.1` and a `tasks` object keyed by task ID. Each entry records the approved assignment, worktree, branch/base revision, provider session ID, audit/prompt paths, attempt, status, checkpoint, commit SHA, and verification records. Store audit/session files outside disposable worktrees. Update before dispatch and after every handoff; preserve completed work on interruption.
48
+
49
+ Resume inspects saved task identity, actual diff, branch, dependencies, and evidence before continuing. Keep the approved executor and session. If its sidecar is absent, recover the exact session from that task's audit log and verify provider/worktree/task identity. Never blindly use `--last` or `-c`. If the ID cannot be recovered, start a new session in the same worktree from the approved task, state, diff and logs; record loss of conversational context. A session from one provider cannot be resumed by another provider. Never reset/clean partial work to retry.
50
+
51
+ ## Completion and authorization
52
+
53
+ The worker implements and checks its task, then returns evidence and unresolved findings. The parent independently inspects the diff and acceptance criteria, verifies evidence validity, sends in-scope corrections to the same worker, and continues dependencies. No new confirmation is needed for an already approved run/resume or ordinary corrections. Only material scope changes, unavailable approved alternatives, permission restrictions, and unresolved product/architecture decisions block dependent work; continue independent authorized work when possible.
54
+
55
+ Review quality rests on acceptance criteria and blocking findings, not a numeric score. Reuse verified check output for equivalent inputs/environment/scope; rerun affected checks after edits. Finish required project checks at delivery. Merge, push and publication remain separate authorization boundaries. Without that authorization, report the prepared branch/worktree and validated result.
@@ -0,0 +1,43 @@
1
+ ---
2
+ type: frontend-quality
3
+ schema_version: "1.0"
4
+ status: draft
5
+ ---
6
+
7
+ # Frontend quality baseline
8
+
9
+ Use for a requested frontend audit or quality-tooling plan. Embed in the existing `.dw/rules/<module>.md` for an audit, or in the feature's TechSpec for implementation. A feature needs only affected rows. This template records decisions; it does not configure tools or authorize new gates.
10
+
11
+ - Module and scope: [workspace, runtime entry points, relevant diff]
12
+ - Observed at: [revision plus working-tree changes, date]
13
+ - Stack: [framework/compiler/runner/package-manager versions, lockfile]
14
+ - Existing policy: [instructions, rules, scripts and CI paths]
15
+
16
+ ## Controls
17
+
18
+ Keep observation and proposal separate. Preserve existing required checks. Policy values: `required`, `advisory`, `deferred`, `not_applicable`. An unadopted proposal is `deferred`; record execution separately as `passed`, `failed` or `not_run`. Explain exclusions and missing evidence. Do not mark missing tools as passed or silently enforce a proposed gate.
19
+
20
+ | ID | Risk/control to inspect | Observed configuration and gaps | Policy / proposed change | Exact command, cwd and scope | Evidence / execution |
21
+ |---|---|---|---|---|---|
22
+ | contract | API authority, generated client drift, runtime validation | | | | |
23
+ | types | Effective TypeScript strictness and unsafe escapes | | | | |
24
+ | lint | Relevant framework, test and accessibility diagnostics | | | | |
25
+ | boundaries | Allowed imports, server/client separation, production entry points | | | | |
26
+ | custom-rules | Repeated defect, detector fixtures and actionable errors | | | | |
27
+ | feedback | Discoverable local rules and optional hook feedback | | | | |
28
+ | mutation | Critical behavior, survivor investigation and cache validity | | | | |
29
+ | dead-code | Runtime/public reachability, generated files, reviewed exclusions | | | | |
30
+ | duplication | Shared business rules versus intentional repeated markup | | | | |
31
+ | ci | Required jobs, observable failures, deploy dependencies and repository rules | | | | |
32
+
33
+ ## Adoption and validation
34
+
35
+ - Next change: [risk it removes, files/config to change, compatible tool already present or proposed dependency]
36
+ - Existing debt: [baseline location; keep it distinct from newly introduced defects]
37
+ - Promotion condition: [evidence needed to move advisory to required; decision owner]
38
+ - Exceptions: [specific rule/path, reason, owner and review trigger; no blanket exclusions]
39
+ - Detector checks: [deliberately invalid fixture, legitimate fixture, alias/generated-path cases and unsupported cases]
40
+ - Analysis limits: [not executed, unavailable service, incomplete graph or CI/repository settings not inspected]
41
+ - Delivery checks: [required commands and behavioral acceptance; reuse evidence only for equivalent inputs/environment/scope]
42
+
43
+ For operational guidance, read `dw-ui-discipline/references/frontend-engineering.md` from the installed skills location. Put accepted implementation work in the task execution matrix; continue under existing authorization. An audit alone ends with the documented findings and proposed changes.
@@ -1,72 +1,52 @@
1
1
  ---
2
2
  type: task
3
- schema_version: "1.0"
3
+ schema_version: "1.1"
4
4
  status: pending
5
5
  ---
6
6
 
7
7
  # Task X.0: [Main Task Title]
8
8
 
9
- <critical>Read the prd.md and techspec.md files in this folder. If you don't read these files your task will be invalidated.</critical>
9
+ Read the relevant PRD/TechSpec sections and task constraints; use the links below.
10
10
 
11
11
  ## Overview
12
12
 
13
13
  [Brief task description]
14
14
 
15
- **Functional Requirements covered**: FR-X.Y, FR-X.Z (maximum 2 per task)
15
+ **Functional Requirements covered**: FR-X.Y, FR-X.Z
16
16
  Depends on: none
17
17
 
18
18
  <requirements>
19
19
  [List of mandatory requirements]
20
20
  </requirements>
21
21
 
22
- ## Subtasks
22
+ ## Execution assignment
23
23
 
24
- ### Implementation
25
- - [ ] X.1 [Subtask description]
26
- - [ ] X.2 [Subtask description]
24
+ Mirror this task's approved entry in `execution-plan.json` (see `.dw/references/execution-contract.md`).
27
25
 
28
- ### Unit Tests (Mandatory for Backend)
29
- - [ ] X.3 Create tests for [service/use-case]
30
- - [ ] X.4 Create tests for [controller/adapter]
26
+ | Complexity + rationale | Tool | Model / effort | Agents | Approved fallbacks |
27
+ |---|---|---|---|---|
28
+ | standard — [reason] | local | inherit / inherit | none | none |
31
29
 
32
- ## Unit Tests
30
+ ## Implementation
33
31
 
34
- ### Test Cases
32
+ - [ ] [Behavior to deliver]
33
+ - [ ] [Relevant verification and acceptance checks]
35
34
 
36
- | Method | Cases |
37
- |--------|-------|
38
- | `[method1]` | Happy path, edge case, error |
39
- | `[method2]` | Happy path, not found |
35
+ ## Verification and success criteria
40
36
 
41
- ### Required Mocks
42
- - `[repository/service]` - mocked via mock function
37
+ | Behavior / risk | Existing suite or new test | Command / observable evidence |
38
+ |---|---|---|
39
+ | [Required outcome] | [Lowest effective layer; new test only if needed] | [Project command or inspection] |
43
40
 
44
- ## Implementation Details
41
+ Use the project's test strategy. Define mocks only at justified boundaries; do not impose coverage percentages or a new test for every edit. Include important failure cases where applicable.
45
42
 
46
- [Relevant sections from the tech spec - reference techspec.md instead of duplicating content]
43
+ ## Relevant files and decisions
47
44
 
48
- ## Success Criteria
45
+ [Source paths and relevant TechSpec/ADR sections; do not duplicate entire documents.]
49
46
 
50
- - [Measurable outcomes]
51
- - [Quality requirements]
52
- - **Unit tests passing**
53
- - **Minimum 80% coverage** on services/use-cases
47
+ ## Commit on completion
54
48
 
55
- ## Relevant Files
56
- - [Files relevant to this task]
57
- - [File].spec.ts - Unit tests
58
-
59
- ## Commit on Completion
60
-
61
- When completing this task, commit:
62
- ```bash
63
- git add .
64
- git commit -m "feat([module]): [description]
65
-
66
- - [item 1]
67
- - [item 2]
68
- - Add unit tests"
69
- ```
49
+ Use the scoped atomic commit protocol in `/dw-run`. Stage only this task's files, retain requirement IDs, record the resulting SHA in tasks.md/run-log, and include final bookkeeping before delivery. No push or merge is implied.
70
50
 
71
51
  ## Related ADRs
72
52
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  type: tasks-index
3
- schema_version: "1.0"
3
+ schema_version: "1.1"
4
4
  status: draft
5
5
  ---
6
6
 
@@ -34,10 +34,13 @@ feat/prd-[feature-name]
34
34
  - [ ] 2.0 Main Task Title Depends on: 1.0
35
35
  - [ ] 3.0 Main Task Title Depends on: 1.0, 2.0
36
36
 
37
+ ## Execution plan
38
+
39
+ Propose local or cross-tool development per task during breakdown. Summarize complexity/rationale, tool, model/effort, agents, dependencies and verification. Store validated assignments and approved fallbacks in `execution-plan.json`; use `.dw/references/execution-contract.md`. Record approval of the same matrix before execution.
40
+
37
41
  ## Workflow
38
42
 
39
- Each task follows this flow:
40
- 1. `/execute-task [N]_task.md` - Implements the task
41
- 2. Unit tests included in the implementation
42
- 3. Commit at the end of each task (no push)
43
- 4. Next task or `/dw-generate-pr [target-branch]` when all tasks are completed
43
+ 1. `/dw-run` consumes the approved assignments in dependency order.
44
+ 2. Each task implements, verifies and commits scoped changes; the parent reviews external-worker handoffs and routes corrections.
45
+ 3. Continue approved implementation through final review and applicable QA. A planning-only request ends at the plan.
46
+ 4. Prepare the validated delivery; integrate/push/publish only within existing authorization.
@@ -78,6 +78,10 @@ type ServiceName interface {
78
78
 
79
79
  ## Development Sequencing
80
80
 
81
+ ### Frontend Quality (when applicable)
82
+
83
+ [Read the module's existing quality baseline. Use relevant rows from `.dw/templates/frontend-quality-template.md` for changed API contracts, types, import boundaries or quality tooling. Record authoritative sources, exact checks, current policy, proposed adoption and behavioral evidence. Keep advisory diagnostics distinct from required gates; do not expand a UI feature into a repository-wide tooling migration.]
84
+
81
85
  ### Build Order
82
86
 
83
87
  [Define implementation sequence: