pan-wizard 3.26.0 → 3.27.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/README.md +1 -1
- package/commands/pan/hygiene.md +14 -8
- package/commands/pan/milestone-audit.md +10 -4
- package/hooks/dist/pan-cost-logger.js +69 -5
- package/hooks/dist/pan-stop-guard.js +32 -1
- package/hooks/dist/pan-trace-logger.js +35 -2
- package/package.json +1 -1
- package/pan-wizard-core/bin/lib/bridge.cjs +0 -1
- package/pan-wizard-core/bin/lib/bus.cjs +0 -1
- package/pan-wizard-core/bin/lib/campaign.cjs +3 -2
- package/pan-wizard-core/bin/lib/commands-learnings.cjs +8 -8
- package/pan-wizard-core/bin/lib/commands.cjs +15 -14
- package/pan-wizard-core/bin/lib/config.cjs +5 -5
- package/pan-wizard-core/bin/lib/constants.cjs +27 -0
- package/pan-wizard-core/bin/lib/context-budget.cjs +28 -0
- package/pan-wizard-core/bin/lib/core.cjs +190 -26
- package/pan-wizard-core/bin/lib/cost.cjs +0 -1
- package/pan-wizard-core/bin/lib/distill.cjs +3 -3
- package/pan-wizard-core/bin/lib/focus.cjs +16 -16
- package/pan-wizard-core/bin/lib/hud.cjs +1 -1
- package/pan-wizard-core/bin/lib/hygiene.cjs +397 -37
- package/pan-wizard-core/bin/lib/init.cjs +90 -13
- package/pan-wizard-core/bin/lib/knowledge.cjs +0 -1
- package/pan-wizard-core/bin/lib/memory.cjs +1 -1
- package/pan-wizard-core/bin/lib/milestone.cjs +3 -3
- package/pan-wizard-core/bin/lib/optimize.cjs +3 -3
- package/pan-wizard-core/bin/lib/phase.cjs +4 -4
- package/pan-wizard-core/bin/lib/planning-root.cjs +327 -0
- package/pan-wizard-core/bin/lib/preview.cjs +0 -1
- package/pan-wizard-core/bin/lib/review-deep.cjs +0 -1
- package/pan-wizard-core/bin/lib/roadmap.cjs +1 -1
- package/pan-wizard-core/bin/lib/state-compact.cjs +339 -0
- package/pan-wizard-core/bin/lib/state.cjs +0 -1
- package/pan-wizard-core/bin/lib/template.cjs +1 -1
- package/pan-wizard-core/bin/lib/utils.cjs +39 -11
- package/pan-wizard-core/bin/lib/verify.cjs +4 -3
- package/pan-wizard-core/bin/lib/whatif.cjs +0 -1
- package/pan-wizard-core/bin/pan-tools.cjs +58 -4
- package/pan-wizard-core/workflows/milestone-audit.md +35 -6
|
@@ -16,6 +16,35 @@ INIT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs init milestone-op)
|
|
|
16
16
|
|
|
17
17
|
Extract from init JSON: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `commit_docs`.
|
|
18
18
|
|
|
19
|
+
**Also extract `planning_root` and `track`, and use `$PLANNING_ROOT` for every planning path in this workflow** — the project may hold several planning trees, and auditing the wrong one produces a confident, plausible, wrong report:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
PLANNING_ROOT=$(printf '%s' "$INIT" | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>console.log(JSON.parse(s).planning_root))")
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 0a. Which tree am I auditing?
|
|
26
|
+
|
|
27
|
+
**Always state the resolved `planning_root` at the top of the audit report.** If `planning_root_exists` is `false`, STOP — that is a mistyped `--track`, not an empty milestone.
|
|
28
|
+
|
|
29
|
+
To audit a specific tree, pass `--track <name>`. To see every tree's milestone state before choosing:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs init milestone-op --all-tracks
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
That returns `{track_count, ambiguous_tracks, tracks[]}`, one entry per planning tree, each with its own `planning_root`, `milestone_version`, `milestone_name`, and `milestone_basis`.
|
|
36
|
+
|
|
37
|
+
### 0b. Refuse to audit an unresolvable milestone
|
|
38
|
+
|
|
39
|
+
The init payload carries how the milestone was decided:
|
|
40
|
+
|
|
41
|
+
- `milestone_basis` — `marked-current` (a `(current)` / 🚧 marker), `first-unshipped`, `last-shipped`, or `default`
|
|
42
|
+
- `milestone_ambiguous` — **`true` means the roadmap marks more than one milestone current**
|
|
43
|
+
|
|
44
|
+
**If `milestone_ambiguous` is `true`, STOP and report the planning-state error.** Do not audit. Two milestones marked current is a roadmap defect the owner must resolve; picking one silently is how an audit ends up describing a milestone that does not exist.
|
|
45
|
+
|
|
46
|
+
If `milestone_basis` is `default`, there is no milestone heading in the roadmap at all — say so rather than auditing `v1.0 milestone`.
|
|
47
|
+
|
|
19
48
|
Resolve integration checker model:
|
|
20
49
|
```bash
|
|
21
50
|
CHECKER_MODEL=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs resolve-model pan-integration-checker --raw)
|
|
@@ -103,7 +132,7 @@ For each phase's verification.md, extract the expanded requirements table:
|
|
|
103
132
|
|
|
104
133
|
For each phase's summary.md, extract `requirements-completed` from YAML frontmatter:
|
|
105
134
|
```bash
|
|
106
|
-
for summary in
|
|
135
|
+
for summary in "$PLANNING_ROOT"/phases/*-*/*-summary.md; do
|
|
107
136
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs summary-extract "$summary" --fields requirements_completed | jq -r '.requirements_completed'
|
|
108
137
|
done
|
|
109
138
|
```
|
|
@@ -129,7 +158,7 @@ For each REQ-ID, determine status using all three sources:
|
|
|
129
158
|
|
|
130
159
|
## 6. Aggregate into v{version}-milestone-audit.md
|
|
131
160
|
|
|
132
|
-
Create
|
|
161
|
+
Create `{planning_root}/v{version}-milestone-audit.md` with:
|
|
133
162
|
|
|
134
163
|
```yaml
|
|
135
164
|
---
|
|
@@ -186,7 +215,7 @@ Output this markdown directly (not as a code block). Route based on status:
|
|
|
186
215
|
## ✓ Milestone {version} — Audit Passed
|
|
187
216
|
|
|
188
217
|
**Score:** {N}/{M} requirements satisfied
|
|
189
|
-
**Report:**
|
|
218
|
+
**Report:** {planning_root}/v{version}-milestone-audit.md
|
|
190
219
|
|
|
191
220
|
All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
192
221
|
|
|
@@ -209,7 +238,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
209
238
|
## ⚠ Milestone {version} — Gaps Found
|
|
210
239
|
|
|
211
240
|
**Score:** {N}/{M} requirements satisfied
|
|
212
|
-
**Report:**
|
|
241
|
+
**Report:** {planning_root}/v{version}-milestone-audit.md
|
|
213
242
|
|
|
214
243
|
### Unsatisfied Requirements
|
|
215
244
|
|
|
@@ -240,7 +269,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
240
269
|
───────────────────────────────────────────────────────────────
|
|
241
270
|
|
|
242
271
|
**Also available:**
|
|
243
|
-
- cat
|
|
272
|
+
- cat {planning_root}/v{version}-milestone-audit.md — see full report
|
|
244
273
|
- /pan:milestone-done {version} — proceed anyway (accept tech debt)
|
|
245
274
|
|
|
246
275
|
───────────────────────────────────────────────────────────────
|
|
@@ -252,7 +281,7 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
252
281
|
## ⚡ Milestone {version} — Tech Debt Review
|
|
253
282
|
|
|
254
283
|
**Score:** {N}/{M} requirements satisfied
|
|
255
|
-
**Report:**
|
|
284
|
+
**Report:** {planning_root}/v{version}-milestone-audit.md
|
|
256
285
|
|
|
257
286
|
All requirements met. No critical blockers. Accumulated tech debt needs review.
|
|
258
287
|
|