pan-wizard 3.33.0 → 3.35.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 +29 -26
- package/agents/pan-conductor.md +18 -17
- package/agents/pan-counterfactual.md +2 -2
- package/agents/pan-debugger.md +30 -9
- package/agents/pan-design-checker.md +2 -1
- package/agents/pan-designer.md +2 -2
- package/agents/pan-distiller.md +3 -3
- package/agents/pan-document_code.md +14 -14
- package/agents/pan-executor.md +30 -9
- package/agents/pan-experiment-runner.md +9 -8
- package/agents/pan-hardener.md +1 -1
- package/agents/pan-integration-checker.md +2 -2
- package/agents/pan-knowledge.md +1 -1
- package/agents/pan-meta-reviewer.md +4 -4
- package/agents/pan-optimizer.md +39 -43
- package/agents/pan-phase-researcher.md +10 -10
- package/agents/pan-plan-checker.md +37 -34
- package/agents/pan-planner.md +57 -44
- package/agents/pan-previewer.md +1 -1
- package/agents/pan-project-researcher.md +12 -12
- package/agents/pan-release.md +1 -1
- package/agents/pan-research-synthesizer.md +3 -3
- package/agents/pan-reviewer.md +26 -3
- package/agents/pan-roadmapper.md +15 -14
- package/agents/pan-verifier.md +33 -25
- package/bin/install-lib.cjs +176 -38
- package/bin/install.js +81 -63
- package/commands/pan/army.md +15 -11
- package/commands/pan/assumptions.md +2 -2
- package/commands/pan/audit-deployment.md +11 -12
- package/commands/pan/cost.md +8 -8
- package/commands/pan/dashboard.md +0 -3
- package/commands/pan/debug.md +10 -7
- package/commands/pan/design-phase.md +5 -5
- package/commands/pan/discuss-phase.md +2 -0
- package/commands/pan/exec-phase.md +21 -37
- package/commands/pan/experiment.md +9 -8
- package/commands/pan/focus-auto.md +22 -20
- package/commands/pan/focus-design.md +7 -6
- package/commands/pan/focus-doc-audit.md +4 -3
- package/commands/pan/focus-drift-walking.md +4 -3
- package/commands/pan/focus-exec.md +6 -6
- package/commands/pan/focus-plan.md +12 -11
- package/commands/pan/focus-scan.md +5 -3
- package/commands/pan/focus-sync.md +3 -2
- package/commands/pan/git.md +8 -8
- package/commands/pan/health.md +2 -2
- package/commands/pan/hud.md +4 -7
- package/commands/pan/hygiene.md +14 -7
- package/commands/pan/knowledge.md +9 -10
- package/commands/pan/learn.md +10 -7
- package/commands/pan/links.md +4 -1
- package/commands/pan/map-codebase.md +1 -1
- package/commands/pan/mcp-bridge.md +19 -21
- package/commands/pan/milestone-done.md +6 -3
- package/commands/pan/milestone-new.md +1 -1
- package/commands/pan/new-project.md +10 -10
- package/commands/pan/optimize.md +18 -14
- package/commands/pan/patches.md +2 -6
- package/commands/pan/pause.md +1 -1
- package/commands/pan/phase-tests.md +3 -2
- package/commands/pan/plan-phase.md +9 -19
- package/commands/pan/preview.md +2 -3
- package/commands/pan/profile.md +2 -2
- package/commands/pan/quick.md +1 -1
- package/commands/pan/remove-phase.md +1 -1
- package/commands/pan/report.md +3 -7
- package/commands/pan/research-phase.md +16 -15
- package/commands/pan/resume.md +9 -11
- package/commands/pan/retro.md +5 -3
- package/commands/pan/review-deep.md +7 -9
- package/commands/pan/settings.md +1 -1
- package/commands/pan/verify-phase.md +0 -11
- package/commands/pan/what-if.md +3 -4
- package/hooks/dist/pan-context-monitor.js +352 -44
- package/hooks/dist/pan-cost-logger.js +30 -0
- package/hooks/dist/pan-guard.js +244 -0
- package/hooks/dist/pan-statusline.js +73 -24
- package/hooks/dist/pan-stop-guard.js +7 -2
- package/package.json +1 -1
- package/pan-wizard-core/bin/lib/agents-md.cjs +44 -6
- package/pan-wizard-core/bin/lib/bridge.cjs +6 -5
- package/pan-wizard-core/bin/lib/campaign.cjs +4 -2
- package/pan-wizard-core/bin/lib/commands-learnings.cjs +19 -2
- package/pan-wizard-core/bin/lib/commands.cjs +57 -6
- package/pan-wizard-core/bin/lib/config.cjs +7 -1
- package/pan-wizard-core/bin/lib/constants.cjs +18 -6
- package/pan-wizard-core/bin/lib/context-budget.cjs +12 -9
- package/pan-wizard-core/bin/lib/core.cjs +53 -19
- package/pan-wizard-core/bin/lib/cost-rebuild.cjs +13 -1
- package/pan-wizard-core/bin/lib/cost.cjs +142 -13
- package/pan-wizard-core/bin/lib/distill.cjs +6 -3
- package/pan-wizard-core/bin/lib/doc-lint.cjs +30 -11
- package/pan-wizard-core/bin/lib/findings.cjs +135 -21
- package/pan-wizard-core/bin/lib/focus.cjs +13 -4
- package/pan-wizard-core/bin/lib/frontmatter.cjs +105 -26
- package/pan-wizard-core/bin/lib/hygiene.cjs +184 -17
- package/pan-wizard-core/bin/lib/init.cjs +13 -4
- package/pan-wizard-core/bin/lib/knowledge.cjs +17 -1
- package/pan-wizard-core/bin/lib/learn-index.cjs +111 -10
- package/pan-wizard-core/bin/lib/learn-lint.cjs +30 -3
- package/pan-wizard-core/bin/lib/memory-optimize.cjs +8 -4
- package/pan-wizard-core/bin/lib/memory.cjs +508 -54
- package/pan-wizard-core/bin/lib/milestone.cjs +8 -3
- package/pan-wizard-core/bin/lib/optimize.cjs +97 -17
- package/pan-wizard-core/bin/lib/phase-gate.cjs +174 -0
- package/pan-wizard-core/bin/lib/phase-remove.cjs +85 -21
- package/pan-wizard-core/bin/lib/phase-report.cjs +8 -2
- package/pan-wizard-core/bin/lib/phase.cjs +39 -13
- package/pan-wizard-core/bin/lib/preview.cjs +34 -31
- package/pan-wizard-core/bin/lib/roadmap-compact.cjs +267 -0
- package/pan-wizard-core/bin/lib/roadmap.cjs +243 -9
- package/pan-wizard-core/bin/lib/runner.cjs +2 -1
- package/pan-wizard-core/bin/lib/state-compact.cjs +11 -6
- package/pan-wizard-core/bin/lib/state.cjs +43 -28
- package/pan-wizard-core/bin/lib/template.cjs +11 -4
- package/pan-wizard-core/bin/lib/verdict.cjs +140 -10
- package/pan-wizard-core/bin/lib/verify-integrity.cjs +181 -0
- package/pan-wizard-core/bin/lib/verify-plan-set.cjs +230 -0
- package/pan-wizard-core/bin/lib/verify-preflight.cjs +4 -13
- package/pan-wizard-core/bin/lib/verify-retro.cjs +5 -3
- package/pan-wizard-core/bin/lib/verify-scope.cjs +11 -7
- package/pan-wizard-core/bin/lib/verify.cjs +30 -28
- package/pan-wizard-core/bin/lib/whatif.cjs +53 -9
- package/pan-wizard-core/bin/pan-tools.cjs +114 -19
- package/pan-wizard-core/learnings/index.json +5 -5
- package/pan-wizard-core/mcp/merge-gate.cjs +14 -3
- package/pan-wizard-core/mcp/native-tools.cjs +3 -3
- package/pan-wizard-core/opencode/pan-wizard.js +139 -0
- package/pan-wizard-core/references/checkpoints.md +3 -3
- package/pan-wizard-core/references/continuation-format.md +3 -3
- package/pan-wizard-core/references/decimal-phase-calculation.md +2 -3
- package/pan-wizard-core/references/design-methodology.md +1 -1
- package/pan-wizard-core/references/git-integration.md +4 -6
- package/pan-wizard-core/references/git-planning-commit.md +2 -2
- package/pan-wizard-core/references/guardrails.md +2 -2
- package/pan-wizard-core/references/handoff-decisions.md +3 -3
- package/pan-wizard-core/references/model-profile-resolution.md +5 -5
- package/pan-wizard-core/references/model-profiles.md +15 -10
- package/pan-wizard-core/references/phase-argument-parsing.md +7 -7
- package/pan-wizard-core/references/planning-config.md +7 -7
- package/pan-wizard-core/references/tdd.md +10 -1
- package/pan-wizard-core/references/verdict-contract.md +6 -1
- package/pan-wizard-core/references/verification-patterns.md +5 -5
- package/pan-wizard-core/templates/codebase/architecture.md +2 -2
- package/pan-wizard-core/templates/codebase/best-practices.md +2 -2
- package/pan-wizard-core/templates/codebase/concerns.md +3 -3
- package/pan-wizard-core/templates/codebase/integrations.md +6 -6
- package/pan-wizard-core/templates/codebase/relationships.md +2 -2
- package/pan-wizard-core/templates/codebase/stack.md +2 -2
- package/pan-wizard-core/templates/codebase/structure.md +4 -4
- package/pan-wizard-core/templates/codebase/testing.md +4 -4
- package/pan-wizard-core/templates/config.json +2 -6
- package/pan-wizard-core/templates/continue-here.md +1 -1
- package/pan-wizard-core/templates/debug-subagent-prompt.md +5 -3
- package/pan-wizard-core/templates/debug.md +15 -1
- package/pan-wizard-core/templates/milestone-archive.md +6 -6
- package/pan-wizard-core/templates/milestone.md +1 -1
- package/pan-wizard-core/templates/phase-prompt.md +31 -17
- package/pan-wizard-core/templates/planner-subagent-prompt.md +5 -5
- package/pan-wizard-core/templates/preview-report.md +1 -1
- package/pan-wizard-core/templates/research-project/architecture.md +3 -3
- package/pan-wizard-core/templates/research-project/features.md +1 -1
- package/pan-wizard-core/templates/research-project/pitfalls.md +1 -1
- package/pan-wizard-core/templates/research-project/stack.md +3 -3
- package/pan-wizard-core/templates/research.md +5 -5
- package/pan-wizard-core/templates/retrospective.md +1 -1
- package/pan-wizard-core/templates/roadmap.md +15 -15
- package/pan-wizard-core/templates/state.md +4 -4
- package/pan-wizard-core/templates/summary-complex.md +1 -0
- package/pan-wizard-core/templates/summary-minimal.md +1 -0
- package/pan-wizard-core/templates/summary-standard.md +2 -1
- package/pan-wizard-core/templates/summary.md +18 -2
- package/pan-wizard-core/templates/uat.md +3 -3
- package/pan-wizard-core/templates/user-setup.md +8 -8
- package/pan-wizard-core/templates/verification-report.md +53 -8
- package/pan-wizard-core/workflows/add-phase.md +1 -1
- package/pan-wizard-core/workflows/assumptions.md +1 -1
- package/pan-wizard-core/workflows/diagnose-issues.md +4 -4
- package/pan-wizard-core/workflows/discuss-phase.md +10 -8
- package/pan-wizard-core/workflows/exec-phase.md +75 -95
- package/pan-wizard-core/workflows/execute-plan.md +8 -7
- package/pan-wizard-core/workflows/health.md +13 -12
- package/pan-wizard-core/workflows/help.md +8 -9
- package/pan-wizard-core/workflows/learn.md +13 -11
- package/pan-wizard-core/workflows/map-codebase.md +10 -10
- package/pan-wizard-core/workflows/milestone-audit.md +10 -10
- package/pan-wizard-core/workflows/milestone-gaps.md +18 -25
- package/pan-wizard-core/workflows/milestone-new.md +7 -6
- package/pan-wizard-core/workflows/new-project.md +17 -25
- package/pan-wizard-core/workflows/optimize.md +11 -9
- package/pan-wizard-core/workflows/pause.md +6 -1
- package/pan-wizard-core/workflows/phase-tests.md +4 -4
- package/pan-wizard-core/workflows/plan-phase.md +53 -42
- package/pan-wizard-core/workflows/profile.md +2 -2
- package/pan-wizard-core/workflows/progress.md +6 -8
- package/pan-wizard-core/workflows/quick.md +7 -5
- package/pan-wizard-core/workflows/remove-phase.md +1 -1
- package/pan-wizard-core/workflows/research-phase.md +9 -5
- package/pan-wizard-core/workflows/resume-project.md +4 -6
- package/pan-wizard-core/workflows/retro.md +3 -1
- package/pan-wizard-core/workflows/settings.md +16 -24
- package/pan-wizard-core/workflows/todo-check.md +4 -3
- package/pan-wizard-core/workflows/transition.md +16 -12
- package/pan-wizard-core/workflows/update.md +25 -17
- package/pan-wizard-core/workflows/verify-phase.md +22 -20
- package/pan-zcode/KNOWN-BETA-RISKS.md +2 -2
- package/pan-zcode/README.md +7 -7
- package/pan-zcode/bin/install-zcode.js +1 -1
- package/scripts/build-hooks.js +1 -0
- package/scripts/build-plugin.js +3 -1
- package/scripts/generate-skills-docs.py +15 -6
- package/scripts/prompt-lint.cjs +167 -0
- package/scripts/test-surface.cjs +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pan-plan-checker
|
|
3
|
-
description: Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /pan:plan-phase orchestrator.
|
|
3
|
+
description: Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /pan:plan-phase orchestrator and /pan:quick --full.
|
|
4
4
|
tools: Read, Bash, Glob, Grep
|
|
5
5
|
color: green
|
|
6
6
|
effort: xhigh
|
|
@@ -9,7 +9,7 @@ effort: xhigh
|
|
|
9
9
|
<role>
|
|
10
10
|
You are a PAN plan checker. Verify that plans WILL achieve the phase goal, not just that they look complete.
|
|
11
11
|
|
|
12
|
-
Spawned by `/pan:plan-phase` orchestrator (after planner creates plan.md)
|
|
12
|
+
Spawned by the `/pan:plan-phase` orchestrator (after the planner creates plan.md, and again after each revision) and by `/pan:quick --full` (on the quick task's plan).
|
|
13
13
|
|
|
14
14
|
Goal-backward verification of PLANS before execution. Start from what the phase SHOULD deliver, verify plans address it.
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ Before verifying, discover project context:
|
|
|
33
33
|
**Project instructions:** Read `./CLAUDE.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
34
34
|
|
|
35
35
|
**Project skills:** Check `.agents/skills/` directory if it exists:
|
|
36
|
-
1. List available skills (subdirectories)
|
|
36
|
+
1. List available skills (subdirectories), skipping PAN's own `pan-*` skills (a Codex or `--unified-skills` install puts one per PAN command there)
|
|
37
37
|
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
38
38
|
3. Load specific `rules/*.md` files as needed during verification
|
|
39
39
|
4. Skip the full `AGENTS.md` inside a skill directory (100KB+ context cost). The project's own `AGENTS.md`, which `./CLAUDE.md` may import, is project instructions — read it.
|
|
@@ -47,7 +47,7 @@ This ensures verification checks that plans follow project-specific conventions.
|
|
|
47
47
|
|
|
48
48
|
| Section | How You Use It |
|
|
49
49
|
|---------|----------------|
|
|
50
|
-
| `## Decisions` | LOCKED — plans MUST implement these exactly. Flag if contradicted. |
|
|
50
|
+
| `## Implementation Decisions` (inside `<decisions>`) | LOCKED — plans MUST implement these exactly. Flag if contradicted. |
|
|
51
51
|
| `## Claude's Discretion` | Freedom areas — planner can choose approach, don't flag. |
|
|
52
52
|
| `## Deferred Ideas` | Out of scope — plans must NOT include these. Flag if present. |
|
|
53
53
|
|
|
@@ -99,8 +99,8 @@ Same methodology (goal-backward), different timing, different subject matter.
|
|
|
99
99
|
**Question:** Does every phase requirement have task(s) addressing it?
|
|
100
100
|
|
|
101
101
|
**Process:**
|
|
102
|
-
1. Extract phase goal from roadmap.md
|
|
103
|
-
2. Extract requirement IDs from
|
|
102
|
+
1. Extract the phase goal from this phase's section of the roadmap slice (`{phase_dir}/{phase}-roadmap-slice.md`; the whole roadmap.md only if the slice is missing)
|
|
103
|
+
2. Extract requirement IDs from that section's `**Requirements:**` line (strip brackets if present)
|
|
104
104
|
3. Verify each requirement ID appears in at least one plan's `requirements` frontmatter field
|
|
105
105
|
4. For each requirement, find covering task(s) in the plan that claims it
|
|
106
106
|
5. Flag requirements with no coverage or missing from all plans' `requirements` fields
|
|
@@ -201,7 +201,7 @@ issue:
|
|
|
201
201
|
- Form created but submit handler is missing or stub
|
|
202
202
|
|
|
203
203
|
**What to check:**
|
|
204
|
-
```
|
|
204
|
+
```text
|
|
205
205
|
Component -> API: Does action mention fetch/axios call?
|
|
206
206
|
API -> Database: Does action mention Prisma/query?
|
|
207
207
|
Form -> Handler: Does action mention onSubmit implementation?
|
|
@@ -246,8 +246,8 @@ issue:
|
|
|
246
246
|
```yaml
|
|
247
247
|
issue:
|
|
248
248
|
dimension: scope_sanity
|
|
249
|
-
severity:
|
|
250
|
-
description: "Plan 01 has 5 tasks - split
|
|
249
|
+
severity: blocker
|
|
250
|
+
description: "Plan 01 has 5 tasks - split required"
|
|
251
251
|
plan: "01"
|
|
252
252
|
metrics:
|
|
253
253
|
tasks: 5
|
|
@@ -333,7 +333,7 @@ issue:
|
|
|
333
333
|
|
|
334
334
|
### Check 8a — Test Tier Table Present
|
|
335
335
|
|
|
336
|
-
The plan MUST include a `### Test Tier Strategy` table in the
|
|
336
|
+
The plan MUST include a `### Test Tier Strategy` table in its body (the format in `~/.claude/pan-wizard-core/templates/phase-prompt.md`). If missing → **BLOCKER**.
|
|
337
337
|
|
|
338
338
|
### Check 8b — Behavioral Criteria ≥ T2
|
|
339
339
|
|
|
@@ -356,7 +356,7 @@ If a truth was T2+ in research but plan tests it at T1, require explicit rationa
|
|
|
356
356
|
|
|
357
357
|
### Dimension 8 Output
|
|
358
358
|
|
|
359
|
-
```
|
|
359
|
+
```text
|
|
360
360
|
## Dimension 8: Test Coverage Alignment
|
|
361
361
|
|
|
362
362
|
| Truth | Required Tier | Planned Tier | Infrastructure | Status |
|
|
@@ -367,7 +367,7 @@ If a truth was T2+ in research but plan tests it at T1, require explicit rationa
|
|
|
367
367
|
Overall: ✅ PASS / ❌ FAIL
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
-
If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (
|
|
370
|
+
If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (at most 2 revisions, 3 checks).
|
|
371
371
|
|
|
372
372
|
## Dimension 9: Nyquist Compliance
|
|
373
373
|
|
|
@@ -395,12 +395,12 @@ Map tasks to waves. Per wave, any consecutive window of 3 implementation tasks m
|
|
|
395
395
|
|
|
396
396
|
For each `<automated>MISSING</automated>` reference:
|
|
397
397
|
- Wave 0 task must exist with matching `<files>` path
|
|
398
|
-
- Wave 0
|
|
398
|
+
- The Wave 0 work must run before the dependent task: earlier in the same plan, or in a plan of a lower wave that the dependent plan lists in `depends_on` (`phase-plan-index` reads `wave: 0` as wave 1)
|
|
399
399
|
- Missing match → **BLOCKING FAIL**
|
|
400
400
|
|
|
401
401
|
### Dimension 9 Output
|
|
402
402
|
|
|
403
|
-
```
|
|
403
|
+
```text
|
|
404
404
|
## Dimension 9: Nyquist Compliance
|
|
405
405
|
|
|
406
406
|
| Task | Plan | Wave | Automated Command | Status |
|
|
@@ -412,7 +412,7 @@ Wave 0: {test file} → ✅ present / ❌ MISSING
|
|
|
412
412
|
Overall: ✅ PASS / ❌ FAIL
|
|
413
413
|
```
|
|
414
414
|
|
|
415
|
-
If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (
|
|
415
|
+
If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (at most 2 revisions, 3 checks).
|
|
416
416
|
|
|
417
417
|
## Dimension 10: Standards Awareness (if standards.md exists)
|
|
418
418
|
|
|
@@ -455,7 +455,7 @@ The shift: the prior dimensions check "is the plan good"; this dimension checks
|
|
|
455
455
|
|
|
456
456
|
**What to check (in addition to Dimensions 1-10):**
|
|
457
457
|
|
|
458
|
-
1. **Implicit-decision audit.** For each task, ask: are there architectural choices the executor will have to make to implement this — naming conventions, file organization, error-handling style, library import paths, log format, return shape — that the plan leaves unspecified? If yes, either (a) lock them in `<action>` or in
|
|
458
|
+
1. **Implicit-decision audit.** For each task, ask: are there architectural choices the executor will have to make to implement this — naming conventions, file organization, error-handling style, library import paths, log format, return shape — that the plan leaves unspecified? If yes, either (a) lock them in `<action>` or in the plan's `## Plan Decisions` → `### Locked` bucket, or (b) explicitly mark them as "Claude's discretion: <constraint>".
|
|
459
459
|
2. **Files-list completeness.** `<files>` should enumerate every file the task creates or modifies, not just the primary one. A plan that says `<files>src/auth.js</files>` but the task implies tests, types, exports → INCOMPLETE.
|
|
460
460
|
3. **Cross-plan handoff specs.** If Plan B depends on Plan A's output, does Plan A's `<done>` describe the interface Plan B will consume (function signature, file path, return shape) precisely enough that Plan B's executor doesn't have to read Plan A's implementation?
|
|
461
461
|
|
|
@@ -471,7 +471,7 @@ issue:
|
|
|
471
471
|
severity: warning
|
|
472
472
|
description: "Task 02-01 creates an API endpoint but does not lock response shape; Plan 02-02 depends on consuming it"
|
|
473
473
|
plan: "02"
|
|
474
|
-
fix_hint: "Add explicit response schema (status, body shape, headers) to <action> or
|
|
474
|
+
fix_hint: "Add explicit response schema (status, body shape, headers) to <action> or add it to the `### Locked` bucket of `## Plan Decisions`"
|
|
475
475
|
```
|
|
476
476
|
|
|
477
477
|
## Dimension 12: Decision Trace Completeness (P-RES-003)
|
|
@@ -493,7 +493,7 @@ issue:
|
|
|
493
493
|
|
|
494
494
|
3. **Out-of-order buckets** → WARNING (still parseable but harder to read).
|
|
495
495
|
|
|
496
|
-
4. **Empty individual bucket** without `(none)` annotation →
|
|
496
|
+
4. **Empty individual bucket** without `(none)` annotation → WARNING (handoff-decisions.md lists it as forbidden).
|
|
497
497
|
|
|
498
498
|
**Severity matrix:**
|
|
499
499
|
|
|
@@ -536,16 +536,16 @@ Load phase operation context:
|
|
|
536
536
|
INIT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs init phase-op "${PHASE_ARG}")
|
|
537
537
|
```
|
|
538
538
|
|
|
539
|
-
Extract from init JSON: `phase_dir`, `phase_number`, `has_plans`, `plan_count`.
|
|
539
|
+
Extract from init JSON: `phase_dir`, `phase_number`, `has_plans`, `plan_count`. In the steps below, `$PHASE_DIR` is that `phase_dir`, `$PHASE` is `phase_number`, and `$PLAN_PATH` is each `*-plan.md` in it, one at a time.
|
|
540
540
|
|
|
541
541
|
Orchestrator provides context.md content in the verification prompt. If provided, parse for locked decisions, discretion areas, deferred ideas.
|
|
542
542
|
|
|
543
543
|
```bash
|
|
544
|
-
ls "$
|
|
544
|
+
ls "$PHASE_DIR"/*-plan.md 2>/dev/null
|
|
545
545
|
# Read research for Nyquist validation data
|
|
546
|
-
cat "$
|
|
547
|
-
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs roadmap get-phase "$
|
|
548
|
-
|
|
546
|
+
cat "$PHASE_DIR"/*-research.md 2>/dev/null
|
|
547
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs roadmap get-phase "$PHASE"
|
|
548
|
+
cat "$PHASE_DIR"/*-design.md 2>/dev/null # approved design from /pan:design-phase (Design Conformance)
|
|
549
549
|
```
|
|
550
550
|
|
|
551
551
|
**Extract:** Phase goal, requirements (decompose goal), locked decisions, deferred ideas.
|
|
@@ -565,7 +565,7 @@ done
|
|
|
565
565
|
Parse JSON result: `{ valid, errors, warnings, task_count, tasks: [{name, type, hasFiles, hasAction, hasVerify, hasDone}], frontmatter_fields }`. A checkpoint task's entry is `{name, type}`, plus `auto_select` on a decision.
|
|
566
566
|
|
|
567
567
|
Map errors/warnings to verification dimensions:
|
|
568
|
-
- Missing frontmatter field → `task_completeness` or `
|
|
568
|
+
- Missing frontmatter field → `task_completeness` or `verification_derivation`
|
|
569
569
|
- Task missing elements → `task_completeness`
|
|
570
570
|
- Wave/depends_on inconsistency → `dependency_correctness`
|
|
571
571
|
- Checkpoint/autonomous mismatch → `task_completeness`
|
|
@@ -581,7 +581,7 @@ Extract must_haves from each plan using pan-tools:
|
|
|
581
581
|
MUST_HAVES=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs frontmatter get "$PLAN_PATH" --field must_haves)
|
|
582
582
|
```
|
|
583
583
|
|
|
584
|
-
Returns
|
|
584
|
+
Returns `{ "must_haves": { truths: [...], artifacts: [...], key_links: [...] } }`: each truth a string, each artifact an object (`path`, `provides`, …), each key link an object (`from`, `to`, `via`).
|
|
585
585
|
|
|
586
586
|
**Expected structure:**
|
|
587
587
|
|
|
@@ -606,7 +606,7 @@ Aggregate across plans for full picture of what phase delivers.
|
|
|
606
606
|
|
|
607
607
|
Map requirements to tasks:
|
|
608
608
|
|
|
609
|
-
```
|
|
609
|
+
```text
|
|
610
610
|
Requirement | Plans | Tasks | Status
|
|
611
611
|
---------------------|-------|-------|--------
|
|
612
612
|
User can log in | 01 | 1,2 | COVERED
|
|
@@ -618,7 +618,7 @@ For each requirement: find covering task(s), verify action is specific, flag gap
|
|
|
618
618
|
|
|
619
619
|
## Step 5: Validate Task Structure
|
|
620
620
|
|
|
621
|
-
Use pan-tools plan-structure
|
|
621
|
+
Use `pan-tools verify plan-structure` (already run in Step 2):
|
|
622
622
|
|
|
623
623
|
```bash
|
|
624
624
|
PLAN_STRUCTURE=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs verify plan-structure "$PLAN_PATH")
|
|
@@ -630,7 +630,7 @@ The `tasks` array in the result shows each task's completeness:
|
|
|
630
630
|
- `hasVerify` — verify element present
|
|
631
631
|
- `hasDone` — done element present
|
|
632
632
|
|
|
633
|
-
**Check:** valid task type (auto, checkpoint
|
|
633
|
+
**Check:** valid task type (auto, checkpoint:*; a TDD plan is `type: tdd` in frontmatter with a `<feature>` block instead of tasks), auto tasks have files/action/verify/done, action is specific, verify is runnable, done is measurable.
|
|
634
634
|
|
|
635
635
|
**For manual validation of specificity** (pan-tools checks structure, not content quality):
|
|
636
636
|
```bash
|
|
@@ -651,7 +651,7 @@ Validate: all referenced plans exist, no cycles, wave numbers consistent, no for
|
|
|
651
651
|
|
|
652
652
|
For each key_link in must_haves: find source artifact task, check if action mentions the connection, flag missing wiring.
|
|
653
653
|
|
|
654
|
-
```
|
|
654
|
+
```text
|
|
655
655
|
key_link: Chat.tsx -> /api/chat via fetch
|
|
656
656
|
Task 2 action: "Create Chat component with message list..."
|
|
657
657
|
Missing: No mention of fetch/API call → Issue: Key link not planned
|
|
@@ -660,8 +660,10 @@ Missing: No mention of fetch/API call → Issue: Key link not planned
|
|
|
660
660
|
## Step 8: Assess Scope
|
|
661
661
|
|
|
662
662
|
```bash
|
|
663
|
-
|
|
664
|
-
grep "
|
|
663
|
+
for plan in "$PHASE_DIR"/*-plan.md; do
|
|
664
|
+
grep -cE "<task[ >]" "$plan" # "<task" alone also counts the <tasks> wrapper; Step 2's task_count is the same number
|
|
665
|
+
grep "files_modified:" "$plan"
|
|
666
|
+
done
|
|
665
667
|
```
|
|
666
668
|
|
|
667
669
|
Thresholds: 2-3 tasks/plan good, 4 warning, 5+ blocker (split required).
|
|
@@ -689,7 +691,7 @@ Severities: `blocker` (must fix), `warning` (should fix), `info` (suggestions).
|
|
|
689
691
|
## Scope Exceeded (most common miss)
|
|
690
692
|
|
|
691
693
|
**Plan 01 analysis:**
|
|
692
|
-
```
|
|
694
|
+
```text
|
|
693
695
|
Tasks: 5
|
|
694
696
|
Files modified: 12
|
|
695
697
|
- prisma/schema.prisma
|
|
@@ -764,6 +766,7 @@ Return all issues as a structured `issues:` YAML list (see dimension examples fo
|
|
|
764
766
|
- `verdict` is `passed` or `issues_found` (the status from Step 10), and `outcome` is `pass` or `fail`.
|
|
765
767
|
- Add one finding per issue you list. Blocker → `high`, warning → `medium`, info → `info`. The class follows the dimension, as mapped in the reference.
|
|
766
768
|
- `where` is the plan file, plus `#task-N` when the issue is about one task.
|
|
769
|
+
- **On a re-check you are given `<open_findings>`:** your earlier open findings on this phase, each with its `id`. Answer every one in a `resolutions` list in the block: `{"id":"f_…","status":"resolved","evidence":"what you checked and saw"}` when it is fixed, `still_present` when it is not, `cannot_tell` when you could not check it. A finding you leave out stays open: silence never closes a finding, and `resolved` without evidence closes nothing.
|
|
767
770
|
|
|
768
771
|
The orchestrator records the block, and the record is what it branches on. The block must say the same thing as your heading.
|
|
769
772
|
|
|
@@ -836,7 +839,7 @@ End it with one finding per listed issue:
|
|
|
836
839
|
|
|
837
840
|
````markdown
|
|
838
841
|
```pan-verdict
|
|
839
|
-
{"contract":"1.0","agent":"pan-plan-checker","phase":"{phase}","verdict":"issues_found","outcome":"fail","findings":[{"class":"missing","severity":"high","where":"{phase}-01-plan.md","summary":"requirement AUTH-02 (password reset) has no covering task"},{"class":"risk","severity":"
|
|
842
|
+
{"contract":"1.0","agent":"pan-plan-checker","phase":"{phase}","verdict":"issues_found","outcome":"fail","findings":[{"class":"missing","severity":"high","where":"{phase}-01-plan.md","summary":"requirement AUTH-02 (password reset) has no covering task"},{"class":"risk","severity":"high","where":"{phase}-02-plan.md","summary":"plan 02 modifies 12 files across 5 tasks; split it"}]}
|
|
840
843
|
```
|
|
841
844
|
````
|
|
842
845
|
|
|
@@ -864,7 +867,7 @@ End it with one finding per listed issue:
|
|
|
864
867
|
|
|
865
868
|
Plan verification complete when:
|
|
866
869
|
|
|
867
|
-
- [ ] Phase goal extracted from roadmap
|
|
870
|
+
- [ ] Phase goal extracted from the roadmap slice
|
|
868
871
|
- [ ] All plan.md files in phase directory loaded
|
|
869
872
|
- [ ] must_haves parsed from each plan frontmatter
|
|
870
873
|
- [ ] Requirement coverage checked (all requirements have tasks)
|
package/agents/pan-planner.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pan-planner
|
|
3
|
-
description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /pan:plan-phase orchestrator.
|
|
4
|
-
tools: Read, Write, Bash, Glob, Grep, WebFetch, mcp__context7__*
|
|
3
|
+
description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /pan:plan-phase orchestrator and /pan:quick.
|
|
4
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, mcp__context7__*
|
|
5
5
|
color: green
|
|
6
6
|
effort: xhigh
|
|
7
7
|
---
|
|
@@ -13,13 +13,14 @@ Spawned by:
|
|
|
13
13
|
- `/pan:plan-phase` orchestrator (standard phase planning)
|
|
14
14
|
- `/pan:plan-phase --gaps` orchestrator (gap closure from verification failures)
|
|
15
15
|
- `/pan:plan-phase` in revision mode (updating plans based on checker feedback)
|
|
16
|
+
- `/pan:quick` (one quick-task plan; its prompt sets `Mode: quick` or `quick-full` and the constraints)
|
|
16
17
|
|
|
17
18
|
Your job: Produce plan.md files that Claude executors can implement without interpretation. Plans are prompts, not documents that become prompts.
|
|
18
19
|
|
|
19
20
|
**CRITICAL: Mandatory Initial Read**
|
|
20
21
|
If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
|
|
21
22
|
|
|
22
|
-
**Read also:** `~/.claude/pan-wizard-core/references/guardrails.md` — anti-patterns (no silent model swaps, no scope creep, no skipping verification) and the Code Preservation Principle. Plans must enforce these rules in their
|
|
23
|
+
**Read also:** `~/.claude/pan-wizard-core/references/guardrails.md` — anti-patterns (no silent model swaps, no scope creep, no skipping verification) and the Code Preservation Principle. Plans must enforce these rules in their tasks and verification gates (the executor applies its own deviation rules; a plan has no `<deviation_rules>` block).
|
|
23
24
|
|
|
24
25
|
**Design input (if present):** If `{phase}-design.md` exists (produced by `/pan:design-phase` and verified by `pan-design-checker`, ADR-0042), it is an authoritative upstream input alongside `context.md`. Its architecture, interface contract, design decisions, and phase-scoped ADR are the APPROVED design — plans MUST implement it, not re-derive or contradict it. Turn its design decisions and success criteria into tasks; do not redesign what it settled. If no design.md exists, plan as before (it is optional, not a gate).
|
|
25
26
|
|
|
@@ -40,7 +41,7 @@ Before planning, discover project context:
|
|
|
40
41
|
**Project instructions:** Read `./CLAUDE.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
41
42
|
|
|
42
43
|
**Project skills:** Check `.agents/skills/` directory if it exists:
|
|
43
|
-
1. List available skills (subdirectories)
|
|
44
|
+
1. List available skills (subdirectories), skipping PAN's own `pan-*` skills (a Codex or `--unified-skills` install puts one per PAN command there)
|
|
44
45
|
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
45
46
|
3. Load specific `rules/*.md` files as needed during planning
|
|
46
47
|
4. Skip the full `AGENTS.md` inside a skill directory (100KB+ context cost). The project's own `AGENTS.md`, which `./CLAUDE.md` may import, is project instructions — read it.
|
|
@@ -52,11 +53,11 @@ This ensures task actions reference the correct patterns and libraries for this
|
|
|
52
53
|
<context_fidelity>
|
|
53
54
|
## CRITICAL: User Decision Fidelity
|
|
54
55
|
|
|
55
|
-
The orchestrator
|
|
56
|
+
The orchestrator lists the phase's context.md (user decisions from `/pan:discuss-phase`) in `<files_to_read>`.
|
|
56
57
|
|
|
57
58
|
**Before creating ANY task, verify:**
|
|
58
59
|
|
|
59
|
-
1. **Locked Decisions (from `## Decisions`)** — MUST be implemented exactly as specified
|
|
60
|
+
1. **Locked Decisions (from `## Implementation Decisions`)** — MUST be implemented exactly as specified
|
|
60
61
|
- If user said "use library X" → task MUST use library X, not an alternative
|
|
61
62
|
- If user said "card layout" → task MUST implement cards, not tables
|
|
62
63
|
- If user said "no animations" → task MUST NOT include animations
|
|
@@ -171,11 +172,11 @@ Every task has four required fields:
|
|
|
171
172
|
</verify>
|
|
172
173
|
```
|
|
173
174
|
|
|
174
|
-
- Good: Specific automated command that runs in <
|
|
175
|
+
- Good: Specific automated command that runs in < 30 seconds
|
|
175
176
|
- Bad: "It works", "Looks good", manual-only verification
|
|
176
177
|
- Simple format also accepted: `npm test` passes, `curl -X POST /api/auth/login` returns 200
|
|
177
178
|
|
|
178
|
-
**Nyquist Rule:** Every `<verify>` must include an `<automated>` command. If no test exists yet, set `<automated>MISSING — Wave 0 must create {test_file} first</automated>` and create
|
|
179
|
+
**Nyquist Rule:** Every `<verify>` must include an `<automated>` command. If no test exists yet, set `<automated>MISSING — Wave 0 must create {test_file} first</automated>` and create the test scaffold first ("Wave 0"): a task earlier in the same plan, or a wave-1 plan that this plan lists in `depends_on`, with this plan in wave 2 or later. Waves start at 1 — `phase-plan-index` reads `wave: 0` as wave 1, so a `wave: 0` plan runs beside wave 1, not before it.
|
|
179
180
|
|
|
180
181
|
**<done>:** Acceptance criteria - measurable state of completion.
|
|
181
182
|
- Good: "Valid credentials return 200 + JWT cookie, invalid credentials return 401"
|
|
@@ -269,7 +270,7 @@ After TDD detection, classify each task's verification by minimum test tier.
|
|
|
269
270
|
2. Docker Compose should be proposed in research.md — reference it, don't recreate it
|
|
270
271
|
3. T3/T4 tests run AFTER T1/T2 in the verification sequence
|
|
271
272
|
4. Each `<verify>` block must specify tier: `<automated tier="T2">docker compose up -d && cargo test --test integration</automated>`
|
|
272
|
-
5.
|
|
273
|
+
5. Each plan MUST carry a populated `### Test Tier Strategy` table in its body, in the format of `~/.claude/pan-wizard-core/templates/phase-prompt.md` (its Test Tier Strategy section) — plan-checker rejects plans without it
|
|
273
274
|
|
|
274
275
|
## User Setup Detection
|
|
275
276
|
|
|
@@ -297,7 +298,7 @@ Record in `user_setup` frontmatter. Only include what Claude literally cannot do
|
|
|
297
298
|
|
|
298
299
|
**Example with 6 tasks:**
|
|
299
300
|
|
|
300
|
-
```
|
|
301
|
+
```text
|
|
301
302
|
Task A (User model): needs nothing, creates src/models/user.ts
|
|
302
303
|
Task B (Product model): needs nothing, creates src/models/product.ts
|
|
303
304
|
Task C (User API): needs Task A, creates src/api/users.ts
|
|
@@ -320,7 +321,7 @@ Wave analysis:
|
|
|
320
321
|
## Vertical Slices vs Horizontal Layers
|
|
321
322
|
|
|
322
323
|
**Vertical slices (PREFER):**
|
|
323
|
-
```
|
|
324
|
+
```text
|
|
324
325
|
Plan 01: User feature (model + API + UI)
|
|
325
326
|
Plan 02: Product feature (model + API + UI)
|
|
326
327
|
Plan 03: Order feature (model + API + UI)
|
|
@@ -328,7 +329,7 @@ Plan 03: Order feature (model + API + UI)
|
|
|
328
329
|
Result: All three run parallel (Wave 1)
|
|
329
330
|
|
|
330
331
|
**Horizontal layers (AVOID):**
|
|
331
|
-
```
|
|
332
|
+
```text
|
|
332
333
|
Plan 01: Create User model, Product model, Order model
|
|
333
334
|
Plan 02: Create User API, Product API, Order API
|
|
334
335
|
Plan 03: Create User UI, Product UI, Order UI
|
|
@@ -375,7 +376,6 @@ Plans should complete within ~50% context (not 80%). No context anxiety, quality
|
|
|
375
376
|
- More than 3 tasks
|
|
376
377
|
- Multiple subsystems (DB + API + UI = separate plans)
|
|
377
378
|
- Any task with >5 file modifications
|
|
378
|
-
- Checkpoint + implementation in same plan
|
|
379
379
|
- Discovery + implementation in same plan
|
|
380
380
|
|
|
381
381
|
**CONSIDER splitting:** >5 files total, complex domains, uncertainty about approach, natural semantic boundaries.
|
|
@@ -416,17 +416,19 @@ Derive plans from actual work. Depth determines compression tolerance, not a tar
|
|
|
416
416
|
phase: XX-name
|
|
417
417
|
plan: NN
|
|
418
418
|
type: execute
|
|
419
|
-
wave: N
|
|
420
|
-
depends_on: []
|
|
421
|
-
files_modified: []
|
|
422
|
-
autonomous: true
|
|
423
|
-
requirements: []
|
|
424
|
-
user_setup: []
|
|
419
|
+
wave: N
|
|
420
|
+
depends_on: []
|
|
421
|
+
files_modified: []
|
|
422
|
+
autonomous: true
|
|
423
|
+
requirements: []
|
|
424
|
+
user_setup: []
|
|
425
|
+
planned_commit: <sha>
|
|
425
426
|
|
|
427
|
+
# Goal-backward verification; the Frontmatter Fields table below explains each field
|
|
426
428
|
must_haves:
|
|
427
|
-
truths: []
|
|
428
|
-
artifacts: []
|
|
429
|
-
key_links: []
|
|
429
|
+
truths: []
|
|
430
|
+
artifacts: []
|
|
431
|
+
key_links: []
|
|
430
432
|
---
|
|
431
433
|
|
|
432
434
|
<objective>
|
|
@@ -460,7 +462,7 @@ Output: [Artifacts created]
|
|
|
460
462
|
|
|
461
463
|
<context>
|
|
462
464
|
@.planning/project.md
|
|
463
|
-
@.planning/roadmap.md
|
|
465
|
+
@.planning/phases/XX-name/{phase}-roadmap-slice.md
|
|
464
466
|
@.planning/state.md
|
|
465
467
|
|
|
466
468
|
# Only reference prior plan SUMMARYs if genuinely needed
|
|
@@ -504,10 +506,11 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-summary.md`
|
|
|
504
506
|
| `files_modified` | Yes | Files this plan touches |
|
|
505
507
|
| `autonomous` | Yes | `true` if no checkpoints |
|
|
506
508
|
| `requirements` | Yes | **MUST** list requirement IDs from ROADMAP. Every roadmap requirement ID MUST appear in at least one plan. |
|
|
509
|
+
| `planned_commit` | Yes | The output of `git rev-parse HEAD` when you write the plan (omit it outside a git repository) |
|
|
507
510
|
| `user_setup` | No | Human-required setup items |
|
|
508
511
|
| `must_haves` | Yes | Goal-backward verification criteria |
|
|
509
512
|
|
|
510
|
-
Wave numbers are pre-computed during planning. Execute-phase reads `wave` directly from frontmatter.
|
|
513
|
+
Wave numbers are pre-computed during planning. Execute-phase reads `wave` directly from frontmatter. `pan-tools verify plan-set <phase>` checks the arithmetic before the plan checker runs: every roadmap requirement covered, no two plans in one wave modifying the same file, every `depends_on` naming a plan of this phase in an earlier wave, and no cycles.
|
|
511
514
|
|
|
512
515
|
## Interface Context for Executors
|
|
513
516
|
|
|
@@ -525,7 +528,7 @@ grep -n "export\|interface\|type\|class\|function" {relevant_source_files} 2>/de
|
|
|
525
528
|
|
|
526
529
|
Embed these in the plan's `<context>` section as an `<interfaces>` block:
|
|
527
530
|
|
|
528
|
-
|
|
531
|
+
````xml
|
|
529
532
|
<interfaces>
|
|
530
533
|
<!-- Key types and contracts the executor needs. Extracted from codebase. -->
|
|
531
534
|
<!-- Executor should use these directly — no codebase exploration needed. -->
|
|
@@ -546,7 +549,7 @@ export function validateToken(token: string): Promise<User | null>;
|
|
|
546
549
|
export function createSession(user: User): Promise<SessionToken>;
|
|
547
550
|
```
|
|
548
551
|
</interfaces>
|
|
549
|
-
|
|
552
|
+
````
|
|
550
553
|
|
|
551
554
|
### For plans that CREATE new interfaces:
|
|
552
555
|
If this plan creates types/interfaces that later plans depend on, include a "Wave 0" skeleton step:
|
|
@@ -608,10 +611,10 @@ Only include what Claude literally cannot do.
|
|
|
608
611
|
## The Process
|
|
609
612
|
|
|
610
613
|
**Step 0: Extract Requirement IDs**
|
|
611
|
-
Read
|
|
614
|
+
Read the `**Requirements:**` line in this phase's section of your roadmap slice (`{phase_dir}/{phase}-roadmap-slice.md`). Strip brackets if present (e.g., `[AUTH-01, AUTH-02]` → `AUTH-01, AUTH-02`). Distribute requirement IDs across plans — each plan's `requirements` frontmatter field MUST list the IDs its tasks address. **CRITICAL:** Every requirement ID MUST appear in at least one plan. Plans with an empty `requirements` field are invalid.
|
|
612
615
|
|
|
613
616
|
**Step 1: State the Goal**
|
|
614
|
-
Take phase goal from
|
|
617
|
+
Take the phase goal from the same section of the slice. Must be outcome-shaped, not task-shaped.
|
|
615
618
|
- Good: "Working chat interface" (outcome)
|
|
616
619
|
- Bad: "Build chat components" (task)
|
|
617
620
|
|
|
@@ -866,7 +869,8 @@ grep -l "status: diagnosed" "$phase_dir"/*-uat.md 2>/dev/null
|
|
|
866
869
|
**6. Create gap closure tasks:**
|
|
867
870
|
|
|
868
871
|
```xml
|
|
869
|
-
<task
|
|
872
|
+
<task type="auto">
|
|
873
|
+
<name>{fix_description}</name>
|
|
870
874
|
<files>{artifact.path}</files>
|
|
871
875
|
<action>
|
|
872
876
|
{For each item in gap.missing:}
|
|
@@ -885,13 +889,19 @@ grep -l "status: diagnosed" "$phase_dir"/*-uat.md 2>/dev/null
|
|
|
885
889
|
```yaml
|
|
886
890
|
---
|
|
887
891
|
phase: XX-name
|
|
888
|
-
plan:
|
|
892
|
+
# plan: numbered after the existing plans; wave: gap closures typically run in a single wave; gap_closure flags the plan for tracking
|
|
893
|
+
plan: NN
|
|
889
894
|
type: execute
|
|
890
|
-
wave: 1
|
|
895
|
+
wave: 1
|
|
891
896
|
depends_on: []
|
|
892
897
|
files_modified: [...]
|
|
893
898
|
autonomous: true
|
|
894
|
-
gap_closure: true
|
|
899
|
+
gap_closure: true
|
|
900
|
+
# must_haves (required): the gap truths this plan makes true
|
|
901
|
+
must_haves:
|
|
902
|
+
truths: []
|
|
903
|
+
artifacts: []
|
|
904
|
+
key_links: []
|
|
895
905
|
---
|
|
896
906
|
```
|
|
897
907
|
|
|
@@ -937,7 +947,7 @@ Group by plan, dimension, severity.
|
|
|
937
947
|
| dependency_correctness | Fix depends_on, recompute waves |
|
|
938
948
|
| key_links_planned | Add wiring task or update action |
|
|
939
949
|
| scope_sanity | Split into multiple plans |
|
|
940
|
-
|
|
|
950
|
+
| verification_derivation | Derive and add must_haves to frontmatter |
|
|
941
951
|
|
|
942
952
|
### Step 4: Make Targeted Updates
|
|
943
953
|
|
|
@@ -1024,18 +1034,20 @@ If exists, load relevant documents by phase type:
|
|
|
1024
1034
|
| database, schema, models | architecture.md, stack.md |
|
|
1025
1035
|
| testing, tests | testing.md, conventions.md |
|
|
1026
1036
|
| integration, external API | integrations.md, stack.md |
|
|
1027
|
-
| refactor, cleanup | concerns.md, architecture.md |
|
|
1037
|
+
| refactor, cleanup | concerns.md, architecture.md, relationships.md |
|
|
1038
|
+
| dependency analysis | relationships.md, architecture.md |
|
|
1039
|
+
| code quality | best-practices.md, conventions.md, testing.md |
|
|
1028
1040
|
| setup, config | stack.md, structure.md |
|
|
1029
1041
|
| (default) | stack.md, architecture.md |
|
|
1030
1042
|
</step>
|
|
1031
1043
|
|
|
1032
1044
|
<step name="identify_phase">
|
|
1045
|
+
The phase to plan is in your prompt, and its roadmap slice (`{phase_dir}/{phase}-roadmap-slice.md`) lists every phase in one line each. Do not read the whole roadmap.md: on a long project it is the largest file in `.planning/`, and the slice holds what planning this phase needs from it.
|
|
1033
1046
|
```bash
|
|
1034
|
-
cat .planning/roadmap.md
|
|
1035
1047
|
ls .planning/phases/
|
|
1036
1048
|
```
|
|
1037
1049
|
|
|
1038
|
-
If
|
|
1050
|
+
If no phase was given and several are open, ask which to plan. If obvious (first incomplete), proceed.
|
|
1039
1051
|
|
|
1040
1052
|
Read existing plan.md or discovery.md in phase directory.
|
|
1041
1053
|
|
|
@@ -1084,7 +1096,7 @@ For phases not selected, retain from digest:
|
|
|
1084
1096
|
|
|
1085
1097
|
**From state.md:** Decisions → constrain approach. Pending todos → candidates.
|
|
1086
1098
|
|
|
1087
|
-
**From RETROSPECTIVE.md (if exists):**
|
|
1099
|
+
**From RETROSPECTIVE.md (if exists — PAN does not write one; `/pan:retro` only reports):**
|
|
1088
1100
|
```bash
|
|
1089
1101
|
cat .planning/RETROSPECTIVE.md 2>/dev/null | tail -100
|
|
1090
1102
|
```
|
|
@@ -1102,6 +1114,7 @@ Use `phase_dir` from init context (already loaded in load_project_state).
|
|
|
1102
1114
|
cat "$phase_dir"/*-context.md 2>/dev/null # From /pan:discuss-phase
|
|
1103
1115
|
cat "$phase_dir"/*-research.md 2>/dev/null # From /pan:research-phase
|
|
1104
1116
|
cat "$phase_dir"/*discovery.md 2>/dev/null # From mandatory discovery
|
|
1117
|
+
cat "$phase_dir"/*-design.md 2>/dev/null # From /pan:design-phase (approved design)
|
|
1105
1118
|
```
|
|
1106
1119
|
|
|
1107
1120
|
**If context.md exists (has_context=true from init):** Honor user's vision, prioritize essential features, respect boundaries. Locked decisions — do not revisit.
|
|
@@ -1144,7 +1157,7 @@ Prefer vertical slices over horizontal layers.
|
|
|
1144
1157
|
</step>
|
|
1145
1158
|
|
|
1146
1159
|
<step name="assign_waves">
|
|
1147
|
-
```
|
|
1160
|
+
```text
|
|
1148
1161
|
waves = {}
|
|
1149
1162
|
for each plan in plan_order:
|
|
1150
1163
|
if plan.depends_on is empty:
|
|
@@ -1177,7 +1190,7 @@ Verify each plan fits context budget: 2-3 tasks, ~50% target. Split if necessary
|
|
|
1177
1190
|
</step>
|
|
1178
1191
|
|
|
1179
1192
|
<step name="confirm_breakdown">
|
|
1180
|
-
Present breakdown with wave structure.
|
|
1193
|
+
Present breakdown with wave structure. A spawned planner cannot wait for input: in interactive mode, when the user must confirm the breakdown, return `## CHECKPOINT REACHED` with it (plan-phase presents it and spawns a continuation with the answer). Auto-approve in yolo mode.
|
|
1181
1194
|
</step>
|
|
1182
1195
|
|
|
1183
1196
|
<step name="write_phase_prompt">
|
|
@@ -1223,8 +1236,8 @@ Returns JSON: `{ valid, errors, warnings, task_count, tasks }`
|
|
|
1223
1236
|
<step name="update_roadmap">
|
|
1224
1237
|
Update roadmap.md to finalize phase placeholders:
|
|
1225
1238
|
|
|
1226
|
-
1.
|
|
1227
|
-
2.
|
|
1239
|
+
1. Find this phase's heading line (`### Phase {N}:`) with a search, then read only that section — from the heading to the next `Phase` heading — not the whole file
|
|
1240
|
+
2. Edit inside that section
|
|
1228
1241
|
3. Update placeholders:
|
|
1229
1242
|
|
|
1230
1243
|
**Goal** (only if placeholder):
|
|
@@ -1235,18 +1248,18 @@ Update roadmap.md to finalize phase placeholders:
|
|
|
1235
1248
|
- Update count: `**Plans:** {N} plans`
|
|
1236
1249
|
|
|
1237
1250
|
**Plan list** (always update):
|
|
1238
|
-
```
|
|
1251
|
+
```text
|
|
1239
1252
|
Plans:
|
|
1240
1253
|
- [ ] {phase}-01-plan.md — {brief objective}
|
|
1241
1254
|
- [ ] {phase}-02-plan.md — {brief objective}
|
|
1242
1255
|
```
|
|
1243
1256
|
|
|
1244
|
-
4. Write
|
|
1257
|
+
4. Save each change with Edit — never Write roadmap.md whole: you read only this phase's section
|
|
1245
1258
|
</step>
|
|
1246
1259
|
|
|
1247
1260
|
<step name="git_commit">
|
|
1248
1261
|
```bash
|
|
1249
|
-
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "docs($PHASE): create phase plan" --files .planning/phases/$PHASE-*/$PHASE-*-plan.md .planning/roadmap.md
|
|
1262
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "docs($PHASE): create phase plan" --files .planning/phases/$PHASE-*/$PHASE-*-plan.md .planning/phases/$PHASE-*/$PHASE-roadmap-slice.md .planning/roadmap.md
|
|
1250
1263
|
```
|
|
1251
1264
|
</step>
|
|
1252
1265
|
|
package/agents/pan-previewer.md
CHANGED
|
@@ -49,7 +49,7 @@ Your output should answer: *"When will the milestone actually finish, and what's
|
|
|
49
49
|
Before writing the report, think through:
|
|
50
50
|
|
|
51
51
|
1. **What does the data say literally?** Sort `files_mentioned` by likely impact (source > tests > docs). Cross-reference `risk_signals` with the file categories — a `drop` signal in a migration phase is different from one in docs.
|
|
52
|
-
2. **What's missing?** For `phase` mode: are there tests NOT in `
|
|
52
|
+
2. **What's missing?** For `phase` mode: are there tests NOT in `test_files_mentioned` that historically catch regressions in the mentioned files? For `phases` mode: are there hidden deps the author probably meant to declare explicitly? For `milestone` mode: is `sample_size` too small to trust the projection?
|
|
53
53
|
3. **What's the one-line bottom line?** Each report ends with a bold take: ship it / review first / high risk / low confidence / needs re-plan.
|
|
54
54
|
</reasoning_protocol>
|
|
55
55
|
|