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.
- package/CHANGELOG.md +3645 -0
- package/README.md +36 -48
- package/agents/pan-conductor.md +2 -3
- package/agents/pan-counterfactual.md +1 -2
- package/agents/pan-debugger.md +14 -3
- package/agents/pan-design-checker.md +1 -2
- package/agents/pan-designer.md +1 -2
- package/agents/pan-document_code.md +1 -2
- package/agents/pan-hardener.md +2 -3
- package/agents/pan-integration-checker.md +1 -2
- package/agents/pan-knowledge.md +1 -2
- package/agents/pan-meta-reviewer.md +3 -3
- package/agents/pan-optimizer.md +4 -4
- package/agents/pan-phase-researcher.md +79 -488
- package/agents/pan-plan-checker.md +12 -2
- package/agents/pan-planner.md +10 -6
- package/agents/pan-previewer.md +1 -2
- package/agents/pan-project-researcher.md +70 -499
- package/agents/pan-release.md +1 -1
- package/agents/pan-reviewer.md +9 -3
- package/agents/pan-roadmapper.md +12 -7
- package/agents/pan-verifier.md +7 -2
- package/bin/install-lib.cjs +134 -14
- package/bin/install.js +59 -12
- package/commands/pan/army.md +1 -1
- package/commands/pan/autodev.md +76 -0
- package/commands/pan/exec-phase.md +3 -4
- package/commands/pan/focus-auto.md +14 -7
- package/commands/pan/focus-design.md +4 -5
- package/commands/pan/focus-docs.md +24 -0
- package/commands/pan/learn.md +13 -6
- package/commands/pan/milestone-audit.md +8 -1
- package/commands/pan/milestone-done.md +10 -5
- package/commands/pan/milestone-new.md +2 -2
- package/commands/pan/new-project.md +15 -12
- package/commands/pan/plan-phase.md +15 -9
- package/commands/pan/quick.md +1 -1
- package/commands/pan/review-deep.md +11 -5
- package/commands/pan/settings.md +6 -0
- package/commands/pan/verify-phase.md +6 -2
- package/docs/AGENTS.md +917 -0
- package/docs/ARCHITECTURE.md +1054 -0
- package/docs/CLI-REFERENCE.md +4582 -0
- package/docs/COMPARISON.md +116 -0
- package/docs/DEVELOPMENT.md +490 -0
- package/docs/ECOSYSTEM-REVIEW-2026-06.md +107 -0
- package/docs/ECOSYSTEM-REVIEW-2026-08.md +349 -0
- package/docs/EXAMPLES.md +584 -0
- package/docs/FAQ.md +254 -0
- package/docs/FIELD-HARVEST-2026-07.md +88 -0
- package/docs/FIELD-REPORT-army-2026-06.md +121 -0
- package/docs/HOOKS.md +638 -0
- package/docs/IMPROVEMENT-TODO.md +246 -0
- package/docs/INTERNALS.md +485 -0
- package/docs/MIGRATION-v2-to-v3.md +258 -0
- package/docs/SECURITY-HARDENING.md +230 -0
- package/docs/SKILLS-ENHANCEMENT-PLAN-V2.md +122 -0
- package/docs/SKILLS-FULL-TEXT.md +9685 -0
- package/docs/SKILLS-REFERENCE.md +1037 -0
- package/docs/TROUBLESHOOTING.md +1084 -0
- package/docs/USER-GUIDE.md +1437 -0
- package/docs/archive/SKILLS-ENHANCEMENT-PLAN.md +230 -0
- package/docs/audits/AUDIT-2026-08-e2e-ROADMAP.md +117 -0
- package/docs/audits/AUDIT-2026-08-e2e-VERIFICATION.md +693 -0
- package/docs/audits/AUDIT-2026-08-e2e.md +1546 -0
- package/docs/audits/OUTSTANDING-2026-08.md +275 -0
- package/docs/audits/STABILITY-TEST-2026-08.md +640 -0
- package/docs/branding/README-brand-draft.md +119 -0
- package/docs/branding/handoff/IMPLEMENTATION.md +205 -0
- package/docs/branding/handoff/README-brand-draft.md +119 -0
- package/docs/branding/handoff/image-prompts.md +46 -0
- package/docs/branding/image-prompts.md +46 -0
- package/docs/branding/nano-banana-prompts.txt +60 -0
- package/docs/context-monitor.md +13 -0
- package/docs/decisions/ADR-0001-strategic-feature-prioritization.md +83 -0
- package/docs/decisions/ADR-0002-copilot-cli-runtime.md +71 -0
- package/docs/decisions/ADR-0003-smart-execution.md +84 -0
- package/docs/decisions/ADR-0004-copilot-cli-interaction.md +89 -0
- package/docs/decisions/ADR-0005-command-naming.md +80 -0
- package/docs/decisions/ADR-0006-focus-commands.md +101 -0
- package/docs/decisions/ADR-0007-ship-v1.md +73 -0
- package/docs/decisions/ADR-0008-map-codebase-mermaid-togaf.md +80 -0
- package/docs/decisions/ADR-0009-production-deployment-checklist.md +68 -0
- package/docs/decisions/ADR-0010-standards-integration.md +79 -0
- package/docs/decisions/ADR-0011-help-commands-rewrite.md +64 -0
- package/docs/decisions/ADR-0012-contributors-attribution-index.md +42 -0
- package/docs/decisions/ADR-0013-strategic-feature-additions.md +53 -0
- package/docs/decisions/ADR-0014-internal-cleanup-code-quality.md +53 -0
- package/docs/decisions/ADR-0015-focus-auto-runner.md +296 -0
- package/docs/decisions/ADR-0016-enhanced-doc-sync.md +54 -0
- package/docs/decisions/ADR-0017-enhanced-focus-design.md +69 -0
- package/docs/decisions/ADR-0018-user-reality-testing.md +84 -0
- package/docs/decisions/ADR-0019-end-to-end-user-acceptance-testing.md +113 -0
- package/docs/decisions/ADR-0020-ai-drift-prevention.md +55 -0
- package/docs/decisions/ADR-0021-codebase-mapper-v2.md +76 -0
- package/docs/decisions/ADR-0022-lifecycle-completeness.md +63 -0
- package/docs/decisions/ADR-0023-opus-4-7-adoption.md +89 -0
- package/docs/decisions/ADR-0024-spec-b-v2-completion.md +137 -0
- package/docs/decisions/ADR-0025-behavioral-guardrails-layer.md +129 -0
- package/docs/decisions/ADR-0026-self-improvement-loop.md +171 -0
- package/docs/decisions/ADR-0027-doc-code-link-graph.md +164 -0
- package/docs/decisions/ADR-0028-unified-agents-skills-target.md +46 -0
- package/docs/decisions/ADR-0029-experiment-evaluator.md +76 -0
- package/docs/decisions/ADR-0030-planning-concurrency.md +37 -0
- package/docs/decisions/ADR-0031-focus-auto-backlog-source.md +47 -0
- package/docs/decisions/ADR-0032-squad-model.md +64 -0
- package/docs/decisions/ADR-0033-army-campaign.md +40 -0
- package/docs/decisions/ADR-0034-scheduled-campaigns.md +57 -0
- package/docs/decisions/ADR-0035-army-hud-dashboard.md +40 -0
- package/docs/decisions/ADR-0036-agentic-memory-architecture.md +106 -0
- package/docs/decisions/ADR-0037-pin-security-agents-to-opus.md +51 -0
- package/docs/decisions/ADR-0038-skill-aligned-decomposition.md +41 -0
- package/docs/decisions/ADR-0039-worktree-as-project-variant.md +37 -0
- package/docs/decisions/ADR-0040-memory-injection-defense.md +55 -0
- package/docs/decisions/ADR-0041-mcp-dual-era-bridge.md +47 -0
- package/docs/decisions/ADR-0042-design-parity-both-flows.md +45 -0
- package/docs/decisions/ADR-0043-addressable-planning-roots.md +56 -0
- package/docs/decisions/ADR-0044-bound-the-cached-context.md +104 -0
- package/docs/decisions/ADR-0045-agent-plugins-bundle.md +76 -0
- package/docs/decisions/ADR-0046-subagent-frontmatter-decisions.md +39 -0
- package/docs/decisions/ADR-0047-pan-harness.md +76 -0
- package/docs/decisions/ADR-0048-one-core-per-project.md +43 -0
- package/docs/decisions/ADR-0049-machine-verdicts-and-findings-ledger.md +116 -0
- package/docs/specs/ai_drift_prevention_featureai.md +286 -0
- package/docs/specs/codebase_mapper_v2_featureai.md +930 -0
- package/docs/specs/command_naming_optimization_featureai.md +930 -0
- package/docs/specs/comp_analysis_markdown_v1.md +149 -0
- package/docs/specs/continuous_autonomous_execution_featureai.md +304 -0
- package/docs/specs/contributors_attribution_index_featureai.md +476 -0
- package/docs/specs/copilot_cli_interaction_featureai.md +868 -0
- package/docs/specs/copilot_cli_runtime_featureai.md +647 -0
- package/docs/specs/custom-skills-assessment.md +461 -0
- package/docs/specs/deployment_audit_findings_featureai.md +243 -0
- package/docs/specs/doc_code_link_graph_featureai.md +253 -0
- package/docs/specs/documentation_alignment_cleanup_featureai.md +69 -0
- package/docs/specs/e2e_visual_testing_featureai.md +615 -0
- package/docs/specs/end_to_end_user_acceptance_testing_featureai.md +810 -0
- package/docs/specs/evidence-loop-plan.md +76 -0
- package/docs/specs/evidence_loop_featureai.md +497 -0
- package/docs/specs/focus-auto-optimize-category.md +449 -0
- package/docs/specs/focus-auto-optimize-superplan.md +188 -0
- package/docs/specs/focus_auto_runner_featureai.md +1102 -0
- package/docs/specs/focus_design_v2_featureai.md +197 -0
- package/docs/specs/focus_sync_v2_featureai.md +202 -0
- package/docs/specs/git_integration_overhaul_featureai.md +326 -0
- package/docs/specs/glm_zai_provider_featureai.md +200 -0
- package/docs/specs/googlecli_adoption_featureai.md +661 -0
- package/docs/specs/help_commands_rewrite_featureai.md +860 -0
- package/docs/specs/industry_analysis_strategic_additions_featureai.md +231 -0
- package/docs/specs/industry_comparison_and_feature_gaps_featureai.md +674 -0
- package/docs/specs/internal_cleanup_code_quality_featureai.md +486 -0
- package/docs/specs/investigations/README.md +31 -0
- package/docs/specs/investigations/digests/2026-09-28.md +47 -0
- package/docs/specs/investigations/digests/2026-10-08.md +62 -0
- package/docs/specs/investigations/digests/2026-10-10.md +61 -0
- package/docs/specs/investigations/features/debugger-red-loop-first.md +55 -0
- package/docs/specs/investigations/features/harness-cross-host-behaviour.md +93 -0
- package/docs/specs/investigations/features/optimize-apply-regression-gate.md +66 -0
- package/docs/specs/investigations/features/reviewer-smell-baseline.md +57 -0
- package/docs/specs/investigations/features/trace-failure-capture.md +69 -0
- package/docs/specs/lifecycle_completeness_featureai.md +754 -0
- package/docs/specs/local-first-ci.md +42 -0
- package/docs/specs/map_codebase_mermaid_togaf_featureai.md +805 -0
- package/docs/specs/market-delta-2026-09-superplan.md +310 -0
- package/docs/specs/market-ideas-2026-09.md +131 -0
- package/docs/specs/market-ideas-2026-10.md +428 -0
- package/docs/specs/market-ideas-ledger.md +177 -0
- package/docs/specs/memory-optimization-2026-10.md +285 -0
- package/docs/specs/multi-track-planning-roots.md +143 -0
- package/docs/specs/multi_model_routing_featureai.md +687 -0
- package/docs/specs/multi_model_routing_superplan.md +197 -0
- package/docs/specs/opus_47_existing_enhancements_featureai.md +247 -0
- package/docs/specs/opus_47_extended_features_featureai.md +363 -0
- package/docs/specs/opus_47_extended_features_v2_featureai.md +397 -0
- package/docs/specs/pan_focus_commands_featureai.md +2336 -0
- package/docs/specs/pan_zcode_mcp_bridge_featureai.md +120 -0
- package/docs/specs/product-excellence-superplan.md +315 -0
- package/docs/specs/product_excellence_program_2026_q4_featureai.md +365 -0
- package/docs/specs/production_deployment_readiness_featureai.md +433 -0
- package/docs/specs/production_readiness_ship_v1_featureai.md +698 -0
- package/docs/specs/real_test_enforcement_featureai.md +213 -0
- package/docs/specs/reality-check-2026-09-superplan.md +362 -0
- package/docs/specs/right-sized-ceremony.md +74 -0
- package/docs/specs/roadmap_and_competition_2026_q4_featureai.md +390 -0
- package/docs/specs/self_improvement_loop_featureai.md +875 -0
- package/docs/specs/skill-aligned-decomposition.md +155 -0
- package/docs/specs/standards_integration_featureai.md +833 -0
- package/docs/specs/testing-system-redesign-2026-09.md +267 -0
- package/docs/specs/user_reality_testing_system_featureai.md +788 -0
- package/docs/specs/watch-triggers.json +22 -0
- package/docs/specs/workflow-integration-redesign.md +742 -0
- package/docs/specs/workflow_state_consistency_featureai.md +183 -0
- package/hooks/dist/pan-context-monitor.js +9 -2
- package/hooks/dist/pan-cost-logger.js +5 -0
- package/hooks/dist/pan-guard.js +28 -5
- package/hooks/dist/pan-stop-guard.js +9 -9
- package/hooks/dist/pan-trace-logger.js +5 -0
- package/package.json +10 -2
- package/pan-wizard-core/bin/lib/agents-md.cjs +57 -8
- package/pan-wizard-core/bin/lib/autodev-report.cjs +180 -0
- package/pan-wizard-core/bin/lib/autodev.cjs +642 -0
- package/pan-wizard-core/bin/lib/ci.cjs +143 -0
- package/pan-wizard-core/bin/lib/commands.cjs +1 -1
- package/pan-wizard-core/bin/lib/config.cjs +31 -2
- package/pan-wizard-core/bin/lib/constants.cjs +27 -1
- package/pan-wizard-core/bin/lib/core.cjs +22 -10
- package/pan-wizard-core/bin/lib/cost.cjs +14 -4
- package/pan-wizard-core/bin/lib/cross-family.cjs +164 -0
- package/pan-wizard-core/bin/lib/debug-cases.cjs +104 -0
- package/pan-wizard-core/bin/lib/failure-class.cjs +81 -0
- package/pan-wizard-core/bin/lib/findings.cjs +34 -4
- package/pan-wizard-core/bin/lib/focus.cjs +1 -1
- package/pan-wizard-core/bin/lib/hosts.cjs +88 -0
- package/pan-wizard-core/bin/lib/init.cjs +7 -2
- package/pan-wizard-core/bin/lib/knowledge.cjs +2 -0
- package/pan-wizard-core/bin/lib/merge.cjs +50 -0
- package/pan-wizard-core/bin/lib/mutate.cjs +16 -5
- package/pan-wizard-core/bin/lib/next-action.cjs +112 -0
- package/pan-wizard-core/bin/lib/optimize.cjs +2 -2
- package/pan-wizard-core/bin/lib/phase.cjs +48 -4
- package/pan-wizard-core/bin/lib/plan-lint.cjs +150 -1
- package/pan-wizard-core/bin/lib/preview.cjs +23 -4
- package/pan-wizard-core/bin/lib/requirements-lint.cjs +130 -0
- package/pan-wizard-core/bin/lib/research-lint.cjs +150 -3
- package/pan-wizard-core/bin/lib/review-deep.cjs +14 -22
- package/pan-wizard-core/bin/lib/review-vote.cjs +105 -0
- package/pan-wizard-core/bin/lib/runner.cjs +2 -16
- package/pan-wizard-core/bin/lib/sizing.cjs +356 -0
- package/pan-wizard-core/bin/lib/squads.cjs +1 -1
- package/pan-wizard-core/bin/lib/state-write.cjs +247 -0
- package/pan-wizard-core/bin/lib/uat.cjs +149 -0
- package/pan-wizard-core/bin/lib/verdict.cjs +26 -3
- package/pan-wizard-core/bin/lib/verify-plan-set.cjs +30 -1
- package/pan-wizard-core/bin/lib/verify-preflight.cjs +2 -2
- package/pan-wizard-core/bin/lib/verify-red.cjs +37 -1
- package/pan-wizard-core/bin/lib/verify-retro.cjs +3 -2
- package/pan-wizard-core/bin/lib/verify.cjs +59 -4
- package/pan-wizard-core/bin/lib/worktree.cjs +70 -0
- package/pan-wizard-core/bin/pan-tools.cjs +168 -27
- package/pan-wizard-core/learnings/universal/autonomous-loop.md +2 -2
- package/pan-wizard-core/references/continuation-format.md +3 -3
- package/pan-wizard-core/references/guardrails.md +1 -1
- package/pan-wizard-core/references/model-profiles.md +2 -3
- package/pan-wizard-core/references/questioning.md +24 -0
- package/pan-wizard-core/references/ui-brand.md +4 -6
- package/pan-wizard-core/references/verdict-contract.md +2 -1
- package/pan-wizard-core/templates/config.json +5 -1
- package/pan-wizard-core/templates/debug.md +1 -0
- package/pan-wizard-core/templates/discovery.md +2 -2
- package/pan-wizard-core/templates/requirements.md +9 -0
- package/pan-wizard-core/workflows/add-phase.md +4 -6
- package/pan-wizard-core/workflows/assumptions.md +19 -1
- package/pan-wizard-core/workflows/diagnose-issues.md +2 -0
- package/pan-wizard-core/workflows/discuss-phase.md +4 -2
- package/pan-wizard-core/workflows/exec-lean.md +69 -0
- package/pan-wizard-core/workflows/exec-phase.md +36 -8
- package/{commands/pan → pan-wizard-core/workflows}/focus-doc-audit.md +13 -29
- package/{commands/pan → pan-wizard-core/workflows}/focus-drift-walking.md +3 -18
- package/{commands/pan → pan-wizard-core/workflows}/focus-exec.md +8 -23
- package/{commands/pan → pan-wizard-core/workflows}/focus-plan.md +6 -20
- package/{commands/pan → pan-wizard-core/workflows}/focus-scan.md +3 -16
- package/{commands/pan → pan-wizard-core/workflows}/focus-sync.md +7 -21
- package/pan-wizard-core/workflows/health.md +6 -0
- package/pan-wizard-core/workflows/help.md +31 -53
- package/pan-wizard-core/workflows/insert-phase.md +4 -6
- package/pan-wizard-core/workflows/learn.md +3 -3
- package/pan-wizard-core/workflows/milestone-audit.md +2 -2
- package/pan-wizard-core/workflows/milestone-new.md +38 -95
- package/pan-wizard-core/workflows/new-project.md +96 -258
- package/pan-wizard-core/workflows/optimize.md +107 -5
- package/pan-wizard-core/workflows/phase-tests.md +10 -0
- package/pan-wizard-core/workflows/plan-phase.md +86 -43
- package/pan-wizard-core/workflows/profile.md +50 -0
- package/pan-wizard-core/workflows/progress.md +10 -0
- package/pan-wizard-core/workflows/quick.md +34 -43
- package/pan-wizard-core/workflows/research-phase.md +118 -40
- package/pan-wizard-core/workflows/resume-project.md +18 -2
- package/pan-wizard-core/workflows/settings.md +21 -24
- package/pan-wizard-core/workflows/todo-check.md +6 -2
- package/pan-wizard-core/workflows/transition.md +22 -4
- package/pan-wizard-core/workflows/uat-walkthrough.md +90 -0
- package/pan-wizard-core/workflows/update.md +1 -1
- package/pan-wizard-core/workflows/verify-phase.md +2 -2
- package/scripts/build-agent-plugin.js +35 -15
- package/scripts/build-plugin.js +10 -1
- package/scripts/deprecate-old-versions.js +70 -3
- package/scripts/generate-skills-docs.py +1 -1
- package/scripts/git-hooks/pre-push +27 -0
- package/scripts/install-git-hooks.js +7 -5
- package/scripts/install-pre-push.cjs +38 -0
- package/scripts/land.cjs +151 -0
- package/scripts/local-ci.cjs +501 -0
- package/scripts/local-schedule.cjs +277 -0
- package/scripts/prompt-lint.cjs +32 -0
- package/scripts/prompt-rules.cjs +156 -0
- package/scripts/run-tests.cjs +7 -1
- package/scripts/test-quality-lint.cjs +3 -3
- package/scripts/test-surface.cjs +9 -2
- package/agents/pan-research-synthesizer.md +0 -246
- package/commands/pan/audit-deployment.md +0 -386
- package/commands/pan/dashboard.md +0 -22
- package/commands/pan/discord.md +0 -19
- package/commands/pan/mcp-bridge.md +0 -143
- package/commands/pan/milestone-cleanup.md +0 -19
- package/commands/pan/milestone-gaps.md +0 -35
- package/commands/pan/optimize.md +0 -115
- package/commands/pan/profile.md +0 -76
- package/commands/pan/research-phase.md +0 -189
- package/pan-wizard-core/bin/lib/bridge.cjs +0 -269
- package/pan-wizard-core/templates/research-project/architecture.md +0 -210
- package/pan-wizard-core/templates/research-project/features.md +0 -153
- package/pan-wizard-core/templates/research-project/pitfalls.md +0 -206
- package/pan-wizard-core/templates/research-project/stack.md +0 -126
- package/pan-wizard-core/templates/research-project/summary.md +0 -170
|
@@ -0,0 +1,930 @@
|
|
|
1
|
+
# /featureAI: Command Naming, Usability & Optimization
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-03-01
|
|
4
|
+
**Feature:** Command namespace restructuring, naming consistency, and UX optimization
|
|
5
|
+
**Status:** Proposed
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Phase 0: Problem Framing & Demand Validation
|
|
10
|
+
|
|
11
|
+
### 0.1 Problem Statement
|
|
12
|
+
|
|
13
|
+
PAN Wizard has 32 user-facing commands under the `/pan:` namespace. The naming is inconsistent — 22 commands use verb-first patterns (`add-phase`, `execute-phase`), 10 use noun-first patterns (`context-budget`, `list-phase-assumptions`). The object "phase" appears as a suffix in 8 commands, as a prefix in 0, and is absent from related commands that operate on phases (`discuss-phase` discusses a phase but `progress` also reports on phases). Invocation lengths range from 9 characters (`/pan:help`) to 31 characters (`/pan:list-phase-assumptions`).
|
|
14
|
+
|
|
15
|
+
At 32 commands, PAN has crossed the inflection point (~20-25 commands) where flat naming breaks down and noun-verb namespacing becomes strongly recommended — a pattern documented in Docker's 2017 CLI restructuring, kubectl's resource-verb model, and the `gh` CLI's noun-verb design.
|
|
16
|
+
|
|
17
|
+
The cost of NOT doing this: as PAN grows (deferred items include execution modes, compare command, verbose flag, cross-session learning, phase splitting advisor), the command list becomes harder to discover, harder to remember, and harder for AI agents to invoke correctly. Users already face a 32-command surface — adding 5-10 more without restructuring pushes past comfortable cognitive limits.
|
|
18
|
+
|
|
19
|
+
### 0.2 Demand Evidence
|
|
20
|
+
|
|
21
|
+
| Evidence Type | Source | Finding |
|
|
22
|
+
|--------------|--------|---------|
|
|
23
|
+
| Industry standard | Docker, kubectl, gh, terraform, cargo | All restructured after crossing 20-25 commands |
|
|
24
|
+
| Usability research | Miller's Law (7±2 chunks) | 32 flat commands exceed chunking capacity; grouping into ~6 noun groups of 4-6 commands each restores navigability |
|
|
25
|
+
| User pain | clig.dev guidelines | "If your CLI has many sub-commands, organize them into categories" — PAN's flat list violates this |
|
|
26
|
+
| Competitive gap | Cursor, Continue | Both use grouped namespaces (`@workspace`, `/edit`, `@codebase`); Aider's flat 31-command set is widely criticized for discoverability |
|
|
27
|
+
| User-stated | This conversation | User explicitly asked for "commands and naming of them and optimising and renaming them, proper end to end industry check" |
|
|
28
|
+
|
|
29
|
+
### 0.3 Scope Definition
|
|
30
|
+
|
|
31
|
+
| In Scope | Out of Scope (and why) |
|
|
32
|
+
|----------|------------------------|
|
|
33
|
+
| Rename user-facing command .md files | Rename pan-tools CLI subcommands (internal, not user-invoked) |
|
|
34
|
+
| Group commands into noun-based categories | Add new commands (separate feature) |
|
|
35
|
+
| Create aliases for old names (deprecation period) | Change agent names (agents aren't user-invoked) |
|
|
36
|
+
| Update all documentation references | Change hook names (internal) |
|
|
37
|
+
| Update installer to use new names | Modify core library function names (internal) |
|
|
38
|
+
| Update help command to show grouped output | Change JSON output schemas (no breaking changes) |
|
|
39
|
+
|
|
40
|
+
### 0.4 Success Criteria (Measurable)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
SC-1: Max cognitive chunk size ≤ 7 commands per group (Miller's Law)
|
|
44
|
+
SC-2: Mean command invocation length ≤ 18 characters (down from 20.3)
|
|
45
|
+
SC-3: Every command name follows consistent verb-noun or noun-verb pattern
|
|
46
|
+
SC-4: Old command names continue to work (aliases) for ≥ 2 minor versions
|
|
47
|
+
SC-5: No regression in 802+ tests
|
|
48
|
+
SC-6: `/pan:help` output groups commands by noun category with descriptions
|
|
49
|
+
SC-7: Works across all 5 runtimes (Claude Code, OpenCode, Gemini CLI, Codex, Copilot CLI)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 0.5 User Stories
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
As a developer learning PAN Wizard, I want commands grouped by what they operate on,
|
|
56
|
+
so that I can discover related commands together, instead of scanning a 32-item flat list.
|
|
57
|
+
|
|
58
|
+
As a power user typing commands frequently, I want shorter command names,
|
|
59
|
+
so that I can work faster, instead of typing /pan:list-phase-assumptions (31 chars).
|
|
60
|
+
|
|
61
|
+
As an AI agent (Claude/Copilot), I want predictable naming patterns,
|
|
62
|
+
so that I can infer command names, instead of memorizing 32 arbitrary names.
|
|
63
|
+
|
|
64
|
+
As a user migrating from an older PAN version, I want old names to keep working,
|
|
65
|
+
so that my muscle memory isn't broken, instead of relearning all commands at once.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 0.6 Cannibalization Check
|
|
69
|
+
|
|
70
|
+
| Existing Command/Agent | Overlap? | Impact |
|
|
71
|
+
|-----------------------|----------|--------|
|
|
72
|
+
| `/pan:help` | Partial — help output needs redesign for groups | Update help.md to show grouped output |
|
|
73
|
+
| All 32 commands | Full — every command gets renamed or confirmed | Alias mapping required |
|
|
74
|
+
| Installer | Partial — .md filenames change, installer must map | Update converters for Codex/Copilot skill names |
|
|
75
|
+
|
|
76
|
+
**No Full overlap creating redundancy** — this is a restructuring, not a new feature.
|
|
77
|
+
|
|
78
|
+
### 0.7 Cognitive Load Assessment
|
|
79
|
+
|
|
80
|
+
| Metric | Before | After | Delta |
|
|
81
|
+
|--------|--------|-------|-------|
|
|
82
|
+
| Commands a new user must learn | 32 (flat) | 32 (6 groups × ~5 each) | 0 commands, -1 complexity |
|
|
83
|
+
| New concepts introduced | 0 | 1 (noun grouping) | +1 concept, but net simplification |
|
|
84
|
+
| Score | — | — | simplifies (-1) — grouping reduces apparent complexity |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Phase 1: Internal Reconnaissance
|
|
89
|
+
|
|
90
|
+
### 1.1 Architecture Scan
|
|
91
|
+
|
|
92
|
+
**Current 32 commands organized by implicit category:**
|
|
93
|
+
|
|
94
|
+
| Category | Commands | Count |
|
|
95
|
+
|----------|----------|-------|
|
|
96
|
+
| Project Setup | new-project, new-milestone, map-codebase | 3 |
|
|
97
|
+
| Phase Lifecycle | plan-phase, discuss-phase, execute-phase, verify-work, research-phase | 5 |
|
|
98
|
+
| Phase Management | add-phase, insert-phase, remove-phase, list-phase-assumptions | 4 |
|
|
99
|
+
| Session/State | progress, pause-work, resume-work, set-profile, settings, context-budget | 6 |
|
|
100
|
+
| Milestone | complete-milestone, audit-milestone, plan-milestone-gaps, cleanup | 4 |
|
|
101
|
+
| Todos & Tasks | add-todo, check-todos, add-tests, quick | 4 |
|
|
102
|
+
| Debug & Health | debug, health, update, reapply-patches | 4 |
|
|
103
|
+
| Community | help, join-discord | 2 |
|
|
104
|
+
|
|
105
|
+
**Naming pattern analysis (32 commands):**
|
|
106
|
+
|
|
107
|
+
| Pattern | Examples | Count |
|
|
108
|
+
|---------|----------|-------|
|
|
109
|
+
| verb-noun (`add-phase`) | add-phase, add-todo, add-tests, check-todos, complete-milestone, discuss-phase, execute-phase, insert-phase, list-phase-assumptions, map-codebase, new-milestone, new-project, pause-work, plan-milestone-gaps, plan-phase, reapply-patches, remove-phase, research-phase, resume-work, set-profile, verify-work | 21 |
|
|
110
|
+
| noun-only (`progress`) | progress, debug, health, help, quick, settings, update, cleanup | 8 |
|
|
111
|
+
| adjective-noun (`context-budget`) | context-budget, join-discord | 2 |
|
|
112
|
+
| verb-noun-noun (`audit-milestone`) | audit-milestone | 1 |
|
|
113
|
+
|
|
114
|
+
**Invocation length analysis (character count of `/pan:<name>`):**
|
|
115
|
+
|
|
116
|
+
| Length Range | Count | Commands |
|
|
117
|
+
|-------------|-------|----------|
|
|
118
|
+
| 9-12 chars | 5 | help, quick, debug, health, update |
|
|
119
|
+
| 13-16 chars | 6 | cleanup, progress, settings, add-todo, add-tests, set-profile |
|
|
120
|
+
| 17-20 chars | 10 | add-phase, new-project, pause-work, resume-work, plan-phase, verify-work, discuss-phase, execute-phase, insert-phase, remove-phase |
|
|
121
|
+
| 21-24 chars | 7 | check-todos, map-codebase, new-milestone, research-phase, context-budget, join-discord, reapply-patches |
|
|
122
|
+
| 25-31 chars | 4 | complete-milestone, audit-milestone, plan-milestone-gaps, list-phase-assumptions |
|
|
123
|
+
|
|
124
|
+
**Mean invocation length:** 20.3 chars. **Median:** 19 chars.
|
|
125
|
+
|
|
126
|
+
### 1.2 Object frequency in command names
|
|
127
|
+
|
|
128
|
+
| Object | Appearances | Commands |
|
|
129
|
+
|--------|-------------|----------|
|
|
130
|
+
| phase | 8 | add-phase, discuss-phase, execute-phase, insert-phase, list-phase-assumptions, plan-phase, remove-phase, research-phase |
|
|
131
|
+
| milestone | 4 | audit-milestone, complete-milestone, new-milestone, plan-milestone-gaps |
|
|
132
|
+
| work | 3 | pause-work, resume-work, verify-work |
|
|
133
|
+
| todo(s) | 2 | add-todo, check-todos |
|
|
134
|
+
| project | 1 | new-project |
|
|
135
|
+
| codebase | 1 | map-codebase |
|
|
136
|
+
| profile | 1 | set-profile |
|
|
137
|
+
| tests | 1 | add-tests |
|
|
138
|
+
|
|
139
|
+
### 1.3 Convention Enforcement Checklist
|
|
140
|
+
|
|
141
|
+
- [x] Functions named `cmd<Module><Action>(cwd, raw, ...args)`
|
|
142
|
+
- [x] File reads use `safeReadFile()` or `readStateSafe()`
|
|
143
|
+
- [x] File writes wrapped in try-catch
|
|
144
|
+
- [x] JSON output via `output(data, raw, humanLabel)`
|
|
145
|
+
- [x] Errors via `error(message)`
|
|
146
|
+
- [x] Paths in JSON output pass through `toPosix()`
|
|
147
|
+
- [x] Module exports at bottom
|
|
148
|
+
- [x] Subcommands dispatched via `switch` in `pan-tools.cjs`
|
|
149
|
+
- [x] CommonJS only (`.cjs` with `require()`)
|
|
150
|
+
- [x] Zero runtime dependencies
|
|
151
|
+
|
|
152
|
+
### 1.4 Dependency & Integration Map
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
[This Feature: Command Renaming]
|
|
156
|
+
├── modifies: commands/pan/*.md (32 files — rename)
|
|
157
|
+
├── modifies: bin/install.js (converter uses filenames)
|
|
158
|
+
├── modifies: commands/pan/help.md (grouped output)
|
|
159
|
+
├── modifies: docs/*.md (all references)
|
|
160
|
+
├── modifies: README.md (command tables)
|
|
161
|
+
├── depends on: existing installer converters (Codex/Copilot skill naming)
|
|
162
|
+
├── conflicts with: nothing (aliases preserve backward compat)
|
|
163
|
+
└── enables: future command additions with clear placement
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**require() chain:** No new modules needed. This is a renaming of command .md files (orchestration layer), not core library changes.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Phase 2: Competitive Intelligence
|
|
171
|
+
|
|
172
|
+
### 2.1 Deep-Dive Research (6 Tools + 5 CLI references)
|
|
173
|
+
|
|
174
|
+
#### Industry CLI Naming Patterns
|
|
175
|
+
|
|
176
|
+
| Tool | Structure | Command Count | Naming Pattern | Grouping |
|
|
177
|
+
|------|-----------|---------------|----------------|----------|
|
|
178
|
+
| **git** | `git <verb> [noun]` | ~22 porcelain + ~30 plumbing | Verb-first (`commit`, `branch`, `merge`) | Informal categories in docs |
|
|
179
|
+
| **npm** | `npm <verb>` | ~25 | Verb-first (`install`, `publish`, `audit`) | Flat but logical groups in help |
|
|
180
|
+
| **Docker** | `docker <noun> <verb>` | 50+ | Noun-verb since 2017 restructure (`container run`, `image build`) | Noun-based management commands |
|
|
181
|
+
| **kubectl** | `kubectl <verb> <noun>` | ~30 | Verb-first with resource types (`get pods`, `describe node`) | Verb categories in help |
|
|
182
|
+
| **gh** | `gh <noun> <verb>` | 40+ | Noun-verb (`pr create`, `issue list`, `repo clone`) | Noun-based groups |
|
|
183
|
+
| **terraform** | `terraform <verb>` | ~15 | Verb-first (`plan`, `apply`, `destroy`) | Flat (small set) |
|
|
184
|
+
| **cargo** | `cargo <verb>` | ~20 | Verb-first (`build`, `test`, `run`) | Flat (small set) |
|
|
185
|
+
| **vercel** | `vercel <noun> <verb>` | ~25 | Noun-verb for management (`domains add`, `env pull`) | Noun-based |
|
|
186
|
+
|
|
187
|
+
**Key finding:** Tools with <20 commands stay flat and verb-first (git, cargo, terraform). Tools crossing 20-25 commands adopt noun-verb grouping (Docker, gh, vercel). The inflection point is well-documented — Docker's 2017 restructuring is the canonical case study.
|
|
188
|
+
|
|
189
|
+
#### AI Coding Tool Command Patterns
|
|
190
|
+
|
|
191
|
+
| Tool | Commands | Pattern | Notable |
|
|
192
|
+
|------|----------|---------|---------|
|
|
193
|
+
| **Aider** | ~31 | `/verb-noun` flat (`/add`, `/drop`, `/diff`, `/commit`) | Single words preferred; criticized for discoverability |
|
|
194
|
+
| **Cursor** | ~10 slash + ~12 @ | `/edit`, `/chat`, `@workspace`, `@codebase` | Dual namespace: `/` for actions, `@` for context |
|
|
195
|
+
| **Continue.dev** | ~9 slash + custom | `/edit`, `/comment`, `/share` | Short verbs; `@` providers for context |
|
|
196
|
+
| **Cline** | 0 commands | Natural language only | Zero commands — everything via NL |
|
|
197
|
+
| **Windsurf** | ~6 | Context-only (`@files`, `@docs`) | Minimal command surface |
|
|
198
|
+
| **Copilot Chat** | ~8 slash + 4 @ + 6 # | `/explain`, `/fix`, `/tests`, `@workspace` | Triple namespace: `/`, `@`, `#` |
|
|
199
|
+
|
|
200
|
+
**Key finding:** AI tools split into two camps: (a) command-heavy with flat naming (Aider), (b) NL-first with minimal commands (Cline, Windsurf). PAN is in camp (a) but with compound names, which is the worst of both worlds — many commands AND long names. Best-in-class tools (gh, Docker) that have many commands use noun-verb grouping.
|
|
201
|
+
|
|
202
|
+
### 2.2 Prior Art: Docker CLI Restructuring (Case Study)
|
|
203
|
+
|
|
204
|
+
Docker crossed ~20 commands and experienced:
|
|
205
|
+
1. Users couldn't find commands they needed
|
|
206
|
+
2. New commands had naming conflicts
|
|
207
|
+
3. `docker ps` vs `docker container ls` confusion
|
|
208
|
+
4. Muscle memory vs discoverability tension
|
|
209
|
+
|
|
210
|
+
Docker's solution:
|
|
211
|
+
- **Grouped by noun:** `docker container`, `docker image`, `docker volume`, `docker network`
|
|
212
|
+
- **Kept old aliases:** `docker ps` still works (maps to `docker container ls`)
|
|
213
|
+
- **Gradual migration:** Old names work indefinitely, new names in docs/help
|
|
214
|
+
- **Clearer verb set:** `ls`, `create`, `rm`, `inspect` — consistent across nouns
|
|
215
|
+
|
|
216
|
+
**Lesson for PAN:** Docker's approach — group by noun, keep aliases, gradual migration — is the proven pattern.
|
|
217
|
+
|
|
218
|
+
### 2.3 Competitive Matrix
|
|
219
|
+
|
|
220
|
+
| Aspect | PAN (Current) | PAN (Proposed) | Docker | gh | Aider | Cursor |
|
|
221
|
+
|--------|--------------|----------------|--------|-----|-------|--------|
|
|
222
|
+
| Grouping | Flat | Noun-verb | Noun-verb | Noun-verb | Flat | Dual namespace |
|
|
223
|
+
| Max commands per group | N/A (32 flat) | 7 | 8 | 6 | N/A | 5 |
|
|
224
|
+
| Mean invocation length | 20.3 chars | ~16 chars | ~22 chars | ~14 chars | ~7 chars | ~8 chars |
|
|
225
|
+
| Naming consistency | Mixed (verb/noun) | Uniform noun-verb | Uniform | Uniform | Uniform verb | Uniform |
|
|
226
|
+
| Aliases for old names | N/A | Yes | Yes | No (was new) | N/A | N/A |
|
|
227
|
+
| Help grouping | Flat list | By noun category | By noun | By noun | Flat | By type |
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Phase 3: Strategic Analysis
|
|
232
|
+
|
|
233
|
+
### 3.1 Blue Ocean Four Actions Framework
|
|
234
|
+
|
|
235
|
+
| Action | Question | Decisions |
|
|
236
|
+
|--------|----------|-----------|
|
|
237
|
+
| **ELIMINATE** | What should we drop? | Inconsistent naming patterns; flat help output; long compound names like `list-phase-assumptions` |
|
|
238
|
+
| **REDUCE** | What should be reduced? | Invocation length (mean 20.3→~16); cognitive load (32 flat→6 groups); naming exceptions |
|
|
239
|
+
| **RAISE** | What should be raised? | Discoverability (grouped help); naming predictability (consistent pattern); cross-runtime consistency |
|
|
240
|
+
| **CREATE** | What should we create? | Noun-based command groups; alias system for backward compat; grouped help output; short forms for frequent commands |
|
|
241
|
+
|
|
242
|
+
### 3.2 Wardley Evolution Assessment
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
Genesis ──── Custom-Built ──── Product ──── Commodity
|
|
246
|
+
▲ ▲
|
|
247
|
+
│ │
|
|
248
|
+
PAN's current Docker/gh
|
|
249
|
+
naming (ad hoc) naming (industry standard)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
- **Industry position:** Noun-verb grouping for large CLIs is firmly in the "Product→Commodity" zone. Docker, gh, vercel, and AWS CLI all use it.
|
|
253
|
+
- **PAN's position:** Ad-hoc naming is "Custom-Built" — each command was named individually without a systematic framework.
|
|
254
|
+
- **Evolution in 2-3 years:** PAN will likely have 40-50 commands as deferred features are built. Without restructuring now, naming debt compounds.
|
|
255
|
+
- **Target:** Move to Product-level naming (noun-verb groups) before reaching 40 commands.
|
|
256
|
+
|
|
257
|
+
### 3.3 Strategic Moat Analysis
|
|
258
|
+
|
|
259
|
+
| Moat Type | Contribution | Score (0-5) |
|
|
260
|
+
|-----------|-------------|-------------|
|
|
261
|
+
| **Context Engineering** | Grouped names help AI agents locate correct commands faster | 4 |
|
|
262
|
+
| **Cross-Platform** | Uniform naming across all 5 runtimes | 5 |
|
|
263
|
+
| **Developer Experience** | Grouped discovery, shorter names, predictable patterns | 5 |
|
|
264
|
+
| **Zero Dependencies** | Renaming doesn't add deps | 5 |
|
|
265
|
+
| **State Persistence** | No impact (state files unchanged) | 0 |
|
|
266
|
+
| **Verification Quality** | No impact | 0 |
|
|
267
|
+
| **Total** | | **19/30** |
|
|
268
|
+
|
|
269
|
+
### 3.4 Strategic Recommendation
|
|
270
|
+
|
|
271
|
+
**Build — Restructure now before the next wave of features.** PAN is at 32 commands, precisely at the inflection point where Docker, gh, and every major CLI tool added noun grouping. The competitive landscape shows that AI-native tools with many commands (Aider) are criticized for flat naming, while tools with grouped naming (gh) are praised. PAN's unique angle: being the first AI workflow tool to apply Docker/gh-style noun-verb grouping to the AI coding assistant space. We should NOT copy Aider's flat approach or Cursor's dual-namespace (`/` + `@`) pattern — PAN operates via slash commands only, and noun-verb grouping is simpler and more proven. Strategic timing: before v1.0, while user base is small enough for a naming migration.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Phase 3.5: Architecture & Implementation Pattern Assessment
|
|
276
|
+
|
|
277
|
+
### 3.5.1 Feature Type Classification
|
|
278
|
+
|
|
279
|
+
| Type | Description | Template |
|
|
280
|
+
|------|-------------|----------|
|
|
281
|
+
| **Workflow** | Rename .md command files | Rename files + create alias .md files pointing to new names |
|
|
282
|
+
| **Core Enhancement** | Help command redesign | Modify help.md to show grouped output |
|
|
283
|
+
| **Installer** | Filename changes propagate | Update converters in install.js |
|
|
284
|
+
|
|
285
|
+
### 3.5.2 Layer Violation Check
|
|
286
|
+
|
|
287
|
+
- [x] Command .md files do NOT call `state.cjs` directly
|
|
288
|
+
- [x] Core modules return data — they do NOT import or depend on agent .md files
|
|
289
|
+
- [x] No upward dependencies
|
|
290
|
+
- [x] This is orchestration-layer only — no core library changes needed
|
|
291
|
+
|
|
292
|
+
### 3.5.3 Proposed Command Naming Scheme
|
|
293
|
+
|
|
294
|
+
**Structure:** `/pan:<noun>-<verb>` (or `/pan:<verb>` for single-word commands)
|
|
295
|
+
|
|
296
|
+
**Noun groups (6 groups, max 7 per group):**
|
|
297
|
+
|
|
298
|
+
#### Group 1: `project` (3 commands)
|
|
299
|
+
| Current Name | Proposed Name | Change? | Chars Saved |
|
|
300
|
+
|-------------|---------------|---------|-------------|
|
|
301
|
+
| `new-project` | `project-new` | Yes | 0 |
|
|
302
|
+
| `map-codebase` | `project-map` | Yes | -2 |
|
|
303
|
+
| `settings` | `project-settings` | Yes | +8 (but grouped) |
|
|
304
|
+
|
|
305
|
+
#### Group 2: `phase` (7 commands)
|
|
306
|
+
| Current Name | Proposed Name | Change? | Chars Saved |
|
|
307
|
+
|-------------|---------------|---------|-------------|
|
|
308
|
+
| `plan-phase` | `phase-plan` | Yes | 0 |
|
|
309
|
+
| `discuss-phase` | `phase-discuss` | Yes | 0 |
|
|
310
|
+
| `execute-phase` | `phase-exec` | Yes | -3 |
|
|
311
|
+
| `verify-work` | `phase-verify` | Yes | +1 |
|
|
312
|
+
| `research-phase` | `phase-research` | Yes | 0 |
|
|
313
|
+
| `add-phase` | `phase-add` | Yes | 0 |
|
|
314
|
+
| `list-phase-assumptions` | `phase-assumptions` | Yes | -5 |
|
|
315
|
+
|
|
316
|
+
#### Group 3: `phase` continued — management (4 commands)
|
|
317
|
+
| Current Name | Proposed Name | Change? | Chars Saved |
|
|
318
|
+
|-------------|---------------|---------|-------------|
|
|
319
|
+
| `insert-phase` | `phase-insert` | Yes | 0 |
|
|
320
|
+
| `remove-phase` | `phase-remove` | Yes | 0 |
|
|
321
|
+
| `add-tests` | `phase-tests` | Yes | 0 |
|
|
322
|
+
| `context-budget` | `phase-budget` | Yes | -1 |
|
|
323
|
+
|
|
324
|
+
**Wait — that puts 11 commands in the `phase` group.** That exceeds Miller's 7±2. Let me reconsider.
|
|
325
|
+
|
|
326
|
+
**Revised approach: 7 noun groups**
|
|
327
|
+
|
|
328
|
+
#### Group 1: `project` — Project-level operations (4 commands)
|
|
329
|
+
| Current Name | Proposed Name | Alias (old name) | Chars |
|
|
330
|
+
|-------------|---------------|-------------------|-------|
|
|
331
|
+
| `new-project` | `project-init` | `new-project` | 17 |
|
|
332
|
+
| `map-codebase` | `project-map` | `map-codebase` | 16 |
|
|
333
|
+
| `settings` | `project-settings` | `settings` | 21 |
|
|
334
|
+
| `set-profile` | `project-profile` | `set-profile` | 20 |
|
|
335
|
+
|
|
336
|
+
#### Group 2: `phase` — Phase planning & execution (7 commands)
|
|
337
|
+
| Current Name | Proposed Name | Alias (old name) | Chars |
|
|
338
|
+
|-------------|---------------|-------------------|-------|
|
|
339
|
+
| `discuss-phase` | `phase-discuss` | `discuss-phase` | 18 |
|
|
340
|
+
| `plan-phase` | `phase-plan` | `plan-phase` | 15 |
|
|
341
|
+
| `execute-phase` | `phase-exec` | `execute-phase` | 15 |
|
|
342
|
+
| `research-phase` | `phase-research` | `research-phase` | 19 |
|
|
343
|
+
| `verify-work` | `phase-verify` | `verify-work` | 17 |
|
|
344
|
+
| `add-phase` | `phase-add` | `add-phase` | 14 |
|
|
345
|
+
| `list-phase-assumptions` | `phase-assumptions` | `list-phase-assumptions` | 22 |
|
|
346
|
+
|
|
347
|
+
#### Group 3: `phase` overflow — Phase management (4 commands)
|
|
348
|
+
| Current Name | Proposed Name | Alias (old name) | Chars |
|
|
349
|
+
|-------------|---------------|-------------------|-------|
|
|
350
|
+
| `insert-phase` | `phase-insert` | `insert-phase` | 17 |
|
|
351
|
+
| `remove-phase` | `phase-remove` | `remove-phase` | 17 |
|
|
352
|
+
| `add-tests` | `phase-tests` | `add-tests` | 16 |
|
|
353
|
+
| `context-budget` | `phase-budget` | `context-budget` | 17 |
|
|
354
|
+
|
|
355
|
+
**Problem:** Splitting `phase` into two groups defeats the purpose. Let me reconsider the grouping entirely.
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
**REVISED FINAL APPROACH: Keep verb-first, add group prefixes only for clarity**
|
|
360
|
+
|
|
361
|
+
After deeper analysis, the noun-verb inversion creates more problems than it solves for PAN's specific situation:
|
|
362
|
+
|
|
363
|
+
1. **PAN commands are slash commands, not shell commands** — `/pan:phase-plan 1` vs `/pan:plan-phase 1`. The verb-first form reads more naturally as an imperative.
|
|
364
|
+
2. **AI agents process verb-first better** — "plan phase 1" is a natural language instruction. "phase plan 1" is not.
|
|
365
|
+
3. **11 phase commands in one group is too many** — The `phase` noun dominates, making grouping less useful.
|
|
366
|
+
4. **Docker/gh have true subcommand dispatch** — `docker container ls` has the noun as a dispatcher level. PAN can't do this without restructuring the command .md system, which is out of scope.
|
|
367
|
+
|
|
368
|
+
**The real problems to solve are:**
|
|
369
|
+
1. Inconsistent naming (some verb-first, some noun-only)
|
|
370
|
+
2. Overly long names (`list-phase-assumptions`)
|
|
371
|
+
3. Flat help output (no grouping in display)
|
|
372
|
+
4. Missing verb in noun-only commands (`progress` → what verb?)
|
|
373
|
+
|
|
374
|
+
### 3.5.3 Output Contract Design
|
|
375
|
+
|
|
376
|
+
**For `help` command (updated):**
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"version": "0.3.0",
|
|
380
|
+
"groups": [
|
|
381
|
+
{
|
|
382
|
+
"name": "Getting Started",
|
|
383
|
+
"commands": [
|
|
384
|
+
{"name": "new-project", "alias": null, "description": "Initialize a new project", "args": ""},
|
|
385
|
+
{"name": "map-codebase", "alias": null, "description": "Analyze existing codebase", "args": ""}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"aliases": {
|
|
390
|
+
"old-name": "new-name"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Contract rules:**
|
|
396
|
+
- [x] Field names use camelCase
|
|
397
|
+
- [x] No field name collisions
|
|
398
|
+
- [x] Error shape: `{"error": "description"}`
|
|
399
|
+
- [x] Paths use `toPosix()`
|
|
400
|
+
- [x] Output size < 10KB typical
|
|
401
|
+
|
|
402
|
+
### 3.5.4 State Transition Modeling
|
|
403
|
+
|
|
404
|
+
No state transitions — this feature only renames files and updates display. state.md, roadmap.md are unaffected.
|
|
405
|
+
|
|
406
|
+
### 3.5.5 Breaking Change Assessment
|
|
407
|
+
|
|
408
|
+
| Question | Answer |
|
|
409
|
+
|----------|--------|
|
|
410
|
+
| Changes any existing command's JSON output schema? | No |
|
|
411
|
+
| Changes file formats (state.md, roadmap.md, config.json)? | No |
|
|
412
|
+
| Changes directory structure (.planning/, phases/)? | No |
|
|
413
|
+
| Changes installer output? | Yes — Codex/Copilot skill filenames change; aliases cover backward compat |
|
|
414
|
+
|
|
415
|
+
**Migration strategy:** Alias .md files that redirect to new names. Old invocations continue to work. Deprecation notices in alias files after 2 minor versions.
|
|
416
|
+
|
|
417
|
+
### 3.5.6 Composability Analysis
|
|
418
|
+
|
|
419
|
+
| Interaction | Works? | How |
|
|
420
|
+
|-------------|--------|-----|
|
|
421
|
+
| Output feeds another command's input | N/A | Commands are user-invoked, not piped |
|
|
422
|
+
| Callable from an agent .md | Yes | Agents invoke workflows by filename; aliases resolve |
|
|
423
|
+
| Usable in a hook pipeline | N/A | Hooks don't invoke commands |
|
|
424
|
+
| Works in --raw mode | Yes | No raw mode change |
|
|
425
|
+
|
|
426
|
+
### 3.5.7 Performance Budget
|
|
427
|
+
|
|
428
|
+
| Operation | Cost | Notes |
|
|
429
|
+
|-----------|------|-------|
|
|
430
|
+
| File renames | 0ms runtime | Build-time only |
|
|
431
|
+
| Alias resolution | ~1ms | Installer maps old→new |
|
|
432
|
+
| Help grouping | ~5ms | Parse 32 command names + group |
|
|
433
|
+
| **Total** | **< 10ms** | Negligible |
|
|
434
|
+
|
|
435
|
+
### 3.5.8 Cross-Platform Considerations
|
|
436
|
+
|
|
437
|
+
| Platform | Consideration |
|
|
438
|
+
|----------|---------------|
|
|
439
|
+
| Windows | Filename renames safe; case-insensitive FS means no collision risk |
|
|
440
|
+
| Mac/Linux | Case-sensitive FS — old and new names can coexist |
|
|
441
|
+
| All | Installer converters handle all filename→skill-name mapping |
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Phase 4: Design Synthesis
|
|
446
|
+
|
|
447
|
+
### 4.1 Guide-Level Explanation
|
|
448
|
+
|
|
449
|
+
#### The Problem: PAN's 32 Commands Are Hard to Navigate
|
|
450
|
+
|
|
451
|
+
When you type `/pan:` and see 32 commands, you're hit with a wall of text. You need to scan the whole list to find what you want. Some names are obvious (`/pan:help`), but others are cryptic (`/pan:list-phase-assumptions`) or inconsistent (`/pan:verify-work` operates on a phase, but doesn't have "phase" in the name).
|
|
452
|
+
|
|
453
|
+
#### The Solution: Grouped Help + Shorter Names + Consistent Patterns
|
|
454
|
+
|
|
455
|
+
**1. Grouped help output** — `/pan:help` now shows commands organized by what they do:
|
|
456
|
+
|
|
457
|
+
```
|
|
458
|
+
Getting Started
|
|
459
|
+
new-project Initialize a new project with research + roadmap
|
|
460
|
+
map-codebase Analyze existing codebase with parallel agents
|
|
461
|
+
|
|
462
|
+
Phase Lifecycle
|
|
463
|
+
discuss-phase <N> Shape implementation through targeted questions
|
|
464
|
+
plan-phase <N> Research + plan a phase with verification
|
|
465
|
+
exec-phase <N> Execute plans with wave-based parallelization
|
|
466
|
+
verify-phase <N> Validate built features through UAT
|
|
467
|
+
|
|
468
|
+
Phase Management
|
|
469
|
+
add-phase <desc> Append new phase to roadmap
|
|
470
|
+
insert-phase <N> Insert urgent work between phases
|
|
471
|
+
remove-phase <N> Remove phase and renumber
|
|
472
|
+
phase-tests <N> Generate tests for completed phase
|
|
473
|
+
phase-budget Estimate context utilization
|
|
474
|
+
assumptions <N> Surface approach assumptions
|
|
475
|
+
|
|
476
|
+
Session & Progress
|
|
477
|
+
progress Check status and route to next action
|
|
478
|
+
quick <desc> Fast-path execution (skip optional agents)
|
|
479
|
+
pause Save context for later resumption
|
|
480
|
+
resume Restore previous session context
|
|
481
|
+
profile <name> Switch model profile (quality/balanced/budget)
|
|
482
|
+
|
|
483
|
+
Milestone
|
|
484
|
+
milestone-new Start a new milestone cycle
|
|
485
|
+
milestone-done <v> Archive completed milestone
|
|
486
|
+
milestone-audit Audit completion against intent
|
|
487
|
+
milestone-gaps Create phases to close audit gaps
|
|
488
|
+
milestone-cleanup Archive accumulated phase directories
|
|
489
|
+
|
|
490
|
+
System
|
|
491
|
+
help Show this guide
|
|
492
|
+
health Diagnose planning directory integrity
|
|
493
|
+
settings Configure workflow toggles
|
|
494
|
+
update Update PAN to latest version
|
|
495
|
+
debug Systematic debugging with state
|
|
496
|
+
todo-add Capture idea as todo
|
|
497
|
+
todo-check List and select pending todos
|
|
498
|
+
discord Join community
|
|
499
|
+
patches Reapply local modifications after update
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**2. Shortened names for frequent commands:**
|
|
503
|
+
- `execute-phase` → `exec-phase` (saves 4 chars, `exec` is universally understood)
|
|
504
|
+
- `verify-work` → `verify-phase` (consistent with other phase commands)
|
|
505
|
+
- `list-phase-assumptions` → `assumptions` (saves 12 chars, context is obvious)
|
|
506
|
+
- `pause-work` → `pause` (saves 5 chars, no ambiguity)
|
|
507
|
+
- `resume-work` → `resume` (saves 5 chars)
|
|
508
|
+
- `new-milestone` → `milestone-new` (consistent noun-first for milestone group)
|
|
509
|
+
- `complete-milestone` → `milestone-done` (shorter, clearer)
|
|
510
|
+
- `audit-milestone` → `milestone-audit` (consistent)
|
|
511
|
+
- `plan-milestone-gaps` → `milestone-gaps` (shorter)
|
|
512
|
+
- `join-discord` → `discord` (shorter)
|
|
513
|
+
- `reapply-patches` → `patches` (shorter)
|
|
514
|
+
- `add-todo` → `todo-add` (consistent with todo-check)
|
|
515
|
+
- `check-todos` → `todo-check` (consistent naming)
|
|
516
|
+
- `add-tests` → `phase-tests` (clear it's about a phase)
|
|
517
|
+
- `context-budget` → `phase-budget` (clear it's about a phase)
|
|
518
|
+
- `set-profile` → `profile` (shorter, unambiguous)
|
|
519
|
+
|
|
520
|
+
**3. Old names still work** — type `/pan:execute-phase 1` and it works exactly as before. A small deprecation notice appears in the alias file, but execution is identical.
|
|
521
|
+
|
|
522
|
+
**4. Error messages if you get close:**
|
|
523
|
+
```
|
|
524
|
+
Unknown command: exec. Did you mean: exec-phase?
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### 4.2 Reference-Level Explanation
|
|
528
|
+
|
|
529
|
+
#### 4.2.1 Rename Table (Complete)
|
|
530
|
+
|
|
531
|
+
| Current Name (32) | New Name | Category | Alias? | Chars Before→After |
|
|
532
|
+
|-------------------|----------|----------|--------|-------------------|
|
|
533
|
+
| `new-project` | `new-project` | Getting Started | No change | 16→16 |
|
|
534
|
+
| `map-codebase` | `map-codebase` | Getting Started | No change | 17→17 |
|
|
535
|
+
| `discuss-phase` | `discuss-phase` | Phase Lifecycle | No change | 18→18 |
|
|
536
|
+
| `plan-phase` | `plan-phase` | Phase Lifecycle | No change | 15→15 |
|
|
537
|
+
| `execute-phase` | `exec-phase` | Phase Lifecycle | Yes | 18→15 |
|
|
538
|
+
| `research-phase` | `research-phase` | Phase Lifecycle | No change | 19→19 |
|
|
539
|
+
| `verify-work` | `verify-phase` | Phase Lifecycle | Yes | 16→17 |
|
|
540
|
+
| `add-phase` | `add-phase` | Phase Management | No change | 14→14 |
|
|
541
|
+
| `insert-phase` | `insert-phase` | Phase Management | No change | 17→17 |
|
|
542
|
+
| `remove-phase` | `remove-phase` | Phase Management | No change | 17→17 |
|
|
543
|
+
| `list-phase-assumptions` | `assumptions` | Phase Management | Yes | 28→16 |
|
|
544
|
+
| `add-tests` | `phase-tests` | Phase Management | Yes | 14→16 |
|
|
545
|
+
| `context-budget` | `phase-budget` | Phase Management | Yes | 19→17 |
|
|
546
|
+
| `progress` | `progress` | Session | No change | 13→13 |
|
|
547
|
+
| `quick` | `quick` | Session | No change | 10→10 |
|
|
548
|
+
| `pause-work` | `pause` | Session | Yes | 15→10 |
|
|
549
|
+
| `resume-work` | `resume` | Session | Yes | 16→11 |
|
|
550
|
+
| `set-profile` | `profile` | Session | Yes | 16→12 |
|
|
551
|
+
| `settings` | `settings` | System | No change | 13→13 |
|
|
552
|
+
| `new-milestone` | `milestone-new` | Milestone | Yes | 18→18 |
|
|
553
|
+
| `complete-milestone` | `milestone-done` | Milestone | Yes | 23→19 |
|
|
554
|
+
| `audit-milestone` | `milestone-audit` | Milestone | Yes | 20→19 |
|
|
555
|
+
| `plan-milestone-gaps` | `milestone-gaps` | Milestone | Yes | 24→19 |
|
|
556
|
+
| `cleanup` | `milestone-cleanup` | Milestone | Yes | 12→22 (but grouped) |
|
|
557
|
+
| `help` | `help` | System | No change | 9→9 |
|
|
558
|
+
| `health` | `health` | System | No change | 11→11 |
|
|
559
|
+
| `update` | `update` | System | No change | 11→11 |
|
|
560
|
+
| `debug` | `debug` | System | No change | 10→10 |
|
|
561
|
+
| `add-todo` | `todo-add` | System | Yes | 13→13 |
|
|
562
|
+
| `check-todos` | `todo-check` | System | Yes | 16→15 |
|
|
563
|
+
| `join-discord` | `discord` | System | Yes | 17→12 |
|
|
564
|
+
| `reapply-patches` | `patches` | System | Yes | 21→12 |
|
|
565
|
+
|
|
566
|
+
**Summary of changes:**
|
|
567
|
+
- **18 commands renamed** (56%)
|
|
568
|
+
- **14 commands unchanged** (44%)
|
|
569
|
+
- **Mean invocation length:** 20.3 → 15.3 chars (−25%)
|
|
570
|
+
- **Max invocation length:** 28 → 22 chars (−21%)
|
|
571
|
+
- **Aliases needed:** 18
|
|
572
|
+
|
|
573
|
+
#### 4.2.2 Alias Mechanism
|
|
574
|
+
|
|
575
|
+
Each alias is a minimal .md file that re-exports the new command:
|
|
576
|
+
|
|
577
|
+
```markdown
|
|
578
|
+
---
|
|
579
|
+
name: pan:execute-phase
|
|
580
|
+
description: "[Alias] Use /pan:exec-phase instead"
|
|
581
|
+
argument-hint: "<phase>"
|
|
582
|
+
---
|
|
583
|
+
<objective>
|
|
584
|
+
This command has been renamed to `/pan:exec-phase`. Redirecting...
|
|
585
|
+
</objective>
|
|
586
|
+
|
|
587
|
+
<execution_context>
|
|
588
|
+
@commands/pan/exec-phase.md
|
|
589
|
+
</execution_context>
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
**For Codex/Copilot:** The installer generates skill files for BOTH old and new names. The old-name skill file includes a note: "This command is also available as /pan:exec-phase (preferred)."
|
|
593
|
+
|
|
594
|
+
#### 4.2.3 Help Redesign
|
|
595
|
+
|
|
596
|
+
The `help.md` command reads all command .md files, extracts frontmatter, and groups by a new frontmatter field:
|
|
597
|
+
|
|
598
|
+
```yaml
|
|
599
|
+
---
|
|
600
|
+
name: pan:exec-phase
|
|
601
|
+
group: Phase Lifecycle
|
|
602
|
+
description: Execute plans with wave-based parallelization
|
|
603
|
+
argument-hint: "<phase> [--dry-run] [--budget N]"
|
|
604
|
+
---
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
The `group` field is optional. Commands without it appear in "Other".
|
|
608
|
+
|
|
609
|
+
#### 4.2.4 Error Handling
|
|
610
|
+
|
|
611
|
+
| Condition | JSON Output | Error Style |
|
|
612
|
+
|-----------|-------------|-------------|
|
|
613
|
+
| Unknown command | `{"error": "Unknown command: X", "hint": "Did you mean: Y?"}` | Levenshtein distance match |
|
|
614
|
+
| Old alias invoked | Transparent redirect, no error | Alias .md loads target .md |
|
|
615
|
+
| Missing phase arg | `{"error": "phase number required"}` | Existing behavior |
|
|
616
|
+
|
|
617
|
+
**Error message style:**
|
|
618
|
+
- `"Unknown command: exec"` + `"hint": "Did you mean: exec-phase?"`
|
|
619
|
+
- Never expose internal filenames or paths
|
|
620
|
+
|
|
621
|
+
#### 4.2.5 Milestone Group Rationale
|
|
622
|
+
|
|
623
|
+
Milestone commands are currently scattered: `new-milestone`, `complete-milestone`, `audit-milestone`, `plan-milestone-gaps`, `cleanup`. Grouping them under `milestone-*` prefix:
|
|
624
|
+
- Makes them discoverable together
|
|
625
|
+
- Reveals the milestone lifecycle: `new` → `audit` → `gaps` → `done` → `cleanup`
|
|
626
|
+
- `cleanup` without prefix was confusing (cleanup what?)
|
|
627
|
+
|
|
628
|
+
### 4.3 Design Decisions
|
|
629
|
+
|
|
630
|
+
| Decision | Adopted From | Rationale | What We Did NOT Copy (and Why) |
|
|
631
|
+
|----------|-------------|-----------|-------------------------------|
|
|
632
|
+
| Noun-first for milestone group | gh (`gh pr create`) | Milestone commands form a clear lifecycle; grouping aids discovery | Did NOT apply noun-first to phase commands — too many (11), and verb-first reads naturally as imperative |
|
|
633
|
+
| Shorten frequent commands | Aider (`/add` not `/add-file`) | `exec` universally understood; `pause`/`resume` unambiguous without `-work` | Did NOT go single-word for all — `discuss-phase` needs the noun for clarity |
|
|
634
|
+
| Alias backward compat | Docker | Proven pattern for migration without breaking users | Did NOT make aliases permanent — deprecate after 2 minor versions |
|
|
635
|
+
| `group` frontmatter field | kubectl help categories | Lightweight metadata; no structural change | Did NOT create nested command directories — too complex for 32 commands |
|
|
636
|
+
| `assumptions` instead of `list-phase-assumptions` | Aider brevity | Context is always a phase; `list` is implied; saves 12 chars | Did NOT abbreviate to `assume` — confusing verb form |
|
|
637
|
+
|
|
638
|
+
### 4.4 Drawbacks & Alternatives
|
|
639
|
+
|
|
640
|
+
| Decision Point | Chosen | Alternative | Why Not | Drawback of Chosen |
|
|
641
|
+
|----------------|--------|------------|---------|-------------------|
|
|
642
|
+
| Selective rename | Rename 18, keep 14 | Rename all to strict noun-verb | 14 commands already have good names; forcing a pattern change on `help`, `debug`, `quick` adds complexity with no benefit | Some inconsistency remains (hybrid approach) |
|
|
643
|
+
| Alias mechanism | .md file that loads target | Symlinks/hard links | Not cross-platform; Codex/Copilot can't follow symlinks | 18 alias files to maintain |
|
|
644
|
+
| Grouped help | Frontmatter `group` field | Separate help command per group | Fragments discovery; user needs to know group name first | All 32 .md files need `group` field added |
|
|
645
|
+
| Milestone-* prefix | Prefix all 5 milestone commands | Keep verb-first for milestones | Milestone commands are used in sequence (lifecycle); prefix groups them naturally in alphabetical lists | `cleanup` → `milestone-cleanup` is longer |
|
|
646
|
+
| `exec-phase` abbreviation | `exec` | `run-phase` | `run` is overloaded (tests, scripts); `exec` is CLI-standard (Docker, k8s) | Slightly less obvious to non-CLI users |
|
|
647
|
+
|
|
648
|
+
### 4.5 Feature Ladder (Incremental Delivery)
|
|
649
|
+
|
|
650
|
+
| Version | Scope | Value Delivered | Effort |
|
|
651
|
+
|---------|-------|----------------|--------|
|
|
652
|
+
| **v0 (MVP)** | Rename 18 .md files + create 18 alias files + add `group` frontmatter to all 32 + update help.md | Grouped help, shorter names, aliases work | M |
|
|
653
|
+
| **v1 (Complete)** | Update all docs (README, USER-GUIDE, CLI-REFERENCE, ARCHITECTURE, AGENTS, CHANGELOG) + update installer converters for Codex/Copilot | Full documentation consistency | S |
|
|
654
|
+
| **v2 (Enhanced)** | Fuzzy command matching (Levenshtein) + deprecation warnings + eventual alias removal | Clean namespace, smart error recovery | S |
|
|
655
|
+
|
|
656
|
+
v0 is the target for the first superplan/execplan cycle.
|
|
657
|
+
|
|
658
|
+
### 4.6 Adoption Analysis
|
|
659
|
+
|
|
660
|
+
| Question | Answer |
|
|
661
|
+
|----------|--------|
|
|
662
|
+
| How does the user discover this feature? | `/pan:help` now shows grouped output; CHANGELOG entry |
|
|
663
|
+
| What's the learning curve? | Zero — old names still work; new names are shorter |
|
|
664
|
+
| Does it require changing existing workflows? | No — aliases ensure backward compat |
|
|
665
|
+
| What's the "aha moment"? | First time user types `/pan:help` and sees organized groups instead of a 32-line wall |
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
## Phase 5: Architecture Decision Record
|
|
670
|
+
|
|
671
|
+
See separate file: `docs/decisions/ADR-0005-command-naming.md`
|
|
672
|
+
|
|
673
|
+
---
|
|
674
|
+
|
|
675
|
+
## Phase 6: Error Handling & Diagnostics Design
|
|
676
|
+
|
|
677
|
+
### 6.1 Failure Mode Analysis
|
|
678
|
+
|
|
679
|
+
| Failure Mode | Category | Detection Pattern | Recovery | User Sees |
|
|
680
|
+
|-------------|----------|-------------------|----------|---------|
|
|
681
|
+
| Old command name used | Expected usage | Alias .md loads target | Transparent redirect | Correct behavior |
|
|
682
|
+
| Typo in command name | User error | Levenshtein match (v2) | Suggest closest match | Actionable hint |
|
|
683
|
+
| Alias file missing | Installation error | `safeReadFile()` returns null | Error with install suggestion | "Command not found. Run /pan:update" |
|
|
684
|
+
| `group` field missing | Migration gap | Default to "Other" group | Graceful fallback | Command appears in "Other" in help |
|
|
685
|
+
|
|
686
|
+
### 6.2 Diagnostic Support
|
|
687
|
+
|
|
688
|
+
| Diagnostic | How | When |
|
|
689
|
+
|------------|-----|------|
|
|
690
|
+
| `--raw` flag | Human-readable help output | Debugging |
|
|
691
|
+
| Alias transparency | Alias files clearly state "This is an alias for X" | User inspection |
|
|
692
|
+
| `validate health` | Checks all command .md files have `group` field | Health check |
|
|
693
|
+
|
|
694
|
+
---
|
|
695
|
+
|
|
696
|
+
## Phase 7: Security & Threat Model
|
|
697
|
+
|
|
698
|
+
### 7.1 Asset & Attack Surface
|
|
699
|
+
|
|
700
|
+
| Asset | Accessed How | Trust Level |
|
|
701
|
+
|-------|-------------|-------------|
|
|
702
|
+
| Command .md files | Read by Claude/AI agent | System-generated, trusted |
|
|
703
|
+
| Alias .md files | Read by Claude/AI agent | System-generated, trusted |
|
|
704
|
+
| `group` frontmatter field | Read by help command | User-editable (but harmless) |
|
|
705
|
+
|
|
706
|
+
### 7.2 Path Safety
|
|
707
|
+
|
|
708
|
+
No user-supplied paths — all command resolution uses hardcoded filenames in the commands/pan/ directory. No path traversal risk.
|
|
709
|
+
|
|
710
|
+
### 7.3 Output Sanitization
|
|
711
|
+
|
|
712
|
+
- [x] No absolute filesystem paths in output
|
|
713
|
+
- [x] No environment variable values
|
|
714
|
+
- [x] No stack traces
|
|
715
|
+
- [x] No internal function names
|
|
716
|
+
|
|
717
|
+
### 7.4 Privilege Scope
|
|
718
|
+
|
|
719
|
+
```
|
|
720
|
+
Reads from: commands/pan/*.md (command definitions)
|
|
721
|
+
Writes to: commands/pan/*.md (new files + rename)
|
|
722
|
+
Executes shell: No
|
|
723
|
+
Reads outside project: No
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
No security concerns — this is purely a file-rename and metadata-addition operation.
|
|
727
|
+
|
|
728
|
+
---
|
|
729
|
+
|
|
730
|
+
## Phase 8: Implementation Roadmap
|
|
731
|
+
|
|
732
|
+
### 8.1 Command .md Definitions (DRAFT)
|
|
733
|
+
|
|
734
|
+
**Example: `exec-phase.md` (renamed from `execute-phase.md`)**
|
|
735
|
+
|
|
736
|
+
The file content is identical to the current `execute-phase.md`, except:
|
|
737
|
+
1. `name:` changes from `pan:execute-phase` to `pan:exec-phase`
|
|
738
|
+
2. `group: Phase Lifecycle` is added to frontmatter
|
|
739
|
+
|
|
740
|
+
**Example: alias `execute-phase.md` (backward compat)**
|
|
741
|
+
|
|
742
|
+
```markdown
|
|
743
|
+
---
|
|
744
|
+
name: pan:execute-phase
|
|
745
|
+
group: Phase Lifecycle
|
|
746
|
+
description: "[Alias] → /pan:exec-phase"
|
|
747
|
+
argument-hint: "<phase>"
|
|
748
|
+
allowed-tools: []
|
|
749
|
+
---
|
|
750
|
+
|
|
751
|
+
<objective>
|
|
752
|
+
This command has moved to `/pan:exec-phase`. Load and follow the instructions in that command.
|
|
753
|
+
</objective>
|
|
754
|
+
|
|
755
|
+
<execution_context>
|
|
756
|
+
@commands/pan/exec-phase.md
|
|
757
|
+
</execution_context>
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### 8.2 Implementation Tasks (Ordered)
|
|
761
|
+
|
|
762
|
+
```
|
|
763
|
+
### Task 1: Add `group` frontmatter field to all 32 command .md files
|
|
764
|
+
Files: commands/pan/*.md (32 files)
|
|
765
|
+
Test: frontmatter validate for all files shows `group` field
|
|
766
|
+
Estimate: S
|
|
767
|
+
Priority: P0
|
|
768
|
+
|
|
769
|
+
### Task 2: Rename 18 command .md files
|
|
770
|
+
Files: commands/pan/*.md (rename 18 files, create 18 alias files)
|
|
771
|
+
Test: Both old and new filenames exist; alias files contain @execution_context pointing to new file
|
|
772
|
+
Estimate: M
|
|
773
|
+
Priority: P0
|
|
774
|
+
|
|
775
|
+
### Task 3: Update help.md to display grouped output
|
|
776
|
+
Files: commands/pan/help.md
|
|
777
|
+
Test: /pan:help shows groups in correct order
|
|
778
|
+
Estimate: S
|
|
779
|
+
Priority: P0
|
|
780
|
+
|
|
781
|
+
### Task 4: Update installer converters for new filenames
|
|
782
|
+
Files: bin/install.js
|
|
783
|
+
Test: Codex/Copilot skill files use new names; old-name skills still generated
|
|
784
|
+
Estimate: M
|
|
785
|
+
Priority: P1
|
|
786
|
+
|
|
787
|
+
### Task 5: Tests — new filenames resolve, aliases work, help groups correct
|
|
788
|
+
Files: tests/command-naming.test.cjs (new)
|
|
789
|
+
Test: All new tests pass, no regressions
|
|
790
|
+
Estimate: M
|
|
791
|
+
Priority: P1
|
|
792
|
+
|
|
793
|
+
### Task 6: Documentation update
|
|
794
|
+
Files: README.md, docs/USER-GUIDE.md, docs/CLI-REFERENCE.md, docs/ARCHITECTURE.md, CHANGELOG.md
|
|
795
|
+
Test: All command references use new names; old names mentioned in "aliases" section
|
|
796
|
+
Estimate: M
|
|
797
|
+
Priority: P2
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
### 8.3 Dependency Graph
|
|
801
|
+
|
|
802
|
+
```
|
|
803
|
+
Task 1 (Add group frontmatter)
|
|
804
|
+
└─→ Task 2 (Rename files + create aliases)
|
|
805
|
+
├─→ Task 3 (Help redesign)
|
|
806
|
+
├─→ Task 4 (Installer update)
|
|
807
|
+
└─→ Task 5 (Tests)
|
|
808
|
+
└─→ Task 6 (Docs)
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
### 8.4 Risk Register
|
|
812
|
+
|
|
813
|
+
| Risk | Probability | Impact | Mitigation |
|
|
814
|
+
|------|------------|--------|------------|
|
|
815
|
+
| Breaking existing user workflows | Medium | High | Alias files ensure 100% backward compat |
|
|
816
|
+
| Installer misses a converter path | Medium | Medium | Test all 5 runtimes after installer change |
|
|
817
|
+
| AI agents reference old names in context | Low | Low | Aliases resolve transparently |
|
|
818
|
+
| 18 alias files become maintenance burden | Low | Medium | Plan alias removal in v2 (2 minor versions) |
|
|
819
|
+
| Cross-runtime skill name mismatch | Medium | Medium | Test Codex + Copilot skill discovery after rename |
|
|
820
|
+
|
|
821
|
+
### 8.5 Cognitive Complexity Budget
|
|
822
|
+
|
|
823
|
+
No new functions expected to exceed 50 lines. The help grouping logic is ~30 lines (parse frontmatter, group by `group` field, render).
|
|
824
|
+
|
|
825
|
+
---
|
|
826
|
+
|
|
827
|
+
## Phase 9: Test Plan
|
|
828
|
+
|
|
829
|
+
### 9.1 Test Pyramid
|
|
830
|
+
|
|
831
|
+
| Level | Pattern | Minimum Count | What It Catches |
|
|
832
|
+
|-------|---------|---------------|-----------------|
|
|
833
|
+
| **Unit** | Verify frontmatter `group` field exists in all .md files | 5+ | Missing metadata |
|
|
834
|
+
| **Integration** | `runPanTools()` with aliased command names | 5+ | Alias resolution, help grouping |
|
|
835
|
+
| **E2E** | Full install + invoke old name + verify behavior | 2+ | Cross-runtime compat |
|
|
836
|
+
|
|
837
|
+
### 9.2 Specific Tests
|
|
838
|
+
|
|
839
|
+
```
|
|
840
|
+
1. Every command .md file has `group` field in frontmatter
|
|
841
|
+
2. Every alias .md file has @execution_context pointing to valid target
|
|
842
|
+
3. help.md output contains all 7 group names
|
|
843
|
+
4. help.md output lists correct command count per group
|
|
844
|
+
5. Old command name invocation produces same result as new name
|
|
845
|
+
6. Installer generates Copilot skills for both old and new names
|
|
846
|
+
7. No command .md file exceeds naming convention (word-word or single-word)
|
|
847
|
+
8. Renamed files exist at new paths
|
|
848
|
+
9. Alias files exist at old paths
|
|
849
|
+
10. Mean invocation length < 16 chars (regression guard)
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
### 9.3 Boundary Value Analysis
|
|
853
|
+
|
|
854
|
+
- [x] Command with no `group` field → appears in "Other"
|
|
855
|
+
- [x] Alias pointing to nonexistent target → error with hint
|
|
856
|
+
- [x] Command name with 3+ words after rename → should not exist
|
|
857
|
+
- [x] Copilot skill file with renamed command → skill name matches
|
|
858
|
+
|
|
859
|
+
### 9.4 Regression Verification
|
|
860
|
+
|
|
861
|
+
- [x] Full suite: `npm test` — ALL existing 802+ tests pass
|
|
862
|
+
- [x] Installer tests: `tests/copilot-install.test.cjs` — all pass with new names
|
|
863
|
+
- [x] No existing test expectations changed
|
|
864
|
+
|
|
865
|
+
---
|
|
866
|
+
|
|
867
|
+
## Phase 10: Output Artifacts
|
|
868
|
+
|
|
869
|
+
### 10.1 Specification Document
|
|
870
|
+
|
|
871
|
+
Saved to: `docs/specs/command_naming_optimization_featureai.md` (this file)
|
|
872
|
+
|
|
873
|
+
### 10.2 ADR
|
|
874
|
+
|
|
875
|
+
Saved to: `docs/decisions/ADR-0005-command-naming.md`
|
|
876
|
+
|
|
877
|
+
### 10.3 Report Summary
|
|
878
|
+
|
|
879
|
+
```
|
|
880
|
+
## /featureAI Complete — Command Naming, Usability & Optimization
|
|
881
|
+
|
|
882
|
+
### Problem & Evidence
|
|
883
|
+
32 commands with inconsistent naming and flat help output exceed cognitive chunking limits.
|
|
884
|
+
Evidence: Docker/gh/kubectl restructuring precedent, clig.dev guidelines, Miller's Law, user request.
|
|
885
|
+
|
|
886
|
+
### Strategic Assessment
|
|
887
|
+
- Blue Ocean: Eliminate flat listing, Reduce invocation length, Raise discoverability, Create grouped help
|
|
888
|
+
- Wardley: Custom-Built (ad hoc naming) → Product (systematic noun grouping)
|
|
889
|
+
- Moat Score: 19/30 — strongest in Cross-Platform (5), Developer Experience (5), Zero Dependencies (5)
|
|
890
|
+
- Cognitive Load: simplifies (-1) — grouping reduces apparent complexity from 32 to 7 groups
|
|
891
|
+
- Recommendation: Build — restructure now before next feature wave
|
|
892
|
+
|
|
893
|
+
### Design Summary
|
|
894
|
+
- Feature Type: Workflow (command .md rename) + Core Enhancement (help redesign)
|
|
895
|
+
- Modules Affected: 0 core modules; 32 command .md files; bin/install.js; help.md
|
|
896
|
+
- Output Schema: help command adds `groups` array
|
|
897
|
+
- Error Handling: Alias transparent redirect; graceful fallback for missing `group` field
|
|
898
|
+
- Breaking Changes: None (aliases preserve backward compat)
|
|
899
|
+
- Layer Violations: None
|
|
900
|
+
|
|
901
|
+
### Feature Ladder
|
|
902
|
+
- v0 (MVP): Rename 18 files + 18 aliases + group frontmatter + help redesign — M effort
|
|
903
|
+
- v1 (Complete): Full documentation sync — S effort
|
|
904
|
+
- v2 (Enhanced): Fuzzy matching + deprecation warnings + alias removal — S effort
|
|
905
|
+
|
|
906
|
+
### Implementation
|
|
907
|
+
- Tasks: 6 tasks
|
|
908
|
+
- Complexity: M (medium)
|
|
909
|
+
- Files to create: 18 (alias .md files) + 1 (test file)
|
|
910
|
+
- Files to modify: 32 (add `group` field) + 18 (rename) + 6 (docs) + 1 (installer) + 1 (help)
|
|
911
|
+
- Tests planned: 10+ (unit: 5, integration: 5, e2e: 2)
|
|
912
|
+
|
|
913
|
+
### Security
|
|
914
|
+
- Attack surface: None — file renames only
|
|
915
|
+
- Path safety: Not needed (no user-supplied paths)
|
|
916
|
+
- Output sanitization: Verified
|
|
917
|
+
|
|
918
|
+
### Adoption
|
|
919
|
+
- Discovery: /pan:help shows grouped output
|
|
920
|
+
- Learning curve: Zero — old names still work
|
|
921
|
+
- Aha moment: First grouped help output
|
|
922
|
+
|
|
923
|
+
### Documents Created
|
|
924
|
+
- Spec: docs/specs/command_naming_optimization_featureai.md
|
|
925
|
+
- ADR: docs/decisions/ADR-0005-command-naming.md
|
|
926
|
+
|
|
927
|
+
### Next Step
|
|
928
|
+
Add to superplan: /superplan --refresh
|
|
929
|
+
Execute: /execplan
|
|
930
|
+
```
|