@brunosps00/dev-workflow 2.1.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/plugin.json +1 -1
- package/CHANGELOG.md +72 -0
- package/README.md +6 -3
- package/lib/constants.js +4 -0
- package/lib/init.js +26 -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-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-report.md +169 -0
- package/scaffold/en/commands/dw-run.md +2 -1
- package/scaffold/en/commands/dw-worktree.md +100 -0
- package/scaffold/pt-br/agent-instructions.md +2 -0
- package/scaffold/pt-br/commands/dw-autopilot.md +2 -0
- package/scaffold/pt-br/commands/dw-claude-run.md +1 -1
- package/scaffold/pt-br/commands/dw-codex-run.md +1 -1
- package/scaffold/pt-br/commands/dw-copilot-run.md +1 -1
- package/scaffold/pt-br/commands/dw-harness-audit.md +2 -0
- package/scaffold/pt-br/commands/dw-help.md +6 -2
- package/scaffold/pt-br/commands/dw-pause.md +1 -0
- package/scaffold/pt-br/commands/dw-report.md +169 -0
- package/scaffold/pt-br/commands/dw-run.md +2 -1
- package/scaffold/pt-br/commands/dw-worktree.md +100 -0
- package/scaffold/scripts/hooks/git-guardrails.mjs +1 -0
- 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
|
@@ -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,78 @@ 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
|
+
|
|
13
85
|
## [2.1.0] — 2026-08-04
|
|
14
86
|
|
|
15
87
|
Release driven by a skill-by-skill analysis of [mattpocock/skills](https://github.com/mattpocock/skills),
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ 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
47
|
### Tier 1 — Gateway (4)
|
|
48
48
|
|
|
@@ -53,7 +53,7 @@ dev-workflow v2.1.0 ships **39 commands** organized into four tiers. Most users
|
|
|
53
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`. |
|
|
54
54
|
| **`/dw-help [keyword]`** | Discover commands. Pass a keyword for shortcuts; `--advanced` reveals internal commands. |
|
|
55
55
|
|
|
56
|
-
### Tier 2 — Pipeline granular (
|
|
56
|
+
### Tier 2 — Pipeline granular (11)
|
|
57
57
|
|
|
58
58
|
Use these when you want step-by-step control instead of `/dw-autopilot`.
|
|
59
59
|
|
|
@@ -67,10 +67,11 @@ Use these when you want step-by-step control instead of `/dw-autopilot`.
|
|
|
67
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). |
|
|
68
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. |
|
|
69
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. |
|
|
70
71
|
| **`/dw-commit`** | Atomic Conventional Commits for pending changes. Applies `dw-git-discipline` (one intent per commit, lint+tests+build green before). |
|
|
71
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. |
|
|
72
73
|
|
|
73
|
-
### Tier 3 — Specialty (
|
|
74
|
+
### Tier 3 — Specialty (14)
|
|
74
75
|
|
|
75
76
|
| Command | What |
|
|
76
77
|
|---------|------|
|
|
@@ -82,6 +83,7 @@ Use these when you want step-by-step control instead of `/dw-autopilot`.
|
|
|
82
83
|
| **`/dw-context-budget`** | Audits context overhead from commands, skills, agents, instruction files, and MCPs. |
|
|
83
84
|
| **`/dw-harness-audit`** | Deterministic health scorecard for the dev-workflow install, agents, wrappers, MCPs, and gates. |
|
|
84
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`. |
|
|
85
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**. |
|
|
86
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/`. |
|
|
87
89
|
| **`/dw-dockerize`** | Reads existing project, detects stack + runtime deps, proposes Dockerfile + docker-compose for dev/prod with explicit trade-offs (Conservative/Balanced/Bold). |
|
|
@@ -226,6 +228,7 @@ your-project/
|
|
|
226
228
|
│ ├── spec/ # PRD directories — each contains tasks-validation.md
|
|
227
229
|
│ ├── bugfixes/ # Persistent bugfix records: NNN-<slug>/{TASK.md, SUMMARY.md, fix-report.md} + review/, QA/
|
|
228
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)
|
|
229
232
|
│ ├── secure-audit/ # Security Gate summaries and per-layer reports
|
|
230
233
|
│ ├── subtasks/ # Local ephemeral subagent input packets and handoffs (pending/archive ignored by Git)
|
|
231
234
|
│ └── STATE.md # Session state: Decisions, Blockers, Todos, Open Loops, Deferred Ideas, Lessons, Preferences (managed by /dw-pause + /dw-resume)
|
package/lib/constants.js
CHANGED
|
@@ -29,6 +29,7 @@ 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
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.' },
|
|
@@ -38,6 +39,7 @@ const COMMANDS = {
|
|
|
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.' },
|
|
40
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.' },
|
|
41
43
|
{ name: 'dw-update', description: 'Updates dev-workflow to the latest npm release in-place, with a snapshot you can roll back to.' },
|
|
42
44
|
],
|
|
43
45
|
'pt-br': [
|
|
@@ -70,6 +72,7 @@ const COMMANDS = {
|
|
|
70
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/.' },
|
|
71
73
|
{ name: 'dw-redesign-ui', description: 'Audita uma pagina frontend, propoe direcoes de design que voce escolhe, e entrega o redesign.' },
|
|
72
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.' },
|
|
73
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-*.' },
|
|
74
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>.' },
|
|
75
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.' },
|
|
@@ -79,6 +82,7 @@ const COMMANDS = {
|
|
|
79
82
|
{ name: 'dw-subtask-complete', userInvoked: true, description: 'Registra handoff estruturado do subagente com resultado, arquivos, decisoes, riscos, verificacao e bloqueios.' },
|
|
80
83
|
{ name: 'dw-subtask-resume', userInvoked: true, description: 'Consome handoffs pendentes de subagentes, resume para o parent e arquiva os pacotes locais.' },
|
|
81
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.' },
|
|
82
86
|
{ name: 'dw-update', description: 'Atualiza o dev-workflow para o release mais recente no npm, com snapshot para rollback.' },
|
|
83
87
|
],
|
|
84
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/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
|
|
@@ -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"` |
|
|
@@ -29,6 +29,7 @@ You are a session-handoff agent. Your job is to consolidate the current session'
|
|
|
29
29
|
Read the conversation context and identify, **without inventing**:
|
|
30
30
|
|
|
31
31
|
- **Open loops**: tasks/work started but not finished (e.g. "PRD `prd-foo` is at TechSpec stage, awaiting user approval"; "Task 3 of `prd-bar` failing on lint")
|
|
32
|
+
- **Leftover worktrees**: run `node .dw/scripts/lib/worktree-gc.mjs list`. Every `REMOVABLE` entry is an open loop to close **now** with `/dw-worktree clean --apply` — not something to record; `KEEP:*` entries go under Open Loops with their verdict and reason.
|
|
32
33
|
- **Decisions made**: choices the user and agent agreed on during the session that affect future work
|
|
33
34
|
- **Blockers encountered**: things that stopped forward motion (waiting on input, broken tooling, knowledge gap)
|
|
34
35
|
- **Todos** mentioned in passing that don't yet have a PRD or task file
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<system_instructions>
|
|
2
|
+
You are the progress-report loop. While long work is running in this session, you emit a detailed, timestamped report at a fixed cadence (default every 10 minutes) saying **what is already done, what is being done right now, and what is still left** — without the user having to ask "any news?". Each report goes to the chat AND is appended to a daily log under `.dw/reports/`. The loop disarms itself when the work is finished.
|
|
3
|
+
|
|
4
|
+
## When to Use
|
|
5
|
+
- Use when the user says "report every N minutes", "keep me posted while this runs", "give me status reports", "I want to know where we are every 10 minutes".
|
|
6
|
+
- Auto-armed by `/dw-run` (all-tasks and `--resume` modes), by `/dw-autopilot` (execution invocation), and by the `dw-cli-run` adapters (`/dw-codex-run`, `/dw-claude-run`, `/dw-copilot-run`) when they dispatch long work. Auto-arm is idempotent and can be disabled with `DW_REPORT_AUTO=off`.
|
|
7
|
+
- Do NOT use as a substitute for `/dw-pause` (mental-state handoff) or `/dw-goal status` (goal contract state). This is a heartbeat about work in flight, not durable project state.
|
|
8
|
+
- Do NOT use to poll a background task the harness already notifies you about — the loop reports *around* those notifications; it never replaces them.
|
|
9
|
+
|
|
10
|
+
## Pipeline Position
|
|
11
|
+
**Predecessor:** any long-running command (`/dw-run`, `/dw-autopilot`, `/dw-goal`, `/dw-codex-run`, builds, deploys) | **Successor:** none — the loop ends with a final report; `/dw-pause` may consume the day's log.
|
|
12
|
+
|
|
13
|
+
## Modes
|
|
14
|
+
|
|
15
|
+
| Invocation | Behavior |
|
|
16
|
+
|------------|----------|
|
|
17
|
+
| `/dw-report` | Arm the loop at the default cadence (**10 minutes**). If already armed, print the current state and do nothing else. |
|
|
18
|
+
| `/dw-report --every <N>m` | Arm (or re-arm) the loop at `N` minutes (`5m`, `10m`, `15m`, `30m`; `--every 600s` also accepted). Minimum `1m`. |
|
|
19
|
+
| `/dw-report now` | Emit one report immediately, without touching the cadence. Works armed or not. |
|
|
20
|
+
| `/dw-report status` | Show whether the loop is armed, the cadence, when it was armed, the last report time, how many reports were emitted, and the log path. |
|
|
21
|
+
| `/dw-report stop` | Disarm. Emits a final report first if there is unreported progress. |
|
|
22
|
+
|
|
23
|
+
## Inputs
|
|
24
|
+
|
|
25
|
+
| Variable | Description | Example |
|
|
26
|
+
|----------|-------------|---------|
|
|
27
|
+
| `{{EVERY}}` | Cadence. Optional; defaults to `10m`. | `--every 5m` |
|
|
28
|
+
| `DW_REPORT_AUTO` | Env var. `off` disables auto-arm from other commands (manual `/dw-report` still works). | `DW_REPORT_AUTO=off` |
|
|
29
|
+
| `DW_REPORT_BELL` | Env var. Optional shell command executed right before each report is written (local sound, desktop notification, etc.). Silent when unset. | `DW_REPORT_BELL="paplay /usr/share/sounds/freedesktop/stereo/message.oga"` |
|
|
30
|
+
|
|
31
|
+
`report.bell` in `.dw/config.json` is the file-based equivalent of `DW_REPORT_BELL` (env var wins). Because the bell is machine-specific, prefer the env var over committing it.
|
|
32
|
+
|
|
33
|
+
## State and Artifacts
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.dw/reports/
|
|
37
|
+
├── .gitignore # ????-??-??.md and .active.json are machine-local (created by init/update)
|
|
38
|
+
├── .active.json # loop state — exists only while armed
|
|
39
|
+
└── YYYY-MM-DD.md # append-only daily log; one entry per emitted report
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`.active.json` schema:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"schema_version": "1.0",
|
|
47
|
+
"armed_at": "2026-08-24 15:10:02",
|
|
48
|
+
"every_seconds": 600,
|
|
49
|
+
"vehicle": "wakeup | background-bash",
|
|
50
|
+
"armed_by": "user | dw-run | dw-autopilot | dw-cli-run",
|
|
51
|
+
"seq": 3,
|
|
52
|
+
"last_report_at": "2026-08-24 15:40:12",
|
|
53
|
+
"last_state": "working | blocked | finished"
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Timestamps are **real** — always taken from `date '+%Y-%m-%d %H:%M:%S'`, never estimated.
|
|
58
|
+
|
|
59
|
+
## Vehicle — how the loop stays alive
|
|
60
|
+
|
|
61
|
+
<critical>The main thread never sleeps in the foreground. Pick ONE vehicle, record it in `.active.json`, and never claim "loop armed" unless that vehicle is actually scheduled.</critical>
|
|
62
|
+
|
|
63
|
+
1. **Native wakeup (PREFERRED — Claude Code).** Use the harness's scheduled-wakeup facility (the same mechanism as `/loop` in self-paced mode): after every tick, schedule the next wake-up in `every_seconds`. Pass `noop: true` on a silent tick and `noop: false` on a tick that reported. The `reason` is `dw-report tick every <N>m`. The loop dies with the session — no orphan.
|
|
64
|
+
2. **Background shell timer (FALLBACK — Codex, Copilot, OpenCode, or any harness without wakeups).** Run, in the background, `sleep <every_seconds>; date '+%Y-%m-%d %H:%M:%S'`. When its completion notification arrives, run the tick, then start the next timer. One timer at a time; never chain sleeps in the foreground.
|
|
65
|
+
3. **Never a system cron.** A cron does not know when the work ended and keeps firing (and ringing the bell) for days. If the harness only offers cron-style scheduling, use it but treat `/dw-report stop` and the auto-disarm rule as mandatory cleanup.
|
|
66
|
+
|
|
67
|
+
If the work changes vehicle mid-way (e.g. the session is resumed elsewhere), `/dw-report status` must say so honestly: `armed in state file, but no wake-up is scheduled in this session — run /dw-report to re-arm`.
|
|
68
|
+
|
|
69
|
+
## Tick Protocol (every fire)
|
|
70
|
+
|
|
71
|
+
1. **Timestamp.** `date '+%Y-%m-%d %H:%M:%S'`.
|
|
72
|
+
2. **Assess from the session.** The source of truth is the session's own work — what you did, what you started, what came back. Use cheap observable checks as evidence, not as archaeology: `git log --oneline` since the last report, `git status --short | wc -l`, the tail of a log or stream this session started, the number of completed steps in a CLI stream (`grep -c '"type":"item.completed"' <stream>.jsonl`), a background task's last notification. Do NOT go mining `.dw/spec/`, `.dw/goals/`, or `STATE.md` to reconstruct history you were not part of.
|
|
73
|
+
3. **Classify the moment.**
|
|
74
|
+
- **working** — something is in flight (a command, a subagent, a workflow, a CLI run, a build, a deploy) or you are actively implementing.
|
|
75
|
+
- **blocked** — nothing is running because the work is waiting on the user (a decision, an approval, a credential).
|
|
76
|
+
- **finished** — the work the loop was armed for is complete (or failed terminally) and nothing else is queued.
|
|
77
|
+
4. **Decide whether to speak.**
|
|
78
|
+
- `working` → **REPORT**. Always. Even when nothing changed since the last tick ("build still at step 6/9, ~4 min left" is a valid, expected report).
|
|
79
|
+
- `blocked` → report **once** when the state changes to blocked (that is news); afterwards, on every tick where nothing changed, **stay silent**: no chat line, no log entry, no bell. The check happens; the output does not.
|
|
80
|
+
- `finished` → **FINAL REPORT immediately** (do not wait for the cadence when you notice completion outside a tick), then **disarm**: delete `.active.json`, cancel the pending wake-up/timer, and say so in the final report.
|
|
81
|
+
5. **Bell (optional).** If `DW_REPORT_BELL` (or `report.bell`) is set, run it *before* writing. Never on a silent tick.
|
|
82
|
+
6. **Write.** The report goes to the chat and is appended verbatim to `.dw/reports/YYYY-MM-DD.md` (create the file with a `# Reports — YYYY-MM-DD` heading if missing). Update `.active.json` (`seq`, `last_report_at`, `last_state`).
|
|
83
|
+
7. **Re-arm** the vehicle — unless step 4 disarmed the loop.
|
|
84
|
+
|
|
85
|
+
## Report Format — cumulative with delta highlighted
|
|
86
|
+
|
|
87
|
+
The user asked for a **detailed** report. Detailed means: every item carries evidence, every in-flight item carries a measurable progress figure, and the remaining list is ordered with the next milestone first.
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
📊 Report — 2026-08-24 15:40:12 (#3 · every 10m · armed 15:10)
|
|
91
|
+
|
|
92
|
+
## ✅ Done (cumulative)
|
|
93
|
+
- ➕ Task 3/7 — import parser handles quoted fields — `src/import/parser.ts`, commit `a1b2c3d`, 14 tests green
|
|
94
|
+
- ➕ Task 2/7 — CSV schema validation — commit `9f8e7d6`, `npm test` 41/41
|
|
95
|
+
- Task 1/7 — fixture set for imports — commit `1234abc`
|
|
96
|
+
|
|
97
|
+
## 🔄 Doing
|
|
98
|
+
- Task 4/7 — batch upsert endpoint — 6 files touched, last command `npm test -- import` (running 1m40s); codex stream: 23 steps completed, last `command_execution: pnpm build`
|
|
99
|
+
|
|
100
|
+
## ⏳ Remaining
|
|
101
|
+
1. Task 5/7 — error report download (next milestone, blocked on Task 4)
|
|
102
|
+
2. Task 6/7 — UI wiring
|
|
103
|
+
3. Task 7/7 — E2E for the happy path
|
|
104
|
+
4. Level 2 review + QA + security gate
|
|
105
|
+
|
|
106
|
+
## ⚠️ Blockers / decisions needed
|
|
107
|
+
- none
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Rules:
|
|
111
|
+
- **`➕` marks items completed since the previous report.** Older items stay in the list without the marker, so each report is self-contained and still shows the pace.
|
|
112
|
+
- **Evidence or it did not happen:** a file path, a commit SHA, a test count, a log line. "Implemented X" without evidence is not allowed.
|
|
113
|
+
- **Measurable progress in Doing:** a step counter, a file count, a running command with its elapsed time, a percentage from a real progress line. Never a bare "in progress".
|
|
114
|
+
- **Remaining is ordered:** the next milestone first, then the rest; include the pipeline gates that still lie ahead (review, QA, security audit, commit, PR) when they apply.
|
|
115
|
+
- **Blockers section only when there is something to say** — otherwise write `- none` or omit it.
|
|
116
|
+
- **Header counts are real:** `#n` is `seq`, the cadence and the arm time come from `.active.json`.
|
|
117
|
+
- When the loop was armed by another command, the first report says so: `armed by /dw-run (all pending tasks)`.
|
|
118
|
+
|
|
119
|
+
### Final report
|
|
120
|
+
|
|
121
|
+
Same shape, with the header `📊 FINAL Report — <timestamp> (#n · loop disarmed)`, an explicit outcome line under Done (`Outcome: all 7 tasks committed, review APPROVED` or `Outcome: FAILED at task 4 — see blockers`), and `Remaining` listing what the user still has to do by hand (open the PR, approve the gate, merge).
|
|
122
|
+
|
|
123
|
+
### Chat output for arm / status / stop
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
📊 Report loop armed — every 10m · vehicle: wakeup · log: .dw/reports/2026-08-24.md
|
|
127
|
+
First report at ~15:20. Silent while blocked; final report + auto-disarm when the work ends. Stop with /dw-report stop.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
📊 Report loop — ARMED · every 10m · since 15:10 · 3 reports · last 15:40 · state: working · log: .dw/reports/2026-08-24.md
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
📊 Report loop — NOT armed. Arm with /dw-report [--every <N>m].
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Cadence Discipline
|
|
139
|
+
|
|
140
|
+
<critical>The cadence is the user's, not yours. Never stretch the interval to "wait for the build to finish" or "avoid noise" — a report that says "nothing changed, ~X min left" is the product while work is running. Change the interval only on an explicit user instruction (`--every`).</critical>
|
|
141
|
+
|
|
142
|
+
<critical>Never claim the loop is active without a scheduled wake-up or a live background timer. `/dw-report status` reads `.active.json` AND checks the vehicle; if they disagree, say so.</critical>
|
|
143
|
+
|
|
144
|
+
<critical>Silence is only for the blocked/idle state. Working state always reports; the transition to blocked reports once; completion reports immediately.</critical>
|
|
145
|
+
|
|
146
|
+
## Auto-arm Contract (for the commands that call this)
|
|
147
|
+
|
|
148
|
+
When `/dw-run` (Mode 2 / Mode 3), `/dw-autopilot` (execution invocation), or a `dw-cli-run` adapter starts long work, it invokes `/dw-report` **before** dispatching:
|
|
149
|
+
|
|
150
|
+
- **Idempotent:** if `.dw/reports/.active.json` exists and the vehicle is live, do nothing (keep the existing cadence). If the file exists but the vehicle is dead, re-arm and say so.
|
|
151
|
+
- **Respects opt-out:** if `DW_REPORT_AUTO=off`, skip silently (one line in the caller's output: `report loop: auto-arm disabled by DW_REPORT_AUTO`).
|
|
152
|
+
- **Records the caller:** `armed_by` in `.active.json`, echoed in the first report.
|
|
153
|
+
- **Ends with the caller's work:** the caller's completion (all tasks done + final review, goal complete + PR gate, CLI run gated) is the `finished` state — final report, then disarm. The caller does not need to call `/dw-report stop`.
|
|
154
|
+
- **Never blocks the caller:** arming takes one tool call; if the vehicle is unavailable, the caller proceeds and prints `report loop: no wake-up vehicle available in this harness — run /dw-report manually if you want a background timer`.
|
|
155
|
+
|
|
156
|
+
## Anti-patterns
|
|
157
|
+
- Reporting "in progress" without a number, a command, or a file.
|
|
158
|
+
- Inventing a timestamp, a commit SHA, or a test count.
|
|
159
|
+
- Emitting `idle` / `no news` lines while nothing is running — that is exactly the noise this loop exists to prevent.
|
|
160
|
+
- Stretching or skipping a tick while work is running.
|
|
161
|
+
- Leaving a system cron behind after the work ended.
|
|
162
|
+
- Reading `.dw/spec/` or `.dw/goals/` to narrate work this session did not do.
|
|
163
|
+
- Ringing the bell on a silent tick.
|
|
164
|
+
|
|
165
|
+
## Structured Return
|
|
166
|
+
|
|
167
|
+
After arming, stopping, or each report, the command's own status is fully described by the chat line plus `.dw/reports/.active.json`. Other commands only need to know: **armed (bool), every_seconds, seq, last_state**.
|
|
168
|
+
|
|
169
|
+
</system_instructions>
|
|
@@ -93,6 +93,7 @@ When available under `./.agents/skills/`, these skills are invoked per task:
|
|
|
93
93
|
|
|
94
94
|
### Behavior
|
|
95
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.
|
|
96
97
|
1. **Plan check (via `dw-execute-phase/plan-checker` agent):**
|
|
97
98
|
- 6-dimension goal-backward verification: are these tasks actually going to deliver what the PRD promises?
|
|
98
99
|
- If FAIL on any dimension, STOP and report to user before any code is touched.
|
|
@@ -133,7 +134,7 @@ When available under `./.agents/skills/`, these skills are invoked per task:
|
|
|
133
134
|
|
|
134
135
|
1. Read `active-session.md` to determine which task/wave the session stopped at.
|
|
135
136
|
2. Surface to user: "Resuming from wave N, task X.0. Previously completed: <list>. Continue?"
|
|
136
|
-
3. On confirmation, resume from the next pending task with the same Mode 2 behavior.
|
|
137
|
+
3. On confirmation, resume from the next pending task with the same Mode 2 behavior (including step 0 — arm `/dw-report`).
|
|
137
138
|
|
|
138
139
|
If `active-session.md` doesn't exist but uncompleted tasks remain, treat as Mode 2 fresh start.
|
|
139
140
|
|