@brunosps00/dev-workflow 2.0.0 → 2.2.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.
- package/.claude-plugin/marketplace.json +1 -0
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +176 -0
- package/README.md +10 -5
- package/lib/build-plugin.js +4 -1
- package/lib/constants.js +8 -2
- package/lib/init.js +26 -0
- package/lib/validate.js +21 -0
- package/package.json +1 -1
- package/scaffold/en/agent-instructions.md +2 -0
- package/scaffold/en/commands/dw-autopilot.md +2 -0
- package/scaffold/en/commands/dw-brainstorm.md +12 -8
- package/scaffold/en/commands/dw-bugfix.md +4 -2
- package/scaffold/en/commands/dw-claude-run.md +1 -1
- package/scaffold/en/commands/dw-codex-run.md +1 -1
- package/scaffold/en/commands/dw-copilot-run.md +1 -1
- package/scaffold/en/commands/dw-harness-audit.md +2 -0
- package/scaffold/en/commands/dw-help.md +6 -2
- package/scaffold/en/commands/dw-pause.md +1 -0
- package/scaffold/en/commands/dw-plan.md +2 -2
- package/scaffold/en/commands/dw-refactor.md +1 -0
- package/scaffold/en/commands/dw-report.md +169 -0
- package/scaffold/en/commands/dw-review.md +33 -2
- package/scaffold/en/commands/dw-run.md +3 -1
- package/scaffold/en/commands/dw-triage.md +220 -0
- package/scaffold/en/commands/dw-worktree.md +100 -0
- package/scaffold/en/templates/idea-onepager.md +28 -0
- package/scaffold/en/templates/task-template.md +1 -0
- package/scaffold/en/templates/tasks-template.md +9 -8
- package/scaffold/en/templates/triage-needs-info-template.md +23 -0
- package/scaffold/en/templates/triage-out-of-scope-template.md +36 -0
- package/scaffold/en/templates/triage-record-template.md +88 -0
- package/scaffold/pt-br/agent-instructions.md +2 -0
- package/scaffold/pt-br/commands/dw-autopilot.md +83 -81
- package/scaffold/pt-br/commands/dw-brainstorm.md +12 -9
- package/scaffold/pt-br/commands/dw-bugfix.md +4 -2
- package/scaffold/pt-br/commands/dw-claude-run.md +20 -20
- package/scaffold/pt-br/commands/dw-codex-run.md +20 -20
- package/scaffold/pt-br/commands/dw-context-budget.md +10 -10
- package/scaffold/pt-br/commands/dw-copilot-run.md +21 -21
- package/scaffold/pt-br/commands/dw-dockerize.md +102 -102
- package/scaffold/pt-br/commands/dw-find-skills.md +52 -52
- package/scaffold/pt-br/commands/dw-goal.md +41 -41
- package/scaffold/pt-br/commands/dw-harness-audit.md +13 -11
- package/scaffold/pt-br/commands/dw-help.md +6 -2
- package/scaffold/pt-br/commands/dw-intel.md +70 -70
- package/scaffold/pt-br/commands/dw-learn.md +24 -24
- package/scaffold/pt-br/commands/dw-new-project.md +88 -88
- package/scaffold/pt-br/commands/dw-open-design.md +53 -53
- package/scaffold/pt-br/commands/dw-opportunities.md +45 -45
- package/scaffold/pt-br/commands/dw-pause.md +40 -39
- package/scaffold/pt-br/commands/dw-plan.md +2 -2
- package/scaffold/pt-br/commands/dw-refactor.md +31 -30
- package/scaffold/pt-br/commands/dw-report.md +169 -0
- package/scaffold/pt-br/commands/dw-resume.md +22 -22
- package/scaffold/pt-br/commands/dw-review.md +33 -2
- package/scaffold/pt-br/commands/dw-run.md +3 -1
- package/scaffold/pt-br/commands/dw-skill-health.md +10 -10
- package/scaffold/pt-br/commands/dw-subtask-complete.md +4 -4
- package/scaffold/pt-br/commands/dw-subtask-start.md +4 -4
- package/scaffold/pt-br/commands/dw-triage.md +220 -0
- package/scaffold/pt-br/commands/dw-worktree.md +100 -0
- package/scaffold/pt-br/templates/bugfix-summary-template.md +20 -20
- package/scaffold/pt-br/templates/concerns-template.md +20 -20
- package/scaffold/pt-br/templates/idea-onepager.md +28 -0
- package/scaffold/pt-br/templates/project-onepager.md +32 -32
- package/scaffold/pt-br/templates/state-template.md +13 -13
- package/scaffold/pt-br/templates/task-template.md +1 -0
- package/scaffold/pt-br/templates/tasks-template.md +9 -8
- package/scaffold/pt-br/templates/triage-needs-info-template.md +23 -0
- package/scaffold/pt-br/templates/triage-out-of-scope-template.md +36 -0
- package/scaffold/pt-br/templates/triage-record-template.md +88 -0
- package/scaffold/scripts/hooks/git-guardrails.mjs +42 -24
- package/scaffold/scripts/lib/worktree-gc.mjs +460 -0
- package/scaffold/skill-registry.json +1 -1
- package/scaffold/skills/dw-cli-run/SKILL.md +10 -1
- package/scaffold/skills/dw-debug-protocol/SKILL.md +2 -0
- package/scaffold/skills/dw-debug-protocol/references/six-step-triage.md +60 -1
- package/scaffold/skills/dw-execute-phase/references/wave-coordination.md +14 -14
- package/scaffold/skills/dw-grilling/SKILL.md +17 -7
- package/scaffold/skills/dw-grilling/references/decision-tree.md +30 -7
- package/scaffold/skills/dw-simplification/references/deep-modules.md +50 -0
- package/scaffold/skills/dw-testing-discipline/SKILL.md +3 -1
- package/scaffold/skills/dw-testing-discipline/references/tdd-loop.md +83 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dev-workflow",
|
|
3
3
|
"description": "Standalone, à-la-carte skills from the dev-workflow pipeline: minimalism, search-first, simplification, verification, security review, and more.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bruno Santos"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,182 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
10
10
|
> those versions were released, so they are summaries of what shipped, not
|
|
11
11
|
> contemporaneous release notes. `git log` remains the authoritative record.
|
|
12
12
|
|
|
13
|
+
## [2.2.0] — 2026-08-24
|
|
14
|
+
|
|
15
|
+
Release driven by two operational failures observed on a real project, both of the
|
|
16
|
+
same family: the pipeline was good at *starting* long work and silent about what
|
|
17
|
+
happened next. Delegated runs gave no visibility until someone asked "any news?",
|
|
18
|
+
and the worktrees those runs lived in were created by a hard rule and removed by
|
|
19
|
+
nobody — 35 of them (33 already merged) were sitting on disk at 40 GB with the
|
|
20
|
+
root filesystem at 95%. Both fixes are deterministic where prose had failed.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **`/dw-report` — timestamped progress loop for long work.** Every 10 minutes
|
|
25
|
+
(`--every <N>m`) it emits a report with a real `date` timestamp saying what is
|
|
26
|
+
**done** (cumulative, new items marked `➕`, each with evidence: file, commit,
|
|
27
|
+
test count), what is **being done** (with a measurable figure — step counter,
|
|
28
|
+
files touched, running command and elapsed time — never a bare "in progress"),
|
|
29
|
+
and what is **left** (ordered, next milestone first, remaining gates included).
|
|
30
|
+
Reports go to the chat and are appended to `.dw/reports/YYYY-MM-DD.md`. The
|
|
31
|
+
cadence is the user's: it never stretches to "wait for the build"; a report
|
|
32
|
+
saying "nothing changed, ~4 min left" is the product while work runs. Silence is
|
|
33
|
+
reserved for the blocked/idle state (the transition to blocked reports once);
|
|
34
|
+
completion produces a final report immediately and disarms the loop. Vehicle is
|
|
35
|
+
the harness's native scheduled wake-up when available, a background `sleep`
|
|
36
|
+
timer otherwise, and never a system cron (which keeps firing for days after the
|
|
37
|
+
work ended). Auto-armed by `/dw-run`, `/dw-autopilot` (execution invocation), and
|
|
38
|
+
the `dw-cli-run` adapters; `DW_REPORT_AUTO=off` opts out and `DW_REPORT_BELL`
|
|
39
|
+
hooks a local sound or notification. `now`, `status`, `stop` modes.
|
|
40
|
+
- **`/dw-worktree` — the lifecycle the runner adapters never had.** Backed by
|
|
41
|
+
`.dw/scripts/lib/worktree-gc.mjs` (Node, no dependencies), which resolves the
|
|
42
|
+
main checkout from anywhere in the repo. `list` gives every secondary worktree a
|
|
43
|
+
verdict — `REMOVABLE` (head is an ancestor of an integration branch, clean, no
|
|
44
|
+
process has its cwd inside, not locked), `KEEP:unmerged`, `KEEP:dirty`,
|
|
45
|
+
`KEEP:in-use`, `KEEP:locked`, `KEEP:recent`, `PRUNABLE` — with apparent size,
|
|
46
|
+
age, and dirty count; `--strict` exits 3 on leftovers. `clean` is a **dry-run by
|
|
47
|
+
default**; `--apply` removes only `REMOVABLE` entries, deletes their branches
|
|
48
|
+
(verified merged), and prunes. `create <slug>` enforces the `../<project>-<slug>`
|
|
49
|
+
convention and runs the install/build prep (lockfile-detected or
|
|
50
|
+
`.dw/config.json` `worktree.prep`) so a delegated agent never runs blind.
|
|
51
|
+
`merge <slug>` performs the safe order from the main checkout — ff-only merge →
|
|
52
|
+
remove → branch delete → prune — and aborts **before** the merge if the main
|
|
53
|
+
checkout is off the base branch or dirty, the worktree is dirty or in use, or
|
|
54
|
+
the merge is not a fast-forward. It never uses `--force` and never changes the
|
|
55
|
+
owner's active branch. Base resolution: `--base` → `DW_WORKTREE_BASE` →
|
|
56
|
+
`worktree.base` → `origin/HEAD` → `develop` → `main` → `master`.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- **End of life is the same turn as the merge.** `dw-cli-run` pre-flight creates
|
|
61
|
+
missing worktrees through `/dw-worktree create`, and its Discipline section now
|
|
62
|
+
carries the hard rule: merged → `/dw-worktree merge` (or `clean --apply`) in
|
|
63
|
+
that same turn. The three adapters point their `<WORKTREE>` input at the same
|
|
64
|
+
commands. `/dw-pause` sweeps worktrees and treats every `REMOVABLE` entry as an
|
|
65
|
+
open loop to close now rather than record; `/dw-harness-audit` gained a
|
|
66
|
+
*Worktree hygiene* category scored from `list --strict`.
|
|
67
|
+
- **git guardrails** (`scaffold/scripts/hooks/git-guardrails.mjs`) also block
|
|
68
|
+
`git worktree remove --force` / `-f`; plain `remove` and `prune` stay allowed.
|
|
69
|
+
- `/dw-run` (all-tasks and `--resume`) and `/dw-autopilot` Step 8 arm the progress
|
|
70
|
+
loop before dispatching; `dw-help`, the agent-instructions trigger map, and the
|
|
71
|
+
README register both commands (41 commands, Tier 2 = 11, Tier 3 = 14).
|
|
72
|
+
- `dw-cli-run` `context_limit` raised 19000 → 20500 to hold the two new sections.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- `init`/`update` now create `.dw/cli-run/.gitignore` (`*`, `!.gitignore`). The
|
|
77
|
+
adapters' durable audit logs, session sidecars, and last-message captures were
|
|
78
|
+
being committed and then checked out into every worktree (219 tracked files on
|
|
79
|
+
the project that motivated this release). Existing projects untrack them with
|
|
80
|
+
`git rm -r --cached .dw/cli-run`.
|
|
81
|
+
- `init`/`update` create `.dw/reports/.gitignore` so the daily report logs and the
|
|
82
|
+
loop's `.active.json` stay machine-local while other reports (e.g.
|
|
83
|
+
`context-budget.md`) remain tracked.
|
|
84
|
+
|
|
85
|
+
## [2.1.0] — 2026-08-04
|
|
86
|
+
|
|
87
|
+
Release driven by a skill-by-skill analysis of [mattpocock/skills](https://github.com/mattpocock/skills),
|
|
88
|
+
whose philosophy is the opposite of this project's: small composable skills anchored
|
|
89
|
+
to an issue tracker, against an opinionated pipeline with durable state in `.dw/`.
|
|
90
|
+
What follows is the transferable technique, adapted — plus five defects of our own
|
|
91
|
+
that the comparison exposed. What was deliberately **not** taken, and why, is
|
|
92
|
+
recorded in [docs/skills-ecosystem-comparison.md](docs/skills-ecosystem-comparison.md).
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- **`/dw-triage` — the intake boundary the pipeline never had.** External bug
|
|
97
|
+
reports, feature requests, and PRs previously had to be hand-converted into a
|
|
98
|
+
bugfix or a PRD before anything could touch them. One category (`bug` |
|
|
99
|
+
`enhancement`) and one state (`needs-triage` → `needs-info` | `ready-for-work` |
|
|
100
|
+
`needs-human` | `wontfix`), persisted in `.dw/triage/NNN-<slug>.md`, routing to
|
|
101
|
+
`/dw-bugfix`, `/dw-plan prd`, or `/dw-brainstorm --mode=grill`. Two mechanisms
|
|
102
|
+
carry the weight: **claims are verified before a brief is written** (bugs
|
|
103
|
+
reproduced from the reporter's steps, PR diffs checked against what they claim),
|
|
104
|
+
and `.dw/out-of-scope/<concept>.md` remembers rejections **by domain concept**
|
|
105
|
+
rather than by the request's wording, so a request refused in January is not
|
|
106
|
+
re-litigated in March. A `wontfix` for "already implemented" deliberately does
|
|
107
|
+
not write there — that store is memory of refusal, not of delivery.
|
|
108
|
+
It is local-first in the strict sense: `.dw/` is the source of truth and the
|
|
109
|
+
command works with no network and no `gh`. GitHub read via `gh` is optional
|
|
110
|
+
enrichment, and writing back is opt-in per write, never a side effect of triage.
|
|
111
|
+
- **`### Decision Map` in the idea one-pager.** `dw-grilling` already instructed
|
|
112
|
+
the agent to record its decision tree so a session could resume — with nowhere
|
|
113
|
+
to record it, so the graph was rebuilt from scratch every time and what the last
|
|
114
|
+
session knew was still *undecided* was lost. Each node now carries a `State`
|
|
115
|
+
(`resolved` | `open-ready` | `open-blocked`), a `Depends on:` field reusing the
|
|
116
|
+
form `tasks.md` already uses, and an explicit `**Frontier:**` line so the next
|
|
117
|
+
session reads what is decidable now without recomputing the graph. `#### Decision
|
|
118
|
+
Fog` records what is known to be undecided but not yet sharp enough to phrase as
|
|
119
|
+
a decision. Grill resumes from the map instead of re-deriving it, never re-asks a
|
|
120
|
+
`resolved` node, and the alignment gate now also requires `Frontier: none`.
|
|
121
|
+
Schema stays at `1.1`: the section is optional, so existing one-pagers stay valid.
|
|
122
|
+
- **`/dw-review --since <ref>`** — ad-hoc review against a verified comparison
|
|
123
|
+
point. Resolves the ref with `git rev-parse --verify`, aborts with an actionable
|
|
124
|
+
message if it does not resolve, aborts if the diff is empty rather than reviewing
|
|
125
|
+
nothing, and records the exact diff and commit commands in every report so the
|
|
126
|
+
review is reproducible. Three-dot, matching PR review semantics. The default
|
|
127
|
+
PRD/bugfix flow is unchanged.
|
|
128
|
+
- **Test-first loop in `dw-testing-discipline`** (`references/tdd-loop.md`):
|
|
129
|
+
confirm the public seam with the user, one red test per vertical slice, run it
|
|
130
|
+
and **observe** the expected red, minimum green, next slice. Refactor is outside
|
|
131
|
+
the cycle. `/dw-run` uses it only on an explicit request — never by default.
|
|
132
|
+
- **Red-capable feedback contract in `dw-debug-protocol`.** Reproduction was
|
|
133
|
+
specified as an outcome, not a procedure. A loop must now be single,
|
|
134
|
+
deterministic, fast, agent-runnable, and **proven red now** — "it should fail"
|
|
135
|
+
does not count — before any theorizing, with a repertoire of loop types and a
|
|
136
|
+
HITL template for when the loop needs credentials, hardware, or a human action.
|
|
137
|
+
`/dw-bugfix` records the loop command before and after the fix. Trivial bugs stay
|
|
138
|
+
exempt; the exemption ends when a first fix fails or the bug spans layers.
|
|
139
|
+
- **Seam dependency categories and Design It Twice** in
|
|
140
|
+
`dw-simplification/references/deep-modules.md`. Classifying what a seam isolates
|
|
141
|
+
(in-process, local-substitutable, remote owned, true external) derives the test
|
|
142
|
+
strategy instead of reflexively mocking or running everything; interface findings
|
|
143
|
+
require three-plus proposals under distinct constraints before one is recommended.
|
|
144
|
+
Loaded from `/dw-refactor` only for interface/seam findings, so simple refactors
|
|
145
|
+
stay cheap.
|
|
146
|
+
- **`AGENTS.md` and `CLAUDE.md`** at the repo root. A project whose product is
|
|
147
|
+
agent instructions had none for maintaining itself; the invariants existed only
|
|
148
|
+
as tests that fail after the mistake.
|
|
149
|
+
|
|
150
|
+
### Fixed
|
|
151
|
+
|
|
152
|
+
- **`git restore .` bypassed the git guardrails entirely.** `git checkout .` was
|
|
153
|
+
blocked while `git restore .`, `git restore -- .`, `git restore --staged
|
|
154
|
+
--worktree .` and `git restore --source=<ref> .` — which discard exactly the same
|
|
155
|
+
uncommitted work — passed through. The hook had **no test at all**, which is why
|
|
156
|
+
the hole survived. It now has one that invokes the script for real over stdin,
|
|
157
|
+
including a case that runs it from a directory whose name contains a space.
|
|
158
|
+
- **`Depends on:` was parsed by the wave executor but existed in no template.**
|
|
159
|
+
`/dw-plan` told each task to declare its dependencies and
|
|
160
|
+
`dw-execute-phase/references/wave-coordination.md` built the parallel graph by
|
|
161
|
+
topological sort from that field — while `tasks-template.md` had no column for it
|
|
162
|
+
and `task-template.md` no field. The graph rested on data nothing produced. The
|
|
163
|
+
field now has a home in both, and `wave-coordination.md` uses the `1.0` task IDs
|
|
164
|
+
the pipeline actually writes instead of the `01` form its example carried.
|
|
165
|
+
- **`/dw-brainstorm --research` wrote outside the repo.** Reports went to
|
|
166
|
+
`~/Documents/<Topic>_Research_<date>/`, so `/dw-plan` and `/dw-intel` could not
|
|
167
|
+
consume research the pipeline itself produced. They now land under the active
|
|
168
|
+
spec, or under `.dw/spec/research/` when standalone.
|
|
169
|
+
- **The marketplace manifest had no description**, which `claude plugin validate`
|
|
170
|
+
warns about and `npm run validate` did not catch. The field was added to the
|
|
171
|
+
generator in `build-plugin.js`, not only to the checked-in JSON, so it survives
|
|
172
|
+
the next `npm run build:plugin`.
|
|
173
|
+
- **The PT `/dw-refactor` searched for a section that did not exist.** It told the
|
|
174
|
+
agent to locate `Modo: refactor-audit (catalogo de code smells + deep-modules)`
|
|
175
|
+
while the heading in `dw-brainstorm` reads `catálogo`, accented. The lookup never
|
|
176
|
+
matched; the EN pair matches exactly and always worked. Surfaced by the
|
|
177
|
+
accentuation pass below.
|
|
178
|
+
|
|
179
|
+
### Changed
|
|
180
|
+
|
|
181
|
+
- **24 PT-BR scaffold files were written with no diacritics at all** ("Voce e a
|
|
182
|
+
entrada", "secao", "nao") while the other half of the scaffold was correctly
|
|
183
|
+
accented, making it impossible to tell a new mistake from old debt. All 24 are
|
|
184
|
+
now accented. Diacritics only, verified mechanically: both sides normalized
|
|
185
|
+
(Unicode NFKD, combining marks dropped) and compared byte for byte, so any
|
|
186
|
+
content change would have failed the check. Literal strings the commands search
|
|
187
|
+
for, code blocks, flags, paths, and English technical terms were left untouched.
|
|
188
|
+
|
|
13
189
|
## [2.0.0] — 2026-08-02
|
|
14
190
|
|
|
15
191
|
First release after a full security audit of the compose recipes. Two options were
|
package/README.md
CHANGED
|
@@ -42,17 +42,18 @@ Exportable skills (no `.dw/` pipeline required): `dw-minimalism`, `dw-search-fir
|
|
|
42
42
|
|
|
43
43
|
## Commands
|
|
44
44
|
|
|
45
|
-
dev-workflow v2.
|
|
45
|
+
dev-workflow v2.2.0 ships **41 commands** organized into four tiers. Most users only invoke Tier 1 + Tier 2.
|
|
46
46
|
|
|
47
|
-
### Tier 1 — Gateway (
|
|
47
|
+
### Tier 1 — Gateway (4)
|
|
48
48
|
|
|
49
49
|
| Command | When |
|
|
50
50
|
|---------|------|
|
|
51
51
|
| **`/dw-autopilot "wish"`** | Default entry point in two invocations. First run completes PRD → TechSpec → Tasks and stops. Second run resumes from state, executes `/dw-goal --from-autopilot <slug>` for Run → Review → QA/Fix → Review, then Security Gate → Commit → PR. |
|
|
52
52
|
| **`/dw-bugfix "description"`** | A bug report or pasted error. Triages bug-vs-feature-vs-scope, surgical fix or routes to a PRD. |
|
|
53
|
+
| **`/dw-triage [item]`** | An external bug report, feature request, or PR. Checks whether it already exists and whether it was rejected before, verifies the claim, then routes to `/dw-bugfix`, `/dw-plan prd`, or `/dw-brainstorm --mode=grill`. Local-first in `.dw/triage/`; works with no network and no `gh`. |
|
|
53
54
|
| **`/dw-help [keyword]`** | Discover commands. Pass a keyword for shortcuts; `--advanced` reveals internal commands. |
|
|
54
55
|
|
|
55
|
-
### Tier 2 — Pipeline granular (
|
|
56
|
+
### Tier 2 — Pipeline granular (11)
|
|
56
57
|
|
|
57
58
|
Use these when you want step-by-step control instead of `/dw-autopilot`.
|
|
58
59
|
|
|
@@ -62,24 +63,27 @@ Use these when you want step-by-step control instead of `/dw-autopilot`.
|
|
|
62
63
|
| **`/dw-brainstorm "idea"`** | Refine a concrete idea before PRD. Flags: `--onepager` (durable artifact), `--council` (multi-advisor debate), `--research` (multi-source cited research). |
|
|
63
64
|
| **`/dw-plan "feature"`** | PRD → TechSpec → Tasks sequentially with checkpoints. Stages: `prd`, `techspec`, `tasks`. Mandatory clarification questions, source-grounding, constitution gate, final consistency check. |
|
|
64
65
|
| **`/dw-run [task-id]`** | Execute tasks. Default: all pending in dependency order with wave-based parallel dispatch. Single-task: pass an ID. `--resume` continues an interrupted plan. |
|
|
65
|
-
| **`/dw-review`** | Level 2 (PRD coverage mapping) + Level 3 (code quality). Hard gates on dw-verify PASS, secure-audit, constitution violations. Flags: `--coverage-only`, `--code-only`, `--bugfix <slug>` (review a bugfix at `.dw/bugfixes/<slug>/`). |
|
|
66
|
+
| **`/dw-review`** | Level 2 (PRD coverage mapping) + Level 3 (code quality). Hard gates on dw-verify PASS, secure-audit, constitution violations. Flags: `--coverage-only`, `--code-only`, `--bugfix <slug>` (review a bugfix at `.dw/bugfixes/<slug>/`), `--since <ref>` (ad-hoc review from a verified comparison point). |
|
|
66
67
|
| **`/dw-qa`** | Mode-aware QA. Auto-detects UI vs API. Flags: `--fix` (iterative QA + fix-retest loop), `--api`, `--ai` (AI eval against reference dataset), `--uat` (human-in-the-loop walkthrough), `--bugfix <slug>` (QA a bugfix). |
|
|
67
68
|
| **`/dw-pause`** | Consolidate the current session's mental state into `.dw/STATE.md` (Decisions, Blockers, Todos, Deferred, Lessons, Open Loops). Used before long breaks or context-window compactions. |
|
|
68
69
|
| **`/dw-resume`** | Read `.dw/STATE.md`, present a TLDR of where work left off, and suggest the next `dw-*` command. Never auto-executes. |
|
|
70
|
+
| **`/dw-report [--every <N>m]`** | Timestamped progress loop while long work runs: what is done (with evidence), what is being done (with measurable progress), what is left — every 10 minutes by default, appended to `.dw/reports/YYYY-MM-DD.md`. Silent while blocked, final report + auto-disarm when the work ends. `now`, `status`, `stop`. Auto-armed by `/dw-run`, `/dw-autopilot`, and the CLI runners; `DW_REPORT_AUTO=off` opts out, `DW_REPORT_BELL` hooks a local sound. |
|
|
69
71
|
| **`/dw-commit`** | Atomic Conventional Commits for pending changes. Applies `dw-git-discipline` (one intent per commit, lint+tests+build green before). |
|
|
70
72
|
| **`/dw-generate-pr [target]`** | Push the branch, draft a PR body with summary + test plan, open the browser. Hard gates: dw-verify PASS + secure-audit. |
|
|
71
73
|
|
|
72
|
-
### Tier 3 — Specialty (
|
|
74
|
+
### Tier 3 — Specialty (14)
|
|
73
75
|
|
|
74
76
|
| Command | What |
|
|
75
77
|
|---------|------|
|
|
76
78
|
| **`/dw-analyze-project`** | Scans the repo, writes `.dw/rules/` (per-module conventions, anti-patterns, naming). Step 8 offers `.dw/constitution.md`; Step 9 writes `.dw/rules/concerns.md`; Step 10 can synthesize a frontend `DESIGN.md` from existing tokens. Run once per project; refresh after major refactors. |
|
|
77
79
|
| **`/dw-redesign-ui "target"`** | Audits a frontend page, runs the `dw-ui-discipline` 4-question grounding, proposes 2-3 design directions, ships the redesign. WCAG 2.2 AA accessibility floor is non-negotiable; UI diffs can also run the deterministic impeccable slop detector. |
|
|
80
|
+
| **`/dw-open-design "brief"`** | Generates, iterates, or refactors headless Open Design HTML prototypes through the `od` CLI. Refines the brief before dispatch, runs with an explicit `--agent codex\|claude`, captures JSONL audit logs, and stops for a dual ≥9 visual gate. `--refactor` works from a live URL or from screenshots. |
|
|
78
81
|
| **`/dw-refactor "target"`** | Audits a target for refactor opportunities using Fowler smells, `dw-simplification`, deep-modules analysis, and behavior-preserving test gates. This is the explicit route for code-health and tech-debt work. |
|
|
79
82
|
| **`/dw-functional-doc`** | Maps screens + user flows into a functional doc, validated end-to-end with Playwright. Uses the WSL-resilient browser resolver and can capture guided functional video evidence. |
|
|
80
83
|
| **`/dw-context-budget`** | Audits context overhead from commands, skills, agents, instruction files, and MCPs. |
|
|
81
84
|
| **`/dw-harness-audit`** | Deterministic health scorecard for the dev-workflow install, agents, wrappers, MCPs, and gates. |
|
|
82
85
|
| **`/dw-skill-health`** | Audits installed skills and agents for bloat, duplication, and missing references. |
|
|
86
|
+
| **`/dw-worktree <list\|create\|clean\|merge>`** | Lifecycle of delegation worktrees (`../<project>-<slug>`): `create` runs install/build prep so a delegate never works blind; `list` gives every worktree a verdict (`REMOVABLE`, `KEEP:unmerged`, `KEEP:dirty`, `KEEP:in-use`); `clean` removes only proven-merged-and-clean ones (dry-run by default, `--apply` to execute); `merge` does the safe order from the main checkout (ff-only → remove → branch delete → prune). Never `--force`. Backed by `.dw/scripts/lib/worktree-gc.mjs`; auto-used by the CLI runners, `/dw-pause`, and `/dw-harness-audit`. |
|
|
83
87
|
| **`/dw-learn`** | Synthesizes durable decisions (confidence-tagged), bugfixes, deviations, and git history into atomic confidence-weighted **instincts** you approve at `.dw/memory/instincts/`; can propose constitution principles. On-demand and human-in-the-loop — **no always-on observer**. |
|
|
84
88
|
| **`/dw-new-project`** | Bootstrap a new project from an empty or docs-first directory while preserving existing documentation and prototypes. Stack interview includes Next.js + NestJS, Postgres, pg-boss, Mailpit, dev topology, and wraps official `create-*` tools before composing dev infrastructure, `.env`, scripts, CI, and `.dw/rules/`. |
|
|
85
89
|
| **`/dw-dockerize`** | Reads existing project, detects stack + runtime deps, proposes Dockerfile + docker-compose for dev/prod with explicit trade-offs (Conservative/Balanced/Bold). |
|
|
@@ -224,6 +228,7 @@ your-project/
|
|
|
224
228
|
│ ├── spec/ # PRD directories — each contains tasks-validation.md
|
|
225
229
|
│ ├── bugfixes/ # Persistent bugfix records: NNN-<slug>/{TASK.md, SUMMARY.md, fix-report.md} + review/, QA/
|
|
226
230
|
│ ├── goals/ # Durable goal state used by /dw-goal and /dw-autopilot
|
|
231
|
+
│ ├── reports/ # Progress-report loop (/dw-report): daily YYYY-MM-DD.md logs + .active.json, machine-local (gitignored)
|
|
227
232
|
│ ├── secure-audit/ # Security Gate summaries and per-layer reports
|
|
228
233
|
│ ├── subtasks/ # Local ephemeral subagent input packets and handoffs (pending/archive ignored by Git)
|
|
229
234
|
│ └── STATE.md # Session state: Decisions, Blockers, Todos, Open Loops, Deferred Ideas, Lessons, Preferences (managed by /dw-pause + /dw-resume)
|
package/lib/build-plugin.js
CHANGED
|
@@ -22,6 +22,8 @@ const { readSkillRegistry } = require('./skill-registry');
|
|
|
22
22
|
|
|
23
23
|
const REPO_ROOT = path.join(__dirname, '..');
|
|
24
24
|
const PLUGIN_DIR = path.join(REPO_ROOT, '.claude-plugin');
|
|
25
|
+
const MARKETPLACE_DESCRIPTION =
|
|
26
|
+
'À-la-carte dev-workflow skills for focused agent work: minimalism, search-first research, verification, security review, and code quality.';
|
|
25
27
|
|
|
26
28
|
function buildManifests() {
|
|
27
29
|
const registry = readSkillRegistry();
|
|
@@ -46,6 +48,7 @@ function buildManifests() {
|
|
|
46
48
|
|
|
47
49
|
const marketplace = {
|
|
48
50
|
name: 'brunosps00-dev-workflow',
|
|
51
|
+
description: MARKETPLACE_DESCRIPTION,
|
|
49
52
|
owner: author,
|
|
50
53
|
plugins: [
|
|
51
54
|
{
|
|
@@ -72,7 +75,7 @@ function run() {
|
|
|
72
75
|
for (const name of exportable) console.log(` - ${name}`);
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
module.exports = { buildManifests, run };
|
|
78
|
+
module.exports = { buildManifests, run, MARKETPLACE_DESCRIPTION };
|
|
76
79
|
|
|
77
80
|
if (require.main === module) {
|
|
78
81
|
run();
|
package/lib/constants.js
CHANGED
|
@@ -29,14 +29,17 @@ const COMMANDS = {
|
|
|
29
29
|
{ name: 'dw-qa', description: 'Trigger when user wants to validate behavior beyond unit tests. Mode-aware (UI / API / --ai / --uat). --fix enters the iterative QA + fix-retest loop. --bugfix <slug> targets a .dw/bugfixes/ entry.' },
|
|
30
30
|
{ name: 'dw-redesign-ui', description: 'Audits a frontend page, proposes design directions you choose from, then ships the redesign.' },
|
|
31
31
|
{ name: 'dw-refactor', description: 'Audits a target for refactor opportunities using the refactor-audit protocol, Fowler smells, deep-modules analysis, and behavior-preserving test gates.' },
|
|
32
|
+
{ name: 'dw-report', description: 'Trigger when user asks for periodic progress reports ("report every 10 minutes", "keep me posted while this runs"). Timestamped done / doing / remaining report at a fixed cadence (default 10m, --every <N>m), appended to .dw/reports/YYYY-MM-DD.md; silent while blocked, final report + auto-disarm when the work ends. Auto-armed by dw-run, dw-autopilot, and the dw-cli-run adapters.' },
|
|
32
33
|
{ name: 'dw-resume', description: 'Trigger when user says "resume work", "where did we stop?", or starts a session in a project with an existing .dw/STATE.md. Reads STATE.md, presents a TLDR, and suggests the next dw-* command.' },
|
|
33
|
-
{ name: 'dw-review', description: 'Trigger when user asks to review code, check quality, or verify PR readiness. Default runs L2 (PRD coverage) + L3 (code quality). Flags --coverage-only / --code-only / --bugfix <slug>.' },
|
|
34
|
+
{ name: 'dw-review', description: 'Trigger when user asks to review code, check quality, or verify PR readiness. Default runs L2 (PRD coverage) + L3 (code quality). Flags --coverage-only / --code-only / --bugfix <slug> / --since <ref>.' },
|
|
34
35
|
{ name: 'dw-run', description: 'Trigger when user wants to execute tasks. Default runs all pending in dependency order; \'run <task-id>\' runs one; \'run --resume\' continues an interrupted plan.' },
|
|
35
36
|
{ name: 'dw-secure-audit', description: 'Security Gate: OWASP + Semgrep SAST (diff) + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain + outdated. Rigoroso: secrets/CRITICAL/HIGH block. Auto-invoked by /dw-review and /dw-generate-pr, explicit phase in /dw-autopilot, and runnable standalone.' },
|
|
36
37
|
{ name: 'dw-skill-health', description: 'Audits installed skills and agents for bloat, duplication, missing references, and stale or unused modules.' },
|
|
37
38
|
{ name: 'dw-subtask-start', userInvoked: true, description: 'Creates a minimal input packet for a subagent without injecting the parent transcript.' },
|
|
38
39
|
{ name: 'dw-subtask-complete', userInvoked: true, description: 'Records a structured subagent handoff with result, files, decisions, risks, verification, and blockers.' },
|
|
39
40
|
{ name: 'dw-subtask-resume', userInvoked: true, description: 'Consumes pending subagent handoffs, summarizes them for the parent, and archives the local packets.' },
|
|
41
|
+
{ name: 'dw-triage', description: 'Local-first intake for external bug reports, feature requests, and PRs. Persists .dw/triage/ state, checks redundancy and prior rejections, verifies claims, then routes to /dw-bugfix, /dw-plan prd, /dw-brainstorm --mode=grill, or no work.' },
|
|
42
|
+
{ name: 'dw-worktree', description: 'Worktree lifecycle for delegated work: create prepared (../<project>-<slug> + install/build prep), list with verdicts (REMOVABLE / KEEP:unmerged / KEEP:dirty / KEEP:in-use), clean only what is proven merged and clean (dry-run by default), merge in the safe ff-only order and remove in the same turn. Never --force. Backed by .dw/scripts/lib/worktree-gc.mjs; used by the dw-*-run adapters, /dw-pause, and /dw-harness-audit.' },
|
|
40
43
|
{ name: 'dw-update', description: 'Updates dev-workflow to the latest npm release in-place, with a snapshot you can roll back to.' },
|
|
41
44
|
],
|
|
42
45
|
'pt-br': [
|
|
@@ -69,14 +72,17 @@ const COMMANDS = {
|
|
|
69
72
|
{ name: 'dw-qa', description: 'Trigger quando usuario quer validar comportamento alem de unit tests. Mode-aware (UI / API / --ai / --uat). --fix entra no loop iterativo QA + fix-retest. --bugfix <slug> aponta para uma entrada em .dw/bugfixes/.' },
|
|
70
73
|
{ name: 'dw-redesign-ui', description: 'Audita uma pagina frontend, propoe direcoes de design que voce escolhe, e entrega o redesign.' },
|
|
71
74
|
{ name: 'dw-refactor', description: 'Audita um target por oportunidades de refactor usando o protocolo refactor-audit, smells Fowler, deep-modules e gates de teste preservando comportamento.' },
|
|
75
|
+
{ name: 'dw-report', description: 'Trigger quando usuário pede report periódico de progresso ("report de 10 em 10 minutos", "me mantém informado enquanto isso roda"). Report carimbado com data/hora de feito / fazendo / falta em cadência fixa (default 10m, --every <N>m), anexado em .dw/reports/YYYY-MM-DD.md; silencioso enquanto bloqueado, report final + auto-desarme quando o trabalho termina. Auto-armado por dw-run, dw-autopilot e pelos adapters dw-cli-run.' },
|
|
72
76
|
{ name: 'dw-resume', description: 'Trigger quando usuario diz "retoma", "onde paramos?" ou comeca sessao num projeto com .dw/STATE.md existente. Le STATE.md, apresenta TLDR e sugere proximo comando dw-*.' },
|
|
73
|
-
{ name: 'dw-review', description: 'Trigger quando
|
|
77
|
+
{ name: 'dw-review', description: 'Trigger quando usuário pede pra revisar código, checar qualidade ou validar prontidão pra PR. Default roda L2 (cobertura PRD) + L3 (qualidade). Flags --coverage-only / --code-only / --bugfix <slug> / --since <ref>.' },
|
|
74
78
|
{ name: 'dw-run', description: 'Trigger quando usuario quer executar tasks. Default roda todas pendentes em ordem de dependencia; \'run <task-id>\' roda uma; \'run --resume\' continua plan interrompido.' },
|
|
75
79
|
{ name: 'dw-secure-audit', description: 'Security Gate: OWASP + Semgrep SAST (diff) + gitleaks secrets + Trivy SCA/IaC + lockfile + supply-chain + outdated. Rigoroso: secrets/CRITICAL/HIGH bloqueiam. Auto-invocado por /dw-review e /dw-generate-pr, fase explicita no /dw-autopilot, e executavel standalone.' },
|
|
76
80
|
{ name: 'dw-skill-health', description: 'Audita skills e agentes instalados por bloat, duplicacao, referencias quebradas e modulos sem uso.' },
|
|
77
81
|
{ name: 'dw-subtask-start', userInvoked: true, description: 'Cria um input packet minimo para subagente sem injetar transcript bruto do parent.' },
|
|
78
82
|
{ name: 'dw-subtask-complete', userInvoked: true, description: 'Registra handoff estruturado do subagente com resultado, arquivos, decisoes, riscos, verificacao e bloqueios.' },
|
|
79
83
|
{ name: 'dw-subtask-resume', userInvoked: true, description: 'Consome handoffs pendentes de subagentes, resume para o parent e arquiva os pacotes locais.' },
|
|
84
|
+
{ name: 'dw-triage', description: 'Intake local-first para bug reports, feature requests e PRs externos. Persiste estado em .dw/triage/, checa redundância e rejeições anteriores, verifica alegações, e então roteia para /dw-bugfix, /dw-plan prd, /dw-brainstorm --mode=grill, ou nenhum trabalho.' },
|
|
85
|
+
{ name: 'dw-worktree', description: 'Ciclo de vida de worktrees de delegação: cria preparada (../<projeto>-<slug> + prep de install/build), lista com vereditos (REMOVABLE / KEEP:unmerged / KEEP:dirty / KEEP:in-use), limpa só o que está provadamente mergeado e limpo (dry-run por default), mergeia na ordem segura ff-only e remove no mesmo turno. Nunca --force. Apoiado em .dw/scripts/lib/worktree-gc.mjs; usado pelos adapters dw-*-run, /dw-pause e /dw-harness-audit.' },
|
|
80
86
|
{ name: 'dw-update', description: 'Atualiza o dev-workflow para o release mais recente no npm, com snapshot para rollback.' },
|
|
81
87
|
],
|
|
82
88
|
};
|
package/lib/init.js
CHANGED
|
@@ -283,6 +283,32 @@ async function run({ force = false, lang = null, mode = 'init', profile = null,
|
|
|
283
283
|
touchedFiles.push(metricsGitignore);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
// 5.25b. Ensure .dw/reports/ + .gitignore (progress-report loop; the daily logs and
|
|
287
|
+
// the .active.json loop state are machine-local so they are gitignored, while other
|
|
288
|
+
// reports such as context-budget.md stay tracked). Created if missing on init and update.
|
|
289
|
+
{
|
|
290
|
+
const reportsDir = path.join(projectRoot, '.dw', 'reports');
|
|
291
|
+
ensureDir(reportsDir);
|
|
292
|
+
const reportsGitignore = path.join(reportsDir, '.gitignore');
|
|
293
|
+
const rStatus = writeFile(reportsGitignore, '????-??-??.md\n.active.json\n', false);
|
|
294
|
+
if (rStatus === 'created') totalCreated++;
|
|
295
|
+
else totalSkipped++;
|
|
296
|
+
touchedFiles.push(reportsGitignore);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// 5.25c. Ensure .dw/cli-run/ + .gitignore (durable audit logs, session sidecars and
|
|
300
|
+
// last-message captures of the dw-*-run adapters are machine-local; committing them
|
|
301
|
+
// bloats every worktree checkout). Created if missing on init and update.
|
|
302
|
+
{
|
|
303
|
+
const cliRunDir = path.join(projectRoot, '.dw', 'cli-run');
|
|
304
|
+
ensureDir(cliRunDir);
|
|
305
|
+
const cliRunGitignore = path.join(cliRunDir, '.gitignore');
|
|
306
|
+
const cStatus = writeFile(cliRunGitignore, '*\n!.gitignore\n', false);
|
|
307
|
+
if (cStatus === 'created') totalCreated++;
|
|
308
|
+
else totalSkipped++;
|
|
309
|
+
touchedFiles.push(cliRunGitignore);
|
|
310
|
+
}
|
|
311
|
+
|
|
286
312
|
// 5.26. Ensure .dw/memory/instincts/ (durable learnings promoted by /dw-learn;
|
|
287
313
|
// format in the dw-memory skill's references/instincts.md). Init only; preserved on update.
|
|
288
314
|
if (!isUpdate) {
|
package/lib/validate.js
CHANGED
|
@@ -23,8 +23,10 @@ function run() {
|
|
|
23
23
|
|
|
24
24
|
// Plugin manifest drift check.
|
|
25
25
|
const { plugin, marketplace } = buildManifests();
|
|
26
|
+
checkMarketplaceDescription(marketplace, issues);
|
|
26
27
|
checkManifestDrift('.claude-plugin/plugin.json', plugin, issues);
|
|
27
28
|
checkManifestDrift('.claude-plugin/marketplace.json', marketplace, issues);
|
|
29
|
+
checkMarketplaceFileDescription('.claude-plugin/marketplace.json', issues);
|
|
28
30
|
|
|
29
31
|
console.log('dev-workflow validate\n');
|
|
30
32
|
if (warnings.length) {
|
|
@@ -55,6 +57,25 @@ function checkManifestDrift(relPath, expected, issues) {
|
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
function checkMarketplaceDescription(marketplace, issues) {
|
|
61
|
+
if (!marketplace || typeof marketplace.description !== 'string' || !marketplace.description.trim()) {
|
|
62
|
+
issues.push('Generated marketplace manifest must include a root-level description.');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function checkMarketplaceFileDescription(relPath, issues) {
|
|
67
|
+
const file = path.join(__dirname, '..', relPath);
|
|
68
|
+
if (!fs.existsSync(file)) return;
|
|
69
|
+
try {
|
|
70
|
+
const manifest = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
71
|
+
if (typeof manifest.description !== 'string' || !manifest.description.trim()) {
|
|
72
|
+
issues.push(`${relPath} must include a root-level description.`);
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
issues.push(`${relPath} is not valid JSON.`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
58
79
|
module.exports = { run };
|
|
59
80
|
|
|
60
81
|
if (require.main === module) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brunosps00/dev-workflow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.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"
|
|
@@ -37,6 +37,8 @@ Before picking a command from the Trigger Map, gauge the change's actual scope.
|
|
|
37
37
|
| "Run this as a goal" / "durable goal" / "long-running objective" | `/dw-goal "<objective>"` |
|
|
38
38
|
| "Continue where I left off" | `/dw-run --resume` |
|
|
39
39
|
| "Pause work" / "End the session" / "Save where we are" | `/dw-pause` |
|
|
40
|
+
| "Report every N minutes" / "Keep me posted while this runs" / "Give me status reports" | `/dw-report [--every <N>m]` |
|
|
41
|
+
| "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` |
|
|
40
42
|
| "Resume" / "Where did we stop?" / "Pick up where we left off" | `/dw-resume` |
|
|
41
43
|
| "QA this feature" / "Run the test plan" | `/dw-qa` |
|
|
42
44
|
| "Fix the QA bugs" | `/dw-qa --fix` |
|
|
@@ -143,6 +143,8 @@ After approval:
|
|
|
143
143
|
|
|
144
144
|
### Step 8: Durable Execution Goal
|
|
145
145
|
|
|
146
|
+
First arm the progress loop: invoke `/dw-report` (auto-arm contract — idempotent, skipped when `DW_REPORT_AUTO=off`). It reports done / doing / remaining every 10 minutes through the goal, the Security Gate, commit, and PR, and disarms itself with a final report at the PR gate.
|
|
147
|
+
|
|
146
148
|
When `autopilot-state.json status=plan_complete`, formally invoke:
|
|
147
149
|
|
|
148
150
|
```text
|
|
@@ -181,7 +181,7 @@ At the end, always leave the user in one of these situations:
|
|
|
181
181
|
- With better questions to decide
|
|
182
182
|
- With a next workspace command to follow
|
|
183
183
|
- With the one-pager at `.dw/spec/ideas/<slug>.md` (if **onepager** mode fired)
|
|
184
|
-
- With the research report at
|
|
184
|
+
- With the research report at `.dw/spec/<prd-slug>/research/<topic-slug>-<YYYYMMDD>/research.md` when a PRD is active, `.dw/spec/ideas/<idea-slug>-research-<YYYYMMDD>/research.md` when an idea one-pager is active, or `.dw/spec/research/<topic-slug>-<YYYYMMDD>/research.md` for standalone research (if **research** mode fired)
|
|
185
185
|
- With the refactor plan at `<target>/refactor-plan.md` (if **refactor-audit** mode fired)
|
|
186
186
|
- With canonical glossary entries in `.dw/domain/**` and an aligned idea one-pager (if **grill** ran with authorization)
|
|
187
187
|
- With a runnable throwaway prototype + verdict template (if **prototype** mode fired)
|
|
@@ -237,7 +237,7 @@ Complementary skill **`dw-source-grounding`**: **ALWAYS** — apply Detect → F
|
|
|
237
237
|
|
|
238
238
|
### Output
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
Save `research.md` inside the repo: `.dw/spec/<prd-slug>/research/<topic-slug>-<YYYYMMDD>/research.md` when a PRD is active, `.dw/spec/ideas/<idea-slug>-research-<YYYYMMDD>/research.md` when an idea one-pager is active, or `.dw/spec/research/<topic-slug>-<YYYYMMDD>/research.md` for standalone research. Mandatory sections:
|
|
241
241
|
1. Executive Summary (200-400 words)
|
|
242
242
|
2. Introduction (scope, methodology, assumptions)
|
|
243
243
|
3. Main Analysis (4-8 findings, 600-2000 words each, all cited)
|
|
@@ -364,9 +364,12 @@ When these signals appear during auto-dispatch, **recommend** Grill in one line
|
|
|
364
364
|
|
|
365
365
|
### The session (after authorization)
|
|
366
366
|
|
|
367
|
-
1. **
|
|
368
|
-
|
|
369
|
-
and
|
|
367
|
+
1. **Resume or build the decision tree first.** Before the first question, read the active one-pager for an
|
|
368
|
+
existing **Decision Map**. If present, resume from its `Depends on:` graph, `State` values, explicit
|
|
369
|
+
**Frontier**, and `Decision Fog`; do not re-ask nodes already `resolved`. If no map exists, inspect project
|
|
370
|
+
facts — current PRDs/TechSpecs, `.dw/rules/`, `.dw/intel/` (via `/dw-intel`), `.dw/constitution.md`,
|
|
371
|
+
`.dw/domain/**`, and recent git activity — and build a decision tree **ordered by dependencies** (never ask a
|
|
372
|
+
downstream decision before its blocker).
|
|
370
373
|
2. **Ask exactly one unresolved decision per interaction and wait.** Each question includes: evidence when
|
|
371
374
|
available (with source), the recommended answer, a short rationale, and a meaningful alternative/trade-off.
|
|
372
375
|
Follow `dw-grilling` (`references/interview-loop.md`, `references/decision-tree.md`).
|
|
@@ -403,9 +406,10 @@ reads and links `.dw/domain/**` and must preserve it, never regenerate it.
|
|
|
403
406
|
|
|
404
407
|
### Aligned handoff — the idea one-pager (schema `1.1`)
|
|
405
408
|
|
|
406
|
-
Grill extends `.dw/spec/ideas/<slug>.md` to schema `1.1`, adding: **
|
|
407
|
-
|
|
408
|
-
|
|
409
|
+
Grill extends `.dw/spec/ideas/<slug>.md` to schema `1.1`, adding: **Decision Map** (nodes, `Depends on:`, `State`,
|
|
410
|
+
explicit **Frontier**, and `Decision Fog` for unclear future nodes), **Resolved Decisions** (each with the
|
|
411
|
+
recommended answer, the user's choice, and the alternative rejected), **Evidence** (facts discovered with
|
|
412
|
+
sources), **Canonical Vocabulary** (links into `.dw/domain/**`), **Remaining Decisions**, and **Alignment State**.
|
|
409
413
|
|
|
410
414
|
Set `status: aligned` **only when all** of these hold: every dependency branch is resolved, glossary/code
|
|
411
415
|
contradictions are closed, no blocking open decision remains, AND the user **explicitly confirms** shared
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
When available in the project at `./.agents/skills/`, use these skills as contextual support without replacing this command:
|
|
40
40
|
|
|
41
|
-
- `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.
|
|
41
|
+
- `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. For non-trivial bugs, or after a first fix fails, Step 1 must establish a red-capable feedback loop before theorizing. Non-reproducible bugs follow the instrument-first sub-protocol — no guess fixes without explicit acknowledgement.
|
|
42
42
|
- `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).
|
|
43
43
|
- `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
|
|
44
44
|
- `dw-testing-discipline`: use when the fix requires a reproducible E2E/retest flow in a web app — `references/playwright-recipes.md` for recipes, core rules + 6 agent guardrails for any test the fix adds, flaky-discipline if the bug surfaces intermittently.
|
|
@@ -214,6 +214,7 @@
|
|
|
214
214
|
- Stack traces
|
|
215
215
|
- Recently modified files
|
|
216
216
|
- 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)
|
|
217
|
+
- For non-trivial bugs, or when the first fix attempt failed, build the `dw-debug-protocol` red-capable feedback loop before proposing a cause: one loop command/artifact, deterministic enough, fast, agent-runnable, and observed red. If no agent-runnable loop is possible, record attempts and ask the user for the missing artifact/access with the HITL template from `references/six-step-triage.md`.
|
|
217
218
|
|
|
218
219
|
### 3. Clarification Questions (MANDATORY - EXACTLY 3)
|
|
219
220
|
|
|
@@ -384,7 +385,7 @@
|
|
|
384
385
|
1. Discover the next `NNN` (see File Locations section).
|
|
385
386
|
2. Create `.dw/bugfixes/NNN-<slug>/` if not yet created in step 5.0.
|
|
386
387
|
3. Write `TASK.md` with the triage, clarifications, root cause, and the approved plan as executed (use `.dw/templates/bugfix-template.md` as the base structure).
|
|
387
|
-
4. Write `fix-report.md` with the verbatim `dw-verify` VERIFICATION REPORT plus the before/after reproduction trace.
|
|
388
|
+
4. Write `fix-report.md` with the verbatim `dw-verify` VERIFICATION REPORT plus the before/after reproduction trace. The report MUST include `Loop command before fix` and `Loop command after fix` (or the exact HITL blocker, attempts made, and artifact/access requested when no loop was possible).
|
|
388
389
|
5. Write `SUMMARY.md` using `.dw/templates/bugfix-summary-template.md`. Fill in slug, date, status `Fixed`, severity, related_concerns (from step 1.5), Symptom (verbatim), Root Cause (one sentence), Resolution (2-4 bullets), Files Touched, Verification, Related, Followups.
|
|
389
390
|
6. If the fix touched a concern listed in `.dw/rules/concerns.md`, append a line to that concern's row's `Last incident` column (or add a new row under Known Bug History) — preserve hand-written entries between `<!-- preserved:start -->` markers.
|
|
390
391
|
7. Report paths of all three files in chat before the commit step.
|
|
@@ -494,6 +495,7 @@
|
|
|
494
495
|
- [ ] **Maximum 5 affected files**
|
|
495
496
|
- [ ] **No migrations**
|
|
496
497
|
- [ ] **Test task included (correct project framework)**
|
|
498
|
+
- [ ] **Non-trivial bug loop recorded: command before fix + command after fix, or HITL blocker with attempts + requested artifact/access**
|
|
497
499
|
- [ ] Awaiting approval before executing
|
|
498
500
|
- [ ] **`.dw/bugfixes/NNN-<slug>/{TASK,fix-report,SUMMARY}.md` written after verify PASS**
|
|
499
501
|
|
|
@@ -39,7 +39,7 @@ Because you pass `--session-id "$UUID"`, the id is **fixed and known** at dispat
|
|
|
39
39
|
## Input Variables
|
|
40
40
|
| Variable | Description | Example |
|
|
41
41
|
|----------|-------------|---------|
|
|
42
|
-
| `<WORKTREE>` | dedicated git worktree (off main) | `~/code/vizzita-billing-s10` |
|
|
42
|
+
| `<WORKTREE>` | dedicated git worktree (off main) — create with `/dw-worktree create <slug>` (prep included); after the gate and merge, remove in the same turn with `/dw-worktree merge <slug>` | `~/code/vizzita-billing-s10` |
|
|
43
43
|
| `<PROMPT>` | prepared prompt/spec path | `.dw/spec/prd-billing-integrador/codex-prompt.md` |
|
|
44
44
|
| `<slug>` | task key for audit/session files | `prd-billing-integrador` |
|
|
45
45
|
| `<AUDIT>` | durable audit dir OUTSIDE the worktree | `~/code/vizzita/.dw/cli-run` |
|
|
@@ -40,7 +40,7 @@ gone: `codex exec resume --last` from the same worktree.
|
|
|
40
40
|
## Input Variables
|
|
41
41
|
| Variable | Description | Example |
|
|
42
42
|
|----------|-------------|---------|
|
|
43
|
-
| `<WORKTREE>` | dedicated git worktree (off main) | `~/code/vizzita-billing-s10` |
|
|
43
|
+
| `<WORKTREE>` | dedicated git worktree (off main) — create with `/dw-worktree create <slug>` (prep included); after the gate and merge, remove in the same turn with `/dw-worktree merge <slug>` | `~/code/vizzita-billing-s10` |
|
|
44
44
|
| `<PROMPT>` | prepared prompt/spec path | `.dw/spec/prd-billing-integrador/codex-prompt.md` |
|
|
45
45
|
| `<slug>` | task key for audit/session files | `prd-billing-integrador` |
|
|
46
46
|
| `<AUDIT>` | durable audit dir OUTSIDE the worktree | `~/code/vizzita/.dw/cli-run` |
|
|
@@ -37,7 +37,7 @@ Fallback if the sidecar is gone: `copilot --continue -p …` from the same workt
|
|
|
37
37
|
## Input Variables
|
|
38
38
|
| Variable | Description | Example |
|
|
39
39
|
|----------|-------------|---------|
|
|
40
|
-
| `<WORKTREE>` | dedicated git worktree (off main) | `~/code/vizzita-billing-s10` |
|
|
40
|
+
| `<WORKTREE>` | dedicated git worktree (off main) — create with `/dw-worktree create <slug>` (prep included); after the gate and merge, remove in the same turn with `/dw-worktree merge <slug>` | `~/code/vizzita-billing-s10` |
|
|
41
41
|
| `<PROMPT>` | prepared prompt/spec path | `.dw/spec/prd-billing-integrador/codex-prompt.md` |
|
|
42
42
|
| `<slug>` | task key for audit/session files | `prd-billing-integrador` |
|
|
43
43
|
| `<AUDIT>` | durable audit dir OUTSIDE the worktree | `~/code/vizzita/.dw/cli-run` |
|
|
@@ -22,7 +22,9 @@ You are the dev-workflow harness auditor.
|
|
|
22
22
|
- Verification gates
|
|
23
23
|
- Security gates
|
|
24
24
|
- Context discipline
|
|
25
|
+
- Worktree hygiene
|
|
25
26
|
3. For structured skill returns, inspect bundled skill `SKILL.md` files and require a `## Structured Return` contract with `Status`, `Evidence`, `Artifacts`, and `Next Step`.
|
|
27
|
+
3b. For worktree hygiene, run `node .dw/scripts/lib/worktree-gc.mjs list --strict`. Exit 3 (any `REMOVABLE` or `PRUNABLE` worktree) caps the category at 3/10; cite each leftover with its size and verdict and recommend `/dw-worktree clean --apply`. `KEEP:*` entries are informational.
|
|
26
28
|
4. Cite missing paths, broken references, stale managed files, and skills without a structured return.
|
|
27
29
|
5. Recommend the top 3 fixes.
|
|
28
30
|
|
|
@@ -23,7 +23,7 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
|
|
|
23
23
|
| `/dw-bugfix "description"` | A bug or error report. Surgical fix or PRD route. |
|
|
24
24
|
| `/dw-help [keyword]` | This screen. Pass a keyword for shortcuts. `--advanced` reveals internal commands. |
|
|
25
25
|
|
|
26
|
-
## Tier 2 — Pipeline granular (
|
|
26
|
+
## Tier 2 — Pipeline granular (11)
|
|
27
27
|
|
|
28
28
|
| Command | What |
|
|
29
29
|
|---------|------|
|
|
@@ -35,10 +35,11 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
|
|
|
35
35
|
| `/dw-qa` | Mode-aware QA (UI / API auto-detect). Flags: `--fix`, `--api`, `--ai`, `--uat`, `--bugfix <slug>`. |
|
|
36
36
|
| `/dw-pause` | Save session state, decisions, blockers, todos, and open loops into `.dw/STATE.md`. |
|
|
37
37
|
| `/dw-resume` | Read `.dw/STATE.md`, show a TLDR, and suggest the next `dw-*` command. |
|
|
38
|
+
| `/dw-report [--every <N>m]` | Timestamped done / doing / remaining report every 10 minutes while long work runs; appended to `.dw/reports/`. `now`, `status`, `stop`. Auto-armed by `/dw-run`, `/dw-autopilot`, and the CLI runners. |
|
|
38
39
|
| `/dw-commit` | Atomic Conventional Commits for pending work. |
|
|
39
40
|
| `/dw-generate-pr [target]` | Push branch, draft PR body, open browser. |
|
|
40
41
|
|
|
41
|
-
## Tier 3 — Specialty (
|
|
42
|
+
## Tier 3 — Specialty (13)
|
|
42
43
|
|
|
43
44
|
| Command | What |
|
|
44
45
|
|---------|------|
|
|
@@ -50,6 +51,7 @@ Use `/dw-autopilot "wish"` as the gateway for most feature work. The granular co
|
|
|
50
51
|
| `/dw-context-budget` | Audit context overhead from commands, skills, agents, instructions, and MCPs. |
|
|
51
52
|
| `/dw-harness-audit` | Score dev-workflow install health: wrappers, agents, MCPs, gates. |
|
|
52
53
|
| `/dw-skill-health` | Audit skills and agents for bloat, duplication, and missing references. |
|
|
54
|
+
| `/dw-worktree <list\|create\|clean\|merge>` | Worktree lifecycle: create prepared, list with verdicts, clean only proven-merged (dry-run default), ff-only merge + remove in the same turn. Never `--force`. |
|
|
53
55
|
| `/dw-new-project` | Interview-driven bootstrap (stack + infra + docker-compose + CI). |
|
|
54
56
|
| `/dw-dockerize` | Detect stack, propose Dockerfile + docker-compose for dev/prod. |
|
|
55
57
|
| `/dw-install-azure-skills` | Opt-in Azure skills + Microsoft Learn MCP setup. Interactive category selection. |
|
|
@@ -103,6 +105,7 @@ Match the keyword and suggest:
|
|
|
103
105
|
| `run`, `execute`, `implement` | `/dw-run` |
|
|
104
106
|
| `goal`, `objective`, `long-running`, `resume autopilot` | `/dw-goal` or `/dw-autopilot` if `autopilot-state.json` exists |
|
|
105
107
|
| `pause`, `save state`, `end session` | `/dw-pause` |
|
|
108
|
+
| `report`, `progress`, `keep me posted`, `status every` | `/dw-report [--every <N>m]` |
|
|
106
109
|
| `resume`, `continue`, `where did we stop` | `/dw-resume` |
|
|
107
110
|
| `review`, `quality`, `audit code` | `/dw-review` |
|
|
108
111
|
| `qa`, `test plan`, `e2e` | `/dw-qa` |
|
|
@@ -121,6 +124,7 @@ Match the keyword and suggest:
|
|
|
121
124
|
| `design.md`, `design authority`, `concerns map` | `/dw-analyze-project` (also listed as a post-update action when missing) |
|
|
122
125
|
| `subagent`, `subtask`, `handoff`, `delegate` | `/dw-subtask-start` or `/dw-subtask-resume` |
|
|
123
126
|
| `skills`, `skill health`, `bloat` | `/dw-skill-health` |
|
|
127
|
+
| `worktree`, `worktrees`, `disk`, `merge worktree`, `clean worktrees` | `/dw-worktree list` / `create <slug>` / `clean --apply` / `merge <slug>` |
|
|
124
128
|
| `analyze`, `rules`, `conventions` | `/dw-analyze-project` |
|
|
125
129
|
| `constitution`, `principles` | `/dw-analyze-project` (Step 8 generates the constitution) |
|
|
126
130
|
| `security opportunities`, `hardening ideas`, `improve security` | `/dw-opportunities "security"` |
|