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
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
2
+ Initialize a new project through unified flow: questioning, research (opt-in: `--research`), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
3
3
  </purpose>
4
4
 
5
5
  <required_reading>
@@ -48,8 +48,8 @@ Check if `--auto` flag is present in $ARGUMENTS.
48
48
  - Skip deep questioning (extract context from provided document)
49
49
  - Config: YOLO mode is implicit; depth, git and agents take their defaults (or idea.md frontmatter overrides) silently in Step 2a — no questions
50
50
  - After config: run Steps 6-9 automatically with smart defaults:
51
- - Research: Always yes
52
- - Requirements: Include all table stakes + features from provided document
51
+ - Research: off, unless `--research` (or `--research market`) was passed or the idea frontmatter says `research_enabled: true`
52
+ - Requirements: the features the provided document asks for; research findings settle decisions and never add v1 requirements
53
53
  - Requirements approval: Auto-approve
54
54
  - Roadmap approval: Auto-approve
55
55
 
@@ -81,7 +81,7 @@ The document should describe what you want to build.
81
81
  INIT=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs init new-project)
82
82
  ```
83
83
 
84
- Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
84
+ Parse JSON for: `researcher_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
85
85
 
86
86
  **If `project_exists` is true:** Error — project already initialized. Use `/pan:progress`.
87
87
 
@@ -122,7 +122,7 @@ Exit command.
122
122
  | Depth | `quick` (3-5 phases, 1-3 plans each) | idea.md frontmatter `planning_depth: standard\|comprehensive` |
123
123
  | Execution | `parallel` | idea.md frontmatter `parallelization: false` to switch to sequential |
124
124
  | Git Tracking | `yes` (commit_planning_docs: true) | idea.md frontmatter `commit_planning_docs: false` |
125
- | Research | `yes` (each phase researched before planning) | idea.md frontmatter `research_enabled: false` |
125
+ | Research | `no` (opt-in: no project research, and no research before each phase) | `--research`, or idea.md frontmatter `research_enabled: true` |
126
126
  | Plan Check | `yes` (verify plans before exec) | idea.md frontmatter `plan_checker_enabled: false` |
127
127
  | Verifier | `yes` (verify work after each phase) | idea.md frontmatter `verifier_enabled: false` |
128
128
  | AI Models | `balanced` profile | idea.md frontmatter `model_profile: quality\|budget` |
@@ -138,7 +138,7 @@ priority: medium
138
138
  # Optional auto-mode overrides:
139
139
  planning_depth: standard
140
140
  parallelization: false
141
- research_enabled: false
141
+ research_enabled: true
142
142
  model_profile: quality
143
143
  ---
144
144
  ```
@@ -220,7 +220,7 @@ Consult `questioning.md` for techniques:
220
220
 
221
221
  **Check context (background, not out loud):**
222
222
 
223
- As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
223
+ As you go, mentally check the context checklist from `questioning.md`, and scan the idea against its `<clarification_taxonomy>`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode. Keep to its `<question_budget>`: at most five clarifying questions, ranked by impact × uncertainty, and every gap you did not ask about written into project.md as an `Assumed:` line.
224
224
 
225
225
  **Decision gate:**
226
226
 
@@ -396,21 +396,21 @@ These spawn additional agents during planning/execution. They add tokens and tim
396
396
 
397
397
  | Agent | When it runs | What it does |
398
398
  |-------|--------------|--------------|
399
- | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
399
+ | **Researcher** | Before planning each phase (off by default) | Answers up to 5 open questions that block planning, each with a source |
400
400
  | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
401
401
  | **Verifier** | After phase execution | Confirms must-haves were delivered |
402
402
 
403
- All recommended for important projects. Skip for quick experiments.
403
+ Plan Check and Verifier are recommended for important projects. Research is off by default: turn it on only when phases depend on things nobody on the project knows yet.
404
404
 
405
405
  ```
406
406
  questions: [
407
407
  {
408
408
  header: "Research",
409
- question: "Research before planning each phase? (adds tokens/time)",
409
+ question: "Research before planning each phase? (off by default; adds tokens/time)",
410
410
  multiSelect: false,
411
411
  options: [
412
- { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
413
- { label: "No", description: "Plan directly from requirements" }
412
+ { label: "No (Recommended)", description: "Plan directly from requirements; /pan:plan-phase N --research researches one phase" },
413
+ { label: "Yes", description: "Answer up to 5 open questions per phase, each with a source" }
414
414
  ]
415
415
  },
416
416
  {
@@ -436,9 +436,9 @@ questions: [
436
436
  question: "Which AI models for planning agents?",
437
437
  multiSelect: false,
438
438
  options: [
439
- { label: "Balanced (Recommended)", description: "reasoning tier for every agent — the default (identical to quality post-COST-RESET)" },
440
- { label: "Quality", description: "reasoning tier for every agent — identical to balanced, so switching between the two changes nothing" },
441
- { label: "Budget", description: "mid tier for writing, fast tier for research/verification — fastest, lowest cost" }
439
+ { label: "Balanced (Recommended)", description: "right-sized: a small, well-specified phase or quick task skips research and the planner/checker loop; plan-checker and researchers on the mid tier" },
440
+ { label: "Quality", description: "the full ceremony on every piece of work, every agent on the reasoning tier: the behaviour before right-sizing, several times the cost and time" },
441
+ { label: "Budget", description: "right-sized, plus mid tier for writing and fast tier for research/verification — fastest, lowest cost" }
442
442
  ]
443
443
  }
444
444
  ]
@@ -478,246 +478,106 @@ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "chore: add project conf
478
478
 
479
479
  ## 5.5. Resolve Model Profile
480
480
 
481
- Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
481
+ Use models from init: `researcher_model`, `roadmapper_model`.
482
482
 
483
483
  ## 6. Research Decision
484
484
 
485
- **If auto mode:** Default to "Research first" without asking.
485
+ Research is **off by default**. It runs only when asked: `--research` (or `--research market`, below) in `$ARGUMENTS`, idea-document frontmatter `research_enabled: true`, or the user choosing it at the question below. When it runs it answers at most five questions, with one researcher, and settles decisions; it never adds scope (2026-10-25: research that surveyed the domain never finished, and its catalogue grew v1).
486
486
 
487
- Use AskUserQuestion:
488
- - header: "Research"
489
- - question: "Research the domain ecosystem before defining requirements?"
490
- - options:
491
- - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
492
- - "Skip research" — I know this domain well, go straight to requirements
493
-
494
- **If "Research first":**
495
-
496
- Display stage banner:
497
- ```
498
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
499
- PAN ► RESEARCHING
500
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
501
-
502
- Researching [domain] ecosystem...
503
- ```
487
+ **Size the brief (auto mode with an idea document):** pass the document to the engine:
504
488
 
505
- Create research directory:
506
489
  ```bash
507
- mkdir -p .planning/research
490
+ BRIEF_SIZE=$(node ~/.claude/pan-wizard-core/bin/pan-tools.cjs size task --file "{idea document path}" --raw)
508
491
  ```
509
492
 
510
- **Determine milestone context:**
511
-
512
- Check if this is greenfield or subsequent milestone:
513
- - If no "Validated" requirements in project.md → Greenfield (building from scratch)
514
- - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
515
-
516
- Display spawning indicator:
517
- ```
518
- ◆ Spawning 4 researchers in parallel...
519
- → Stack research
520
- → Features research
521
- → Architecture research
522
- → Pitfalls research
523
- ```
493
+ `lean` means the document names what to build (its modules, functions or files) and how it behaves: it is the scope, and in steps 7 and 8 you keep to it (`BRIEF_PRECISE` below). A precise brief never needs research: skip it, even when asked, and say so (`the brief names what to build; research skipped — /pan:plan-phase N --research still researches a phase`). `full` means it leaves the work open: research runs only if it was asked for.
524
494
 
525
- Spawn 4 parallel pan-project-researcher agents with path references:
495
+ **If auto mode:** Do not ask. "Research open questions" when `--research` was passed or the frontmatter says `research_enabled: true` (and `BRIEF_SIZE` is not `lean`); otherwise "Skip research".
526
496
 
527
- ```
528
- Task(prompt="<research_type>
529
- Project Research — Stack dimension for [domain].
530
- </research_type>
531
-
532
- <milestone_context>
533
- [greenfield OR subsequent]
534
-
535
- Greenfield: Research the standard stack for building [domain] from scratch.
536
- Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
537
- </milestone_context>
538
-
539
- <question>
540
- What's the standard 2025 stack for [domain]?
541
- </question>
542
-
543
- <files_to_read>
544
- - {project_path} (Project context and goals)
545
- </files_to_read>
546
-
547
- <downstream_consumer>
548
- Your stack.md feeds into roadmap creation. Be prescriptive:
549
- - Specific libraries with versions
550
- - Clear rationale for each choice
551
- - What NOT to use and why
552
- </downstream_consumer>
553
-
554
- <quality_gate>
555
- - [ ] Versions are current (verify with Context7/official docs, not training data)
556
- - [ ] Rationale explains WHY, not just WHAT
557
- - [ ] Confidence levels assigned to each recommendation
558
- </quality_gate>
559
-
560
- <output>
561
- Write to: .planning/research/stack.md
562
- Use template: ~/.claude/pan-wizard-core/templates/research-project/stack.md
563
- </output>
564
- ", subagent_type="pan-project-researcher", model="{researcher_model}", description="Stack research")
497
+ **If interactive mode and `--research` was passed:** "Research open questions" without asking. Otherwise use AskUserQuestion:
498
+ - header: "Research"
499
+ - question: "Research open questions before defining requirements?"
500
+ - options:
501
+ - "Skip research (Recommended)" — Define requirements from what you told me
502
+ - "Research open questions" — Answer up to 5 questions that block building, each with a source
503
+ - "Questions + market" — Also compare up to 5 comparable products; gaps become v2 candidates
565
504
 
566
- Task(prompt="<research_type>
567
- Project Research — Features dimension for [domain].
568
- </research_type>
505
+ `MARKET` is true when `--research market` was passed or the user chose "Questions + market".
569
506
 
570
- <milestone_context>
571
- [greenfield OR subsequent]
507
+ **If "Skip research":** Continue to Step 7.
572
508
 
573
- Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
574
- Subsequent: How do [target features] typically work? What's expected behavior?
575
- </milestone_context>
509
+ **If researching:**
576
510
 
577
- <question>
578
- What features do [domain] products have? What's table stakes vs differentiating?
579
- </question>
511
+ **6a. Write the questions.** List at most **5** open questions that project.md (and the idea document) leave unanswered and that block building: a technology choice, an external API's behaviour, a data format, a limit or rule. Not "what features do users expect", not "best practices for X": a question qualifies only if a requirement or the roadmap cannot be written without its answer. Write them as a numbered list:
580
512
 
581
- <files_to_read>
582
- - {project_path} (Project context)
583
- </files_to_read>
584
-
585
- <downstream_consumer>
586
- Your features.md feeds into requirements definition. Categorize clearly:
587
- - Table stakes (must have or users leave)
588
- - Differentiators (competitive advantage)
589
- - Anti-features (things to deliberately NOT build)
590
- </downstream_consumer>
513
+ ```bash
514
+ mkdir -p .planning/research
515
+ ```
591
516
 
592
- <quality_gate>
593
- - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
594
- - [ ] Complexity noted for each feature
595
- - [ ] Dependencies between features identified
596
- </quality_gate>
517
+ Write `.planning/research/questions.md`:
597
518
 
598
- <output>
599
- Write to: .planning/research/features.md
600
- Use template: ~/.claude/pan-wizard-core/templates/research-project/features.md
601
- </output>
602
- ", subagent_type="pan-project-researcher", model="{researcher_model}", description="Features research")
519
+ ```markdown
520
+ # Research questions
603
521
 
604
- Task(prompt="<research_type>
605
- Project Research — Architecture dimension for [domain].
606
- </research_type>
522
+ 1. [question] — blocks: [the decision it settles]
523
+ 2. ...
524
+ ```
607
525
 
608
- <milestone_context>
609
- [greenfield OR subsequent]
526
+ **No questions → no research.** If nothing blocks building, write no file, say `No open questions block building — research skipped`, and continue to Step 7.
610
527
 
611
- Greenfield: How are [domain] systems typically structured? What are major components?
612
- Subsequent: How do [target features] integrate with existing [domain] architecture?
613
- </milestone_context>
528
+ **6b. Spawn one researcher.**
614
529
 
615
- <question>
616
- How are [domain] systems typically structured? What are major components?
617
- </question>
530
+ ```
531
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
532
+ PAN ► RESEARCHING {N} QUESTIONS
533
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
534
+ ```
618
535
 
536
+ ```
537
+ Task(prompt="
619
538
  <files_to_read>
620
- - {project_path} (Project context)
539
+ - .planning/research/questions.md (The questions: answer these and nothing else)
540
+ - .planning/project.md (Project context)
621
541
  </files_to_read>
622
542
 
623
- <downstream_consumer>
624
- Your architecture.md informs phase structure in roadmap. Include:
625
- - Component boundaries (what talks to what)
626
- - Data flow (how information moves)
627
- - Suggested build order (dependencies between components)
628
- </downstream_consumer>
629
-
630
- <quality_gate>
631
- - [ ] Components clearly defined with boundaries
632
- - [ ] Data flow direction explicit
633
- - [ ] Build order implications noted
634
- </quality_gate>
543
+ <market>
544
+ {Only if MARKET: compare at most 5 comparable products in a `| Product | What users get | What the brief does not cover |` table; every gap goes under Ideas (v2 candidates).}
545
+ </market>
635
546
 
636
547
  <output>
637
- Write to: .planning/research/architecture.md
638
- Use template: ~/.claude/pan-wizard-core/templates/research-project/architecture.md
548
+ Write to: .planning/research/research-summary.md
549
+ One row per question: | # | Question | Answer | Source | Confidence | Decision it settles |, or `unknown — assume: …`. At most 4 searches or fetches per question. Anything that suggests new scope goes under ## Ideas (v2 candidates). Do not commit.
639
550
  </output>
640
- ", subagent_type="pan-project-researcher", model="{researcher_model}", description="Architecture research")
641
-
642
- Task(prompt="<research_type>
643
- Project Research — Pitfalls dimension for [domain].
644
- </research_type>
645
-
646
- <milestone_context>
647
- [greenfield OR subsequent]
648
-
649
- Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
650
- Subsequent: What are common mistakes when adding [target features] to [domain]?
651
- </milestone_context>
652
-
653
- <question>
654
- What do [domain] projects commonly get wrong? Critical mistakes?
655
- </question>
656
-
657
- <files_to_read>
658
- - {project_path} (Project context)
659
- </files_to_read>
551
+ ", subagent_type="pan-project-researcher", model="{researcher_model}", description="Answer research questions")
552
+ ```
660
553
 
661
- <downstream_consumer>
662
- Your pitfalls.md prevents mistakes in roadmap/planning. For each pitfall:
663
- - Warning signs (how to detect early)
664
- - Prevention strategy (how to avoid)
665
- - Which phase should address it
666
- </downstream_consumer>
554
+ Leave out the `<market>` block when `MARKET` is false.
667
555
 
668
- <quality_gate>
669
- - [ ] Pitfalls are specific to this domain (not generic advice)
670
- - [ ] Prevention strategies are actionable
671
- - [ ] Phase mapping included where relevant
672
- </quality_gate>
556
+ **6c. Check the answers.**
673
557
 
674
- <output>
675
- Write to: .planning/research/pitfalls.md
676
- Use template: ~/.claude/pan-wizard-core/templates/research-project/pitfalls.md
677
- </output>
678
- ", subagent_type="pan-project-researcher", model="{researcher_model}", description="Pitfalls research")
558
+ ```bash
559
+ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs research check .planning/research/questions.md .planning/research/research-summary.md [--market]
679
560
  ```
680
561
 
681
- After all 4 agents complete, spawn synthesizer to create summary.md:
562
+ Exit 1: send its `errors` to the researcher once as a revision (`Task` with the same `subagent_type`, the errors and the file to fix). One revision at most: if the check still fails, proceed, and record each question still without a sourced answer as `unknown` with the assumption you will use, in a `## Unknowns` list at the end of research-summary.md. Research never blocks the project.
682
563
 
683
- ```
684
- Task(prompt="
685
- <task>
686
- Synthesize research outputs into summary.md.
687
- </task>
688
-
689
- <files_to_read>
690
- - .planning/research/stack.md
691
- - .planning/research/features.md
692
- - .planning/research/architecture.md
693
- - .planning/research/pitfalls.md
694
- </files_to_read>
564
+ Commit `.planning/research/`:
695
565
 
696
- <output>
697
- Write to: .planning/research/summary.md
698
- Use template: ~/.claude/pan-wizard-core/templates/research-project/summary.md
699
- Commit after writing.
700
- </output>
701
- ", subagent_type="pan-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
566
+ ```bash
567
+ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "docs: answer research questions" --files .planning/research/questions.md .planning/research/research-summary.md
702
568
  ```
703
569
 
704
- Display research complete banner and key findings:
570
+ Display:
705
571
  ```
706
572
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
707
573
  PAN ► RESEARCH COMPLETE ✓
708
574
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
709
575
 
710
- ## Key Findings
711
-
712
- **Stack:** [from summary.md]
713
- **Table Stakes:** [from summary.md]
714
- **Watch Out For:** [from summary.md]
715
-
716
- Files: `.planning/research/`
576
+ **Decisions settled:** [one line per answered question]
577
+ **Unknown (assumed):** [question → assumption]
578
+ **Ideas (v2 candidates):** [count; offered in Step 7, never added to v1 by themselves]
717
579
  ```
718
580
 
719
- **If "Skip research":** Continue to Step 7.
720
-
721
581
  ## 7. Define Requirements
722
582
 
723
583
  Display stage banner:
@@ -734,43 +594,22 @@ Read project.md and extract:
734
594
  - Stated constraints (budget, timeline, tech limitations)
735
595
  - Any explicit scope boundaries
736
596
 
737
- **If research exists:** Read research/features.md and extract feature categories.
597
+ **If research exists:** Read `.planning/research/research-summary.md`. Its answers settle decisions (a technology, an API's behaviour, a format, a limit) that the requirements and their acceptance criteria use; its `## Ideas (v2 candidates)` are not requirements. No finding moves into v1 by itself: in interactive mode offer the ideas as v2 candidates the user may promote; in auto mode they go under v2.
738
598
 
739
- **If auto mode:**
740
- - Auto-include all table stakes features (users expect these)
741
- - Include features explicitly mentioned in provided document
742
- - Auto-defer differentiators not mentioned in document
599
+ **If auto mode and `BRIEF_SIZE` is `lean` (`BRIEF_PRECISE`):** the document is the scope.
600
+ - One v1 requirement per behaviour the document states, written in its own terms and naming the module, function or file it names, so each requirement says exactly what to build
601
+ - Nothing the document does not ask for goes into v1: table stakes it does not mention, extra validation, hardening, tooling and infrastructure go under v2 or Out of Scope
602
+ - Skip the per-category questions, the "Any additions?" question and the approval gate; generate requirements.md and commit directly
603
+
604
+ **If auto mode otherwise:**
605
+ - Include the features the provided document asks for
606
+ - Defer everything else to v2, including research ideas and anything users of similar products might expect
743
607
  - Skip per-category AskUserQuestion loops
744
608
  - Skip "Any additions?" question
745
609
  - Skip requirements approval gate
746
610
  - Generate requirements.md and commit directly
747
611
 
748
- **Present features by category (interactive mode only):**
749
-
750
- ```
751
- Here are the features for [domain]:
752
-
753
- ## Authentication
754
- **Table stakes:**
755
- - Sign up with email/password
756
- - Email verification
757
- - Password reset
758
- - Session management
759
-
760
- **Differentiators:**
761
- - Magic link login
762
- - OAuth (Google, GitHub)
763
- - 2FA
764
-
765
- **Research notes:** [any relevant notes]
766
-
767
- ---
768
-
769
- ## [Next Category]
770
- ...
771
- ```
772
-
773
- **If no research:** Gather requirements through conversation instead.
612
+ **Gather requirements through conversation (interactive mode only):**
774
613
 
775
614
  Ask: "What are the main things users need to be able to do?"
776
615
 
@@ -794,16 +633,16 @@ For each category, use AskUserQuestion:
794
633
 
795
634
  Track responses:
796
635
  - Selected features → v1 requirements
797
- - Unselected table stakes → v2 (users expect these)
798
- - Unselected differentiators → out of scope
636
+ - Unselected features → v2 or out of scope (ask which when unclear)
637
+ - Research ideas the user did not promote → v2
799
638
 
800
639
  **Identify gaps:**
801
640
 
802
641
  Use AskUserQuestion:
803
642
  - header: "Additions"
804
- - question: "Any requirements research missed? (Features specific to your vision)"
643
+ - question: "Any requirements missing? (Features specific to your vision)"
805
644
  - options:
806
- - "No, research covered it" — Proceed
645
+ - "No, that covers it" — Proceed
807
646
  - "Yes, let me add some" — Capture additions
808
647
 
809
648
  **Validate core value:**
@@ -813,7 +652,7 @@ Cross-check requirements against Core Value from project.md. If gaps detected, s
813
652
  **Generate requirements.md:**
814
653
 
815
654
  Create `.planning/requirements.md` with:
816
- - v1 Requirements grouped by category (checkboxes, REQ-IDs)
655
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs), each with at least one acceptance criterion in an EARS form as an indented sub-bullet (`WHEN … THE SYSTEM SHALL …`; see the template's `<ears_criteria>`)
817
656
  - v2 Requirements (deferred)
818
657
  - Out of Scope (explicit exclusions with reasoning)
819
658
  - Traceability section (empty, filled by roadmap)
@@ -857,9 +696,10 @@ Does this capture what you're building? (yes / adjust)
857
696
 
858
697
  If "adjust": Return to scoping.
859
698
 
860
- **Commit requirements:**
699
+ **Lint, then commit requirements.** A v1 requirement with no EARS criterion fails the lint; add one before committing:
861
700
 
862
701
  ```bash
702
+ node ~/.claude/pan-wizard-core/bin/pan-tools.cjs verify requirements
863
703
  node ~/.claude/pan-wizard-core/bin/pan-tools.cjs commit "docs: define v1 requirements" --files .planning/requirements.md
864
704
  ```
865
705
 
@@ -883,7 +723,7 @@ Task(prompt="
883
723
  <files_to_read>
884
724
  - .planning/project.md (Project context)
885
725
  - .planning/requirements.md (v1 Requirements)
886
- - .planning/research/summary.md (Research findings - if exists)
726
+ - .planning/research/research-summary.md (Answers to the research questions - if exists; older projects: .planning/research/summary.md)
887
727
  - .planning/config.json (Depth and mode settings)
888
728
  </files_to_read>
889
729
 
@@ -891,11 +731,12 @@ Task(prompt="
891
731
 
892
732
  <instructions>
893
733
  Create roadmap:
734
+ 0. Size it to the requirements: the fewest phases that deliver them (a brief for one library or tool is usually one to three phases), one plan per phase unless a phase truly needs more, and no phase for hardening, validation or infrastructure the requirements do not ask for. Over-scoping spends the run's budget on work nobody asked for (2026-10-25: a one-paragraph brief became a roadmap whose third phase built load-time validation the brief never mentioned, and the product's core API was never written)
894
735
  1. Derive phases from requirements (don't impose structure)
895
736
  2. Map every v1 requirement to exactly one phase
896
737
  3. Derive 2-5 success criteria per phase (observable user behaviors)
897
738
  4. Validate 100% coverage
898
- 5. Compose each file in full, then write each exactly once — one Write per file, no draft-then-refine (P-1808): roadmap.md, state.md, update requirements.md traceability
739
+ 5. Compose roadmap.md in full and write it exactly once, no draft-then-refine (P-1808); initialise state.md with `pan-tools state init --core-value ... --focus ... --phase ... --phase-name ... --total-phases ...`, never the Write tool; update requirements.md traceability
899
740
  6. Return ROADMAP CREATED with summary
900
741
 
901
742
  Write files first, then return — before the return, not early and often. One complete Write per file persists the artifacts without the rewrite churn (P-1808).
@@ -1131,12 +972,9 @@ Spawn discuss-phase for Phase 1 as a Task subagent, exactly as transition.md Rou
1131
972
 
1132
973
  - `.planning/project.md`
1133
974
  - `.planning/config.json`
1134
- - `.planning/research/` (if research selected)
1135
- - `stack.md`
1136
- - `features.md`
1137
- - `architecture.md`
1138
- - `pitfalls.md`
1139
- - `summary.md`
975
+ - `.planning/research/` (only if research was asked for and a question blocked building)
976
+ - `questions.md`
977
+ - `research-summary.md`
1140
978
  - `.planning/requirements.md`
1141
979
  - `.planning/roadmap.md`
1142
980
  - `.planning/state.md`
@@ -1152,8 +990,8 @@ Spawn discuss-phase for Phase 1 as a Task subagent, exactly as transition.md Rou
1152
990
  - [ ] Deep questioning completed (threads followed, not rushed)
1153
991
  - [ ] project.md captures full context → **committed**
1154
992
  - [ ] config.json has workflow mode, depth, parallelization → **committed**
1155
- - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
1156
- - [ ] Requirements gathered (from research or conversation)
993
+ - [ ] Research only if asked for: at most 5 questions, one researcher, `research check` run → **committed**
994
+ - [ ] Requirements gathered (from the brief and conversation; research settles decisions, never adds v1 scope)
1157
995
  - [ ] User scoped each category (v1/v2/out of scope)
1158
996
  - [ ] requirements.md created with REQ-IDs → **committed**
1159
997
  - [ ] pan-roadmapper spawned with context