pan-wizard 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +772 -0
  3. package/agents/pan-debugger.md +1246 -0
  4. package/agents/pan-document_code.md +965 -0
  5. package/agents/pan-executor.md +469 -0
  6. package/agents/pan-integration-checker.md +443 -0
  7. package/agents/pan-phase-researcher.md +572 -0
  8. package/agents/pan-plan-checker.md +763 -0
  9. package/agents/pan-planner.md +1297 -0
  10. package/agents/pan-project-researcher.md +647 -0
  11. package/agents/pan-research-synthesizer.md +239 -0
  12. package/agents/pan-reviewer.md +112 -0
  13. package/agents/pan-roadmapper.md +642 -0
  14. package/agents/pan-verifier.md +672 -0
  15. package/assets/pan-logo-2000-transparent.svg +30 -0
  16. package/assets/pan-logo-2000.svg +43 -0
  17. package/assets/terminal.svg +119 -0
  18. package/bin/install-lib.cjs +616 -0
  19. package/bin/install.js +1936 -0
  20. package/commands/pan/add-phase.md +44 -0
  21. package/commands/pan/assumptions.md +47 -0
  22. package/commands/pan/audit-deployment.md +378 -0
  23. package/commands/pan/debug.md +168 -0
  24. package/commands/pan/discord.md +19 -0
  25. package/commands/pan/discuss-phase.md +84 -0
  26. package/commands/pan/exec-phase.md +45 -0
  27. package/commands/pan/focus-auto.md +323 -0
  28. package/commands/pan/focus-design.md +816 -0
  29. package/commands/pan/focus-exec.md +316 -0
  30. package/commands/pan/focus-plan.md +101 -0
  31. package/commands/pan/focus-scan.md +272 -0
  32. package/commands/pan/focus-sync.md +104 -0
  33. package/commands/pan/health.md +23 -0
  34. package/commands/pan/help.md +23 -0
  35. package/commands/pan/insert-phase.md +33 -0
  36. package/commands/pan/map-codebase.md +72 -0
  37. package/commands/pan/milestone-audit.md +37 -0
  38. package/commands/pan/milestone-cleanup.md +19 -0
  39. package/commands/pan/milestone-done.md +137 -0
  40. package/commands/pan/milestone-gaps.md +35 -0
  41. package/commands/pan/milestone-new.md +45 -0
  42. package/commands/pan/new-project.md +43 -0
  43. package/commands/pan/patches.md +110 -0
  44. package/commands/pan/pause.md +39 -0
  45. package/commands/pan/phase-budget.md +23 -0
  46. package/commands/pan/phase-tests.md +42 -0
  47. package/commands/pan/plan-phase.md +46 -0
  48. package/commands/pan/profile.md +36 -0
  49. package/commands/pan/progress.md +25 -0
  50. package/commands/pan/quick.md +42 -0
  51. package/commands/pan/remove-phase.md +32 -0
  52. package/commands/pan/research-phase.md +190 -0
  53. package/commands/pan/resume.md +41 -0
  54. package/commands/pan/retro.md +33 -0
  55. package/commands/pan/settings.md +37 -0
  56. package/commands/pan/todo-add.md +48 -0
  57. package/commands/pan/todo-check.md +46 -0
  58. package/commands/pan/update.md +38 -0
  59. package/commands/pan/verify-phase.md +39 -0
  60. package/hooks/dist/pan-check-update.js +62 -0
  61. package/hooks/dist/pan-context-monitor.js +122 -0
  62. package/hooks/dist/pan-statusline.js +108 -0
  63. package/package.json +66 -0
  64. package/pan-wizard-core/bin/lib/codebase.cjs +746 -0
  65. package/pan-wizard-core/bin/lib/commands.cjs +1435 -0
  66. package/pan-wizard-core/bin/lib/config.cjs +611 -0
  67. package/pan-wizard-core/bin/lib/constants.cjs +696 -0
  68. package/pan-wizard-core/bin/lib/context-budget.cjs +150 -0
  69. package/pan-wizard-core/bin/lib/core.cjs +650 -0
  70. package/pan-wizard-core/bin/lib/focus.cjs +900 -0
  71. package/pan-wizard-core/bin/lib/frontmatter.cjs +442 -0
  72. package/pan-wizard-core/bin/lib/init.cjs +881 -0
  73. package/pan-wizard-core/bin/lib/milestone.cjs +276 -0
  74. package/pan-wizard-core/bin/lib/phase.cjs +1212 -0
  75. package/pan-wizard-core/bin/lib/roadmap.cjs +470 -0
  76. package/pan-wizard-core/bin/lib/state.cjs +1029 -0
  77. package/pan-wizard-core/bin/lib/template.cjs +314 -0
  78. package/pan-wizard-core/bin/lib/utils.cjs +171 -0
  79. package/pan-wizard-core/bin/lib/verify.cjs +1808 -0
  80. package/pan-wizard-core/bin/pan-tools.cjs +773 -0
  81. package/pan-wizard-core/references/checkpoints.md +776 -0
  82. package/pan-wizard-core/references/continuation-format.md +249 -0
  83. package/pan-wizard-core/references/decimal-phase-calculation.md +65 -0
  84. package/pan-wizard-core/references/git-integration.md +248 -0
  85. package/pan-wizard-core/references/git-planning-commit.md +38 -0
  86. package/pan-wizard-core/references/model-profile-resolution.md +34 -0
  87. package/pan-wizard-core/references/model-profiles.md +111 -0
  88. package/pan-wizard-core/references/phase-argument-parsing.md +61 -0
  89. package/pan-wizard-core/references/planning-config.md +196 -0
  90. package/pan-wizard-core/references/questioning.md +145 -0
  91. package/pan-wizard-core/references/tdd.md +263 -0
  92. package/pan-wizard-core/references/ui-brand.md +160 -0
  93. package/pan-wizard-core/references/verification-patterns.md +612 -0
  94. package/pan-wizard-core/templates/codebase/architecture.md +283 -0
  95. package/pan-wizard-core/templates/codebase/best-practices.md +133 -0
  96. package/pan-wizard-core/templates/codebase/concerns.md +325 -0
  97. package/pan-wizard-core/templates/codebase/conventions.md +307 -0
  98. package/pan-wizard-core/templates/codebase/integrations.md +305 -0
  99. package/pan-wizard-core/templates/codebase/relationships.md +124 -0
  100. package/pan-wizard-core/templates/codebase/stack.md +199 -0
  101. package/pan-wizard-core/templates/codebase/structure.md +298 -0
  102. package/pan-wizard-core/templates/codebase/testing.md +480 -0
  103. package/pan-wizard-core/templates/config.json +37 -0
  104. package/pan-wizard-core/templates/context.md +283 -0
  105. package/pan-wizard-core/templates/continue-here.md +78 -0
  106. package/pan-wizard-core/templates/debug-subagent-prompt.md +91 -0
  107. package/pan-wizard-core/templates/debug.md +164 -0
  108. package/pan-wizard-core/templates/discovery.md +146 -0
  109. package/pan-wizard-core/templates/milestone-archive.md +123 -0
  110. package/pan-wizard-core/templates/milestone.md +115 -0
  111. package/pan-wizard-core/templates/phase-prompt.md +593 -0
  112. package/pan-wizard-core/templates/planner-subagent-prompt.md +117 -0
  113. package/pan-wizard-core/templates/project.md +184 -0
  114. package/pan-wizard-core/templates/requirements.md +231 -0
  115. package/pan-wizard-core/templates/research-project/architecture.md +204 -0
  116. package/pan-wizard-core/templates/research-project/features.md +147 -0
  117. package/pan-wizard-core/templates/research-project/pitfalls.md +200 -0
  118. package/pan-wizard-core/templates/research-project/stack.md +120 -0
  119. package/pan-wizard-core/templates/research-project/summary.md +170 -0
  120. package/pan-wizard-core/templates/research.md +552 -0
  121. package/pan-wizard-core/templates/retrospective.md +54 -0
  122. package/pan-wizard-core/templates/roadmap.md +202 -0
  123. package/pan-wizard-core/templates/standards.md +24 -0
  124. package/pan-wizard-core/templates/state.md +176 -0
  125. package/pan-wizard-core/templates/summary-complex.md +59 -0
  126. package/pan-wizard-core/templates/summary-minimal.md +41 -0
  127. package/pan-wizard-core/templates/summary-standard.md +49 -0
  128. package/pan-wizard-core/templates/summary.md +249 -0
  129. package/pan-wizard-core/templates/uat.md +247 -0
  130. package/pan-wizard-core/templates/user-setup.md +311 -0
  131. package/pan-wizard-core/templates/validation.md +76 -0
  132. package/pan-wizard-core/templates/verification-report.md +322 -0
  133. package/pan-wizard-core/workflows/add-phase.md +111 -0
  134. package/pan-wizard-core/workflows/assumptions.md +178 -0
  135. package/pan-wizard-core/workflows/diagnose-issues.md +219 -0
  136. package/pan-wizard-core/workflows/discuss-phase.md +542 -0
  137. package/pan-wizard-core/workflows/exec-phase.md +572 -0
  138. package/pan-wizard-core/workflows/execute-plan.md +448 -0
  139. package/pan-wizard-core/workflows/health.md +156 -0
  140. package/pan-wizard-core/workflows/help.md +431 -0
  141. package/pan-wizard-core/workflows/insert-phase.md +129 -0
  142. package/pan-wizard-core/workflows/map-codebase.md +401 -0
  143. package/pan-wizard-core/workflows/milestone-audit.md +297 -0
  144. package/pan-wizard-core/workflows/milestone-cleanup.md +152 -0
  145. package/pan-wizard-core/workflows/milestone-gaps.md +274 -0
  146. package/pan-wizard-core/workflows/milestone-new.md +382 -0
  147. package/pan-wizard-core/workflows/new-project.md +1178 -0
  148. package/pan-wizard-core/workflows/pause.md +122 -0
  149. package/pan-wizard-core/workflows/phase-tests.md +388 -0
  150. package/pan-wizard-core/workflows/plan-phase.md +569 -0
  151. package/pan-wizard-core/workflows/profile.md +115 -0
  152. package/pan-wizard-core/workflows/progress.md +381 -0
  153. package/pan-wizard-core/workflows/quick.md +453 -0
  154. package/pan-wizard-core/workflows/remove-phase.md +154 -0
  155. package/pan-wizard-core/workflows/research-phase.md +73 -0
  156. package/pan-wizard-core/workflows/resume-project.md +306 -0
  157. package/pan-wizard-core/workflows/retro.md +121 -0
  158. package/pan-wizard-core/workflows/settings.md +213 -0
  159. package/pan-wizard-core/workflows/todo-add.md +157 -0
  160. package/pan-wizard-core/workflows/todo-check.md +176 -0
  161. package/pan-wizard-core/workflows/transition.md +544 -0
  162. package/pan-wizard-core/workflows/update.md +219 -0
  163. package/pan-wizard-core/workflows/verify-phase.md +301 -0
  164. package/scripts/build-hooks.js +43 -0
package/README.md ADDED
@@ -0,0 +1,772 @@
1
+ <div align="center">
2
+
3
+ # PAN WIZARD
4
+
5
+ **Project Automation Navigator — A lightweight workflow automation and context engineering system for Claude Code, OpenCode, Gemini CLI, Codex, and Copilot CLI.**
6
+
7
+ **Solves context rot — the quality degradation that happens as Claude fills its context window.**
8
+
9
+ [![npm version](https://img.shields.io/npm/v/pan-wizard?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/pan-wizard)
10
+ [![npm downloads](https://img.shields.io/npm/dm/pan-wizard?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/pan-wizard)
11
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
12
+
13
+ <br>
14
+
15
+ ```bash
16
+ npx pan-wizard@latest
17
+ ```
18
+
19
+ **Works on Mac, Windows, and Linux.**
20
+
21
+ <br>
22
+
23
+ ![PAN Install](assets/terminal.svg)
24
+
25
+ <br>
26
+
27
+ [How It Works](#how-it-works) · [Commands](#commands) · [Why It Works](#why-it-works) · [User Guide](docs/USER-GUIDE.md) · [FAQ](docs/FAQ.md)
28
+
29
+ </div>
30
+
31
+ ---
32
+
33
+ ## What is PAN Wizard?
34
+
35
+ PAN (Project Automation Navigator) is a structured workflow system that helps you build software projects with AI coding assistants. The complexity is in the system, not in your workflow. Behind the scenes: context engineering, XML prompt formatting, subagent orchestration, state management. What you see: a few commands that just work.
36
+
37
+ The system gives Claude everything it needs to do the work *and* verify it. Describe your idea, let the system extract everything it needs to know, and let Claude Code get to work.
38
+
39
+ PAN is the context engineering layer that makes Claude Code reliable. It breaks work into phases that fit within context limits, provides specialized agents with exactly the context they need, and maintains state across sessions.
40
+
41
+ ### Architecture
42
+
43
+ ```
44
+ ┌─────────────────────────────────────────────────────────────┐
45
+ │ YOU │
46
+ │ /pan:new-project → /pan:plan-phase → /pan:exec-phase │
47
+ └─────────────────────┬───────────────────────────────────────┘
48
+ │ invokes
49
+ ┌─────────────────────▼───────────────────────────────────────┐
50
+ │ COMMANDS (40 .md files + 4 CLI operations) │
51
+ │ Thin orchestrators that spawn agents and route results │
52
+ └─────────────────────┬───────────────────────────────────────┘
53
+ │ spawns
54
+ ┌─────────────────────▼───────────────────────────────────────┐
55
+ │ AGENTS (12 specialized) │
56
+ │ planner · executor · verifier · researcher · debugger ... │
57
+ │ Each runs in fresh 200K context window │
58
+ └─────────────────────┬───────────────────────────────────────┘
59
+ │ uses
60
+ ┌─────────────────────▼───────────────────────────────────────┐
61
+ │ CORE LIBRARY (pan-wizard-core/) │
62
+ │ config · state · init · verify · commit · phase-utils │
63
+ │ Cross-platform CLI tools, zero runtime dependencies │
64
+ └─────────────────────┬───────────────────────────────────────┘
65
+ │ reads/writes
66
+ ┌─────────────────────▼───────────────────────────────────────┐
67
+ │ .planning/ │
68
+ │ project.md · roadmap.md · state.md · PLAN files │
69
+ │ Persistent state that survives context resets │
70
+ └─────────────────────────────────────────────────────────────┘
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Who This Is For
76
+
77
+ People who want to describe what they want and have it built correctly — without managing complex project management overhead.
78
+
79
+ ---
80
+
81
+ ## Getting Started
82
+
83
+ ```bash
84
+ npx pan-wizard@latest
85
+ ```
86
+
87
+ The installer prompts you to choose:
88
+ 1. **Runtime** — Claude Code, OpenCode, Gemini, Codex, Copilot CLI, or all
89
+ 2. **Location** — Global (all projects) or local (current project only)
90
+
91
+ Verify with:
92
+ - Claude Code / Gemini: `/pan:help`
93
+ - OpenCode / Copilot CLI: `/pan-help`
94
+ - Codex: `$pan-help`
95
+
96
+ > [!NOTE]
97
+ > Codex and Copilot CLI installations use skills (`skills/pan-*/SKILL.md`) rather than custom prompts.
98
+
99
+ ### Staying Updated
100
+
101
+ PAN evolves fast. Update periodically:
102
+
103
+ ```bash
104
+ npx pan-wizard@latest
105
+ ```
106
+
107
+ <details>
108
+ <summary><strong>Non-interactive Install (Docker, CI, Scripts)</strong></summary>
109
+
110
+ ```bash
111
+ # Claude Code
112
+ npx pan-wizard --claude --global # Install to ~/.claude/
113
+ npx pan-wizard --claude --local # Install to ./.claude/
114
+
115
+ # OpenCode (open source, free models)
116
+ npx pan-wizard --opencode --global # Install to ~/.config/opencode/
117
+
118
+ # Gemini CLI
119
+ npx pan-wizard --gemini --global # Install to ~/.gemini/
120
+
121
+ # Codex (skills-first)
122
+ npx pan-wizard --codex --global # Install to ~/.codex/
123
+ npx pan-wizard --codex --local # Install to ./.codex/
124
+
125
+ # GitHub Copilot CLI (skills-first)
126
+ npx pan-wizard --copilot --global # Install to ~/.copilot/
127
+ npx pan-wizard --copilot --local # Install to ./.github/
128
+
129
+ # All runtimes
130
+ npx pan-wizard --all --global # Install to all directories
131
+ ```
132
+
133
+ Use `--global` (`-g`) or `--local` (`-l`) to skip the location prompt.
134
+ Use `--claude`, `--opencode`, `--gemini`, `--codex`, `--copilot`, or `--all` to skip the runtime prompt.
135
+
136
+ </details>
137
+
138
+ <details>
139
+ <summary><strong>Development Installation</strong></summary>
140
+
141
+ Clone the repository and run the installer locally:
142
+
143
+ ```bash
144
+ git clone https://github.com/oharms/PanWizard.git
145
+ cd pan-wizard
146
+ node bin/install.js --claude --local
147
+ ```
148
+
149
+ Installs to `./.claude/` for testing modifications before contributing.
150
+
151
+ ```bash
152
+ npm test # 1649 unit tests
153
+ npm run test:scenarios # Scenario tests (install + integration)
154
+ npm run test:all # All tests (unit + scenario)
155
+ ```
156
+
157
+ </details>
158
+
159
+ ### Recommended: Skip Permissions Mode
160
+
161
+ PAN is designed for frictionless automation. Run Claude Code with:
162
+
163
+ ```bash
164
+ claude --dangerously-skip-permissions
165
+ ```
166
+
167
+ > [!TIP]
168
+ > This is how PAN is intended to be used — stopping to approve `date` and `git commit` 50 times defeats the purpose.
169
+
170
+ <details>
171
+ <summary><strong>Alternative: Granular Permissions</strong></summary>
172
+
173
+ If you prefer not to use that flag, add this to your project's `.claude/settings.json`:
174
+
175
+ ```json
176
+ {
177
+ "permissions": {
178
+ "allow": [
179
+ "Bash(date:*)",
180
+ "Bash(echo:*)",
181
+ "Bash(cat:*)",
182
+ "Bash(ls:*)",
183
+ "Bash(mkdir:*)",
184
+ "Bash(wc:*)",
185
+ "Bash(head:*)",
186
+ "Bash(tail:*)",
187
+ "Bash(sort:*)",
188
+ "Bash(grep:*)",
189
+ "Bash(tr:*)",
190
+ "Bash(git add:*)",
191
+ "Bash(git commit:*)",
192
+ "Bash(git status:*)",
193
+ "Bash(git log:*)",
194
+ "Bash(git diff:*)",
195
+ "Bash(git tag:*)"
196
+ ]
197
+ }
198
+ }
199
+ ```
200
+
201
+ </details>
202
+
203
+ ---
204
+
205
+ ## How It Works
206
+
207
+ > **Already have code?** Run `/pan:map-codebase` first. It spawns parallel agents to analyze your stack, architecture, conventions, and concerns. Then `/pan:new-project` knows your codebase — questions focus on what you're adding, and planning automatically loads your patterns.
208
+
209
+ ### 1. Initialize Project
210
+
211
+ ```
212
+ /pan:new-project
213
+ ```
214
+
215
+ One command, one flow. The system:
216
+
217
+ 1. **Questions** — Asks until it understands your idea completely (goals, constraints, tech preferences, edge cases)
218
+ 2. **Research** — Spawns parallel agents to investigate the domain (optional but recommended)
219
+ 3. **Requirements** — Extracts what's v1, v2, and out of scope
220
+ 4. **Roadmap** — Creates phases mapped to requirements
221
+
222
+ You approve the roadmap. Now you're ready to build.
223
+
224
+ **Creates:** `project.md`, `requirements.md`, `roadmap.md`, `state.md`, `.planning/research/`
225
+
226
+ ---
227
+
228
+ ### 2. Discuss Phase
229
+
230
+ ```
231
+ /pan:discuss-phase 1
232
+ ```
233
+
234
+ **This is where you shape the implementation.**
235
+
236
+ Your roadmap has a sentence or two per phase. That's not enough context to build something the way *you* imagine it. This step captures your preferences before anything gets researched or planned.
237
+
238
+ The system analyzes the phase and identifies gray areas based on what's being built:
239
+
240
+ - **Visual features** → Layout, density, interactions, empty states
241
+ - **APIs/CLIs** → Response format, flags, error handling, verbosity
242
+ - **Content systems** → Structure, tone, depth, flow
243
+ - **Organization tasks** → Grouping criteria, naming, duplicates, exceptions
244
+
245
+ For each area you select, it asks until you're satisfied. The output — `context.md` — feeds directly into the next two steps:
246
+
247
+ 1. **Researcher reads it** — Knows what patterns to investigate ("user wants card layout" → research card component libraries)
248
+ 2. **Planner reads it** — Knows what decisions are locked ("infinite scroll decided" → plan includes scroll handling)
249
+
250
+ The deeper you go here, the more the system builds what you actually want. Skip it and you get reasonable defaults. Use it and you get *your* vision.
251
+
252
+ **Creates:** `{phase_num}-context.md`
253
+
254
+ ---
255
+
256
+ ### 3. Plan Phase
257
+
258
+ ```
259
+ /pan:plan-phase 1
260
+ ```
261
+
262
+ The system:
263
+
264
+ 1. **Researches** — Investigates how to implement this phase, guided by your context.md decisions
265
+ 2. **Plans** — Creates 2-3 atomic task plans with XML structure
266
+ 3. **Verifies** — Checks plans against requirements, loops until they pass
267
+
268
+ Each plan is small enough to execute in a fresh context window. No degradation, no "I'll be more concise now."
269
+
270
+ **Creates:** `{phase_num}-research.md`, `{phase_num}-{N}-plan.md`
271
+
272
+ ---
273
+
274
+ ### 4. Execute Phase
275
+
276
+ ```
277
+ /pan:exec-phase 1
278
+ ```
279
+
280
+ The system:
281
+
282
+ 1. **Runs plans in waves** — Parallel where possible, sequential when dependent
283
+ 2. **Fresh context per plan** — 200k tokens purely for implementation, zero accumulated garbage
284
+ 3. **Commits per task** — Every task gets its own atomic commit
285
+ 4. **Verifies against goals** — Checks the codebase delivers what the phase promised
286
+
287
+ Walk away, come back to completed work with clean git history.
288
+
289
+ **How Wave Execution Works:**
290
+
291
+ Plans are grouped into "waves" based on dependencies. Within each wave, plans run in parallel. Waves run sequentially.
292
+
293
+ ```
294
+ ┌─────────────────────────────────────────────────────────────────────┐
295
+ │ PHASE EXECUTION │
296
+ ├─────────────────────────────────────────────────────────────────────┤
297
+ │ │
298
+ │ WAVE 1 (parallel) WAVE 2 (parallel) WAVE 3 │
299
+ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
300
+ │ │ Plan 01 │ │ Plan 02 │ → │ Plan 03 │ │ Plan 04 │ → │ Plan 05 │ │
301
+ │ │ │ │ │ │ │ │ │ │ │ │
302
+ │ │ User │ │ Product │ │ Orders │ │ Cart │ │ Checkout│ │
303
+ │ │ Model │ │ Model │ │ API │ │ API │ │ UI │ │
304
+ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
305
+ │ │ │ ↑ ↑ ↑ │
306
+ │ └───────────┴──────────────┴───────────┘ │ │
307
+ │ Dependencies: Plan 03 needs Plan 01 │ │
308
+ │ Plan 04 needs Plan 02 │ │
309
+ │ Plan 05 needs Plans 03 + 04 │ │
310
+ │ │
311
+ └─────────────────────────────────────────────────────────────────────┘
312
+ ```
313
+
314
+ **Why waves matter:**
315
+ - Independent plans → Same wave → Run in parallel
316
+ - Dependent plans → Later wave → Wait for dependencies
317
+ - File conflicts → Sequential plans or same plan
318
+
319
+ This is why "vertical slices" (Plan 01: User feature end-to-end) parallelize better than "horizontal layers" (Plan 01: All models, Plan 02: All APIs).
320
+
321
+ **Creates:** `{phase_num}-{N}-summary.md`, `{phase_num}-verification.md`
322
+
323
+ ---
324
+
325
+ ### 5. Verify Work
326
+
327
+ ```
328
+ /pan:verify-phase 1
329
+ ```
330
+
331
+ **This is where you confirm it actually works.**
332
+
333
+ Automated verification checks that code exists and tests pass. But does the feature *work* the way you expected? This is your chance to use it.
334
+
335
+ The system:
336
+
337
+ 1. **Extracts testable deliverables** — What you should be able to do now
338
+ 2. **Walks you through one at a time** — "Can you log in with email?" Yes/no, or describe what's wrong
339
+ 3. **Diagnoses failures automatically** — Spawns debug agents to find root causes
340
+ 4. **Creates verified fix plans** — Ready for immediate re-execution
341
+
342
+ If everything passes, you move on. If something's broken, you don't manually debug — you just run `/pan:exec-phase` again with the fix plans it created.
343
+
344
+ **Creates:** `{phase_num}-uat.md`, fix plans if issues found
345
+
346
+ ---
347
+
348
+ ### 6. Repeat → Complete → Next Milestone
349
+
350
+ ```
351
+ /pan:discuss-phase 2
352
+ /pan:plan-phase 2
353
+ /pan:exec-phase 2
354
+ /pan:verify-phase 2
355
+ ...
356
+ /pan:milestone-done
357
+ /pan:milestone-new
358
+ ```
359
+
360
+ Loop **discuss → plan → execute → verify** until milestone complete.
361
+
362
+ Each phase gets your input (discuss), proper research (plan), clean execution (execute), and human verification (verify). Context stays fresh. Quality stays high.
363
+
364
+ When all phases are done, `/pan:milestone-done` archives the milestone and tags the release.
365
+
366
+ Then `/pan:milestone-new` starts the next version — same flow as `new-project` but for your existing codebase. You describe what you want to build next, the system researches the domain, you scope requirements, and it creates a fresh roadmap. Each milestone is a clean cycle: define → build → ship.
367
+
368
+ ---
369
+
370
+ ### Quick Mode
371
+
372
+ ```
373
+ /pan:quick
374
+ ```
375
+
376
+ **For ad-hoc tasks that don't need full planning.**
377
+
378
+ Quick mode gives you PAN guarantees (atomic commits, state tracking) with a faster path:
379
+
380
+ - **Same agents** — Planner + executor, same quality
381
+ - **Skips optional steps** — No research, no plan checker, no verifier
382
+ - **Separate tracking** — Lives in `.planning/quick/`, not phases
383
+
384
+ Use for: bug fixes, small features, config changes, one-off tasks.
385
+
386
+ ```
387
+ /pan:quick
388
+ > What do you want to do? "Add dark mode toggle to settings"
389
+ ```
390
+
391
+ **Creates:** `.planning/quick/001-add-dark-mode-toggle/plan.md`, `summary.md`
392
+
393
+ ---
394
+
395
+ ## Why It Works
396
+
397
+ ### Context Engineering
398
+
399
+ Claude Code is incredibly powerful *if* you give it the context it needs. Most people don't.
400
+
401
+ PAN handles it for you:
402
+
403
+ | File | What it does |
404
+ |------|--------------|
405
+ | `project.md` | Project vision, always loaded |
406
+ | `research/` | Ecosystem knowledge (stack, features, architecture, pitfalls) |
407
+ | `requirements.md` | Scoped v1/v2 requirements with phase traceability |
408
+ | `roadmap.md` | Where you're going, what's done |
409
+ | `state.md` | Decisions, blockers, position — memory across sessions |
410
+ | `plan.md` | Atomic task with XML structure, verification steps |
411
+ | `summary.md` | What happened, what changed, committed to history |
412
+ | `standards.md` | Selected industry standards (OWASP, WCAG, NIST, etc.) — advisory checklists for agents |
413
+ | `todos/` | Captured ideas and tasks for later work |
414
+
415
+ Size limits based on where Claude's quality degrades. Stay under, get consistent excellence.
416
+
417
+ ### XML Prompt Formatting
418
+
419
+ Every plan is structured XML optimized for Claude:
420
+
421
+ ```xml
422
+ <task type="auto">
423
+ <name>Create login endpoint</name>
424
+ <files>src/app/api/auth/login/route.ts</files>
425
+ <action>
426
+ Use jose for JWT (not jsonwebtoken - CommonJS issues).
427
+ Validate credentials against users table.
428
+ Return httpOnly cookie on success.
429
+ </action>
430
+ <verify>curl -X POST localhost:3000/api/auth/login returns 200 + Set-Cookie</verify>
431
+ <done>Valid credentials return cookie, invalid return 401</done>
432
+ </task>
433
+ ```
434
+
435
+ Precise instructions. No guessing. Verification built in.
436
+
437
+ ### Multi-Agent Orchestration
438
+
439
+ Every stage uses the same pattern: a thin orchestrator spawns specialized agents, collects results, and routes to the next step.
440
+
441
+ | Stage | Orchestrator does | Agents do |
442
+ |-------|------------------|-----------|
443
+ | Research | Coordinates, presents findings | 4 parallel researchers investigate stack, features, architecture, pitfalls |
444
+ | Planning | Validates, manages iteration | Planner creates plans, checker verifies, loop until pass |
445
+ | Execution | Groups into waves, tracks progress | Executors implement in parallel, each with fresh 200k context |
446
+ | Verification | Presents results, routes next | Verifier checks codebase against goals, debuggers diagnose failures |
447
+
448
+ The orchestrator never does heavy lifting. It spawns agents, waits, integrates results.
449
+
450
+ **The result:** You can run an entire phase — deep research, multiple plans created and verified, thousands of lines of code written across parallel executors, automated verification against goals — and your main context window stays at 30-40%. The work happens in fresh subagent contexts. Your session stays fast and responsive.
451
+
452
+ ### Atomic Git Commits
453
+
454
+ Each task gets its own commit immediately after completion:
455
+
456
+ ```bash
457
+ abc123f docs(08-02): complete user registration plan
458
+ def456g feat(08-02): add email confirmation flow
459
+ hij789k feat(08-02): implement password hashing
460
+ lmn012o feat(08-02): create registration endpoint
461
+ ```
462
+
463
+ > [!NOTE]
464
+ > **Benefits:** Git bisect finds exact failing task. Each task independently revertable. Clear history for Claude in future sessions. Better observability in AI-automated workflow.
465
+
466
+ Every commit is surgical, traceable, and meaningful.
467
+
468
+ ### Modular by Design
469
+
470
+ - Add phases to current milestone
471
+ - Insert urgent work between phases
472
+ - Complete milestones and start fresh
473
+ - Adjust plans without rebuilding everything
474
+
475
+ You're never locked in. The system adapts.
476
+
477
+ ---
478
+
479
+ ## How PAN Compares
480
+
481
+ | | PAN Wizard | Cursor / Windsurf | Aider / Cline | GitHub Copilot |
482
+ |---|---|---|---|---|
483
+ | **Context rot prevention** | Phase-scoped fresh 200K windows | No — context degrades over time | No (Cline: condensing) | No |
484
+ | **Multi-agent** | 12 specialized agents, parallel waves | Up to 8 parallel (Cursor 2.0) | Single agent | Specialized sub-agents |
485
+ | **Plan → Verify loop** | Research → plan → verify with iteration | Agent generates plan | Plan mode (Cline) | Plan step |
486
+ | **Post-execution verification** | Auto verifier + human UAT | Iterative error-fix | Manual test runs | Auto-fix loop |
487
+ | **Session persistence** | state.md + pause/resume + handoff | Notepad / Memories | None / Task history | None |
488
+ | **Runtime support** | Claude Code, OpenCode, Gemini CLI, Codex, Copilot CLI | IDE-locked | Terminal / VS Code | VS Code + CLI |
489
+ | **Zero dependencies** | Yes (Node builtins only) | No (Electron) | No (Python / Node) | No |
490
+
491
+ PAN is not a replacement for your IDE or AI agent — it's the orchestration layer that handles everything *around* them: breaking work into context-safe chunks, researching before planning, verifying after execution, and maintaining state across sessions.
492
+
493
+ > For the full comparison across 8 tools and 15+ dimensions, see [COMPARISON.md](docs/COMPARISON.md).
494
+
495
+ ---
496
+
497
+ ## Commands
498
+
499
+ ### Core Workflow
500
+
501
+ | Command | What it does |
502
+ |---------|--------------|
503
+ | `/pan:new-project [--auto]` | Full initialization: questions → research → requirements → roadmap |
504
+ | `/pan:discuss-phase [N] [--auto]` | Capture implementation decisions before planning |
505
+ | `/pan:plan-phase [N] [--auto]` | Research + plan + verify for a phase |
506
+ | `/pan:exec-phase <N>` | Execute all plans in parallel waves, verify when complete |
507
+ | `/pan:verify-phase [N]` | Manual user acceptance testing ¹ |
508
+ | `/pan:milestone-audit` | Verify milestone achieved its definition of done |
509
+ | `/pan:milestone-done` | Archive milestone, tag release |
510
+ | `/pan:milestone-new [name]` | Start next version: questions → research → requirements → roadmap |
511
+
512
+ ### Navigation
513
+
514
+ | Command | What it does |
515
+ |---------|--------------|
516
+ | `/pan:progress` | Where am I? What's next? (supports `health` subformat) |
517
+ | `/pan:help` | Show all commands and usage guide |
518
+ | `/pan:update` | Update PAN with changelog preview |
519
+ | `/pan:discord` | Join the PAN Discord community |
520
+
521
+ ### Brownfield
522
+
523
+ | Command | What it does |
524
+ |---------|--------------|
525
+ | `/pan:map-codebase` | Analyze existing codebase before new-project |
526
+
527
+ ### Phase Management
528
+
529
+ | Command | What it does |
530
+ |---------|--------------|
531
+ | `/pan:add-phase` | Append phase to roadmap |
532
+ | `/pan:insert-phase [N]` | Insert urgent work between phases |
533
+ | `/pan:remove-phase [N]` | Remove future phase, renumber |
534
+ | `/pan:assumptions [N]` | See Claude's intended approach before planning |
535
+ | `/pan:milestone-gaps` | Create phases to close gaps from audit |
536
+
537
+ ### Session
538
+
539
+ | Command | What it does |
540
+ |---------|--------------|
541
+ | `/pan:pause` | Create handoff when stopping mid-phase |
542
+ | `/pan:resume` | Restore from last session |
543
+
544
+ ### Utilities
545
+
546
+ | Command | What it does |
547
+ |---------|--------------|
548
+ | `/pan:settings` | Configure model profile and workflow agents |
549
+ | `/pan:profile <profile>` | Switch model profile (quality/balanced/budget) |
550
+ | `/pan:todo-add [desc]` | Capture idea for later |
551
+ | `/pan:todo-check` | List pending todos |
552
+ | `/pan:debug [desc]` | Systematic debugging with persistent state |
553
+ | `/pan:quick [--full]` | Execute ad-hoc task with PAN guarantees (`--full` adds plan-checking and verification) |
554
+ | `/pan:health [--repair] [--standards]` | Validate `.planning/` directory integrity, auto-repair with `--repair`, standards compliance with `--standards` |
555
+ | `/pan:phase-tests [N]` | Generate tests for a completed phase based on UAT criteria |
556
+ | `/pan:milestone-cleanup` | Archive accumulated phase directories from completed milestones |
557
+ | `/pan:retro` | Milestone retrospective — estimation accuracy, verification patterns, gap analysis |
558
+ | `/pan:patches` | Restore local modifications after a PAN update |
559
+ | `/pan:research-phase [N]` | Standalone deep research for a phase (usually part of plan-phase) |
560
+ | `/pan:phase-budget` | Estimate context window utilization for current phase |
561
+
562
+ ### Operations
563
+
564
+ | Command | What it does |
565
+ |---------|--------------|
566
+ | `pan-tools preflight [target]` | Pre-flight validation: state, blockers, git clean, config, error patterns |
567
+ | `pan-tools dashboard` | Aggregated project overview: phase, progress, blockers, next action |
568
+ | `pan-tools learnings extract` | Auto-extract learnings from sessions, error patterns, and summaries |
569
+ | `pan-tools learnings list` | List all extracted learnings with type breakdown |
570
+ | `pan-tools learnings prune` | Remove old learnings by age (`--days N`) or ID (`--id LEARN-NNN`) |
571
+ | `pan-tools deps validate` | Cross-reference roadmap vs disk phases, detect orphaned requirements |
572
+
573
+ ### Focus (Strategic Project Management)
574
+
575
+ | Command | What it does |
576
+ |---------|--------------|
577
+ | `/pan:focus-scan` | Collect, classify, and prioritize all work items with Reality Score |
578
+ | `/pan:focus-plan` | Create capacity-budgeted execution batch (4 modes: bugfix/balanced/features/full) |
579
+ | `/pan:focus-exec` | Execute items from batch with tier-based test cadence |
580
+ | `/pan:focus-auto` | Continuous scan→plan→exec loop with purpose-driven categories and 5-layer safety harness |
581
+ | `/pan:focus-sync` | Detect and report stale documentation counts |
582
+ | `/pan:focus-design` | 10-phase strategic feature investigation pipeline |
583
+
584
+ <sup>¹ Contributed by reddit user OracleGreyBeard</sup>
585
+
586
+ ---
587
+
588
+ ## Configuration
589
+
590
+ PAN stores project settings in `.planning/config.json`. Configure during `/pan:new-project` or update later with `/pan:settings`. For the full config schema, workflow toggles, git branching options, and per-agent model breakdown, see the [User Guide](docs/USER-GUIDE.md#configuration-reference).
591
+
592
+ ### Core Settings
593
+
594
+ | Setting | Options | Default | What it controls |
595
+ |---------|---------|---------|------------------|
596
+ | `mode` | `yolo`, `interactive` | `interactive` | Auto-approve vs confirm at each step |
597
+ | `depth` | `quick`, `standard`, `comprehensive` | `standard` | Planning thoroughness (phases × plans) |
598
+
599
+ ### Model Profiles
600
+
601
+ Control which Claude model each agent uses. Balance quality vs token spend.
602
+
603
+ | Profile | Planning | Execution | Verification |
604
+ |---------|----------|-----------|--------------|
605
+ | `quality` | Opus | Opus | Sonnet |
606
+ | `balanced` (default) | Opus | Sonnet | Sonnet |
607
+ | `budget` | Sonnet | Sonnet | Haiku |
608
+
609
+ > Simplified view — actual model assignment varies by agent role. See [User Guide](docs/USER-GUIDE.md#model-profiles) for the full per-agent breakdown.
610
+
611
+ Switch profiles:
612
+ ```
613
+ /pan:profile budget
614
+ ```
615
+
616
+ Or configure via `/pan:settings`.
617
+
618
+ ### Workflow Agents
619
+
620
+ These spawn additional agents during planning/execution. They improve quality but add tokens and time.
621
+
622
+ | Setting | Default | What it does |
623
+ |---------|---------|--------------|
624
+ | `workflow.research` | `true` | Researches domain before planning each phase |
625
+ | `workflow.plan_check` | `true` | Verifies plans achieve phase goals before execution |
626
+ | `workflow.verifier` | `true` | Confirms must-haves were delivered after execution |
627
+ | `workflow.auto_advance` | `false` | Auto-chain discuss → plan → execute without stopping |
628
+ | `workflow.nyquist_validation` | `true` | Map test coverage during planning (Nyquist layer) |
629
+ | `workflow.standards_health` | `true` | Include standards compliance in health reports |
630
+
631
+ Use `/pan:settings` to toggle these, or override per-invocation:
632
+ - `/pan:plan-phase --skip-research`
633
+ - `/pan:plan-phase --skip-verify`
634
+
635
+ ### Execution
636
+
637
+ | Setting | Default | What it controls |
638
+ |---------|---------|------------------|
639
+ | `parallelization.enabled` | `true` | Run independent plans simultaneously |
640
+ | `planning.commit_docs` | `true` | Track `.planning/` in git |
641
+
642
+ ### Git Branching
643
+
644
+ Control how PAN handles branches during execution.
645
+
646
+ | Setting | Options | Default | What it does |
647
+ |---------|---------|---------|--------------|
648
+ | `git.branching_strategy` | `none`, `phase`, `milestone` | `none` | Branch creation strategy |
649
+ | `git.phase_branch_template` | string | `pan/phase-{phase}-{slug}` | Template for phase branches |
650
+ | `git.milestone_branch_template` | string | `pan/{milestone}-{slug}` | Template for milestone branches |
651
+
652
+ **Strategies:**
653
+ - **`none`** — Commits to current branch (default PAN behavior)
654
+ - **`phase`** — Creates a branch per phase, merges at phase completion
655
+ - **`milestone`** — Creates one branch for entire milestone, merges at completion
656
+
657
+ At milestone completion, PAN Wizard offers squash merge (recommended) or merge with history.
658
+
659
+ ---
660
+
661
+ ## Security
662
+
663
+ ### Protecting Sensitive Files
664
+
665
+ PAN's codebase mapping and analysis commands read files to understand your project. **Protect files containing secrets** by adding them to Claude Code's deny list:
666
+
667
+ 1. Open Claude Code settings (`.claude/settings.json` or global)
668
+ 2. Add sensitive file patterns to the deny list:
669
+
670
+ ```json
671
+ {
672
+ "permissions": {
673
+ "deny": [
674
+ "Read(.env)",
675
+ "Read(.env.*)",
676
+ "Read(**/secrets/*)",
677
+ "Read(**/*credential*)",
678
+ "Read(**/*.pem)",
679
+ "Read(**/*.key)"
680
+ ]
681
+ }
682
+ }
683
+ ```
684
+
685
+ This prevents Claude from reading these files entirely, regardless of what commands you run.
686
+
687
+ > [!IMPORTANT]
688
+ > PAN includes built-in protections against committing secrets, but defense-in-depth is best practice. Deny read access to sensitive files as a first line of defense.
689
+
690
+ ---
691
+
692
+ ## Troubleshooting
693
+
694
+ **Commands not found after install?**
695
+ - Restart your runtime to reload commands/skills
696
+ - Verify files exist in `~/.claude/commands/pan/` (global) or `./.claude/commands/pan/` (local)
697
+ - For Codex, verify skills exist in `~/.codex/skills/pan-*/SKILL.md` (global) or `./.codex/skills/pan-*/SKILL.md` (local)
698
+ - For Copilot CLI, verify skills exist in `~/.copilot/skills/pan-*/SKILL.md` (global) or `./.github/skills/pan-*/SKILL.md` (local)
699
+
700
+ **Commands not working as expected?**
701
+ - Run `/pan:help` to verify installation
702
+ - Re-run `npx pan-wizard` to reinstall
703
+
704
+ **Updating to the latest version?**
705
+ ```bash
706
+ npx pan-wizard@latest
707
+ ```
708
+
709
+ **Using Docker or containerized environments?**
710
+
711
+ If file reads fail with tilde paths (`~/.claude/...`), set `CLAUDE_CONFIG_DIR` before installing:
712
+ ```bash
713
+ CLAUDE_CONFIG_DIR=/home/youruser/.claude npx pan-wizard --global
714
+ ```
715
+ This ensures absolute paths are used instead of `~` which may not expand correctly in containers.
716
+
717
+ ### Uninstalling
718
+
719
+ To remove PAN completely:
720
+
721
+ ```bash
722
+ # Global installs
723
+ npx pan-wizard --claude --global --uninstall
724
+ npx pan-wizard --opencode --global --uninstall
725
+ npx pan-wizard --gemini --global --uninstall
726
+ npx pan-wizard --codex --global --uninstall
727
+ npx pan-wizard --copilot --global --uninstall
728
+
729
+ # Local installs (current project)
730
+ npx pan-wizard --claude --local --uninstall
731
+ npx pan-wizard --opencode --local --uninstall
732
+ npx pan-wizard --gemini --local --uninstall
733
+ npx pan-wizard --codex --local --uninstall
734
+ npx pan-wizard --copilot --local --uninstall
735
+ ```
736
+
737
+ This removes all PAN commands, agents, hooks, and settings while preserving your other configurations.
738
+
739
+ ---
740
+
741
+ ## Documentation
742
+
743
+ | Document | Audience | What it covers |
744
+ |----------|----------|---------------|
745
+ | [User Guide](docs/USER-GUIDE.md) | Users | Workflow diagrams, command reference, config schema, troubleshooting |
746
+ | [FAQ](docs/FAQ.md) | Users | Common questions about cost, runtimes, customization |
747
+ | [Examples](docs/EXAMPLES.md) | Users | 7 worked examples from new project to cost-conscious development |
748
+ | [Architecture](docs/ARCHITECTURE.md) | Contributors | 5-layer system design, data flow, module graph |
749
+ | [Development Guide](docs/DEVELOPMENT.md) | Contributors | Setup, how to add commands/agents/tests, cross-platform pitfalls |
750
+ | [CLI Reference](docs/CLI-REFERENCE.md) | Contributors | Every pan-tools.cjs subcommand with args, flags, and JSON output |
751
+ | [Agent System](docs/AGENTS.md) | Contributors | 12 agents, lifecycle, model profiles, collaboration patterns |
752
+ | [Hook System](docs/HOOKS.md) | Contributors | 3 built-in hooks, bridge file architecture, custom hook development |
753
+ | [Internals](docs/INTERNALS.md) | Power Users | Checkpoint system, TDD, verification patterns, model profiles |
754
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | Users | Deep-dive diagnostics for execution, state, git, and verification issues |
755
+ | [Contributing](CONTRIBUTING.md) | Contributors | Project structure, code style, PR process |
756
+ | [Contributors](CONTRIBUTORS.md) | Everyone | Who built this project |
757
+ | [Attribution](ATTRIBUTION.md) | Everyone | Where every design idea came from |
758
+ | [Changelog](CHANGELOG.md) | Everyone | Release history |
759
+
760
+ ---
761
+
762
+ ## License
763
+
764
+ MIT License. See [LICENSE](LICENSE) for details.
765
+
766
+ ---
767
+
768
+ <div align="center">
769
+
770
+ **Claude Code is powerful. PAN makes it reliable.**
771
+
772
+ </div>