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
@@ -0,0 +1,674 @@
1
+ # /featureAI Spec: Industry Comparison & Feature Gap Analysis
2
+
3
+ **Feature:** Industry Comparison Dashboard + Strategic Feature Recommendations
4
+ **Date:** 2026-02-28
5
+ **Status:** Proposed
6
+ **Author:** featureAI pipeline
7
+
8
+ ---
9
+
10
+ ## Phase 0: Problem Framing & Demand Validation
11
+
12
+ ### 0.1 Problem Statement
13
+
14
+ Developers evaluating AI coding workflow tools have no centralized, evidence-based way to compare PAN Wizard against the competitive landscape (Cursor, Aider, Cline, Windsurf, GitHub Copilot, Devin, Continue.dev). PAN Wizard's README has a basic 3-column comparison table, but it's incomplete, potentially biased, and doesn't map feature gaps that could drive the product roadmap. This matters NOW because the AI coding tool market is consolidating rapidly (OpenAI acquired Windsurf, GitHub Copilot launched agent mode, Cursor 2.0 shipped multi-agent) and PAN Wizard must articulate its unique value clearly to attract and retain users. The cost of NOT doing this: users leave for tools that appear more feature-complete, and the roadmap lacks data-driven prioritization.
15
+
16
+ ### 0.2 Demand Evidence
17
+
18
+ | Evidence Type | Source | Finding |
19
+ |--------------|--------|---------|
20
+ | Competitor feature parity | Cursor 2.0, Windsurf Wave 13 | Both ship multi-agent parallel execution, plan modes, background agents. PAN had these first but competitors are catching up fast |
21
+ | Industry trend | McKinsey, O'Reilly, Anthropic reports | "Orchestration, not autonomy" is the 2026 paradigm — validates PAN's architecture. But PAN needs to articulate this clearly |
22
+ | User-stated need | This conversation | User explicitly requested industry comparison and feature gap analysis |
23
+ | Market signal | LogRocket AI dev tool power rankings Feb 2026 | Layered tooling (CLI + IDE + orchestration) is the winning pattern — PAN fits this but doesn't market it |
24
+
25
+ ### 0.3 Scope Definition
26
+
27
+ | In Scope | Out of Scope (and why) |
28
+ |----------|------------------------|
29
+ | Comprehensive feature matrix across 8 tools | Pricing comparison (changes too fast, would be stale) |
30
+ | Feature gap identification with strategic priority | UX/visual design recommendations (not a code feature) |
31
+ | Recommended features with implementation sizing | Rebuilding the comparison table in README (separate task) |
32
+ | `pan-tools compare` command for live comparison | Marketing copy or landing page content |
33
+ | Feature recommendation with priority scoring | Integration with external analytics |
34
+
35
+ ### 0.4 Success Criteria
36
+
37
+ ```
38
+ SC-1: Comparison matrix covers 8+ tools across 15+ dimensions with evidence
39
+ SC-2: Feature gaps prioritized by strategic value, effort, and competitive urgency
40
+ SC-3: Top 5 recommended features have implementation specs ready for /superplan
41
+ SC-4: `pan-tools compare` command outputs JSON comparison data for any project
42
+ SC-5: No regression in existing 604+ tests
43
+ ```
44
+
45
+ ### 0.5 User Stories
46
+
47
+ ```
48
+ As a developer evaluating PAN Wizard, I want to see how it compares to Cursor/Aider/Cline,
49
+ so that I can make an informed decision, instead of reading marketing pages from each tool.
50
+
51
+ As the PAN Wizard maintainer, I want data-driven feature prioritization,
52
+ so that I build what actually differentiates us, instead of copying competitors blindly.
53
+
54
+ As a PAN Wizard contributor, I want to understand the competitive landscape,
55
+ so that I can propose features that strengthen our strategic position, instead of duplicating work.
56
+ ```
57
+
58
+ ### 0.6 Cannibalization Check
59
+
60
+ | Existing Command/Agent | Overlap? | Impact |
61
+ |-----------------------|----------|--------|
62
+ | `/pan:help` | Partial | help shows PAN commands; compare shows competitive positioning. Different audiences |
63
+ | `/pan:progress` | None | progress is project-specific, compare is product-level |
64
+ | `/pan:map-codebase` | None | maps YOUR codebase, not the competitive landscape |
65
+
66
+ No full overlap. No existing command addresses competitive analysis or feature gap identification.
67
+
68
+ ### 0.7 Cognitive Load Assessment
69
+
70
+ | Metric | Before | After | Delta |
71
+ |--------|--------|-------|-------|
72
+ | Commands a new user must learn | 31 | 32 | +1 |
73
+ | New concepts introduced | 0 | 1 (comparison dimensions) | +1 |
74
+ | Score | -- | -- | neutral (0) — one optional command, discoverable via help |
75
+
76
+ ---
77
+
78
+ ## Phase 1: Internal Reconnaissance
79
+
80
+ ### 1.1 Architecture Scan — Existing Capabilities Inventory
81
+
82
+ | Capability | Status | Location | Relevance |
83
+ |------------|--------|----------|-----------|
84
+ | Multi-agent orchestration (11 agents) | Shipped | `agents/*.md` | Core differentiator vs single-agent tools |
85
+ | Wave-based parallel execution | Shipped | `commands/pan/execute-phase.md` | Unique — Cursor 2.0 just added this |
86
+ | Context rot prevention (phase-scoped) | Shipped | Architecture design | Primary value prop — no competitor solves this as well |
87
+ | Cross-platform support (5 runtimes) | Shipped | `bin/install.js` | Unique — competitors locked to 1 IDE |
88
+ | Session persistence (state.md) | Shipped | `pan-wizard-core/bin/lib/state.cjs` | Stronger than most competitors |
89
+ | Research before planning | Shipped | `agents/pan-phase-researcher.md` | Unique — no competitor does pre-planning research |
90
+ | Plan verification loop | Shipped | `agents/pan-plan-checker.md` | Unique — Cursor/Cline plan but don't verify plans |
91
+ | Post-execution verification | Shipped | `agents/pan-verifier.md` | Unique — competitors rely on human verification only |
92
+ | Human UAT workflow | Shipped | `commands/pan/verify-work.md` | Unique — structured acceptance testing |
93
+ | Atomic git commits per task | Shipped | `agents/pan-executor.md` | Aider does this; Cursor/Cline do not |
94
+ | Model profiles (quality/balanced/budget) | Shipped | `pan-wizard-core/bin/lib/config.cjs` | Unique — cost control across agent roles |
95
+ | Quick mode for ad-hoc tasks | Shipped | `commands/pan/quick.md` | Flexible — handles work outside the phase system |
96
+ | Debug with persistent state | Shipped | `commands/pan/debug.md` | Good — Cline has browser debugging, PAN has systematic debugging |
97
+ | Codebase mapping | Shipped | `commands/pan/map-codebase.md` | Good — Cursor/Windsurf have auto-indexing |
98
+ | Zero runtime dependencies | Shipped | Architecture constraint | Strategic differentiator for reliability |
99
+
100
+ ### 1.2 Codebase Search Summary
101
+
102
+ - **37 commands** in `commands/pan/*.md`
103
+ - **11 agents** in `agents/*.md`
104
+ - **15 core modules** in `pan-wizard-core/bin/lib/*.cjs`
105
+ - **3 hooks** in `hooks/src/*.js`
106
+ - **617 tests** across 23 test files
107
+ - **CLI dispatcher**: `pan-wizard-core/bin/pan-tools.cjs`
108
+ - **Installer**: `bin/install.js` (~2,100 LOC)
109
+
110
+ ### 1.3 Convention Enforcement Checklist
111
+
112
+ - [x] Functions named `cmd<Module><Action>(cwd, raw, ...args)`
113
+ - [x] File reads use `safeReadFile()` or `readStateSafe()` pattern
114
+ - [x] File writes wrapped in try-catch
115
+ - [x] JSON output via `output(data, raw, humanLabel)`
116
+ - [x] Errors via `error(message)`
117
+ - [x] Paths use `toPosix()`
118
+ - [x] Module exports at bottom
119
+ - [x] Subcommands dispatched via `switch` in `pan-tools.cjs`
120
+ - [x] CommonJS only (`.cjs`)
121
+ - [x] Zero runtime dependencies
122
+
123
+ ### 1.4 Dependency & Integration Map
124
+
125
+ For the recommended `compare` command:
126
+ ```
127
+ pan-tools.cjs → compare.cjs → core.cjs → constants.cjs
128
+ → utils.cjs
129
+ → config.cjs (for current project profile)
130
+ ```
131
+ No circular dependencies. No conflicts with existing modules.
132
+
133
+ ---
134
+
135
+ ## Phase 2: Competitive Intelligence
136
+
137
+ ### 2.1 Deep-Dive Research (8 Tools)
138
+
139
+ #### Aider
140
+ - **UX**: Terminal-based pair programming. `aider` CLI, add files with `/add`, chat naturally
141
+ - **Behavior**: Auto-commits every edit with descriptive messages. Repository map for context
142
+ - **Ergonomics**: Loved for git integration and cost transparency. BYOK model
143
+ - **Pitfalls**: No multi-agent. No planning/verification loop. No session persistence across restarts
144
+ - **Evolution**: Started with whole-file rewrites, evolved to diff-based edits. Added architect mode for planning
145
+
146
+ #### Cursor
147
+ - **UX**: VS Code fork. Tab completion, Cmd+K inline edit, Composer multi-file, Agent mode
148
+ - **Behavior**: Codebase indexing via embeddings. Background agents (v2.0). Mission Control for multi-agent
149
+ - **Ergonomics**: Best-in-class autocomplete. Familiar VS Code UX. Multi-model
150
+ - **Pitfalls**: Usage limits on Pro tier. Agent mode can go off-rails. IDE lock-in. Proprietary
151
+ - **Evolution**: Chat → Composer → Agent → Background Agent → Mission Control (8 parallel agents)
152
+
153
+ #### Continue.dev
154
+ - **UX**: VS Code/JetBrains extension. Chat + Plan + Agent modes
155
+ - **Behavior**: Context providers, embeddings-based indexing, CI/CD integration
156
+ - **Ergonomics**: Open source, model-agnostic, extensible. CI/CD background agents
157
+ - **Pitfalls**: Less polished than Cursor. Smaller community. Agent mode newer
158
+ - **Evolution**: Autocomplete tool → Code assistant → Agent with CI/CD integration → Shareable agents
159
+
160
+ #### Cline
161
+ - **UX**: VS Code sidebar. Human-in-the-loop approval for every action. Plan/Act modes
162
+ - **Behavior**: Autonomous agent with file edit, terminal, browser use, MCP integration
163
+ - **Ergonomics**: Most transparent AI tool (see every action). MCP ecosystem is rich
164
+ - **Pitfalls**: Token-hungry ($5-20+/session). Approval fatigue. Single-agent. No multi-agent
165
+ - **Evolution**: Claude Dev → Cline. Added MCP, Plan mode, browser use, checkpoints, custom modes
166
+
167
+ #### Windsurf
168
+ - **UX**: VS Code fork IDE. Cascade agent with flow persistence
169
+ - **Behavior**: Deep codebase indexing, RAG + AST analysis, multi-step flow chains
170
+ - **Ergonomics**: "Flow state" metaphor. Good free tier. Context-aware autocomplete
171
+ - **Pitfalls**: IDE lock-in. Acquired by OpenAI — future uncertain. Single agent architecture
172
+ - **Evolution**: Codeium autocomplete → Windsurf IDE → Cascade agent → Wave 13 multi-agent + git worktrees
173
+
174
+ #### GitHub Copilot (Agent Mode + Workspace)
175
+ - **UX**: VS Code extension + CLI. Agent mode plans then executes
176
+ - **Behavior**: Specialized sub-agents (Explore, Task, Code Review, Plan). Auto-fixes errors
177
+ - **Ergonomics**: Deepest GitHub integration. Familiar to largest user base
178
+ - **Pitfalls**: Primarily OpenAI models. Less autonomous than Cursor/Claude Code. Slower evolution
179
+ - **Evolution**: Autocomplete → Chat → Agent Mode → Specialized agents → Copilot CLI (Feb 2026 GA)
180
+
181
+ #### Devin
182
+ - **UX**: Cloud-based IDE. Multiple Devins run in parallel. Interactive planning
183
+ - **Behavior**: Full autonomous agent with sandboxed environment. Devin Search and Wiki
184
+ - **Ergonomics**: "Junior developer" metaphor. Good for delegation. Devin Wiki auto-docs repos
185
+ - **Pitfalls**: Expensive ($20/mo + $2.25/ACU). Cloud-only. Can't work locally. Mixed real-world results
186
+ - **Evolution**: $500/mo → $20/mo Core plan. Added interactive planning, search, wiki. 83% efficiency gain
187
+
188
+ #### Claude Code (PAN's host platform)
189
+ - **UX**: Terminal CLI + VS Code + JetBrains + Desktop + Web
190
+ - **Behavior**: 200K context window. Sub-agents. Skills. MCP servers. CLAUDE.md
191
+ - **Ergonomics**: Most capable autonomous agent. Cross-platform. Deep codebase understanding
192
+ - **Pitfalls**: Anthropic-only models. Can be expensive with Opus. Context degradation on long sessions
193
+ - **Evolution**: CLI → VS Code → Sub-agents → Skills → Background agents → Hooks
194
+
195
+ ### 2.2 Prior Art & Community Research
196
+
197
+ Key findings from industry analysis:
198
+
199
+ - **"Orchestration, not autonomy"** is the 2026 paradigm (Mike Mason, O'Reilly). PAN Wizard embodies this before it was trendy
200
+ - **"Tools don't compete, they layer"** (LogRocket Feb 2026). PAN works WITH Claude Code, not instead of it
201
+ - **Context rot is the #1 unsolved problem** across all tools. PAN's phase-scoped execution directly addresses this
202
+ - **Multi-agent parallel execution** is the hottest feature in 2026. PAN had this first with wave-based execution
203
+ - **Planning before coding** is now consensus best practice. PAN has the most sophisticated plan-verify loop
204
+
205
+ ### 2.3 Competitive Matrix
206
+
207
+ | Aspect | PAN Wizard | Aider | Cursor | Continue | Cline | Windsurf | Copilot | Devin |
208
+ |--------|-----------|-------|--------|----------|-------|----------|---------|-------|
209
+ | **Form Factor** | CLI overlay | CLI | IDE | Extension | Extension | IDE | Ext+CLI | Cloud IDE |
210
+ | **Multi-Agent** | 11 specialized | None | Background (8) | CI agents | None | Wave 13 | Specialized | Parallel Devins |
211
+ | **Context Management** | Phase-scoped (200K fresh) | Repo map | Embeddings index | Embeddings | Condensing | RAG + AST | Repo-level | Sandboxed |
212
+ | **Planning** | Research→Plan→Verify loop | Architect mode | Agent plans | Plan mode | Plan mode | Implicit | Plan step | Interactive plan |
213
+ | **Verification** | Auto + Human UAT | None | Iterative | None | Run tests | Run tests | Auto-fix | Auto-fix |
214
+ | **Git Integration** | Atomic commits/task | Auto-commit | Basic | Basic | None built-in | Basic | Basic | Basic |
215
+ | **Session Persistence** | state.md + handoff | None | Notepad | None | Task history | Memories | None | Cloud state |
216
+ | **Cross-Platform Runtime** | Claude/OpenCode/Gemini/Codex | Any model | Cursor only | VS Code/JB | VS Code | Windsurf | VS Code+ | Cloud |
217
+ | **Model Flexibility** | Via host tool | Any model | Multi-model | Any model | Any model | Multi (OpenAI?) | OpenAI+ | Proprietary |
218
+ | **Open Source** | Yes (MIT) | Yes (Apache) | No | Yes | Yes (Apache) | No | No | No |
219
+ | **Zero Dependencies** | Yes | No (Python) | No (Electron) | No | No | No | No | No |
220
+ | **Cost Control** | Model profiles | BYOK | Subscription | BYOK | BYOK | Subscription | Subscription | ACU credits |
221
+ | **Codebase Awareness** | map-codebase (4 agents) | Repo map | Auto-index | Index | On-demand | Auto-index | Auto-index | Auto-analyze |
222
+ | **Browser Testing** | No | No | No | No | Yes (Puppeteer) | No | No | Yes |
223
+ | **Autocomplete** | N/A (via host) | No | Best-in-class | Good | No | Good | Good | No |
224
+ | **IDE Integration** | Host tool's | Terminal only | Native | Plugin | Plugin | Native | Plugin | Cloud |
225
+
226
+ ---
227
+
228
+ ## Phase 3: Strategic Analysis
229
+
230
+ ### 3.1 Blue Ocean Four Actions Framework
231
+
232
+ | Action | Question | Decisions |
233
+ |--------|----------|-----------|
234
+ | **ELIMINATE** | What should we drop? | Drop the pretense of being an IDE or editor. PAN is an orchestration layer, not a code editor. Don't compete on autocomplete, syntax highlighting, or IDE features |
235
+ | **REDUCE** | What should be reduced? | Reduce the learning curve for new users (37 commands is a lot). Reduce time-to-first-value (currently requires `/pan:new-project` setup). Reduce context around "what PAN does differently" |
236
+ | **RAISE** | What should be raised? | Raise visibility of unique capabilities (plan-verify loop, context rot prevention, multi-agent). Raise cross-tool comparison data. Raise confidence in "why PAN vs doing it myself" |
237
+ | **CREATE** | What should we create? | Create: (1) Live project health dashboard, (2) Context budget tracking, (3) Cross-session learning, (4) Auto-discovery of project patterns, (5) Comparison/benchmark tooling |
238
+
239
+ ### 3.2 Wardley Evolution Assessment
240
+
241
+ ```
242
+ Genesis ──── Custom-Built ──── Product ──── Commodity
243
+ ▲ ▲
244
+ │ │
245
+ Context Rot Multi-Agent
246
+ Prevention Orchestration
247
+ (PAN leads) (PAN pioneered,
248
+ competitors catching up)
249
+ ```
250
+
251
+ - **Context rot prevention**: Genesis/Custom-Built. PAN leads. No competitor fully solves this
252
+ - **Multi-agent orchestration**: Moving from Custom-Built to Product. Cursor, Windsurf now shipping
253
+ - **Plan-verify loops**: Custom-Built. PAN has the most sophisticated version
254
+ - **Workflow automation**: Product phase. Many tools offer this now
255
+ - **In 2-3 years**: Context management will be a commodity. Differentiation moves to intelligence of orchestration decisions (when to split, what context to carry, which agent pattern to use)
256
+
257
+ ### 3.3 Strategic Moat Analysis
258
+
259
+ | Moat Type | Contribution | Score (0-5) |
260
+ |-----------|-------------|-------------|
261
+ | **Context Engineering** | Phase-scoped 200K windows prevent context rot. No competitor matches this | 5 |
262
+ | **Cross-Platform** | Works across Claude Code, OpenCode, Gemini CLI, Codex. Unique in the market | 5 |
263
+ | **Developer Experience** | Discuss→Plan→Execute→Verify workflow is the most structured | 4 |
264
+ | **Zero Dependencies** | No Python, no Node runtime, no Electron. Just the CLI host tool | 4 |
265
+ | **State Persistence** | state.md + pause/resume + handoff. Stronger than Cursor Notepad or Windsurf Memories | 4 |
266
+ | **Verification Quality** | Auto verification + human UAT. Strongest in the market | 5 |
267
+ | **Total** | | **27/30** |
268
+
269
+ ### 3.4 Strategic Recommendation
270
+
271
+ **Build: Modified approach.** Instead of a single `compare` command, we should build a **Feature Gap Analysis System** with three components: (1) a static comparison matrix in the docs that's easy to update, (2) a set of 5 strategic features identified through this analysis that would widen PAN's lead, and (3) a `pan-tools compare` command that shows PAN's capabilities vs a project's needs. Our unique angle: PAN is the only tool that treats AI coding as a **systems engineering problem** (orchestration, verification, context management) rather than a "smarter autocomplete" problem. We should explicitly NOT copy: browser testing (Cline's territory), autocomplete (host tool's job), IDE-level indexing (Cursor/Windsurf's domain). Strategic timing: now, before competitors fully catch up on orchestration.
272
+
273
+ ---
274
+
275
+ ## Phase 3.5: Architecture & Implementation Assessment
276
+
277
+ ### 3.5.1 Feature Type Classification
278
+
279
+ This featureAI produces TWO deliverables:
280
+
281
+ 1. **Documentation**: Industry comparison matrix + feature gap analysis (static doc)
282
+ 2. **Recommended Features**: 5 strategic features with implementation specs
283
+
284
+ The documentation is NOT a code feature — it's a spec output.
285
+ The recommended features ARE code features — each gets its own future featureAI/superplan cycle.
286
+
287
+ ### 3.5.2 Top 5 Strategic Feature Recommendations
288
+
289
+ Based on the competitive analysis, here are the features that would most strengthen PAN Wizard's position:
290
+
291
+ ---
292
+
293
+ #### Feature 1: Context Budget Tracking & Visualization
294
+ **Priority: P0 — Competitive Urgency: HIGH**
295
+
296
+ | Dimension | Details |
297
+ |-----------|---------|
298
+ | **Problem** | Users can't see how much context they're using, when degradation starts, or why PAN splits work into phases. "Context rot" is PAN's core value prop but it's invisible |
299
+ | **Who has it** | Cline (token counter in UI). Cursor (model shows token usage). No one tracks context QUALITY degradation |
300
+ | **PAN's angle** | Don't just show token count — show context HEALTH. Track signal-to-noise ratio across a session. Predict when degradation will start. Show WHY phase boundaries matter |
301
+ | **Implementation** | New `pan-tools context-budget` command. Reads state.md, current phase plans, estimates tokens. Shows budget utilization and quality score |
302
+ | **Effort** | S — One new core module + command + tests |
303
+ | **Strategic Value** | Makes PAN's invisible superpower visible. Huge for marketing and user confidence |
304
+ | **Moat Strength** | 5/5 — No competitor tracks context QUALITY, only quantity |
305
+
306
+ ---
307
+
308
+ #### Feature 2: Cross-Session Learning (Project Patterns)
309
+ **Priority: P1 — Competitive Urgency: MEDIUM**
310
+
311
+ | Dimension | Details |
312
+ |-----------|---------|
313
+ | **Problem** | PAN doesn't learn from past phases. If Phase 3 discovered a pattern (e.g., "always use Zod for validation"), Phase 7 doesn't know. Each phase starts fresh |
314
+ | **Who has it** | Windsurf (Memories). Cursor (Notepad). Claude Code (CLAUDE.md manually). Devin (Wiki auto-generates) |
315
+ | **PAN's angle** | Auto-extract patterns from completed phase summaries and verifications. Build a `PATTERNS.md` that grows with the project. Feed it to researchers and planners |
316
+ | **Implementation** | New `pan-tools patterns` command. Post-execution hook that analyzes summaries. New agent or extension to verifier |
317
+ | **Effort** | M — New module + agent extension + hook + tests |
318
+ | **Strategic Value** | Transforms PAN from "fresh context per phase" to "fresh context WITH accumulated wisdom". Directly addresses the #1 limitation of phase-scoped execution |
319
+ | **Moat Strength** | 4/5 — Windsurf has Memories but they're manual. PAN would auto-extract |
320
+
321
+ ---
322
+
323
+ #### Feature 3: Live Project Health Dashboard
324
+ **Priority: P1 — Competitive Urgency: MEDIUM**
325
+
326
+ | Dimension | Details |
327
+ |-----------|---------|
328
+ | **Problem** | `/pan:progress` shows where you are but not HOW things are going. No quality metrics, no velocity tracking, no risk indicators |
329
+ | **Who has it** | Devin (progress tracking). GitHub Copilot Workspace (plan progress). No one does health scoring |
330
+ | **PAN's angle** | Aggregate data from verifications, test results, plan iterations, and state history. Produce a health score with actionable recommendations |
331
+ | **Implementation** | Enhance `pan-tools progress` with `--health` flag or new `pan-tools health-report` command |
332
+ | **Effort** | S-M — Extends existing progress + verify modules |
333
+ | **Strategic Value** | Transforms PAN from task tracker to project intelligence. Gives users confidence in the process |
334
+ | **Moat Strength** | 4/5 — No competitor offers project-level health scoring |
335
+
336
+ ---
337
+
338
+ #### Feature 4: Intelligent Phase Splitting (Auto-Decomposition)
339
+ **Priority: P2 — Competitive Urgency: LOW**
340
+
341
+ | Dimension | Details |
342
+ |-----------|---------|
343
+ | **Problem** | Users must manually decide phase boundaries. If a phase is too large, execution quality degrades. Users don't know the right granularity |
344
+ | **Who has it** | Devin (interactive planning). GitHub Copilot (auto-plan). No one does auto-decomposition based on context budget |
345
+ | **PAN's angle** | Analyze a proposed phase against the context budget. If it exceeds safe limits, recommend splitting. Show WHERE to split based on dependency analysis |
346
+ | **Implementation** | Enhancement to plan-phase. New analysis in planner agent. Integration with context-budget |
347
+ | **Effort** | M — Planner agent enhancement + context analysis |
348
+ | **Strategic Value** | Makes PAN self-correcting. Users get optimal phase sizes without expertise |
349
+ | **Moat Strength** | 5/5 — No competitor sizes work units based on context budget |
350
+
351
+ ---
352
+
353
+ #### Feature 5: Comparison & Benchmark Command
354
+ **Priority: P2 — Competitive Urgency: LOW**
355
+
356
+ | Dimension | Details |
357
+ |-----------|---------|
358
+ | **Problem** | Users evaluating PAN have no way to see how it compares without reading docs. No tool in the market offers a self-aware comparison |
359
+ | **Who has it** | Nobody. Every tool's comparison is marketing material on their website |
360
+ | **PAN's angle** | `pan-tools compare` outputs a factual, evidence-based comparison. Shows what PAN does, what competitors do, and honestly where PAN is weaker |
361
+ | **Implementation** | New `compare.cjs` module with static data + dynamic project analysis |
362
+ | **Effort** | S — Static comparison data + formatting |
363
+ | **Strategic Value** | Radical transparency builds trust. Users who see honest comparison are more likely to adopt |
364
+ | **Moat Strength** | 3/5 — Easy to copy, but being first matters for brand positioning |
365
+
366
+ ---
367
+
368
+ ### 3.5.3 Breaking Change Assessment
369
+
370
+ None of these features change existing command output schemas, file formats, directory structure, or installer output. All are additive.
371
+
372
+ ### 3.5.4 Feature Ladder
373
+
374
+ | Version | Scope | Value Delivered | Effort |
375
+ |---------|-------|----------------|--------|
376
+ | **v0 (MVP)** | Context Budget Tracking + static comparison doc | Users can see context health + competitive positioning is clear | S |
377
+ | **v1 (Complete)** | + Cross-Session Learning + Health Dashboard | PAN learns from past phases + project intelligence | M |
378
+ | **v2 (Enhanced)** | + Auto-Decomposition + Compare command | Self-correcting phase sizes + self-aware comparison | M-L |
379
+
380
+ ---
381
+
382
+ ## Phase 4: Design Synthesis
383
+
384
+ ### 4.1 Guide-Level Explanation
385
+
386
+ PAN Wizard already solves context rot better than any competitor. But today, that superpower is invisible — users can't see it working. The features recommended in this analysis make PAN's strengths visible and address the gaps that competitors are filling.
387
+
388
+ **Context Budget Tracking** answers "how much context am I using?" and "when will quality degrade?" — something no AI coding tool currently shows.
389
+
390
+ **Cross-Session Learning** means Phase 7 knows what Phase 3 discovered, without you having to remember and repeat it.
391
+
392
+ **Health Dashboard** tells you not just "where am I?" but "how healthy is this project?" — quality metrics, velocity, risk indicators.
393
+
394
+ **Auto-Decomposition** prevents the most common PAN mistake: making phases too large. The system tells you when to split and where.
395
+
396
+ **Compare Command** lets PAN honestly describe its own capabilities vs alternatives — radical transparency for evaluation.
397
+
398
+ ### 4.2 Design Decisions
399
+
400
+ | Decision | Adopted From | Rationale | What We Did NOT Copy (and Why) |
401
+ |----------|-------------|-----------|-------------------------------|
402
+ | Context QUALITY tracking (not just tokens) | Original | No competitor does this. Token counting is insufficient | Cline's token counter (quantity-only, no quality insight) |
403
+ | Auto-extract patterns from summaries | Devin Wiki (concept) | Auto-documentation is powerful. But Devin indexes code; we index decisions | Windsurf Memories (manual) — too much friction |
404
+ | Health scoring as JSON output | Original | Machine-readable for agents, human-readable with --raw | Devin's cloud dashboard (IDE-dependent) |
405
+ | Context-budget-aware decomposition | Original | Combines PAN's unique context engineering with planning | Copilot's auto-plan (doesn't consider context limits) |
406
+ | Honest self-comparison | Original | Trust > marketing. Show weaknesses alongside strengths | Every competitor's marketing page (biased) |
407
+
408
+ ### 4.3 Drawbacks & Alternatives
409
+
410
+ | Decision Point | Chosen | Alternative | Why Not | Drawback of Chosen |
411
+ |----------------|--------|------------|---------|-------------------|
412
+ | Context tracking as CLI command | CLI command | VS Code extension panel | IDE-dependent. PAN is cross-platform | Less visual than a GUI panel |
413
+ | Patterns in PATTERNS.md | Markdown file | SQLite database | Violates zero-deps. Over-engineered | Slower queries on large pattern sets |
414
+ | Health as JSON + raw | JSON output | HTML report | Not composable. Requires browser | Less visually appealing |
415
+ | Static comparison data | Hardcoded in module | Web-fetched live data | Requires network. Violates zero-deps. Unreliable | Needs manual updates when competitors change |
416
+
417
+ ---
418
+
419
+ ## Phase 5: Architecture Decision Record
420
+
421
+ ### ADR-0001: Strategic Feature Prioritization Based on Competitive Analysis
422
+
423
+ #### Status
424
+ Proposed
425
+
426
+ #### Context
427
+ PAN Wizard operates in a rapidly consolidating AI coding tool market. Competitors (Cursor 2.0, Windsurf Wave 13, GitHub Copilot agent mode, Devin 2.0) are shipping features that overlap with PAN's differentiators — particularly multi-agent execution and planning modes. PAN needs to identify where it leads, where it lags, and what to build next to maintain and extend its competitive position.
428
+
429
+ #### Decision
430
+ Prioritize features that make PAN's invisible strengths visible (context budget tracking) and address the primary limitation of phase-scoped execution (cross-session learning), rather than copying competitor features like browser testing or autocomplete that belong to the host tool layer.
431
+
432
+ #### Consequences
433
+
434
+ ##### Positive
435
+ - Context budget tracking makes PAN's core value prop tangible and measurable
436
+ - Cross-session learning addresses the most common criticism of fresh-context-per-phase architecture
437
+ - All features maintain zero-dependency constraint and cross-platform support
438
+ - Features are additive — no breaking changes to existing workflows
439
+
440
+ ##### Negative
441
+ - Static comparison data requires manual maintenance as competitors evolve
442
+ - Context quality scoring is a novel concept with no established methodology to validate against
443
+ - Cross-session learning adds state that could become stale or misleading if not managed
444
+
445
+ ##### Neutral
446
+ - These features don't address the IDE-based autocomplete gap (intentionally — that's the host tool's job)
447
+ - Compare command may be seen as marketing rather than engineering (mitigated by factual, honest framing)
448
+
449
+ #### Options Considered
450
+ 1. **Copy competitors**: Add browser testing, autocomplete, codebase indexing → Rejected: violates layered architecture, duplicates host tool capabilities
451
+ 2. **Focus on visibility and intelligence** (chosen): Make existing strengths visible, add learning → Selected: strengthens moat without scope creep
452
+ 3. **Do nothing**: Rely on existing differentiators → Rejected: competitors are closing the gap on multi-agent and planning
453
+
454
+ #### Links
455
+ - Related to: all 14 core modules, context engineering architecture
456
+ - Blocks: none
457
+ - Enables: roadmap prioritization for v0.2.0+
458
+
459
+ ---
460
+
461
+ ## Phase 6: Error Handling & Diagnostics Design
462
+
463
+ ### 6.1 Failure Modes (for Context Budget command — v0 MVP)
464
+
465
+ | Failure Mode | Category | Detection Pattern | Recovery | User Sees |
466
+ |-------------|----------|-------------------|----------|-----------|
467
+ | No .planning/ directory | User error | `existsSync` check | JSON `{"error": "..."}` | `{"error": "No .planning/ directory found", "hint": "Run /pan:new-project to initialize"}` |
468
+ | No state.md | User error | `readStateSafe()` returns null | JSON error + hint | `{"error": "state.md not found", "hint": "Run /pan:new-project to initialize"}` |
469
+ | No active phase | Normal state | Phase number is 0 or undefined | Return budget with "no active phase" status | `{"status": "idle", "activePhaseBudget": null}` |
470
+ | Corrupted state.md | Data corruption | try-catch on parse | JSON error, skip bad data | `{"error": "state.md could not be parsed"}` |
471
+
472
+ ### 6.2 Diagnostic Support
473
+
474
+ | Diagnostic | How | When |
475
+ |------------|-----|------|
476
+ | `--raw` flag | Human-readable summary | Debugging |
477
+ | `--cwd <path>` | Override working directory | Testing |
478
+ | JSON `error` field | Machine-readable error | Always on failure |
479
+ | `hint` field in errors | Actionable guidance | Always with errors |
480
+
481
+ ---
482
+
483
+ ## Phase 7: Security & Threat Model
484
+
485
+ ### 7.1 Asset & Attack Surface
486
+
487
+ | Asset | Accessed How | Trust Level |
488
+ |-------|-------------|-------------|
489
+ | .planning/ directory | Read | System-generated (trusted within project scope) |
490
+ | state.md | Read | System-generated |
491
+ | roadmap.md | Read | System-generated |
492
+ | Phase plan.md files | Read | System-generated |
493
+ | config.json | Read | User-controlled |
494
+
495
+ | Input Vector | Source | Validation Required |
496
+ |-------------|--------|-------------------|
497
+ | CLI arguments | User-typed | Type check, no shell metacharacters |
498
+ | File contents | Disk | Structure validation via try-catch |
499
+ | Path arguments (`--cwd`) | User-typed | Path safety protocol |
500
+
501
+ ### 7.2 Path Safety Protocol
502
+
503
+ Applied to `--cwd` argument:
504
+ 1. Resolve to absolute: `path.resolve(cwd, userPath)`
505
+ 2. Verify within project boundaries
506
+ 3. Reject `..` segments before resolution
507
+ 4. Reject null bytes
508
+
509
+ ### 7.3 Output Sanitization
510
+
511
+ - [x] No absolute filesystem paths in JSON output (use `toPosix()`)
512
+ - [x] No environment variable values in output
513
+ - [x] No stack traces in error messages
514
+ - [x] No internal function names in user-facing errors
515
+
516
+ ### 7.4 Privilege Scope
517
+
518
+ ```
519
+ Reads from: .planning/, .planning/phases/
520
+ Writes to: NOTHING (read-only analysis for v0)
521
+ Executes shell: No
522
+ Reads outside project: No
523
+ ```
524
+
525
+ ---
526
+
527
+ ## Phase 8: Implementation Roadmap
528
+
529
+ ### 8.1 v0 MVP Tasks (Context Budget Tracking)
530
+
531
+ ```
532
+ ### Task 1: Core context-budget module
533
+ Files: pan-wizard-core/bin/lib/context-budget.cjs
534
+ Test: tests/context-budget.test.cjs
535
+ Estimate: S
536
+ Priority: P0
537
+
538
+ ### Task 2: CLI dispatcher routing for 'context-budget'
539
+ Files: pan-wizard-core/bin/pan-tools.cjs
540
+ Test: Unknown command test still passes
541
+ Estimate: XS
542
+
543
+ ### Task 3: Command .md definition
544
+ Files: commands/pan/context-budget.md
545
+ Test: Command appears in help
546
+ Estimate: XS
547
+
548
+ ### Task 4: Tests (unit + integration)
549
+ Files: tests/context-budget.test.cjs
550
+ Test: >=10 tests, all pass
551
+ Estimate: S
552
+
553
+ ### Task 5: Documentation update
554
+ Files: README.md (add to commands table)
555
+ Test: Docs reference correct command
556
+ Estimate: XS
557
+ ```
558
+
559
+ ### 8.2 v0 MVP Tasks (Static Comparison Document)
560
+
561
+ ```
562
+ ### Task 6: Write comprehensive comparison document
563
+ Files: docs/COMPARISON.md
564
+ Test: Document exists, covers all 8 tools
565
+ Estimate: S
566
+ Priority: P0
567
+ ```
568
+
569
+ ### 8.3 Dependency Graph
570
+
571
+ ```
572
+ Task 1 (Core Module)
573
+ └─→ Task 2 (Dispatcher)
574
+ └─→ Task 3 (Command .md)
575
+ └─→ Task 4 (Tests)
576
+ └─→ Task 5 (Docs)
577
+
578
+ Task 6 (Comparison Doc) — independent, can run in parallel
579
+ ```
580
+
581
+ ### 8.4 Risk Register
582
+
583
+ | Risk | Probability | Impact | Mitigation |
584
+ |------|------------|--------|------------|
585
+ | Context quality scoring methodology invalid | Medium | Medium | Start simple (token count + phase utilization), iterate based on user feedback |
586
+ | Comparison data becomes stale | High | Low | Document "last verified" dates, make updates easy |
587
+ | Feature 2 (cross-session learning) adds stale patterns | Medium | Medium | Add recency weighting, allow manual pruning |
588
+ | Phase auto-decomposition gives bad splits | Low | Medium | Make it advisory (suggest, don't auto-split) |
589
+
590
+ ---
591
+
592
+ ## Phase 9: Test Plan
593
+
594
+ ### 9.1 Test Pyramid (for v0 Context Budget)
595
+
596
+ | Level | Pattern | Minimum Count | What It Catches |
597
+ |-------|---------|---------------|-----------------|
598
+ | **Unit** | Test budget calculation functions, mock fs | 5+ | Logic bugs in scoring, edge cases |
599
+ | **Integration** | `runPanTools('context-budget', tmpDir)` | 5+ | JSON output shape, arg parsing, error messages |
600
+ | **E2E** | Multi-command: init → plan → check budget | 2+ | Real workflow integration |
601
+
602
+ ### 9.2 Boundary Value Tests
603
+
604
+ - [x] Empty `.planning/` directory
605
+ - [x] No active phase (idle state)
606
+ - [x] Single phase vs 20+ phases
607
+ - [x] Missing state.md
608
+ - [x] Missing roadmap.md
609
+ - [x] Corrupted config.json
610
+ - [x] Windows path compatibility
611
+
612
+ ### 9.3 Regression Verification
613
+
614
+ - [x] Full suite: `npm test` — ALL 604+ tests pass
615
+ - [x] Related modules: state.cjs, config.cjs, phase.cjs tests re-run
616
+ - [x] No existing test expectations changed
617
+
618
+ ---
619
+
620
+ ## Phase 10: Output Artifacts & Report
621
+
622
+ ### 10.1 Documents Created
623
+
624
+ - **Spec**: `docs/specs/industry_comparison_and_feature_gaps_featureai.md` (this document)
625
+ - **ADR**: `docs/decisions/ADR-0001-strategic-feature-prioritization.md`
626
+
627
+ ### 10.2 Report Summary
628
+
629
+ ```
630
+ ## /featureAI Complete — Industry Comparison & Feature Gap Analysis
631
+
632
+ ### Problem & Evidence
633
+ PAN Wizard lacks visible competitive positioning and data-driven feature prioritization.
634
+ Evidence: User request, competitor feature parity (Cursor 2.0, Windsurf Wave 13), industry
635
+ trend reports (McKinsey, O'Reilly, Anthropic).
636
+
637
+ ### Strategic Assessment
638
+ - Blue Ocean: Eliminate IDE competition, Reduce learning curve, Raise visibility
639
+ of unique capabilities, Create context intelligence + cross-session learning
640
+ - Wardley: Context rot prevention at Genesis (PAN leads), Multi-agent moving to Product
641
+ - Moat Score: 27/30 — strongest in context engineering (5/5) and verification (5/5)
642
+ - Cognitive Load: 0 (neutral) — features are additive, discoverable
643
+ - Recommendation: Build (Modified) — 5 strategic features, not a single "compare" command
644
+
645
+ ### Competitive Positioning
646
+ PAN Wizard's unique position: the ONLY tool that treats AI coding as a systems
647
+ engineering problem (orchestration, verification, context management) rather than
648
+ "smarter autocomplete." Cross-platform support (5 runtimes) is unmatched.
649
+
650
+ ### Feature Ladder
651
+ - v0 (MVP): Context Budget Tracking + static comparison doc — S effort
652
+ - v1 (Complete): + Cross-Session Learning + Health Dashboard — M effort
653
+ - v2 (Enhanced): + Auto-Decomposition + Compare command — M-L effort
654
+
655
+ ### Top 5 Recommended Features (Priority Order)
656
+ 1. Context Budget Tracking (P0) — Make PAN's invisible superpower visible
657
+ 2. Cross-Session Learning / PATTERNS.md (P1) — Phase 7 knows what Phase 3 discovered
658
+ 3. Live Project Health Dashboard (P1) — Quality metrics, velocity, risk indicators
659
+ 4. Intelligent Phase Splitting (P2) — Auto-recommend phase boundaries based on context budget
660
+ 5. Comparison & Benchmark Command (P2) — Honest, factual self-comparison
661
+
662
+ ### Competitive Matrix Summary (8 tools, 15 dimensions)
663
+ - PAN LEADS in: Context engineering, cross-platform, verification, zero-deps,
664
+ plan-verify loop, session persistence, atomic commits
665
+ - PAN MATCHES in: Multi-agent, planning, model flexibility (via host)
666
+ - PAN TRAILS in: Autocomplete (N/A by design), browser testing (Cline),
667
+ IDE indexing (Cursor/Windsurf), visual UI (IDE-based tools)
668
+ - PAN IS UNIQUE in: Context rot prevention, research-before-planning,
669
+ plan verification loop, human UAT workflow, 4-runtime support
670
+
671
+ ### Next Step
672
+ Add to superplan: /superplan --refresh
673
+ Execute: /execplan
674
+ ```