pan-wizard 3.35.0 → 3.37.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/CHANGELOG.md +3645 -0
- package/README.md +46 -52
- package/agents/pan-conductor.md +2 -3
- package/agents/pan-counterfactual.md +1 -2
- package/agents/pan-debugger.md +14 -3
- package/agents/pan-design-checker.md +1 -2
- package/agents/pan-designer.md +2 -3
- package/agents/pan-document_code.md +1 -2
- package/agents/pan-executor.md +25 -0
- package/agents/pan-hardener.md +4 -3
- package/agents/pan-integration-checker.md +1 -2
- package/agents/pan-knowledge.md +1 -2
- package/agents/pan-meta-reviewer.md +3 -3
- package/agents/pan-optimizer.md +4 -4
- package/agents/pan-phase-researcher.md +80 -475
- package/agents/pan-plan-checker.md +40 -3
- package/agents/pan-planner.md +21 -7
- package/agents/pan-previewer.md +3 -2
- package/agents/pan-project-researcher.md +72 -493
- package/agents/pan-release.md +1 -1
- package/agents/pan-reviewer.md +14 -3
- package/agents/pan-roadmapper.md +12 -7
- package/agents/pan-verifier.md +9 -4
- package/bin/install-lib.cjs +134 -14
- package/bin/install.js +59 -12
- package/commands/pan/army.md +1 -1
- package/commands/pan/autodev.md +76 -0
- package/commands/pan/cost.md +21 -1
- package/commands/pan/exec-phase.md +3 -4
- package/commands/pan/focus-auto.md +14 -7
- package/commands/pan/focus-design.md +4 -5
- package/commands/pan/focus-docs.md +24 -0
- package/commands/pan/learn.md +13 -6
- package/commands/pan/milestone-audit.md +8 -1
- package/commands/pan/milestone-done.md +10 -5
- package/commands/pan/milestone-new.md +2 -2
- package/commands/pan/new-project.md +15 -12
- package/commands/pan/plan-phase.md +15 -9
- package/commands/pan/preview.md +1 -1
- package/commands/pan/quick.md +1 -1
- package/commands/pan/review-deep.md +11 -5
- package/commands/pan/settings.md +6 -0
- package/commands/pan/verify-phase.md +6 -2
- package/docs/AGENTS.md +917 -0
- package/docs/ARCHITECTURE.md +1054 -0
- package/docs/CLI-REFERENCE.md +4582 -0
- package/docs/COMPARISON.md +116 -0
- package/docs/DEVELOPMENT.md +490 -0
- package/docs/ECOSYSTEM-REVIEW-2026-06.md +107 -0
- package/docs/ECOSYSTEM-REVIEW-2026-08.md +349 -0
- package/docs/EXAMPLES.md +584 -0
- package/docs/FAQ.md +254 -0
- package/docs/FIELD-HARVEST-2026-07.md +88 -0
- package/docs/FIELD-REPORT-army-2026-06.md +121 -0
- package/docs/HOOKS.md +638 -0
- package/docs/IMPROVEMENT-TODO.md +246 -0
- package/docs/INTERNALS.md +485 -0
- package/docs/MIGRATION-v2-to-v3.md +258 -0
- package/docs/SECURITY-HARDENING.md +230 -0
- package/docs/SKILLS-ENHANCEMENT-PLAN-V2.md +122 -0
- package/docs/SKILLS-FULL-TEXT.md +9685 -0
- package/docs/SKILLS-REFERENCE.md +1037 -0
- package/docs/TROUBLESHOOTING.md +1084 -0
- package/docs/USER-GUIDE.md +1437 -0
- package/docs/archive/SKILLS-ENHANCEMENT-PLAN.md +230 -0
- package/docs/audits/AUDIT-2026-08-e2e-ROADMAP.md +117 -0
- package/docs/audits/AUDIT-2026-08-e2e-VERIFICATION.md +693 -0
- package/docs/audits/AUDIT-2026-08-e2e.md +1546 -0
- package/docs/audits/OUTSTANDING-2026-08.md +275 -0
- package/docs/audits/STABILITY-TEST-2026-08.md +640 -0
- package/docs/branding/README-brand-draft.md +119 -0
- package/docs/branding/handoff/IMPLEMENTATION.md +205 -0
- package/docs/branding/handoff/README-brand-draft.md +119 -0
- package/docs/branding/handoff/image-prompts.md +46 -0
- package/docs/branding/image-prompts.md +46 -0
- package/docs/branding/nano-banana-prompts.txt +60 -0
- package/docs/context-monitor.md +13 -0
- package/docs/decisions/ADR-0001-strategic-feature-prioritization.md +83 -0
- package/docs/decisions/ADR-0002-copilot-cli-runtime.md +71 -0
- package/docs/decisions/ADR-0003-smart-execution.md +84 -0
- package/docs/decisions/ADR-0004-copilot-cli-interaction.md +89 -0
- package/docs/decisions/ADR-0005-command-naming.md +80 -0
- package/docs/decisions/ADR-0006-focus-commands.md +101 -0
- package/docs/decisions/ADR-0007-ship-v1.md +73 -0
- package/docs/decisions/ADR-0008-map-codebase-mermaid-togaf.md +80 -0
- package/docs/decisions/ADR-0009-production-deployment-checklist.md +68 -0
- package/docs/decisions/ADR-0010-standards-integration.md +79 -0
- package/docs/decisions/ADR-0011-help-commands-rewrite.md +64 -0
- package/docs/decisions/ADR-0012-contributors-attribution-index.md +42 -0
- package/docs/decisions/ADR-0013-strategic-feature-additions.md +53 -0
- package/docs/decisions/ADR-0014-internal-cleanup-code-quality.md +53 -0
- package/docs/decisions/ADR-0015-focus-auto-runner.md +296 -0
- package/docs/decisions/ADR-0016-enhanced-doc-sync.md +54 -0
- package/docs/decisions/ADR-0017-enhanced-focus-design.md +69 -0
- package/docs/decisions/ADR-0018-user-reality-testing.md +84 -0
- package/docs/decisions/ADR-0019-end-to-end-user-acceptance-testing.md +113 -0
- package/docs/decisions/ADR-0020-ai-drift-prevention.md +55 -0
- package/docs/decisions/ADR-0021-codebase-mapper-v2.md +76 -0
- package/docs/decisions/ADR-0022-lifecycle-completeness.md +63 -0
- package/docs/decisions/ADR-0023-opus-4-7-adoption.md +89 -0
- package/docs/decisions/ADR-0024-spec-b-v2-completion.md +137 -0
- package/docs/decisions/ADR-0025-behavioral-guardrails-layer.md +129 -0
- package/docs/decisions/ADR-0026-self-improvement-loop.md +171 -0
- package/docs/decisions/ADR-0027-doc-code-link-graph.md +164 -0
- package/docs/decisions/ADR-0028-unified-agents-skills-target.md +46 -0
- package/docs/decisions/ADR-0029-experiment-evaluator.md +76 -0
- package/docs/decisions/ADR-0030-planning-concurrency.md +37 -0
- package/docs/decisions/ADR-0031-focus-auto-backlog-source.md +47 -0
- package/docs/decisions/ADR-0032-squad-model.md +64 -0
- package/docs/decisions/ADR-0033-army-campaign.md +40 -0
- package/docs/decisions/ADR-0034-scheduled-campaigns.md +57 -0
- package/docs/decisions/ADR-0035-army-hud-dashboard.md +40 -0
- package/docs/decisions/ADR-0036-agentic-memory-architecture.md +106 -0
- package/docs/decisions/ADR-0037-pin-security-agents-to-opus.md +51 -0
- package/docs/decisions/ADR-0038-skill-aligned-decomposition.md +41 -0
- package/docs/decisions/ADR-0039-worktree-as-project-variant.md +37 -0
- package/docs/decisions/ADR-0040-memory-injection-defense.md +55 -0
- package/docs/decisions/ADR-0041-mcp-dual-era-bridge.md +47 -0
- package/docs/decisions/ADR-0042-design-parity-both-flows.md +45 -0
- package/docs/decisions/ADR-0043-addressable-planning-roots.md +56 -0
- package/docs/decisions/ADR-0044-bound-the-cached-context.md +104 -0
- package/docs/decisions/ADR-0045-agent-plugins-bundle.md +76 -0
- package/docs/decisions/ADR-0046-subagent-frontmatter-decisions.md +39 -0
- package/docs/decisions/ADR-0047-pan-harness.md +76 -0
- package/docs/decisions/ADR-0048-one-core-per-project.md +43 -0
- package/docs/decisions/ADR-0049-machine-verdicts-and-findings-ledger.md +116 -0
- package/docs/specs/ai_drift_prevention_featureai.md +286 -0
- package/docs/specs/codebase_mapper_v2_featureai.md +930 -0
- package/docs/specs/command_naming_optimization_featureai.md +930 -0
- package/docs/specs/comp_analysis_markdown_v1.md +149 -0
- package/docs/specs/continuous_autonomous_execution_featureai.md +304 -0
- package/docs/specs/contributors_attribution_index_featureai.md +476 -0
- package/docs/specs/copilot_cli_interaction_featureai.md +868 -0
- package/docs/specs/copilot_cli_runtime_featureai.md +647 -0
- package/docs/specs/custom-skills-assessment.md +461 -0
- package/docs/specs/deployment_audit_findings_featureai.md +243 -0
- package/docs/specs/doc_code_link_graph_featureai.md +253 -0
- package/docs/specs/documentation_alignment_cleanup_featureai.md +69 -0
- package/docs/specs/e2e_visual_testing_featureai.md +615 -0
- package/docs/specs/end_to_end_user_acceptance_testing_featureai.md +810 -0
- package/docs/specs/evidence-loop-plan.md +76 -0
- package/docs/specs/evidence_loop_featureai.md +497 -0
- package/docs/specs/focus-auto-optimize-category.md +449 -0
- package/docs/specs/focus-auto-optimize-superplan.md +188 -0
- package/docs/specs/focus_auto_runner_featureai.md +1102 -0
- package/docs/specs/focus_design_v2_featureai.md +197 -0
- package/docs/specs/focus_sync_v2_featureai.md +202 -0
- package/docs/specs/git_integration_overhaul_featureai.md +326 -0
- package/docs/specs/glm_zai_provider_featureai.md +200 -0
- package/docs/specs/googlecli_adoption_featureai.md +661 -0
- package/docs/specs/help_commands_rewrite_featureai.md +860 -0
- package/docs/specs/industry_analysis_strategic_additions_featureai.md +231 -0
- package/docs/specs/industry_comparison_and_feature_gaps_featureai.md +674 -0
- package/docs/specs/internal_cleanup_code_quality_featureai.md +486 -0
- package/docs/specs/investigations/README.md +31 -0
- package/docs/specs/investigations/digests/2026-09-28.md +47 -0
- package/docs/specs/investigations/digests/2026-10-08.md +62 -0
- package/docs/specs/investigations/digests/2026-10-10.md +61 -0
- package/docs/specs/investigations/features/debugger-red-loop-first.md +55 -0
- package/docs/specs/investigations/features/harness-cross-host-behaviour.md +93 -0
- package/docs/specs/investigations/features/optimize-apply-regression-gate.md +66 -0
- package/docs/specs/investigations/features/reviewer-smell-baseline.md +57 -0
- package/docs/specs/investigations/features/trace-failure-capture.md +69 -0
- package/docs/specs/lifecycle_completeness_featureai.md +754 -0
- package/docs/specs/local-first-ci.md +42 -0
- package/docs/specs/map_codebase_mermaid_togaf_featureai.md +805 -0
- package/docs/specs/market-delta-2026-09-superplan.md +310 -0
- package/docs/specs/market-ideas-2026-09.md +131 -0
- package/docs/specs/market-ideas-2026-10.md +428 -0
- package/docs/specs/market-ideas-ledger.md +177 -0
- package/docs/specs/memory-optimization-2026-10.md +285 -0
- package/docs/specs/multi-track-planning-roots.md +143 -0
- package/docs/specs/multi_model_routing_featureai.md +687 -0
- package/docs/specs/multi_model_routing_superplan.md +197 -0
- package/docs/specs/opus_47_existing_enhancements_featureai.md +247 -0
- package/docs/specs/opus_47_extended_features_featureai.md +363 -0
- package/docs/specs/opus_47_extended_features_v2_featureai.md +397 -0
- package/docs/specs/pan_focus_commands_featureai.md +2336 -0
- package/docs/specs/pan_zcode_mcp_bridge_featureai.md +120 -0
- package/docs/specs/product-excellence-superplan.md +315 -0
- package/docs/specs/product_excellence_program_2026_q4_featureai.md +365 -0
- package/docs/specs/production_deployment_readiness_featureai.md +433 -0
- package/docs/specs/production_readiness_ship_v1_featureai.md +698 -0
- package/docs/specs/real_test_enforcement_featureai.md +213 -0
- package/docs/specs/reality-check-2026-09-superplan.md +362 -0
- package/docs/specs/right-sized-ceremony.md +74 -0
- package/docs/specs/roadmap_and_competition_2026_q4_featureai.md +390 -0
- package/docs/specs/self_improvement_loop_featureai.md +875 -0
- package/docs/specs/skill-aligned-decomposition.md +155 -0
- package/docs/specs/standards_integration_featureai.md +833 -0
- package/docs/specs/testing-system-redesign-2026-09.md +267 -0
- package/docs/specs/user_reality_testing_system_featureai.md +788 -0
- package/docs/specs/watch-triggers.json +22 -0
- package/docs/specs/workflow-integration-redesign.md +742 -0
- package/docs/specs/workflow_state_consistency_featureai.md +183 -0
- package/hooks/dist/pan-context-monitor.js +9 -2
- package/hooks/dist/pan-cost-logger.js +5 -0
- package/hooks/dist/pan-guard.js +28 -5
- package/hooks/dist/pan-stop-guard.js +9 -9
- package/hooks/dist/pan-trace-logger.js +5 -0
- package/package.json +10 -2
- package/pan-wizard-core/bin/lib/agents-md.cjs +57 -8
- package/pan-wizard-core/bin/lib/autodev-report.cjs +180 -0
- package/pan-wizard-core/bin/lib/autodev.cjs +642 -0
- package/pan-wizard-core/bin/lib/ci.cjs +143 -0
- package/pan-wizard-core/bin/lib/commands.cjs +1 -1
- package/pan-wizard-core/bin/lib/config.cjs +41 -5
- package/pan-wizard-core/bin/lib/constants.cjs +27 -1
- package/pan-wizard-core/bin/lib/core.cjs +31 -14
- package/pan-wizard-core/bin/lib/cost.cjs +160 -4
- package/pan-wizard-core/bin/lib/cross-family.cjs +164 -0
- package/pan-wizard-core/bin/lib/debug-cases.cjs +104 -0
- package/pan-wizard-core/bin/lib/doc-lint.cjs +5 -3
- package/pan-wizard-core/bin/lib/failure-class.cjs +81 -0
- package/pan-wizard-core/bin/lib/findings.cjs +148 -9
- package/pan-wizard-core/bin/lib/focus.cjs +1 -1
- package/pan-wizard-core/bin/lib/git.cjs +1 -1
- package/pan-wizard-core/bin/lib/hosts.cjs +88 -0
- package/pan-wizard-core/bin/lib/init.cjs +7 -2
- package/pan-wizard-core/bin/lib/knowledge.cjs +2 -0
- package/pan-wizard-core/bin/lib/merge.cjs +50 -0
- package/pan-wizard-core/bin/lib/mutate.cjs +268 -0
- package/pan-wizard-core/bin/lib/next-action.cjs +112 -0
- package/pan-wizard-core/bin/lib/optimize.cjs +2 -2
- package/pan-wizard-core/bin/lib/phase-gate.cjs +15 -9
- package/pan-wizard-core/bin/lib/phase-remove.cjs +91 -11
- package/pan-wizard-core/bin/lib/phase.cjs +85 -13
- package/pan-wizard-core/bin/lib/plan-lint.cjs +310 -0
- package/pan-wizard-core/bin/lib/preview.cjs +26 -4
- package/pan-wizard-core/bin/lib/requirements-lint.cjs +130 -0
- package/pan-wizard-core/bin/lib/research-lint.cjs +268 -0
- package/pan-wizard-core/bin/lib/review-deep.cjs +14 -22
- package/pan-wizard-core/bin/lib/review-vote.cjs +105 -0
- package/pan-wizard-core/bin/lib/roadmap.cjs +1 -0
- package/pan-wizard-core/bin/lib/runner.cjs +2 -16
- package/pan-wizard-core/bin/lib/sizing.cjs +356 -0
- package/pan-wizard-core/bin/lib/squads.cjs +1 -1
- package/pan-wizard-core/bin/lib/state-write.cjs +247 -0
- package/pan-wizard-core/bin/lib/test-gate.cjs +433 -0
- package/pan-wizard-core/bin/lib/uat.cjs +149 -0
- package/pan-wizard-core/bin/lib/usage.cjs +104 -0
- package/pan-wizard-core/bin/lib/verdict.cjs +26 -3
- package/pan-wizard-core/bin/lib/verify-plan-set.cjs +30 -1
- package/pan-wizard-core/bin/lib/verify-preflight.cjs +2 -2
- package/pan-wizard-core/bin/lib/verify-red.cjs +174 -0
- package/pan-wizard-core/bin/lib/verify-retro.cjs +3 -2
- package/pan-wizard-core/bin/lib/verify-scope.cjs +143 -2
- package/pan-wizard-core/bin/lib/verify.cjs +86 -31
- package/pan-wizard-core/bin/lib/worktree.cjs +70 -0
- package/pan-wizard-core/bin/pan-tools.cjs +257 -28
- package/pan-wizard-core/learnings/universal/autonomous-loop.md +2 -2
- package/pan-wizard-core/mcp/orchestrator.cjs +4 -1
- package/pan-wizard-core/references/continuation-format.md +3 -3
- package/pan-wizard-core/references/design-methodology.md +1 -1
- package/pan-wizard-core/references/guardrails.md +1 -1
- package/pan-wizard-core/references/handoff-decisions.md +1 -1
- package/pan-wizard-core/references/model-profiles.md +2 -3
- package/pan-wizard-core/references/questioning.md +24 -0
- package/pan-wizard-core/references/ui-brand.md +4 -6
- package/pan-wizard-core/references/verdict-contract.md +2 -1
- package/pan-wizard-core/templates/config.json +10 -2
- package/pan-wizard-core/templates/debug.md +1 -0
- package/pan-wizard-core/templates/design.md +5 -4
- package/pan-wizard-core/templates/discovery.md +2 -2
- package/pan-wizard-core/templates/phase-prompt.md +7 -0
- package/pan-wizard-core/templates/requirements.md +9 -0
- package/pan-wizard-core/templates/research.md +10 -0
- package/pan-wizard-core/templates/summary-complex.md +5 -1
- package/pan-wizard-core/templates/summary-minimal.md +4 -0
- package/pan-wizard-core/templates/summary-standard.md +5 -1
- package/pan-wizard-core/templates/summary.md +8 -1
- package/pan-wizard-core/workflows/add-phase.md +4 -6
- package/pan-wizard-core/workflows/assumptions.md +19 -1
- package/pan-wizard-core/workflows/diagnose-issues.md +2 -0
- package/pan-wizard-core/workflows/discuss-phase.md +4 -2
- package/pan-wizard-core/workflows/exec-lean.md +69 -0
- package/pan-wizard-core/workflows/exec-phase.md +79 -15
- package/pan-wizard-core/workflows/execute-plan.md +3 -1
- package/{commands/pan → pan-wizard-core/workflows}/focus-doc-audit.md +13 -29
- package/{commands/pan → pan-wizard-core/workflows}/focus-drift-walking.md +3 -18
- package/{commands/pan → pan-wizard-core/workflows}/focus-exec.md +8 -23
- package/{commands/pan → pan-wizard-core/workflows}/focus-plan.md +6 -20
- package/{commands/pan → pan-wizard-core/workflows}/focus-scan.md +3 -16
- package/{commands/pan → pan-wizard-core/workflows}/focus-sync.md +7 -21
- package/pan-wizard-core/workflows/health.md +6 -0
- package/pan-wizard-core/workflows/help.md +114 -77
- package/pan-wizard-core/workflows/insert-phase.md +4 -6
- package/pan-wizard-core/workflows/learn.md +3 -3
- package/pan-wizard-core/workflows/milestone-audit.md +2 -2
- package/pan-wizard-core/workflows/milestone-new.md +38 -95
- package/pan-wizard-core/workflows/new-project.md +96 -258
- package/pan-wizard-core/workflows/optimize.md +107 -5
- package/pan-wizard-core/workflows/phase-tests.md +10 -0
- package/pan-wizard-core/workflows/plan-phase.md +106 -45
- package/pan-wizard-core/workflows/profile.md +50 -0
- package/pan-wizard-core/workflows/progress.md +10 -0
- package/pan-wizard-core/workflows/quick.md +34 -43
- package/pan-wizard-core/workflows/remove-phase.md +11 -1
- package/pan-wizard-core/workflows/research-phase.md +118 -40
- package/pan-wizard-core/workflows/resume-project.md +18 -2
- package/pan-wizard-core/workflows/settings.md +33 -19
- package/pan-wizard-core/workflows/todo-check.md +6 -2
- package/pan-wizard-core/workflows/transition.md +22 -4
- package/pan-wizard-core/workflows/uat-walkthrough.md +90 -0
- package/pan-wizard-core/workflows/update.md +1 -1
- package/pan-wizard-core/workflows/verify-phase.md +39 -46
- package/scripts/build-agent-plugin.js +35 -15
- package/scripts/build-help.cjs +106 -0
- package/scripts/build-plugin.js +10 -1
- package/scripts/deprecate-old-versions.js +70 -3
- package/scripts/generate-skills-docs.py +1 -1
- package/scripts/git-hooks/pre-push +27 -0
- package/scripts/install-git-hooks.js +7 -5
- package/scripts/install-pre-push.cjs +38 -0
- package/scripts/land.cjs +151 -0
- package/scripts/local-ci.cjs +501 -0
- package/scripts/local-schedule.cjs +277 -0
- package/scripts/mutation-probe.cjs +7 -80
- package/scripts/prompt-lint.cjs +32 -0
- package/scripts/prompt-rules.cjs +156 -0
- package/scripts/run-tests.cjs +7 -1
- package/scripts/test-quality-lint.cjs +3 -3
- package/scripts/test-surface.cjs +175 -6
- package/agents/pan-research-synthesizer.md +0 -246
- package/commands/pan/audit-deployment.md +0 -386
- package/commands/pan/dashboard.md +0 -22
- package/commands/pan/discord.md +0 -19
- package/commands/pan/mcp-bridge.md +0 -143
- package/commands/pan/milestone-cleanup.md +0 -19
- package/commands/pan/milestone-gaps.md +0 -35
- package/commands/pan/optimize.md +0 -115
- package/commands/pan/profile.md +0 -76
- package/commands/pan/research-phase.md +0 -189
- package/pan-wizard-core/bin/lib/bridge.cjs +0 -269
- package/pan-wizard-core/templates/research-project/architecture.md +0 -204
- package/pan-wizard-core/templates/research-project/features.md +0 -147
- package/pan-wizard-core/templates/research-project/pitfalls.md +0 -200
- package/pan-wizard-core/templates/research-project/stack.md +0 -120
- package/pan-wizard-core/templates/research-project/summary.md +0 -170
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Execute small, ad-hoc tasks with PAN guarantees (atomic commits, state.md tracking). Quick mode spawns pan-planner (quick mode) + pan-executor(s), tracks tasks in `.planning/quick/`, and updates state.md's "Quick Tasks Completed" table.
|
|
3
3
|
|
|
4
4
|
With `--full` flag: enables plan-checking (max 2 iterations) and post-execution verification for quality guarantees without full milestone ceremony.
|
|
5
|
+
|
|
6
|
+
Without `--full`, a task whose description already says precisely what to build takes the lean path: the engine writes its one-task plan (`pan-tools size quick-plan`) and no planner runs. `--quality`, the `quality` profile or `workflow.ceremony: full` keep the planner.
|
|
5
7
|
</purpose>
|
|
6
8
|
|
|
7
9
|
<required_reading>
|
|
@@ -13,6 +15,7 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
13
15
|
|
|
14
16
|
Parse `$ARGUMENTS` for:
|
|
15
17
|
- `--full` flag → store as `$FULL_MODE` (true/false)
|
|
18
|
+
- `--quality` flag → store as `$QUALITY` (true/false): the full ceremony for this run
|
|
16
19
|
- Remaining text → use as `$DESCRIPTION` if non-empty
|
|
17
20
|
|
|
18
21
|
If `$DESCRIPTION` is empty after parsing, prompt user interactively:
|
|
@@ -50,6 +53,14 @@ Parse JSON for: `planner_model`, `executor_model`, `checker_model`, `verifier_mo
|
|
|
50
53
|
|
|
51
54
|
**If `roadmap_exists` is false:** Error — Quick mode requires an active project with roadmap.md. Run `/pan:new-project` first.
|
|
52
55
|
|
|
56
|
+
**Size the ceremony** (pass `--full` and `--quality` through when set):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
SIZING=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs size task "$DESCRIPTION" [--full] [--quality])
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`SIZING.path` is `lean` (the description names what to build and how to check it) or `full`; `SIZING.mode` is `auto` or `full`. Show it in one line: `Ceremony: {path} ({reasons joined by "; "})`.
|
|
63
|
+
|
|
53
64
|
Quick tasks can run mid-phase - validation only checks roadmap.md exists, not phase status.
|
|
54
65
|
|
|
55
66
|
**Circular optimization — ensure trace session active:**
|
|
@@ -90,6 +101,16 @@ Store `$QUICK_DIR` for use in orchestration.
|
|
|
90
101
|
|
|
91
102
|
**Step 5: Spawn planner (quick mode)**
|
|
92
103
|
|
|
104
|
+
**If `SIZING.path` is `lean`:** the engine writes the plan and no planner runs:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs size quick-plan --out "${QUICK_DIR}/${next_num}-plan.md" --num "${next_num}" "$DESCRIPTION"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Report `Plan written by the engine (lean path): ${QUICK_DIR}/${next_num}-plan.md` and go to Step 6.
|
|
111
|
+
|
|
112
|
+
**Otherwise**, spawn the planner:
|
|
113
|
+
|
|
93
114
|
**If `$FULL_MODE`:** Use `quick-full` mode with stricter constraints.
|
|
94
115
|
|
|
95
116
|
**If NOT `$FULL_MODE`:** Use standard `quick` mode.
|
|
@@ -168,6 +189,11 @@ Checker prompt:
|
|
|
168
189
|
**Scope:** This is a quick task, not a full phase. Skip checks that require a ROADMAP phase goal.
|
|
169
190
|
</verification_context>
|
|
170
191
|
|
|
192
|
+
<output_budget>
|
|
193
|
+
{Only when SIZING.mode is auto, include:}
|
|
194
|
+
Report the verdict and the blocking issues only: one line per issue (task, what is wrong, the fix), at most 200 words before the pan-verdict block. No summary of what passed.
|
|
195
|
+
</output_budget>
|
|
196
|
+
|
|
171
197
|
<check_dimensions>
|
|
172
198
|
- Requirement coverage: Does the plan address the task description?
|
|
173
199
|
- Task completeness: Do tasks have files, action, verify, done fields?
|
|
@@ -336,57 +362,22 @@ Store as `$VERIFICATION_STATUS`.
|
|
|
336
362
|
|
|
337
363
|
**Step 7: Update state.md**
|
|
338
364
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
**7a. Check if "Quick Tasks Completed" section exists:**
|
|
342
|
-
|
|
343
|
-
Read state.md and check for `### Quick Tasks Completed` section.
|
|
344
|
-
|
|
345
|
-
**7b. If section doesn't exist, create it:**
|
|
346
|
-
|
|
347
|
-
Insert after `### Blockers/Concerns` section:
|
|
365
|
+
Record the task through the engine. It creates the "### Quick Tasks Completed" table after "### Blockers/Concerns" when it is missing, numbers the row, and keeps an existing table's columns. Pass `description_cell` exactly as init returned it, never `$DESCRIPTION`: init escapes `|` and folds line breaks, and a raw `|` would split the row.
|
|
348
366
|
|
|
349
367
|
**If `$FULL_MODE`:**
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
| # | Description | Date | Commit | Status | Directory |
|
|
354
|
-
|---|-------------|------|--------|--------|-----------|
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**If NOT `$FULL_MODE`:**
|
|
358
|
-
```markdown
|
|
359
|
-
### Quick Tasks Completed
|
|
360
|
-
|
|
361
|
-
| # | Description | Date | Commit | Directory |
|
|
362
|
-
|---|-------------|------|--------|-----------|
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
**Note:** If the table already exists, match its existing column format. If adding `--full` to a project that already has quick tasks without a Status column, add the Status column to the header and separator rows, and leave Status empty for the new row's predecessors.
|
|
366
|
-
|
|
367
|
-
**7c. Append new row to table:**
|
|
368
|
-
|
|
369
|
-
Use `date` and `description_cell` from init. Write `description_cell` exactly as init returned it, never `$DESCRIPTION`: init escapes `|` and folds line breaks, and a raw `|` in a description would split the row into an extra column and break the table for every later read.
|
|
370
|
-
|
|
371
|
-
**If `$FULL_MODE` (or table has Status column):**
|
|
372
|
-
```markdown
|
|
373
|
-
| ${next_num} | ${description_cell} | ${date} | ${commit_hash} | ${VERIFICATION_STATUS} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
|
|
368
|
+
```bash
|
|
369
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state quick-task --description "${description_cell}" --date "${date}" --commit "${commit_hash}" --status "${VERIFICATION_STATUS}" --directory "[${next_num}-${slug}](./quick/${next_num}-${slug}/)"
|
|
374
370
|
```
|
|
375
371
|
|
|
376
|
-
**If NOT `$FULL_MODE
|
|
377
|
-
```markdown
|
|
378
|
-
| ${next_num} | ${description_cell} | ${date} | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
|
|
379
|
-
```
|
|
372
|
+
**If NOT `$FULL_MODE`:** the same without `--status`.
|
|
380
373
|
|
|
381
|
-
|
|
374
|
+
Then the activity line:
|
|
382
375
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
**Last Activity:** ${date}
|
|
386
|
-
**Last Activity Description:** Completed quick task ${next_num}: ${description_cell}
|
|
376
|
+
```bash
|
|
377
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state patch --"Last Activity" "${date}" --"Last Activity Description" "Completed quick task ${next_num}: ${description_cell}"
|
|
387
378
|
```
|
|
388
379
|
|
|
389
|
-
|
|
380
|
+
Never edit state.md with the Edit tool (under `hooks.guard: enforce` the guard denies it).
|
|
390
381
|
|
|
391
382
|
---
|
|
392
383
|
|
|
@@ -72,6 +72,8 @@ This will:
|
|
|
72
72
|
Proceed? (y/n)
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
If an integer target has decimal phases inserted after it (`### Phase {target}.1:` and so on in roadmap.md, or `{target}.N-*` directories), name them in the summary and ask whether to remove them too. pan-tools refuses to remove the integer phase while they exist, because they would be left behind under a different phase's number.
|
|
76
|
+
|
|
75
77
|
Wait for confirmation.
|
|
76
78
|
</step>
|
|
77
79
|
|
|
@@ -88,6 +90,14 @@ If the phase has executed plans (summary.md files), pan-tools will error. Use `-
|
|
|
88
90
|
RESULT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs phase remove "${target}" --force)
|
|
89
91
|
```
|
|
90
92
|
|
|
93
|
+
If the phase has decimal phases, pan-tools errors and names them. Add `--with-decimals` only if the user confirmed removing them as well (each is checked for executed plans the same way, so `--force` still applies to them):
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
RESULT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs phase remove "${target}" --with-decimals)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Otherwise stop and report the decimals; the user can remove them one by one first.
|
|
100
|
+
|
|
91
101
|
The CLI handles:
|
|
92
102
|
- Deleting the phase directory
|
|
93
103
|
- Renumbering all subsequent directories (in reverse order to avoid conflicts)
|
|
@@ -95,7 +105,7 @@ The CLI handles:
|
|
|
95
105
|
- Updating roadmap.md (removing section, renumbering all phase references, updating dependencies)
|
|
96
106
|
- Updating state.md (decrementing phase count)
|
|
97
107
|
|
|
98
|
-
Extract from result: `removed`, `directory_deleted`, `renamed_directories`, `renamed_files`, `roadmap_updated`, `state_updated
|
|
108
|
+
Extract from result: `removed`, `directory_deleted`, `renamed_directories`, `renamed_files`, `roadmap_updated`, `state_updated`, and `removed_decimals` when `--with-decimals` removed any.
|
|
99
109
|
</step>
|
|
100
110
|
|
|
101
111
|
<step name="commit">
|
|
@@ -1,77 +1,155 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<objective>
|
|
2
|
+
Answer the open questions that block planning a phase (at most 5). Spawns one pan-phase-researcher agent with the questions and the phase context.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
</purpose>
|
|
4
|
+
**Note:** This is the standalone research mode. `/pan:plan-phase` researches only with `--research` or `workflow.research: true`.
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
**Use this command when:**
|
|
7
|
+
- You want to research without planning yet
|
|
8
|
+
- You want to re-research after planning is complete
|
|
9
|
+
- You need to investigate before deciding if a phase is feasible
|
|
10
|
+
|
|
11
|
+
**Orchestrator role:** Parse phase, validate against roadmap, check existing research, gather context, spawn researcher agent, present results.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
**Why subagent:** Searching burns context. A fresh context window answers the questions, at most 4 searches or fetches each; the main context stays lean for user interaction.
|
|
14
|
+
</objective>
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
<context>
|
|
17
|
+
Phase number: $ARGUMENTS (required)
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
Normalize phase input in step 1 before any directory lookups.
|
|
20
|
+
</context>
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
<process>
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
## 0. Initialize Context
|
|
19
25
|
|
|
20
26
|
```bash
|
|
21
|
-
|
|
27
|
+
INIT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs init phase-op "$ARGUMENTS")
|
|
22
28
|
```
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
Extract from init JSON: `phase_dir`, `padded_phase`, `phase_slug`, `phase_number`, `phase_name`, `phase_found`, `commit_docs`, `has_research`, `state_path`, `requirements_path`, `context_path`, `research_path`. `phase_dir` is null when the phase is in the roadmap but has no directory yet: create it (`mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"`) and use that path as `phase_dir`, as discuss-phase does.
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
Resolve researcher model:
|
|
33
|
+
```bash
|
|
34
|
+
RESEARCHER_MODEL=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs resolve-model pan-phase-researcher --raw)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 1. Validate Phase
|
|
27
38
|
|
|
28
39
|
```bash
|
|
29
|
-
|
|
40
|
+
PHASE_INFO=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs roadmap get-phase "${phase_number}")
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
If
|
|
43
|
+
**If `found` is false:** Error and exit. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
|
|
33
44
|
|
|
34
|
-
##
|
|
45
|
+
## 2. Check Existing Research
|
|
35
46
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
47
|
+
Use `has_research` and `research_path` from INIT.
|
|
48
|
+
|
|
49
|
+
**If exists:** Offer: 1) Update research, 2) View existing (`research_path`), 3) Skip. Wait for response.
|
|
50
|
+
|
|
51
|
+
**If doesn't exist:** Continue.
|
|
52
|
+
|
|
53
|
+
## 3. Gather Phase Context
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
Write this phase's roadmap slice (its section, its dependencies' goals and its requirement lines), then use paths from INIT (do not inline file contents in orchestrator context):
|
|
56
|
+
```bash
|
|
57
|
+
SLICE_PATH=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs roadmap slice "${phase_number}" --write --raw)
|
|
44
58
|
```
|
|
59
|
+
- `slice_path` (from the command above; `requirements_path` if it is empty)
|
|
60
|
+
- `context_path`
|
|
61
|
+
- `state_path`
|
|
62
|
+
|
|
63
|
+
Present summary with phase description and what files the researcher will load.
|
|
64
|
+
|
|
65
|
+
## 4. Write the Questions and Spawn pan-phase-researcher
|
|
45
66
|
|
|
46
|
-
|
|
67
|
+
Research answers questions; it does not survey the phase's domain. List at most **5** open questions the phase's requirements leave unanswered and that block building (a technology choice, an external API's behaviour, a data format, a limit or rule), as a numbered list in `{phase_dir}/{padded_phase}-research-questions.md`:
|
|
47
68
|
|
|
69
|
+
```markdown
|
|
70
|
+
# Phase {phase_number} research questions
|
|
71
|
+
|
|
72
|
+
1. [question] — blocks: [the task or decision it settles]
|
|
48
73
|
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
74
|
+
|
|
75
|
+
**No questions → no research.** If nothing blocks building, write no file, say `No open questions block Phase {phase_number} — research skipped`, and stop.
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
<objective>
|
|
79
|
+
Answer the research questions for Phase {phase_number}: {phase_name}, and nothing else.
|
|
52
80
|
</objective>
|
|
53
81
|
|
|
54
82
|
<files_to_read>
|
|
55
|
-
- {
|
|
56
|
-
- {slice_path} (This phase's roadmap and requirements
|
|
57
|
-
- {
|
|
83
|
+
- {phase_dir}/{padded_phase}-research-questions.md (The questions)
|
|
84
|
+
- {slice_path} (This phase's roadmap and requirements)
|
|
85
|
+
- {context_path} (Phase context from discuss-phase, if exists)
|
|
58
86
|
</files_to_read>
|
|
59
87
|
|
|
60
|
-
<additional_context>
|
|
61
|
-
Phase description: {description}
|
|
62
|
-
</additional_context>
|
|
63
|
-
|
|
64
88
|
<output>
|
|
65
89
|
Write to: {phase_dir}/{padded_phase}-research.md
|
|
66
|
-
|
|
90
|
+
One row per question: | # | Question | Answer | Source | Confidence | Decision it settles |, or `unknown — assume: …`. At most 4 searches or fetches per question. Anything that suggests new scope goes under ## Ideas (v2 candidates).
|
|
91
|
+
</output>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Task(
|
|
96
|
+
prompt=filled_prompt,
|
|
67
97
|
subagent_type="pan-phase-researcher",
|
|
68
|
-
model="{researcher_model}"
|
|
98
|
+
model="{researcher_model}",
|
|
99
|
+
description="Research Phase {phase}"
|
|
69
100
|
)
|
|
70
101
|
```
|
|
71
102
|
|
|
72
|
-
|
|
103
|
+
Then check the answers:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs research check "{phase_dir}/{padded_phase}-research-questions.md" "{phase_dir}/{padded_phase}-research.md"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Exit 1: send its `errors` to the researcher once as a revision. One revision at most; then proceed, with each question still unsourced recorded under `## Unknowns` in the research file with the assumption the plan uses.
|
|
110
|
+
|
|
111
|
+
## 5. Handle Agent Return
|
|
112
|
+
|
|
113
|
+
**`## RESEARCH COMPLETE`:** Display the decisions it settled and any unknowns, offer: Plan phase, Review full, Done.
|
|
114
|
+
|
|
115
|
+
**`## RESEARCH BLOCKED`:** Show the blocker and what was attempted, offer: Provide context (then spawn a continuation, step 6), Skip research, Abort.
|
|
116
|
+
|
|
117
|
+
## 6. Spawn Continuation Agent
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
<objective>
|
|
121
|
+
Continue research for Phase {phase_number}: {phase_name}
|
|
122
|
+
</objective>
|
|
123
|
+
|
|
124
|
+
<prior_state>
|
|
125
|
+
<files_to_read>
|
|
126
|
+
- {phase_dir}/{padded_phase}-research.md (Existing research)
|
|
127
|
+
</files_to_read>
|
|
128
|
+
</prior_state>
|
|
73
129
|
|
|
74
|
-
|
|
75
|
-
|
|
130
|
+
<checkpoint_response>
|
|
131
|
+
**Type:** {checkpoint_type}
|
|
132
|
+
**Response:** {user_response}
|
|
133
|
+
</checkpoint_response>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Task(
|
|
138
|
+
prompt=continuation_prompt,
|
|
139
|
+
subagent_type="pan-phase-researcher",
|
|
140
|
+
model="{researcher_model}",
|
|
141
|
+
description="Continue research Phase {phase}"
|
|
142
|
+
)
|
|
143
|
+
```
|
|
76
144
|
|
|
77
145
|
</process>
|
|
146
|
+
|
|
147
|
+
<success_criteria>
|
|
148
|
+
- [ ] Phase validated against roadmap
|
|
149
|
+
- [ ] Existing research checked
|
|
150
|
+
- [ ] At most 5 questions written (none: no research)
|
|
151
|
+
- [ ] One pan-phase-researcher spawned with the questions
|
|
152
|
+
- [ ] `research check` run, one revision at most
|
|
153
|
+
- [ ] Checkpoints handled correctly
|
|
154
|
+
- [ ] User knows next steps
|
|
155
|
+
</success_criteria>
|
|
@@ -138,6 +138,16 @@ Present complete project status to user:
|
|
|
138
138
|
</step>
|
|
139
139
|
|
|
140
140
|
<step name="determine_next_action">
|
|
141
|
+
An interrupted agent or a `.continue-here` checkpoint comes first (below). Otherwise ask the router:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
NEXT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs next-action)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
It returns `{action, phase, reason, command}`, read from roadmap.md and the phase directories by the same state machine the MCP `pan_next_action` tool uses, so progress, resume and transition never disagree about what comes next. `action` is one of `plan`, `execute`, `verify`, `complete_phase`, `plan_gaps`, `audit_milestone`, `new_milestone`, `new_project` or `stop`, and `command` is the command that carries it out.
|
|
148
|
+
|
|
149
|
+
Offer its `command` as the primary option.
|
|
150
|
+
|
|
141
151
|
Based on project state, determine the most logical next action:
|
|
142
152
|
|
|
143
153
|
**If interrupted agent exists:**
|
|
@@ -237,7 +247,7 @@ Based on user selection, route to appropriate workflow:
|
|
|
237
247
|
|
|
238
248
|
**Also available:**
|
|
239
249
|
- `/pan:discuss-phase [N]` — gather context first
|
|
240
|
-
- `/pan:
|
|
250
|
+
- `/pan:plan-phase --research-only [N]` — investigate unknowns
|
|
241
251
|
|
|
242
252
|
---
|
|
243
253
|
```
|
|
@@ -274,7 +284,13 @@ If state.md is missing but other artifacts exist:
|
|
|
274
284
|
4. Count pending todos in .planning/todos/pending/
|
|
275
285
|
5. Check for .continue-here files → Session continuity
|
|
276
286
|
|
|
277
|
-
Reconstruct
|
|
287
|
+
Reconstruct state.md through the engine, never with the Write tool:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state init --core-value "<from project.md>" --focus "<current phase name>" --phase <current phase> --phase-name "<its name>" --total-phases <N> --activity "Reconstructed from artifacts"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Then add what the summaries and todos hold, one section at a time: `state section "Decisions" --append "- [Phase X]: ..."`, `state section "Blockers/Concerns" --append "..."`, `state section "Pending Todos" --set "<N> pending"`. Proceed normally.
|
|
278
294
|
|
|
279
295
|
This handles cases where:
|
|
280
296
|
|
|
@@ -24,13 +24,14 @@ Creates `.planning/config.json` with defaults if missing and loads current confi
|
|
|
24
24
|
cat .planning/config.json
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Parse current values (when a key is absent, use PAN's default: `
|
|
28
|
-
- `workflow.research` — spawn researcher during plan-phase
|
|
27
|
+
Parse current values (when a key is absent, use PAN's default: `false` for research and nyquist_validation; `true` for plan_check and verifier):
|
|
28
|
+
- `workflow.research` — spawn researcher during plan-phase (off by default: research is opt-in, and when on it answers at most 5 open questions per phase)
|
|
29
29
|
- `workflow.plan_check` — spawn plan checker during plan-phase
|
|
30
30
|
- `workflow.verifier` — spawn verifier during execute-phase
|
|
31
31
|
- `workflow.nyquist_validation` — validation architecture research during plan-phase
|
|
32
|
-
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
33
|
-
- `routing.strategy` —
|
|
32
|
+
- `model_profile` — how much ceremony and which model each agent uses (default: `balanced`; `quality` keeps the full ceremony everywhere)
|
|
33
|
+
- `routing.strategy` — not asked here (default: `static`). The `complexity` strategy reaches no workflow, so offering it would be a choice that changes nothing; `config-set routing.strategy complexity` still sets it for `resolve-model --metadata` callers. A `quality` profile in an existing config keeps working: it is identical to `balanced`
|
|
34
|
+
- `cost.phase_budget_usd` — spend per phase PAN warns about, in API-equivalent dollars (default: `20`; `0` = off). It never stops a run
|
|
34
35
|
- `branching_strategy` — branching approach (default: `"none"`; a top-level key — a nested `git.branching_strategy` is ignored when the top-level key exists, as it does in every config `config-ensure-section` creates — write the top-level key)
|
|
35
36
|
</step>
|
|
36
37
|
|
|
@@ -44,18 +45,18 @@ AskUserQuestion([
|
|
|
44
45
|
header: "Model",
|
|
45
46
|
multiSelect: false,
|
|
46
47
|
options: [
|
|
47
|
-
{ label: "
|
|
48
|
-
{ label: "
|
|
49
|
-
{ label: "Budget", description: "mid tier for writing
|
|
48
|
+
{ label: "Balanced (Recommended)", description: "right-sized: a small, well-specified phase or quick task skips research and the planner/checker loop; plan-checker and researchers on the mid tier; one plan revision" },
|
|
49
|
+
{ label: "Quality", description: "the full ceremony on every piece of work, every agent on the reasoning tier (the behaviour before right-sizing; costs several times more)" },
|
|
50
|
+
{ label: "Budget", description: "right-sized like balanced, plus mid tier for writing and fast tier for research/verification (lowest cost)" }
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
|
-
question: "Spawn Plan Researcher? (
|
|
54
|
+
question: "Spawn Plan Researcher? (off by default; answers up to 5 open questions before planning)",
|
|
54
55
|
header: "Research",
|
|
55
56
|
multiSelect: false,
|
|
56
57
|
options: [
|
|
57
|
-
{ label: "
|
|
58
|
-
{ label: "
|
|
58
|
+
{ label: "No (default)", description: "Plan directly from requirements; /pan:plan-phase N --research researches one phase" },
|
|
59
|
+
{ label: "Yes", description: "Before each phase, answer up to 5 open questions that block building, each with a source" }
|
|
59
60
|
]
|
|
60
61
|
},
|
|
61
62
|
{
|
|
@@ -75,7 +76,14 @@ AskUserQuestion([
|
|
|
75
76
|
{ label: "Yes", description: "Verify must-haves after execution" },
|
|
76
77
|
{ label: "No", description: "Skip post-execution verification" }
|
|
77
78
|
]
|
|
78
|
-
}
|
|
79
|
+
}
|
|
80
|
+
])
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then the next batch (the host takes at most four questions per call):
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
AskUserQuestion([
|
|
79
87
|
{
|
|
80
88
|
question: "Auto-advance pipeline? (discuss → plan → execute automatically)",
|
|
81
89
|
header: "Auto",
|
|
@@ -105,30 +113,35 @@ AskUserQuestion([
|
|
|
105
113
|
]
|
|
106
114
|
},
|
|
107
115
|
{
|
|
108
|
-
question: "
|
|
109
|
-
header: "
|
|
116
|
+
question: "Warn when a phase's spend passes how much? (API-equivalent dollars; warns only, never stops)",
|
|
117
|
+
header: "Phase budget",
|
|
110
118
|
multiSelect: false,
|
|
111
119
|
options: [
|
|
112
|
-
{ label: "
|
|
113
|
-
{ label: "
|
|
120
|
+
{ label: "$20 per phase (Recommended)", description: "Warn at $16 (80%) and again once a phase passes $20" },
|
|
121
|
+
{ label: "$50 per phase", description: "For larger phases or the quality profile" },
|
|
122
|
+
{ label: "$10 per phase", description: "For small phases or the budget profile" },
|
|
123
|
+
{ label: "Off", description: "No spend warnings; /pan:cost still reports spend" }
|
|
114
124
|
]
|
|
115
125
|
}
|
|
116
126
|
])
|
|
117
127
|
```
|
|
128
|
+
|
|
129
|
+
A dollar amount typed under Other is used as given.
|
|
130
|
+
```
|
|
118
131
|
</step>
|
|
119
132
|
|
|
120
133
|
<step name="update_config">
|
|
121
134
|
Write each answer with `config-set`, which keeps every other key in the `workflow` and `routing` objects:
|
|
122
135
|
|
|
123
136
|
```bash
|
|
124
|
-
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set model_profile <quality|
|
|
137
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set model_profile <balanced|quality|budget>
|
|
125
138
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set workflow.research <true|false>
|
|
126
139
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set workflow.plan_check <true|false>
|
|
127
140
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set workflow.verifier <true|false>
|
|
128
141
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set workflow.auto_advance <true|false>
|
|
129
142
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set workflow.nyquist_validation <true|false>
|
|
130
143
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set branching_strategy <none|phase|milestone>
|
|
131
|
-
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set
|
|
144
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs config-set cost.phase_budget_usd <20|50|10|0|amount>
|
|
132
145
|
```
|
|
133
146
|
</step>
|
|
134
147
|
|
|
@@ -194,13 +207,14 @@ Display:
|
|
|
194
207
|
| Nyquist Validation | {On/Off} |
|
|
195
208
|
| Git Branching | {None/Per Phase/Per Milestone} |
|
|
196
209
|
| Routing Strategy | {Static/Complexity} |
|
|
210
|
+
| Phase Budget | {$N per phase (warn only)/Off} |
|
|
197
211
|
| Saved as Defaults | {Yes/No} |
|
|
198
212
|
|
|
199
213
|
These settings apply to future /pan:plan-phase and /pan:exec-phase runs.
|
|
200
214
|
|
|
201
215
|
Quick commands:
|
|
202
|
-
- /pan:profile <profile> — switch model profile
|
|
203
|
-
- /pan:plan-phase --research —
|
|
216
|
+
- /pan:settings --profile <profile> — switch model profile
|
|
217
|
+
- /pan:plan-phase --research — research one phase (up to 5 open questions)
|
|
204
218
|
- /pan:plan-phase --skip-research — skip research
|
|
205
219
|
- /pan:plan-phase --skip-verify — skip plan check
|
|
206
220
|
```
|
|
@@ -129,7 +129,7 @@ Use AskUserQuestion:
|
|
|
129
129
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs todo complete "[filename]"
|
|
130
130
|
```
|
|
131
131
|
This moves it out of `.planning/todos/pending/` (the directory `init todos` and `/pan:progress` count) into `.planning/todos/completed/` with a `completed:` date.
|
|
132
|
-
Update state.md
|
|
132
|
+
Update the todo count in state.md (the `update_state` step). Present problem/solution context. Begin work or ask how to proceed.
|
|
133
133
|
|
|
134
134
|
**Add to phase plan:**
|
|
135
135
|
Note todo reference in phase planning notes. Keep in pending. Return to list or exit.
|
|
@@ -148,7 +148,11 @@ Return to list_todos step.
|
|
|
148
148
|
<step name="update_state">
|
|
149
149
|
After any action that changes todo count:
|
|
150
150
|
|
|
151
|
-
Re-run `init todos` to get updated count, then
|
|
151
|
+
Re-run `init todos` to get the updated count, then set state.md's "### Pending Todos" section through the engine:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state section "Pending Todos" --set "{count} pending — /pan:todo-check to review"
|
|
155
|
+
```
|
|
152
156
|
</step>
|
|
153
157
|
|
|
154
158
|
<step name="git_commit">
|
|
@@ -25,7 +25,7 @@ Mark current phase complete and advance to next. This is the natural point where
|
|
|
25
25
|
**Required pattern from v3.7.5 onward:**
|
|
26
26
|
|
|
27
27
|
1. Run the steps below to *plan* each state.md update, but **do not write or commit** between them. Hold the changes in memory.
|
|
28
|
-
2. After `update_session_continuity_after_transition` (the last state.md-touching step before `offer_next_phase`),
|
|
28
|
+
2. After `update_session_continuity_after_transition` (the last state.md-touching step before `offer_next_phase`), make a **single `pan-tools state apply` call** that applies all four section updates in one write (Project Reference, Accumulated Context, Session Continuity, plus the progress bar from `update_current_position_after_transition`).
|
|
29
29
|
3. Then issue **one** commit:
|
|
30
30
|
```bash
|
|
31
31
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "docs(transition): phase ${current_phase} → ${next_phase} (state, progress, context)"
|
|
@@ -34,6 +34,14 @@ Mark current phase complete and advance to next. This is the natural point where
|
|
|
34
34
|
|
|
35
35
|
Net result per transition: 2 commits instead of 5. Reduces git noise and keeps `/pan:learn` overhead metrics (commits_per_minute) honest. Substantive content of each step below is unchanged — only the **timing of the write** changes.
|
|
36
36
|
|
|
37
|
+
The batched call, with the values the steps below planned (fields are bold `**Name:**` lines; a section is appended to or replaced):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state apply --json '{"fields": {"Progress": "<bar from progress bar --raw>", "Current focus": "<next phase name>", "Core value": "<current core value>", "Last session": "<YYYY-MM-DD HH:MM>", "Resume File": "None"}, "sections": {"Decisions": {"append": ["- [Phase X]: <decision>"]}, "Blockers/Concerns": {"set": "<the reviewed list>"}}}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It reports any field it could not find in `failed`. Never edit state.md with the Edit tool: the engine keeps the frontmatter in sync, and under `hooks.guard: enforce` the guard denies a direct write.
|
|
44
|
+
|
|
37
45
|
</state_write_policy>
|
|
38
46
|
|
|
39
47
|
<process>
|
|
@@ -355,7 +363,7 @@ Update Session Continuity section in state.md to reflect transition completion.
|
|
|
355
363
|
node ~/.claude/pan-wizard-core/bin/pan-tools.cjs state update "Stopped at" "Phase ${current_phase} complete, ready to plan Phase ${next_phase}"
|
|
356
364
|
```
|
|
357
365
|
|
|
358
|
-
Then
|
|
366
|
+
Then fold the other two lines into the batched `state apply` call at the end of the workflow (P-1604):
|
|
359
367
|
|
|
360
368
|
**Format:**
|
|
361
369
|
|
|
@@ -387,6 +395,16 @@ The `is_last_phase` field from the phase complete result tells you directly:
|
|
|
387
395
|
|
|
388
396
|
The `next_phase` and `next_phase_name` fields give you the next phase details.
|
|
389
397
|
|
|
398
|
+
To name the next command, ask the router after `phase complete`:
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
NEXT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs next-action)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
It returns `{action, phase, reason, command}`, read from roadmap.md and the phase directories by the same state machine the MCP `pan_next_action` tool uses, so progress, resume and transition never disagree about what comes next. `action` is one of `plan`, `execute`, `verify`, `complete_phase`, `plan_gaps`, `audit_milestone`, `new_milestone`, `new_project` or `stop`, and `command` is the command that carries it out.
|
|
405
|
+
|
|
406
|
+
For the next phase it returns `plan` (or `execute` when the phase is already planned); at the milestone boundary it returns `audit_milestone`.
|
|
407
|
+
|
|
390
408
|
If you need additional context, use:
|
|
391
409
|
```bash
|
|
392
410
|
ROADMAP=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs roadmap analyze)
|
|
@@ -530,7 +548,7 @@ Task(
|
|
|
530
548
|
|
|
531
549
|
**Also available:**
|
|
532
550
|
- `/pan:plan-phase [X+1]` — skip discussion, plan directly
|
|
533
|
-
- `/pan:
|
|
551
|
+
- `/pan:plan-phase --research-only [X+1]` — investigate unknowns
|
|
534
552
|
|
|
535
553
|
---
|
|
536
554
|
```
|
|
@@ -555,7 +573,7 @@ Task(
|
|
|
555
573
|
|
|
556
574
|
**Also available:**
|
|
557
575
|
- `/pan:discuss-phase [X+1]` — revisit context
|
|
558
|
-
- `/pan:
|
|
576
|
+
- `/pan:plan-phase --research-only [X+1]` — investigate unknowns
|
|
559
577
|
|
|
560
578
|
---
|
|
561
579
|
```
|