pan-wizard 3.35.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 +46 -52
- 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 +2 -3
- package/agents/pan-document_code.md +1 -2
- package/agents/pan-executor.md +25 -0
- package/agents/pan-hardener.md +4 -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 +80 -475
- package/agents/pan-plan-checker.md +40 -3
- package/agents/pan-planner.md +21 -7
- package/agents/pan-previewer.md +3 -2
- package/agents/pan-project-researcher.md +72 -493
- package/agents/pan-release.md +1 -1
- package/agents/pan-reviewer.md +14 -3
- package/agents/pan-roadmapper.md +12 -7
- package/agents/pan-verifier.md +9 -4
- 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/cost.md +21 -1
- 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/preview.md +1 -1
- 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 +41 -5
- package/pan-wizard-core/bin/lib/constants.cjs +27 -1
- package/pan-wizard-core/bin/lib/core.cjs +31 -14
- package/pan-wizard-core/bin/lib/cost.cjs +160 -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/doc-lint.cjs +5 -3
- package/pan-wizard-core/bin/lib/failure-class.cjs +81 -0
- package/pan-wizard-core/bin/lib/findings.cjs +148 -9
- package/pan-wizard-core/bin/lib/focus.cjs +1 -1
- package/pan-wizard-core/bin/lib/git.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 +268 -0
- 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-gate.cjs +15 -9
- package/pan-wizard-core/bin/lib/phase-remove.cjs +91 -11
- package/pan-wizard-core/bin/lib/phase.cjs +85 -13
- package/pan-wizard-core/bin/lib/plan-lint.cjs +310 -0
- package/pan-wizard-core/bin/lib/preview.cjs +26 -4
- package/pan-wizard-core/bin/lib/requirements-lint.cjs +130 -0
- package/pan-wizard-core/bin/lib/research-lint.cjs +268 -0
- 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/roadmap.cjs +1 -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/test-gate.cjs +433 -0
- package/pan-wizard-core/bin/lib/uat.cjs +149 -0
- package/pan-wizard-core/bin/lib/usage.cjs +104 -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 +174 -0
- package/pan-wizard-core/bin/lib/verify-retro.cjs +3 -2
- package/pan-wizard-core/bin/lib/verify-scope.cjs +143 -2
- package/pan-wizard-core/bin/lib/verify.cjs +86 -31
- package/pan-wizard-core/bin/lib/worktree.cjs +70 -0
- package/pan-wizard-core/bin/pan-tools.cjs +257 -28
- package/pan-wizard-core/learnings/universal/autonomous-loop.md +2 -2
- package/pan-wizard-core/mcp/orchestrator.cjs +4 -1
- package/pan-wizard-core/references/continuation-format.md +3 -3
- package/pan-wizard-core/references/design-methodology.md +1 -1
- package/pan-wizard-core/references/guardrails.md +1 -1
- package/pan-wizard-core/references/handoff-decisions.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 +10 -2
- package/pan-wizard-core/templates/debug.md +1 -0
- package/pan-wizard-core/templates/design.md +5 -4
- package/pan-wizard-core/templates/discovery.md +2 -2
- package/pan-wizard-core/templates/phase-prompt.md +7 -0
- package/pan-wizard-core/templates/requirements.md +9 -0
- package/pan-wizard-core/templates/research.md +10 -0
- package/pan-wizard-core/templates/summary-complex.md +5 -1
- package/pan-wizard-core/templates/summary-minimal.md +4 -0
- package/pan-wizard-core/templates/summary-standard.md +5 -1
- package/pan-wizard-core/templates/summary.md +8 -1
- 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 +79 -15
- package/pan-wizard-core/workflows/execute-plan.md +3 -1
- 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 +114 -77
- 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 +106 -45
- 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/remove-phase.md +11 -1
- 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 +33 -19
- 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 +39 -46
- package/scripts/build-agent-plugin.js +35 -15
- package/scripts/build-help.cjs +106 -0
- 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/mutation-probe.cjs +7 -80
- 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 +175 -6
- 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 -204
- package/pan-wizard-core/templates/research-project/features.md +0 -147
- package/pan-wizard-core/templates/research-project/pitfalls.md +0 -200
- package/pan-wizard-core/templates/research-project/stack.md +0 -120
- package/pan-wizard-core/templates/research-project/summary.md +0 -170
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
# Feature Specification: Standards Integration for PAN Wizard
|
|
2
|
+
|
|
3
|
+
**Author:** featureAI Pipeline
|
|
4
|
+
**Date:** 2026-03-02
|
|
5
|
+
**Mode:** `--full` (10-phase investigation)
|
|
6
|
+
**Status:** Proposed
|
|
7
|
+
**ADR:** ADR-0010-standards-integration
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Phase 0: Problem Framing & Demand Validation
|
|
12
|
+
|
|
13
|
+
### 0.1 Problem Statement
|
|
14
|
+
|
|
15
|
+
PAN Wizard orchestrates AI-assisted development across 5 runtimes, but has no systematic way for users to select, configure, and enforce industry standards (OWASP, NIST, WCAG, ISO 25010, etc.) throughout their workflow. Today, standards knowledge is baked into PAN's own code (STRIDE-lite in focus-design, Nyquist in VALIDATION.md, TOGAF in map-codebase) but users cannot configure which standards apply to *their* project or verify compliance against them. As AI-generated code increasingly introduces security vulnerabilities (~25-45% of AI-generated code contains flaws per 2025-2026 research), the cost of not providing standards guidance is shipping insecure, inaccessible, or non-compliant software.
|
|
16
|
+
|
|
17
|
+
### 0.2 Demand Evidence
|
|
18
|
+
|
|
19
|
+
| Evidence Type | Source | Finding |
|
|
20
|
+
|--------------|--------|---------|
|
|
21
|
+
| Research data | Multiple 2025-2026 studies | 24.7-45% of AI-generated code has security flaws; 2.74x more vulnerabilities in AI-assisted PRs |
|
|
22
|
+
| Competitor response | Secure Code Warrior | Released open-source AI Security Rules for 6 tools (June 2025) |
|
|
23
|
+
| Industry standards body | OWASP | Published 3 new AI-specific standards: LLM Top 10 (2025), Agentic Top 10 (2026), AI Testing Guide (2025) |
|
|
24
|
+
| Industry standards body | OpenSSF | Published Security-Focused Guide for AI Code Assistant Instructions (Sep 2025) |
|
|
25
|
+
| Industry standards body | NIST | Finalized SP 800-218A for generative AI secure development |
|
|
26
|
+
| Personal pain (user-stated) | This conversation | "Consider adding standards to the processes or selection of standards, how would we do this, like OWASP for security for example" |
|
|
27
|
+
| Market trend | "Vibe coding" discourse | Black Duck, Palo Alto Networks, Dark Reading all published security analyses; consensus: treat AI-generated code as untrusted |
|
|
28
|
+
|
|
29
|
+
**Verdict:** Strong demand. The entire industry is converging on this need.
|
|
30
|
+
|
|
31
|
+
### 0.3 Scope Definition
|
|
32
|
+
|
|
33
|
+
| In Scope | Out of Scope (and why) |
|
|
34
|
+
|----------|------------------------|
|
|
35
|
+
| Standards selection during `/pan:new-project` and `/pan:settings` | Running SAST/DAST tools (that's SonarQube/Semgrep's job, not PAN's) |
|
|
36
|
+
| Standards registry in `.planning/standards.md` | Certifying compliance (PAN guides, it doesn't certify) |
|
|
37
|
+
| Standards-aware context injection into agents (planner, executor, verifier) | Custom standard authoring (use predefined catalogs) |
|
|
38
|
+
| Standards compliance checking via `/pan:health --standards` | Automated code scanning (delegated to external tools) |
|
|
39
|
+
| Standards reporting in verification output | Legal compliance advice |
|
|
40
|
+
| Built-in catalog of 8-12 well-known standards | Exhaustive coverage of all industry standards |
|
|
41
|
+
| Project-type-based standard recommendations | Per-file or per-line standard annotations |
|
|
42
|
+
|
|
43
|
+
### 0.4 Success Criteria
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
SC-1: User can select applicable standards during /pan:new-project or /pan:settings with a single interaction
|
|
47
|
+
SC-2: Selected standards appear as context in planner, executor, and verifier agent prompts
|
|
48
|
+
SC-3: /pan:health --standards reports compliance status for each selected standard
|
|
49
|
+
SC-4: Feature works across all 5 supported runtimes
|
|
50
|
+
SC-5: Zero new runtime dependencies
|
|
51
|
+
SC-6: No regression in existing 1065 tests
|
|
52
|
+
SC-7: Standards selection adds < 200ms to any command execution
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 0.5 User Stories
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
As a developer building a web application with PAN Wizard, I want to select OWASP Top 10
|
|
59
|
+
as an applicable standard during project setup, so that every plan and verification
|
|
60
|
+
includes security checks, instead of manually reminding Claude about security every session.
|
|
61
|
+
|
|
62
|
+
As a team lead responsible for WCAG compliance, I want PAN's verifier to check accessibility
|
|
63
|
+
requirements against my selected standard, so that accessibility isn't forgotten during
|
|
64
|
+
AI-assisted development, instead of running a separate audit after shipping.
|
|
65
|
+
|
|
66
|
+
As a startup founder preparing for SOC 2, I want PAN to track which standards my project
|
|
67
|
+
follows and report compliance gaps, so that I can demonstrate due diligence to auditors,
|
|
68
|
+
instead of retroactively documenting security practices.
|
|
69
|
+
|
|
70
|
+
As a developer working on an AI/LLM application, I want PAN to recommend OWASP LLM Top 10
|
|
71
|
+
based on my project type, so that I get relevant standards without needing to know the full
|
|
72
|
+
catalog, instead of searching for which standards apply to my use case.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 0.6 Cannibalization Check
|
|
76
|
+
|
|
77
|
+
| Existing Command/Agent | Overlap? | Impact |
|
|
78
|
+
|-----------------------|----------|--------|
|
|
79
|
+
| `/pan:focus-design` Phase 7 (Security) | Partial | Standards integration formalizes what focus-design does ad-hoc; focus-design becomes a consumer of the standards registry |
|
|
80
|
+
| `/pan:health` | Partial | Health extends to include `--standards` flag; existing checks unchanged |
|
|
81
|
+
| `pan-verifier` agent | Partial | Verifier gains standards-aware checklist injection; existing verification unchanged |
|
|
82
|
+
| `pan-plan-checker` agent | Partial | Plan-checker can validate plans reference applicable standards; existing 8 dimensions unchanged |
|
|
83
|
+
| `/pan:settings` | Partial | Settings gains standards selection UI; existing config unchanged |
|
|
84
|
+
|
|
85
|
+
**No full overlap.** This is a cross-cutting enhancement that enriches existing commands, not a replacement.
|
|
86
|
+
|
|
87
|
+
### 0.7 Cognitive Load Assessment
|
|
88
|
+
|
|
89
|
+
| Metric | Before | After | Delta |
|
|
90
|
+
|--------|--------|-------|-------|
|
|
91
|
+
| Commands a new user must learn | 37 | 37 | +0 (no new commands) |
|
|
92
|
+
| New concepts introduced | 0 | 1 (standards selection) | +1 |
|
|
93
|
+
| Score | — | — | neutral (0) — enhances existing commands, no new invocations to learn |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Phase 1: Internal Reconnaissance
|
|
98
|
+
|
|
99
|
+
### 1.1 Existing Capabilities Inventory
|
|
100
|
+
|
|
101
|
+
| Capability | Status | Location | Relevance |
|
|
102
|
+
|------------|--------|----------|-----------|
|
|
103
|
+
| STRIDE-lite threat model | Active | `focus-design.md` Phase 7 | Becomes consumer of standards registry |
|
|
104
|
+
| Nyquist test sampling | Active | `templates/VALIDATION.md` | Test standard already formalized |
|
|
105
|
+
| TOGAF architecture mapping | Active | `pan-document_code.md`, ADR-0008 | Architecture standard already used |
|
|
106
|
+
| Conventional commits | Active | `commit --type` flag | Commit standard enforced |
|
|
107
|
+
| Semver versioning | Active | `package.json`, ADR-0007 | Versioning standard followed |
|
|
108
|
+
| Keep a Changelog | Active | `CHANGELOG.md` | Documentation standard followed |
|
|
109
|
+
| 4-level verification | Active | `pan-verifier.md` | Exists/Substantive/Wired/Functional |
|
|
110
|
+
| 8-dimension plan check | Active | `pan-plan-checker.md` | Quality gate before execution |
|
|
111
|
+
| Health check system | Active | `verify.cjs` (E001-E007, W001-W007) | Infrastructure for standards checks |
|
|
112
|
+
| Commit safety checks | Active | `core.cjs` | OWASP-like secret detection |
|
|
113
|
+
| Path safety protocol | Active | `focus-design.md` Phase 7.2 | Input validation standard |
|
|
114
|
+
| Requirements traceability | Active | `templates/requirements.md` | REQ-ID tracking |
|
|
115
|
+
| Config system | Active | `config.cjs` + `.planning/config.json` | Extension point for standards config |
|
|
116
|
+
| Error patterns | Active | `.planning/patterns.md` | Cross-session learning |
|
|
117
|
+
|
|
118
|
+
### 1.2 Key Integration Points
|
|
119
|
+
|
|
120
|
+
| Search Target | Location | Relevant Pattern |
|
|
121
|
+
|---------------|----------|------------------|
|
|
122
|
+
| Config loading | `config.cjs` | `loadConfig()` returns sections, `cmdConfigEnsureSection()` merges defaults |
|
|
123
|
+
| Health checks | `verify.cjs` | `cmdValidateHealth()` with E/W/I prefixed checks, repair support |
|
|
124
|
+
| Agent context | `workflows/*.md` | Agents read `.planning/` files; standards file would be auto-loaded |
|
|
125
|
+
| Verifier prompt | `agents/pan-verifier.md` | Could inject standards checklist section |
|
|
126
|
+
| Plan-checker prompt | `agents/pan-plan-checker.md` | Could add 9th dimension: standards compliance |
|
|
127
|
+
| Settings command | `commands/pan/settings.md` | Interactive config; add standards section |
|
|
128
|
+
| New-project flow | `commands/pan/new-project.md` | Project setup; add standards selection step |
|
|
129
|
+
| Init module | `init.cjs` | Phase initialization loads context files |
|
|
130
|
+
| Focus-design | `commands/pan/focus-design.md` | Phase 7 security; reference standards registry |
|
|
131
|
+
|
|
132
|
+
### 1.3 Convention Enforcement Checklist
|
|
133
|
+
|
|
134
|
+
- [x] Function naming: `cmd*` for CLI entry points, `check*` for validators
|
|
135
|
+
- [x] Safe read pattern: `safeReadFile()` from `core.cjs`
|
|
136
|
+
- [x] File writes: try-catch wrapped
|
|
137
|
+
- [x] JSON output: via `output()` from `core.cjs`
|
|
138
|
+
- [x] Errors: via `error()` from `core.cjs`
|
|
139
|
+
- [x] Path normalization: `toPosix()` from `utils.cjs`
|
|
140
|
+
- [x] Module exports at bottom
|
|
141
|
+
- [x] Subcommand routing via dispatcher pattern
|
|
142
|
+
- [x] CommonJS `.cjs` format
|
|
143
|
+
- [x] Zero runtime dependencies
|
|
144
|
+
|
|
145
|
+
### 1.4 Dependency & Integration Map
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
[Standards Integration]
|
|
149
|
+
├── depends on: config.cjs (loadConfig, cmdConfigEnsureSection)
|
|
150
|
+
├── depends on: core.cjs (safeReadFile, output, error)
|
|
151
|
+
├── depends on: constants.cjs (new STANDARDS_FILE constant)
|
|
152
|
+
├── depends on: verify.cjs (extends health checks)
|
|
153
|
+
├── extends: /pan:settings (standards selection)
|
|
154
|
+
├── extends: /pan:new-project (standards recommendation)
|
|
155
|
+
├── extends: /pan:health (--standards flag)
|
|
156
|
+
├── extends: pan-verifier (standards checklist injection)
|
|
157
|
+
├── extends: pan-plan-checker (9th dimension)
|
|
158
|
+
├── conflicts with: nothing
|
|
159
|
+
└── enables: future compliance reporting, CI/CD integration
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
No circular dependencies introduced. Standards data flows one direction: config → registry file → agent context.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Phase 2: Competitive Intelligence
|
|
167
|
+
|
|
168
|
+
### 2.1 How Competitor Tools Handle Standards
|
|
169
|
+
|
|
170
|
+
| Tool | Standards Approach | Mechanism | Strengths | Weaknesses |
|
|
171
|
+
|------|-------------------|-----------|-----------|------------|
|
|
172
|
+
| **Cursor** | `.cursorrules` instruction files | Static MDC files with OWASP/ASVS rules (community: Van-LLM-Crew, matank001) | Rich ecosystem of community rules | No built-in catalog; user must find/curate rules |
|
|
173
|
+
| **GitHub Copilot** | `.github/copilot-instructions.md` + native pattern blocking | Built-in insecure pattern detection + instruction file | Only tool with native blocking | Narrow pattern coverage; ~39% of generated code still has flaws |
|
|
174
|
+
| **Cline** | `.clinerules` instruction files | Static rule files | Flexible, community-driven | No standard selection; user must write rules |
|
|
175
|
+
| **Aider** | `.aider.conf.yml` conventions | Config-based instructions | Simple, straightforward | No standards awareness at all |
|
|
176
|
+
| **Windsurf** | Cascade rules | Workflow-level rules | Context-aware | No standards framework |
|
|
177
|
+
| **Copilot Workspace** | No explicit standards | Task decomposition only | Good planning | No compliance awareness |
|
|
178
|
+
|
|
179
|
+
### 2.2 Industry Tools (Scanning-Focused)
|
|
180
|
+
|
|
181
|
+
| Tool | Standards Mapped | Presentation | Developer UX |
|
|
182
|
+
|------|-----------------|--------------|-------------|
|
|
183
|
+
| **SonarQube** | OWASP Top 10, ASVS, CWE Top 25, PCI DSS, STIG, CASA | Dedicated compliance dashboards, PDF reports | Rules tagged with standard metadata; inline visibility |
|
|
184
|
+
| **Semgrep** | OWASP Top 10, CWE Top 25, OWASP Mobile | 4,000+ rules organized by standard | Registry with language + OWASP category filtering |
|
|
185
|
+
| **Snyk** | SOC 2, ISO 27001, PCI DSS, OWASP Top 10, OWASP SAMM | Compliance dashboard, PR integration | Automated scanning with standard-tagged findings |
|
|
186
|
+
| **CodeQL** | CWE Top 25, OWASP categories, WASC | Queries organized by CWE directory | Findings as GitHub alerts with CWE references |
|
|
187
|
+
|
|
188
|
+
### 2.3 Community Initiatives
|
|
189
|
+
|
|
190
|
+
| Initiative | What It Does | Relevance |
|
|
191
|
+
|-----------|-------------|-----------|
|
|
192
|
+
| **Secure Code Warrior AI Security Rules** | Open-source rules for 6 AI tools (OWASP-mapped) | First cross-tool standard; could be a catalog source |
|
|
193
|
+
| **OpenSSF Security Guide for AI Assistants** | Instruction file template covering input validation, supply chain, secrets | Template we could adopt/reference |
|
|
194
|
+
| **R.A.I.L.G.U.A.R.D** (Cloud Security Alliance) | Cursor-specific secure coding framework | Framework methodology applicable to PAN |
|
|
195
|
+
|
|
196
|
+
### 2.4 Competitive Matrix
|
|
197
|
+
|
|
198
|
+
| Aspect | PAN (Current) | PAN (Proposed) | Cursor | Copilot | SonarQube |
|
|
199
|
+
|--------|--------------|----------------|--------|---------|-----------|
|
|
200
|
+
| Standards catalog | None | 8-12 built-in | Community rules | None | 6+ standards |
|
|
201
|
+
| Project-type recommendations | None | Auto-suggest | None | None | None |
|
|
202
|
+
| Agent context injection | N/A | Standards in every agent | Rules in system prompt | Instructions file | N/A |
|
|
203
|
+
| Compliance reporting | None | health --standards | None | None | PDF dashboards |
|
|
204
|
+
| Cross-tool support | 5 runtimes | 5 runtimes | Cursor only | Copilot only | Any CI/CD |
|
|
205
|
+
| Selection UX | N/A | Interactive in settings | Manual file editing | Manual file editing | Admin console |
|
|
206
|
+
| Planning integration | None | Planner + verifier | None | None | N/A |
|
|
207
|
+
| Verification integration | None | Verifier checklist | None | None | Quality gates |
|
|
208
|
+
|
|
209
|
+
**Gap identified:** No AI coding tool provides *standards selection with planning and verification integration*. They all either do instruction files (static) or scanning (reactive). PAN can be first to provide *proactive standards guidance throughout the workflow*.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Phase 3: Strategic Analysis
|
|
214
|
+
|
|
215
|
+
### 3.1 Blue Ocean Four Actions Framework
|
|
216
|
+
|
|
217
|
+
| Action | Question | Decisions |
|
|
218
|
+
|--------|----------|-----------|
|
|
219
|
+
| **ELIMINATE** | What should we drop? | Eliminate the need to manually write security rules; eliminate "hope-based compliance" where standards are followed only when remembered |
|
|
220
|
+
| **REDUCE** | What should be reduced? | Reduce the friction of standards adoption from "research + write rules + configure CI" to "select from menu during project setup" |
|
|
221
|
+
| **RAISE** | What should be raised? | Raise standards from static instruction files to dynamic context that flows through planning, execution, AND verification |
|
|
222
|
+
| **CREATE** | What should we create? | Create project-type-aware standards recommendations; create verification-integrated compliance reporting; create the first standards-aware AI workflow system |
|
|
223
|
+
|
|
224
|
+
### 3.2 Wardley Evolution Assessment
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Genesis ──── Custom-Built ──── Product ──── Commodity
|
|
228
|
+
^ ^
|
|
229
|
+
| |
|
|
230
|
+
Standards in SAST/DAST
|
|
231
|
+
AI workflows scanning
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
- **Industry position:** Standards in AI coding workflows are at Genesis/Custom-Built. Every team writes their own `.cursorrules`. No product-grade solution exists.
|
|
235
|
+
- **PAN position:** We should be the first Product-grade implementation — a curated catalog with intelligent recommendations.
|
|
236
|
+
- **2-3 year evolution:** Standards integration will become expected in all AI workflow tools. First-mover advantage is real.
|
|
237
|
+
|
|
238
|
+
### 3.3 Strategic Moat Analysis
|
|
239
|
+
|
|
240
|
+
| Moat Type | Contribution | Score (0-5) |
|
|
241
|
+
|-----------|-------------|-------------|
|
|
242
|
+
| **Context Engineering** | Standards as context in every agent — not static rules, dynamic guidance | 5 |
|
|
243
|
+
| **Cross-Platform** | Standards work identically across all 5 runtimes | 4 |
|
|
244
|
+
| **Developer Experience** | Select standards from menu → automatic enforcement throughout workflow | 5 |
|
|
245
|
+
| **Zero Dependencies** | Pure JS standards catalog, no external tools required | 5 |
|
|
246
|
+
| **State Persistence** | standards.md persists across sessions, agents always see it | 4 |
|
|
247
|
+
| **Verification Quality** | Verifier checks actual deliverables against selected standards | 5 |
|
|
248
|
+
| **Total** | | **28/30** |
|
|
249
|
+
|
|
250
|
+
### 3.4 Strategic Recommendation
|
|
251
|
+
|
|
252
|
+
**Yes, build this.** PAN's unique angle is *standards as workflow context* — not scanning code (SonarQube does that) and not writing static rule files (community does that). PAN should be the first tool to make standards selection as easy as choosing a model profile, then automatically flow those standards through every agent interaction: researchers investigate standard-compliant patterns, planners include standard checks in tasks, executors follow standard guidance, and verifiers validate against standard criteria. Do NOT copy the "instruction file" approach (static, forgotten). Do NOT try to build a scanner (wrong tool for the job). Do recommend external scanning tools (Semgrep, SonarQube) in the standards report output. Build now — the "vibe coding" security discourse has created a window of attention.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Phase 3.5: Architecture & Implementation Pattern Assessment
|
|
257
|
+
|
|
258
|
+
### 3.5.1 Feature Type Classification
|
|
259
|
+
|
|
260
|
+
| Type | Applies | Description |
|
|
261
|
+
|------|---------|-------------|
|
|
262
|
+
| **Core Enhancement** | Yes | Add `standards.cjs` module (or extend `config.cjs`) |
|
|
263
|
+
| **New Command** | No | No new commands — extend existing `/pan:settings` and `/pan:health` |
|
|
264
|
+
| **Agent Enhancement** | Yes | Inject standards context into verifier and plan-checker prompts |
|
|
265
|
+
| **Workflow Enhancement** | Yes | `new-project.md` gains standards selection step |
|
|
266
|
+
| **Installer Enhancement** | No | Standards are project-level, not runtime-level |
|
|
267
|
+
| **Template Enhancement** | Yes | New `standards.md` template |
|
|
268
|
+
|
|
269
|
+
### 3.5.2 Layer Violation Check
|
|
270
|
+
|
|
271
|
+
- [x] Command files invoke CLI (`pan-tools standards ...`) — not direct module calls
|
|
272
|
+
- [x] Core module (`config.cjs` or new `standards.cjs`) returns data — no agent imports
|
|
273
|
+
- [x] `output()` only from `cmd*` entry points
|
|
274
|
+
- [x] No upward dependencies
|
|
275
|
+
|
|
276
|
+
### 3.5.3 Output Contract Design
|
|
277
|
+
|
|
278
|
+
**`pan-tools standards list`** — List available standards catalog
|
|
279
|
+
```json
|
|
280
|
+
{
|
|
281
|
+
"standards": [
|
|
282
|
+
{
|
|
283
|
+
"id": "owasp-top10",
|
|
284
|
+
"name": "OWASP Top 10 (2025)",
|
|
285
|
+
"category": "security",
|
|
286
|
+
"description": "Top 10 web application security risks",
|
|
287
|
+
"applicable_to": ["web", "api", "all"],
|
|
288
|
+
"level": "foundational",
|
|
289
|
+
"url": "https://owasp.org/www-project-top-ten/"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"count": 12
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**`pan-tools standards status`** — Report project standards compliance
|
|
297
|
+
```json
|
|
298
|
+
{
|
|
299
|
+
"project_standards": ["owasp-top10", "wcag-22"],
|
|
300
|
+
"checks": [
|
|
301
|
+
{
|
|
302
|
+
"standard_id": "owasp-top10",
|
|
303
|
+
"standard_name": "OWASP Top 10 (2025)",
|
|
304
|
+
"status": "configured",
|
|
305
|
+
"checklist_items": 10,
|
|
306
|
+
"verified_items": 0,
|
|
307
|
+
"coverage": "0%"
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"overall_status": "configured"
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**`pan-tools standards select <id>`** — Add standard to project
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"added": "owasp-top10",
|
|
318
|
+
"project_standards": ["owasp-top10"],
|
|
319
|
+
"standards_file": ".planning/standards.md"
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**`pan-tools standards recommend`** — Recommend standards based on project.md
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"project_type": "web-application",
|
|
327
|
+
"recommendations": [
|
|
328
|
+
{ "id": "owasp-top10", "reason": "Web application detected", "priority": "high" },
|
|
329
|
+
{ "id": "wcag-22", "reason": "User-facing UI detected", "priority": "medium" }
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### 3.5.4 State Transition Modeling
|
|
335
|
+
|
|
336
|
+
| Current State | Action | New State | Error If Invalid |
|
|
337
|
+
|--------------|--------|-----------|-----------------|
|
|
338
|
+
| No standards.md | `standards select owasp-top10` | standards.md created with OWASP section | — |
|
|
339
|
+
| standards.md exists | `standards select wcag-22` | standards.md updated, WCAG section appended | — |
|
|
340
|
+
| standards.md with standard X | `standards remove X` | Section removed from standards.md | "Standard X not in project" |
|
|
341
|
+
| No project.md | `standards recommend` | Error | "project.md required for recommendations" |
|
|
342
|
+
|
|
343
|
+
### 3.5.5 Breaking Change Assessment
|
|
344
|
+
|
|
345
|
+
| Question | Answer |
|
|
346
|
+
|----------|--------|
|
|
347
|
+
| Changes any existing command's output schema? | No — new subcommand output, existing untouched |
|
|
348
|
+
| Changes file formats? | No — adds new optional file (standards.md) |
|
|
349
|
+
| Changes directory structure? | No — standards.md lives in existing `.planning/` |
|
|
350
|
+
| Changes installer output? | No |
|
|
351
|
+
|
|
352
|
+
### 3.5.6 Composability Analysis
|
|
353
|
+
|
|
354
|
+
| Interaction | Works? | How |
|
|
355
|
+
|-------------|--------|-----|
|
|
356
|
+
| Output feeds another command's input | Yes | `standards recommend` feeds `standards select` |
|
|
357
|
+
| Callable from an agent | Yes | Agents call `pan-tools standards status` for context |
|
|
358
|
+
| Usable in a hook pipeline | Yes | Post-execution hook could check `standards status` |
|
|
359
|
+
| Works in --raw mode | Yes | Human-readable table for `standards list` and `standards status` |
|
|
360
|
+
|
|
361
|
+
### 3.5.7 Performance Budget
|
|
362
|
+
|
|
363
|
+
| Operation | Cost | Notes |
|
|
364
|
+
|-----------|------|-------|
|
|
365
|
+
| Load catalog (in-memory JS object) | ~1ms | Static data, no file I/O |
|
|
366
|
+
| Read standards.md | ~5ms | Single file read |
|
|
367
|
+
| Read project.md (for recommendations) | ~5ms | Single file read |
|
|
368
|
+
| Parse standards sections | ~2ms | Regex/string matching |
|
|
369
|
+
| Write standards.md | ~5ms | Single file write |
|
|
370
|
+
| **Total** | **< 20ms** | Well under 500ms budget |
|
|
371
|
+
|
|
372
|
+
### 3.5.8 Cross-Platform Considerations
|
|
373
|
+
|
|
374
|
+
| Platform | Consideration |
|
|
375
|
+
|----------|---------------|
|
|
376
|
+
| Windows | No path issues — standards.md is a single file in .planning/ |
|
|
377
|
+
| Mac/Linux | No issues |
|
|
378
|
+
| All runtimes | Standards catalog is embedded in JS, works everywhere |
|
|
379
|
+
| All runtimes | standards.md is plain Markdown, readable by all AI tools |
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Phase 4: Design Synthesis
|
|
384
|
+
|
|
385
|
+
### 4.1 Guide-Level Explanation
|
|
386
|
+
|
|
387
|
+
**Standards Integration** lets you tell PAN which industry standards your project should follow. Instead of hoping Claude remembers to check for SQL injection or accessibility, you select your standards once and PAN automatically includes them in every planning, execution, and verification step.
|
|
388
|
+
|
|
389
|
+
**Example 1: Web Application Setup**
|
|
390
|
+
```
|
|
391
|
+
/pan:new-project
|
|
392
|
+
...
|
|
393
|
+
> PAN recommends: OWASP Top 10, WCAG 2.2, OWASP ASVS Level 1
|
|
394
|
+
> Select standards to apply: [1] All recommended [2] Choose manually [3] Skip
|
|
395
|
+
```
|
|
396
|
+
Select "All recommended" and every plan will include security and accessibility checks. The verifier will flag if your deliverables skip OWASP requirements.
|
|
397
|
+
|
|
398
|
+
**Example 2: Adding Standards Later**
|
|
399
|
+
```
|
|
400
|
+
/pan:settings
|
|
401
|
+
> Standards: Select project standards
|
|
402
|
+
> Available: OWASP Top 10, WCAG 2.2, NIST SSDF, ISO 25010, ...
|
|
403
|
+
> Currently selected: (none)
|
|
404
|
+
> Add: owasp-top10, wcag-22
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Example 3: Checking Compliance**
|
|
408
|
+
```
|
|
409
|
+
/pan:health --standards
|
|
410
|
+
Standards Compliance Report
|
|
411
|
+
| Standard | Status | Verified | Coverage |
|
|
412
|
+
|----------|--------|----------|----------|
|
|
413
|
+
| OWASP Top 10 | configured | 3/10 | 30% |
|
|
414
|
+
| WCAG 2.2 | configured | 0/4 | 0% |
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
**What it does NOT do:**
|
|
418
|
+
- Does NOT run SAST/DAST scanning (use Semgrep, SonarQube for that)
|
|
419
|
+
- Does NOT certify compliance (PAN guides, it doesn't audit)
|
|
420
|
+
- Does NOT enforce standards as blocking gates (advisory, not mandatory)
|
|
421
|
+
- Does NOT replace dedicated security tools
|
|
422
|
+
|
|
423
|
+
### 4.2 Reference-Level Explanation
|
|
424
|
+
|
|
425
|
+
#### 4.2.1 Command Interface
|
|
426
|
+
|
|
427
|
+
```
|
|
428
|
+
pan-tools standards list [--category <cat>]
|
|
429
|
+
pan-tools standards recommend [--cwd <path>]
|
|
430
|
+
pan-tools standards select <id> [--cwd <path>]
|
|
431
|
+
pan-tools standards remove <id> [--cwd <path>]
|
|
432
|
+
pan-tools standards status [--cwd <path>]
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
All commands support `--raw` for human-readable output.
|
|
436
|
+
|
|
437
|
+
#### 4.2.2 State Changes & Filesystem Scope
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
Reads from:
|
|
441
|
+
.planning/standards.md (standards registry)
|
|
442
|
+
.planning/project.md (for recommend)
|
|
443
|
+
.planning/config.json (standards config section)
|
|
444
|
+
|
|
445
|
+
Writes to:
|
|
446
|
+
.planning/standards.md (select/remove)
|
|
447
|
+
|
|
448
|
+
State mutations: standards.md content
|
|
449
|
+
Side effects: None (no git operations, no directory creation)
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
#### 4.2.3 Error Handling
|
|
453
|
+
|
|
454
|
+
| Condition | JSON Output | Error Style |
|
|
455
|
+
|-----------|-------------|-------------|
|
|
456
|
+
| No .planning/ dir | `{"error": ".planning directory not found"}` | Safe read returns null |
|
|
457
|
+
| Unknown standard ID | `{"error": "Unknown standard: xyz. Run 'standards list' to see available"}` | Arg validation |
|
|
458
|
+
| Standard already selected | `{"error": "owasp-top10 already in project standards"}` | Duplicate check |
|
|
459
|
+
| No project.md for recommend | `{"error": "project.md required for standards recommendations"}` | Missing dependency |
|
|
460
|
+
|
|
461
|
+
### 4.3 Design Decisions
|
|
462
|
+
|
|
463
|
+
| Decision | Adopted From | Rationale | What We Did NOT Copy |
|
|
464
|
+
|----------|-------------|-----------|---------------------|
|
|
465
|
+
| Standards as Markdown file | PAN's own roadmap.md/state.md pattern | Agents read .planning/ files naturally; no special loading needed | Not JSON config (agents prefer markdown context) |
|
|
466
|
+
| Built-in catalog (not user-defined) | SonarQube's curated rule sets | Quality control — each standard has verified checklist items | Not open-ended user rules (Cursor approach — too much friction) |
|
|
467
|
+
| Advisory not blocking | PAN's health check model (W warnings, not E errors) | Standards violations should inform, not break workflow | Not quality gates (SonarQube approach — too rigid for AI workflows) |
|
|
468
|
+
| Project-type recommendations | Snyk's compliance dashboard | Reduces selection friction; users don't need to know the catalog | Not manual-only selection (misses the opportunity to guide) |
|
|
469
|
+
| Context injection via file | PAN's existing context engineering | standards.md in .planning/ is automatically visible to agents | Not prompt modification (would require changing every agent file) |
|
|
470
|
+
|
|
471
|
+
### 4.4 Drawbacks & Alternatives
|
|
472
|
+
|
|
473
|
+
| Decision Point | Chosen | Alternative | Why Not | Drawback |
|
|
474
|
+
|----------------|--------|------------|---------|----------|
|
|
475
|
+
| Storage format | standards.md | config.json section | Agents read markdown naturally; JSON needs parsing in prompts | Slightly more complex to parse programmatically |
|
|
476
|
+
| Catalog location | Embedded in JS module | External JSON file | Zero-dep, no file I/O needed | Catalog updates require code changes |
|
|
477
|
+
| Checklist granularity | Per-standard (10 items for OWASP T10) | Per-item (one line per CWE) | Too granular overwhelms agents; per-standard is right abstraction | Less precise than CWE-level tracking |
|
|
478
|
+
| Integration depth | Context injection + health reporting | Deep agent prompt modification | Minimally invasive; doesn't break existing agent behavior | Standards guidance is suggestive, not enforced |
|
|
479
|
+
|
|
480
|
+
### 4.5 Feature Ladder
|
|
481
|
+
|
|
482
|
+
| Version | Scope | Value Delivered | Effort |
|
|
483
|
+
|---------|-------|----------------|--------|
|
|
484
|
+
| **v0 (MVP)** | Standards catalog, select/remove, standards.md generation, `health --standards` | User can select standards and see compliance status | M (4 pts) |
|
|
485
|
+
| **v1 (Complete)** | Project-type recommendations, agent context injection (verifier + plan-checker), settings integration | Standards automatically flow through entire workflow | L (10 pts) |
|
|
486
|
+
| **v2 (Enhanced)** | Per-phase compliance tracking, verification-integrated checklist, external tool recommendations, focus-design standards auto-reference | Full lifecycle standards governance | L (10 pts) |
|
|
487
|
+
|
|
488
|
+
### 4.6 Adoption Analysis
|
|
489
|
+
|
|
490
|
+
| Question | Answer |
|
|
491
|
+
|----------|--------|
|
|
492
|
+
| How does the user discover this feature? | During `/pan:new-project` (prompted to select standards), or via `/pan:help` which lists standards subcommands |
|
|
493
|
+
| What's the learning curve? | Near-zero — select from a menu, then forget about it. Standards work automatically. |
|
|
494
|
+
| Does it require changing existing workflows? | No — standards are optional and additive. Existing workflows unchanged if no standards selected. |
|
|
495
|
+
| What's the "aha moment"? | When the verifier reports "OWASP A01 (Broken Access Control) not addressed in Phase 3 deliverables" — standards are working for you automatically |
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## Phase 5: Architecture Decision Record
|
|
500
|
+
|
|
501
|
+
See: `docs/decisions/ADR-0010-standards-integration.md`
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Phase 6: Error Handling & Diagnostics Design
|
|
506
|
+
|
|
507
|
+
### 6.1 Failure Mode Analysis
|
|
508
|
+
|
|
509
|
+
| Failure Mode | Category | Detection | Recovery | User Sees |
|
|
510
|
+
|-------------|----------|-----------|----------|-----------|
|
|
511
|
+
| Missing .planning/ directory | User error | safeReadFile returns null | JSON error with hint | "Run /pan:new-project first" |
|
|
512
|
+
| Unknown standard ID | User error | Catalog lookup miss | JSON error listing valid IDs | "Unknown standard: xyz. Run 'standards list'" |
|
|
513
|
+
| Corrupt standards.md | Data corruption | Parse failure in try-catch | Return degraded status, suggest regeneration | "standards.md parse error — run 'standards select' to regenerate" |
|
|
514
|
+
| Duplicate selection | User error | Check before write | JSON error | "owasp-top10 already selected" |
|
|
515
|
+
| standards.md write failure | Environment | try-catch on writeFileSync | JSON error | "Failed to write standards.md" |
|
|
516
|
+
| project.md missing for recommend | Missing dependency | safeReadFile returns null | JSON error | "project.md required for recommendations" |
|
|
517
|
+
|
|
518
|
+
### 6.2 Diagnostic Support
|
|
519
|
+
|
|
520
|
+
| Diagnostic | How | When |
|
|
521
|
+
|------------|-----|------|
|
|
522
|
+
| `--raw` flag | Human-readable table output | Debugging, quick checks |
|
|
523
|
+
| `--verbose` flag | Logs file reads and catalog lookups to stderr | Deep debugging |
|
|
524
|
+
| `standards status` | Full compliance report | Anytime |
|
|
525
|
+
| `health --standards` | Standards as part of overall health | Regular health checks |
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Phase 7: Security & Threat Model
|
|
530
|
+
|
|
531
|
+
### 7.1 Asset & Attack Surface Inventory
|
|
532
|
+
|
|
533
|
+
| Asset | Accessed How | Trust Level |
|
|
534
|
+
|-------|-------------|-------------|
|
|
535
|
+
| `.planning/standards.md` | Read/Write | System-generated, user-editable |
|
|
536
|
+
| `.planning/project.md` | Read only | User-generated |
|
|
537
|
+
| `.planning/config.json` | Read/Write (standards section) | System-generated |
|
|
538
|
+
| Standards catalog (in-memory) | Read only | Hardcoded in module |
|
|
539
|
+
|
|
540
|
+
| Input Vector | Source | Validation Required |
|
|
541
|
+
|-------------|--------|-------------------|
|
|
542
|
+
| Standard ID argument | User-typed CLI | Must match catalog entry exactly |
|
|
543
|
+
| `--category` filter | User-typed CLI | Must match known categories |
|
|
544
|
+
| standards.md content | Disk | Structure validation on parse |
|
|
545
|
+
|
|
546
|
+
### 7.2 Path Safety
|
|
547
|
+
|
|
548
|
+
No user-supplied paths beyond `--cwd`. All file operations within `.planning/` directory. No path traversal risk.
|
|
549
|
+
|
|
550
|
+
### 7.3 Output Sanitization
|
|
551
|
+
|
|
552
|
+
- [x] No absolute filesystem paths in output
|
|
553
|
+
- [x] No environment variable values
|
|
554
|
+
- [x] No stack traces
|
|
555
|
+
- [x] No internal function names
|
|
556
|
+
- [x] Standard URLs are hardcoded constants, not user input
|
|
557
|
+
|
|
558
|
+
### 7.4 Content Validation
|
|
559
|
+
|
|
560
|
+
- standards.md: Parse with section header regex, validate against known standard IDs
|
|
561
|
+
- config.json: Standard JSON.parse() in try-catch (existing pattern in loadConfig)
|
|
562
|
+
- Standard IDs: Strict allowlist validation against catalog
|
|
563
|
+
|
|
564
|
+
### 7.5 Privilege Scope Declaration
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
Reads from: .planning/ (standards.md, project.md, config.json)
|
|
568
|
+
Writes to: .planning/ (standards.md, config.json)
|
|
569
|
+
Executes shell: No
|
|
570
|
+
Reads outside project: No
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## Phase 8: Implementation Roadmap
|
|
576
|
+
|
|
577
|
+
### 8.1 Standards Catalog (Built-in)
|
|
578
|
+
|
|
579
|
+
```javascript
|
|
580
|
+
const STANDARDS_CATALOG = {
|
|
581
|
+
'owasp-top10': {
|
|
582
|
+
name: 'OWASP Top 10 (2025)',
|
|
583
|
+
category: 'security',
|
|
584
|
+
description: 'Top 10 web application security risks',
|
|
585
|
+
applicable_to: ['web', 'api', 'all'],
|
|
586
|
+
level: 'foundational',
|
|
587
|
+
url: 'https://owasp.org/www-project-top-ten/',
|
|
588
|
+
checklist: [
|
|
589
|
+
'A01: Broken Access Control — verify authorization checks on all endpoints',
|
|
590
|
+
'A02: Cryptographic Failures — verify sensitive data encryption at rest and in transit',
|
|
591
|
+
'A03: Injection — verify input validation and parameterized queries',
|
|
592
|
+
'A04: Insecure Design — verify threat modeling and secure design patterns',
|
|
593
|
+
'A05: Security Misconfiguration — verify default credentials removed, headers set',
|
|
594
|
+
'A06: Vulnerable Components — verify dependency scanning, no known CVEs',
|
|
595
|
+
'A07: Authentication Failures — verify MFA, session management, credential storage',
|
|
596
|
+
'A08: Software and Data Integrity — verify CI/CD pipeline integrity, signed updates',
|
|
597
|
+
'A09: Logging and Monitoring — verify security events logged, alerts configured',
|
|
598
|
+
'A10: SSRF — verify server-side request validation, allowlists'
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
'owasp-asvs-l1': { ... },
|
|
602
|
+
'owasp-llm-top10': { ... },
|
|
603
|
+
'wcag-22': { ... },
|
|
604
|
+
'nist-ssdf': { ... },
|
|
605
|
+
'iso-25010': { ... },
|
|
606
|
+
'stride': { ... },
|
|
607
|
+
'cwe-top25': { ... },
|
|
608
|
+
'owasp-agentic-top10': { ... },
|
|
609
|
+
'soc2-dev': { ... },
|
|
610
|
+
'togaf-adm': { ... },
|
|
611
|
+
'conventional-commits': { ... }
|
|
612
|
+
};
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
### 8.2 Implementation Tasks
|
|
616
|
+
|
|
617
|
+
#### Task 1: Add standards constants and catalog to constants.cjs
|
|
618
|
+
Files: `pan-wizard-core/bin/lib/constants.cjs`
|
|
619
|
+
Test: `node --test tests/constants.test.cjs`
|
|
620
|
+
Estimate: S (2 pts)
|
|
621
|
+
Priority: P1
|
|
622
|
+
|
|
623
|
+
Add `STANDARDS_FILE = 'standards.md'`, `STANDARDS_CATALOG` object with 12 standards, category constants, recommendation mappings.
|
|
624
|
+
|
|
625
|
+
#### Task 2: Add standards subcommand handler in config.cjs (or new module)
|
|
626
|
+
Files: `pan-wizard-core/bin/lib/config.cjs`
|
|
627
|
+
Test: `node --test tests/config.test.cjs`
|
|
628
|
+
Estimate: M (4 pts)
|
|
629
|
+
Priority: P1
|
|
630
|
+
|
|
631
|
+
Implement `cmdStandardsList`, `cmdStandardsSelect`, `cmdStandardsRemove`, `cmdStandardsStatus`, `cmdStandardsRecommend`. Each follows existing cmd* pattern.
|
|
632
|
+
|
|
633
|
+
#### Task 3: Add standards.md template
|
|
634
|
+
Files: `pan-wizard-core/templates/standards.md`
|
|
635
|
+
Test: Integration test verifies template rendered correctly
|
|
636
|
+
Estimate: XS (1 pt)
|
|
637
|
+
Priority: P1
|
|
638
|
+
|
|
639
|
+
Markdown template with section headers per selected standard, checklist items, and external tool recommendations.
|
|
640
|
+
|
|
641
|
+
#### Task 4: Add standards routing to pan-tools.cjs dispatcher
|
|
642
|
+
Files: `pan-wizard-core/bin/pan-tools.cjs`
|
|
643
|
+
Test: `node --test tests/commands.test.cjs`
|
|
644
|
+
Estimate: S (2 pts)
|
|
645
|
+
Priority: P1
|
|
646
|
+
|
|
647
|
+
Route `standards list|select|remove|status|recommend` to config.cjs handlers.
|
|
648
|
+
|
|
649
|
+
#### Task 5: Extend health command with --standards flag
|
|
650
|
+
Files: `pan-wizard-core/bin/lib/verify.cjs`
|
|
651
|
+
Test: `node --test tests/verify.test.cjs`
|
|
652
|
+
Estimate: S (2 pts)
|
|
653
|
+
Priority: P2
|
|
654
|
+
|
|
655
|
+
Add `checkStandardsCompliance()` check to health output when `--standards` flag is passed.
|
|
656
|
+
|
|
657
|
+
#### Task 6: Add standards unit tests
|
|
658
|
+
Files: `tests/standards.test.cjs` (new)
|
|
659
|
+
Test: `node --test tests/standards.test.cjs`
|
|
660
|
+
Estimate: M (4 pts)
|
|
661
|
+
Priority: P2
|
|
662
|
+
|
|
663
|
+
Unit tests for catalog lookup, select/remove operations, standards.md generation/parsing, status reporting, recommendation logic.
|
|
664
|
+
|
|
665
|
+
#### Task 7: Add standards integration tests
|
|
666
|
+
Files: `tests/standards.test.cjs`
|
|
667
|
+
Test: `node --test tests/standards.test.cjs`
|
|
668
|
+
Estimate: S (2 pts)
|
|
669
|
+
Priority: P2
|
|
670
|
+
|
|
671
|
+
CLI integration tests via `runPanTools('standards list')`, `runPanTools('standards select owasp-top10')`, etc.
|
|
672
|
+
|
|
673
|
+
#### Task 8: Update agent prompts for standards awareness (v1)
|
|
674
|
+
Files: `agents/pan-verifier.md`, `agents/pan-plan-checker.md`
|
|
675
|
+
Test: Manual verification
|
|
676
|
+
Estimate: S (2 pts)
|
|
677
|
+
Priority: P3
|
|
678
|
+
|
|
679
|
+
Add conditional sections: "If .planning/standards.md exists, verify deliverables against listed standards checklist items."
|
|
680
|
+
|
|
681
|
+
#### Task 9: Update settings command for standards selection (v1)
|
|
682
|
+
Files: `commands/pan/settings.md`
|
|
683
|
+
Test: Manual verification
|
|
684
|
+
Estimate: XS (1 pt)
|
|
685
|
+
Priority: P3
|
|
686
|
+
|
|
687
|
+
Add standards selection option to settings interactive flow.
|
|
688
|
+
|
|
689
|
+
#### Task 10: Update new-project workflow for standards recommendation (v1)
|
|
690
|
+
Files: `pan-wizard-core/workflows/new-project.md`
|
|
691
|
+
Test: Manual verification
|
|
692
|
+
Estimate: XS (1 pt)
|
|
693
|
+
Priority: P3
|
|
694
|
+
|
|
695
|
+
Add step after requirements: "Run `pan-tools standards recommend` and present recommendations to user."
|
|
696
|
+
|
|
697
|
+
#### Task 11: Documentation updates
|
|
698
|
+
Files: `README.md`, `docs/USER-GUIDE.md`, `docs/CLI-REFERENCE.md`, `CHANGELOG.md`
|
|
699
|
+
Test: Focus-sync verification
|
|
700
|
+
Estimate: S (2 pts)
|
|
701
|
+
Priority: P4
|
|
702
|
+
|
|
703
|
+
Document standards subcommands, catalog, and workflow integration.
|
|
704
|
+
|
|
705
|
+
### 8.3 Dependency Graph
|
|
706
|
+
|
|
707
|
+
```
|
|
708
|
+
Task 1 (constants) ──→ Task 2 (handlers) ──→ Task 4 (dispatcher) ──→ Task 6 (unit tests)
|
|
709
|
+
└──→ Task 3 (template) ──→ Task 7 (integration tests)
|
|
710
|
+
Task 4 ──→ Task 5 (health extension)
|
|
711
|
+
Task 2 ──→ Task 8 (agent prompts) [v1]
|
|
712
|
+
Task 4 ──→ Task 9 (settings) [v1]
|
|
713
|
+
Task 4 ──→ Task 10 (new-project) [v1]
|
|
714
|
+
Task 7 ──→ Task 11 (docs)
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
### 8.4 Risk Register
|
|
718
|
+
|
|
719
|
+
| Risk | Probability | Impact | Mitigation |
|
|
720
|
+
|------|------------|--------|------------|
|
|
721
|
+
| Standards catalog becomes stale | Medium | Low | Catalog entries include version + URL; update in minor releases |
|
|
722
|
+
| Agent context overload | Low | Medium | Limit injected context to selected standards only; keep checklists concise (10 items max per standard) |
|
|
723
|
+
| Users confused by advisory-only model | Low | Low | Clear messaging: "PAN guides, external tools scan" |
|
|
724
|
+
| Checklist items too generic to be useful | Medium | Medium | Each item is actionable ("verify X" not "consider Y"); community feedback loop |
|
|
725
|
+
|
|
726
|
+
### 8.5 Cognitive Complexity Budget
|
|
727
|
+
|
|
728
|
+
- `cmdStandardsList`: ~15 lines (filter + map catalog)
|
|
729
|
+
- `cmdStandardsSelect`: ~30 lines (validate + read/write standards.md)
|
|
730
|
+
- `cmdStandardsRemove`: ~25 lines (validate + read/filter/write)
|
|
731
|
+
- `cmdStandardsStatus`: ~35 lines (read + parse + count)
|
|
732
|
+
- `cmdStandardsRecommend`: ~40 lines (read project.md + match patterns + suggest)
|
|
733
|
+
- All under 50-line limit, max 2 nesting levels, max 3 parameters
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
|
|
737
|
+
## Phase 9: Test Plan
|
|
738
|
+
|
|
739
|
+
### 9.1 Test Pyramid
|
|
740
|
+
|
|
741
|
+
| Level | Pattern | Count | What It Catches |
|
|
742
|
+
|-------|---------|-------|-----------------|
|
|
743
|
+
| **Unit** | Test catalog, parsing, selection logic | 8+ | Catalog correctness, ID validation, parse errors |
|
|
744
|
+
| **Integration** | CLI `runPanTools('standards ...')` with real fs | 8+ | Arg routing, JSON output shape, file I/O |
|
|
745
|
+
| **E2E** | Multi-command: select → status → health | 2+ | State transitions, cross-command interaction |
|
|
746
|
+
|
|
747
|
+
### 9.2 Assertion Density
|
|
748
|
+
|
|
749
|
+
**Success tests:**
|
|
750
|
+
- (a) Correct JSON shape (has expected keys)
|
|
751
|
+
- (b) Correct values for >= 2 fields
|
|
752
|
+
- (c) No `error` field
|
|
753
|
+
|
|
754
|
+
**Error tests:**
|
|
755
|
+
- (a) `error` field with actionable message
|
|
756
|
+
- (b) No file corruption (standards.md unchanged on error)
|
|
757
|
+
- (c) Clean exit
|
|
758
|
+
|
|
759
|
+
### 9.3 Boundary Value Analysis
|
|
760
|
+
|
|
761
|
+
- [x] Empty project (no .planning/) — error with hint
|
|
762
|
+
- [x] Project with no standards selected — status returns empty list
|
|
763
|
+
- [x] Select all 12 standards — verify no performance impact
|
|
764
|
+
- [x] Select same standard twice — duplicate error
|
|
765
|
+
- [x] Remove non-existent standard — error
|
|
766
|
+
- [x] Corrupted standards.md — graceful degradation
|
|
767
|
+
- [x] Recommend with minimal project.md — returns generic recommendations
|
|
768
|
+
- [x] Unknown standard ID — error listing valid IDs
|
|
769
|
+
|
|
770
|
+
### 9.4 Regression Verification
|
|
771
|
+
|
|
772
|
+
- [x] Full suite (1065 tests) passes unchanged
|
|
773
|
+
- [x] config.test.cjs still passes (if extending config.cjs)
|
|
774
|
+
- [x] verify.test.cjs still passes (if extending verify.cjs)
|
|
775
|
+
- [x] No existing test expectations changed
|
|
776
|
+
|
|
777
|
+
### 9.5 Performance Validation
|
|
778
|
+
|
|
779
|
+
- [x] `standards list`: < 10ms (in-memory catalog)
|
|
780
|
+
- [x] `standards select`: < 20ms (read + write)
|
|
781
|
+
- [x] `standards status`: < 20ms (read + parse)
|
|
782
|
+
- [x] `standards recommend`: < 30ms (read project.md + match)
|
|
783
|
+
- [x] No regression in full test suite runtime
|
|
784
|
+
|
|
785
|
+
---
|
|
786
|
+
|
|
787
|
+
## Phase 10: Summary
|
|
788
|
+
|
|
789
|
+
### Problem & Evidence
|
|
790
|
+
AI-generated code has 25-45% security flaw rates. No AI workflow tool provides standards selection with planning + verification integration. PAN already has the infrastructure (health checks, verification, config system) — this connects the dots.
|
|
791
|
+
|
|
792
|
+
### Strategic Assessment
|
|
793
|
+
- **Blue Ocean:** CREATE standards-aware AI workflow (first mover)
|
|
794
|
+
- **Wardley:** Genesis → Product positioning (ahead of market)
|
|
795
|
+
- **Moat Score:** 28/30
|
|
796
|
+
- **Cognitive Load:** +0 commands, +1 concept — neutral
|
|
797
|
+
- **Recommendation:** BUILD — unique angle is standards as dynamic workflow context, not static rules
|
|
798
|
+
|
|
799
|
+
### Design Summary
|
|
800
|
+
- 12-standard built-in catalog (OWASP Top 10, ASVS L1, LLM Top 10, WCAG 2.2, NIST SSDF, ISO 25010, STRIDE, CWE Top 25, OWASP Agentic, SOC 2 Dev, TOGAF ADM, Conventional Commits)
|
|
801
|
+
- `.planning/standards.md` as persistent registry
|
|
802
|
+
- 5 subcommands: `list`, `select`, `remove`, `status`, `recommend`
|
|
803
|
+
- Agent context injection (verifier + plan-checker)
|
|
804
|
+
- Health command extension (`--standards`)
|
|
805
|
+
- Advisory model (guides, doesn't block)
|
|
806
|
+
|
|
807
|
+
### Feature Ladder
|
|
808
|
+
| Version | Effort | Value |
|
|
809
|
+
|---------|--------|-------|
|
|
810
|
+
| v0 MVP | M (4 pts) | Catalog + select/remove + standards.md + status |
|
|
811
|
+
| v1 Complete | L (10 pts) | Agent injection + settings + new-project + health |
|
|
812
|
+
| v2 Enhanced | L (10 pts) | Per-phase tracking + verification checklists + external tool recs |
|
|
813
|
+
|
|
814
|
+
### Implementation Tasks (11 tasks, ~23 points total)
|
|
815
|
+
Tasks 1-4 (v0 MVP): 9 pts — catalog, handlers, template, dispatcher
|
|
816
|
+
Tasks 5-7 (v0 tests + health): 8 pts — health extension, unit + integration tests
|
|
817
|
+
Tasks 8-10 (v1 agent/workflow): 4 pts — verifier, plan-checker, settings, new-project
|
|
818
|
+
Task 11 (docs): 2 pts — README, USER-GUIDE, CLI-REF, CHANGELOG
|
|
819
|
+
|
|
820
|
+
### Security Assessment
|
|
821
|
+
Minimal attack surface — reads/writes only within `.planning/`, standard IDs validated against allowlist, no shell execution, no external network calls. Low risk.
|
|
822
|
+
|
|
823
|
+
### Adoption Analysis
|
|
824
|
+
- Discovery: During `/pan:new-project` (prompted) or `/pan:help`
|
|
825
|
+
- Learning curve: Near-zero (select from menu)
|
|
826
|
+
- Workflow change: None required (additive, optional)
|
|
827
|
+
- Aha moment: Verifier catches a security gap you would have missed
|
|
828
|
+
|
|
829
|
+
### Next Steps
|
|
830
|
+
1. Run `/pan:focus-plan` to create execution batch from these tasks
|
|
831
|
+
2. Implement v0 MVP first (Tasks 1-4)
|
|
832
|
+
3. Add tests (Tasks 6-7) to verify
|
|
833
|
+
4. Iterate to v1 with agent integration (Tasks 8-10)
|