wdi-method 0.6.24 → 0.6.25
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/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@ version contains every fix below it.
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [0.6.25] - 2026-09-19
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Ephemeral Subagent Handoff Lifecycle & Mandatory Scratch Deletion:** `wdi-daily-what-to-build` mandates that subagent handoff packets, raw CLI logs, and review outputs are disposable execution scratch (not product evidence). Review outputs are strictly scoped to `<slug>-review-output.md`, and all scratch files under `.work/wdi-daily-what-to-build/` MUST be deleted upon coordinator fold-in and stamping. Raw review files MUST NOT be staged, committed, or archived into `.scratch/` or `.archive/`.
|
|
18
|
+
- **Distillation Scope Extension:** `wdi-build` Phase 4 Distillation checklist explicitly requires verifying and cleaning lingering triage scratch under `.work/wdi-daily-what-to-build/` before closing a spec.
|
|
19
|
+
- **Selective Staging Discipline on Autopilot:** `wdi-autopilot` explicitly prohibits broad wildcard staging (`git add .`, `git add -A`, `git add --all`). Staging is restricted to application code, tests, `.control/`, and `.scratch/<active-spec>/`. Ephemeral execution scratch under `.work/` is barred from the run branch, and mandate finish requires a clean sweep of temporary `.work/` files.
|
|
20
|
+
- **Enriched Ephemeral Precondition Guidance:** `wdi-daily-what-to-test` enriches Step 0.4 halt guidance when untracked files match `.work/` scratch, providing direct remediation instructions instead of generic dirty tree errors.
|
|
21
|
+
- **Scaffold Ignore for Raw Tool Dumps:** `bin/wdi-method.js` now automatically ensures `.work/*.txt`, `.work/*.log`, and `.work/tmp/` are ignored in `.gitignore` on install/update, preventing raw CLI redirection dumps from causing dirty working tree preflight halts.
|
|
22
|
+
|
|
23
|
+
**What a repo that already has the method installed does about it.** Run `npx wdi-method@latest update`. It updates the daily skills with strict scratch cleanup and staging guardrails, and ensures ephemeral tool dumps in `.work/` are ignored in `.gitignore`.
|
|
24
|
+
|
|
13
25
|
## [0.6.24] - 2026-09-18
|
|
14
26
|
|
|
15
27
|
### Added
|
package/bin/wdi-method.js
CHANGED
|
@@ -917,6 +917,23 @@ function ensureGitignoreSmoke(target) {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
|
|
920
|
+
function ensureGitignoreScratchDumps(target) {
|
|
921
|
+
const gitignorePath = path.join(target, ".gitignore");
|
|
922
|
+
const rules = [".work/*.txt", ".work/*.log", ".work/tmp/"];
|
|
923
|
+
if (fs.existsSync(gitignorePath)) {
|
|
924
|
+
const content = fs.readFileSync(gitignorePath, "utf8");
|
|
925
|
+
const lines = content.split(/\r?\n/).map((l) => l.trim());
|
|
926
|
+
const missing = rules.filter((r) => !lines.includes(r) && !lines.includes(`/${r}`));
|
|
927
|
+
if (missing.length === 0) return;
|
|
928
|
+
const separator = content.endsWith("\n") ? "" : "\n";
|
|
929
|
+
fs.writeFileSync(gitignorePath, `${content}${separator}# Ephemeral execution scratch and raw tool dumps\n${missing.join("\n")}\n`, "utf8");
|
|
930
|
+
note(`added ${missing.join(", ")} to .gitignore`);
|
|
931
|
+
} else {
|
|
932
|
+
fs.writeFileSync(gitignorePath, `# Ephemeral execution scratch and raw tool dumps\n${rules.join("\n")}\n`, "utf8");
|
|
933
|
+
note(`created .gitignore with ${rules.join(", ")}`);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
920
937
|
function seedDailyTierScaffold(target) {
|
|
921
938
|
const control = path.join(target, ".control");
|
|
922
939
|
if (!fs.existsSync(control)) return;
|
|
@@ -949,6 +966,7 @@ function seedDailyTierScaffold(target) {
|
|
|
949
966
|
|
|
950
967
|
ensureGitignoreCustomDispatch(target);
|
|
951
968
|
ensureGitignoreSmoke(target);
|
|
969
|
+
ensureGitignoreScratchDumps(target);
|
|
952
970
|
|
|
953
971
|
const localDispatchDest = path.join(control, "custom-dispatch.yaml");
|
|
954
972
|
if (!fs.existsSync(localDispatchDest) && fs.existsSync(exampleSrc)) {
|
|
@@ -150,6 +150,11 @@ only on one machine. What an iteration MUST NOT do is start a metered runner: no
|
|
|
150
150
|
marked ready, no re-run requested on a ticket that is not finished. Evidence during the run is the **local**
|
|
151
151
|
suite, which `wdi-build` Phase 3 Step 2 already requires and which costs nothing. See § Cycle-end CI.
|
|
152
152
|
|
|
153
|
+
**Selective Staging Discipline:** Staging MUST be strictly selective (`git add <path>`). The coordinator
|
|
154
|
+
and builders MUST NOT use broad wildcard staging (`git add .`, `git add -A`, `git add --all`). Staging MUST include
|
|
155
|
+
only application code, tests, `.control/`, and `.scratch/<active-spec>/`. Ephemeral execution scratch under `.work/`
|
|
156
|
+
MUST NOT be staged or committed into the run branch.
|
|
157
|
+
|
|
153
158
|
**Runnable** means: not listed under Blocked in `## Resume`, and not parked by the mandate. A blocked row is
|
|
154
159
|
retried only when the owner unblocks it or a later change removes the cause — and the ledger row that
|
|
155
160
|
recorded the block says which. A run that re-picks a blocked step spends the whole mandate window on it, and
|
|
@@ -401,10 +406,13 @@ When § The work table reaches § Finish:
|
|
|
401
406
|
(e.g. `ci_override: local-only-approved-by: "<Person, Date>"` per `.constitution/method/ci-guide.md`),
|
|
402
407
|
the run MUST NOT mark the draft PR ready (`gh pr ready`). The PR MUST remain as a Draft, no cloud runner
|
|
403
408
|
is awaited, and the final output report explicitly states: *"locally verified; cloud verification intentionally deferred by mandate"*.
|
|
404
|
-
5. **
|
|
409
|
+
5. **Clean ephemeral execution scratch:** delete all temporary scratch files under `.work/` created during
|
|
410
|
+
this mandate run (such as temporary triage outputs, diff dumps, and scratch files). Ephemeral execution scratch
|
|
411
|
+
MUST NOT survive the mandate finish or be left on the run branch.
|
|
412
|
+
6. **Cancel the loop cleanly:** in Claude Code, inspect scheduled jobs via `CronList`, identify the job firing
|
|
405
413
|
`/wdi-autopilot`, and call `CronDelete` on its task ID to eliminate zombie loop firings; elsewhere, call the platform's
|
|
406
414
|
loop cancellation mechanism or inform the owner that the loop has completed its mandate and has nothing left to do.
|
|
407
|
-
|
|
415
|
+
7. Write the final report as the Output below. The owner merges; the run never does.
|
|
408
416
|
|
|
409
417
|
## Red Flags — STOP
|
|
410
418
|
|
|
@@ -415,6 +423,7 @@ When § The work table reaches § Finish:
|
|
|
415
423
|
- Closing a spec while the run branch's own full suite is red, or marking the PR ready while CI is red
|
|
416
424
|
- **Starting a cloud run before § Finish** — a PR marked ready mid-run, a workflow dispatched to check a
|
|
417
425
|
ticket, or an intermediate push left free to match a bare `on: push` trigger
|
|
426
|
+
- Staging with broad wildcards (`git add .`, `git add -A`, `git add --all`) or committing ephemeral `.work/` scratch into the run branch
|
|
418
427
|
- Answering the quota problem by committing less often, instead of by fixing what a push triggers
|
|
419
428
|
- Spending the one cloud run on a head whose local suite was never run
|
|
420
429
|
- Re-merging a branch whose merge was reverted, instead of cutting a new one
|
|
@@ -347,6 +347,8 @@ out.
|
|
|
347
347
|
4. **Distillation.** Every applicable row of the ownership table in `corpus-guide.md` has been landed by its
|
|
348
348
|
owner. Anything durable in the spec folder leaves it now, or dies with it — **the ticket files included.**
|
|
349
349
|
Their prose is working output; what survives is the index in `specs.yaml` and whatever the checklist routed.
|
|
350
|
+
Distillation also encompasses deleting any lingering ephemeral triage scratch under `.work/wdi-daily-what-to-build/`
|
|
351
|
+
for this spec. A spec MUST NOT close with uncleaned `.work/` scratch files.
|
|
350
352
|
5. **RTM green.** Every traceability row for this spec is closed. New risks are in the risk register with an
|
|
351
353
|
owner.
|
|
352
354
|
6. Mark the spec `status: closed` in `specs.yaml`.
|
|
@@ -108,6 +108,8 @@ Reviewer resolution:
|
|
|
108
108
|
stop and report immediately (fail-closed).
|
|
109
109
|
- Dispatch execution & process discipline:
|
|
110
110
|
- Cap shell-out dispatch at a hard wall-clock limit (default 600s, or `timeout_s` if defined in `custom-dispatch.yaml`).
|
|
111
|
+
- If review output is written to disk, it MUST be scoped to the slug: `.work/wdi-daily-what-to-build/<slug>-review-output.md`
|
|
112
|
+
(MUST NOT use un-scoped generic names like `terra-review-output.md` or `review.md`).
|
|
111
113
|
- Run backgrounded with polling or synchronous wait. If the timeout expires, or the process exits non-zero,
|
|
112
114
|
or the output file cannot be read: terminate the entire process tree by its PID (MUST NOT use process name-based
|
|
113
115
|
killing). Record in the final report: `peer review: fell back to coordinator self-review after timeout/failure`.
|
|
@@ -137,6 +139,18 @@ under the coordinator's orchestration, the coordinator writes the `spec_reviewed
|
|
|
137
139
|
```
|
|
138
140
|
The coordinator MUST NOT delegate registry stamping to external shell-out processes.
|
|
139
141
|
|
|
142
|
+
### Clean Ephemeral Review Artifacts (Mandatory Deletion)
|
|
143
|
+
Handoff packets, raw reviewer transcripts, and shell redirection logs generated during this triage pass are
|
|
144
|
+
disposable execution scratch, NOT product evidence. Once the advisory review is evaluated, folded into the draft,
|
|
145
|
+
and stamped in `specs.yaml`:
|
|
146
|
+
- The coordinator MUST delete all scratch files created under `.work/wdi-daily-what-to-build/` for this `<slug>`
|
|
147
|
+
(including `<slug>-second-opinion.md`, `<slug>-review-output.md`, and any temporary CLI stdout/stderr dumps such
|
|
148
|
+
as `.work/*.txt` or `.work/*.log`).
|
|
149
|
+
- Handoff packets and raw review text MUST NOT be left in the working tree, MUST NOT be staged or committed to git,
|
|
150
|
+
and MUST NOT be archived or moved into `.scratch/` or `.archive/` (distillation deletes scratch; archiving is
|
|
151
|
+
reserved for completed specification documents).
|
|
152
|
+
- A triage pass MUST NOT hand off with uncleaned `.work/wdi-daily-what-to-build/` artifacts on disk.
|
|
153
|
+
|
|
140
154
|
### Validation
|
|
141
155
|
Run canonical validation using `uv`:
|
|
142
156
|
```bash
|
|
@@ -151,5 +165,6 @@ uv run .constitution/method/scripts/validate.py --generate --baseline
|
|
|
151
165
|
## 6. Stop and hand off
|
|
152
166
|
|
|
153
167
|
Report what now exists (or that the notes were green) and its file path. State explicitly whether `spec_reviewed`
|
|
154
|
-
was stamped or if peer review fell back to coordinator self-review
|
|
155
|
-
|
|
168
|
+
was stamped or if peer review fell back to coordinator self-review, and confirm that all ephemeral `.work/` scratch
|
|
169
|
+
artifacts have been deleted. MUST NOT commit, push, or start `wdi-autopilot` in this same run — state that as the
|
|
170
|
+
next step and wait for the maintainer to request it.
|
|
@@ -32,7 +32,10 @@ closed tickets and specs, never invented from memory.
|
|
|
32
32
|
immediately and report to the maintainer; per `.constitution/method/branch-guide.md`, MUST NOT guess
|
|
33
33
|
or silently fall back to `main`.
|
|
34
34
|
4. Verify the primary working tree is clean (`git status --porcelain`). If uncommitted changes exist,
|
|
35
|
-
stop and report without modifying git state.
|
|
35
|
+
stop and report without modifying git state. If the uncommitted files match known ephemeral triage scratch
|
|
36
|
+
under `.work/` (such as uncleaned `.work/wdi-daily-what-to-build/` packets or raw CLI dump logs), explicitly
|
|
37
|
+
report them as abandoned scratch from a previous run and provide the exact remediation command
|
|
38
|
+
(e.g. `Remove-Item <paths>`) rather than an ambiguous dirty tree error.
|
|
36
39
|
|
|
37
40
|
## 1. Sync (Fast-Forward Only)
|
|
38
41
|
|