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,868 @@
|
|
|
1
|
+
# Feature Specification: Copilot CLI Interactive Experience Optimization
|
|
2
|
+
|
|
3
|
+
**Feature:** Enhance PAN Wizard's Copilot CLI runtime to provide structured user interaction via text-based patterns
|
|
4
|
+
**Generated:** 2026-03-01
|
|
5
|
+
**Status:** Proposed
|
|
6
|
+
**ADR:** ADR-0004
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Phase 0: Problem Framing & Demand Validation
|
|
11
|
+
|
|
12
|
+
### 0.1 Problem Statement
|
|
13
|
+
|
|
14
|
+
When PAN Wizard workflows run on GitHub Copilot CLI, every `AskUserQuestion` invocation degrades from a structured selection experience (numbered options with headers, descriptions, single-select, multi-select) into an unstructured prose question. The user sees a wall of text like *"A few quick questions to nail down the scope: Search type... What comes back... Tech stack..."* instead of clean, numbered option lists with clear selection instructions. This happens because the current install-time converter strips `AskUserQuestion` tool references (`AskUserQuestion: null`) and does a naive text replacement (`AskUserQuestion` → `question`) without rewriting the interaction instructions to teach the model how to simulate structured choices in plain text. The cost of NOT fixing this: Copilot CLI becomes a second-class runtime where PAN's carefully-designed questioning workflows (41 `AskUserQuestion` invocations across 15 workflow files) produce a confusing, unguided user experience that undermines PAN's core value proposition of structured project orchestration.
|
|
15
|
+
|
|
16
|
+
### 0.2 Demand Evidence
|
|
17
|
+
|
|
18
|
+
| Evidence Type | Source | Finding |
|
|
19
|
+
|--------------|--------|---------|
|
|
20
|
+
| User-stated pain | This conversation | User reported: "On copilot the options are not coming up for select — you get a question sheet" with example of unstructured prose output |
|
|
21
|
+
| Architecture gap | `bin/install.js` line 429 | `AskUserQuestion: null` — tool stripped with no replacement behavior, leaving 41 interaction points unaddressed |
|
|
22
|
+
| Competitor parity | Claude Code AskUserQuestion | Claude Code provides structured single-select with headers, descriptions, "Other" fallback; Copilot CLI users get none of this |
|
|
23
|
+
| Market timing | Copilot CLI GA 2026-02-25 | Fresh runtime — establishing good UX patterns now prevents bad habits from calcifying |
|
|
24
|
+
|
|
25
|
+
### 0.3 Scope Definition
|
|
26
|
+
|
|
27
|
+
| In Scope | Out of Scope (and why) |
|
|
28
|
+
|----------|------------------------|
|
|
29
|
+
| Enhance skill adapter header with interaction guidance | Adding new tools to Copilot CLI (no API for custom tools) |
|
|
30
|
+
| Rewrite `AskUserQuestion` references in workflow content to text-based patterns | Modifying Copilot CLI itself (external dependency) |
|
|
31
|
+
| Add multi-select simulation via comma-separated numbers | Building a TUI framework (over-engineering for text patterns) |
|
|
32
|
+
| Teach model to present numbered options and parse responses | VS Code Copilot Chat integration (different product) |
|
|
33
|
+
| Converter improvements in `convertClaudeToCopilotMarkdown()` | Runtime user input validation (model responsibility) |
|
|
34
|
+
| Update `getCopilotSkillAdapterHeader()` with interaction section | Changes to other runtimes (Claude Code, OpenCode, Gemini, Codex) |
|
|
35
|
+
| Test coverage for new converter behavior | Copilot Extensions marketplace support |
|
|
36
|
+
|
|
37
|
+
### 0.4 Success Criteria
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
SC-1: Copilot CLI skills present numbered choice lists instead of prose questions for all AskUserQuestion patterns
|
|
41
|
+
SC-2: Multi-select scenarios include "type numbers separated by commas" instruction
|
|
42
|
+
SC-3: Single-select scenarios include "type number or label" instruction
|
|
43
|
+
SC-4: Recommended options are visually marked (bold or ★) in text output
|
|
44
|
+
SC-5: No regression in existing 790+ tests
|
|
45
|
+
SC-6: Converter changes work identically on Windows, Mac, and Linux
|
|
46
|
+
SC-7: All 15 affected workflow files produce improved Copilot CLI output after install
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 0.5 User Stories
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
As a developer using PAN Wizard on Copilot CLI, I want to see numbered options
|
|
53
|
+
when the workflow asks me a question, so that I can quickly type "1" or "2"
|
|
54
|
+
instead of composing a free-text answer to a vague prose question.
|
|
55
|
+
|
|
56
|
+
As a developer using discuss-phase on Copilot CLI, I want multi-select areas
|
|
57
|
+
presented as a numbered checklist with "type 1,3,4" instructions,
|
|
58
|
+
so that I can select multiple discussion topics as easily as on Claude Code.
|
|
59
|
+
|
|
60
|
+
As a developer switching between Claude Code and Copilot CLI, I want the same
|
|
61
|
+
logical workflow experience on both runtimes, so that PAN feels consistent
|
|
62
|
+
regardless of which AI tool I'm using.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 0.6 Cannibalization Check
|
|
66
|
+
|
|
67
|
+
| Existing Command/Agent | Overlap? | Impact |
|
|
68
|
+
|-----------------------|----------|--------|
|
|
69
|
+
| `bin/install.js` converters | Partial | Enhancement to existing converter functions — no new command |
|
|
70
|
+
| `getCopilotSkillAdapterHeader()` | Partial | Enhancement to existing function — adds interaction section |
|
|
71
|
+
| `convertClaudeToCopilotMarkdown()` | Partial | Enhancement to existing function — adds AskUserQuestion rewriting |
|
|
72
|
+
|
|
73
|
+
**No Full overlap.** This enhances existing converter infrastructure, not creating a new command.
|
|
74
|
+
|
|
75
|
+
### 0.7 Cognitive Load Assessment
|
|
76
|
+
|
|
77
|
+
| Metric | Before | After | Delta |
|
|
78
|
+
|--------|--------|-------|-------|
|
|
79
|
+
| Commands a new user must learn | 32 | 32 | +0 |
|
|
80
|
+
| New concepts introduced | 0 | 0 | +0 |
|
|
81
|
+
| Score | — | — | simplifies (-1) |
|
|
82
|
+
|
|
83
|
+
This feature **reduces** cognitive load for Copilot CLI users by replacing confusing prose with clear numbered options.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Phase 1: Internal Reconnaissance
|
|
88
|
+
|
|
89
|
+
### 1.1 Architecture Scan
|
|
90
|
+
|
|
91
|
+
**Existing capabilities inventory:**
|
|
92
|
+
|
|
93
|
+
| Capability | Status | Location | Relevance |
|
|
94
|
+
|------------|--------|----------|-----------|
|
|
95
|
+
| Claude→Copilot tool mapping | Working | `bin/install.js:419-432` | `AskUserQuestion: null` — strips tool, needs replacement |
|
|
96
|
+
| Copilot markdown converter | Working | `bin/install.js:554-564` | Converts Task/Agent refs, missing AskUserQuestion rewrite |
|
|
97
|
+
| Copilot skill adapter header | Working | `bin/install.js:571-583` | Generic header, no interaction guidance |
|
|
98
|
+
| Copilot skill converter | Working | `bin/install.js:590-604` | Assembles YAML + adapter + body |
|
|
99
|
+
| Copilot agent converter | Working | `bin/install.js:611-642` | Agent frontmatter + body conversion |
|
|
100
|
+
| AskUserQuestion patterns | 41 occurrences | 15 workflow files in `pan-wizard-core/workflows/` | All lost on Copilot CLI |
|
|
101
|
+
| multiSelect patterns | 3 occurrences | discuss-phase, new-project, new-milestone workflows | Checkbox-style selection impossible in text |
|
|
102
|
+
| Questioning guide | Reference doc | `pan-wizard-core/references/questioning.md` | 2-4 options ideal, max 12 char headers |
|
|
103
|
+
| OpenCode AskUserQuestion handling | Working | `bin/install.js:745` | `AskUserQuestion` → `question` text replacement |
|
|
104
|
+
| Gemini AskUserQuestion mapping | Working | `bin/install.js:372` | `AskUserQuestion: 'ask_user'` — Gemini has a tool |
|
|
105
|
+
|
|
106
|
+
### 1.2 Codebase Search
|
|
107
|
+
|
|
108
|
+
| Search Target | Where Found | What Extracted |
|
|
109
|
+
|---------------|-------------|----------------|
|
|
110
|
+
| Copilot converter functions | `bin/install.js:531-642` | 6 functions: slash commands, markdown, adapter, skill, agent, tool name |
|
|
111
|
+
| AskUserQuestion usage | 15 workflow files, 41 occurrences | Single-select (38), multiSelect (3), headers (12 char limit), descriptions |
|
|
112
|
+
| Workflow files affected | `discuss-phase` (6), `new-project` (12), `new-milestone` (5), `settings` (3), `verify-work` (1), `plan-phase` (1), `execute-plan` (1), `add-tests` (3), `check-todos` (2), `complete-milestone` (2), `add-todo` (1), `cleanup` (1), `discovery-phase` (1), `update` (1), `quick` (1) | Heavy users: new-project (12), discuss-phase (6), new-milestone (5) |
|
|
113
|
+
| Test patterns | `tests/copilot-install.test.cjs` | 30 tests, uses `runInstaller()` + fs checks |
|
|
114
|
+
| Converter tests | `tests/copilot-install.test.cjs` | Tests skill structure, agent structure, uninstall, tool mapping |
|
|
115
|
+
|
|
116
|
+
### 1.3 Convention Enforcement Checklist
|
|
117
|
+
|
|
118
|
+
- [x] No new `cmd*` function needed — changes are to converter helpers
|
|
119
|
+
- [x] File reads use appropriate patterns — converters process in-memory strings
|
|
120
|
+
- [x] File writes wrapped in try-catch — existing installer write paths already hardened
|
|
121
|
+
- [x] JSON output via `output()` — N/A (installer, not CLI command)
|
|
122
|
+
- [x] Paths through `toPosix()` — N/A (file content conversion, not path output)
|
|
123
|
+
- [x] Module exports at bottom — existing pattern maintained
|
|
124
|
+
- [x] CommonJS only — existing `.js` installer file
|
|
125
|
+
- [x] Zero runtime dependencies — pure string manipulation, no new deps
|
|
126
|
+
|
|
127
|
+
### 1.4 Dependency & Integration Map
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
[Copilot CLI Interaction Enhancement]
|
|
131
|
+
├── modifies: bin/install.js (convertClaudeToCopilotMarkdown, getCopilotSkillAdapterHeader)
|
|
132
|
+
├── depends on: existing Copilot converter infrastructure
|
|
133
|
+
├── depends on: AskUserQuestion patterns in workflow .md files (read-only)
|
|
134
|
+
├── conflicts with: nothing
|
|
135
|
+
└── enables: better UX for all 32 PAN commands on Copilot CLI
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**require() chain:** No new modules. Changes are within `bin/install.js` which is a standalone installer script.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Phase 2: Competitive Intelligence
|
|
143
|
+
|
|
144
|
+
### 2.1 Deep-Dive Research (6 Tools)
|
|
145
|
+
|
|
146
|
+
#### Aider
|
|
147
|
+
- **UX:** Terminal-based with `confirm_ask()` (yes/no/skip/all/don't-ask-again) and `prompt_ask()` (free text with default)
|
|
148
|
+
- **Behavior:** `--yes` flag auto-approves all confirmations. Group preference persistence across prompts.
|
|
149
|
+
- **Structured input:** Yes/No confirmations only. No numbered choice menus. No multi-select.
|
|
150
|
+
- **Ergonomics:** Users love the simplicity. Hate that complex choices require free-text typing.
|
|
151
|
+
- **Evolution:** Started with bare `input()`, evolved to `confirm_ask()` with group preferences. Still no structured selection.
|
|
152
|
+
|
|
153
|
+
#### Cursor
|
|
154
|
+
- **UX:** IDE-native with rich UI widgets (buttons, inline diffs, Accept/Reject).
|
|
155
|
+
- **Behavior:** Agent mode uses tool approval flow — user sees diff and clicks Accept/Reject.
|
|
156
|
+
- **Structured input:** Full IDE widget set (quick picks, dropdowns, inline buttons). Not applicable to CLI.
|
|
157
|
+
- **Ergonomics:** Beautiful in IDE. No CLI equivalent exists.
|
|
158
|
+
- **Evolution:** Moved from simple chat to agent mode with approval workflows.
|
|
159
|
+
|
|
160
|
+
#### Continue.dev
|
|
161
|
+
- **UX:** IDE extension with slash commands and context providers.
|
|
162
|
+
- **Behavior:** Uses VS Code quick picks for model selection, file selection.
|
|
163
|
+
- **Structured input:** Relies on VS Code's native `showQuickPick` API.
|
|
164
|
+
- **Ergonomics:** Clean integration with IDE. No standalone CLI interaction model.
|
|
165
|
+
- **Evolution:** Started as simple chat, added context providers and tools.
|
|
166
|
+
|
|
167
|
+
#### Cline
|
|
168
|
+
- **UX:** VS Code sidebar with option buttons (styled to theme).
|
|
169
|
+
- **Behavior:** Single-select only — "all other buttons become unselectable" after one click.
|
|
170
|
+
- **Structured input:** Yes — dedicated `OptionsButtons.tsx` component with clickable buttons.
|
|
171
|
+
- **Ergonomics:** Users love the clean approval flow. Hate that there's no multi-select.
|
|
172
|
+
- **Evolution:** Started with text-only, added UI buttons for tool approvals.
|
|
173
|
+
|
|
174
|
+
#### Windsurf
|
|
175
|
+
- **UX:** IDE-based Cascade flow with step-by-step execution.
|
|
176
|
+
- **Behavior:** AI proceeds autonomously unless tool use requires approval.
|
|
177
|
+
- **Structured input:** IDE-native approval buttons (Accept/Reject per tool use).
|
|
178
|
+
- **Ergonomics:** Smooth flow. No equivalent for multi-choice questions — AI decides.
|
|
179
|
+
- **Evolution:** Lean towards autonomous execution, less user interaction.
|
|
180
|
+
|
|
181
|
+
#### GitHub Copilot Workspace
|
|
182
|
+
- **UX:** Web-based with plan → implement → review flow.
|
|
183
|
+
- **Behavior:** Presents a plan as editable text. User modifies plan before execution.
|
|
184
|
+
- **Structured input:** Plan is a structured checklist that users can edit. No runtime choice prompts.
|
|
185
|
+
- **Ergonomics:** Good for planning. No real-time interaction during execution.
|
|
186
|
+
- **Evolution:** Focused on plan approval over real-time choices.
|
|
187
|
+
|
|
188
|
+
### 2.2 Prior Art: Text-Based Structured Input
|
|
189
|
+
|
|
190
|
+
The problem of simulating structured input in text-only interfaces is well-established:
|
|
191
|
+
|
|
192
|
+
- **UNIX dialog/whiptail:** TUI widgets (checklist, radiolist, menu) over ncurses — too heavy for AI agent responses
|
|
193
|
+
- **Inquirer.js / prompts:** Node.js libraries with arrow-key selection — requires terminal control
|
|
194
|
+
- **Numbered menu pattern:** Decades-old, used in BBS, IVR systems, CLI tools — **the proven pattern for text-only structured selection**
|
|
195
|
+
- **IRC/Discord bots:** Use numbered reactions or "reply with 1/2/3" — closest analogue to our use case
|
|
196
|
+
|
|
197
|
+
### 2.3 Competitive Matrix
|
|
198
|
+
|
|
199
|
+
| Aspect | PAN (Current Copilot) | PAN (Proposed) | Aider | Cline | Cursor | Copilot WS |
|
|
200
|
+
|--------|----------------------|----------------|-------|-------|--------|------------|
|
|
201
|
+
| Structured choices | ❌ Prose | ✅ Numbered lists | ⚠️ Y/N only | ✅ Buttons | ✅ Widgets | ⚠️ Plan edit |
|
|
202
|
+
| Multi-select | ❌ Lost | ✅ Comma-separated | ❌ None | ❌ Single only | ✅ Checkboxes | ❌ None |
|
|
203
|
+
| Recommended option | ❌ Lost | ✅ Bold/★ marker | ❌ None | ❌ No marker | ✅ Highlighted | ❌ None |
|
|
204
|
+
| "Other" fallback | ❌ Lost | ✅ "Or type your own" | ✅ Free text | ❌ Fixed options | ✅ Free text | ✅ Edit plan |
|
|
205
|
+
| One-at-a-time | ❌ All at once | ✅ Sequential | ✅ Sequential | ✅ Sequential | ✅ Sequential | N/A |
|
|
206
|
+
| CLI-native | ✅ | ✅ | ✅ | ❌ IDE | ❌ IDE | ❌ Web |
|
|
207
|
+
| Cross-platform | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Phase 3: Strategic Analysis
|
|
212
|
+
|
|
213
|
+
### 3.1 Blue Ocean Four Actions Framework
|
|
214
|
+
|
|
215
|
+
| Action | Question | Decisions |
|
|
216
|
+
|--------|----------|-----------|
|
|
217
|
+
| **ELIMINATE** | What should we drop? | Complex widget simulation (arrows, cursor control) — terminal-agnostic text only |
|
|
218
|
+
| **REDUCE** | What should be reduced? | Ambiguity in Copilot CLI user interactions — prose questions → clear numbered options |
|
|
219
|
+
| **RAISE** | What should be raised? | Copilot CLI to first-class runtime parity — same logical UX as Claude Code |
|
|
220
|
+
| **CREATE** | What should we create? | Text-based structured interaction protocol — the "numbered menu" pattern encoded in converter + adapter |
|
|
221
|
+
|
|
222
|
+
### 3.2 Wardley Evolution Assessment
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Genesis ──── Custom-Built ──── Product ──── Commodity
|
|
226
|
+
↑
|
|
227
|
+
Text-based structured
|
|
228
|
+
interaction in AI CLIs
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
- **Industry position:** Custom-Built → Product. Every AI CLI tool that interacts with users faces this problem. No standard solution exists yet.
|
|
232
|
+
- **PAN Wizard position:** Should be Product-stage — codify the pattern once, apply everywhere.
|
|
233
|
+
- **Evolution (2-3 years):** CLI tools will likely adopt standard interaction protocols (like LSP for editors). PAN should establish the pattern now and be ready to adopt standards when they emerge.
|
|
234
|
+
|
|
235
|
+
### 3.3 Strategic Moat Analysis
|
|
236
|
+
|
|
237
|
+
| Moat Type | Contribution | Score (0-5) |
|
|
238
|
+
|-----------|-------------|-------------|
|
|
239
|
+
| **Context Engineering** | Ensures AI model presents choices correctly regardless of runtime | 4 |
|
|
240
|
+
| **Cross-Platform** | Closes the Copilot CLI quality gap — all 5 runtimes equivalent | 5 |
|
|
241
|
+
| **Developer Experience** | Transforms confusing prose into clean numbered selections | 5 |
|
|
242
|
+
| **Zero Dependencies** | Pure string manipulation in converter — no new deps | 5 |
|
|
243
|
+
| **State Persistence** | No direct impact | 0 |
|
|
244
|
+
| **Verification Quality** | No direct impact | 0 |
|
|
245
|
+
| **Total** | | **19/30** |
|
|
246
|
+
|
|
247
|
+
### 3.4 Strategic Recommendation
|
|
248
|
+
|
|
249
|
+
**Build.** The evidence is direct (user reported the exact problem in this conversation), the fix is bounded (converter enhancement + adapter header update, no new commands), and the strategic value is high (Copilot CLI is the largest commercial AI CLI — PAN must be first-class there). Our unique angle: we're the only workflow orchestration tool that explicitly teaches AI models how to simulate structured interactions across different runtimes. We should NOT copy IDE-based widget approaches (Cline, Cursor) — those don't work in terminals. Instead, codify the decades-old "numbered menu" pattern into our converter, making PAN the reference implementation for text-based structured interaction in AI CLIs. Strategic timing: immediate — Copilot CLI is 4 days old and patterns are being established now.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Phase 3.5: Architecture & Implementation Pattern Assessment
|
|
254
|
+
|
|
255
|
+
### 3.5.1 Feature Type Classification
|
|
256
|
+
|
|
257
|
+
| Type | Description | Template |
|
|
258
|
+
|------|-------------|----------|
|
|
259
|
+
| **Core Enhancement** | Modify existing converter functions in `bin/install.js` | Edit `convertClaudeToCopilotMarkdown()`, `getCopilotSkillAdapterHeader()` |
|
|
260
|
+
| **Installer** | Changes to install.js converter output | Modify installer, test with existing e2e patterns |
|
|
261
|
+
|
|
262
|
+
### 3.5.2 Layer Violation Check
|
|
263
|
+
|
|
264
|
+
- [x] No command .md files call lib modules directly — N/A (installer changes)
|
|
265
|
+
- [x] No upward dependencies — installer is standalone
|
|
266
|
+
- [x] No `output()` calls from helpers — N/A (installer uses console.log)
|
|
267
|
+
- [x] No layer violations — changes are within the installer's converter layer
|
|
268
|
+
|
|
269
|
+
### 3.5.3 Output Contract Design
|
|
270
|
+
|
|
271
|
+
No new JSON output schema. The converter functions return strings (converted markdown content). The contract change is in the **content** of the converted output:
|
|
272
|
+
|
|
273
|
+
**Before (current):**
|
|
274
|
+
```markdown
|
|
275
|
+
Use AskUserQuestion:
|
|
276
|
+
- header: "Context"
|
|
277
|
+
- question: "Phase [X] already has context. What do you want to do?"
|
|
278
|
+
- options:
|
|
279
|
+
- "Update it" — Review and revise existing context
|
|
280
|
+
- "View it" — Show me what's there
|
|
281
|
+
- "Skip" — Use existing context as-is
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**After (proposed):**
|
|
285
|
+
```markdown
|
|
286
|
+
Ask the user with numbered options:
|
|
287
|
+
|
|
288
|
+
**Phase [X] already has context. What do you want to do?**
|
|
289
|
+
|
|
290
|
+
1. **Update it** — Review and revise existing context
|
|
291
|
+
2. **View it** — Show me what's there
|
|
292
|
+
3. **Skip** — Use existing context as-is
|
|
293
|
+
|
|
294
|
+
Present these as a numbered list. The user will type a number, label, or their own answer.
|
|
295
|
+
Wait for the user's response before continuing.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### 3.5.4 State Transition Modeling
|
|
299
|
+
|
|
300
|
+
N/A — this feature is read-only at runtime. It modifies files at install time but does not mutate state.md, roadmap.md, or phase directories.
|
|
301
|
+
|
|
302
|
+
### 3.5.5 Breaking Change Assessment
|
|
303
|
+
|
|
304
|
+
| Question | Answer |
|
|
305
|
+
|----------|--------|
|
|
306
|
+
| Changes any existing command's JSON output schema? | No |
|
|
307
|
+
| Changes file formats (state.md, roadmap.md, config.json)? | No |
|
|
308
|
+
| Changes directory structure (.planning/, phases/)? | No |
|
|
309
|
+
| Changes installer output? | **Yes** — Copilot CLI skills will contain rewritten interaction patterns. Users who reinstall will get improved skills. Existing installs are unaffected until reinstall. |
|
|
310
|
+
|
|
311
|
+
**Migration:** No migration needed. Users run `npx pan-wizard --copilot --local` to get updated skills.
|
|
312
|
+
|
|
313
|
+
### 3.5.6 Composability Analysis
|
|
314
|
+
|
|
315
|
+
| Interaction | Works? | How |
|
|
316
|
+
|-------------|--------|-----|
|
|
317
|
+
| Output feeds another command's input | N/A | Converter output is installed files, not piped |
|
|
318
|
+
| Callable from an agent .md | No | Converter runs at install time, not runtime |
|
|
319
|
+
| Usable in a hook pipeline | No | Not a hook |
|
|
320
|
+
| Works in --raw mode for humans | N/A | Installer, not CLI command |
|
|
321
|
+
|
|
322
|
+
### 3.5.7 Performance Budget
|
|
323
|
+
|
|
324
|
+
| Operation | Cost | Notes |
|
|
325
|
+
|-----------|------|-------|
|
|
326
|
+
| Regex replacements in converter | ~1ms per file | 32 command files + 11 agent files + 15 workflow files |
|
|
327
|
+
| Adapter header generation | ~0.1ms | String template |
|
|
328
|
+
| **Total per install** | **< 50ms** | Negligible overhead on install |
|
|
329
|
+
|
|
330
|
+
### 3.5.8 Cross-Platform Considerations
|
|
331
|
+
|
|
332
|
+
| Platform | Consideration |
|
|
333
|
+
|----------|---------------|
|
|
334
|
+
| Windows | No path concerns — pure string manipulation. CRLF handled by existing converter. |
|
|
335
|
+
| Mac/Linux | No platform-specific concerns |
|
|
336
|
+
| All | Regex patterns must handle both `\n` and `\r\n` line endings |
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Phase 4: Design Synthesis
|
|
341
|
+
|
|
342
|
+
### 4.1 Guide-Level Explanation
|
|
343
|
+
|
|
344
|
+
**PAN Wizard on Copilot CLI: Structured Interaction**
|
|
345
|
+
|
|
346
|
+
When you install PAN Wizard for Copilot CLI (`npx pan-wizard --copilot --local`), all workflow commands that involve user choices are automatically converted to use numbered text menus. Here's what this looks like in practice:
|
|
347
|
+
|
|
348
|
+
**Example 1: discuss-phase**
|
|
349
|
+
|
|
350
|
+
On Claude Code, you'd see a structured select widget. On Copilot CLI, you'll see:
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
Which areas do you want to discuss for "User Authentication"?
|
|
354
|
+
|
|
355
|
+
1. **Login flow** — Email/password vs OAuth? Remember me?
|
|
356
|
+
2. **Session handling** — JWT vs cookies? Expiry policy?
|
|
357
|
+
3. **Error states** — Lock after N failures? Reset flow?
|
|
358
|
+
4. **Profile access** — Who can view? Edit permissions?
|
|
359
|
+
|
|
360
|
+
Type the numbers you want to discuss, separated by commas (e.g., 1,3).
|
|
361
|
+
Or type your own area to explore.
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Example 2: new-project**
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
Research the domain ecosystem before defining requirements?
|
|
368
|
+
|
|
369
|
+
1. **Research first** (recommended) — 4 parallel researchers explore the domain
|
|
370
|
+
2. **Skip research** — Jump straight to requirements
|
|
371
|
+
|
|
372
|
+
Type a number or your own answer.
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Example 3: Error message if you type something unexpected**
|
|
376
|
+
|
|
377
|
+
The model will interpret your response. If it can't match your answer to an option, it'll ask again:
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
I didn't catch that. Please type a number (1-4), an option label, or describe what you'd like.
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### 4.2 Reference-Level Explanation
|
|
384
|
+
|
|
385
|
+
#### 4.2.1 Converter Interface Changes
|
|
386
|
+
|
|
387
|
+
**Function: `convertClaudeToCopilotMarkdown(content)`**
|
|
388
|
+
|
|
389
|
+
Current behavior: Converts slash commands and Task() references.
|
|
390
|
+
|
|
391
|
+
New behavior: Additionally rewrites `AskUserQuestion` blocks into text-based numbered menu instructions.
|
|
392
|
+
|
|
393
|
+
**Function: `getCopilotSkillAdapterHeader(skillName)`**
|
|
394
|
+
|
|
395
|
+
Current behavior: Generic skill integration and agent orchestration instructions.
|
|
396
|
+
|
|
397
|
+
New behavior: Adds a `User interaction:` section teaching the model how to present choices.
|
|
398
|
+
|
|
399
|
+
**New function: `rewriteAskUserQuestionForCopilot(content)`**
|
|
400
|
+
|
|
401
|
+
Transforms `AskUserQuestion` patterns in markdown into Copilot CLI text-based interaction instructions. Handles:
|
|
402
|
+
- Simple `Use AskUserQuestion:` blocks with header/question/options
|
|
403
|
+
- `AskUserQuestion (multiSelect: true):` blocks
|
|
404
|
+
- Inline `AskUserQuestion` text references
|
|
405
|
+
|
|
406
|
+
#### 4.2.2 Rewrite Rules
|
|
407
|
+
|
|
408
|
+
**Rule 1: `AskUserQuestion` block → numbered menu**
|
|
409
|
+
|
|
410
|
+
Input pattern:
|
|
411
|
+
```
|
|
412
|
+
Use AskUserQuestion:
|
|
413
|
+
- header: "Header"
|
|
414
|
+
- question: "Question text?"
|
|
415
|
+
- options:
|
|
416
|
+
- "Option A" — Description A
|
|
417
|
+
- "Option B" — Description B
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Output pattern:
|
|
421
|
+
```
|
|
422
|
+
Ask the user:
|
|
423
|
+
|
|
424
|
+
**Question text?**
|
|
425
|
+
|
|
426
|
+
1. **Option A** — Description A
|
|
427
|
+
2. **Option B** — Description B
|
|
428
|
+
|
|
429
|
+
Type a number or label to choose. Or type your own answer.
|
|
430
|
+
Wait for the user's response before continuing.
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**Rule 2: `AskUserQuestion (multiSelect: true):` → comma-separated menu**
|
|
434
|
+
|
|
435
|
+
Input pattern:
|
|
436
|
+
```
|
|
437
|
+
Use AskUserQuestion (multiSelect: true):
|
|
438
|
+
- header: "Header"
|
|
439
|
+
- question: "Which areas?"
|
|
440
|
+
- options:
|
|
441
|
+
- "Area 1" — Description
|
|
442
|
+
- "Area 2" — Description
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Output pattern:
|
|
446
|
+
```
|
|
447
|
+
Ask the user (select one or more):
|
|
448
|
+
|
|
449
|
+
**Which areas?**
|
|
450
|
+
|
|
451
|
+
1. **Area 1** — Description
|
|
452
|
+
2. **Area 2** — Description
|
|
453
|
+
|
|
454
|
+
Type the numbers you want, separated by commas (e.g., 1,3).
|
|
455
|
+
Or type your own answer.
|
|
456
|
+
Wait for the user's response before continuing.
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Rule 3: Inline `AskUserQuestion` reference → plain instruction**
|
|
460
|
+
|
|
461
|
+
Input: `Use AskUserQuestion to ask...`
|
|
462
|
+
Output: `Ask the user with numbered options...`
|
|
463
|
+
|
|
464
|
+
**Rule 4: Adapter header interaction guidance**
|
|
465
|
+
|
|
466
|
+
Added to every Copilot skill:
|
|
467
|
+
```
|
|
468
|
+
User interaction:
|
|
469
|
+
- When presenting choices, use numbered lists (1. **Option** — description).
|
|
470
|
+
- For single-select: "Type a number or label."
|
|
471
|
+
- For multi-select: "Type numbers separated by commas (e.g., 1,3)."
|
|
472
|
+
- Always include "Or type your own answer" as a fallback.
|
|
473
|
+
- Ask one question at a time. Wait for the user's response before continuing.
|
|
474
|
+
- Accept numbers ("1"), labels ("Option A"), or free-text descriptions as valid answers.
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
#### 4.2.3 Error Handling
|
|
478
|
+
|
|
479
|
+
| Condition | Handling | Impact |
|
|
480
|
+
|-----------|----------|--------|
|
|
481
|
+
| Regex doesn't match a variant | Content passes through unchanged | Graceful degradation — some blocks may not be rewritten |
|
|
482
|
+
| Malformed AskUserQuestion block | Skip rewrite for that block | No crash, partial improvement |
|
|
483
|
+
| Empty options list | Skip rewrite, leave as prose | Rare edge case |
|
|
484
|
+
|
|
485
|
+
### 4.3 Design Decisions
|
|
486
|
+
|
|
487
|
+
| Decision | Adopted From | Rationale | What We Did NOT Copy (and Why) |
|
|
488
|
+
|----------|-------------|-----------|-------------------------------|
|
|
489
|
+
| Numbered menu pattern | BBS/IVR/UNIX tradition | Decades of proven text-UI pattern | Cline's button widgets (require GUI) |
|
|
490
|
+
| Comma-separated multi-select | Survey tools, Google Forms | Familiar pattern, works in text | Checkbox simulation (can't render in plain text) |
|
|
491
|
+
| "Or type your own" fallback | PAN's existing "Other" option | Preserves the escape hatch for freeform input | Strict number-only input (too rigid) |
|
|
492
|
+
| Install-time conversion | PAN's existing converter pattern | No runtime overhead, model sees clean instructions | Runtime interception (would need Copilot CLI hook support) |
|
|
493
|
+
| Bold option labels | Markdown in terminal | Most terminals render **bold**, improves scanability | Color codes (not portable across terminals) |
|
|
494
|
+
|
|
495
|
+
### 4.4 Drawbacks & Alternatives
|
|
496
|
+
|
|
497
|
+
| Decision Point | Chosen | Alternative | Why Not | Drawback of Chosen |
|
|
498
|
+
|----------------|--------|------------|---------|-------------------|
|
|
499
|
+
| Install-time rewrite | Regex conversion in installer | Runtime prompt engineering | Can't modify Copilot CLI runtime | Must reinstall to get updates |
|
|
500
|
+
| Adapter header guidance | Static text block | Per-command dynamic guidance | Over-engineering — one block covers all patterns | Generic, not command-specific |
|
|
501
|
+
| Regex-based block parsing | Regex with multi-line capture | Full markdown AST parsing | Too complex for the pattern variety | Fragile if AskUserQuestion format changes significantly |
|
|
502
|
+
| Bold for recommended option | `**Option (recommended)**` | Stars/arrows/emoji | Bold is universal markdown | Not all terminals render bold identically |
|
|
503
|
+
|
|
504
|
+
### 4.5 Feature Ladder (Incremental Delivery)
|
|
505
|
+
|
|
506
|
+
| Version | Scope | Value Delivered | Effort |
|
|
507
|
+
|---------|-------|----------------|--------|
|
|
508
|
+
| **v0 (MVP)** | Adapter header + simple text replace of `AskUserQuestion` references | 60% improvement — model gets interaction guidance, references cleaned up | S (2 pts) |
|
|
509
|
+
| **v1 (Complete)** | Full regex block rewrite of `AskUserQuestion:` patterns → numbered menus | 95% improvement — all 41 invocations produce structured text menus | M (4 pts) |
|
|
510
|
+
| **v2 (Enhanced)** | Per-command interaction metadata + dynamic adapter header customization | 100% — adapter header tailored to each command's specific interaction needs | M (4 pts) |
|
|
511
|
+
|
|
512
|
+
**v0 is the target for the first superplan/execplan cycle.** v1 follows immediately. v2 is deferred.
|
|
513
|
+
|
|
514
|
+
### 4.6 Adoption Analysis
|
|
515
|
+
|
|
516
|
+
| Question | Answer |
|
|
517
|
+
|----------|--------|
|
|
518
|
+
| How does the user discover this feature? | Automatic — reinstall PAN for Copilot CLI and interaction improves |
|
|
519
|
+
| What's the learning curve? | Zero — users already know how to type numbers |
|
|
520
|
+
| Does it require changing existing workflows? | No — changes are install-time converter improvements |
|
|
521
|
+
| What's the "aha moment"? | First time `discuss-phase` shows numbered options instead of a wall of text |
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Phase 5: Architecture Decision Record
|
|
526
|
+
|
|
527
|
+
```markdown
|
|
528
|
+
# ADR-0004: Copilot CLI Interactive Experience Optimization
|
|
529
|
+
|
|
530
|
+
## Status
|
|
531
|
+
Proposed
|
|
532
|
+
|
|
533
|
+
## Context
|
|
534
|
+
PAN Wizard supports 5 AI CLI runtimes. Four of them (Claude Code, OpenCode, Gemini CLI, Codex)
|
|
535
|
+
have either native structured input tools or adequate text-based equivalents. The 5th runtime,
|
|
536
|
+
GitHub Copilot CLI (GA 2026-02-25), has no structured input tool — `ask_user` does not exist
|
|
537
|
+
in the documented API, and the CLI is purely text-in/text-out.
|
|
538
|
+
|
|
539
|
+
PAN's 32 commands contain 41 `AskUserQuestion` invocations across 15 workflow files. When
|
|
540
|
+
installed for Copilot CLI, these invocations are stripped (`AskUserQuestion: null` in tool
|
|
541
|
+
mapping) and naively text-replaced, producing unstructured prose questions that confuse users.
|
|
542
|
+
|
|
543
|
+
## Decision
|
|
544
|
+
Enhance the install-time Copilot CLI converter to:
|
|
545
|
+
1. Add an "interaction guidance" section to the skill adapter header that teaches the model
|
|
546
|
+
how to present structured choices as numbered text menus
|
|
547
|
+
2. Rewrite `AskUserQuestion` block patterns in workflow content into explicit numbered-menu
|
|
548
|
+
instructions with response format guidance (numbers, labels, or free text)
|
|
549
|
+
3. Handle multiSelect patterns with comma-separated number instructions
|
|
550
|
+
|
|
551
|
+
This is an install-time conversion, not a runtime change. The model receives clear instructions
|
|
552
|
+
in the skill content about how to present choices, rather than relying on implicit behavior.
|
|
553
|
+
|
|
554
|
+
## Consequences
|
|
555
|
+
|
|
556
|
+
### Positive
|
|
557
|
+
- Copilot CLI users get structured interaction matching other runtimes
|
|
558
|
+
- No runtime dependencies or hooks needed
|
|
559
|
+
- Leverages the decades-old "numbered menu" pattern familiar to all developers
|
|
560
|
+
- All 41 interaction points across 15 workflows improved
|
|
561
|
+
- Zero new commands, zero new concepts — transparent enhancement
|
|
562
|
+
|
|
563
|
+
### Negative
|
|
564
|
+
- Regex-based block rewriting is somewhat fragile — new AskUserQuestion patterns in future
|
|
565
|
+
workflows must follow the existing format or the regex won't match
|
|
566
|
+
- Users must reinstall to get improvements (no auto-update for installed skills)
|
|
567
|
+
- Model still has to interpret user responses (no programmatic validation)
|
|
568
|
+
|
|
569
|
+
### Neutral
|
|
570
|
+
- Install time increases by ~50ms (negligible)
|
|
571
|
+
- Installed skill files become slightly larger (adapter header + rewritten blocks)
|
|
572
|
+
|
|
573
|
+
## Options Considered
|
|
574
|
+
1. **Do nothing** — Accept Copilot CLI as a degraded runtime. Rejected: user reported the
|
|
575
|
+
problem directly, and Copilot CLI is the largest commercial AI CLI.
|
|
576
|
+
2. **Runtime prompt engineering via hooks** — Copilot CLI hooks can only deny/allow tool use,
|
|
577
|
+
not modify prompts. Rejected: technically impossible.
|
|
578
|
+
3. **Install-time converter enhancement (chosen)** — Modify existing converter functions to
|
|
579
|
+
produce better output. Best fit for PAN's install-time architecture.
|
|
580
|
+
4. **Custom TUI framework** — Build ncurses-style widgets for Copilot CLI. Rejected:
|
|
581
|
+
over-engineering, not portable, Copilot CLI doesn't support custom TUI.
|
|
582
|
+
|
|
583
|
+
## Links
|
|
584
|
+
- Related to: ADR-0002 (Copilot CLI runtime support)
|
|
585
|
+
- Affects: `bin/install.js` (converter functions)
|
|
586
|
+
- Test file: `tests/copilot-install.test.cjs`
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
591
|
+
## Phase 6: Error Handling & Diagnostics Design
|
|
592
|
+
|
|
593
|
+
### 6.1 Failure Mode Analysis
|
|
594
|
+
|
|
595
|
+
| Failure Mode | Category | Detection Pattern | Recovery | User Sees |
|
|
596
|
+
|-------------|----------|-------------------|----------|-----------:|
|
|
597
|
+
| Regex doesn't match AskUserQuestion block variant | Code limitation | Block passes through unchanged | Graceful degradation — original text preserved | Slightly less structured but still functional |
|
|
598
|
+
| Workflow file has malformed AskUserQuestion syntax | Data quality | Regex capture group returns empty | Skip rewrite for that block, continue processing | Unchanged text for that interaction |
|
|
599
|
+
| Very long options list (>4 options) | Edge case | Count of captured options | Rewrite all options regardless of count | Long numbered list (still better than prose) |
|
|
600
|
+
| Nested AskUserQuestion blocks | Edge case | Nested regex match | Process outermost block only | Outer block rewritten, inner may not match |
|
|
601
|
+
| Empty content string | Input validation | Check `content.length === 0` | Return empty string immediately | No change |
|
|
602
|
+
|
|
603
|
+
### 6.2 Diagnostic Support
|
|
604
|
+
|
|
605
|
+
| Diagnostic | How | When |
|
|
606
|
+
|------------|-----|------|
|
|
607
|
+
| `--dry-run` (installer) | Not currently supported | Future enhancement |
|
|
608
|
+
| Manual inspection | Read installed `SKILL.md` files | After install, verify with `cat .github/skills/pan-discuss-phase/SKILL.md` |
|
|
609
|
+
| Test coverage | Unit tests verify converter output | Development and CI |
|
|
610
|
+
|
|
611
|
+
---
|
|
612
|
+
|
|
613
|
+
## Phase 7: Security & Threat Model
|
|
614
|
+
|
|
615
|
+
### 7.1 Asset & Attack Surface Inventory
|
|
616
|
+
|
|
617
|
+
| Asset | Accessed How | Trust Level |
|
|
618
|
+
|-------|-------------|-------------|
|
|
619
|
+
| Workflow .md files (source) | Read at install time | System-generated (trusted) |
|
|
620
|
+
| SKILL.md files (output) | Written at install time | System-generated |
|
|
621
|
+
| .agent.md files (output) | Written at install time | System-generated |
|
|
622
|
+
| Regex patterns | Hardcoded in converter | Developer-controlled |
|
|
623
|
+
|
|
624
|
+
| Input Vector | Source | Validation Required |
|
|
625
|
+
|-------------|--------|---------------------|
|
|
626
|
+
| Workflow file content | Disk (PAN package) | Structure validation via regex — only matching blocks rewritten |
|
|
627
|
+
| Skill name | Derived from filename | Already validated by existing converter |
|
|
628
|
+
|
|
629
|
+
### 7.2 Path Safety Protocol
|
|
630
|
+
|
|
631
|
+
N/A — this feature does not accept user-supplied path input. All paths are derived from the installer's internal logic.
|
|
632
|
+
|
|
633
|
+
### 7.3 Output Sanitization
|
|
634
|
+
|
|
635
|
+
- [x] No absolute filesystem paths in output — SKILL.md contains relative paths only
|
|
636
|
+
- [x] No environment variable values in output
|
|
637
|
+
- [x] No stack traces in error messages — N/A (no error output to users)
|
|
638
|
+
- [x] No internal function names in user-facing content
|
|
639
|
+
|
|
640
|
+
### 7.4 Content Validation
|
|
641
|
+
|
|
642
|
+
- Workflow files are read from the PAN package directory — trusted source
|
|
643
|
+
- Regex-based content transformation — no `eval()`, no `Function()`, no template interpolation
|
|
644
|
+
- Malformed input is handled by regex non-match — graceful pass-through
|
|
645
|
+
|
|
646
|
+
### 7.5 Privilege Scope Declaration
|
|
647
|
+
|
|
648
|
+
```
|
|
649
|
+
Reads from: pan-wizard-core/workflows/*.md, commands/pan/*.md, agents/*.md (package directory)
|
|
650
|
+
Writes to: .github/skills/*/SKILL.md, .github/agents/*.agent.md (user project or global dir)
|
|
651
|
+
Executes shell: No
|
|
652
|
+
Reads outside project: No
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## Phase 8: Implementation Roadmap
|
|
658
|
+
|
|
659
|
+
### 8.1 Command .md Definition
|
|
660
|
+
|
|
661
|
+
N/A — this feature does not add a new command. It enhances the installer's converter functions.
|
|
662
|
+
|
|
663
|
+
### 8.2 Implementation Tasks (Ordered)
|
|
664
|
+
|
|
665
|
+
```
|
|
666
|
+
### Task 1: Add interaction guidance to getCopilotSkillAdapterHeader()
|
|
667
|
+
Files: bin/install.js (line 571-583)
|
|
668
|
+
Change: Add "User interaction:" section to the adapter header template
|
|
669
|
+
Test: Verify adapter header contains interaction guidance text
|
|
670
|
+
Estimate: XS (1 pt)
|
|
671
|
+
Priority: P1
|
|
672
|
+
|
|
673
|
+
### Task 2: Add AskUserQuestion text rewrite to convertClaudeToCopilotMarkdown()
|
|
674
|
+
Files: bin/install.js (line 554-564)
|
|
675
|
+
Change: Add regex replacement that converts "AskUserQuestion" references to
|
|
676
|
+
"Ask the user with numbered options" and similar conversational patterns
|
|
677
|
+
Test: Verify AskUserQuestion references are replaced in converter output
|
|
678
|
+
Estimate: S (2 pts)
|
|
679
|
+
Priority: P1
|
|
680
|
+
|
|
681
|
+
### Task 3: Add rewriteAskUserQuestionForCopilot() function
|
|
682
|
+
Files: bin/install.js (new function, ~40 lines)
|
|
683
|
+
Change: Regex-based block rewriter that converts AskUserQuestion blocks
|
|
684
|
+
(with header/question/options) into numbered menu text
|
|
685
|
+
Test: Unit tests with sample blocks → verify numbered output
|
|
686
|
+
Estimate: M (4 pts)
|
|
687
|
+
Priority: P2
|
|
688
|
+
|
|
689
|
+
### Task 4: Integrate rewriter into convertClaudeToCopilotMarkdown()
|
|
690
|
+
Files: bin/install.js (line 554-564)
|
|
691
|
+
Change: Call rewriteAskUserQuestionForCopilot() from the markdown converter
|
|
692
|
+
Test: End-to-end: install → read SKILL.md → verify numbered menus present
|
|
693
|
+
Estimate: XS (1 pt)
|
|
694
|
+
Priority: P2
|
|
695
|
+
|
|
696
|
+
### Task 5: Handle multiSelect: true patterns
|
|
697
|
+
Files: bin/install.js (within rewriteAskUserQuestionForCopilot)
|
|
698
|
+
Change: Detect multiSelect and add "comma-separated numbers" instruction
|
|
699
|
+
Test: Verify discuss-phase SKILL.md has comma-separated instruction
|
|
700
|
+
Estimate: S (2 pts)
|
|
701
|
+
Priority: P2
|
|
702
|
+
|
|
703
|
+
### Task 6: Tests — unit and integration
|
|
704
|
+
Files: tests/copilot-install.test.cjs (extend existing)
|
|
705
|
+
Tests to add:
|
|
706
|
+
- Adapter header contains "User interaction:" section
|
|
707
|
+
- AskUserQuestion text references rewritten
|
|
708
|
+
- Simple AskUserQuestion block → numbered menu
|
|
709
|
+
- multiSelect block → comma-separated instruction
|
|
710
|
+
- Nested/malformed blocks → graceful pass-through
|
|
711
|
+
- E2E: install --copilot → read discuss-phase SKILL.md → verify numbered options
|
|
712
|
+
Estimate: S (2 pts)
|
|
713
|
+
Priority: P2
|
|
714
|
+
|
|
715
|
+
### Task 7: Documentation
|
|
716
|
+
Files: CHANGELOG.md, docs/USER-GUIDE.md
|
|
717
|
+
Change: Add entry for Copilot CLI interaction improvements
|
|
718
|
+
Estimate: XS (1 pt)
|
|
719
|
+
Priority: P3
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
**Total: 13 points (XS+S+M+XS+S+S+XS)**
|
|
723
|
+
|
|
724
|
+
### 8.3 Dependency Graph
|
|
725
|
+
|
|
726
|
+
```
|
|
727
|
+
Task 1 (Adapter Header)
|
|
728
|
+
└─→ Task 2 (Text Replace)
|
|
729
|
+
└─→ Task 3 (Block Rewriter Function)
|
|
730
|
+
└─→ Task 4 (Integration)
|
|
731
|
+
└─→ Task 5 (multiSelect)
|
|
732
|
+
└─→ Task 6 (Tests)
|
|
733
|
+
└─→ Task 7 (Docs)
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
Tasks 1 and 2 can be parallelized. Tasks 3-5 are sequential. Task 6 can partially overlap with 3-5. Task 7 is independent.
|
|
737
|
+
|
|
738
|
+
### 8.4 Risk Register
|
|
739
|
+
|
|
740
|
+
| Risk | Probability | Impact | Mitigation |
|
|
741
|
+
|------|------------|--------|------------|
|
|
742
|
+
| Regex fragility on new AskUserQuestion patterns | Medium | Low | Document expected format; regex has pass-through fallback |
|
|
743
|
+
| Copilot CLI changes its interaction model | Low | Medium | Our approach is additive text — still works if Copilot adds tools |
|
|
744
|
+
| Model ignores interaction guidance | Medium | Medium | Adapter header is prominent; test with real Copilot CLI sessions |
|
|
745
|
+
| Install size increase | Low | Low | ~500 bytes per file, negligible |
|
|
746
|
+
| Breaks existing Copilot install tests | Low | High | Run full test suite after each task |
|
|
747
|
+
|
|
748
|
+
### 8.5 Cognitive Complexity Budget
|
|
749
|
+
|
|
750
|
+
| Function | Lines | Nesting | Parameters |
|
|
751
|
+
|----------|-------|---------|------------|
|
|
752
|
+
| `getCopilotSkillAdapterHeader()` | 20 → 35 | 1 | 1 |
|
|
753
|
+
| `convertClaudeToCopilotMarkdown()` | 12 → 15 | 1 | 1 |
|
|
754
|
+
| `rewriteAskUserQuestionForCopilot()` (new) | ~40 | 2 | 1 |
|
|
755
|
+
|
|
756
|
+
All within budget (50 lines, 3 nesting, 4 params).
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
## Phase 9: Test Plan
|
|
761
|
+
|
|
762
|
+
### 9.1 Test Pyramid
|
|
763
|
+
|
|
764
|
+
| Level | Pattern | Minimum Count | What It Catches |
|
|
765
|
+
|-------|---------|---------------|-----------------|
|
|
766
|
+
| **Unit** | Test `rewriteAskUserQuestionForCopilot()` with sample blocks | 8+ | Regex accuracy, edge cases, multiSelect handling |
|
|
767
|
+
| **Integration** | Test `convertClaudeToCopilotMarkdown()` end-to-end with real workflow content | 5+ | Full conversion pipeline, adapter header presence |
|
|
768
|
+
| **E2E** | Install with `--copilot --local` → read installed SKILL.md → verify content | 2+ | Install pipeline, file output, real workflow conversion |
|
|
769
|
+
|
|
770
|
+
### 9.2 Assertion Density Requirements
|
|
771
|
+
|
|
772
|
+
Every test must assert:
|
|
773
|
+
- **Success tests:** (a) numbered options present in output, (b) response instruction present ("Type a number..."), (c) no raw `AskUserQuestion` text remaining
|
|
774
|
+
- **multiSelect tests:** (a) "comma-separated" instruction present, (b) "one or more" language present
|
|
775
|
+
- **Pass-through tests:** (a) non-matching content unchanged, (b) no crash on malformed input
|
|
776
|
+
|
|
777
|
+
### 9.3 Boundary Value Analysis
|
|
778
|
+
|
|
779
|
+
- [ ] Empty content string → returns empty string
|
|
780
|
+
- [ ] Content with no AskUserQuestion references → returns unchanged
|
|
781
|
+
- [ ] Content with 1 AskUserQuestion reference (simplest case)
|
|
782
|
+
- [ ] Content with 6+ AskUserQuestion references (discuss-phase has 6)
|
|
783
|
+
- [ ] AskUserQuestion block with 2 options (minimum)
|
|
784
|
+
- [ ] AskUserQuestion block with 4 options (maximum typical)
|
|
785
|
+
- [ ] multiSelect: true block
|
|
786
|
+
- [ ] AskUserQuestion reference without block (inline mention)
|
|
787
|
+
- [ ] Malformed block (missing options, missing question)
|
|
788
|
+
- [ ] Content with mixed AskUserQuestion blocks and non-AskUserQuestion content
|
|
789
|
+
|
|
790
|
+
### 9.4 Regression Verification
|
|
791
|
+
|
|
792
|
+
After implementing, verify:
|
|
793
|
+
- [ ] Full suite: `npm test` — ALL 790+ existing tests pass unchanged
|
|
794
|
+
- [ ] Related test file: `tests/copilot-install.test.cjs` — all 30 existing tests pass
|
|
795
|
+
- [ ] No existing test expectations changed
|
|
796
|
+
|
|
797
|
+
### 9.5 Performance Validation
|
|
798
|
+
|
|
799
|
+
- [ ] Install with `--copilot --local` completes in < 5 seconds (current baseline)
|
|
800
|
+
- [ ] No regression in full test suite runtime
|
|
801
|
+
- [ ] Converted SKILL.md files < 50KB each
|
|
802
|
+
|
|
803
|
+
---
|
|
804
|
+
|
|
805
|
+
## Phase 10: Output Artifacts
|
|
806
|
+
|
|
807
|
+
### 10.1 Specification Document
|
|
808
|
+
Saved to: `docs/specs/copilot_cli_interaction_featureai.md` (this file)
|
|
809
|
+
|
|
810
|
+
### 10.2 ADR
|
|
811
|
+
Saved to: `docs/decisions/ADR-0004-copilot-cli-interaction.md`
|
|
812
|
+
|
|
813
|
+
### 10.3 Report Summary
|
|
814
|
+
|
|
815
|
+
```
|
|
816
|
+
## /featureAI Complete — Copilot CLI Interactive Experience Optimization
|
|
817
|
+
|
|
818
|
+
### Problem & Evidence
|
|
819
|
+
Users on Copilot CLI see unstructured prose instead of clean numbered choices —
|
|
820
|
+
Evidence: user-reported (this conversation), architectural gap (41 AskUserQuestion
|
|
821
|
+
invocations stripped without replacement)
|
|
822
|
+
|
|
823
|
+
### Strategic Assessment
|
|
824
|
+
- Blue Ocean: Eliminate widget assumptions, Reduce interaction ambiguity,
|
|
825
|
+
Raise Copilot CLI to first-class parity, Create text-based structured interaction protocol
|
|
826
|
+
- Wardley: Custom-Built → targeting Product
|
|
827
|
+
- Moat Score: 19/30 — strongest in Cross-Platform (5) and Developer Experience (5)
|
|
828
|
+
- Cognitive Load: -1 (simplifies)
|
|
829
|
+
- Recommendation: Build
|
|
830
|
+
|
|
831
|
+
### Design Summary
|
|
832
|
+
- Feature Type: Core Enhancement (installer converter)
|
|
833
|
+
- Modules Affected: bin/install.js (3 functions modified/added)
|
|
834
|
+
- Output Schema: N/A (string content conversion)
|
|
835
|
+
- Error Handling: Regex pass-through on non-match
|
|
836
|
+
- Breaking Changes: None (additive improvement to installed files)
|
|
837
|
+
- Layer Violations: None
|
|
838
|
+
|
|
839
|
+
### Feature Ladder
|
|
840
|
+
- v0 (MVP): Adapter header + simple text replace — S (2 pts)
|
|
841
|
+
- v1 (Complete): Full block rewrite + multiSelect — M (4 pts)
|
|
842
|
+
- v2 (Enhanced): Per-command dynamic adapter — M (4 pts)
|
|
843
|
+
|
|
844
|
+
### Implementation
|
|
845
|
+
- Tasks: 7 tasks
|
|
846
|
+
- Complexity: M total (13 points)
|
|
847
|
+
- Files to create: 0
|
|
848
|
+
- Files to modify: 3 (bin/install.js, tests/copilot-install.test.cjs, CHANGELOG.md)
|
|
849
|
+
- Tests planned: 15+ (unit: 8, integration: 5, e2e: 2)
|
|
850
|
+
|
|
851
|
+
### Security
|
|
852
|
+
- Attack surface: Minimal (install-time string conversion, trusted input)
|
|
853
|
+
- Path safety: Not needed (no user-supplied paths)
|
|
854
|
+
- Output sanitization: Verified (no absolute paths, no env vars)
|
|
855
|
+
|
|
856
|
+
### Adoption
|
|
857
|
+
- Discovery: Automatic on reinstall
|
|
858
|
+
- Learning curve: Zero (users know how to type numbers)
|
|
859
|
+
- Aha moment: First time discuss-phase shows numbered options on Copilot CLI
|
|
860
|
+
|
|
861
|
+
### Documents Created
|
|
862
|
+
- Spec: docs/specs/copilot_cli_interaction_featureai.md
|
|
863
|
+
- ADR: docs/decisions/ADR-0004-copilot-cli-interaction.md
|
|
864
|
+
|
|
865
|
+
### Next Step
|
|
866
|
+
Add to superplan: /superplan --refresh
|
|
867
|
+
Execute: /execplan
|
|
868
|
+
```
|