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.
Files changed (314) hide show
  1. package/CHANGELOG.md +3645 -0
  2. package/README.md +36 -48
  3. package/agents/pan-conductor.md +2 -3
  4. package/agents/pan-counterfactual.md +1 -2
  5. package/agents/pan-debugger.md +14 -3
  6. package/agents/pan-design-checker.md +1 -2
  7. package/agents/pan-designer.md +1 -2
  8. package/agents/pan-document_code.md +1 -2
  9. package/agents/pan-hardener.md +2 -3
  10. package/agents/pan-integration-checker.md +1 -2
  11. package/agents/pan-knowledge.md +1 -2
  12. package/agents/pan-meta-reviewer.md +3 -3
  13. package/agents/pan-optimizer.md +4 -4
  14. package/agents/pan-phase-researcher.md +79 -488
  15. package/agents/pan-plan-checker.md +12 -2
  16. package/agents/pan-planner.md +10 -6
  17. package/agents/pan-previewer.md +1 -2
  18. package/agents/pan-project-researcher.md +70 -499
  19. package/agents/pan-release.md +1 -1
  20. package/agents/pan-reviewer.md +9 -3
  21. package/agents/pan-roadmapper.md +12 -7
  22. package/agents/pan-verifier.md +7 -2
  23. package/bin/install-lib.cjs +134 -14
  24. package/bin/install.js +59 -12
  25. package/commands/pan/army.md +1 -1
  26. package/commands/pan/autodev.md +76 -0
  27. package/commands/pan/exec-phase.md +3 -4
  28. package/commands/pan/focus-auto.md +14 -7
  29. package/commands/pan/focus-design.md +4 -5
  30. package/commands/pan/focus-docs.md +24 -0
  31. package/commands/pan/learn.md +13 -6
  32. package/commands/pan/milestone-audit.md +8 -1
  33. package/commands/pan/milestone-done.md +10 -5
  34. package/commands/pan/milestone-new.md +2 -2
  35. package/commands/pan/new-project.md +15 -12
  36. package/commands/pan/plan-phase.md +15 -9
  37. package/commands/pan/quick.md +1 -1
  38. package/commands/pan/review-deep.md +11 -5
  39. package/commands/pan/settings.md +6 -0
  40. package/commands/pan/verify-phase.md +6 -2
  41. package/docs/AGENTS.md +917 -0
  42. package/docs/ARCHITECTURE.md +1054 -0
  43. package/docs/CLI-REFERENCE.md +4582 -0
  44. package/docs/COMPARISON.md +116 -0
  45. package/docs/DEVELOPMENT.md +490 -0
  46. package/docs/ECOSYSTEM-REVIEW-2026-06.md +107 -0
  47. package/docs/ECOSYSTEM-REVIEW-2026-08.md +349 -0
  48. package/docs/EXAMPLES.md +584 -0
  49. package/docs/FAQ.md +254 -0
  50. package/docs/FIELD-HARVEST-2026-07.md +88 -0
  51. package/docs/FIELD-REPORT-army-2026-06.md +121 -0
  52. package/docs/HOOKS.md +638 -0
  53. package/docs/IMPROVEMENT-TODO.md +246 -0
  54. package/docs/INTERNALS.md +485 -0
  55. package/docs/MIGRATION-v2-to-v3.md +258 -0
  56. package/docs/SECURITY-HARDENING.md +230 -0
  57. package/docs/SKILLS-ENHANCEMENT-PLAN-V2.md +122 -0
  58. package/docs/SKILLS-FULL-TEXT.md +9685 -0
  59. package/docs/SKILLS-REFERENCE.md +1037 -0
  60. package/docs/TROUBLESHOOTING.md +1084 -0
  61. package/docs/USER-GUIDE.md +1437 -0
  62. package/docs/archive/SKILLS-ENHANCEMENT-PLAN.md +230 -0
  63. package/docs/audits/AUDIT-2026-08-e2e-ROADMAP.md +117 -0
  64. package/docs/audits/AUDIT-2026-08-e2e-VERIFICATION.md +693 -0
  65. package/docs/audits/AUDIT-2026-08-e2e.md +1546 -0
  66. package/docs/audits/OUTSTANDING-2026-08.md +275 -0
  67. package/docs/audits/STABILITY-TEST-2026-08.md +640 -0
  68. package/docs/branding/README-brand-draft.md +119 -0
  69. package/docs/branding/handoff/IMPLEMENTATION.md +205 -0
  70. package/docs/branding/handoff/README-brand-draft.md +119 -0
  71. package/docs/branding/handoff/image-prompts.md +46 -0
  72. package/docs/branding/image-prompts.md +46 -0
  73. package/docs/branding/nano-banana-prompts.txt +60 -0
  74. package/docs/context-monitor.md +13 -0
  75. package/docs/decisions/ADR-0001-strategic-feature-prioritization.md +83 -0
  76. package/docs/decisions/ADR-0002-copilot-cli-runtime.md +71 -0
  77. package/docs/decisions/ADR-0003-smart-execution.md +84 -0
  78. package/docs/decisions/ADR-0004-copilot-cli-interaction.md +89 -0
  79. package/docs/decisions/ADR-0005-command-naming.md +80 -0
  80. package/docs/decisions/ADR-0006-focus-commands.md +101 -0
  81. package/docs/decisions/ADR-0007-ship-v1.md +73 -0
  82. package/docs/decisions/ADR-0008-map-codebase-mermaid-togaf.md +80 -0
  83. package/docs/decisions/ADR-0009-production-deployment-checklist.md +68 -0
  84. package/docs/decisions/ADR-0010-standards-integration.md +79 -0
  85. package/docs/decisions/ADR-0011-help-commands-rewrite.md +64 -0
  86. package/docs/decisions/ADR-0012-contributors-attribution-index.md +42 -0
  87. package/docs/decisions/ADR-0013-strategic-feature-additions.md +53 -0
  88. package/docs/decisions/ADR-0014-internal-cleanup-code-quality.md +53 -0
  89. package/docs/decisions/ADR-0015-focus-auto-runner.md +296 -0
  90. package/docs/decisions/ADR-0016-enhanced-doc-sync.md +54 -0
  91. package/docs/decisions/ADR-0017-enhanced-focus-design.md +69 -0
  92. package/docs/decisions/ADR-0018-user-reality-testing.md +84 -0
  93. package/docs/decisions/ADR-0019-end-to-end-user-acceptance-testing.md +113 -0
  94. package/docs/decisions/ADR-0020-ai-drift-prevention.md +55 -0
  95. package/docs/decisions/ADR-0021-codebase-mapper-v2.md +76 -0
  96. package/docs/decisions/ADR-0022-lifecycle-completeness.md +63 -0
  97. package/docs/decisions/ADR-0023-opus-4-7-adoption.md +89 -0
  98. package/docs/decisions/ADR-0024-spec-b-v2-completion.md +137 -0
  99. package/docs/decisions/ADR-0025-behavioral-guardrails-layer.md +129 -0
  100. package/docs/decisions/ADR-0026-self-improvement-loop.md +171 -0
  101. package/docs/decisions/ADR-0027-doc-code-link-graph.md +164 -0
  102. package/docs/decisions/ADR-0028-unified-agents-skills-target.md +46 -0
  103. package/docs/decisions/ADR-0029-experiment-evaluator.md +76 -0
  104. package/docs/decisions/ADR-0030-planning-concurrency.md +37 -0
  105. package/docs/decisions/ADR-0031-focus-auto-backlog-source.md +47 -0
  106. package/docs/decisions/ADR-0032-squad-model.md +64 -0
  107. package/docs/decisions/ADR-0033-army-campaign.md +40 -0
  108. package/docs/decisions/ADR-0034-scheduled-campaigns.md +57 -0
  109. package/docs/decisions/ADR-0035-army-hud-dashboard.md +40 -0
  110. package/docs/decisions/ADR-0036-agentic-memory-architecture.md +106 -0
  111. package/docs/decisions/ADR-0037-pin-security-agents-to-opus.md +51 -0
  112. package/docs/decisions/ADR-0038-skill-aligned-decomposition.md +41 -0
  113. package/docs/decisions/ADR-0039-worktree-as-project-variant.md +37 -0
  114. package/docs/decisions/ADR-0040-memory-injection-defense.md +55 -0
  115. package/docs/decisions/ADR-0041-mcp-dual-era-bridge.md +47 -0
  116. package/docs/decisions/ADR-0042-design-parity-both-flows.md +45 -0
  117. package/docs/decisions/ADR-0043-addressable-planning-roots.md +56 -0
  118. package/docs/decisions/ADR-0044-bound-the-cached-context.md +104 -0
  119. package/docs/decisions/ADR-0045-agent-plugins-bundle.md +76 -0
  120. package/docs/decisions/ADR-0046-subagent-frontmatter-decisions.md +39 -0
  121. package/docs/decisions/ADR-0047-pan-harness.md +76 -0
  122. package/docs/decisions/ADR-0048-one-core-per-project.md +43 -0
  123. package/docs/decisions/ADR-0049-machine-verdicts-and-findings-ledger.md +116 -0
  124. package/docs/specs/ai_drift_prevention_featureai.md +286 -0
  125. package/docs/specs/codebase_mapper_v2_featureai.md +930 -0
  126. package/docs/specs/command_naming_optimization_featureai.md +930 -0
  127. package/docs/specs/comp_analysis_markdown_v1.md +149 -0
  128. package/docs/specs/continuous_autonomous_execution_featureai.md +304 -0
  129. package/docs/specs/contributors_attribution_index_featureai.md +476 -0
  130. package/docs/specs/copilot_cli_interaction_featureai.md +868 -0
  131. package/docs/specs/copilot_cli_runtime_featureai.md +647 -0
  132. package/docs/specs/custom-skills-assessment.md +461 -0
  133. package/docs/specs/deployment_audit_findings_featureai.md +243 -0
  134. package/docs/specs/doc_code_link_graph_featureai.md +253 -0
  135. package/docs/specs/documentation_alignment_cleanup_featureai.md +69 -0
  136. package/docs/specs/e2e_visual_testing_featureai.md +615 -0
  137. package/docs/specs/end_to_end_user_acceptance_testing_featureai.md +810 -0
  138. package/docs/specs/evidence-loop-plan.md +76 -0
  139. package/docs/specs/evidence_loop_featureai.md +497 -0
  140. package/docs/specs/focus-auto-optimize-category.md +449 -0
  141. package/docs/specs/focus-auto-optimize-superplan.md +188 -0
  142. package/docs/specs/focus_auto_runner_featureai.md +1102 -0
  143. package/docs/specs/focus_design_v2_featureai.md +197 -0
  144. package/docs/specs/focus_sync_v2_featureai.md +202 -0
  145. package/docs/specs/git_integration_overhaul_featureai.md +326 -0
  146. package/docs/specs/glm_zai_provider_featureai.md +200 -0
  147. package/docs/specs/googlecli_adoption_featureai.md +661 -0
  148. package/docs/specs/help_commands_rewrite_featureai.md +860 -0
  149. package/docs/specs/industry_analysis_strategic_additions_featureai.md +231 -0
  150. package/docs/specs/industry_comparison_and_feature_gaps_featureai.md +674 -0
  151. package/docs/specs/internal_cleanup_code_quality_featureai.md +486 -0
  152. package/docs/specs/investigations/README.md +31 -0
  153. package/docs/specs/investigations/digests/2026-09-28.md +47 -0
  154. package/docs/specs/investigations/digests/2026-10-08.md +62 -0
  155. package/docs/specs/investigations/digests/2026-10-10.md +61 -0
  156. package/docs/specs/investigations/features/debugger-red-loop-first.md +55 -0
  157. package/docs/specs/investigations/features/harness-cross-host-behaviour.md +93 -0
  158. package/docs/specs/investigations/features/optimize-apply-regression-gate.md +66 -0
  159. package/docs/specs/investigations/features/reviewer-smell-baseline.md +57 -0
  160. package/docs/specs/investigations/features/trace-failure-capture.md +69 -0
  161. package/docs/specs/lifecycle_completeness_featureai.md +754 -0
  162. package/docs/specs/local-first-ci.md +42 -0
  163. package/docs/specs/map_codebase_mermaid_togaf_featureai.md +805 -0
  164. package/docs/specs/market-delta-2026-09-superplan.md +310 -0
  165. package/docs/specs/market-ideas-2026-09.md +131 -0
  166. package/docs/specs/market-ideas-2026-10.md +428 -0
  167. package/docs/specs/market-ideas-ledger.md +177 -0
  168. package/docs/specs/memory-optimization-2026-10.md +285 -0
  169. package/docs/specs/multi-track-planning-roots.md +143 -0
  170. package/docs/specs/multi_model_routing_featureai.md +687 -0
  171. package/docs/specs/multi_model_routing_superplan.md +197 -0
  172. package/docs/specs/opus_47_existing_enhancements_featureai.md +247 -0
  173. package/docs/specs/opus_47_extended_features_featureai.md +363 -0
  174. package/docs/specs/opus_47_extended_features_v2_featureai.md +397 -0
  175. package/docs/specs/pan_focus_commands_featureai.md +2336 -0
  176. package/docs/specs/pan_zcode_mcp_bridge_featureai.md +120 -0
  177. package/docs/specs/product-excellence-superplan.md +315 -0
  178. package/docs/specs/product_excellence_program_2026_q4_featureai.md +365 -0
  179. package/docs/specs/production_deployment_readiness_featureai.md +433 -0
  180. package/docs/specs/production_readiness_ship_v1_featureai.md +698 -0
  181. package/docs/specs/real_test_enforcement_featureai.md +213 -0
  182. package/docs/specs/reality-check-2026-09-superplan.md +362 -0
  183. package/docs/specs/right-sized-ceremony.md +74 -0
  184. package/docs/specs/roadmap_and_competition_2026_q4_featureai.md +390 -0
  185. package/docs/specs/self_improvement_loop_featureai.md +875 -0
  186. package/docs/specs/skill-aligned-decomposition.md +155 -0
  187. package/docs/specs/standards_integration_featureai.md +833 -0
  188. package/docs/specs/testing-system-redesign-2026-09.md +267 -0
  189. package/docs/specs/user_reality_testing_system_featureai.md +788 -0
  190. package/docs/specs/watch-triggers.json +22 -0
  191. package/docs/specs/workflow-integration-redesign.md +742 -0
  192. package/docs/specs/workflow_state_consistency_featureai.md +183 -0
  193. package/hooks/dist/pan-context-monitor.js +9 -2
  194. package/hooks/dist/pan-cost-logger.js +5 -0
  195. package/hooks/dist/pan-guard.js +28 -5
  196. package/hooks/dist/pan-stop-guard.js +9 -9
  197. package/hooks/dist/pan-trace-logger.js +5 -0
  198. package/package.json +10 -2
  199. package/pan-wizard-core/bin/lib/agents-md.cjs +57 -8
  200. package/pan-wizard-core/bin/lib/autodev-report.cjs +180 -0
  201. package/pan-wizard-core/bin/lib/autodev.cjs +642 -0
  202. package/pan-wizard-core/bin/lib/ci.cjs +143 -0
  203. package/pan-wizard-core/bin/lib/commands.cjs +1 -1
  204. package/pan-wizard-core/bin/lib/config.cjs +31 -2
  205. package/pan-wizard-core/bin/lib/constants.cjs +27 -1
  206. package/pan-wizard-core/bin/lib/core.cjs +22 -10
  207. package/pan-wizard-core/bin/lib/cost.cjs +14 -4
  208. package/pan-wizard-core/bin/lib/cross-family.cjs +164 -0
  209. package/pan-wizard-core/bin/lib/debug-cases.cjs +104 -0
  210. package/pan-wizard-core/bin/lib/failure-class.cjs +81 -0
  211. package/pan-wizard-core/bin/lib/findings.cjs +34 -4
  212. package/pan-wizard-core/bin/lib/focus.cjs +1 -1
  213. package/pan-wizard-core/bin/lib/hosts.cjs +88 -0
  214. package/pan-wizard-core/bin/lib/init.cjs +7 -2
  215. package/pan-wizard-core/bin/lib/knowledge.cjs +2 -0
  216. package/pan-wizard-core/bin/lib/merge.cjs +50 -0
  217. package/pan-wizard-core/bin/lib/mutate.cjs +16 -5
  218. package/pan-wizard-core/bin/lib/next-action.cjs +112 -0
  219. package/pan-wizard-core/bin/lib/optimize.cjs +2 -2
  220. package/pan-wizard-core/bin/lib/phase.cjs +48 -4
  221. package/pan-wizard-core/bin/lib/plan-lint.cjs +150 -1
  222. package/pan-wizard-core/bin/lib/preview.cjs +23 -4
  223. package/pan-wizard-core/bin/lib/requirements-lint.cjs +130 -0
  224. package/pan-wizard-core/bin/lib/research-lint.cjs +150 -3
  225. package/pan-wizard-core/bin/lib/review-deep.cjs +14 -22
  226. package/pan-wizard-core/bin/lib/review-vote.cjs +105 -0
  227. package/pan-wizard-core/bin/lib/runner.cjs +2 -16
  228. package/pan-wizard-core/bin/lib/sizing.cjs +356 -0
  229. package/pan-wizard-core/bin/lib/squads.cjs +1 -1
  230. package/pan-wizard-core/bin/lib/state-write.cjs +247 -0
  231. package/pan-wizard-core/bin/lib/uat.cjs +149 -0
  232. package/pan-wizard-core/bin/lib/verdict.cjs +26 -3
  233. package/pan-wizard-core/bin/lib/verify-plan-set.cjs +30 -1
  234. package/pan-wizard-core/bin/lib/verify-preflight.cjs +2 -2
  235. package/pan-wizard-core/bin/lib/verify-red.cjs +37 -1
  236. package/pan-wizard-core/bin/lib/verify-retro.cjs +3 -2
  237. package/pan-wizard-core/bin/lib/verify.cjs +59 -4
  238. package/pan-wizard-core/bin/lib/worktree.cjs +70 -0
  239. package/pan-wizard-core/bin/pan-tools.cjs +168 -27
  240. package/pan-wizard-core/learnings/universal/autonomous-loop.md +2 -2
  241. package/pan-wizard-core/references/continuation-format.md +3 -3
  242. package/pan-wizard-core/references/guardrails.md +1 -1
  243. package/pan-wizard-core/references/model-profiles.md +2 -3
  244. package/pan-wizard-core/references/questioning.md +24 -0
  245. package/pan-wizard-core/references/ui-brand.md +4 -6
  246. package/pan-wizard-core/references/verdict-contract.md +2 -1
  247. package/pan-wizard-core/templates/config.json +5 -1
  248. package/pan-wizard-core/templates/debug.md +1 -0
  249. package/pan-wizard-core/templates/discovery.md +2 -2
  250. package/pan-wizard-core/templates/requirements.md +9 -0
  251. package/pan-wizard-core/workflows/add-phase.md +4 -6
  252. package/pan-wizard-core/workflows/assumptions.md +19 -1
  253. package/pan-wizard-core/workflows/diagnose-issues.md +2 -0
  254. package/pan-wizard-core/workflows/discuss-phase.md +4 -2
  255. package/pan-wizard-core/workflows/exec-lean.md +69 -0
  256. package/pan-wizard-core/workflows/exec-phase.md +36 -8
  257. package/{commands/pan → pan-wizard-core/workflows}/focus-doc-audit.md +13 -29
  258. package/{commands/pan → pan-wizard-core/workflows}/focus-drift-walking.md +3 -18
  259. package/{commands/pan → pan-wizard-core/workflows}/focus-exec.md +8 -23
  260. package/{commands/pan → pan-wizard-core/workflows}/focus-plan.md +6 -20
  261. package/{commands/pan → pan-wizard-core/workflows}/focus-scan.md +3 -16
  262. package/{commands/pan → pan-wizard-core/workflows}/focus-sync.md +7 -21
  263. package/pan-wizard-core/workflows/health.md +6 -0
  264. package/pan-wizard-core/workflows/help.md +31 -53
  265. package/pan-wizard-core/workflows/insert-phase.md +4 -6
  266. package/pan-wizard-core/workflows/learn.md +3 -3
  267. package/pan-wizard-core/workflows/milestone-audit.md +2 -2
  268. package/pan-wizard-core/workflows/milestone-new.md +38 -95
  269. package/pan-wizard-core/workflows/new-project.md +96 -258
  270. package/pan-wizard-core/workflows/optimize.md +107 -5
  271. package/pan-wizard-core/workflows/phase-tests.md +10 -0
  272. package/pan-wizard-core/workflows/plan-phase.md +86 -43
  273. package/pan-wizard-core/workflows/profile.md +50 -0
  274. package/pan-wizard-core/workflows/progress.md +10 -0
  275. package/pan-wizard-core/workflows/quick.md +34 -43
  276. package/pan-wizard-core/workflows/research-phase.md +118 -40
  277. package/pan-wizard-core/workflows/resume-project.md +18 -2
  278. package/pan-wizard-core/workflows/settings.md +21 -24
  279. package/pan-wizard-core/workflows/todo-check.md +6 -2
  280. package/pan-wizard-core/workflows/transition.md +22 -4
  281. package/pan-wizard-core/workflows/uat-walkthrough.md +90 -0
  282. package/pan-wizard-core/workflows/update.md +1 -1
  283. package/pan-wizard-core/workflows/verify-phase.md +2 -2
  284. package/scripts/build-agent-plugin.js +35 -15
  285. package/scripts/build-plugin.js +10 -1
  286. package/scripts/deprecate-old-versions.js +70 -3
  287. package/scripts/generate-skills-docs.py +1 -1
  288. package/scripts/git-hooks/pre-push +27 -0
  289. package/scripts/install-git-hooks.js +7 -5
  290. package/scripts/install-pre-push.cjs +38 -0
  291. package/scripts/land.cjs +151 -0
  292. package/scripts/local-ci.cjs +501 -0
  293. package/scripts/local-schedule.cjs +277 -0
  294. package/scripts/prompt-lint.cjs +32 -0
  295. package/scripts/prompt-rules.cjs +156 -0
  296. package/scripts/run-tests.cjs +7 -1
  297. package/scripts/test-quality-lint.cjs +3 -3
  298. package/scripts/test-surface.cjs +9 -2
  299. package/agents/pan-research-synthesizer.md +0 -246
  300. package/commands/pan/audit-deployment.md +0 -386
  301. package/commands/pan/dashboard.md +0 -22
  302. package/commands/pan/discord.md +0 -19
  303. package/commands/pan/mcp-bridge.md +0 -143
  304. package/commands/pan/milestone-cleanup.md +0 -19
  305. package/commands/pan/milestone-gaps.md +0 -35
  306. package/commands/pan/optimize.md +0 -115
  307. package/commands/pan/profile.md +0 -76
  308. package/commands/pan/research-phase.md +0 -189
  309. package/pan-wizard-core/bin/lib/bridge.cjs +0 -269
  310. package/pan-wizard-core/templates/research-project/architecture.md +0 -210
  311. package/pan-wizard-core/templates/research-project/features.md +0 -153
  312. package/pan-wizard-core/templates/research-project/pitfalls.md +0 -206
  313. package/pan-wizard-core/templates/research-project/stack.md +0 -126
  314. package/pan-wizard-core/templates/research-project/summary.md +0 -170
package/README.md CHANGED
@@ -175,7 +175,7 @@ npx pan-wizard --all --global # Install to all directories
175
175
  ```
176
176
 
177
177
  Use `--global` (`-g`) to install into your home config directory; `--local` (`-l`) is the default and may be omitted.
178
- Use `--claude`, `--opencode`, `--gemini`, `--codex`, `--copilot`, or `--all` to skip the runtime prompt. A local install also writes outside the runtime directory: a marker-fenced PAN section in the project's `AGENTS.md`; for Claude Code, a marker-fenced block in `CLAUDE.md` (the `@AGENTS.md` import, and compact instructions that keep PAN's position through compaction) and a `pan` MCP server in `.mcp.json`; and for Codex or `--unified-skills`, the shared `.agents/` tree (skills, plus a shared core under `--unified-skills`). `--uninstall` removes them (the `AGENTS.md` and `CLAUDE.md` blocks and the `.agents/` tree stay while another PAN runtime in the project still uses them).
178
+ Use `--claude`, `--opencode`, `--gemini`, `--codex`, `--copilot`, or `--all` to skip the runtime prompt. A local install also writes outside the runtime directory: a marker-fenced PAN section in the project's `AGENTS.md`; for Claude Code, a marker-fenced block in `CLAUDE.md` (the `@AGENTS.md` import, and compact instructions that keep PAN's position through compaction) and a `pan` MCP server in `.mcp.json`; and for Codex or `--unified-skills`, the shared `.agents/` tree (skills, plus a shared core under `--unified-skills`). An update rewrites those blocks only while they hold PAN's own text: once your project edits one, PAN keeps your version and says so. `--uninstall` removes them (the `AGENTS.md` and `CLAUDE.md` blocks and the `.agents/` tree stay while another PAN runtime in the project still uses them).
179
179
  Add `--unified-skills` to install commands as one shared `.agents/skills/` tree instead of per-runtime formats. Codex, Gemini CLI, OpenCode, Copilot CLI and Antigravity CLI read that tree; Claude Code does not, so for Claude the installer also copies each skill into `.claude/skills/` and the commands become `/pan-<name>`. Gemini CLI gives skills no slash command, so on a unified Gemini install you ask for the task and `/skills list` shows what loaded. See the User Guide for details.
180
180
 
181
181
  > **Gemini CLI note:** from June 18, 2026, Google's Gemini CLI serves Gemini Code Assist (Standard/Enterprise) customers; individual free / AI Pro / Ultra accounts are directed to Antigravity CLI instead. PAN's `--gemini` target installs for Gemini CLI. Antigravity CLI is not yet a PAN install target, but it reads the shared `.agents/skills/` tree natively — install with `--unified-skills` and PAN's commands are usable from Antigravity in the same project.
@@ -296,13 +296,13 @@ If you prefer not to use that flag, add this to your project's `.claude/settings
296
296
  One command, one flow. The system:
297
297
 
298
298
  1. **Questions** — Asks until it understands your idea completely (goals, constraints, tech preferences, edge cases)
299
- 2. **Research** — Spawns parallel agents to investigate the domain (optional but recommended)
299
+ 2. **Research** — Off by default. With `--research`, one agent answers the few open questions that block building, each with a source; `--research market` also compares a handful of comparable products
300
300
  3. **Requirements** — Extracts what's v1, v2, and out of scope
301
301
  4. **Roadmap** — Creates phases mapped to requirements
302
302
 
303
303
  You approve the roadmap. Now you're ready to build.
304
304
 
305
- **Creates:** `project.md`, `requirements.md`, `roadmap.md`, `state.md`, `.planning/research/`
305
+ **Creates:** `project.md`, `requirements.md`, `roadmap.md`, `state.md`, and `.planning/research/` when research was asked for
306
306
 
307
307
  ---
308
308
 
@@ -325,7 +325,7 @@ The system analyzes the phase and identifies gray areas based on what's being bu
325
325
 
326
326
  For each area you select, it asks until you're satisfied. The output — `context.md` — feeds directly into the next two steps:
327
327
 
328
- 1. **Researcher reads it** — Knows what patterns to investigate ("user wants card layout" → research card component libraries)
328
+ 1. **Researcher reads it** (when research is on) — Knows what patterns to investigate ("user wants card layout" → research card component libraries)
329
329
  2. **Planner reads it** — Knows what decisions are locked ("infinite scroll decided" → plan includes scroll handling)
330
330
 
331
331
  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.
@@ -342,13 +342,13 @@ The deeper you go here, the more the system builds what you actually want. Skip
342
342
 
343
343
  The system:
344
344
 
345
- 1. **Researches** — Investigates how to implement this phase, guided by your context.md decisions
345
+ 1. **Researches (opt-in)** — With `--research` or `workflow.research: true`, answers the open questions that block planning this phase, guided by your context.md decisions
346
346
  2. **Plans** — Creates atomic plans of 2-3 tasks each, with XML structure
347
- 3. **Verifies** — Checks plans against requirements; up to three checker passes (two revisions), then the remaining issues come to you
347
+ 3. **Verifies** — Checks plans against requirements: two checker passes (one revision) by default, three (two revisions) under the `quality` profile, `workflow.ceremony: full` or `--quality`; then the remaining issues come to you. A small phase whose requirements each say precisely what to build is planned and checked by the engine instead, with no planner or checker
348
348
 
349
349
  Each plan is small enough to execute in a fresh context window. No degradation, no "I'll be more concise now."
350
350
 
351
- **Creates:** `{phase_num}-research.md`, `{phase_num}-{N}-plan.md`, `{phase_num}-plan-check.md` (the checker's report, when the checker runs)
351
+ **Creates:** `{phase_num}-{N}-plan.md`, `{phase_num}-plan-check.md` (the checker's report, when the checker runs), `{phase_num}-research.md` (only with `--research` or `workflow.research: true`)
352
352
 
353
353
  ---
354
354
 
@@ -423,7 +423,7 @@ The system:
423
423
  3. **Reports the gaps** — a verification report with a per-truth status and the recommended fix plans
424
424
  4. **Hands the gaps to the planner** — `/pan:plan-phase N --gaps` writes the fix plans (`gap_closure: true`); `/pan:exec-phase N --gaps-only` runs just those
425
425
 
426
- On Claude Code, `/pan-diagnose-issues <phase>` spawns one debugger per failed UAT truth to find root causes. Manual acceptance testing stays yours: use the feature and record what you find in the phase's UAT file.
426
+ Manual acceptance testing stays yours, and `/pan:verify-phase 1 --uat` walks you through it on every runtime: one acceptance test at a time, each answer recorded through the engine into the phase's UAT file, and the issues you report diagnosed (one debugger per failed truth; on Claude Code the native `/pan-diagnose-issues <phase>` script does the same in parallel) for `/pan:plan-phase N --gaps`.
427
427
 
428
428
  **Creates:** `{phase_num}-verification.md`; fix plans follow from `/pan:plan-phase N --gaps`
429
429
 
@@ -443,11 +443,11 @@ On Claude Code, `/pan-diagnose-issues <phase>` spawns one debugger per failed UA
443
443
 
444
444
  Loop **discuss → plan → execute → verify** until milestone complete.
445
445
 
446
- Each phase gets your input (discuss), proper research (plan), clean execution (execute), and goal-backward verification (verify). Context stays fresh. Quality stays high.
446
+ Each phase gets your input (discuss), a checked plan (plan; research only when you ask for it), clean execution (execute), and goal-backward verification (verify). Context stays fresh. Quality stays high.
447
447
 
448
448
  When all phases are done, `/pan:milestone-done` archives the milestone and tags the release.
449
449
 
450
- 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.
450
+ 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 answers any open questions if you ask it to research, you scope requirements, and it creates a fresh roadmap. Each milestone is a clean cycle: define → build → ship.
451
451
 
452
452
  ---
453
453
 
@@ -461,8 +461,8 @@ Then `/pan:milestone-new` starts the next version — same flow as `new-project`
461
461
 
462
462
  Quick mode gives you PAN guarantees (atomic commits, state tracking) with a faster path:
463
463
 
464
- - **Same agents** — Planner + executor, same quality
465
- - **Skips optional steps** — No research, no plan checker, no verifier
464
+ - **Same agents** — Planner + executor, same quality; a task whose description already says precisely what to build gets its one-task plan from the engine, with no planner
465
+ - **Skips optional steps** — No research, no plan checker, no verifier (`--full` adds the plan checker and the verifier)
466
466
  - **Separate tracking** — Lives in `.planning/quick/`, not phases
467
467
 
468
468
  Use for: bug fixes, small features, config changes, one-off tasks.
@@ -487,7 +487,7 @@ PAN handles it for you:
487
487
  | File | What it does |
488
488
  |------|--------------|
489
489
  | `project.md` | Project vision, read when PAN plans, researches or resumes work |
490
- | `research/` | Ecosystem knowledge (stack, features, architecture, pitfalls) |
490
+ | `research/` | Answers to the open questions that blocked building (only with `--research`) |
491
491
  | `requirements.md` | Scoped v1/v2 requirements with phase traceability |
492
492
  | `roadmap.md` | Where you're going, what's done |
493
493
  | `state.md` | Decisions, blockers, position — memory across sessions |
@@ -524,14 +524,14 @@ Every stage uses the same pattern: a thin orchestrator spawns specialized agents
524
524
 
525
525
  | Stage | Orchestrator does | Agents do |
526
526
  |-------|------------------|-----------|
527
- | Research | Coordinates, presents findings | Parallel researchers investigate stack, features, architecture and pitfalls |
528
- | Planning | Validates, manages iteration | Planner creates plans, checker verifies, up to three passes |
527
+ | Research (opt-in) | Writes the open questions, checks the answers | One researcher answers each question with a source, or records an assumption |
528
+ | Planning | Validates, manages iteration | Planner creates plans, checker verifies (one revision on the sized ceremony; up to three passes under `quality` or `--quality`); a precisely specified small phase is planned and checked by the engine instead |
529
529
  | Execution | Groups into waves, tracks progress | Executors implement in parallel, each in a fresh context (native sub-agents on Claude Code, each runtime's own delegation elsewhere) |
530
530
  | Verification | Presents results, routes next | Verifier checks codebase against goals; on Claude Code, `/pan-diagnose-issues` sends one debugger per failed UAT truth |
531
531
 
532
532
  The orchestrator never does heavy lifting. It spawns agents, waits, integrates results.
533
533
 
534
- **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 small, because the work happens in fresh subagent contexts. Your session stays fast and responsive.
534
+ **The result:** You can run an entire phase — research when you ask for it, multiple plans created and verified, thousands of lines of code written across parallel executors, automated verification against goals — and your main context window stays small, because the work happens in fresh subagent contexts. Your session stays fast and responsive.
535
535
 
536
536
  ### Reasoning-Trace Handoff
537
537
 
@@ -585,13 +585,13 @@ You're never locked in. The system adapts.
585
585
  |---|---|---|---|---|
586
586
  | **Context rot prevention** | Phase-scoped fresh context windows (native sub-agents on Claude Code) | No — context degrades over time | No (Cline: condensing) | No |
587
587
  | **Multi-agent** | Specialized agents, parallel waves | Parallel agents in worktrees (Cursor) | Single agent (Cline: subagents) | Custom agents as subagents |
588
- | **Plan → Verify loop** | Research → plan → verify with iteration | Agent generates plan | Plan mode (Cline) | Plan step |
589
- | **Post-execution verification** | Auto verifier with a test-suite gate (UAT is a template no command runs) | Iterative error-fix | Manual test runs | Auto-fix loop |
588
+ | **Plan → Verify loop** | Plan → verify with iteration (research opt-in), right-sized in code: a precisely specified phase is planned and checked by the engine | Agent generates plan | Plan mode (Cline) | Plan step |
589
+ | **Post-execution verification** | Auto verifier with a test-suite gate, plus a UAT walkthrough (`/pan:verify-phase N --uat`) | Iterative error-fix | Manual test runs | Auto-fix loop |
590
590
  | **Session persistence** | state.md + pause/resume + handoff | Memory tool / transcripts | None / checkpoints (Cline) | Copilot Memory, CLI session recovery |
591
591
  | **Runtime support** | Claude Code, OpenCode, Gemini CLI, Codex, Copilot CLI | IDE-locked | Terminal / VS Code | VS Code + CLI |
592
592
  | **Zero dependencies** | Yes (Node builtins only) | No (Electron) | No (Python / Node) | No |
593
593
 
594
- 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.
594
+ 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, answering the open questions before planning when you ask it to, verifying after execution, and maintaining state across sessions.
595
595
 
596
596
  > For the full comparison across the major AI coding tools and many dimensions, see [COMPARISON.md](docs/COMPARISON.md).
597
597
 
@@ -603,26 +603,26 @@ PAN is not a replacement for your IDE or AI agent — it's the orchestration lay
603
603
 
604
604
  | Command | What it does |
605
605
  |---------|--------------|
606
- | `/pan:new-project [--auto]` | Full initialization: questions → research → requirements → roadmap |
606
+ | `/pan:new-project [--auto] [--research [market]]` | Full initialization: questions → research (opt-in) → requirements → roadmap |
607
607
  | `/pan:discuss-phase <N> [--auto]` | Capture implementation decisions before planning |
608
608
  | `/pan:design-phase <N>` | Design a phase — architecture, ADR, threat-lite — before planning |
609
- | `/pan:plan-phase [N] [--auto]` | Research + plan + verify for a phase |
609
+ | `/pan:plan-phase [N] [--auto]` | Plan + verify for a phase (research with `--research`); `--research-only <N>` runs the research step alone |
610
610
  | `/pan:exec-phase <N>` | Execute all plans in parallel waves, verify when complete |
611
- | `/pan:verify-phase [N]` | Re-run goal-backward verification with a test-suite gate; lists gaps for `/pan:plan-phase N --gaps` ¹ |
612
- | `/pan:milestone-audit` | Verify milestone achieved its definition of done |
613
- | `/pan:milestone-done <version>` | Archive milestone, tag release |
614
- | `/pan:milestone-new [name]` | Start next version: questions → research → requirements → roadmap |
611
+ | `/pan:verify-phase [N] [--uat]` | Re-run goal-backward verification with a test-suite gate; lists gaps for `/pan:plan-phase N --gaps` ¹. `--uat` walks you through the phase's acceptance tests instead, on every runtime |
612
+ | `/pan:autodev [run\|resume\|status]` | Run the roadmap unattended: a deterministic loop plans, executes, verifies and completes each phase, each step in a fresh host session (a lean phase is planned by the engine and built, reviewed and verified in one session), and stops in code (done, human needed, gate failed, CI failed, forecast exceeded, budget, turns, no progress) |
613
+ | `/pan:milestone-audit` | Verify milestone achieved its definition of done; `--gaps` creates phases to close the gaps the audit found |
614
+ | `/pan:milestone-done <version>` | Archive milestone, tag release; `--cleanup` archives accumulated phase directories from completed milestones |
615
+ | `/pan:milestone-new [name]` | Start next version: questions → research (opt-in) → requirements → roadmap |
615
616
 
616
617
  ### Navigation
617
618
 
618
619
  | Command | What it does |
619
620
  |---------|--------------|
620
621
  | `/pan:progress` | Where am I? What's next? |
621
- | `/pan:hud` (alias `/pan:dashboard`) | Render a self-contained HTML dashboard of project + bot-army state to `.planning/hud.html` (`--open`, `--out`, `--stdout`) |
622
+ | `/pan:hud` | Render a self-contained HTML dashboard of project + bot-army state to `.planning/hud.html` (`--open`, `--out`, `--stdout`); the old name `/pan:dashboard` still works |
622
623
  | `/pan:report phase <N> \| index \| all` | Self-contained HTML report for one phase, or a timeline index linking every phase report (`--out`, `--open`, `--stdout` on `phase` and `index`; `--bundle` on `index` inlines every phase report into one file; `all` regenerates every phase report plus the index and takes only `--open`) |
623
624
  | `/pan:help` | Show all commands and usage guide |
624
625
  | `/pan:update` | Update PAN with changelog preview |
625
- | `/pan:discord` | Join the PAN Discord community |
626
626
 
627
627
  ### Brownfield
628
628
 
@@ -644,7 +644,6 @@ PAN is not a replacement for your IDE or AI agent — it's the orchestration lay
644
644
  | `/pan:insert-phase <after> <description>` | Insert urgent work between phases |
645
645
  | `/pan:remove-phase <N>` | Remove future phase, renumber |
646
646
  | `/pan:assumptions <N>` | See Claude's intended approach before planning |
647
- | `/pan:milestone-gaps` | Create phases to close gaps from audit |
648
647
 
649
648
  ### Session
650
649
 
@@ -657,20 +656,17 @@ PAN is not a replacement for your IDE or AI agent — it's the orchestration lay
657
656
 
658
657
  | Command | What it does |
659
658
  |---------|--------------|
660
- | `/pan:settings` | Configure model profile, workflow agents, branching and the phase budget |
661
- | `/pan:profile <profile>` | Switch model profile (quality/balanced/budget) |
659
+ | `/pan:settings` | Configure model profile, workflow agents, branching and the phase budget; `--profile <profile>` switches the model profile (quality/balanced/budget) directly |
662
660
  | `/pan:todo-add [desc]` | Capture idea for later |
663
661
  | `/pan:todo-check` | List pending todos |
664
662
  | `/pan:debug [desc]` | Systematic debugging with persistent state |
665
- | `/pan:quick [--full]` | Execute ad-hoc task with PAN guarantees (`--full` adds plan-checking and verification) |
663
+ | `/pan:quick [--full] [--quality]` | Execute ad-hoc task with PAN guarantees (`--full` adds plan-checking and verification; `--quality` gives one run the full ceremony, with a planner even for a precisely described task) |
666
664
  | `/pan:health [--repair]` | Validate `.planning/` directory integrity; `--repair` fixes the issues it marks repairable |
667
665
  | `/pan:hygiene [--apply] [--trace-age-days N] [--all-tracks]` | Scan for PAN version drift and stale project artifacts (legacy filenames, .tmp orphans, memory bloat and stale or expired memory entries, poisoned cost ledgers, trace and report debris, cached-context bloat, fragment planning dirs) and Claude Code's own memory index (reported, never edited); `--apply` executes the safe fixes — poisoned ledgers are quarantined by rename (only the newest quarantine copy is kept), and settled `state.md` history, shipped roadmap phases and stale memory entries are archived rather than dropped |
668
666
  | `/pan:links [--strict] [--doc-root <dir>] [--source-root <dir>]` | Validate the doc-code link graph: inline `[[<id>]]` refs, `// @pan:` source anchors, `require-code-mention` contracts (ADR-0027). The default roots are PAN's own source layout, so pass your project's roots |
669
667
  | `/pan:phase-tests <N> [instructions]` | Generate tests for a completed phase from its summaries, context decisions and verification report |
670
- | `/pan:milestone-cleanup` | Archive accumulated phase directories from completed milestones |
671
668
  | `/pan:retro` | Milestone retrospective — estimation accuracy, verification patterns, gap analysis |
672
669
  | `/pan:patches` | Restore local modifications after a PAN update |
673
- | `/pan:research-phase <N>` | Standalone deep research for a phase (usually part of plan-phase) |
674
670
  | `/pan:phase-budget` | Estimate context window utilization for current phase |
675
671
  | `/pan:experiment <subcommand>` | Manage external self-improvement experiments — scaffold, run, harvest, promote findings back to PAN (never inside the PAN source repo) |
676
672
 
@@ -691,14 +687,9 @@ PAN is not a replacement for your IDE or AI agent — it's the orchestration lay
691
687
 
692
688
  | Command | What it does |
693
689
  |---------|--------------|
694
- | `/pan:focus-scan` | Collect, classify, and prioritize all work items with Reality Score |
695
- | `/pan:focus-plan` | Create capacity-budgeted execution batch (modes: bugfix, balanced, features, full) |
696
- | `/pan:focus-exec` | Execute items from batch with tier-based test cadence |
697
- | `/pan:focus-auto` | Continuous scan→plan→exec loop with purpose-driven categories and a layered safety harness |
698
- | `/pan:focus-sync` | Detect stale documentation (counts, missing commands, outdated references); `--all` also fixes it |
690
+ | `/pan:focus-auto` | Continuous scan→plan→exec loop with purpose-driven categories and a layered safety harness; `--step scan\|plan\|exec\|drift` runs one stage: scan collects and prioritizes work items with a Reality Score, plan builds a capacity-budgeted batch (modes: bugfix, balanced, features, full), exec runs the batch with tier-based test cadence, drift walks the tree to find and repair doc-code drift |
699
691
  | `/pan:focus-design` | Multi-phase strategic feature investigation pipeline |
700
- | `/pan:focus-drift-walking` | Walk project tree, detect doc-code drift, score severity, auto-repair |
701
- | `/pan:focus-doc-audit` | Multi-dimensional document audit with a quality score per dimension |
692
+ | `/pan:focus-docs` | Multi-dimensional document audit with a quality score per dimension; `--sync` detects stale documentation (counts, missing commands, outdated references), and `--sync --all` also fixes it |
702
693
 
703
694
  ### Cost, Foresight & Review
704
695
 
@@ -709,16 +700,13 @@ PAN is not a replacement for your IDE or AI agent — it's the orchestration lay
709
700
  | `/pan:review-deep <phase>` | Security audit (OWASP + STRIDE) + cross-check by meta-reviewer |
710
701
  | `/pan:knowledge {ask\|discuss\|playbook}` | Grounded Q&A, multi-turn discussion, or aggregate memory into playbook |
711
702
  | `/pan:what-if <phase> "scenario"` | Counterfactual phase replay in isolated git worktree |
712
- | `/pan:mcp-bridge {list\|recommend\|cache}` | List the MCP tools recorded in its cache (only `cache --servers` or an external script writes it) and recommend the ones relevant to a phase |
713
703
 
714
704
  ### Optimization & Git
715
705
 
716
706
  | Command | What it does |
717
707
  |---------|--------------|
718
- | `/pan:learn` | Analyze trace events and write an optimization report. `/pan:optimize apply` records its suggestions; nothing is applied automatically |
719
- | `/pan:optimize {apply\|revert\|list\|stats\|trace}` | Record a report's suggestions for a person to act on (`apply`: notes in `.planning/optimization/suggestions.md`, config notes in `config-suggestions.md`), undo one apply (`revert <apply_id>` or `revert --last`), list reports, view stats, manage trace sessions |
708
+ | `/pan:learn` | Analyze trace events and write an optimization report; nothing is applied automatically. `--optimize {apply\|revert\|list\|stats\|trace}` records a report's suggestions for a person to act on (`apply`: notes in `.planning/optimization/suggestions.md`, config notes in `config-suggestions.md`), undoes one apply (`revert <apply_id>` or `revert --last`), lists reports, shows stats and manages trace sessions |
720
709
  | `/pan:git <subcommand>` | Phase-aware git workflow: commit/branch/push/status/log/stash/diff/rollback/tag/sync |
721
- | `/pan:audit-deployment <target-directory> [--enhancements] [--repair]` | Audit a PAN installation for integrity, project health, and draft enhancement specs |
722
710
 
723
711
  <sup>¹ Contributed by reddit user OracleGreyBeard</sup>
724
712
 
@@ -744,14 +732,14 @@ Control which Claude model each agent uses. Balance quality vs token spend.
744
732
  | Profile | Planning | Execution | Verification |
745
733
  |---------|----------|-----------|--------------|
746
734
  | `quality` | reasoning | reasoning | reasoning |
747
- | `balanced` (default) | reasoning | reasoning | reasoning |
735
+ | `balanced` (default) | reasoning (planner); Sonnet for the plan-checker and the researchers | reasoning | reasoning |
748
736
  | `budget` | Sonnet | Sonnet | Haiku |
749
737
 
750
- > `reasoning` = the session model (inherit) — every agent runs on the model you launched the session with, except the reviewer-class agents (reviewer, hardener, meta-reviewer), which pin a reasoning-tier model on Claude Code. The other runtimes' agent files drop the pin, so there those agents inherit the session model too. Both `quality` and `balanced` resolve this way; only `budget` steps down — to a Sonnet/Haiku mix on Claude Code, and to the provider's own mid and fast models where PAN detects OpenAI (Codex) or Google (Gemini CLI) — under OpenCode, as `provider/model` ids for the provider of OpenCode's configured `model`, or, when that names none PAN routes for, the provider the runtime directories suggest (`.opencode/` alone counts as OpenAI); `pan-tools resolve-model <agent>` prints the id. Actual assignment varies by agent role — see [User Guide](docs/USER-GUIDE.md#model-profiles-per-agent-breakdown) for the full per-agent breakdown.
738
+ > `reasoning` = the session model (inherit) — the agent runs on the model you launched the session with, except the reviewer-class agents (reviewer, hardener, meta-reviewer), which pin a reasoning-tier model on Claude Code. The other runtimes' agent files drop the pin, so there those agents inherit the session model too. `quality` resolves every agent this way and runs the full ceremony on every phase; `balanced` moves only the plan-checker and the two researchers to the mid tier and sizes the ceremony (a precisely specified phase is planned and checked by the engine); `budget` steps every agent down — to a Sonnet/Haiku mix on Claude Code, and to the provider's own mid and fast models where PAN detects OpenAI (Codex) or Google (Gemini CLI) — under OpenCode, as `provider/model` ids for the provider of OpenCode's configured `model`, or, when that names none PAN routes for, the provider the runtime directories suggest (`.opencode/` alone counts as OpenAI); `pan-tools resolve-model <agent>` prints the id. Actual assignment varies by agent role — see [User Guide](docs/USER-GUIDE.md#model-profiles-per-agent-breakdown) for the full per-agent breakdown.
751
739
 
752
740
  Switch profiles:
753
741
  ```text
754
- /pan:profile budget
742
+ /pan:settings --profile budget
755
743
  ```
756
744
 
757
745
  Or configure via `/pan:settings`.
@@ -762,7 +750,7 @@ These spawn additional agents during planning/execution. They improve quality bu
762
750
 
763
751
  | Setting | Default | What it does |
764
752
  |---------|---------|--------------|
765
- | `workflow.research` | `true` | Researches domain before planning each phase |
753
+ | `workflow.research` | `false` | Research before planning each phase (opt-in: one researcher answers at most five open questions that block building); `/pan:plan-phase N --research` researches one phase |
766
754
  | `workflow.plan_check` | `true` | Verifies plans achieve phase goals before execution |
767
755
  | `workflow.verifier` | `true` | Confirms must-haves were delivered after execution |
768
756
  | `workflow.auto_advance` | `false` | Auto-chain discuss → plan → execute without stopping |
@@ -11,8 +11,7 @@ You are the PAN conductor. You coordinate a hierarchical execution of a phase: d
11
11
 
12
12
  You are spawned by `/pan:exec-phase <N> --hierarchical`. Without that flag, the normal flat exec path runs instead — you are never invoked by default.
13
13
 
14
- **CRITICAL: Mandatory Initial Read**
15
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This includes the phase plan and any audit log from prior runs.
14
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This includes the phase plan and any audit log from prior runs.
16
15
  </role>
17
16
 
18
17
  <safety_harness>
@@ -123,7 +122,7 @@ For each phase execution:
123
122
 
124
123
  <output_contract>
125
124
 
126
- On completion (success, partial, or abort), write `.planning/orchestration/summary.md`:
125
+ On completion (success, partial, or abort), write `.planning/orchestration/orchestration-summary.md` (not `summary.md`: Claude Code refuses a subagent's write to a file of that name):
127
126
 
128
127
  ```markdown
129
128
  ---
@@ -15,8 +15,7 @@ Your output has two parts:
15
15
  1. **Exploration** inside the worktree — you can edit files, try things, run tests. It's a safe sandbox.
16
16
  2. **Report** back to the main tree — one structured JSON payload that the command uses to write `.planning/counterfactuals/<phase>-<slug>.md`.
17
17
 
18
- **CRITICAL: Mandatory Initial Read**
19
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This typically includes the phase's plan, any existing summary, and the scenario text.
18
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This typically includes the phase's plan, any existing summary, and the scenario text.
20
19
  </role>
21
20
 
22
21
  <boundaries>
@@ -16,8 +16,7 @@ You are spawned by:
16
16
 
17
17
  Your job: Find the root cause through hypothesis testing, maintain debug file state, optionally fix and verify (depending on mode).
18
18
 
19
- **CRITICAL: Mandatory Initial Read**
20
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
19
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context.
21
20
 
22
21
  **Core responsibilities:**
23
22
  - Investigate autonomously (user reports symptoms, you find cause)
@@ -782,6 +781,7 @@ started: [when broke / always broken]
782
781
  command: [one command you have RUN that fails on the reported symptom, or "none"]
783
782
  fails_with: [the output that shows the symptom, secrets redacted]
784
783
  deterministic: [yes / rate N of M runs for a flaky bug]
784
+ requirement: [the requirement or UAT truth this reproduces, e.g. REQ-4, when there is one]
785
785
  tried: [only when command is "none": what you tried and why it cannot be built]
786
786
 
787
787
  ## Eliminated
@@ -907,9 +907,14 @@ Gather symptoms through questioning. Update file after EACH answer.
907
907
  - Run app/tests to observe behavior
908
908
  - APPEND to Evidence after each finding
909
909
 
910
+ **Phase 1a: Check the case base.** Before forming any theory, look for a resolved session with the same symptoms. A recurring bug starts from the root cause and fix that worked before. Treat a match as a lead to test, not a conclusion:
911
+ ```bash
912
+ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs debug similar "<expected vs actual, in the user's words>"
913
+ ```
914
+
910
915
  **Phase 1b: Reproduce before you theorise** (no hypothesis until this is written)
911
916
  - Build ONE command that drives the reported symptom: a failing test at the closest seam, a CLI call with a fixture, a script. It must assert the user's symptom, not merely run.
912
- - RUN it and record it in Reproduction (`command`, `fails_with`, secrets redacted). Run it again: the same verdict, or for a flaky bug a recorded rate.
917
+ - RUN it and record it in Reproduction (`command`, `fails_with`, secrets redacted, and `requirement:` naming the requirement or UAT truth it stands for, when there is one; a gap that breaks two requirements gets one reproduction each). Run it again: the same verdict, or for a flaky bug a recorded rate.
913
918
  - Shrink it: cut inputs and steps one at a time, re-running after each, while it still fails. Keep the smallest command that fails.
914
919
  - If no command can be built, write `command: none` and `tried:` (what you attempted, why it failed). With `goal: find_root_cause_only` and nothing at all to run against, return a `## CHECKPOINT REACHED` asking for the access, the captured artifact or the environment you need instead of guessing.
915
920
  - Reading code to build a theory before this is written is the failure this step prevents: a fix aimed at a neighbouring bug.
@@ -1010,6 +1015,12 @@ Update status to "fixing".
1010
1015
  <step name="request_human_verification">
1011
1016
  **Require user confirmation before marking resolved.**
1012
1017
 
1018
+ First the engine runs your reproduction. It must turn green, or the session is not done, whatever the fix looks like:
1019
+ ```bash
1020
+ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs debug repro "{slug}"
1021
+ ```
1022
+ `red` means the fix did not fix the reported symptom, so go back to investigating. `none` (no command could be built) leaves the closing to the human check below.
1023
+
1013
1024
  Update status to "awaiting_human_verify".
1014
1025
 
1015
1026
  Return:
@@ -15,8 +15,7 @@ Spawned by:
15
15
 
16
16
  Goal-backward verification of DESIGNS before planning or execution burns context. Start from what the change SHOULD deliver and prove the design addresses it — with a real architecture, honest trade-offs, covered threats, and machine-checkable success.
17
17
 
18
- **CRITICAL: Mandatory Initial Read**
19
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context (the design artifact, the boundary it must respect, and any spec/roadmap it derives from).
18
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context (the design artifact, the boundary it must respect, and any spec/roadmap it derives from).
20
19
 
21
20
  **Critical mindset:** A design describes intent. You verify it holds up. A design can have every section filled in and still fail if:
22
21
  - A stated requirement has no design element (silent drop)
@@ -15,8 +15,7 @@ Spawned by:
15
15
 
16
16
  Your job: produce a `{phase}-design.md` (from `templates/design.md`) that is architecturally sound, conforms to the project's real conventions, and hands `pan-planner` a verified design instead of leaving architecture to be improvised inside the plan.
17
17
 
18
- **CRITICAL: Mandatory Initial Read**
19
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context (the phase boundary from `roadmap.md`, any `{phase}-context.md`, and `{phase}-research.md` if present).
18
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context (the phase boundary from `roadmap.md`, any `{phase}-context.md`, and `{phase}-research.md` if present).
20
19
 
21
20
  **Read also:**
22
21
  - `~/.claude/pan-wizard-core/references/design-methodology.md` — the shared method and depth tiers. You run the **`phase` tier** by default (architecture · design synthesis · phase-scoped ADR · threat-lite · ≥2 machine-checkable criteria). `--spike` drops to the `spike` tier.
@@ -19,8 +19,7 @@ You are spawned by `/pan:map-codebase` with one of six focus areas:
19
19
 
20
20
  Your job: Explore thoroughly, then write document(s) directly. Return confirmation only.
21
21
 
22
- **CRITICAL: Mandatory Initial Read**
23
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
22
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context.
24
23
  </role>
25
24
 
26
25
  <mode>
@@ -12,12 +12,11 @@ You are the PAN hardener. You perform focused security review on files changed d
12
12
 
13
13
  This is **authorized, defensive** secure-coding review of the user's own codebase — the goal is to find and fix weaknesses before shipping. You report findings for the user to remediate; you never write exploit code, attack tooling, or step-by-step intrusion instructions.
14
14
 
15
- You are spawned by `/pan:review-deep <phase>`, `/pan:exec-phase --deep-review`, `/pan:focus-exec --deep-review` (per item, output under `.planning/reviews/<item-id>/`) or `/pan:focus-auto` Pass 3. Your output is read by `pan-meta-reviewer` (cross-checks you) and merged by `review-deep.cjs` into `.planning/reviews/<phase>/deep-review.md`.
15
+ You are spawned by `/pan:review-deep <phase>`, `/pan:exec-phase --deep-review`, `/pan:focus-auto --step exec --deep-review` (per item, output under `.planning/reviews/<item-id>/`) or `/pan:focus-auto` Pass 3. Your output is read by `pan-meta-reviewer` (cross-checks you) and merged by `review-deep.cjs` into `.planning/reviews/<phase>/deep-review.md`.
16
16
 
17
17
  **You NEVER modify source files.** Your one write is the report at the output path your prompt gives. You report findings; the user fixes them.
18
18
 
19
- **CRITICAL: Mandatory Initial Read**
20
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
19
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context.
21
20
  </role>
22
21
 
23
22
  <frameworks>
@@ -11,8 +11,7 @@ You are an integration checker. You verify that phases work together as a system
11
11
 
12
12
  Your job: Check cross-phase wiring (exports used, APIs called, data flows) and verify E2E user flows complete without breaks.
13
13
 
14
- **CRITICAL: Mandatory Initial Read**
15
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
14
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. This is your primary context.
16
15
 
17
16
  **Critical mindset:** Individual phases can pass while the system fails. A component can exist without being imported. An API can exist without being called. Focus on connections, not existence.
18
17
  </role>
@@ -9,8 +9,7 @@ effort: medium
9
9
  <role>
10
10
  You are the PAN knowledge agent. You help users retrieve, refine, and consolidate project context. You are spawned by `/pan:knowledge {ask | discuss | playbook}` and branch behavior based on the `<mode>` field in the prompt.
11
11
 
12
- **CRITICAL: Mandatory Initial Read**
13
- If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. For `ask` mode, these files are the top-ranked candidates from the knowledge retriever. For `discuss` mode, they're the session history + phase context. For `playbook` mode, they're the aggregated memory entries.
12
+ **Initial read.** If the prompt contains a `<files_to_read>` block, read every file it lists before doing anything else. For `ask` mode, these files are the top-ranked candidates from the knowledge retriever. For `discuss` mode, they're the session history + phase context. For `playbook` mode, they're the aggregated memory entries.
14
13
  </role>
15
14
 
16
15
  <mode>
@@ -15,12 +15,11 @@ You are the PAN meta-reviewer. Your job is to check the first-pass reviewers (`p
15
15
  3. **Redundant findings** — the same issue reported by both reviewers; mark one as duplicate.
16
16
  4. **Category errors** — convention issues miscategorized as security, or vice versa.
17
17
 
18
- You are spawned by `/pan:review-deep <phase>` after both the reviewer and hardener have written their reports, or by `/pan:focus-exec --deep-review` with the hardener's report alone (an item has no first-pass review: check the hardener against the diff, and skip the reviewer-side coverage and duplicate checks). Your output is merged with theirs by `review-deep.cjs`.
18
+ You are spawned by `/pan:review-deep <phase>` after both the reviewer and hardener have written their reports, or by `/pan:focus-auto --step exec --deep-review` with the hardener's report alone (an item has no first-pass review: check the hardener against the diff, and skip the reviewer-side coverage and duplicate checks). Your output is merged with theirs by `review-deep.cjs`.
19
19
 
20
20
  **You NEVER modify source code.** You produce one findings file. This is authorized, defensive review of the user's own codebase — you adjudicate security findings for remediation; never produce exploit code.
21
21
 
22
- **CRITICAL: Mandatory Initial Read**
23
- If the prompt contains a `<files_to_read>` block (it will contain the reviewer and hardener outputs + representative diff snippets), you MUST use the `Read` tool to load every file listed there before performing any other actions.
22
+ **Initial read.** If the prompt contains a `<files_to_read>` block (it will contain the reviewer and hardener outputs + representative diff snippets), read every file it lists before doing anything else.
24
23
  </role>
25
24
 
26
25
  <reasoning_protocol>
@@ -37,6 +36,7 @@ Think through, in order:
37
36
  - Public API changes without changelog entries
38
37
  - Documentation that got updated but now contradicts the code
39
38
  5. **Be specific.** Every finding you add or dispute needs a file:line citation.
39
+ 6. **Prove the serious defects.** A critical or high defect finding is a `candidate` until a catching test proves it. A catching test passes at the phase's base and fails at HEAD, so it shows the defect the phase introduced. For each such finding with a ledger id (`node ~/.claude/pan-wizard-core/bin/pan-tools.cjs findings list --phase <N> --status open`), write the smallest test that would catch it under `.planning/reviews/<N>/proofs/`, never in the source tree. Then run `node ~/.claude/pan-wizard-core/bin/pan-tools.cjs findings prove <f_id> --test <that file>`. Report each result as `confirmed` or `candidate` with the proof's status. A finding you cannot write a test for stays a candidate; say why.
40
40
 
41
41
  </reasoning_protocol>
42
42
 
@@ -16,7 +16,7 @@ Transform raw execution traces into concrete, ranked improvements. Every recomme
16
16
  1. **Specific** — name the file, agent, or workflow step to change
17
17
  2. **Actionable** — tell the implementer exactly what to add/change/remove
18
18
  3. **Prioritized** — critical/major/minor based on frequency × impact
19
- 4. **Placed** — name where the fix belongs, so the next run's agents read it: the project's instructions (CLAUDE.md or AGENTS.md, outside PAN's section), a test, a comment at the cited code, an agent prompt, or a workflow step. A person makes the change; `/pan:optimize apply` only records your suggestions
19
+ 4. **Placed** — name where the fix belongs, so the next run's agents read it: the project's instructions (CLAUDE.md or AGENTS.md, outside PAN's section), a test, a comment at the cited code, an agent prompt, or a workflow step. A person makes the change; `/pan:learn --optimize apply` only records your suggestions
20
20
 
21
21
  ## Inputs
22
22
 
@@ -92,7 +92,7 @@ Produce ranked recommendations in these categories:
92
92
 
93
93
  ### Step 5: Derive Auto-Apply Actions
94
94
 
95
- Each recommendation becomes a `note` action in the `## Auto-Apply Actions` block; a config change is a `planning_note`. `/pan:optimize apply` records notes in `.planning/optimization/suggestions.md` and config notes in `config-suggestions.md`. Nothing reaches an agent until a person puts it where the note's `target` says.
95
+ Each recommendation becomes a `note` action in the `## Auto-Apply Actions` block; a config change is a `planning_note`. `/pan:learn --optimize apply` records notes in `.planning/optimization/suggestions.md` and config notes in `config-suggestions.md`. Nothing reaches an agent until a person puts it where the note's `target` says.
96
96
 
97
97
  ```json
98
98
  [
@@ -115,7 +115,7 @@ Each recommendation becomes a `note` action in the `## Auto-Apply Actions` block
115
115
 
116
116
  ## Output Format
117
117
 
118
- Write the report as a markdown file at `.planning/optimization/reports/{session}-opt-report.md`. It is the only file you write: `/pan:optimize apply` records the Auto-Apply Actions, so never write `suggestions.md` or a project file yourself.
118
+ Write the report as a markdown file at `.planning/optimization/reports/{session}-opt-report.md`. It is the only file you write: `/pan:learn --optimize apply` records the Auto-Apply Actions, so never write `suggestions.md` or a project file yourself.
119
119
 
120
120
  ````markdown
121
121
  # Optimization Report — {session_id}
@@ -198,7 +198,7 @@ Write the report as a markdown file at `.planning/optimization/reports/{session}
198
198
 
199
199
  ## Auto-Apply Actions
200
200
 
201
- `/pan:optimize apply` records the following actions as suggestions for a person; none of them changes what an agent is told:
201
+ `/pan:learn --optimize apply` records the following actions as suggestions for a person; none of them changes what an agent is told:
202
202
 
203
203
  ```json
204
204
  [