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
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridge — MCP tool discovery + per-phase recommendation (Spec B v2 Y-5, v3.3).
|
|
3
|
-
*
|
|
4
|
-
* Discovery-only scope. We discover what MCP tools are reachable from the
|
|
5
|
-
* host runtime and what their shapes look like, then recommend which tools
|
|
6
|
-
* a given phase plan might use. We do NOT auto-inject tools into plans or
|
|
7
|
-
* auto-invoke them — those belong to a future wave once MCP schemas stabilize.
|
|
8
|
-
*
|
|
9
|
-
* Data lives at `.planning/bridge/available-tools.json`:
|
|
10
|
-
* {
|
|
11
|
-
* cached_at: "2026-04-18T...",
|
|
12
|
-
* runtime: "claude",
|
|
13
|
-
* servers: [
|
|
14
|
-
* {
|
|
15
|
-
* name: "linear",
|
|
16
|
-
* version: "1.2.3",
|
|
17
|
-
* tools: [
|
|
18
|
-
* { name: "linear.updateTicket", description: "...", schema: {...} },
|
|
19
|
-
* ...
|
|
20
|
-
* ]
|
|
21
|
-
* },
|
|
22
|
-
* ...
|
|
23
|
-
* ]
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* Nothing populates this file on its own: no hook or host writes it.
|
|
27
|
-
* `bridge cache --servers <json>` (or an external script) seeds it; this module
|
|
28
|
-
* reads the cache and reasons over it.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
const fs = require('fs');
|
|
32
|
-
const path = require('path');
|
|
33
|
-
const { output, error, safeReadFile, toPosix, findPhaseInternal } = require('./core.cjs');
|
|
34
|
-
const { planningPath } = require('./utils.cjs');
|
|
35
|
-
|
|
36
|
-
const BRIDGE_DIR = 'bridge';
|
|
37
|
-
const TOOLS_FILE = 'available-tools.json';
|
|
38
|
-
|
|
39
|
-
function bridgeDir(cwd) {
|
|
40
|
-
return path.join(planningPath(cwd), BRIDGE_DIR);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function toolsCacheFile(cwd) {
|
|
44
|
-
return path.join(bridgeDir(cwd), TOOLS_FILE);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Load the cached tool list. Returns an empty catalog if the cache is
|
|
49
|
-
* missing or malformed.
|
|
50
|
-
*
|
|
51
|
-
* @param {string} cwd - Project root
|
|
52
|
-
* @returns {{cached_at: string|null, runtime: string|null, servers: Array, source: 'cache'|'empty'}}
|
|
53
|
-
*/
|
|
54
|
-
function loadToolCache(cwd) {
|
|
55
|
-
const raw = safeReadFile(toolsCacheFile(cwd));
|
|
56
|
-
if (!raw) return { cached_at: null, runtime: null, servers: [], source: 'empty' };
|
|
57
|
-
try {
|
|
58
|
-
const parsed = JSON.parse(raw);
|
|
59
|
-
return {
|
|
60
|
-
cached_at: parsed.cached_at || null,
|
|
61
|
-
runtime: parsed.runtime || null,
|
|
62
|
-
servers: Array.isArray(parsed.servers) ? parsed.servers : [],
|
|
63
|
-
source: 'cache',
|
|
64
|
-
};
|
|
65
|
-
} catch {
|
|
66
|
-
return { cached_at: null, runtime: null, servers: [], source: 'empty' };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Write the tool cache. Used by the command when the host runtime provides
|
|
72
|
-
* a fresh tool list (or by tests for fixture setup).
|
|
73
|
-
*
|
|
74
|
-
* @param {string} cwd - Project root
|
|
75
|
-
* @param {{runtime, servers}} data
|
|
76
|
-
* @returns {{written: true, file: string}|{error: string}}
|
|
77
|
-
*/
|
|
78
|
-
function writeToolCache(cwd, data) {
|
|
79
|
-
if (!data || typeof data !== 'object') return { error: 'data required' };
|
|
80
|
-
try {
|
|
81
|
-
fs.mkdirSync(bridgeDir(cwd), { recursive: true });
|
|
82
|
-
} catch (e) {
|
|
83
|
-
return { error: `Failed to create bridge dir: ${e.message}` };
|
|
84
|
-
}
|
|
85
|
-
const payload = {
|
|
86
|
-
cached_at: new Date().toISOString(),
|
|
87
|
-
runtime: data.runtime || null,
|
|
88
|
-
servers: Array.isArray(data.servers) ? data.servers : [],
|
|
89
|
-
};
|
|
90
|
-
const file = toolsCacheFile(cwd);
|
|
91
|
-
try {
|
|
92
|
-
fs.writeFileSync(file, JSON.stringify(payload, null, 2), 'utf-8');
|
|
93
|
-
} catch (e) {
|
|
94
|
-
return { error: `Failed to write ${file}: ${e.message}` };
|
|
95
|
-
}
|
|
96
|
-
return { written: true, file: toPosix(path.relative(cwd, file)) };
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Flatten server → tool hierarchy into a single list for easier reasoning.
|
|
101
|
-
*
|
|
102
|
-
* @param {Array} servers - From loadToolCache().servers
|
|
103
|
-
* @returns {Array<{server, name, description, schema}>}
|
|
104
|
-
*/
|
|
105
|
-
function flattenTools(servers) {
|
|
106
|
-
const tools = [];
|
|
107
|
-
for (const server of servers || []) {
|
|
108
|
-
if (!server || !Array.isArray(server.tools)) continue;
|
|
109
|
-
for (const tool of server.tools) {
|
|
110
|
-
if (!tool || !tool.name) continue;
|
|
111
|
-
tools.push({
|
|
112
|
-
server: server.name,
|
|
113
|
-
name: tool.name,
|
|
114
|
-
description: tool.description || '',
|
|
115
|
-
schema: tool.schema || null,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return tools;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* List all available MCP tools, flattened.
|
|
124
|
-
*
|
|
125
|
-
* @param {string} cwd - Project root
|
|
126
|
-
* @returns {Object}
|
|
127
|
-
*/
|
|
128
|
-
function listTools(cwd) {
|
|
129
|
-
const cache = loadToolCache(cwd);
|
|
130
|
-
const tools = flattenTools(cache.servers);
|
|
131
|
-
return {
|
|
132
|
-
cached_at: cache.cached_at,
|
|
133
|
-
runtime: cache.runtime,
|
|
134
|
-
server_count: cache.servers.length,
|
|
135
|
-
tool_count: tools.length,
|
|
136
|
-
tools,
|
|
137
|
-
source: cache.source,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// ─── Recommendation scoring ────────────────────────────────────────────────
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Score a tool's relevance to a phase by matching plan keywords against
|
|
145
|
-
* tool name + description. Naive frequency-based scoring (no embeddings).
|
|
146
|
-
*
|
|
147
|
-
* @param {string} phaseText - Combined plan text
|
|
148
|
-
* @param {{server, name, description}} tool
|
|
149
|
-
* @returns {{score: number, hits: Array<string>}}
|
|
150
|
-
*/
|
|
151
|
-
function scoreToolForPhase(phaseText, tool) {
|
|
152
|
-
if (!phaseText || !tool) return { score: 0, hits: [] };
|
|
153
|
-
const body = phaseText.toLowerCase();
|
|
154
|
-
const haystack = `${tool.server || ''} ${tool.name || ''} ${tool.description || ''}`.toLowerCase();
|
|
155
|
-
|
|
156
|
-
// Extract keywords from the tool's identity: split on non-word chars, dedupe, keep ≥3 chars.
|
|
157
|
-
const keywords = [...new Set(haystack.split(/\W+/).filter(w => w.length >= 3))];
|
|
158
|
-
|
|
159
|
-
let score = 0;
|
|
160
|
-
const hits = [];
|
|
161
|
-
for (const kw of keywords) {
|
|
162
|
-
const re = new RegExp(`\\b${kw.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, 'g');
|
|
163
|
-
const count = (body.match(re) || []).length;
|
|
164
|
-
if (count > 0) {
|
|
165
|
-
score += count;
|
|
166
|
-
hits.push(kw);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
return { score, hits };
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Recommend MCP tools for a specific phase based on plan text keyword match.
|
|
174
|
-
*
|
|
175
|
-
* @param {string} cwd - Project root
|
|
176
|
-
* @param {string|number} phaseNum - Phase identifier
|
|
177
|
-
* @param {Object} [opts] - {max_recommendations, min_score}
|
|
178
|
-
* @returns {Object}
|
|
179
|
-
*/
|
|
180
|
-
function recommendForPhase(cwd, phaseNum, opts) {
|
|
181
|
-
const cache = loadToolCache(cwd);
|
|
182
|
-
const tools = flattenTools(cache.servers);
|
|
183
|
-
if (tools.length === 0) {
|
|
184
|
-
return {
|
|
185
|
-
phase: String(phaseNum),
|
|
186
|
-
runtime: cache.runtime,
|
|
187
|
-
recommendations: [],
|
|
188
|
-
reason: 'no MCP tools cached — seed .planning/bridge/available-tools.json with `pan-tools bridge cache --servers <json>`; no hook or host writes it',
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const phaseInfo = findPhaseInternal(cwd, phaseNum);
|
|
193
|
-
if (!phaseInfo || !phaseInfo.found) {
|
|
194
|
-
return {
|
|
195
|
-
phase: String(phaseNum),
|
|
196
|
-
error: `Phase ${phaseNum} not found in .planning/phases/`,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const phaseDir = path.join(cwd, phaseInfo.directory);
|
|
201
|
-
const planTexts = (phaseInfo.plans || [])
|
|
202
|
-
.map(f => safeReadFile(path.join(phaseDir, f)) || '')
|
|
203
|
-
.join('\n');
|
|
204
|
-
|
|
205
|
-
const max = Math.max(1, Math.min(50, Number(opts?.max_recommendations) || 10));
|
|
206
|
-
const minScore = Math.max(0, Number(opts?.min_score) || 1);
|
|
207
|
-
|
|
208
|
-
const scored = tools
|
|
209
|
-
.map(tool => ({
|
|
210
|
-
...tool,
|
|
211
|
-
...scoreToolForPhase(planTexts, tool),
|
|
212
|
-
}))
|
|
213
|
-
.filter(t => t.score >= minScore)
|
|
214
|
-
.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name))
|
|
215
|
-
.slice(0, max);
|
|
216
|
-
|
|
217
|
-
return {
|
|
218
|
-
phase: String(phaseNum),
|
|
219
|
-
phase_name: phaseInfo.phase_name || null,
|
|
220
|
-
runtime: cache.runtime,
|
|
221
|
-
total_candidates: tools.length,
|
|
222
|
-
recommendations: scored.map(t => ({
|
|
223
|
-
server: t.server,
|
|
224
|
-
name: t.name,
|
|
225
|
-
description: t.description,
|
|
226
|
-
score: t.score,
|
|
227
|
-
hits: t.hits,
|
|
228
|
-
})),
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// ─── CLI wrappers ───────────────────────────────────────────────────────────
|
|
233
|
-
|
|
234
|
-
function cmdBridgeList(cwd, raw) {
|
|
235
|
-
output(listTools(cwd), raw);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
function cmdBridgeRecommend(cwd, phaseNum, opts, raw) {
|
|
239
|
-
if (!phaseNum) error('Usage: bridge recommend <phase> [--max N] [--min-score N]');
|
|
240
|
-
output(recommendForPhase(cwd, phaseNum, opts), raw);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
function cmdBridgeCache(cwd, serversJson, runtime, raw) {
|
|
244
|
-
// The cache's only writer: no hook or host runtime populates the file, so this
|
|
245
|
-
// CLI path (or an external script) is how users seed it.
|
|
246
|
-
if (!serversJson) {
|
|
247
|
-
// No payload — just echo the current cache path/state.
|
|
248
|
-
output(listTools(cwd), raw);
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
let servers;
|
|
252
|
-
try { servers = JSON.parse(serversJson); }
|
|
253
|
-
catch (e) { error(`Invalid --servers JSON: ${e.message}`); }
|
|
254
|
-
output(writeToolCache(cwd, { runtime, servers }), raw);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
module.exports = {
|
|
258
|
-
loadToolCache,
|
|
259
|
-
writeToolCache,
|
|
260
|
-
flattenTools,
|
|
261
|
-
listTools,
|
|
262
|
-
scoreToolForPhase,
|
|
263
|
-
recommendForPhase,
|
|
264
|
-
cmdBridgeList,
|
|
265
|
-
cmdBridgeRecommend,
|
|
266
|
-
cmdBridgeCache,
|
|
267
|
-
BRIDGE_DIR,
|
|
268
|
-
TOOLS_FILE,
|
|
269
|
-
};
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
# Architecture Research Template
|
|
2
|
-
|
|
3
|
-
Template for `.planning/research/architecture.md` — system structure patterns for the project domain.
|
|
4
|
-
|
|
5
|
-
<template>
|
|
6
|
-
|
|
7
|
-
~~~markdown
|
|
8
|
-
# Architecture Research
|
|
9
|
-
|
|
10
|
-
**Domain:** [domain type]
|
|
11
|
-
**Researched:** [date]
|
|
12
|
-
**Confidence:** [HIGH/MEDIUM/LOW]
|
|
13
|
-
|
|
14
|
-
## Standard Architecture
|
|
15
|
-
|
|
16
|
-
### System Overview
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
20
|
-
│ [Layer Name] │
|
|
21
|
-
├─────────────────────────────────────────────────────────────┤
|
|
22
|
-
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
23
|
-
│ │ [Comp] │ │ [Comp] │ │ [Comp] │ │ [Comp] │ │
|
|
24
|
-
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
25
|
-
│ │ │ │ │ │
|
|
26
|
-
├───────┴────────────┴────────────┴────────────┴──────────────┤
|
|
27
|
-
│ [Layer Name] │
|
|
28
|
-
├─────────────────────────────────────────────────────────────┤
|
|
29
|
-
│ ┌─────────────────────────────────────────────────────┐ │
|
|
30
|
-
│ │ [Component] │ │
|
|
31
|
-
│ └─────────────────────────────────────────────────────┘ │
|
|
32
|
-
├─────────────────────────────────────────────────────────────┤
|
|
33
|
-
│ [Layer Name] │
|
|
34
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
|
35
|
-
│ │ [Store] │ │ [Store] │ │ [Store] │ │
|
|
36
|
-
│ └──────────┘ └──────────┘ └──────────┘ │
|
|
37
|
-
└─────────────────────────────────────────────────────────────┘
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Component Responsibilities
|
|
41
|
-
|
|
42
|
-
| Component | Responsibility | Typical Implementation |
|
|
43
|
-
|-----------|----------------|------------------------|
|
|
44
|
-
| [name] | [what it owns] | [how it's usually built] |
|
|
45
|
-
| [name] | [what it owns] | [how it's usually built] |
|
|
46
|
-
| [name] | [what it owns] | [how it's usually built] |
|
|
47
|
-
|
|
48
|
-
## Recommended Project Structure
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
src/
|
|
52
|
-
├── [folder]/ # [purpose]
|
|
53
|
-
│ ├── [subfolder]/ # [purpose]
|
|
54
|
-
│ └── [file].ts # [purpose]
|
|
55
|
-
├── [folder]/ # [purpose]
|
|
56
|
-
│ ├── [subfolder]/ # [purpose]
|
|
57
|
-
│ └── [file].ts # [purpose]
|
|
58
|
-
├── [folder]/ # [purpose]
|
|
59
|
-
└── [folder]/ # [purpose]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Structure Rationale
|
|
63
|
-
|
|
64
|
-
- **[folder]/:** [why organized this way]
|
|
65
|
-
- **[folder]/:** [why organized this way]
|
|
66
|
-
|
|
67
|
-
## Architectural Patterns
|
|
68
|
-
|
|
69
|
-
### Pattern 1: [Pattern Name]
|
|
70
|
-
|
|
71
|
-
**What:** [description]
|
|
72
|
-
**When to use:** [conditions]
|
|
73
|
-
**Trade-offs:** [pros and cons]
|
|
74
|
-
|
|
75
|
-
**Example:**
|
|
76
|
-
```typescript
|
|
77
|
-
// [Brief code example showing the pattern]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Pattern 2: [Pattern Name]
|
|
81
|
-
|
|
82
|
-
**What:** [description]
|
|
83
|
-
**When to use:** [conditions]
|
|
84
|
-
**Trade-offs:** [pros and cons]
|
|
85
|
-
|
|
86
|
-
**Example:**
|
|
87
|
-
```typescript
|
|
88
|
-
// [Brief code example showing the pattern]
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Pattern 3: [Pattern Name]
|
|
92
|
-
|
|
93
|
-
**What:** [description]
|
|
94
|
-
**When to use:** [conditions]
|
|
95
|
-
**Trade-offs:** [pros and cons]
|
|
96
|
-
|
|
97
|
-
## Data Flow
|
|
98
|
-
|
|
99
|
-
### Request Flow
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
[User Action]
|
|
103
|
-
↓
|
|
104
|
-
[Component] → [Handler] → [Service] → [Data Store]
|
|
105
|
-
↓ ↓ ↓ ↓
|
|
106
|
-
[Response] ← [Transform] ← [Query] ← [Database]
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### State Management
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
[State Store]
|
|
113
|
-
↓ (subscribe)
|
|
114
|
-
[Components] ←→ [Actions] → [Reducers/Mutations] → [State Store]
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Key Data Flows
|
|
118
|
-
|
|
119
|
-
1. **[Flow name]:** [description of how data moves]
|
|
120
|
-
2. **[Flow name]:** [description of how data moves]
|
|
121
|
-
|
|
122
|
-
## Scaling Considerations
|
|
123
|
-
|
|
124
|
-
| Scale | Architecture Adjustments |
|
|
125
|
-
|-------|--------------------------|
|
|
126
|
-
| 0-1k users | [approach — usually monolith is fine] |
|
|
127
|
-
| 1k-100k users | [approach — what to optimize first] |
|
|
128
|
-
| 100k+ users | [approach — when to consider splitting] |
|
|
129
|
-
|
|
130
|
-
### Scaling Priorities
|
|
131
|
-
|
|
132
|
-
1. **First bottleneck:** [what breaks first, how to fix]
|
|
133
|
-
2. **Second bottleneck:** [what breaks next, how to fix]
|
|
134
|
-
|
|
135
|
-
## Anti-Patterns
|
|
136
|
-
|
|
137
|
-
### Anti-Pattern 1: [Name]
|
|
138
|
-
|
|
139
|
-
**What people do:** [the mistake]
|
|
140
|
-
**Why it's wrong:** [the problem it causes]
|
|
141
|
-
**Do this instead:** [the correct approach]
|
|
142
|
-
|
|
143
|
-
### Anti-Pattern 2: [Name]
|
|
144
|
-
|
|
145
|
-
**What people do:** [the mistake]
|
|
146
|
-
**Why it's wrong:** [the problem it causes]
|
|
147
|
-
**Do this instead:** [the correct approach]
|
|
148
|
-
|
|
149
|
-
## Integration Points
|
|
150
|
-
|
|
151
|
-
### External Services
|
|
152
|
-
|
|
153
|
-
| Service | Integration Pattern | Notes |
|
|
154
|
-
|---------|---------------------|-------|
|
|
155
|
-
| [service] | [how to connect] | [gotchas] |
|
|
156
|
-
| [service] | [how to connect] | [gotchas] |
|
|
157
|
-
|
|
158
|
-
### Internal Boundaries
|
|
159
|
-
|
|
160
|
-
| Boundary | Communication | Notes |
|
|
161
|
-
|----------|---------------|-------|
|
|
162
|
-
| [module A ↔ module B] | [API/events/direct] | [considerations] |
|
|
163
|
-
|
|
164
|
-
## Claims
|
|
165
|
-
|
|
166
|
-
| Claim | Type | Source | Checked |
|
|
167
|
-
|-------|------|--------|---------|
|
|
168
|
-
| [what is true] | [version / api / pricing / security / practice / general] | [URL, doc section or Context7 id] | [YYYY-MM-DD] |
|
|
169
|
-
|
|
170
|
-
## Sources
|
|
171
|
-
|
|
172
|
-
- [Architecture references]
|
|
173
|
-
- [Official documentation]
|
|
174
|
-
- [Case studies]
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
*Architecture research for: [domain]*
|
|
178
|
-
*Researched: [date]*
|
|
179
|
-
~~~
|
|
180
|
-
|
|
181
|
-
</template>
|
|
182
|
-
|
|
183
|
-
<guidelines>
|
|
184
|
-
|
|
185
|
-
**System Overview:**
|
|
186
|
-
- Use ASCII box-drawing diagrams for clarity (├── └── │ ─ for structure visualization only)
|
|
187
|
-
- Show major components and their relationships
|
|
188
|
-
- Don't over-detail — this is conceptual, not implementation
|
|
189
|
-
|
|
190
|
-
**Project Structure:**
|
|
191
|
-
- Be specific about folder organization
|
|
192
|
-
- Explain the rationale for grouping
|
|
193
|
-
- Match conventions of the chosen stack
|
|
194
|
-
|
|
195
|
-
**Patterns:**
|
|
196
|
-
- Include code examples where helpful
|
|
197
|
-
- Explain trade-offs honestly
|
|
198
|
-
- Note when patterns are overkill for small projects
|
|
199
|
-
|
|
200
|
-
**Scaling Considerations:**
|
|
201
|
-
- Be realistic — most projects don't need to scale to millions
|
|
202
|
-
- Focus on "what breaks first" not theoretical limits
|
|
203
|
-
- Avoid premature optimization recommendations
|
|
204
|
-
|
|
205
|
-
**Anti-Patterns:**
|
|
206
|
-
- Specific to this domain
|
|
207
|
-
- Include what to do instead
|
|
208
|
-
- Helps prevent common mistakes during implementation
|
|
209
|
-
|
|
210
|
-
</guidelines>
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Features Research Template
|
|
2
|
-
|
|
3
|
-
Template for `.planning/research/features.md` — feature landscape for the project domain.
|
|
4
|
-
|
|
5
|
-
<template>
|
|
6
|
-
|
|
7
|
-
```markdown
|
|
8
|
-
# Feature Research
|
|
9
|
-
|
|
10
|
-
**Domain:** [domain type]
|
|
11
|
-
**Researched:** [date]
|
|
12
|
-
**Confidence:** [HIGH/MEDIUM/LOW]
|
|
13
|
-
|
|
14
|
-
## Feature Landscape
|
|
15
|
-
|
|
16
|
-
### Table Stakes (Users Expect These)
|
|
17
|
-
|
|
18
|
-
Features users assume exist. Missing these = product feels incomplete.
|
|
19
|
-
|
|
20
|
-
| Feature | Why Expected | Complexity | Notes |
|
|
21
|
-
|---------|--------------|------------|-------|
|
|
22
|
-
| [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
23
|
-
| [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
24
|
-
| [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
25
|
-
|
|
26
|
-
### Differentiators (Competitive Advantage)
|
|
27
|
-
|
|
28
|
-
Features that set the product apart. Not required, but valuable.
|
|
29
|
-
|
|
30
|
-
| Feature | Value Proposition | Complexity | Notes |
|
|
31
|
-
|---------|-------------------|------------|-------|
|
|
32
|
-
| [feature] | [why it matters] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
33
|
-
| [feature] | [why it matters] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
34
|
-
| [feature] | [why it matters] | LOW/MEDIUM/HIGH | [implementation notes] |
|
|
35
|
-
|
|
36
|
-
### Anti-Features (Commonly Requested, Often Problematic)
|
|
37
|
-
|
|
38
|
-
Features that seem good but create problems.
|
|
39
|
-
|
|
40
|
-
| Feature | Why Requested | Why Problematic | Alternative |
|
|
41
|
-
|---------|---------------|-----------------|-------------|
|
|
42
|
-
| [feature] | [surface appeal] | [actual problems] | [better approach] |
|
|
43
|
-
| [feature] | [surface appeal] | [actual problems] | [better approach] |
|
|
44
|
-
|
|
45
|
-
## Feature Dependencies
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
[Feature A]
|
|
49
|
-
└──requires──> [Feature B]
|
|
50
|
-
└──requires──> [Feature C]
|
|
51
|
-
|
|
52
|
-
[Feature D] ──enhances──> [Feature A]
|
|
53
|
-
|
|
54
|
-
[Feature E] ──conflicts──> [Feature F]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Dependency Notes
|
|
58
|
-
|
|
59
|
-
- **[Feature A] requires [Feature B]:** [why the dependency exists]
|
|
60
|
-
- **[Feature D] enhances [Feature A]:** [how they work together]
|
|
61
|
-
- **[Feature E] conflicts with [Feature F]:** [why they're incompatible]
|
|
62
|
-
|
|
63
|
-
## MVP Definition
|
|
64
|
-
|
|
65
|
-
### Launch With (v1)
|
|
66
|
-
|
|
67
|
-
Minimum viable product — what's needed to validate the concept.
|
|
68
|
-
|
|
69
|
-
- [ ] [Feature] — [why essential]
|
|
70
|
-
- [ ] [Feature] — [why essential]
|
|
71
|
-
- [ ] [Feature] — [why essential]
|
|
72
|
-
|
|
73
|
-
### Add After Validation (v1.x)
|
|
74
|
-
|
|
75
|
-
Features to add once core is working.
|
|
76
|
-
|
|
77
|
-
- [ ] [Feature] — [trigger for adding]
|
|
78
|
-
- [ ] [Feature] — [trigger for adding]
|
|
79
|
-
|
|
80
|
-
### Future Consideration (v2+)
|
|
81
|
-
|
|
82
|
-
Features to defer until product-market fit is established.
|
|
83
|
-
|
|
84
|
-
- [ ] [Feature] — [why defer]
|
|
85
|
-
- [ ] [Feature] — [why defer]
|
|
86
|
-
|
|
87
|
-
## Feature Prioritization Matrix
|
|
88
|
-
|
|
89
|
-
| Feature | User Value | Implementation Cost | Priority |
|
|
90
|
-
|---------|------------|---------------------|----------|
|
|
91
|
-
| [feature] | HIGH/MEDIUM/LOW | HIGH/MEDIUM/LOW | P1/P2/P3 |
|
|
92
|
-
| [feature] | HIGH/MEDIUM/LOW | HIGH/MEDIUM/LOW | P1/P2/P3 |
|
|
93
|
-
| [feature] | HIGH/MEDIUM/LOW | HIGH/MEDIUM/LOW | P1/P2/P3 |
|
|
94
|
-
|
|
95
|
-
**Priority key:**
|
|
96
|
-
- P1: Must have for launch
|
|
97
|
-
- P2: Should have, add when possible
|
|
98
|
-
- P3: Nice to have, future consideration
|
|
99
|
-
|
|
100
|
-
## Competitor Feature Analysis
|
|
101
|
-
|
|
102
|
-
| Feature | Competitor A | Competitor B | Our Approach |
|
|
103
|
-
|---------|--------------|--------------|--------------|
|
|
104
|
-
| [feature] | [how they do it] | [how they do it] | [our plan] |
|
|
105
|
-
| [feature] | [how they do it] | [how they do it] | [our plan] |
|
|
106
|
-
|
|
107
|
-
## Claims
|
|
108
|
-
|
|
109
|
-
| Claim | Type | Source | Checked |
|
|
110
|
-
|-------|------|--------|---------|
|
|
111
|
-
| [what is true] | [version / api / pricing / security / practice / general] | [URL, doc section or Context7 id] | [YYYY-MM-DD] |
|
|
112
|
-
|
|
113
|
-
## Sources
|
|
114
|
-
|
|
115
|
-
- [Competitor products analyzed]
|
|
116
|
-
- [User research or feedback sources]
|
|
117
|
-
- [Industry standards referenced]
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
*Feature research for: [domain]*
|
|
121
|
-
*Researched: [date]*
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<guidelines>
|
|
127
|
-
|
|
128
|
-
**Table Stakes:**
|
|
129
|
-
- These are non-negotiable for launch
|
|
130
|
-
- Users don't give credit for having them, but penalize for missing them
|
|
131
|
-
- Example: A community platform without user profiles is broken
|
|
132
|
-
|
|
133
|
-
**Differentiators:**
|
|
134
|
-
- These are where you compete
|
|
135
|
-
- Should align with the Core Value from project.md
|
|
136
|
-
- Don't try to differentiate on everything
|
|
137
|
-
|
|
138
|
-
**Anti-Features:**
|
|
139
|
-
- Prevent scope creep by documenting what seems good but isn't
|
|
140
|
-
- Include the alternative approach
|
|
141
|
-
- Example: "Real-time everything" often creates complexity without value
|
|
142
|
-
|
|
143
|
-
**Feature Dependencies:**
|
|
144
|
-
- Critical for roadmap phase ordering
|
|
145
|
-
- If A requires B, B must be in an earlier phase
|
|
146
|
-
- Conflicts inform what NOT to combine in same phase
|
|
147
|
-
|
|
148
|
-
**MVP Definition:**
|
|
149
|
-
- Be ruthless about what's truly minimum
|
|
150
|
-
- "Nice to have" is not MVP
|
|
151
|
-
- Launch with less, validate, then expand
|
|
152
|
-
|
|
153
|
-
</guidelines>
|