pan-wizard 2.9.0 → 2.9.1
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/assumptions.md +38 -3
- package/commands/pan/audit-deployment.md +6 -0
- package/commands/pan/debug.md +71 -2
- package/commands/pan/exec-phase.md +90 -0
- package/commands/pan/focus-auto.md +181 -18
- package/commands/pan/focus-design.md +67 -2
- package/commands/pan/focus-exec.md +168 -46
- package/commands/pan/focus-scan.md +17 -5
- package/commands/pan/map-codebase.md +32 -6
- package/commands/pan/milestone-audit.md +23 -0
- package/commands/pan/new-project.md +64 -0
- package/commands/pan/pause.md +42 -1
- package/commands/pan/plan-phase.md +84 -0
- package/commands/pan/quick.md +15 -0
- package/commands/pan/resume.md +62 -2
- package/commands/pan/verify-phase.md +42 -0
- package/package.json +1 -1
- package/pan-wizard-core/bin/lib/constants.cjs +3 -1
- package/pan-wizard-core/bin/lib/focus.cjs +5 -0
- package/scripts/generate-skills-docs.py +560 -0
package/commands/pan/resume.md
CHANGED
|
@@ -26,6 +26,66 @@ Routes to the resume-project workflow which handles:
|
|
|
26
26
|
@~/.claude/pan-wizard-core/workflows/resume-project.md
|
|
27
27
|
</execution_context>
|
|
28
28
|
|
|
29
|
+
<handoff_consumption>
|
|
30
|
+
When a `.continue-here.md` file exists, parse it as structured handoff data before presenting options.
|
|
31
|
+
|
|
32
|
+
**Required extraction (in order):**
|
|
33
|
+
1. `position.next_task` → This is the FIRST thing to tell the user
|
|
34
|
+
2. `blockers` → If non-empty, surface BEFORE offering to continue
|
|
35
|
+
3. `decisions` → Load into context so they are not re-debated
|
|
36
|
+
4. `progress.test_baseline` + `progress.test_current` → Verify current test count matches `test_current` (detect drift since pause)
|
|
37
|
+
5. `context.next_action` → Use as the default suggested action
|
|
38
|
+
|
|
39
|
+
**Resume validation:**
|
|
40
|
+
- If `test_current` at resume time differs from stored value → warn user: "Test count changed since pause ({stored} → {current}). Someone else may have committed."
|
|
41
|
+
- If `position.next_task` references a task not in the plan → warn: plan may have been revised since pause
|
|
42
|
+
- If `blockers` exist → present them and ask if resolved before continuing
|
|
43
|
+
|
|
44
|
+
**Anti-pattern:**
|
|
45
|
+
```
|
|
46
|
+
BAD: Resume reads .continue-here.md, ignores position, re-reads entire plan from scratch
|
|
47
|
+
→ Wastes context on already-completed work, may re-implement done tasks
|
|
48
|
+
GOOD: Resume extracts position.next_task, skips completed tasks, starts exactly where paused
|
|
49
|
+
```
|
|
50
|
+
</handoff_consumption>
|
|
51
|
+
|
|
52
|
+
<routing_decision_tree>
|
|
53
|
+
Use this decision tree to select the correct resumption path. Evaluate top-to-bottom; take the FIRST match.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
IF .planning/ does not exist:
|
|
57
|
+
→ "No project found. Run /pan:new-project to get started."
|
|
58
|
+
→ STOP
|
|
59
|
+
|
|
60
|
+
ELSE IF .continue-here.md exists:
|
|
61
|
+
→ PARSE handoff file using <handoff_consumption> protocol
|
|
62
|
+
→ PRESENT: position, blockers, next action
|
|
63
|
+
→ ROUTE to the command that was paused (exec-phase, plan-phase, etc.)
|
|
64
|
+
|
|
65
|
+
ELSE IF state.md exists AND has status "in_progress":
|
|
66
|
+
→ FIND incomplete work: plans without summaries, phases mid-execution
|
|
67
|
+
→ IF incomplete phase found:
|
|
68
|
+
→ PRESENT phase status + what remains
|
|
69
|
+
→ OFFER: continue execution (/pan:exec-phase) or verify (/pan:verify-phase)
|
|
70
|
+
→ IF no incomplete work but active milestone:
|
|
71
|
+
→ PRESENT milestone progress
|
|
72
|
+
→ OFFER: next unplanned phase (/pan:plan-phase) or audit (/pan:milestone-audit)
|
|
73
|
+
|
|
74
|
+
ELSE IF state.md exists AND has status "blocked":
|
|
75
|
+
→ PRESENT blockers from state.md
|
|
76
|
+
→ OFFER: debug (/pan:debug) or unblock manually
|
|
77
|
+
|
|
78
|
+
ELSE IF state.md exists AND has status "completed":
|
|
79
|
+
→ "Current milestone is complete. Run /pan:milestone-done or /pan:milestone-new."
|
|
80
|
+
→ STOP
|
|
81
|
+
|
|
82
|
+
ELSE (state.md missing or unreadable):
|
|
83
|
+
→ ATTEMPT reconstruction from .planning/ artifacts
|
|
84
|
+
→ IF reconstruction succeeds: re-enter tree above
|
|
85
|
+
→ IF reconstruction fails: "State is corrupted. Run /pan:new-project or restore from git."
|
|
86
|
+
```
|
|
87
|
+
</routing_decision_tree>
|
|
88
|
+
|
|
29
89
|
<process>
|
|
30
90
|
**Follow the resume-project workflow** from `@~/.claude/pan-wizard-core/workflows/resume-project.md`.
|
|
31
91
|
|
|
@@ -33,9 +93,9 @@ The workflow handles all resumption logic including:
|
|
|
33
93
|
|
|
34
94
|
1. Project existence verification
|
|
35
95
|
2. state.md loading or reconstruction
|
|
36
|
-
3. Checkpoint and incomplete work detection
|
|
96
|
+
3. Checkpoint and incomplete work detection — **parse using `<handoff_consumption>` protocol**
|
|
37
97
|
4. Visual status presentation
|
|
38
98
|
5. Context-aware option offering (checks context.md before suggesting plan vs discuss)
|
|
39
|
-
6. Routing to appropriate next command
|
|
99
|
+
6. Routing to appropriate next command — **following `<routing_decision_tree>`**
|
|
40
100
|
7. Session continuity updates
|
|
41
101
|
</process>
|
|
@@ -33,6 +33,48 @@ Phase: $ARGUMENTS (optional)
|
|
|
33
33
|
Context files are resolved inside the workflow (`init verify-work`) and delegated via `<files_to_read>` blocks.
|
|
34
34
|
</context>
|
|
35
35
|
|
|
36
|
+
<investigate_before_judging>
|
|
37
|
+
Never claim a feature works or doesn't work without reading the implementation first.
|
|
38
|
+
Before each verification judgment:
|
|
39
|
+
1. Read the source file(s) that implement the feature
|
|
40
|
+
2. Read the test file(s) that cover it
|
|
41
|
+
3. Run the tests
|
|
42
|
+
4. Only then state your assessment with file:line evidence
|
|
43
|
+
Do not speculate about code you have not opened.
|
|
44
|
+
</investigate_before_judging>
|
|
45
|
+
|
|
46
|
+
<citation_requirement>
|
|
47
|
+
Every verdict (PASS, PARTIAL, FAIL) MUST include at least one file:line citation as evidence.
|
|
48
|
+
|
|
49
|
+
**Before writing any judgment, scan your draft for unsourced claims.** If you find an assertion without evidence, stop and gather it before continuing.
|
|
50
|
+
|
|
51
|
+
Format: `verdict: PASS — feature works as specified (src/billing.ts:42, tests/billing.test.ts:18-35)`
|
|
52
|
+
|
|
53
|
+
**Grounding rules:**
|
|
54
|
+
- PASS requires: file:line where the feature is implemented + test file:line where it's verified
|
|
55
|
+
- PARTIAL requires: file:line showing what works + description of what's missing with expected location
|
|
56
|
+
- FAIL requires: file:line showing the defect OR absence (grep result showing the expected function/export doesn't exist)
|
|
57
|
+
- "I checked and it's not there" is NOT evidence — show the grep command and its empty result
|
|
58
|
+
|
|
59
|
+
**Anti-pattern:**
|
|
60
|
+
```
|
|
61
|
+
BAD: "FAIL — the retry logic doesn't handle timeouts"
|
|
62
|
+
→ No evidence. Maybe it does handle timeouts and you didn't read far enough.
|
|
63
|
+
GOOD: "FAIL — retry logic at api/client.ts:67-89 catches ConnectionError but not TimeoutError.
|
|
64
|
+
Grep for 'TimeoutError' in api/: 0 matches. tests/client.test.ts has no timeout test cases."
|
|
65
|
+
```
|
|
66
|
+
</citation_requirement>
|
|
67
|
+
|
|
68
|
+
<reflexion_loop>
|
|
69
|
+
After initial verification of each requirement:
|
|
70
|
+
1. Score each requirement: PASS / PARTIAL / FAIL
|
|
71
|
+
2. For PARTIAL or FAIL: state specifically what is missing or broken
|
|
72
|
+
3. Re-read the requirement text and the implementation — did you miss anything?
|
|
73
|
+
4. Revise the score if the re-read reveals evidence you overlooked
|
|
74
|
+
5. Report only final scores after this review cycle
|
|
75
|
+
This prevents premature FAIL verdicts from incomplete investigation.
|
|
76
|
+
</reflexion_loop>
|
|
77
|
+
|
|
36
78
|
<process>
|
|
37
79
|
Execute the verify-work workflow from @~/.claude/pan-wizard-core/workflows/verify-phase.md end-to-end.
|
|
38
80
|
Preserve all workflow gates (session management, test presentation, diagnosis, fix planning, routing).
|
package/package.json
CHANGED
|
@@ -123,7 +123,7 @@ const FOCUS_DIR = 'focus';
|
|
|
123
123
|
const AUTO_RUN_FILE = 'auto-run.json';
|
|
124
124
|
|
|
125
125
|
/** Focus auto-runner categories */
|
|
126
|
-
const FOCUS_CATEGORIES = ['cleanup', 'tests', 'stability', 'features', 'docs', 'optimize'];
|
|
126
|
+
const FOCUS_CATEGORIES = ['cleanup', 'tests', 'stability', 'features', 'docs', 'optimize', 'prompts'];
|
|
127
127
|
|
|
128
128
|
/** Category → priority index range (indices into PRIORITY_LEVELS) */
|
|
129
129
|
const CATEGORY_PRIORITY_RANGE = {
|
|
@@ -133,6 +133,7 @@ const CATEGORY_PRIORITY_RANGE = {
|
|
|
133
133
|
features: { min: 3, max: 5 }, // P3-P5
|
|
134
134
|
docs: { min: 5, max: 6 }, // P5-P6
|
|
135
135
|
optimize: { min: 1, max: 4 }, // P1-P4
|
|
136
|
+
prompts: { min: 0, max: 6 }, // P0-P6 (all priorities — prompt order is authoritative)
|
|
136
137
|
};
|
|
137
138
|
|
|
138
139
|
/** Category → default mode + budget */
|
|
@@ -143,6 +144,7 @@ const CATEGORY_DEFAULTS = {
|
|
|
143
144
|
features: { mode: 'features', budget: 50 },
|
|
144
145
|
docs: { mode: 'balanced', budget: 30 },
|
|
145
146
|
optimize: { mode: 'balanced', budget: 50 },
|
|
147
|
+
prompts: { mode: 'balanced', budget: 100 },
|
|
146
148
|
};
|
|
147
149
|
|
|
148
150
|
/** Doc files to scan for staleness (focus sync) */
|
|
@@ -783,6 +783,11 @@ function determineStopReason(cycle, run) {
|
|
|
783
783
|
if (run.totals.cycles_completed >= run.max_cycles) return 'max_cycles';
|
|
784
784
|
if (cycle.items_completed === 0) return 'zero_completed';
|
|
785
785
|
|
|
786
|
+
// Prompts category: stop when all prompts are completed
|
|
787
|
+
if (run.category === 'prompts' && cycle.prompts_remaining === 0) {
|
|
788
|
+
return 'prompts_complete';
|
|
789
|
+
}
|
|
790
|
+
|
|
786
791
|
// Optimize category: stop when efficiency drops below threshold of previous cycle
|
|
787
792
|
if (run.category === 'optimize' && run.cycles.length >= 2) {
|
|
788
793
|
const prev = run.cycles[run.cycles.length - 2];
|