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,363 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Opus 4.7 Extended Feature Designs (v1, SUPERSEDED)
|
|
3
|
+
type: feature-spec
|
|
4
|
+
status: superseded
|
|
5
|
+
superseded_by: opus_47_extended_features_v2_featureai.md
|
|
6
|
+
created: 2026-04-18
|
|
7
|
+
owner: oharms
|
|
8
|
+
related: [opus_47_existing_enhancements_featureai.md]
|
|
9
|
+
depends_on: [opus_47_existing_enhancements_featureai.md]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **⚠ Superseded.** This spec has been consolidated into [Spec B v2](opus_47_extended_features_v2_featureai.md), which folds overlapping capabilities behind fewer entry points (13 commands → 6, ~3200 LOC → ~1800, 15 weeks → 8). This v1 document is preserved for historical reference and as a catalog of sub-features that didn't survive consolidation but may be revisited later.
|
|
13
|
+
|
|
14
|
+
# Spec B — Extended Feature Designs (New Capabilities) — v1, SUPERSEDED
|
|
15
|
+
|
|
16
|
+
**Scope:** New commands, new agents, new architectural patterns that are only possible given Opus 4.7 primitives. Each feature below is a standalone module. Spec B assumes Spec A is shipped (memory.cjs, cache helpers, model routing extensions exist).
|
|
17
|
+
|
|
18
|
+
**Guiding principles:**
|
|
19
|
+
1. **Additive only.** No feature in Spec B breaks an existing command.
|
|
20
|
+
2. **Runtime-graceful.** Each feature declares minimum runtime capability; non-Claude runtimes get a documented fallback.
|
|
21
|
+
3. **Opt-in.** Every new command defaults off until the user runs `/pan:settings` to enable it.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## X-1. `/pan:architect` — Whole-Project Dependency Planner
|
|
26
|
+
|
|
27
|
+
**Problem.** PAN today plans phases linearly (phase 1 → 2 → 3 …). This assumes human-curated sequencing. With 1M context, an agent can ingest full requirements.md + roadmap.md + CLAUDE.md + codebase map in one call, then emit a *phase dependency graph* showing which phases can run in parallel, which must sequence, which have hidden coupling.
|
|
28
|
+
|
|
29
|
+
**New files.**
|
|
30
|
+
- `commands/pan/architect.md` — user-facing command.
|
|
31
|
+
- `agents/pan-architect.md` — new agent (1M-context ingestion, thinking-on).
|
|
32
|
+
- `pan-wizard-core/bin/lib/architect.cjs` — new core module: `buildDependencyGraph(phases)`, `detectParallelizable(graph)`, `detectHiddenCoupling(graph, codebase)`.
|
|
33
|
+
- `pan-wizard-core/templates/architecture-graph.md` — output template (mermaid DAG + rationale table).
|
|
34
|
+
- `pan-wizard-core/workflows/architect.md` — orchestrator workflow.
|
|
35
|
+
|
|
36
|
+
**Output.** `.planning/architecture/dependency-graph.md` with:
|
|
37
|
+
- Mermaid DAG of phase dependencies
|
|
38
|
+
- Rationale per edge (why phase X depends on phase Y)
|
|
39
|
+
- "Parallel batches" recommendation
|
|
40
|
+
- Risk flags (hidden coupling, circular dependencies)
|
|
41
|
+
|
|
42
|
+
**Runtime compatibility.** Opus 4.7 primary (1M context). Sonnet fallback shards into 3 agent calls with stitching.
|
|
43
|
+
|
|
44
|
+
**Test surface.** ~15 tests, new test file.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## X-2. `/pan:orchestrate` — Hierarchical Agent Spawning
|
|
49
|
+
|
|
50
|
+
**Problem.** Today the `Task` tool orchestrates from workflow → agent (one level). Opus 4.7 can have agents spawn agents. A *conductor* agent can decompose a phase into sub-phases and spawn specialist agents for each, without the workflow.md script mediating every step.
|
|
51
|
+
|
|
52
|
+
**New files.**
|
|
53
|
+
- `commands/pan/orchestrate.md` — user-facing command.
|
|
54
|
+
- `agents/pan-conductor.md` — top-level orchestrator agent. Reads phase plan, spawns `pan-executor`, `pan-reviewer`, `pan-verifier` in sequence with inter-agent handoff.
|
|
55
|
+
- `pan-wizard-core/bin/lib/orchestrate.cjs` — `buildConductorInstructions(plan)`, `trackConductorState(cwd)`.
|
|
56
|
+
- `.planning/orchestration/<phase>/trace.json` — audit log of conductor decisions.
|
|
57
|
+
|
|
58
|
+
**Why different from `exec-phase`:** exec-phase is deterministic (workflow.md dictates every step). Conductor is adaptive (decides mid-flight to re-plan, spawn extra research, abort a sub-task).
|
|
59
|
+
|
|
60
|
+
**Safety harness (mandatory).**
|
|
61
|
+
- Max 3 levels of nesting (conductor → executor → reviewer is 2 levels; no more).
|
|
62
|
+
- Max 12 agent spawns per phase.
|
|
63
|
+
- Cost ceiling (reuses focus-auto's budget layer).
|
|
64
|
+
- Emergency stop via `.planning/orchestration/abort` file.
|
|
65
|
+
|
|
66
|
+
**Runtime compatibility.** Claude Code + Opus 4.7 only. Documented in command doc.
|
|
67
|
+
|
|
68
|
+
**Test surface.** ~20 tests, new test file + scenario test.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## X-3. `/pan:converse` — Interactive Design Refinement
|
|
73
|
+
|
|
74
|
+
**Problem.** `/pan:discuss-phase` is a scripted one-shot interview. With prompt caching + memory, PAN can support multi-turn design refinement: user says "but what about X?", agent thinks, consults memory, updates context.md incrementally. Each turn's context is cached.
|
|
75
|
+
|
|
76
|
+
**New files.**
|
|
77
|
+
- `commands/pan/converse.md` — user-facing.
|
|
78
|
+
- `agents/pan-discussant.md` — new agent with memory:on, thinking:on, caching:on.
|
|
79
|
+
- `pan-wizard-core/bin/lib/converse.cjs` — session state, turn history.
|
|
80
|
+
- `.planning/conversations/<phase>/session.json` — resumable conversation state.
|
|
81
|
+
|
|
82
|
+
**Flow.**
|
|
83
|
+
1. User: `/pan:converse 12 "should we use Redis or Memcached?"`
|
|
84
|
+
2. Agent reads existing context.md, memory for phase 12, thinks, responds.
|
|
85
|
+
3. User: `/pan:converse 12 "what about cost at 10M req/sec?"` — cache still warm, agent refines.
|
|
86
|
+
4. After N turns, agent emits updated context.md candidate, user approves.
|
|
87
|
+
|
|
88
|
+
**Runtime compatibility.** All runtimes (just a chat loop). Opus + Claude gets caching benefit.
|
|
89
|
+
|
|
90
|
+
**Test surface.** ~12 tests.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## X-4. `/pan:self-review` — Agent Cross-Verification Network
|
|
95
|
+
|
|
96
|
+
**Problem.** pan-reviewer today reviews human-written or executor-written code once. With cheap caching + thinking, PAN can run a *cross-verification network*: reviewer reviews executor; meta-reviewer reviews the reviewer for missed issues. Tuned via 2 exchanges max.
|
|
97
|
+
|
|
98
|
+
**New files.**
|
|
99
|
+
- `commands/pan/self-review.md`
|
|
100
|
+
- `agents/pan-meta-reviewer.md` — new agent. Reviews the reviewer's review.
|
|
101
|
+
- `pan-wizard-core/bin/lib/self-review.cjs` — cross-check orchestration, conflict resolution (disagreements surface as user-facing questions, not silent overrides).
|
|
102
|
+
|
|
103
|
+
**Output.** `.planning/reviews/<phase>/cross-review.md` with:
|
|
104
|
+
- Reviewer's findings
|
|
105
|
+
- Meta-reviewer's additions / disputes
|
|
106
|
+
- Resolution table
|
|
107
|
+
|
|
108
|
+
**Runtime compatibility.** All runtimes.
|
|
109
|
+
|
|
110
|
+
**Test surface.** ~10 tests.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## X-5. `/pan:simulate` — Dry-Run Phase Impact Predictor
|
|
115
|
+
|
|
116
|
+
**Problem.** Users commit to `/pan:exec-phase 7` without knowing what it'll touch. A simulation agent could read the plan, the codebase, predict the blast radius (files touched, tests likely to break, migration scripts needed), and emit a preview *before* any write.
|
|
117
|
+
|
|
118
|
+
**New files.**
|
|
119
|
+
- `commands/pan/simulate.md`
|
|
120
|
+
- `agents/pan-simulator.md` — read-only agent, large context, thinking.
|
|
121
|
+
- `pan-wizard-core/bin/lib/simulate.cjs`.
|
|
122
|
+
- `.planning/phases/<N>/simulation.md` — preview document.
|
|
123
|
+
|
|
124
|
+
**Output fields.**
|
|
125
|
+
- Files likely to be created / modified / deleted
|
|
126
|
+
- Tests likely to fail (based on coverage + test file imports)
|
|
127
|
+
- Migration steps required
|
|
128
|
+
- External deps that may need bumping
|
|
129
|
+
- Risk score (1-10)
|
|
130
|
+
|
|
131
|
+
**Runtime compatibility.** Opus 4.7 strongest (1M context). Degrades gracefully.
|
|
132
|
+
|
|
133
|
+
**Test surface.** ~12 tests.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## X-6. `/pan:teach` — Project-Specific Playbook Generator
|
|
138
|
+
|
|
139
|
+
**Problem.** Every project accumulates lore ("we don't use Redux because of X", "always test with bigint for user IDs"). This lore lives in memory.cjs entries after Spec A, but nothing surfaces it to new contributors or new phases systematically.
|
|
140
|
+
|
|
141
|
+
**New files.**
|
|
142
|
+
- `commands/pan/teach.md`
|
|
143
|
+
- `pan-wizard-core/bin/lib/teach.cjs` — reads all `.planning/memory/*.md`, clusters, generates playbook sections.
|
|
144
|
+
- `.planning/PLAYBOOK.md` — generated output.
|
|
145
|
+
- `pan-wizard-core/templates/playbook.md` — template.
|
|
146
|
+
|
|
147
|
+
**Triggers.** Auto-runs after each `/pan:milestone-done`. Manual via `/pan:teach`.
|
|
148
|
+
|
|
149
|
+
**Output.** Markdown document with sections: Conventions, Gotchas, Decisions, Tool Choices, Anti-Patterns.
|
|
150
|
+
|
|
151
|
+
**Runtime compatibility.** All runtimes.
|
|
152
|
+
|
|
153
|
+
**Test surface.** ~10 tests.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## X-7. `/pan:bridge` — MCP Tool Awareness
|
|
158
|
+
|
|
159
|
+
**Problem.** Users with MCP servers (database, Linear, Slack) expect PAN to *know* and *use* those tools when planning. Today PAN is tool-agnostic — the plan says "update the Linear ticket" as prose, not a tool invocation.
|
|
160
|
+
|
|
161
|
+
**New files.**
|
|
162
|
+
- `commands/pan/bridge.md`
|
|
163
|
+
- `pan-wizard-core/bin/lib/bridge.cjs` — discovers MCP servers via Claude Code's MCP list API, parses tool schemas, injects tool metadata into planner context.
|
|
164
|
+
- `.planning/bridge/available-tools.json` — cache of detected tools.
|
|
165
|
+
|
|
166
|
+
**Behavior.** When `/pan:plan-phase` runs, if bridge is enabled, planner sees "available MCP tools: [linear.updateTicket, slack.sendMessage, postgres.query]" and references them by name in the plan. Executor then calls them natively.
|
|
167
|
+
|
|
168
|
+
**Runtime compatibility.** Claude Code (MCP-first). Others: documented as "not supported, PR welcome".
|
|
169
|
+
|
|
170
|
+
**Test surface.** ~15 tests + 1 scenario with mock MCP.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## X-8. `/pan:watch` — Background Monitoring Agent
|
|
175
|
+
|
|
176
|
+
**Problem.** Users want passive monitoring: "tell me when test coverage drops", "warn me if a phase has taken >8 hours". Today there's no background agent.
|
|
177
|
+
|
|
178
|
+
**New files.**
|
|
179
|
+
- `commands/pan/watch.md` (start/stop/status)
|
|
180
|
+
- `agents/pan-watcher.md` — polls project state every 10-30 min.
|
|
181
|
+
- `pan-wizard-core/bin/lib/watch.cjs` — scheduler state, threshold config.
|
|
182
|
+
- `.planning/watch/config.json`, `.planning/watch/events.log`.
|
|
183
|
+
|
|
184
|
+
**Monitored signals** (all configurable):
|
|
185
|
+
- Test pass rate drop >2% vs baseline
|
|
186
|
+
- Phase active >configurable duration
|
|
187
|
+
- Uncommitted changes older than N hours
|
|
188
|
+
- Memory file growth >10 entries/day (churn)
|
|
189
|
+
- CHANGELOG not updated after milestone-done
|
|
190
|
+
|
|
191
|
+
**Runtime compatibility.** Claude Code via background agent support; others via external cron (documented).
|
|
192
|
+
|
|
193
|
+
**Test surface.** ~15 tests.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## X-9. `/pan:what-if` — Counterfactual Phase Exploration
|
|
198
|
+
|
|
199
|
+
**Problem.** Sometimes a user wonders "what if we'd chosen SQL over NoSQL in phase 3?". Today: no way to explore without manually redoing work. With thinking + 1M context, an agent can simulate the counterfactual on a branch.
|
|
200
|
+
|
|
201
|
+
**New files.**
|
|
202
|
+
- `commands/pan/what-if.md`
|
|
203
|
+
- `agents/pan-counterfactual.md` — creates a git worktree, replays the phase with the new premise, emits a report.
|
|
204
|
+
- `pan-wizard-core/bin/lib/whatif.cjs` — worktree lifecycle, report generation.
|
|
205
|
+
- `.planning/counterfactuals/<phase>-<scenario>.md`.
|
|
206
|
+
|
|
207
|
+
**Safety.** Always runs in isolated worktree. Never touches main working tree. Worktree auto-deleted after report.
|
|
208
|
+
|
|
209
|
+
**Runtime compatibility.** Claude Code (worktree integration). Others: documented alternative via manual git branch.
|
|
210
|
+
|
|
211
|
+
**Test surface.** ~10 tests.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## X-10. `/pan:explain` — Grounded Architecture Q&A
|
|
216
|
+
|
|
217
|
+
**Problem.** New team member asks "why does phase 4 have a race condition fix?". Answer requires reading phase-4/plan.md + summary.md + the commit + related ADRs. Manual today.
|
|
218
|
+
|
|
219
|
+
**New files.**
|
|
220
|
+
- `commands/pan/explain.md`
|
|
221
|
+
- `agents/pan-explainer.md` — accepts natural-language question, grounds answer in actual files (plans, summaries, ADRs, commits), emits citations.
|
|
222
|
+
- `pan-wizard-core/bin/lib/explain.cjs` — file retrieval + citation formatter.
|
|
223
|
+
|
|
224
|
+
**Output.** Answer with inline `[ADR-0015]`, `[phase-4/summary.md:42]` citations users can click.
|
|
225
|
+
|
|
226
|
+
**Runtime compatibility.** All runtimes (it's retrieval + LLM). Opus 4.7 with 1M context can ingest more ADRs/phases in one pass.
|
|
227
|
+
|
|
228
|
+
**Test surface.** ~12 tests + scenario.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## X-11. `/pan:predict-milestone` — Milestone Completion Estimator
|
|
233
|
+
|
|
234
|
+
**Problem.** Users don't know when their current milestone will finish. Today PAN tracks progress % but not velocity. With memory of past phase-completion times + remaining scope, a predictor agent can estimate.
|
|
235
|
+
|
|
236
|
+
**New files.**
|
|
237
|
+
- `commands/pan/predict-milestone.md`
|
|
238
|
+
- `pan-wizard-core/bin/lib/predict.cjs` — reads phase durations from history, computes velocity, projects end date with confidence interval.
|
|
239
|
+
- Uses thinking-mode to reason about remaining phase complexity (not just count).
|
|
240
|
+
|
|
241
|
+
**Output.** `Estimated milestone completion: 2026-05-18 (±3 days, 70% confidence). Bottleneck: phase 8 (est. 5 days, highest complexity).`
|
|
242
|
+
|
|
243
|
+
**Runtime compatibility.** All runtimes.
|
|
244
|
+
|
|
245
|
+
**Test surface.** ~10 tests.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## X-12. `/pan:harden` — Security & Compliance Audit Pass
|
|
250
|
+
|
|
251
|
+
**Problem.** PAN has pan-reviewer for code quality but no dedicated security pass. OWASP/STRIDE considerations today are buried in standards.md checklist items. Opus 4.7's deeper reasoning + 1M context makes it practical to run a focused security audit agent across the whole codebase.
|
|
252
|
+
|
|
253
|
+
**New files.**
|
|
254
|
+
- `commands/pan/harden.md`
|
|
255
|
+
- `agents/pan-hardener.md` — OWASP Top 10 + STRIDE threat model agent.
|
|
256
|
+
- `pan-wizard-core/bin/lib/harden.cjs`.
|
|
257
|
+
- `.planning/security/audit-<date>.md`.
|
|
258
|
+
|
|
259
|
+
**Differentiators from `pan-reviewer`:** reviewer looks at diffs in isolation; hardener does threat modeling across the full system.
|
|
260
|
+
|
|
261
|
+
**Runtime compatibility.** Opus 4.7 primary. Degraded on smaller models.
|
|
262
|
+
|
|
263
|
+
**Test surface.** ~15 tests.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## X-13. Agent-to-Agent Messaging Bus (Architectural)
|
|
268
|
+
|
|
269
|
+
**Problem.** Agents today communicate only via .planning/*.md files (disk-based, polled). For Spec B's hierarchical orchestration (X-2), they need a first-class message channel.
|
|
270
|
+
|
|
271
|
+
**New files.**
|
|
272
|
+
- `pan-wizard-core/bin/lib/bus.cjs` — exports: `publish(channel, msg)`, `subscribe(channel, handler)`, `drain(channel)`.
|
|
273
|
+
- `.planning/bus/<channel>.jsonl` — append-only log of messages.
|
|
274
|
+
- Channels: `phase-events`, `orchestrator`, `review-handoff`, `watcher`.
|
|
275
|
+
|
|
276
|
+
**Architectural note.** This is infrastructure, not a user-facing command. Future features depend on it (X-2, X-8, X-4).
|
|
277
|
+
|
|
278
|
+
**Test surface.** ~15 tests.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## X-14. Cost Dashboard Command `/pan:cost`
|
|
283
|
+
|
|
284
|
+
**Problem.** Users don't see what PAN costs. With Opus 4.7's caching + tier routing + thinking budgets, per-command cost is suddenly highly variable and worth exposing.
|
|
285
|
+
|
|
286
|
+
**New files.**
|
|
287
|
+
- `commands/pan/cost.md`
|
|
288
|
+
- `pan-wizard-core/bin/lib/cost.cjs` — parse .planning/metrics/tokens.jsonl, aggregate by command/agent/day.
|
|
289
|
+
- `.planning/metrics/tokens.jsonl` — per-call cost log (new).
|
|
290
|
+
- Instrumentation hook in each agent spawn to log.
|
|
291
|
+
|
|
292
|
+
**Output formats.** table | json | chart (ascii bar chart for terminal).
|
|
293
|
+
|
|
294
|
+
**Runtime compatibility.** Claude (full). Others: shows "cost data unavailable for runtime X" until their APIs expose token usage.
|
|
295
|
+
|
|
296
|
+
**Test surface.** ~10 tests.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Files to Create Summary (Spec B)
|
|
301
|
+
|
|
302
|
+
| Category | Files | Count |
|
|
303
|
+
|----------|-------|-------|
|
|
304
|
+
| New commands | architect, orchestrate, converse, self-review, simulate, teach, bridge, watch, what-if, explain, predict-milestone, harden, cost | 13 |
|
|
305
|
+
| New agents | pan-architect, pan-conductor, pan-discussant, pan-meta-reviewer, pan-simulator, pan-watcher, pan-counterfactual, pan-explainer, pan-hardener | 9 |
|
|
306
|
+
| New core modules | architect.cjs, orchestrate.cjs, converse.cjs, self-review.cjs, simulate.cjs, teach.cjs, bridge.cjs, watch.cjs, whatif.cjs, explain.cjs, predict.cjs, harden.cjs, bus.cjs, cost.cjs | 14 |
|
|
307
|
+
| New templates | architecture-graph, playbook, security-audit, counterfactual-report | 4 |
|
|
308
|
+
| New workflows | architect, orchestrate, bridge | 3 |
|
|
309
|
+
| Test files new | ~14 new test files | 14 |
|
|
310
|
+
|
|
311
|
+
**Estimated test count delta:** +150 to +180 tests.
|
|
312
|
+
|
|
313
|
+
**Estimated LOC impact:** ~3,200 LOC added (commands + agents + lib + tests).
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Implementation Order (Recommended)
|
|
318
|
+
|
|
319
|
+
**Wave 1 (foundation, 3 weeks):**
|
|
320
|
+
1. X-13 (bus.cjs — infrastructure everything else uses)
|
|
321
|
+
2. X-14 (cost — gives users visibility into what's coming)
|
|
322
|
+
3. X-1 (architect — biggest user-visible win from 1M context)
|
|
323
|
+
|
|
324
|
+
**Wave 2 (adaptive execution, 4 weeks):**
|
|
325
|
+
4. X-2 (orchestrate — leverages X-13)
|
|
326
|
+
5. X-5 (simulate — low-risk read-only preview)
|
|
327
|
+
6. X-4 (self-review — cheap, high quality return)
|
|
328
|
+
|
|
329
|
+
**Wave 3 (insight layer, 3 weeks):**
|
|
330
|
+
7. X-6 (teach — leverages Spec A memory)
|
|
331
|
+
8. X-10 (explain — citation-grounded Q&A)
|
|
332
|
+
9. X-11 (predict-milestone)
|
|
333
|
+
|
|
334
|
+
**Wave 4 (interactive, 3 weeks):**
|
|
335
|
+
10. X-3 (converse)
|
|
336
|
+
11. X-8 (watch — needs X-13 bus)
|
|
337
|
+
12. X-9 (what-if — worktree-based)
|
|
338
|
+
|
|
339
|
+
**Wave 5 (specialist audits, 2 weeks):**
|
|
340
|
+
13. X-12 (harden)
|
|
341
|
+
14. X-7 (bridge — MCP awareness, Claude-only first)
|
|
342
|
+
|
|
343
|
+
**Total Spec B calendar:** ~15 weeks. Staged waves allow partial ship after each wave.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Cross-Spec Dependencies
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
Spec A (foundation)
|
|
351
|
+
├─ E-1 caching ──────┐
|
|
352
|
+
├─ E-3 thinking ─────┤
|
|
353
|
+
├─ E-4 memory ───────┤
|
|
354
|
+
└─ E-7 routing ──────┤
|
|
355
|
+
▼
|
|
356
|
+
Spec B depends on all foundation pieces.
|
|
357
|
+
X-13 bus ← foundation for X-2, X-8, X-4
|
|
358
|
+
X-1 architect ← depends on E-2 (single-shot) + E-3 (thinking)
|
|
359
|
+
X-6 teach ← depends on E-4 (memory)
|
|
360
|
+
X-3 converse ← depends on E-1 (caching) + E-4 (memory)
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**Ship order:** Spec A first (6 weeks). Then Spec B Wave 1 after A is stable (ship as v3.0). Subsequent waves as minor versions (v3.1, v3.2, ...).
|