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,698 @@
1
+ # Production Readiness & Ship v1.0 — featureAI Specification
2
+
3
+ **Generated:** 2026-03-01
4
+ **Mode:** `--full` (10-phase investigation)
5
+ **Scope:** Get PAN Wizard production-ready and published to npm
6
+
7
+ ---
8
+
9
+ ## Phase 0: Problem Framing & Demand Validation
10
+
11
+ ### 0.1 Problem Statement
12
+
13
+ PAN Wizard is a mature, well-tested CLI workflow automation tool (875 tests, 15 modules, 37 commands, 5 runtime targets) that has **never been published to npm**. Despite having `npx pan-wizard@latest` prominently in the README and full npm packaging metadata in place, running that command fails with a 404. Users cannot install the tool through the standard channel. The cost of NOT shipping is total: no users can adopt the tool, no community feedback, no organic growth, and the README's install instructions are a broken promise.
14
+
15
+ ### 0.2 Demand Evidence
16
+
17
+ | Evidence Type | Source | Finding |
18
+ |--------------|--------|---------|
19
+ | README install instructions | README.md line 16-17 | `npx pan-wizard@latest` is the primary install method — currently broken (npm 404) |
20
+ | Personal pain (user-stated) | This conversation | User explicitly requested: "review and create a plan to get PanWizard production ready and shipped" |
21
+ | Package name availability | npmjs.com | `pan-wizard` is available — no squatting conflict |
22
+ | Competitor parity | Aider (pip), Continue.dev (npm), Copilot CLI (npm) | All competitors ship via standard package managers |
23
+
24
+ ### 0.3 Scope Definition
25
+
26
+ | In Scope | Out of Scope (and why) |
27
+ |----------|------------------------|
28
+ | npm publish pipeline & first public release | New features beyond what exists (feature-complete at v0.3.0) |
29
+ | Version bump to 1.0.0 (signals production-ready) | Cross-session learning, phase splitting advisor (deferred items) |
30
+ | CHANGELOG cleanup (move Unreleased to 1.0.0) | Automated release pipeline (GitHub Actions npm publish — v1.1 work) |
31
+ | Git tag creation (v1.0.0) | npm provenance/signing (requires GitHub Actions — v1.1) |
32
+ | Verify `npm pack` output is correct | TypeScript definitions (CLI tool, not a library API) |
33
+ | Verify `npx pan-wizard` works end-to-end | Dependabot/Renovate config (only 1 devDep) |
34
+ | Verify all 5 runtime installs work from npm package | Marketing, blog posts, launch strategy |
35
+ | hooks/dist/ is built and committed | Changing Node engine requirement (16.7.0 is fine) |
36
+ | README badges point to live npm package | npm 2FA setup (user responsibility, not automatable) |
37
+
38
+ ### 0.4 Success Criteria (Measurable)
39
+
40
+ ```
41
+ SC-1: `npm view pan-wizard` returns package metadata (not 404)
42
+ SC-2: `npx pan-wizard@latest --claude --local` installs successfully in a fresh directory
43
+ SC-3: `npx pan-wizard@latest --copilot --local` installs successfully in a fresh directory
44
+ SC-4: `npm pack` produces tarball < 500KB with exactly the files in the `files` field
45
+ SC-5: All 875 existing tests pass with zero regressions
46
+ SC-6: Version in package.json, CHANGELOG, and git tag are all "1.0.0" and consistent
47
+ SC-7: README install instructions work on first try for a new user
48
+ ```
49
+
50
+ ### 0.5 User Stories
51
+
52
+ ```
53
+ As a developer who heard about PAN Wizard, I want to run `npx pan-wizard@latest`,
54
+ so that I can install it in 30 seconds, instead of cloning a repo and manually copying files.
55
+
56
+ As a developer using Claude Code, I want to trust that the npm package is stable,
57
+ so that I can recommend it to my team, instead of hedging with "it's still pre-release."
58
+
59
+ As the PAN Wizard maintainer, I want a clean 1.0.0 release on npm,
60
+ so that I can start collecting real user feedback and npm download metrics,
61
+ instead of developing in isolation with no adoption signal.
62
+ ```
63
+
64
+ ### 0.6 Cannibalization Check
65
+
66
+ | Existing Command/Agent | Overlap? | Impact |
67
+ |-----------------------|----------|--------|
68
+ | `/pan:update` | Partial | Update command already handles pulling latest — works naturally once published |
69
+ | `/pan:health` | None | Health checks existing install, not the release pipeline |
70
+ | `bin/install.js` | Full (leveraged) | The installer IS the npm bin entry — this spec uses it as-is |
71
+
72
+ No cannibalization. This is a release process, not a new feature.
73
+
74
+ ### 0.7 Cognitive Load Assessment
75
+
76
+ | Metric | Before | After | Delta |
77
+ |--------|--------|-------|-------|
78
+ | Commands a new user must learn | 37 | 37 | +0 |
79
+ | New concepts introduced | 0 | 0 | +0 |
80
+ | Score | — | — | **simplifies (-1)** — removes the need to clone/build from source |
81
+
82
+ ---
83
+
84
+ ## Phase 1: Internal Reconnaissance
85
+
86
+ ### 1.1 Architecture Scan — Existing Capabilities Inventory
87
+
88
+ | Capability | Status | Location | Relevance |
89
+ |------------|--------|----------|-----------|
90
+ | npm package.json metadata | Complete | package.json | All fields present (name, version, bin, files, engines, repo, license) |
91
+ | Build pipeline | Complete | `npm run build:hooks` + `prepublishOnly` | Hooks auto-build before publish |
92
+ | Files whitelist | Complete | package.json `files` field | Correctly excludes tests, planning, docs/specs |
93
+ | Shebang | Correct | bin/install.js line 1 | `#!/usr/bin/env node` |
94
+ | Zero runtime deps | Verified | package.json `dependencies: {}` | Only esbuild as devDep |
95
+ | CI matrix | Complete | .github/workflows/ci.yml | 3 OS x 4 Node versions = 12 configs |
96
+ | Tests | Passing | 52 test files, 1483 tests | 0 failures, 0 skipped |
97
+ | Docs | Comprehensive | 12 docs, 7 specs, 6 ADRs | 7,824 lines |
98
+ | Governance files | Present | LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY | All standard files |
99
+ | CHANGELOG | Maintained | CHANGELOG.md | Keep a Changelog format, semver |
100
+ | hooks/dist/ | Built | hooks/dist/*.js | 3 compiled hooks present |
101
+
102
+ ### 1.2 Codebase Search — Quality Audit Results
103
+
104
+ | Aspect | Result | Status |
105
+ |--------|--------|--------|
106
+ | TODO/FIXME/HACK in production code | 0 found | PASS |
107
+ | console.log in library code | 0 found | PASS |
108
+ | debugger statements | 0 found | PASS |
109
+ | .only() in tests | 0 found | PASS |
110
+ | .skip() in tests | 0 found | PASS |
111
+ | Hardcoded absolute paths | 0 found | PASS |
112
+ | process.exit in library code | Properly scoped to CLI entry points | PASS |
113
+ | try-catch coverage | 200+ across all modules | PASS |
114
+ | TOCTOU races | 0 remaining (all replaced with try-catch-on-read) | PASS |
115
+
116
+ ### 1.3 Convention Enforcement Checklist
117
+
118
+ - [x] Functions named `cmd<Module><Action>(cwd, raw, ...args)`
119
+ - [x] File reads use `safeReadFile()` or `readStateSafe()` pattern
120
+ - [x] File writes wrapped in try-catch
121
+ - [x] JSON output via `output(data, raw, humanLabel)`
122
+ - [x] Errors via `error(message)`
123
+ - [x] Paths in output pass through `toPosix()`
124
+ - [x] Module exports at bottom
125
+ - [x] Subcommands dispatched via `switch` in pan-tools.cjs
126
+ - [x] CommonJS only (`.cjs` with `require()`)
127
+ - [x] Zero runtime dependencies
128
+
129
+ ### 1.4 Dependency & Integration Map
130
+
131
+ ```
132
+ [Ship to npm]
133
+ ├── depends on: package.json (metadata, bin, files, scripts)
134
+ ├── depends on: bin/install.js (npm bin entry point)
135
+ ├── depends on: hooks/dist/ (must be built before publish)
136
+ ├── depends on: CHANGELOG.md (Unreleased section → 1.0.0)
137
+ ├── extends: existing `npm run build:hooks` → `prepublishOnly`
138
+ ├── conflicts with: nothing
139
+ └── enables: /pan:update (pulls from npm), npm download metrics, user adoption
140
+ ```
141
+
142
+ ### 1.5 npm Pack Verification
143
+
144
+ Current `npm pack --dry-run` output:
145
+ - **157 files** shipped
146
+ - **422KB** packed, **1.5MB** unpacked
147
+ - Includes: bin/, commands/, pan-wizard-core/, agents/, hooks/dist/, scripts/, assets/
148
+ - Excludes: tests/, docs/, .planning/, .github/ (except via `files` field)
149
+
150
+ ---
151
+
152
+ ## Phase 2: Competitive Intelligence
153
+
154
+ ### 2.1 Distribution Models
155
+
156
+ | Tool | Distribution | Install Command | Size | Runtime Deps | Update Mechanism |
157
+ |------|-------------|-----------------|------|-------------|-----------------|
158
+ | **Aider** | PyPI (pip) | `pip install aider-chat` | ~2MB | 30+ deps (requests, tiktoken, etc.) | `pip install --upgrade` |
159
+ | **Cursor** | Desktop app | Download from cursor.com | ~200MB | Electron + bundled | Auto-update |
160
+ | **Continue.dev** | npm + VS Code | `npm i @continuedev/cli` | ~5MB | 5 deps (fzf, fdir, js-yaml, sentry) | npm update |
161
+ | **Cline** | VS Code ext | VS Code marketplace | ~10MB | Bundled | VS Code auto-update |
162
+ | **Windsurf** | Desktop app | Download from codeium.com | ~200MB | Electron + bundled | Auto-update |
163
+ | **GitHub Copilot CLI** | npm | `npm i -g @github/copilot` | ~1MB | 0 runtime deps | npm update |
164
+ | **PAN Wizard** | npm (planned) | `npx pan-wizard@latest` | **422KB** | **0 runtime deps** | `/pan:update` + npm |
165
+
166
+ ### 2.2 Key Competitive Advantages
167
+
168
+ PAN Wizard has **the lightest footprint of any comparable tool**:
169
+ - **422KB packed** vs Continue (5MB), Aider (2MB+), Copilot CLI (1MB)
170
+ - **Zero runtime dependencies** — only PAN and GitHub Copilot CLI share this distinction
171
+ - **npx one-liner** — no global install required, always gets latest
172
+ - **5 runtime targets** from single package — no competitor supports this breadth
173
+ - **1483 tests** — more comprehensive than any comparable CLI tool's public test suite
174
+
175
+ ### 2.3 Production Trust Signals (What Users Look For)
176
+
177
+ Based on npm best practices and community research:
178
+
179
+ | Trust Signal | PAN Status | Action Needed |
180
+ |-------------|-----------|---------------|
181
+ | npm badges in README | Present (version, downloads, license) | Will activate once published |
182
+ | LICENSE file | MIT, present | None |
183
+ | SECURITY.md | Present with response timeline | None |
184
+ | CONTRIBUTING.md | Present with clear process | None |
185
+ | CODE_OF_CONDUCT.md | Contributor Covenant v2.0 | None |
186
+ | CI badges | CI workflow exists | Consider adding CI badge to README |
187
+ | Semantic versioning | Using 0.x.x (pre-release signal) | **Bump to 1.0.0** |
188
+ | Version >= 1.0.0 | Currently 0.3.0 | **Bump to 1.0.0** — signals production-ready |
189
+ | CHANGELOG | Well-maintained | Move Unreleased to 1.0.0 |
190
+ | `engines` field | Present (>=16.7.0) | None |
191
+ | `repository` field | Present | None |
192
+ | `homepage` field | Present | None |
193
+ | `bugs` field | Present | None |
194
+ | `keywords` field | 13 relevant keywords | None |
195
+ | `prepublishOnly` script | Present (builds hooks) | None |
196
+
197
+ ---
198
+
199
+ ## Phase 3: Strategic Analysis
200
+
201
+ ### 3.1 Blue Ocean Four Actions Framework
202
+
203
+ | Action | Decision |
204
+ |--------|----------|
205
+ | **ELIMINATE** | Pre-release version signaling (0.x.x → 1.0.0). Eliminate friction of "is this stable enough?" |
206
+ | **REDUCE** | Reduce gap between README promise and reality (install instructions currently 404) |
207
+ | **RAISE** | Raise discoverability — npm listing, proper SEO keywords, working badges |
208
+ | **CREATE** | Create the first public release milestone. This enables community, feedback loops, download metrics |
209
+
210
+ ### 3.2 Wardley Evolution Assessment
211
+
212
+ ```
213
+ Genesis ──── Custom-Built ──── Product ──── Commodity
214
+ ↑
215
+ PAN Wizard
216
+ (ready to ship as Product)
217
+ ```
218
+
219
+ PAN is feature-complete at the Product stage. The remaining gap is purely distribution — the product exists but isn't accessible.
220
+
221
+ ### 3.3 Strategic Moat Analysis
222
+
223
+ | Moat Type | Contribution | Score (0-5) |
224
+ |-----------|-------------|-------------|
225
+ | **Context Engineering** | Core value prop — structured workflow prevents context rot | 5 |
226
+ | **Cross-Platform** | 5 runtimes from 1 package — unique in the market | 5 |
227
+ | **Developer Experience** | npx one-liner, interactive menu, non-interactive flags | 4 |
228
+ | **Zero Dependencies** | Supply chain security, fast install, no version conflicts | 5 |
229
+ | **State Persistence** | .planning/ survives context resets — unique approach | 4 |
230
+ | **Verification Quality** | Built-in verifier agent, UAT criteria, plan-checker | 4 |
231
+ | **Total** | | **27/30** |
232
+
233
+ ### 3.4 Strategic Recommendation
234
+
235
+ **Build (Ship) immediately.** PAN Wizard is production-ready by every measurable metric: 875 passing tests across 3 OS × 4 Node versions, zero TODO/FIXME markers, comprehensive error handling (200+ try-catch blocks), zero TOCTOU races, complete documentation (7,824 lines), and proper npm packaging. The version bump from 0.3.0 to 1.0.0 is the correct semantic signal — this is not a breaking change, it's a confidence declaration. The unique angle is "lightest-weight, most broadly compatible AI workflow tool on npm" (422KB, 0 deps, 5 runtimes). We should NOT copy Aider's heavy dependency tree or Cursor/Windsurf's proprietary distribution. Strategic timing is now — the AI coding assistant market is exploding and PAN needs to be discoverable via npm search.
236
+
237
+ ---
238
+
239
+ ## Phase 3.5: Architecture & Implementation Assessment
240
+
241
+ ### 3.5.1 Feature Type Classification
242
+
243
+ This is a **Release Process**, not a new feature. It touches:
244
+ - `package.json` — version bump
245
+ - `CHANGELOG.md` — move Unreleased to 1.0.0
246
+ - Git tag — `v1.0.0`
247
+ - npm publish — one-time command
248
+ - Verification — end-to-end install test post-publish
249
+
250
+ ### 3.5.2 Layer Violation Check
251
+
252
+ Not applicable — no new code, no new modules, no new commands.
253
+
254
+ ### 3.5.3 Output Contract Design
255
+
256
+ Not applicable — no new commands or JSON output.
257
+
258
+ ### 3.5.4 State Transition Modeling
259
+
260
+ Not applicable — no state file changes.
261
+
262
+ ### 3.5.5 Breaking Change Assessment
263
+
264
+ | Question | Answer |
265
+ |----------|--------|
266
+ | Changes any existing command's output schema? | No |
267
+ | Changes file formats? | No |
268
+ | Changes directory structure? | No |
269
+ | Changes installer output? | No — version string changes from 0.3.0 to 1.0.0, but format is unchanged |
270
+
271
+ **The CHANGELOG Unreleased section contains a breaking change note** (command renaming from Session 16). This is correctly documented and will be included in the 1.0.0 release notes.
272
+
273
+ ### 3.5.6 Composability Analysis
274
+
275
+ Not applicable — release process, not a feature.
276
+
277
+ ### 3.5.7 Performance Budget
278
+
279
+ | Operation | Cost |
280
+ |-----------|------|
281
+ | `npm pack` | ~2s |
282
+ | `npm publish` | ~5s |
283
+ | `npx pan-wizard@latest --claude --local` (post-publish verification) | ~10s |
284
+ | **Total** | ~17s |
285
+
286
+ ### 3.5.8 Cross-Platform Considerations
287
+
288
+ | Platform | Already Handled |
289
+ |----------|----------------|
290
+ | Windows | CI tests pass, toPosix() in all path output, shebang in bin |
291
+ | Mac/Linux | CI tests pass, POSIX paths native |
292
+ | npm registry | Package name available, metadata complete |
293
+
294
+ ---
295
+
296
+ ## Phase 4: Design Synthesis
297
+
298
+ ### 4.1 Guide-Level Explanation
299
+
300
+ **Shipping PAN Wizard 1.0.0 to npm** means going from "install from source" to the standard one-liner:
301
+
302
+ ```bash
303
+ npx pan-wizard@latest
304
+ ```
305
+
306
+ This is the moment the README's install instructions become real. Everything is already built — the tests pass, the docs are written, the package.json is configured. What remains is:
307
+
308
+ 1. Bump version 0.3.0 → 1.0.0
309
+ 2. Consolidate CHANGELOG (Unreleased → 1.0.0)
310
+ 3. Ensure hooks/dist/ is fresh
311
+ 4. Create git tag
312
+ 5. `npm publish`
313
+ 6. Verify the install works
314
+
315
+ ### 4.2 Reference-Level Explanation
316
+
317
+ #### 4.2.1 Version Bump Strategy
318
+
319
+ Current state:
320
+ - `package.json` version: `"0.3.0"`
321
+ - CHANGELOG has `[Unreleased]` section with: Command naming restructure, Focus Commands, Copilot CLI interaction optimization
322
+ - Previous releases: 0.1.0 → 0.2.0 → 0.3.0
323
+
324
+ Target state:
325
+ - `package.json` version: `"1.0.0"`
326
+ - CHANGELOG: `[Unreleased]` content moved to `## [1.0.0] - 2026-03-01` section
327
+ - Git tag: `v1.0.0`
328
+ - npm registry: `pan-wizard@1.0.0`
329
+
330
+ #### 4.2.2 CHANGELOG Structure
331
+
332
+ The Unreleased section needs to be merged with the existing 0.3.0 entry to create a comprehensive 1.0.0 release. Key content:
333
+ - **Changed:** Command naming restructure (17 commands renamed)
334
+ - **Added:** Focus Commands (5 new), Copilot CLI interaction optimization
335
+ - **Fixed:** toPosix in cmdFindPhase, 3 bare writeFileSync in installer
336
+ - Plus all 0.3.0 content (Smart Execution System, etc.)
337
+
338
+ #### 4.2.3 Pre-Publish Checklist
339
+
340
+ 1. Hooks are built (`hooks/dist/` has 3 files, all recent timestamps — confirmed)
341
+ 2. Tests pass (`875 pass, 0 fail, 0 skip` — confirmed)
342
+ 3. `npm pack --dry-run` shows correct files (`157 files, 422KB` — confirmed)
343
+ 4. No `.env`, credentials, or secrets in pack output — confirmed
344
+ 5. npm login active (user must verify)
345
+
346
+ ### 4.3 Design Decisions
347
+
348
+ | Decision | Rationale | What We Did NOT Do |
349
+ |----------|-----------|-------------------|
350
+ | 1.0.0 (not 0.4.0) | Signals stability and production-readiness; all features are battle-tested | Did not stay at 0.x — sends wrong signal |
351
+ | Single npm publish (not GitHub Actions) | Simplest path, maintainer control for first release | Did not build automated release pipeline — v1.1 work |
352
+ | Merge Unreleased into 1.0.0 | Clean CHANGELOG, single release captures all work since 0.3.0 | Did not keep Unreleased separate |
353
+ | Git tag before publish | Standard practice, enables `npm view` dist-tags | Did not skip tagging |
354
+
355
+ ### 4.4 Drawbacks & Alternatives
356
+
357
+ | Decision Point | Chosen | Alternative | Why Not |
358
+ |----------------|--------|------------|---------|
359
+ | Version number | 1.0.0 | 0.4.0 | 0.x signals "not ready" — PAN is ready |
360
+ | Release method | Manual `npm publish` | GitHub Actions automated | Automated is v1.1 scope — first release should be manual for control |
361
+ | Changelog merge | Unreleased → 1.0.0 | Keep as 0.4.0 | See version number rationale |
362
+ | Pre-release channel | None | npm `--tag next` | Not needed for first release |
363
+
364
+ ### 4.5 Feature Ladder
365
+
366
+ | Version | Scope | Value Delivered | Effort |
367
+ |---------|-------|----------------|--------|
368
+ | **v1.0.0 (This spec)** | Version bump + npm publish + verification | Users can install via npx | **XS** |
369
+ | **v1.1.0** | GitHub Actions automated publish, npm provenance, CI badge | Automated releases on tag push | S |
370
+ | **v1.2.0** | npm download badge live, Dependabot, automated CHANGELOG | Reduced maintenance burden | S |
371
+
372
+ ### 4.6 Adoption Analysis
373
+
374
+ | Question | Answer |
375
+ |----------|--------|
376
+ | How does the user discover this? | npm search, GitHub, README install instructions that actually work |
377
+ | What's the learning curve? | Zero — `npx pan-wizard@latest` is the standard npm pattern |
378
+ | Does it require changing existing workflows? | No — existing local installs continue to work |
379
+ | What's the "aha moment"? | Running `npx pan-wizard@latest` and seeing the interactive installer for the first time |
380
+
381
+ ---
382
+
383
+ ## Phase 5: Architecture Decision Record
384
+
385
+ ```markdown
386
+ # ADR-0007: Ship v1.0.0 to npm
387
+
388
+ ## Status
389
+ Proposed
390
+
391
+ ## Context
392
+ PAN Wizard has been in active development through 29 sessions, reaching 1483 tests,
393
+ 15 core modules, 42 commands, 11 agents, and 5 runtime targets. The codebase has
394
+ zero TODO/FIXME markers, zero TOCTOU races, 200+ try-catch blocks for error handling,
395
+ and passes CI across 3 OS × 4 Node versions.
396
+
397
+ Despite this maturity, the package has never been published to npm. The README
398
+ prominently features `npx pan-wizard@latest` as the install method, but this
399
+ command currently 404s. The `pan-wizard` name is available on npm.
400
+
401
+ ## Decision
402
+ Bump version from 0.3.0 to 1.0.0 and publish to npm.
403
+
404
+ 1.0.0 was chosen over 0.4.0 because:
405
+ - The codebase is production-ready by every measurable metric
406
+ - 0.x signals instability; PAN Wizard is demonstrably stable
407
+ - Users need a clear signal that this is safe to adopt
408
+ - Semantic versioning says 1.0.0 = "public API is stable"
409
+
410
+ ## Consequences
411
+
412
+ ### Positive
413
+ - Users can install via the documented `npx pan-wizard@latest` method
414
+ - npm download metrics provide adoption signal
415
+ - npm search discoverability for 13 keywords
416
+ - README badges (version, downloads) activate
417
+ - Community growth becomes possible
418
+
419
+ ### Negative
420
+ - 1.0.0 commits to backward compatibility (command names, JSON output schemas)
421
+ - Must now follow semver strictly for any breaking changes
422
+ - Bug reports from real users will begin (support burden)
423
+
424
+ ### Neutral
425
+ - Existing local installs are unaffected
426
+ - `/pan:update` command already handles pulling latest
427
+
428
+ ## Options Considered
429
+ 1. Publish as 0.4.0 — rejected (sends wrong stability signal)
430
+ 2. Publish as 1.0.0 — chosen
431
+ 3. Wait for automated release pipeline — rejected (blocks shipping for no user benefit)
432
+
433
+ ## Links
434
+ - package.json metadata: complete
435
+ - CI: 3 OS × 3 Node, 1483 tests
436
+ - npm name availability: confirmed (404 = available)
437
+ ```
438
+
439
+ ---
440
+
441
+ ## Phase 6: Error Handling & Diagnostics Design
442
+
443
+ ### 6.1 Failure Mode Analysis (Publishing)
444
+
445
+ | Failure Mode | Category | Detection | Recovery | User Sees |
446
+ |-------------|----------|-----------|----------|-----------|
447
+ | npm not logged in | User error | `npm whoami` fails | `npm login` first | "npm ERR! need auth" |
448
+ | Name already taken | Registry conflict | `npm publish` fails | Scoped package (@user/pan-wizard) | "npm ERR! 403" |
449
+ | hooks/dist/ stale | Build error | Timestamps out of date | `npm run build:hooks` | Hooks fail at runtime |
450
+ | Missing files in tarball | Config error | `npm pack --dry-run` shows wrong count | Fix `files` field | Missing commands/agents |
451
+ | Version already published | Registry conflict | `npm publish` fails | Bump patch version | "npm ERR! 403 cannot modify" |
452
+
453
+ ### 6.2 Post-Publish Verification
454
+
455
+ | Check | Command | Expected |
456
+ |-------|---------|----------|
457
+ | Package exists | `npm view pan-wizard` | Returns metadata |
458
+ | Version correct | `npm view pan-wizard version` | `1.0.0` |
459
+ | Install works | `npx pan-wizard@latest --claude --local` | Successful install output |
460
+ | Copilot install | `npx pan-wizard@latest --copilot --local` | Successful install output |
461
+ | Uninstall works | `npx pan-wizard@latest --claude --local --uninstall` | Clean removal |
462
+
463
+ ---
464
+
465
+ ## Phase 7: Security & Threat Model
466
+
467
+ ### 7.1 Asset & Attack Surface (npm Publishing)
468
+
469
+ | Asset | Risk | Mitigation |
470
+ |-------|------|------------|
471
+ | npm account credentials | Account takeover → malicious publish | Enable npm 2FA (TOTP), use `npm token` with limited scope |
472
+ | Published tarball integrity | Supply chain attack | Verify `npm pack` content, future: npm provenance signatures |
473
+ | User's project files | Malicious installer modifies non-PAN files | Installer only writes to `.claude/`, `.github/`, etc. — already audited |
474
+ | User's PATH | Malicious bin entry | `bin` field points to `bin/install.js` only — no other executables |
475
+
476
+ ### 7.2 Supply Chain Posture
477
+
478
+ | Factor | Status |
479
+ |--------|--------|
480
+ | Runtime dependencies | **0** — minimal attack surface |
481
+ | devDependencies | 1 (esbuild) — only used at build time, not shipped |
482
+ | Package lock | `package-lock.json` ensures reproducible builds |
483
+ | npm audit | Clean (0 runtime deps = 0 vulnerabilities) |
484
+ | 2FA | Must be enabled on npm account before publish |
485
+
486
+ ### 7.3 Output Sanitization (Already Complete)
487
+
488
+ - [x] No absolute paths in JSON output (toPosix everywhere)
489
+ - [x] No env vars exposed
490
+ - [x] No stack traces in user errors
491
+ - [x] Sensitive file patterns blocked from git commits (.env, .pem, .key)
492
+
493
+ ---
494
+
495
+ ## Phase 8: Implementation Roadmap
496
+
497
+ ### 8.1 Pre-Publish Tasks (Ordered)
498
+
499
+ ```
500
+ ### Task 1: Build hooks fresh
501
+ Command: npm run build:hooks
502
+ Verify: hooks/dist/ contains 3 .js files with current timestamps
503
+ Estimate: XS (30 seconds)
504
+ Priority: P0
505
+
506
+ ### Task 2: Run full test suite
507
+ Command: npm test
508
+ Verify: 875 pass, 0 fail, 0 skip
509
+ Estimate: XS (8 seconds)
510
+ Priority: P0
511
+
512
+ ### Task 3: Version bump to 1.0.0
513
+ File: package.json
514
+ Change: "version": "0.3.0" → "version": "1.0.0"
515
+ Estimate: XS
516
+ Priority: P0
517
+
518
+ ### Task 4: Consolidate CHANGELOG
519
+ File: CHANGELOG.md
520
+ Change: Merge [Unreleased] content into [1.0.0] section, update comparison links
521
+ Estimate: S
522
+ Priority: P0
523
+
524
+ ### Task 5: Verify npm pack output
525
+ Command: npm pack --dry-run
526
+ Verify: 157 files, ~422KB, no test/planning files, hooks/dist present
527
+ Estimate: XS
528
+ Priority: P0
529
+
530
+ ### Task 6: Git commit + tag
531
+ Commands:
532
+ git add package.json CHANGELOG.md
533
+ git commit -m "chore: release v1.0.0"
534
+ git tag v1.0.0
535
+ Estimate: XS
536
+ Priority: P0
537
+
538
+ ### Task 7: npm publish
539
+ Command: npm publish
540
+ Prerequisite: npm login + 2FA enabled
541
+ Verify: npm view pan-wizard returns metadata
542
+ Estimate: XS
543
+ Priority: P0
544
+
545
+ ### Task 8: Post-publish verification
546
+ Commands:
547
+ mkdir /tmp/pan-test && cd /tmp/pan-test
548
+ npx pan-wizard@latest --claude --local
549
+ npx pan-wizard@latest --copilot --local
550
+ Verify both installs produce expected output
551
+ Estimate: XS
552
+ Priority: P0
553
+
554
+ ### Task 9: Push to GitHub
555
+ Command: git push origin main --tags
556
+ Verify: v1.0.0 tag visible on GitHub
557
+ Estimate: XS
558
+ Priority: P1
559
+
560
+ ### Task 10: Create GitHub Release (optional, P2)
561
+ Command: gh release create v1.0.0 --notes "First public release. See CHANGELOG.md for details."
562
+ Estimate: XS
563
+ Priority: P2
564
+ ```
565
+
566
+ ### 8.2 Dependency Graph
567
+
568
+ ```
569
+ Task 1 (Build hooks) ─┐
570
+ Task 2 (Run tests) ───┤ (parallel, independent)
571
+ ▼
572
+ Task 3 (Version bump) → Task 4 (CHANGELOG) → Task 5 (Verify pack)
573
+ ▼
574
+ Task 6 (Git commit + tag)
575
+ ▼
576
+ Task 7 (npm publish)
577
+ ▼
578
+ Task 8 (Post-publish verify)
579
+ ▼
580
+ Task 9 (Push to GitHub)
581
+ ▼
582
+ Task 10 (GitHub Release)
583
+ ```
584
+
585
+ ### 8.3 Risk Register
586
+
587
+ | Risk | Probability | Impact | Mitigation |
588
+ |------|------------|--------|------------|
589
+ | npm name taken by someone else before publish | Very Low | High | Publish within this session |
590
+ | npm 2FA not set up | Medium | Medium | User sets up 2FA before Task 7 |
591
+ | hooks/dist/ out of date | Low | High | Task 1 rebuilds fresh |
592
+ | Test regression after version bump | Very Low | Medium | Task 2 verifies before commit |
593
+ | CHANGELOG formatting error | Low | Low | Review diff before commit |
594
+
595
+ ### 8.4 Cognitive Complexity Budget
596
+
597
+ Not applicable — no new functions being written. This is a release process.
598
+
599
+ ---
600
+
601
+ ## Phase 9: Test Plan
602
+
603
+ ### 9.1 Pre-Publish Verification
604
+
605
+ | Check | Command | Pass Criteria |
606
+ |-------|---------|---------------|
607
+ | All tests pass | `npm test` | 875 pass, 0 fail |
608
+ | Hooks built | `ls hooks/dist/` | 3 .js files |
609
+ | Pack contents correct | `npm pack --dry-run` | ~157 files, ~422KB |
610
+ | No secrets in pack | Manual review of `npm pack --dry-run` output | No .env, credentials, keys |
611
+ | Version consistent | grep version package.json | "1.0.0" |
612
+
613
+ ### 9.2 Post-Publish Verification (E2E)
614
+
615
+ | Test | Steps | Expected |
616
+ |------|-------|----------|
617
+ | npm registry | `npm view pan-wizard version` | `1.0.0` |
618
+ | Claude install | `npx pan-wizard@latest --claude --local` in fresh dir | Install success message |
619
+ | Copilot install | `npx pan-wizard@latest --copilot --local` in fresh dir | Install success message |
620
+ | Gemini install | `npx pan-wizard@latest --gemini --local` in fresh dir | Install success message |
621
+ | Codex install | `npx pan-wizard@latest --codex --local` in fresh dir | Install success message |
622
+ | OpenCode install | `npx pan-wizard@latest --opencode --local` in fresh dir | Install success message |
623
+ | Uninstall | `npx pan-wizard@latest --claude --local --uninstall` | Clean removal |
624
+ | Help flag | `npx pan-wizard@latest --help` | Help text displayed |
625
+
626
+ ### 9.3 Regression Verification
627
+
628
+ - [x] Full test suite: `npm test` — 875 pass, 0 fail (verified this session)
629
+ - [x] No .only() or .skip() calls in tests (verified by quality audit)
630
+ - [x] CI matrix: 3 OS × 4 Node versions (verified in ci.yml)
631
+
632
+ ---
633
+
634
+ ## Phase 10: Output Artifacts
635
+
636
+ ### 10.1 Documents Created
637
+
638
+ - **Spec:** `docs/specs/production_readiness_ship_v1_featureai.md` (this file)
639
+ - **ADR:** `docs/decisions/ADR-0007-ship-v1.md` (to be created)
640
+
641
+ ### 10.2 Report Summary
642
+
643
+ ```
644
+ ## /pan:focus-design Complete — Production Readiness & Ship v1.0.0
645
+
646
+ ### Problem & Evidence
647
+ PAN Wizard is feature-complete but unpublished on npm — README install instructions 404.
648
+ Evidence: User request, npm 404 confirmed, name available, all competitors ship via pkg managers.
649
+
650
+ ### Strategic Assessment
651
+ - Blue Ocean: ELIMINATE pre-release signal, REDUCE install friction, RAISE discoverability, CREATE public release
652
+ - Wardley: Product stage — ready to ship, distribution is the only gap
653
+ - Moat Score: 27/30 — strongest in Zero Dependencies (5), Cross-Platform (5), Context Engineering (5)
654
+ - Cognitive Load: -1 (simplifies — removes need to clone from source)
655
+ - Recommendation: Ship immediately as 1.0.0
656
+
657
+ ### Design Summary
658
+ - Feature Type: Release Process (not new code)
659
+ - Modules Affected: 0 (version bump in package.json only)
660
+ - Output Schema Changes: None
661
+ - Breaking Changes: Command renaming (documented in CHANGELOG)
662
+ - Layer Violations: None
663
+
664
+ ### Feature Ladder
665
+ - v1.0.0 (This spec): npm publish, version bump, CHANGELOG — XS effort
666
+ - v1.1.0: GitHub Actions automated publish, npm provenance — S effort
667
+ - v1.2.0: Download badges live, Dependabot, automated CHANGELOG — S effort
668
+
669
+ ### Implementation
670
+ - Tasks: 10 tasks (8 P0, 1 P1, 1 P2)
671
+ - Complexity: XS — no new code, purely operational
672
+ - Files to create: 1 (ADR)
673
+ - Files to modify: 2 (package.json, CHANGELOG.md)
674
+ - New tests: 0 (post-publish E2E verification is manual)
675
+
676
+ ### Security
677
+ - Attack surface: npm account credentials (mitigate with 2FA)
678
+ - Supply chain: 0 runtime deps = minimal risk
679
+ - Output sanitization: Already verified clean
680
+
681
+ ### Adoption
682
+ - Discovery: npm search for "claude code workflow", README install command
683
+ - Learning curve: Zero (standard npx pattern)
684
+ - Aha moment: Running `npx pan-wizard@latest` and seeing the interactive menu
685
+
686
+ ### Next Step
687
+ Execute the 10-task implementation roadmap:
688
+ 1. Build hooks
689
+ 2. Run tests
690
+ 3. Version bump to 1.0.0
691
+ 4. Consolidate CHANGELOG
692
+ 5. Verify npm pack
693
+ 6. Git commit + tag
694
+ 7. npm publish (requires npm login + 2FA)
695
+ 8. Post-publish E2E verification
696
+ 9. Push to GitHub
697
+ 10. Create GitHub Release
698
+ ```