pan-wizard 3.36.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 +36 -48
- 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 +1 -2
- package/agents/pan-document_code.md +1 -2
- package/agents/pan-hardener.md +2 -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 +79 -488
- package/agents/pan-plan-checker.md +12 -2
- package/agents/pan-planner.md +10 -6
- package/agents/pan-previewer.md +1 -2
- package/agents/pan-project-researcher.md +70 -499
- package/agents/pan-release.md +1 -1
- package/agents/pan-reviewer.md +9 -3
- package/agents/pan-roadmapper.md +12 -7
- package/agents/pan-verifier.md +7 -2
- 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/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/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 +31 -2
- package/pan-wizard-core/bin/lib/constants.cjs +27 -1
- package/pan-wizard-core/bin/lib/core.cjs +22 -10
- package/pan-wizard-core/bin/lib/cost.cjs +14 -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/failure-class.cjs +81 -0
- package/pan-wizard-core/bin/lib/findings.cjs +34 -4
- package/pan-wizard-core/bin/lib/focus.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 +16 -5
- 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.cjs +48 -4
- package/pan-wizard-core/bin/lib/plan-lint.cjs +150 -1
- package/pan-wizard-core/bin/lib/preview.cjs +23 -4
- package/pan-wizard-core/bin/lib/requirements-lint.cjs +130 -0
- package/pan-wizard-core/bin/lib/research-lint.cjs +150 -3
- 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/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/uat.cjs +149 -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 +37 -1
- package/pan-wizard-core/bin/lib/verify-retro.cjs +3 -2
- package/pan-wizard-core/bin/lib/verify.cjs +59 -4
- package/pan-wizard-core/bin/lib/worktree.cjs +70 -0
- package/pan-wizard-core/bin/pan-tools.cjs +168 -27
- package/pan-wizard-core/learnings/universal/autonomous-loop.md +2 -2
- package/pan-wizard-core/references/continuation-format.md +3 -3
- package/pan-wizard-core/references/guardrails.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 +5 -1
- package/pan-wizard-core/templates/debug.md +1 -0
- package/pan-wizard-core/templates/discovery.md +2 -2
- package/pan-wizard-core/templates/requirements.md +9 -0
- 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 +36 -8
- 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 +31 -53
- 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 +86 -43
- 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/research-phase.md +118 -40
- package/pan-wizard-core/workflows/resume-project.md +18 -2
- package/pan-wizard-core/workflows/settings.md +21 -24
- 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 +2 -2
- package/scripts/build-agent-plugin.js +35 -15
- 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/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 +9 -2
- 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 -210
- package/pan-wizard-core/templates/research-project/features.md +0 -153
- package/pan-wizard-core/templates/research-project/pitfalls.md +0 -206
- package/pan-wizard-core/templates/research-project/stack.md +0 -126
- package/pan-wizard-core/templates/research-project/summary.md +0 -170
package/docs/EXAMPLES.md
ADDED
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
# PAN Wizard -- Worked Examples
|
|
2
|
+
|
|
3
|
+
Realistic command sequences showing common PAN Wizard workflows. Each example
|
|
4
|
+
shows what you type, what PAN does behind the scenes, and what to expect.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Example 1: New Project from Scratch (Full Lifecycle)
|
|
9
|
+
|
|
10
|
+
A solo developer building a CLI task manager from zero.
|
|
11
|
+
|
|
12
|
+
### Step 1 -- Initialize the project
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
/pan:new-project
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
PAN asks a series of scoping questions: what you are building, who it is for,
|
|
19
|
+
tech stack preferences, deployment targets, and rough scope. Answer
|
|
20
|
+
conversationally -- PAN extracts structure from your responses.
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
PAN: What are you building?
|
|
24
|
+
You: A CLI task manager called "doto". It stores tasks in a local SQLite
|
|
25
|
+
database, supports priorities, due dates, and tags. Written in Python.
|
|
26
|
+
|
|
27
|
+
PAN: Who is the primary audience?
|
|
28
|
+
You: Developers who live in the terminal.
|
|
29
|
+
|
|
30
|
+
PAN: Any technical constraints?
|
|
31
|
+
You: Python 3.10+, no external service dependencies, single-file DB.
|
|
32
|
+
Ship as a pip-installable package.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
When the conversation is complete PAN creates:
|
|
36
|
+
|
|
37
|
+
- `.planning/project.md` -- vision and goals
|
|
38
|
+
- `.planning/requirements.md` -- scoped functional and non-functional requirements
|
|
39
|
+
- `.planning/roadmap.md` -- phased delivery plan (e.g., Phase 1: Core CRUD,
|
|
40
|
+
Phase 2: Filtering & Tags, Phase 3: Packaging & Docs)
|
|
41
|
+
|
|
42
|
+
### Step 2 -- Discuss implementation preferences for Phase 1
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
/pan:discuss-phase 1
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
PAN picks the gray areas of Phase 1 that would change what you get, such as
|
|
49
|
+
output format, flag design and error handling, and asks about those. It does not
|
|
50
|
+
ask about technical choices like the database schema or the CLI library; planning
|
|
51
|
+
(and research, when you ask for it) settles those unless you state a preference. Your answers are
|
|
52
|
+
recorded in `.planning/phases/01-{name}/01-context.md` as decisions.
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
PAN: How should the commands and their flags look?
|
|
56
|
+
You: Subcommands (doto add, doto list, doto done), each with its own --help. Use Typer.
|
|
57
|
+
|
|
58
|
+
PAN: How should tasks be displayed?
|
|
59
|
+
You: Rich tables for list view, plain text for single-task view.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Step 3 -- Plan Phase 1
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
/pan:plan-phase 1
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A planner agent turns the phase's requirements and your context decisions
|
|
69
|
+
into a concrete plan (research is opt-in: with `--research`, a researcher first
|
|
70
|
+
answers at most five open questions that block building, such as which Typer
|
|
71
|
+
pattern to use, each with a source), with a `## Review Focus` section
|
|
72
|
+
naming the untested inputs the reviewer should check. Code checks
|
|
73
|
+
(`verify plan-set`, `verify review-focus`, `verify decisions`) send a broken
|
|
74
|
+
plan set back first; a plan-checker agent then reviews the plan for gaps,
|
|
75
|
+
contradictions, and missing edge cases (one revision round by default; two
|
|
76
|
+
under the `quality` profile or `--quality`). A phase whose requirements each
|
|
77
|
+
say precisely what to build skips both agents: the engine writes one task per
|
|
78
|
+
requirement and checks the plans in code.
|
|
79
|
+
|
|
80
|
+
Result: `.planning/phases/01-{name}/01-01-plan.md` (and additional plans) containing ordered implementation steps,
|
|
81
|
+
file-by-file change descriptions, and dependency notes.
|
|
82
|
+
|
|
83
|
+
### Step 4 -- Execute Phase 1
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
/pan:exec-phase 1
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
PAN reads the phase's plans and groups independent plans into parallel waves. Wave 1
|
|
90
|
+
might create the project skeleton and database module simultaneously. Wave 2
|
|
91
|
+
builds the CLI commands that depend on both. Each wave completes and its summaries are
|
|
92
|
+
spot-checked before the next begins. After the last wave, `pan-reviewer` reviews the
|
|
93
|
+
phase's diff against the plans' intent (`pan-tools review scope`), including any concerns
|
|
94
|
+
an executor returned with `DONE_WITH_CONCERNS`, and the verifier checks the phase
|
|
95
|
+
(unless `workflow.verifier` is off). Finally the phase gate decides whether the phase
|
|
96
|
+
is marked complete: by default it refuses while a plan has no summary, the
|
|
97
|
+
verification is missing or failing, or a critical or high finding is open, and
|
|
98
|
+
lists each reason (`pan-tools phase gate 1` runs the same check).
|
|
99
|
+
|
|
100
|
+
You see real-time progress as files are created and tests are run. Once the
|
|
101
|
+
phase's spend reaches 80% of the phase budget (`cost.phase_budget_usd`, $20 by
|
|
102
|
+
default), the wave report says so; it is a warning, and the run continues.
|
|
103
|
+
|
|
104
|
+
### Step 5 -- Verify the work
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
/pan:verify-phase 1
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
PAN re-runs goal-backward verification with a test-suite gate and writes
|
|
111
|
+
`.planning/phases/01-{name}/01-verification.md`. If it reports `gaps_found`,
|
|
112
|
+
run `/pan:plan-phase 1 --gaps` to plan the fixes, then `/pan:exec-phase 1 --gaps-only` to execute them.
|
|
113
|
+
Manual acceptance testing (for example `doto add 'Buy milk' --priority high`
|
|
114
|
+
followed by `doto list`) is yours to run: `/pan:verify-phase 1 --uat` walks you
|
|
115
|
+
through it one test at a time on any runtime, records each answer in
|
|
116
|
+
`01-uat.md` through `pan-tools uat record`, and diagnoses the issues you
|
|
117
|
+
report for `/pan:plan-phase 1 --gaps`.
|
|
118
|
+
|
|
119
|
+
### Step 6 -- Continue through the remaining phases
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
/pan:discuss-phase 2
|
|
123
|
+
/pan:plan-phase 2
|
|
124
|
+
/pan:exec-phase 2
|
|
125
|
+
/pan:verify-phase 2
|
|
126
|
+
|
|
127
|
+
/pan:discuss-phase 3
|
|
128
|
+
/pan:plan-phase 3
|
|
129
|
+
/pan:exec-phase 3
|
|
130
|
+
/pan:verify-phase 3
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Repeat the cycle for Phase 2 (Filtering & Tags) and Phase 3 (Packaging & Docs).
|
|
134
|
+
Each phase builds on the verified output of the previous one.
|
|
135
|
+
|
|
136
|
+
### Step 7 -- Complete the milestone
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
/pan:milestone-done 0.1.0
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Once all three phases are verified, `/pan:milestone-done 0.1.0` archives the
|
|
143
|
+
milestone's roadmap and requirements to `.planning/milestones/`, tags the release (`v0.1.0`), and updates
|
|
144
|
+
`.planning/roadmap.md` to mark the milestone complete.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Example 2: Adding Features to an Existing Codebase
|
|
149
|
+
|
|
150
|
+
You have a Django web app and want to add a REST API layer.
|
|
151
|
+
|
|
152
|
+
### Step 1 -- Map the existing codebase
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
/pan:map-codebase
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
PAN maps the repository — one agent for a small repo, parallel mappers sharded by focus
|
|
159
|
+
area for a large one. They
|
|
160
|
+
catalog models, views, URL patterns, middleware, settings, test structure,
|
|
161
|
+
dependency versions, module relationships, and best practices. The output is
|
|
162
|
+
a structured understanding of what already exists, stored so that subsequent
|
|
163
|
+
commands have full context.
|
|
164
|
+
|
|
165
|
+
This matters because without mapping, PAN would ask generic questions during
|
|
166
|
+
project setup. With mapping, it already knows your models, your auth setup,
|
|
167
|
+
and your existing test patterns.
|
|
168
|
+
|
|
169
|
+
### Step 2 -- Initialize the API project
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
/pan:new-project
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Because the codebase has been mapped, PAN tailors its questions to the
|
|
176
|
+
brownfield scenario:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
PAN: I see a Django 4.2 app with 12 models and session-based auth.
|
|
180
|
+
What do you want to add?
|
|
181
|
+
You: A REST API using Django REST Framework. Token auth for external
|
|
182
|
+
clients, session auth for the existing frontend.
|
|
183
|
+
|
|
184
|
+
PAN: Which models need API endpoints?
|
|
185
|
+
You: All of them except AuditLog and AdminConfig.
|
|
186
|
+
|
|
187
|
+
PAN: Any versioning strategy?
|
|
188
|
+
You: URL-based: /api/v1/
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
PAN generates requirements and a roadmap that reference your actual models
|
|
192
|
+
by name and account for your existing URL structure.
|
|
193
|
+
|
|
194
|
+
### Step 3 -- Plan and execute
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
/pan:discuss-phase 1
|
|
198
|
+
/pan:plan-phase 1
|
|
199
|
+
/pan:exec-phase 1
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The plan references real files in your codebase. Execution modifies existing
|
|
203
|
+
files (adding serializers, viewsets, URL includes) rather than generating
|
|
204
|
+
everything from scratch. Tests are written to match your existing test style.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Example 3: Quick Bug Fix
|
|
209
|
+
|
|
210
|
+
A user reports that dates are displayed in UTC instead of local time.
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
/pan:quick
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
PAN: What do you need?
|
|
218
|
+
You: The task list shows due dates in UTC. They should display in the
|
|
219
|
+
user's local timezone. The relevant code is in src/display.py.
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
PAN reads the file, identifies the formatting call, applies the fix, and
|
|
223
|
+
runs existing tests. No research phase, plan checker or verifier (the test run is the check) -- a short plan and summary go to `.planning/quick/` -- just a focused
|
|
224
|
+
change with verification.
|
|
225
|
+
|
|
226
|
+
```text
|
|
227
|
+
PAN: Fixed. Changed `task.due_date.strftime(...)` to
|
|
228
|
+
`task.due_date.astimezone(tz.tzlocal()).strftime(...)` in
|
|
229
|
+
src/display.py:47. All 23 tests pass.
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
For larger ad-hoc work, use `--full` to add a plan-checker pass (max 2
|
|
233
|
+
iterations) and post-execution verification without the full phase ceremony:
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
/pan:quick --full
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
You: Add CSV export to the task list command.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
PAN plans the implementation, has the plan checked, executes it, and
|
|
244
|
+
verifies -- all in one flow, without research and without creating a formal phase.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Example 4: Resuming After a Break
|
|
249
|
+
|
|
250
|
+
You stopped mid-session yesterday. Today you open the project and cannot
|
|
251
|
+
remember where you left off.
|
|
252
|
+
|
|
253
|
+
### Check current state
|
|
254
|
+
|
|
255
|
+
```text
|
|
256
|
+
/pan:progress
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
PAN reads `.planning/state.md` and `.planning/roadmap.md` and prints a
|
|
260
|
+
summary:
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
# doto
|
|
264
|
+
|
|
265
|
+
**Progress:** [█████████████████░░░] 5/6 plans (83%)
|
|
266
|
+
**Profile:** balanced
|
|
267
|
+
|
|
268
|
+
## Recent Work
|
|
269
|
+
- [Phase 2, Plan 1]: tags stored with each task, `doto add --tag`
|
|
270
|
+
- [Phase 2, Plan 2]: tag filtering on `doto list`
|
|
271
|
+
|
|
272
|
+
## Current Position
|
|
273
|
+
Phase 2 of 3: Filtering & Tags
|
|
274
|
+
Plan 3 of 3: not started
|
|
275
|
+
CONTEXT: ✓
|
|
276
|
+
|
|
277
|
+
## ▶ Next Up
|
|
278
|
+
|
|
279
|
+
**02-03: Date filtering** — date-range filtering and the `doto filter` subcommand
|
|
280
|
+
|
|
281
|
+
`/pan:exec-phase 2`
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Restore full context
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
/pan:resume
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
PAN reloads project context, phase plan, decisions from discussion, and the
|
|
291
|
+
execution state. It reconstructs what has been built, what remains, and any
|
|
292
|
+
blockers noted in `state.md`. You are back to full working context without
|
|
293
|
+
re-reading anything yourself.
|
|
294
|
+
|
|
295
|
+
```text
|
|
296
|
+
PAN: Context restored. Phase 2 execution is at wave 3 of 3.
|
|
297
|
+
Remaining work: date-range filtering and the `doto filter` subcommand.
|
|
298
|
+
Ready to continue with /pan:exec-phase 2
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Saving state before stopping
|
|
302
|
+
|
|
303
|
+
When you need to stop mid-session:
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
/pan:pause
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
PAN writes current progress, open decisions, and any partial work notes to
|
|
310
|
+
a `.continue-here.md` handoff file in the active phase directory so that
|
|
311
|
+
`/pan:resume` can pick up cleanly next time.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Example 5: Cost-Conscious Development
|
|
316
|
+
|
|
317
|
+
You are working on a side project and want to minimize token usage.
|
|
318
|
+
|
|
319
|
+
### Switch to the budget profile
|
|
320
|
+
|
|
321
|
+
```text
|
|
322
|
+
/pan:settings --profile budget
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
This configures PAN to use cheaper models for research, planning and code-writing agents.
|
|
326
|
+
The orchestrator keeps the model you launched the session with, but the
|
|
327
|
+
parallel sub-agents use lighter ones.
|
|
328
|
+
|
|
329
|
+
### Disable optional stages
|
|
330
|
+
|
|
331
|
+
```text
|
|
332
|
+
/pan:settings
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
```text
|
|
336
|
+
PAN: Which model profile for agents?
|
|
337
|
+
You: Budget
|
|
338
|
+
PAN: Spawn Plan Researcher? (off by default; answers up to 5 open questions before planning)
|
|
339
|
+
You: No
|
|
340
|
+
PAN: Spawn Plan Checker? (verifies plans before execution)
|
|
341
|
+
You: No
|
|
342
|
+
PAN: Spawn Execution Verifier? (verifies phase completion)
|
|
343
|
+
You: Yes
|
|
344
|
+
(auto-advance, Nyquist, branching and phase-budget questions follow, each with your current value pre-selected)
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
With these off (research is already off by default), `plan-phase` skips the researcher agent and the
|
|
348
|
+
plan-checker agent (the code checks on the plans still run; they cost no model call). Planning still happens, but it relies on the model's
|
|
349
|
+
built-in knowledge instead of dedicated research passes.
|
|
350
|
+
|
|
351
|
+
**Token savings:** A typical phase with research and plan-check might use
|
|
352
|
+
80-120k tokens across the sub-agents. Disabling both reduces `plan-phase`
|
|
353
|
+
to roughly 15-25k tokens -- a 70-80% reduction.
|
|
354
|
+
|
|
355
|
+
### The workflow is identical
|
|
356
|
+
|
|
357
|
+
```text
|
|
358
|
+
/pan:discuss-phase 1
|
|
359
|
+
/pan:plan-phase 1 # faster, cheaper -- no research or plan-check
|
|
360
|
+
/pan:exec-phase 1
|
|
361
|
+
/pan:verify-phase 1
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
The same commands, the same file structure, just fewer agent spawns. You can
|
|
365
|
+
re-enable research for complex phases and disable it for straightforward ones.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Example 6: Multi-Phase with Scope Changes
|
|
370
|
+
|
|
371
|
+
You are three phases into a project when priorities shift.
|
|
372
|
+
|
|
373
|
+
### Original roadmap
|
|
374
|
+
|
|
375
|
+
```text
|
|
376
|
+
Phase 1: User authentication [complete]
|
|
377
|
+
Phase 2: Dashboard [complete]
|
|
378
|
+
Phase 3: Reporting [in progress]
|
|
379
|
+
Phase 4: Notifications [pending]
|
|
380
|
+
Phase 5: Admin panel [pending]
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Urgent work arrives mid-project
|
|
384
|
+
|
|
385
|
+
The team needs a webhook integration before the next demo. Insert it as a
|
|
386
|
+
new phase:
|
|
387
|
+
|
|
388
|
+
```text
|
|
389
|
+
/pan:insert-phase 3 "Webhook Integration"
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
The first argument is the phase to insert *after*. PAN uses decimal numbering
|
|
393
|
+
and never renumbers existing phases: it inserts `Phase 3.1: Webhook Integration`
|
|
394
|
+
right after Phase 3. Notifications stays at 4, Admin Panel stays at 5 — every
|
|
395
|
+
existing phase number is preserved. The roadmap updates:
|
|
396
|
+
|
|
397
|
+
```text
|
|
398
|
+
Phase 1: User authentication [complete]
|
|
399
|
+
Phase 2: Dashboard [complete]
|
|
400
|
+
Phase 3: Reporting [in progress]
|
|
401
|
+
Phase 3.1: Webhook Integration [pending] <-- inserted (URGENT)
|
|
402
|
+
Phase 4: Notifications [pending]
|
|
403
|
+
Phase 5: Admin panel [pending]
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Descoping work that is no longer needed
|
|
407
|
+
|
|
408
|
+
The admin panel has been deprioritized indefinitely:
|
|
409
|
+
|
|
410
|
+
```text
|
|
411
|
+
/pan:remove-phase 5
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```text
|
|
415
|
+
Phase 1: User authentication [complete]
|
|
416
|
+
Phase 2: Dashboard [complete]
|
|
417
|
+
Phase 3: Reporting [in progress]
|
|
418
|
+
Phase 3.1: Webhook Integration [pending]
|
|
419
|
+
Phase 4: Notifications [pending]
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
The roadmap stays clean, phase numbers stay sequential, and all state
|
|
423
|
+
references update automatically.
|
|
424
|
+
|
|
425
|
+
### Continue normally
|
|
426
|
+
|
|
427
|
+
```text
|
|
428
|
+
/pan:exec-phase 3 # finish current work
|
|
429
|
+
/pan:verify-phase 3
|
|
430
|
+
/pan:discuss-phase 3.1 # move to the inserted phase
|
|
431
|
+
/pan:plan-phase 3.1
|
|
432
|
+
/pan:exec-phase 3.1
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Example 7: From PRD to Code (--auto Mode)
|
|
438
|
+
|
|
439
|
+
You have a product requirements document and want PAN to initialize the
|
|
440
|
+
project without an interactive Q&A session.
|
|
441
|
+
|
|
442
|
+
### Prepare your PRD
|
|
443
|
+
|
|
444
|
+
Your file `prd.md` contains:
|
|
445
|
+
|
|
446
|
+
```markdown
|
|
447
|
+
# Doto -- CLI Task Manager
|
|
448
|
+
|
|
449
|
+
## Overview
|
|
450
|
+
A terminal-based task manager for developers. SQLite storage,
|
|
451
|
+
pip-installable, Python 3.10+.
|
|
452
|
+
|
|
453
|
+
## Features
|
|
454
|
+
- Add, edit, delete, complete tasks
|
|
455
|
+
- Priority levels (low, medium, high, critical)
|
|
456
|
+
- Due dates with local timezone display
|
|
457
|
+
- Tag-based organization
|
|
458
|
+
- Rich table output for list views
|
|
459
|
+
- CSV and JSON export
|
|
460
|
+
|
|
461
|
+
## Technical Decisions
|
|
462
|
+
- CLI framework: Typer
|
|
463
|
+
- Database: SQLite via sqlite3 stdlib
|
|
464
|
+
- Output: Rich library for tables
|
|
465
|
+
- Packaging: setuptools with pyproject.toml
|
|
466
|
+
|
|
467
|
+
## Non-Functional Requirements
|
|
468
|
+
- Sub-100ms response for all commands
|
|
469
|
+
- Database migrations via simple version table
|
|
470
|
+
- 90%+ test coverage target
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Run automated initialization
|
|
474
|
+
|
|
475
|
+
```text
|
|
476
|
+
/pan:new-project --auto @prd.md
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
PAN reads the PRD, extracts goals, requirements, constraints, and technical
|
|
480
|
+
decisions. Instead of asking you questions, it generates all planning
|
|
481
|
+
artifacts directly (research only with `--research` or idea frontmatter `research_enabled: true`):
|
|
482
|
+
|
|
483
|
+
```text
|
|
484
|
+
PAN: Read prd.md (847 tokens). Extracting project structure...
|
|
485
|
+
|
|
486
|
+
Created:
|
|
487
|
+
.planning/project.md -- vision and goals from PRD
|
|
488
|
+
.planning/requirements.md -- 14 functional, 3 non-functional requirements
|
|
489
|
+
.planning/roadmap.md -- 3 phases: Core CRUD, Organization & Export,
|
|
490
|
+
Packaging & Polish
|
|
491
|
+
.planning/config.json -- default configuration
|
|
492
|
+
|
|
493
|
+
AUTO-ADVANCING → DISCUSS PHASE 1
|
|
494
|
+
(runs /pan:discuss-phase 1 --auto, which chains plan → execute for phase 1)
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### Continue with the next phase
|
|
498
|
+
|
|
499
|
+
`--auto` does not stop at the roadmap: `/pan:new-project` sets `workflow.auto_advance: true` and runs `/pan:discuss-phase 1 --auto`, which chains planning, execution and verification of phase 1 and then prints the next command (plan-phase runs exec-phase with `--no-transition`, so the chain ends at the phase boundary). When the session then tries to end, PAN's stop guard (Claude Code, Codex, Copilot CLI, Gemini CLI) blocks that stop once, because autonomy is armed and roadmap phases remain, and tells the agent to run the next phase; set `workflow.stop_guard: false` in `.planning/config.json` to stop at each phase instead. To continue by hand:
|
|
500
|
+
|
|
501
|
+
```text
|
|
502
|
+
/pan:discuss-phase 2 --auto # the next phase, chained the same way
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
The `--auto` flag on `discuss-phase` and `plan-phase` chains each into the next step and persists `workflow.auto_advance: true`; it also tells PAN to make
|
|
506
|
+
reasonable decisions from context rather than asking. Useful when your PRD
|
|
507
|
+
is detailed enough to answer implementation questions.
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Quick Reference: Common Sequences
|
|
512
|
+
|
|
513
|
+
| Scenario | Command sequence |
|
|
514
|
+
|---|---|
|
|
515
|
+
| Greenfield project | `new-project` > `discuss-phase` > `plan-phase` > `exec-phase` > `verify-phase` |
|
|
516
|
+
| Brownfield project | `map-codebase` > `new-project` > `discuss-phase` > `plan-phase` > `exec-phase` > `verify-phase` |
|
|
517
|
+
| Fast bug fix | `quick` |
|
|
518
|
+
| Substantial ad-hoc work | `quick --full` |
|
|
519
|
+
| Start of day | `progress` > `resume` |
|
|
520
|
+
| End of day | `pause` |
|
|
521
|
+
| New version cycle | `milestone-done` > `milestone-new` |
|
|
522
|
+
| Automated from PRD | `new-project --auto @prd.md` (chains discuss → plan → execute → verify for phase 1, then prints `discuss-phase 2 --auto`; the stop guard blocks one stop and tells the agent to spawn phase 2) |
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Spec B v2 worked examples
|
|
527
|
+
|
|
528
|
+
### Preview a risky phase before committing
|
|
529
|
+
|
|
530
|
+
You've planned a database migration in phase 7. Before running `exec-phase`, sanity-check the blast radius.
|
|
531
|
+
|
|
532
|
+
```text
|
|
533
|
+
/pan:preview phase 7
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
The data layer scans `07-01-plan.md`, `07-02-plan.md`, etc., extracts file paths mentioned in backticks or under known source roots (`src/`, `tests/`, etc.), and runs the risk regex over the combined plan text. The `pan-previewer` agent then synthesizes a report at `.planning/phases/07-<slug>/preview.md`:
|
|
537
|
+
|
|
538
|
+
- **Files likely touched** — `src/db/migrations.js`, `src/models/User.js`, `tests/migrations.test.cjs`
|
|
539
|
+
- **Tests at risk** — 3 test files reference migration schemas
|
|
540
|
+
- **Risk signals** — `drop: true`, `migrate: true`, `rename: true` → risk score 7/10
|
|
541
|
+
- **Cost forecast** — p10/p50/p90 dollars per plan and for the phase, from this project's own cost ledger; `insufficient` until enough past runs back it
|
|
542
|
+
- **Bottom line** — "Run in a feature branch with a rollback plan. Migration reverse is not documented in plan.md."
|
|
543
|
+
|
|
544
|
+
If risk ≥ 7 or auth keywords hit, review the plan before `/pan:exec-phase`. Combine with `--deep-review` for auth/payment phases.
|
|
545
|
+
|
|
546
|
+
### Deep-review an auth phase
|
|
547
|
+
|
|
548
|
+
Phase 4 adds JWT authentication. Run exec-phase with deep-review enabled:
|
|
549
|
+
|
|
550
|
+
```text
|
|
551
|
+
/pan:exec-phase 04 --deep-review
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Right after the normal review, before the verifier, exec-phase runs the `/pan:review-deep` process inline (its reports go under `.planning/reviews/04/`, named with the phase directory's number, so padding the argument is not needed); on `review_required` or `block` it stops before verification:
|
|
555
|
+
|
|
556
|
+
1. **pan-hardener** (OWASP + STRIDE) writes `.planning/reviews/04/hardener.md`. Looks for missing authorization checks, credential storage weaknesses, session management gaps.
|
|
557
|
+
2. **pan-meta-reviewer** reads both reviewer + hardener, writes `.planning/reviews/04/meta.md`. Flags what either missed, disputes overstated severities.
|
|
558
|
+
3. Merge writes `.planning/reviews/04/deep-review.md` with verdict (`ok` / `ok_with_minor` / `fix_before_merge` / `review_required` / `block`) + findings table.
|
|
559
|
+
|
|
560
|
+
Verdict `block` means a critical issue was found — don't merge until resolved. `review_required` means a high finding needs human sign-off.
|
|
561
|
+
|
|
562
|
+
### Generate a team playbook after milestone-done
|
|
563
|
+
|
|
564
|
+
After shipping a milestone, capture accumulated lessons for onboarding:
|
|
565
|
+
|
|
566
|
+
```text
|
|
567
|
+
/pan:milestone-done 0.1.0
|
|
568
|
+
/pan:knowledge playbook
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
The playbook command reads every agent log in `.planning/memory/` (`memory list`) — the lessons someone recorded there for `pan-planner`, `pan-verifier` and other agents with `/pan:retro --write-memory`, `memory append` or `memory record` (PAN writes none on its own, so a project with none gets an empty playbook; the playbook is not scoped to one milestone) — and clusters entries into categories (Conventions / Gotchas / Decisions / Tool choices / Anti-patterns / Recurring gaps / General). Output at `.planning/playbook.md`:
|
|
572
|
+
|
|
573
|
+
```markdown
|
|
574
|
+
## Conventions
|
|
575
|
+
- 2026-04-10: Prefer bulk Postgres writes over per-row commits _— from `pan-planner`_
|
|
576
|
+
|
|
577
|
+
## Gotchas
|
|
578
|
+
- 2026-04-12: Careful: async iterators finalize on throw; wrap in try/finally _— from `pan-verifier`_
|
|
579
|
+
|
|
580
|
+
## Decisions
|
|
581
|
+
- 2026-04-15: Chose Redis over Memcached — Redis AOF gives durability at our write rate _— from `pan-planner`_
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
New team members run `/pan:knowledge ask "what should I know before editing the cache layer?"` and get grounded answers citing the agents' memory files (the source the playbook is built from) plus relevant ADRs.
|