tribunal-kit 9.2.5 → 9.2.7
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/.agent/ADRs/ADR-001-system-architecture-intelligence.md +1 -1
- package/.agent/ARCHITECTURE.md +4 -4
- package/.agent/agents/agent-shield-auditor.md +4 -1
- package/.agent/agents/anti-slop-auditor.md +79 -0
- package/.agent/agents/api-architect.md +5 -0
- package/.agent/agents/architecture-auditor.md +20 -19
- package/.agent/agents/backend-security-architect.md +115 -0
- package/.agent/agents/frontend-reviewer.md +2 -0
- package/.agent/agents/frontend-specialist.md +2 -1
- package/.agent/agents/harness-manager.md +8 -0
- package/.agent/agents/human-gate-negotiator.md +6 -2
- package/.agent/agents/kernel-scheduler.md +4 -0
- package/.agent/agents/memory-archivist.md +5 -0
- package/.agent/agents/orchestrator.md +0 -1
- package/.agent/agents/project-planner.md +0 -1
- package/.agent/agents/security-auditor.md +0 -1
- package/.agent/agents/system-architect.md +15 -1
- package/.agent/agents/ui-ux-auditor.md +5 -0
- package/.agent/agents/ui-visual-auditor.md +5 -0
- package/.agent/config/claude.json +2 -2
- package/.agent/config/plugin.json +2 -2
- package/.agent/config/system-prompt.md +1 -1
- package/.agent/history/architecture-intelligence.html +1880 -0
- package/.agent/history/architecture-model.json +19764 -0
- package/.agent/history/architecture-verification.json +50 -0
- package/.agent/history/integrity_manifest.json +1905 -0
- package/.agent/plans/implementation_plan.md +15 -8
- package/.agent/plans/task.md +6 -0
- package/.agent/routing_index.json +31 -22
- package/.agent/rules/GEMINI.md +1 -1
- package/.agent/rules/kernel.md +16 -13
- package/.agent/scripts/_utils.js +6 -1
- package/.agent/scripts/ab_json_experiment.js +129 -0
- package/.agent/scripts/adaptive_execution.js +511 -0
- package/.agent/scripts/architecture_diff.js +303 -0
- package/.agent/scripts/architecture_extractor.js +792 -0
- package/.agent/scripts/architecture_health.js +293 -0
- package/.agent/scripts/architecture_intelligence.js +3100 -0
- package/.agent/scripts/architecture_mapper.js +91 -25
- package/.agent/scripts/architecture_verifier.js +303 -0
- package/.agent/scripts/architecture_visualizer.js +880 -0
- package/.agent/scripts/backend_audit.js +238 -0
- package/.agent/scripts/backend_report_generator.js +161 -0
- package/.agent/scripts/benchmark_suite.js +493 -0
- package/.agent/scripts/blast_radius_engine.js +274 -0
- package/.agent/scripts/capability_evolution.js +453 -0
- package/.agent/scripts/checklist.js +8 -4
- package/.agent/scripts/concept_extractor.js +240 -0
- package/.agent/scripts/consideration_engine.js +284 -0
- package/.agent/scripts/consolidation_experiment.js +543 -0
- package/.agent/scripts/context_compiler.js +49 -18
- package/.agent/scripts/coverage_engine.js +102 -0
- package/.agent/scripts/cross_agent_correlator.js +223 -0
- package/.agent/scripts/cross_domain_engine.js +1883 -0
- package/.agent/scripts/dependency_analyzer.js +26 -4
- package/.agent/scripts/engineering_memory.js +1313 -0
- package/.agent/scripts/evidence_verifier.js +171 -0
- package/.agent/scripts/finding_schema.js +104 -0
- package/.agent/scripts/findings_validator.js +147 -0
- package/.agent/scripts/guardrail_engine.js +43 -24
- package/.agent/scripts/harness_manager.js +30 -18
- package/.agent/scripts/impact_classifier.js +6 -5
- package/.agent/scripts/integrity_manifest.js +45 -9
- package/.agent/scripts/judgment_engine.js +790 -0
- package/.agent/scripts/lint_runner.js +4 -2
- package/.agent/scripts/live_abc_benchmark.js +452 -0
- package/.agent/scripts/materiality_engine.js +251 -0
- package/.agent/scripts/mcp_server.js +81 -59
- package/.agent/scripts/memory_archivist.js +18 -12
- package/.agent/scripts/memory_consolidator.js +6 -6
- package/.agent/scripts/memory_engine.js +33 -17
- package/.agent/scripts/outcome_engine.js +624 -0
- package/.agent/scripts/outcome_optimization_engine.js +1632 -0
- package/.agent/scripts/pipeline_engine.js +26 -11
- package/.agent/scripts/secret_redactor.js +119 -0
- package/.agent/scripts/session_logger.js +4 -4
- package/.agent/scripts/session_manager.js +6 -1
- package/.agent/scripts/simulation_engine.js +1478 -0
- package/.agent/scripts/skill_intelligence.js +1371 -0
- package/.agent/scripts/swarm_dispatcher.js +29 -20
- package/.agent/scripts/syscall_registry.js +28 -23
- package/.agent/scripts/test_runner.js +1 -1
- package/.agent/scripts/tier3_audit.js +195 -0
- package/.agent/scripts/validation_engine.js +236 -0
- package/.agent/scripts/verification_auditor.js +266 -0
- package/.agent/scripts/verify_all.js +5 -3
- package/.agent/skill-intelligence/taxonomy/engineering-concepts.json +555 -0
- package/.agent/skill_topic_map.json +133 -146
- package/.agent/skills/12-principles-of-animation/SKILL.md +92 -22
- package/.agent/skills/60fps-animation/SKILL.md +83 -26
- package/.agent/skills/accessible-animation/SKILL.md +93 -31
- package/.agent/skills/adapt/SKILL.md +92 -22
- package/.agent/skills/adr-generation/SKILL.md +88 -12
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +83 -22
- package/.agent/skills/agent-organizer/SKILL.md +85 -27
- package/.agent/skills/agent-syscall-guidelines/SKILL.md +100 -25
- package/.agent/skills/agentic-patterns/SKILL.md +93 -23
- package/.agent/skills/agentic-workflows-2026/SKILL.md +92 -20
- package/.agent/skills/agentshield-security/SKILL.md +85 -26
- package/.agent/skills/ai-app-hardening/SKILL.md +92 -20
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +83 -22
- package/.agent/skills/animation-on-scroll/SKILL.md +93 -31
- package/.agent/skills/animation-systems/SKILL.md +93 -31
- package/.agent/skills/antfu-conventions/SKILL.md +92 -22
- package/.agent/skills/anti-slop-enforcement/SKILL.md +118 -0
- package/.agent/skills/api-patterns/SKILL.md +83 -22
- package/.agent/skills/api-security-auditor/SKILL.md +102 -24
- package/.agent/skills/app-builder/SKILL.md +85 -30
- package/.agent/skills/appflow-wireframe/SKILL.md +78 -18
- package/.agent/skills/apple-design/SKILL.md +92 -22
- package/.agent/skills/architecture/SKILL.md +83 -22
- package/.agent/skills/architecture-drift/SKILL.md +88 -12
- package/.agent/skills/architecture-intelligence/SKILL.md +53 -0
- package/.agent/skills/audit-and-fix/SKILL.md +95 -25
- package/.agent/skills/authentication-best-practices/SKILL.md +92 -22
- package/.agent/skills/autonomous-execution/SKILL.md +86 -8
- package/.agent/skills/backend-alembic/SKILL.md +91 -0
- package/.agent/skills/backend-architecture-auditor/SKILL.md +101 -0
- package/.agent/skills/backend-mongodb/SKILL.md +133 -0
- package/.agent/skills/backend-mysql/SKILL.md +84 -0
- package/.agent/skills/backend-performance-auditor/SKILL.md +100 -0
- package/.agent/skills/backend-postgresql/SKILL.md +117 -0
- package/.agent/skills/backend-redis/SKILL.md +122 -0
- package/.agent/skills/backend-security-expert/SKILL.md +83 -22
- package/.agent/skills/backend-sqlalchemy/SKILL.md +107 -0
- package/.agent/skills/backend-sqlite/SKILL.md +93 -0
- package/.agent/skills/backend-testing-auditor/SKILL.md +113 -0
- package/.agent/skills/baseline-ui/SKILL.md +92 -22
- package/.agent/skills/bash-linux/SKILL.md +84 -26
- package/.agent/skills/behavioral-modes/SKILL.md +93 -23
- package/.agent/skills/better-colors/SKILL.md +92 -22
- package/.agent/skills/better-typography/SKILL.md +88 -18
- package/.agent/skills/better-ui/SKILL.md +83 -22
- package/.agent/skills/bolder/SKILL.md +92 -22
- package/.agent/skills/brainstorming/SKILL.md +83 -23
- package/.agent/skills/browser-audit/SKILL.md +94 -24
- package/.agent/skills/browser-native-ai/SKILL.md +92 -22
- package/.agent/skills/build-primitive/SKILL.md +92 -22
- package/.agent/skills/building-native-ui/SKILL.md +83 -22
- package/.agent/skills/cicd-pro/SKILL.md +83 -22
- package/.agent/skills/clarify/SKILL.md +92 -22
- package/.agent/skills/clean-code/SKILL.md +83 -22
- package/.agent/skills/cloud-architect/SKILL.md +83 -22
- package/.agent/skills/cobejs/SKILL.md +92 -22
- package/.agent/skills/code-review-checklist/SKILL.md +92 -22
- package/.agent/skills/codebase-design/SKILL.md +83 -22
- package/.agent/skills/colorize/SKILL.md +92 -22
- package/.agent/skills/compact-landing/SKILL.md +92 -22
- package/.agent/skills/company-logos/SKILL.md +92 -22
- package/.agent/skills/config-validator/SKILL.md +84 -26
- package/.agent/skills/containerization-pro/SKILL.md +83 -22
- package/.agent/skills/context-engineering-pro/SKILL.md +92 -20
- package/.agent/skills/create-design-md/SKILL.md +92 -22
- package/.agent/skills/critique/SKILL.md +93 -23
- package/.agent/skills/csharp-developer/SKILL.md +92 -22
- package/.agent/skills/data-validation-schemas/SKILL.md +84 -26
- package/.agent/skills/database-design/SKILL.md +83 -22
- package/.agent/skills/delight/SKILL.md +92 -22
- package/.agent/skills/deployment-procedures/SKILL.md +84 -26
- package/.agent/skills/design-lab/SKILL.md +93 -23
- package/.agent/skills/devops-engineer/SKILL.md +92 -22
- package/.agent/skills/devops-incident-responder/SKILL.md +84 -26
- package/.agent/skills/diagnosing-bugs/SKILL.md +93 -23
- package/.agent/skills/distill/SKILL.md +92 -22
- package/.agent/skills/documentation-templates/SKILL.md +84 -26
- package/.agent/skills/domain-modeling/SKILL.md +92 -22
- package/.agent/skills/duckdb-analytical-sql/SKILL.md +91 -19
- package/.agent/skills/edge-ai-mobile/SKILL.md +91 -19
- package/.agent/skills/edge-computing/SKILL.md +84 -26
- package/.agent/skills/emil-design-eng/SKILL.md +92 -22
- package/.agent/skills/error-resilience/SKILL.md +83 -22
- package/.agent/skills/expo-router-v4/SKILL.md +90 -18
- package/.agent/skills/extract-design-system/SKILL.md +84 -26
- package/.agent/skills/fabel-protocol/SKILL.md +93 -23
- package/.agent/skills/failure-mode-analysis/SKILL.md +88 -12
- package/.agent/skills/fastapi-pro/SKILL.md +123 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +92 -22
- package/.agent/skills/fixing-metadata/SKILL.md +92 -22
- package/.agent/skills/fixing-motion-performance/SKILL.md +92 -22
- package/.agent/skills/framer-motion-expert/SKILL.md +85 -30
- package/.agent/skills/frontend-design/SKILL.md +92 -22
- package/.agent/skills/frontend-security-expert/SKILL.md +83 -22
- package/.agent/skills/game-design-expert/SKILL.md +84 -26
- package/.agent/skills/game-engineering-expert/SKILL.md +84 -26
- package/.agent/skills/generative-ui-expert/SKILL.md +92 -22
- package/.agent/skills/geo-fundamentals/SKILL.md +84 -26
- package/.agent/skills/git-pro/SKILL.md +83 -22
- package/.agent/skills/github-operations/SKILL.md +92 -22
- package/.agent/skills/gpt-taste/SKILL.md +92 -22
- package/.agent/skills/graph-engineering/SKILL.md +116 -28
- package/.agent/skills/gsap-core/SKILL.md +92 -22
- package/.agent/skills/gsap-frameworks/SKILL.md +92 -22
- package/.agent/skills/gsap-performance/SKILL.md +92 -22
- package/.agent/skills/gsap-plugins/SKILL.md +92 -22
- package/.agent/skills/gsap-react/SKILL.md +92 -22
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +92 -22
- package/.agent/skills/gsap-timeline/SKILL.md +92 -22
- package/.agent/skills/gsap-utils/SKILL.md +92 -22
- package/.agent/skills/harden/SKILL.md +92 -22
- package/.agent/skills/harness-protocol/SKILL.md +93 -23
- package/.agent/skills/hf-cli/SKILL.md +86 -6
- package/.agent/skills/hf-cloud-aws-context-discovery/SKILL.md +86 -8
- package/.agent/skills/hf-cloud-python-env-setup/SKILL.md +86 -8
- package/.agent/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +86 -8
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +86 -8
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +86 -8
- package/.agent/skills/hf-cloud-serving-image-selection/SKILL.md +86 -8
- package/.agent/skills/hf-mem/SKILL.md +86 -6
- package/.agent/skills/huggingface-best/SKILL.md +86 -16
- package/.agent/skills/huggingface-community-evals/SKILL.md +86 -8
- package/.agent/skills/huggingface-datasets/SKILL.md +86 -8
- package/.agent/skills/huggingface-gradio/SKILL.md +86 -8
- package/.agent/skills/huggingface-llm-trainer/SKILL.md +86 -9
- package/.agent/skills/huggingface-local-models/SKILL.md +86 -8
- package/.agent/skills/huggingface-lora-space-builder/SKILL.md +86 -8
- package/.agent/skills/huggingface-paper-publisher/SKILL.md +86 -7
- package/.agent/skills/huggingface-papers/SKILL.md +86 -8
- package/.agent/skills/huggingface-spaces/SKILL.md +86 -8
- package/.agent/skills/huggingface-tool-builder/SKILL.md +86 -8
- package/.agent/skills/huggingface-trackio/SKILL.md +77 -8
- package/.agent/skills/huggingface-vision-trainer/SKILL.md +86 -8
- package/.agent/skills/huggingface-zerogpu/SKILL.md +86 -8
- package/.agent/skills/human-gate-negotiation/SKILL.md +96 -30
- package/.agent/skills/i18n-localization/SKILL.md +84 -26
- package/.agent/skills/impeccable/SKILL.md +92 -22
- package/.agent/skills/improve-codebase-architecture/SKILL.md +92 -22
- package/.agent/skills/improve-ui/SKILL.md +92 -22
- package/.agent/skills/intelligent-routing/SKILL.md +81 -18
- package/.agent/skills/knowledge-graph/SKILL.md +94 -24
- package/.agent/skills/landing-page/SKILL.md +93 -23
- package/.agent/skills/lint-and-validate/SKILL.md +84 -26
- package/.agent/skills/llm-engineering/SKILL.md +92 -22
- package/.agent/skills/local-first/SKILL.md +84 -26
- package/.agent/skills/local-first-architecture/SKILL.md +83 -22
- package/.agent/skills/lottie-animation/SKILL.md +92 -22
- package/.agent/skills/marquee-loop/SKILL.md +92 -22
- package/.agent/skills/masked-reveal/SKILL.md +93 -24
- package/.agent/skills/mcp-builder/SKILL.md +84 -26
- package/.agent/skills/micro-interaction/SKILL.md +93 -31
- package/.agent/skills/mobile-design/SKILL.md +83 -22
- package/.agent/skills/monorepo-management/SKILL.md +84 -26
- package/.agent/skills/morphing-icons/SKILL.md +93 -24
- package/.agent/skills/motion-engineering/SKILL.md +84 -23
- package/.agent/skills/nextjs-react-expert/SKILL.md +83 -22
- package/.agent/skills/nodejs-best-practices/SKILL.md +83 -22
- package/.agent/skills/observability/SKILL.md +92 -22
- package/.agent/skills/opentelemetry-observability/SKILL.md +91 -19
- package/.agent/skills/page-transition-animation/SKILL.md +92 -22
- package/.agent/skills/parallel-agents/SKILL.md +85 -27
- package/.agent/skills/performance-profiling/SKILL.md +93 -23
- package/.agent/skills/plan-writing/SKILL.md +83 -22
- package/.agent/skills/platform-engineer/SKILL.md +84 -26
- package/.agent/skills/platform-engineering-opentofu/SKILL.md +91 -19
- package/.agent/skills/playwright-ai-e2e/SKILL.md +92 -20
- package/.agent/skills/playwright-best-practices/SKILL.md +85 -27
- package/.agent/skills/polish/SKILL.md +92 -22
- package/.agent/skills/powershell-windows/SKILL.md +92 -22
- package/.agent/skills/pricing-page/SKILL.md +92 -22
- package/.agent/skills/product-aware-heuristics/SKILL.md +93 -23
- package/.agent/skills/progressive-blur/SKILL.md +92 -22
- package/.agent/skills/project-idioms/SKILL.md +93 -23
- package/.agent/skills/property-based-testing/SKILL.md +92 -20
- package/.agent/skills/python-patterns/SKILL.md +84 -26
- package/.agent/skills/python-pro/SKILL.md +83 -22
- package/.agent/skills/quieter/SKILL.md +92 -22
- package/.agent/skills/react-doctor/SKILL.md +92 -22
- package/.agent/skills/react-specialist/SKILL.md +83 -22
- package/.agent/skills/readme-builder/SKILL.md +84 -26
- package/.agent/skills/realtime-patterns/SKILL.md +92 -22
- package/.agent/skills/red-team-tactics/SKILL.md +83 -22
- package/.agent/skills/redesign-skill/SKILL.md +92 -22
- package/.agent/skills/review-animations/SKILL.md +92 -22
- package/.agent/skills/rust-pro/SKILL.md +83 -22
- package/.agent/skills/semantic-filesystem-navigation/SKILL.md +79 -24
- package/.agent/skills/seo-fundamentals/SKILL.md +84 -26
- package/.agent/skills/server-management/SKILL.md +84 -26
- package/.agent/skills/session-log-interrogation/SKILL.md +81 -29
- package/.agent/skills/shadcn-ui-expert/SKILL.md +84 -26
- package/.agent/skills/shape/SKILL.md +93 -23
- package/.agent/skills/skill-creator/SKILL.md +88 -20
- package/.agent/skills/soft-skill/SKILL.md +92 -22
- package/.agent/skills/sounds-on-the-web/SKILL.md +92 -22
- package/.agent/skills/sql-pro/SKILL.md +83 -22
- package/.agent/skills/subagent-driven-development/SKILL.md +92 -32
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +83 -22
- package/.agent/skills/svg-animation/SKILL.md +93 -24
- package/.agent/skills/swiftui-expert/SKILL.md +84 -26
- package/.agent/skills/swiss-design/SKILL.md +92 -22
- package/.agent/skills/system-design-pro/SKILL.md +90 -16
- package/.agent/skills/systematic-debugging/SKILL.md +85 -27
- package/.agent/skills/tailwind-patterns/SKILL.md +92 -22
- package/.agent/skills/taste-skill/SKILL.md +92 -22
- package/.agent/skills/tdd-workflow/SKILL.md +84 -23
- package/.agent/skills/test-result-analyzer/SKILL.md +93 -23
- package/.agent/skills/testing-patterns/SKILL.md +93 -23
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +92 -22
- package/.agent/skills/thinking-protocol/SKILL.md +79 -21
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +92 -22
- package/.agent/skills/train-sentence-transformers/SKILL.md +86 -8
- package/.agent/skills/transformers-js/SKILL.md +86 -15
- package/.agent/skills/transitions-dev/SKILL.md +92 -22
- package/.agent/skills/trend-researcher/SKILL.md +92 -22
- package/.agent/skills/tribunal-instincts-memory/SKILL.md +86 -31
- package/.agent/skills/trl-training/SKILL.md +86 -16
- package/.agent/skills/typescript-advanced/SKILL.md +83 -22
- package/.agent/skills/typeset/SKILL.md +92 -22
- package/.agent/skills/ui-reasoning-engine/SKILL.md +93 -23
- package/.agent/skills/ui-skill-packs/SKILL.md +94 -24
- package/.agent/skills/ui-skills-root/SKILL.md +94 -24
- package/.agent/skills/ui-ux-pro-max/SKILL.md +93 -23
- package/.agent/skills/ui-ux-researcher/SKILL.md +92 -22
- package/.agent/skills/vector-search-pgvector/SKILL.md +91 -19
- package/.agent/skills/verification-before-completion/SKILL.md +90 -18
- package/.agent/skills/vue-expert/SKILL.md +83 -22
- package/.agent/skills/vulnerability-scanner/SKILL.md +93 -26
- package/.agent/skills/web-accessibility-auditor/SKILL.md +84 -26
- package/.agent/skills/web-design-guidelines/SKILL.md +92 -22
- package/.agent/skills/web-quality-audit/SKILL.md +92 -22
- package/.agent/skills/webapp-testing/SKILL.md +85 -27
- package/.agent/skills/webgpu-performance/SKILL.md +92 -22
- package/.agent/skills/whimsy-injector/SKILL.md +93 -23
- package/.agent/skills/workflow-optimizer/SKILL.md +93 -23
- package/.agent/skills/zero-trust-passkeys/SKILL.md +91 -19
- package/.agent/skills_inventory.json +4272 -0
- package/.agent/workflows/arch.md +96 -0
- package/.agent/workflows/assimilate.md +4 -1
- package/.agent/workflows/audit.md +0 -1
- package/.agent/workflows/generate.md +26 -21
- package/.agent/workflows/htop.md +5 -1
- package/.agent/workflows/marathon.md +0 -1
- package/.agent/workflows/resume.md +5 -2
- package/.agent/workflows/skill-enhancement-engine.md +1 -1
- package/.agent/workflows/skill-intelligence.md +216 -0
- package/.agent/workflows/team-mode.md +4 -1
- package/.agent/workflows/tribunal-backend.md +19 -7
- package/.agent/workflows/tribunal-frontend.md +6 -0
- package/.agent/workflows/tribunal-ui.md +5 -0
- package/.agents/skills/12-principles-of-animation/SKILL.md +92 -22
- package/.agents/skills/60fps-animation/SKILL.md +83 -26
- package/.agents/skills/accessible-animation/SKILL.md +93 -31
- package/.agents/skills/adapt/SKILL.md +92 -22
- package/.agents/skills/adr-generation/SKILL.md +88 -12
- package/.agents/skills/advanced-rag-pipelines/SKILL.md +83 -22
- package/.agents/skills/agent-organizer/SKILL.md +85 -27
- package/.agents/skills/agent-syscall-guidelines/SKILL.md +100 -25
- package/.agents/skills/agentic-patterns/SKILL.md +93 -23
- package/.agents/skills/agentic-workflows-2026/SKILL.md +92 -20
- package/.agents/skills/agentshield-security/SKILL.md +85 -26
- package/.agents/skills/ai-app-hardening/SKILL.md +92 -20
- package/.agents/skills/ai-prompt-injection-defense/SKILL.md +83 -22
- package/.agents/skills/animation-on-scroll/SKILL.md +93 -31
- package/.agents/skills/animation-systems/SKILL.md +93 -31
- package/.agents/skills/antfu-conventions/SKILL.md +92 -22
- package/.agents/skills/anti-slop-enforcement/SKILL.md +118 -0
- package/.agents/skills/api-patterns/SKILL.md +83 -22
- package/.agents/skills/api-security-auditor/SKILL.md +102 -24
- package/.agents/skills/app-builder/SKILL.md +85 -30
- package/.agents/skills/appflow-wireframe/SKILL.md +78 -18
- package/.agents/skills/apple-design/SKILL.md +92 -22
- package/.agents/skills/architecture/SKILL.md +83 -22
- package/.agents/skills/architecture-drift/SKILL.md +88 -12
- package/.agents/skills/architecture-intelligence/SKILL.md +53 -0
- package/.agents/skills/audit-and-fix/SKILL.md +95 -25
- package/.agents/skills/authentication-best-practices/SKILL.md +92 -22
- package/.agents/skills/autonomous-execution/SKILL.md +86 -8
- package/.agents/skills/backend-alembic/SKILL.md +91 -0
- package/.agents/skills/backend-architecture-auditor/SKILL.md +101 -0
- package/.agents/skills/backend-mongodb/SKILL.md +133 -0
- package/.agents/skills/backend-mysql/SKILL.md +84 -0
- package/.agents/skills/backend-performance-auditor/SKILL.md +100 -0
- package/.agents/skills/backend-postgresql/SKILL.md +117 -0
- package/.agents/skills/backend-redis/SKILL.md +122 -0
- package/.agents/skills/backend-security-expert/SKILL.md +83 -22
- package/.agents/skills/backend-sqlalchemy/SKILL.md +107 -0
- package/.agents/skills/backend-sqlite/SKILL.md +93 -0
- package/.agents/skills/backend-testing-auditor/SKILL.md +113 -0
- package/.agents/skills/baseline-ui/SKILL.md +92 -22
- package/.agents/skills/bash-linux/SKILL.md +84 -26
- package/.agents/skills/behavioral-modes/SKILL.md +93 -23
- package/.agents/skills/better-colors/SKILL.md +92 -22
- package/.agents/skills/better-typography/SKILL.md +88 -18
- package/.agents/skills/better-ui/SKILL.md +83 -22
- package/.agents/skills/bolder/SKILL.md +92 -22
- package/.agents/skills/brainstorming/SKILL.md +83 -23
- package/.agents/skills/browser-audit/SKILL.md +94 -24
- package/.agents/skills/browser-native-ai/SKILL.md +92 -22
- package/.agents/skills/build-primitive/SKILL.md +92 -22
- package/.agents/skills/building-native-ui/SKILL.md +83 -22
- package/.agents/skills/cicd-pro/SKILL.md +83 -22
- package/.agents/skills/clarify/SKILL.md +92 -22
- package/.agents/skills/clean-code/SKILL.md +83 -22
- package/.agents/skills/cloud-architect/SKILL.md +83 -22
- package/.agents/skills/cobejs/SKILL.md +92 -22
- package/.agents/skills/code-review-checklist/SKILL.md +92 -22
- package/.agents/skills/codebase-design/SKILL.md +83 -22
- package/.agents/skills/colorize/SKILL.md +92 -22
- package/.agents/skills/compact-landing/SKILL.md +92 -22
- package/.agents/skills/company-logos/SKILL.md +92 -22
- package/.agents/skills/config-validator/SKILL.md +84 -26
- package/.agents/skills/containerization-pro/SKILL.md +83 -22
- package/.agents/skills/context-engineering-pro/SKILL.md +92 -20
- package/.agents/skills/create-design-md/SKILL.md +92 -22
- package/.agents/skills/critique/SKILL.md +93 -23
- package/.agents/skills/csharp-developer/SKILL.md +92 -22
- package/.agents/skills/data-validation-schemas/SKILL.md +84 -26
- package/.agents/skills/database-design/SKILL.md +83 -22
- package/.agents/skills/delight/SKILL.md +92 -22
- package/.agents/skills/deployment-procedures/SKILL.md +84 -26
- package/.agents/skills/design-lab/SKILL.md +93 -23
- package/.agents/skills/devops-engineer/SKILL.md +92 -22
- package/.agents/skills/devops-incident-responder/SKILL.md +84 -26
- package/.agents/skills/diagnosing-bugs/SKILL.md +93 -23
- package/.agents/skills/distill/SKILL.md +92 -22
- package/.agents/skills/documentation-templates/SKILL.md +84 -26
- package/.agents/skills/domain-modeling/SKILL.md +92 -22
- package/.agents/skills/duckdb-analytical-sql/SKILL.md +91 -19
- package/.agents/skills/edge-ai-mobile/SKILL.md +91 -19
- package/.agents/skills/edge-computing/SKILL.md +84 -26
- package/.agents/skills/emil-design-eng/SKILL.md +92 -22
- package/.agents/skills/error-resilience/SKILL.md +83 -22
- package/.agents/skills/expo-router-v4/SKILL.md +90 -18
- package/.agents/skills/extract-design-system/SKILL.md +84 -26
- package/.agents/skills/fabel-protocol/SKILL.md +93 -23
- package/.agents/skills/failure-mode-analysis/SKILL.md +88 -12
- package/.agents/skills/fastapi-pro/SKILL.md +123 -0
- package/.agents/skills/fixing-accessibility/SKILL.md +92 -22
- package/.agents/skills/fixing-metadata/SKILL.md +92 -22
- package/.agents/skills/fixing-motion-performance/SKILL.md +92 -22
- package/.agents/skills/framer-motion-expert/SKILL.md +85 -30
- package/.agents/skills/frontend-design/SKILL.md +92 -22
- package/.agents/skills/frontend-security-expert/SKILL.md +83 -22
- package/.agents/skills/game-design-expert/SKILL.md +84 -26
- package/.agents/skills/game-engineering-expert/SKILL.md +84 -26
- package/.agents/skills/generative-ui-expert/SKILL.md +92 -22
- package/.agents/skills/geo-fundamentals/SKILL.md +84 -26
- package/.agents/skills/git-pro/SKILL.md +83 -22
- package/.agents/skills/github-operations/SKILL.md +92 -22
- package/.agents/skills/gpt-taste/SKILL.md +92 -22
- package/.agents/skills/graph-engineering/SKILL.md +116 -28
- package/.agents/skills/gsap-core/SKILL.md +92 -22
- package/.agents/skills/gsap-frameworks/SKILL.md +92 -22
- package/.agents/skills/gsap-performance/SKILL.md +92 -22
- package/.agents/skills/gsap-plugins/SKILL.md +92 -22
- package/.agents/skills/gsap-react/SKILL.md +92 -22
- package/.agents/skills/gsap-scrolltrigger/SKILL.md +92 -22
- package/.agents/skills/gsap-timeline/SKILL.md +92 -22
- package/.agents/skills/gsap-utils/SKILL.md +92 -22
- package/.agents/skills/harden/SKILL.md +92 -22
- package/.agents/skills/harness-protocol/SKILL.md +93 -23
- package/.agents/skills/hf-cli/SKILL.md +86 -6
- package/.agents/skills/hf-cloud-aws-context-discovery/SKILL.md +86 -8
- package/.agents/skills/hf-cloud-python-env-setup/SKILL.md +86 -8
- package/.agents/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +86 -8
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +86 -8
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +86 -8
- package/.agents/skills/hf-cloud-serving-image-selection/SKILL.md +86 -8
- package/.agents/skills/hf-mem/SKILL.md +86 -6
- package/.agents/skills/huggingface-best/SKILL.md +86 -16
- package/.agents/skills/huggingface-community-evals/SKILL.md +86 -8
- package/.agents/skills/huggingface-datasets/SKILL.md +86 -8
- package/.agents/skills/huggingface-gradio/SKILL.md +86 -8
- package/.agents/skills/huggingface-llm-trainer/SKILL.md +86 -9
- package/.agents/skills/huggingface-local-models/SKILL.md +86 -8
- package/.agents/skills/huggingface-lora-space-builder/SKILL.md +86 -8
- package/.agents/skills/huggingface-paper-publisher/SKILL.md +86 -7
- package/.agents/skills/huggingface-papers/SKILL.md +86 -8
- package/.agents/skills/huggingface-spaces/SKILL.md +86 -8
- package/.agents/skills/huggingface-tool-builder/SKILL.md +86 -8
- package/.agents/skills/huggingface-trackio/SKILL.md +77 -8
- package/.agents/skills/huggingface-vision-trainer/SKILL.md +86 -8
- package/.agents/skills/huggingface-zerogpu/SKILL.md +86 -8
- package/.agents/skills/human-gate-negotiation/SKILL.md +96 -30
- package/.agents/skills/i18n-localization/SKILL.md +84 -26
- package/.agents/skills/impeccable/SKILL.md +92 -22
- package/.agents/skills/improve-codebase-architecture/SKILL.md +92 -22
- package/.agents/skills/improve-ui/SKILL.md +92 -22
- package/.agents/skills/intelligent-routing/SKILL.md +81 -18
- package/.agents/skills/knowledge-graph/SKILL.md +94 -24
- package/.agents/skills/landing-page/SKILL.md +93 -23
- package/.agents/skills/lint-and-validate/SKILL.md +84 -26
- package/.agents/skills/llm-engineering/SKILL.md +92 -22
- package/.agents/skills/local-first/SKILL.md +84 -26
- package/.agents/skills/local-first-architecture/SKILL.md +83 -22
- package/.agents/skills/lottie-animation/SKILL.md +92 -22
- package/.agents/skills/marquee-loop/SKILL.md +92 -22
- package/.agents/skills/masked-reveal/SKILL.md +93 -24
- package/.agents/skills/mcp-builder/SKILL.md +84 -26
- package/.agents/skills/micro-interaction/SKILL.md +93 -31
- package/.agents/skills/mobile-design/SKILL.md +83 -22
- package/.agents/skills/monorepo-management/SKILL.md +84 -26
- package/.agents/skills/morphing-icons/SKILL.md +93 -24
- package/.agents/skills/motion-engineering/SKILL.md +84 -23
- package/.agents/skills/nextjs-react-expert/SKILL.md +83 -22
- package/.agents/skills/nodejs-best-practices/SKILL.md +83 -22
- package/.agents/skills/observability/SKILL.md +92 -22
- package/.agents/skills/opentelemetry-observability/SKILL.md +91 -19
- package/.agents/skills/page-transition-animation/SKILL.md +92 -22
- package/.agents/skills/parallel-agents/SKILL.md +85 -27
- package/.agents/skills/performance-profiling/SKILL.md +93 -23
- package/.agents/skills/plan-writing/SKILL.md +83 -22
- package/.agents/skills/platform-engineer/SKILL.md +84 -26
- package/.agents/skills/platform-engineering-opentofu/SKILL.md +91 -19
- package/.agents/skills/playwright-ai-e2e/SKILL.md +92 -20
- package/.agents/skills/playwright-best-practices/SKILL.md +85 -27
- package/.agents/skills/polish/SKILL.md +92 -22
- package/.agents/skills/powershell-windows/SKILL.md +92 -22
- package/.agents/skills/pricing-page/SKILL.md +92 -22
- package/.agents/skills/product-aware-heuristics/SKILL.md +93 -23
- package/.agents/skills/progressive-blur/SKILL.md +92 -22
- package/.agents/skills/project-idioms/SKILL.md +93 -23
- package/.agents/skills/property-based-testing/SKILL.md +92 -20
- package/.agents/skills/python-patterns/SKILL.md +84 -26
- package/.agents/skills/python-pro/SKILL.md +83 -22
- package/.agents/skills/quieter/SKILL.md +92 -22
- package/.agents/skills/react-doctor/SKILL.md +92 -22
- package/.agents/skills/react-specialist/SKILL.md +83 -22
- package/.agents/skills/readme-builder/SKILL.md +84 -26
- package/.agents/skills/realtime-patterns/SKILL.md +92 -22
- package/.agents/skills/red-team-tactics/SKILL.md +83 -22
- package/.agents/skills/redesign-skill/SKILL.md +92 -22
- package/.agents/skills/review-animations/SKILL.md +92 -22
- package/.agents/skills/rust-pro/SKILL.md +83 -22
- package/.agents/skills/semantic-filesystem-navigation/SKILL.md +79 -24
- package/.agents/skills/seo-fundamentals/SKILL.md +84 -26
- package/.agents/skills/server-management/SKILL.md +84 -26
- package/.agents/skills/session-log-interrogation/SKILL.md +81 -29
- package/.agents/skills/shadcn-ui-expert/SKILL.md +84 -26
- package/.agents/skills/shape/SKILL.md +93 -23
- package/.agents/skills/skill-creator/SKILL.md +88 -20
- package/.agents/skills/soft-skill/SKILL.md +92 -22
- package/.agents/skills/sounds-on-the-web/SKILL.md +92 -22
- package/.agents/skills/sql-pro/SKILL.md +83 -22
- package/.agents/skills/subagent-driven-development/SKILL.md +92 -32
- package/.agents/skills/supabase-postgres-best-practices/SKILL.md +83 -22
- package/.agents/skills/svg-animation/SKILL.md +93 -24
- package/.agents/skills/swiftui-expert/SKILL.md +84 -26
- package/.agents/skills/swiss-design/SKILL.md +92 -22
- package/.agents/skills/system-design-pro/SKILL.md +90 -16
- package/.agents/skills/systematic-debugging/SKILL.md +85 -27
- package/.agents/skills/tailwind-patterns/SKILL.md +92 -22
- package/.agents/skills/taste-skill/SKILL.md +92 -22
- package/.agents/skills/tdd-workflow/SKILL.md +84 -23
- package/.agents/skills/test-result-analyzer/SKILL.md +93 -23
- package/.agents/skills/testing-patterns/SKILL.md +93 -23
- package/.agents/skills/thermo-nuclear-code-quality-review/SKILL.md +92 -22
- package/.agents/skills/thinking-protocol/SKILL.md +79 -21
- package/.agents/skills/to-spring-or-not-to-spring/SKILL.md +92 -22
- package/.agents/skills/train-sentence-transformers/SKILL.md +86 -8
- package/.agents/skills/transformers-js/SKILL.md +86 -15
- package/.agents/skills/transitions-dev/SKILL.md +92 -22
- package/.agents/skills/trend-researcher/SKILL.md +92 -22
- package/.agents/skills/tribunal-instincts-memory/SKILL.md +86 -31
- package/.agents/skills/trl-training/SKILL.md +86 -16
- package/.agents/skills/typescript-advanced/SKILL.md +83 -22
- package/.agents/skills/typeset/SKILL.md +92 -22
- package/.agents/skills/ui-reasoning-engine/SKILL.md +93 -23
- package/.agents/skills/ui-skill-packs/SKILL.md +94 -24
- package/.agents/skills/ui-skills-root/SKILL.md +94 -24
- package/.agents/skills/ui-ux-pro-max/SKILL.md +93 -23
- package/.agents/skills/ui-ux-researcher/SKILL.md +92 -22
- package/.agents/skills/vector-search-pgvector/SKILL.md +91 -19
- package/.agents/skills/verification-before-completion/SKILL.md +90 -18
- package/.agents/skills/vue-expert/SKILL.md +83 -22
- package/.agents/skills/vulnerability-scanner/SKILL.md +93 -26
- package/.agents/skills/web-accessibility-auditor/SKILL.md +84 -26
- package/.agents/skills/web-design-guidelines/SKILL.md +92 -22
- package/.agents/skills/web-quality-audit/SKILL.md +92 -22
- package/.agents/skills/webapp-testing/SKILL.md +85 -27
- package/.agents/skills/webgpu-performance/SKILL.md +92 -22
- package/.agents/skills/whimsy-injector/SKILL.md +93 -23
- package/.agents/skills/workflow-optimizer/SKILL.md +93 -23
- package/.agents/skills/zero-trust-passkeys/SKILL.md +91 -19
- package/CONTRIBUTING.md +2 -2
- package/README.md +64 -42
- package/bin/adapter-install.js +1 -1
- package/bin/mcp-server.js +51 -42
- package/bin/wrapper.js +16 -0
- package/package.json +167 -169
- package/plugins/core-plugin.json +26 -26
- package/plugins/gemini/extension.json +6 -6
- package/skills/12-principles-of-animation/SKILL.md +92 -22
- package/skills/60fps-animation/SKILL.md +83 -26
- package/skills/accessible-animation/SKILL.md +93 -31
- package/skills/adapt/SKILL.md +92 -22
- package/skills/adr-generation/SKILL.md +88 -12
- package/skills/advanced-rag-pipelines/SKILL.md +83 -22
- package/skills/agent-organizer/SKILL.md +85 -27
- package/skills/agent-syscall-guidelines/SKILL.md +100 -25
- package/skills/agentic-patterns/SKILL.md +93 -23
- package/skills/agentic-workflows-2026/SKILL.md +92 -20
- package/skills/agentshield-security/SKILL.md +85 -26
- package/skills/ai-app-hardening/SKILL.md +92 -20
- package/skills/ai-prompt-injection-defense/SKILL.md +83 -22
- package/skills/animation-on-scroll/SKILL.md +93 -31
- package/skills/animation-systems/SKILL.md +93 -31
- package/skills/antfu-conventions/SKILL.md +92 -22
- package/skills/anti-slop-enforcement/SKILL.md +118 -0
- package/skills/api-patterns/SKILL.md +83 -22
- package/skills/api-security-auditor/SKILL.md +102 -24
- package/skills/app-builder/SKILL.md +85 -30
- package/skills/appflow-wireframe/SKILL.md +78 -18
- package/skills/apple-design/SKILL.md +92 -22
- package/skills/architecture/SKILL.md +83 -22
- package/skills/architecture-drift/SKILL.md +88 -12
- package/skills/architecture-intelligence/SKILL.md +53 -0
- package/skills/audit-and-fix/SKILL.md +95 -25
- package/skills/authentication-best-practices/SKILL.md +92 -22
- package/skills/autonomous-execution/SKILL.md +86 -8
- package/skills/backend-alembic/SKILL.md +91 -0
- package/skills/backend-architecture-auditor/SKILL.md +101 -0
- package/skills/backend-mongodb/SKILL.md +133 -0
- package/skills/backend-mysql/SKILL.md +84 -0
- package/skills/backend-performance-auditor/SKILL.md +100 -0
- package/skills/backend-postgresql/SKILL.md +117 -0
- package/skills/backend-redis/SKILL.md +122 -0
- package/skills/backend-security-expert/SKILL.md +83 -22
- package/skills/backend-sqlalchemy/SKILL.md +107 -0
- package/skills/backend-sqlite/SKILL.md +93 -0
- package/skills/backend-testing-auditor/SKILL.md +113 -0
- package/skills/baseline-ui/SKILL.md +92 -22
- package/skills/bash-linux/SKILL.md +84 -26
- package/skills/behavioral-modes/SKILL.md +93 -23
- package/skills/better-colors/SKILL.md +92 -22
- package/skills/better-typography/SKILL.md +88 -18
- package/skills/better-ui/SKILL.md +83 -22
- package/skills/bolder/SKILL.md +92 -22
- package/skills/brainstorming/SKILL.md +83 -23
- package/skills/browser-audit/SKILL.md +94 -24
- package/skills/browser-native-ai/SKILL.md +92 -22
- package/skills/build-primitive/SKILL.md +92 -22
- package/skills/building-native-ui/SKILL.md +83 -22
- package/skills/cicd-pro/SKILL.md +83 -22
- package/skills/clarify/SKILL.md +92 -22
- package/skills/clean-code/SKILL.md +83 -22
- package/skills/cloud-architect/SKILL.md +83 -22
- package/skills/cobejs/SKILL.md +92 -22
- package/skills/code-review-checklist/SKILL.md +92 -22
- package/skills/codebase-design/SKILL.md +83 -22
- package/skills/colorize/SKILL.md +92 -22
- package/skills/compact-landing/SKILL.md +92 -22
- package/skills/company-logos/SKILL.md +92 -22
- package/skills/config-validator/SKILL.md +84 -26
- package/skills/containerization-pro/SKILL.md +83 -22
- package/skills/context-engineering-pro/SKILL.md +92 -20
- package/skills/create-design-md/SKILL.md +92 -22
- package/skills/critique/SKILL.md +93 -23
- package/skills/csharp-developer/SKILL.md +92 -22
- package/skills/data-validation-schemas/SKILL.md +84 -26
- package/skills/database-design/SKILL.md +83 -22
- package/skills/delight/SKILL.md +92 -22
- package/skills/deployment-procedures/SKILL.md +84 -26
- package/skills/design-lab/SKILL.md +93 -23
- package/skills/devops-engineer/SKILL.md +92 -22
- package/skills/devops-incident-responder/SKILL.md +84 -26
- package/skills/diagnosing-bugs/SKILL.md +93 -23
- package/skills/distill/SKILL.md +92 -22
- package/skills/documentation-templates/SKILL.md +84 -26
- package/skills/domain-modeling/SKILL.md +92 -22
- package/skills/duckdb-analytical-sql/SKILL.md +91 -19
- package/skills/edge-ai-mobile/SKILL.md +91 -19
- package/skills/edge-computing/SKILL.md +84 -26
- package/skills/emil-design-eng/SKILL.md +92 -22
- package/skills/error-resilience/SKILL.md +83 -22
- package/skills/expo-router-v4/SKILL.md +90 -18
- package/skills/extract-design-system/SKILL.md +84 -26
- package/skills/fabel-protocol/SKILL.md +93 -23
- package/skills/failure-mode-analysis/SKILL.md +88 -12
- package/skills/fastapi-pro/SKILL.md +123 -0
- package/skills/fixing-accessibility/SKILL.md +92 -22
- package/skills/fixing-metadata/SKILL.md +92 -22
- package/skills/fixing-motion-performance/SKILL.md +92 -22
- package/skills/framer-motion-expert/SKILL.md +85 -30
- package/skills/frontend-design/SKILL.md +92 -22
- package/skills/frontend-security-expert/SKILL.md +83 -22
- package/skills/game-design-expert/SKILL.md +84 -26
- package/skills/game-engineering-expert/SKILL.md +84 -26
- package/skills/generative-ui-expert/SKILL.md +92 -22
- package/skills/geo-fundamentals/SKILL.md +84 -26
- package/skills/git-pro/SKILL.md +83 -22
- package/skills/github-operations/SKILL.md +92 -22
- package/skills/gpt-taste/SKILL.md +92 -22
- package/skills/graph-engineering/SKILL.md +116 -28
- package/skills/gsap-core/SKILL.md +92 -22
- package/skills/gsap-frameworks/SKILL.md +92 -22
- package/skills/gsap-performance/SKILL.md +92 -22
- package/skills/gsap-plugins/SKILL.md +92 -22
- package/skills/gsap-react/SKILL.md +92 -22
- package/skills/gsap-scrolltrigger/SKILL.md +92 -22
- package/skills/gsap-timeline/SKILL.md +92 -22
- package/skills/gsap-utils/SKILL.md +92 -22
- package/skills/harden/SKILL.md +92 -22
- package/skills/harness-protocol/SKILL.md +93 -23
- package/skills/hf-cli/SKILL.md +86 -6
- package/skills/hf-cloud-aws-context-discovery/SKILL.md +86 -8
- package/skills/hf-cloud-python-env-setup/SKILL.md +86 -8
- package/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +86 -8
- package/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +86 -8
- package/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +86 -8
- package/skills/hf-cloud-serving-image-selection/SKILL.md +86 -8
- package/skills/hf-mem/SKILL.md +86 -6
- package/skills/huggingface-best/SKILL.md +86 -16
- package/skills/huggingface-community-evals/SKILL.md +86 -8
- package/skills/huggingface-datasets/SKILL.md +86 -8
- package/skills/huggingface-gradio/SKILL.md +86 -8
- package/skills/huggingface-llm-trainer/SKILL.md +86 -9
- package/skills/huggingface-local-models/SKILL.md +86 -8
- package/skills/huggingface-lora-space-builder/SKILL.md +86 -8
- package/skills/huggingface-paper-publisher/SKILL.md +86 -7
- package/skills/huggingface-papers/SKILL.md +86 -8
- package/skills/huggingface-spaces/SKILL.md +86 -8
- package/skills/huggingface-tool-builder/SKILL.md +86 -8
- package/skills/huggingface-trackio/SKILL.md +77 -8
- package/skills/huggingface-vision-trainer/SKILL.md +86 -8
- package/skills/huggingface-zerogpu/SKILL.md +86 -8
- package/skills/human-gate-negotiation/SKILL.md +96 -30
- package/skills/i18n-localization/SKILL.md +84 -26
- package/skills/impeccable/SKILL.md +92 -22
- package/skills/improve-codebase-architecture/SKILL.md +92 -22
- package/skills/improve-ui/SKILL.md +92 -22
- package/skills/intelligent-routing/SKILL.md +81 -18
- package/skills/knowledge-graph/SKILL.md +94 -24
- package/skills/landing-page/SKILL.md +93 -23
- package/skills/lint-and-validate/SKILL.md +84 -26
- package/skills/llm-engineering/SKILL.md +92 -22
- package/skills/local-first/SKILL.md +84 -26
- package/skills/local-first-architecture/SKILL.md +83 -22
- package/skills/lottie-animation/SKILL.md +92 -22
- package/skills/marquee-loop/SKILL.md +92 -22
- package/skills/masked-reveal/SKILL.md +93 -24
- package/skills/mcp-builder/SKILL.md +84 -26
- package/skills/micro-interaction/SKILL.md +93 -31
- package/skills/mobile-design/SKILL.md +83 -22
- package/skills/monorepo-management/SKILL.md +84 -26
- package/skills/morphing-icons/SKILL.md +93 -24
- package/skills/motion-engineering/SKILL.md +84 -23
- package/skills/nextjs-react-expert/SKILL.md +83 -22
- package/skills/nodejs-best-practices/SKILL.md +83 -22
- package/skills/observability/SKILL.md +92 -22
- package/skills/opentelemetry-observability/SKILL.md +91 -19
- package/skills/page-transition-animation/SKILL.md +92 -22
- package/skills/parallel-agents/SKILL.md +85 -27
- package/skills/performance-profiling/SKILL.md +93 -23
- package/skills/plan-writing/SKILL.md +83 -22
- package/skills/platform-engineer/SKILL.md +84 -26
- package/skills/platform-engineering-opentofu/SKILL.md +91 -19
- package/skills/playwright-ai-e2e/SKILL.md +92 -20
- package/skills/playwright-best-practices/SKILL.md +85 -27
- package/skills/polish/SKILL.md +92 -22
- package/skills/powershell-windows/SKILL.md +92 -22
- package/skills/pricing-page/SKILL.md +92 -22
- package/skills/product-aware-heuristics/SKILL.md +93 -23
- package/skills/progressive-blur/SKILL.md +92 -22
- package/skills/project-idioms/SKILL.md +93 -23
- package/skills/property-based-testing/SKILL.md +92 -20
- package/skills/python-patterns/SKILL.md +84 -26
- package/skills/python-pro/SKILL.md +83 -22
- package/skills/quieter/SKILL.md +92 -22
- package/skills/react-doctor/SKILL.md +92 -22
- package/skills/react-specialist/SKILL.md +83 -22
- package/skills/readme-builder/SKILL.md +84 -26
- package/skills/realtime-patterns/SKILL.md +92 -22
- package/skills/red-team-tactics/SKILL.md +83 -22
- package/skills/redesign-skill/SKILL.md +92 -22
- package/skills/review-animations/SKILL.md +92 -22
- package/skills/rust-pro/SKILL.md +83 -22
- package/skills/semantic-filesystem-navigation/SKILL.md +79 -24
- package/skills/seo-fundamentals/SKILL.md +84 -26
- package/skills/server-management/SKILL.md +84 -26
- package/skills/session-log-interrogation/SKILL.md +81 -29
- package/skills/shadcn-ui-expert/SKILL.md +84 -26
- package/skills/shape/SKILL.md +93 -23
- package/skills/skill-creator/SKILL.md +88 -20
- package/skills/soft-skill/SKILL.md +92 -22
- package/skills/sounds-on-the-web/SKILL.md +92 -22
- package/skills/sql-pro/SKILL.md +83 -22
- package/skills/subagent-driven-development/SKILL.md +92 -32
- package/skills/supabase-postgres-best-practices/SKILL.md +83 -22
- package/skills/svg-animation/SKILL.md +93 -24
- package/skills/swiftui-expert/SKILL.md +84 -26
- package/skills/swiss-design/SKILL.md +92 -22
- package/skills/system-design-pro/SKILL.md +90 -16
- package/skills/systematic-debugging/SKILL.md +85 -27
- package/skills/tailwind-patterns/SKILL.md +92 -22
- package/skills/taste-skill/SKILL.md +92 -22
- package/skills/tdd-workflow/SKILL.md +84 -23
- package/skills/test-result-analyzer/SKILL.md +93 -23
- package/skills/testing-patterns/SKILL.md +93 -23
- package/skills/thermo-nuclear-code-quality-review/SKILL.md +92 -22
- package/skills/thinking-protocol/SKILL.md +79 -21
- package/skills/to-spring-or-not-to-spring/SKILL.md +92 -22
- package/skills/train-sentence-transformers/SKILL.md +86 -8
- package/skills/transformers-js/SKILL.md +86 -15
- package/skills/transitions-dev/SKILL.md +92 -22
- package/skills/trend-researcher/SKILL.md +92 -22
- package/skills/tribunal-instincts-memory/SKILL.md +86 -31
- package/skills/trl-training/SKILL.md +86 -16
- package/skills/typescript-advanced/SKILL.md +83 -22
- package/skills/typeset/SKILL.md +92 -22
- package/skills/ui-reasoning-engine/SKILL.md +93 -23
- package/skills/ui-skill-packs/SKILL.md +94 -24
- package/skills/ui-skills-root/SKILL.md +94 -24
- package/skills/ui-ux-pro-max/SKILL.md +93 -23
- package/skills/ui-ux-researcher/SKILL.md +92 -22
- package/skills/vector-search-pgvector/SKILL.md +91 -19
- package/skills/verification-before-completion/SKILL.md +90 -18
- package/skills/vue-expert/SKILL.md +83 -22
- package/skills/vulnerability-scanner/SKILL.md +93 -26
- package/skills/web-accessibility-auditor/SKILL.md +84 -26
- package/skills/web-design-guidelines/SKILL.md +92 -22
- package/skills/web-quality-audit/SKILL.md +92 -22
- package/skills/webapp-testing/SKILL.md +85 -27
- package/skills/webgpu-performance/SKILL.md +92 -22
- package/skills/whimsy-injector/SKILL.md +93 -23
- package/skills/workflow-optimizer/SKILL.md +93 -23
- package/skills/zero-trust-passkeys/SKILL.md +91 -19
- package/src/browser/audit.js +11 -7
- package/src/browser/case_bridge.js +4 -3
- package/src/browser/cdp.js +60 -47
- package/src/browser/discovery.js +22 -12
- package/src/browser/idpi.js +6 -3
- package/src/browser/index.js +3 -2
- package/src/browser/launcher.js +49 -3
- package/src/browser/sentinel.js +13 -7
- package/src/browser/synapse.js +1 -1
- package/src/browser/trimmer.js +16 -7
- package/src/cli.js +404 -349
- package/src/commands/align.js +184 -177
- package/src/commands/arch.js +261 -0
- package/src/commands/audit-web.js +20 -6
- package/src/commands/browse.js +9 -3
- package/src/commands/case.js +93 -66
- package/src/commands/compare-web.js +12 -4
- package/src/commands/compile.js +81 -75
- package/src/commands/context.js +167 -63
- package/src/commands/contract.js +89 -106
- package/src/commands/deconstruct.js +18 -6
- package/src/commands/graph.js +47 -39
- package/src/commands/guardrail.js +45 -73
- package/src/commands/heal.js +15 -5
- package/src/commands/hook.js +29 -25
- package/src/commands/init.js +398 -329
- package/src/commands/learn.js +198 -107
- package/src/commands/marathon.js +65 -42
- package/src/commands/memory.js +501 -391
- package/src/commands/minimal.js +73 -59
- package/src/commands/mutate.js +31 -27
- package/src/commands/native.js +235 -81
- package/src/commands/optimize.js +303 -270
- package/src/commands/review.js +971 -0
- package/src/commands/sdd.js +65 -55
- package/src/commands/skill-intelligence.js +1165 -0
- package/src/commands/status.js +15 -5
- package/src/commands/sync.js +24 -22
- package/src/commands/system1.js +413 -0
- package/src/commands/uninstall.js +59 -50
- package/src/commands/update.js +41 -34
- package/src/commands/validate.js +13 -5
- package/src/context/ranker.js +337 -0
- package/src/esm/index.mjs +3 -1
- package/src/evolution/engine.js +296 -0
- package/src/mcp/server.js +2 -2
- package/src/synthesis/claim_check_separator.js +294 -0
- package/src/system1/browser_intelligence.js +300 -0
- package/src/system1/constants.js +49 -0
- package/src/system1/decision_engine.js +498 -0
- package/src/system1/evidence_engine.js +602 -0
- package/src/system1/evolution_pipeline.js +581 -0
- package/src/system1/index.d.ts +114 -0
- package/src/system1/index.js +102 -0
- package/src/system1/laya-package-lock.json +303 -0
- package/src/system1/laya-package.json +16 -0
- package/src/system1/provider.js +127 -0
- package/src/system1/reviewer_orchestrator.js +477 -0
- package/src/tui/banner.js +1 -1
- package/src/tui/reviewer-grid.js +3 -7
- package/src/tui/shimmer.js +1 -3
- package/src/tui/theme.js +20 -20
- package/src/tui/wizard.js +4 -8
- package/src/types.js +2 -2
- package/src/utils/fs.js +106 -78
- package/src/utils/hasher.js +90 -88
- package/src/utils/helpers.js +40 -41
- package/src/utils/logger.js +38 -31
- package/src/utils/version.js +120 -101
- package/scripts/apply-version.js +0 -57
- package/scripts/audit_skill_sdo.js +0 -89
- package/scripts/benchmark.js +0 -231
- package/scripts/build-graph.js +0 -71
- package/scripts/changelog.js +0 -190
- package/scripts/clean-pycache.js +0 -42
- package/scripts/context_compiler.js +0 -1143
- package/scripts/fix-vbc.js +0 -96
- package/scripts/fix-vbc.ps1 +0 -3
- package/scripts/modernize_skills.js +0 -268
- package/scripts/package-cores.js +0 -116
- package/scripts/skill_enhancement_engine.js +0 -608
- package/scripts/stress_benchmark.js +0 -358
- package/scripts/sync-skills.js +0 -61
- package/scripts/sync-version.js +0 -177
- package/scripts/telemetry_gc.js +0 -156
- package/scripts/validate-payload.js +0 -73
- package/scripts/visual_audit.js +0 -136
|
@@ -0,0 +1,1371 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* skill_intelligence.js — Tribunal Kit Skill Intelligence Engine
|
|
4
|
+
* =================================================================
|
|
5
|
+
* Enforces the core operating principle:
|
|
6
|
+
* DISCOVER FIRST.
|
|
7
|
+
* COMPOSE SECOND.
|
|
8
|
+
* CREATE ONLY WHEN NECESSARY.
|
|
9
|
+
* VERIFY ALWAYS.
|
|
10
|
+
*
|
|
11
|
+
* Implements Phase 2:
|
|
12
|
+
* - Concept Discovery (Explicit & Implicit)
|
|
13
|
+
* - Engineering Consideration Matrix (Critical / High / Medium / Low)
|
|
14
|
+
* - Skill Coverage Matrix (FULL / PARTIAL / NONE)
|
|
15
|
+
* - Dependency-Aware Capability Pipeline DAG
|
|
16
|
+
* - 11-Check New Skill Creation Gate
|
|
17
|
+
* - Concept-Aligned Verification Plan
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* node scripts/skill_intelligence.js --query "Build payment API with idempotency and retry"
|
|
21
|
+
* node scripts/skill_intelligence.js --gate --need "webhook-reconciliation"
|
|
22
|
+
* node scripts/skill_intelligence.js --audit
|
|
23
|
+
* node scripts/skill_intelligence.js --query "..." --json
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
'use strict';
|
|
27
|
+
|
|
28
|
+
const fs = require('fs');
|
|
29
|
+
const path = require('path');
|
|
30
|
+
|
|
31
|
+
// Colors fallback
|
|
32
|
+
const CYAN = '\x1b[36m',
|
|
33
|
+
GREEN = '\x1b[32m',
|
|
34
|
+
YELLOW = '\x1b[33m',
|
|
35
|
+
RED = '\x1b[31m',
|
|
36
|
+
BOLD = '\x1b[1m',
|
|
37
|
+
DIM = '\x1b[2m',
|
|
38
|
+
RESET = '\x1b[0m';
|
|
39
|
+
|
|
40
|
+
const { extractConcepts } = require('./concept_extractor');
|
|
41
|
+
const { generateConsiderations } = require('./consideration_engine');
|
|
42
|
+
const { evaluateCoverage } = require('./coverage_engine');
|
|
43
|
+
const { auditPostExecution, generateImprovementProposal } = require('./verification_auditor');
|
|
44
|
+
const {
|
|
45
|
+
evaluateMateriality,
|
|
46
|
+
checkMinimumSufficientEngineering,
|
|
47
|
+
determineOutcomeBudget,
|
|
48
|
+
} = require('./materiality_engine');
|
|
49
|
+
const {
|
|
50
|
+
determineQualityDimensions,
|
|
51
|
+
generateOutcomeContract,
|
|
52
|
+
detectTradeoffs,
|
|
53
|
+
auditOutcome,
|
|
54
|
+
evaluateOutcomeRegression,
|
|
55
|
+
} = require('./outcome_engine');
|
|
56
|
+
const {
|
|
57
|
+
EVIDENCE_LEVELS,
|
|
58
|
+
REVERSIBILITY_LEVELS,
|
|
59
|
+
classifyEvidence,
|
|
60
|
+
createUncertaintyRecord,
|
|
61
|
+
calculateInformationValue,
|
|
62
|
+
classifyReversibility,
|
|
63
|
+
recordDecision,
|
|
64
|
+
invalidateDecision,
|
|
65
|
+
detectRequirementConflicts,
|
|
66
|
+
runCounterfactualAnalysis,
|
|
67
|
+
detectEngineeringSmells,
|
|
68
|
+
evaluateEscalation,
|
|
69
|
+
evaluateJudgmentState,
|
|
70
|
+
} = require('./judgment_engine');
|
|
71
|
+
const {
|
|
72
|
+
DynamicCapabilityGraph,
|
|
73
|
+
adaptPipelineOnSignal,
|
|
74
|
+
analyzeChangeImpact,
|
|
75
|
+
recordEngineeringLesson,
|
|
76
|
+
recallRelevantLessons,
|
|
77
|
+
evaluateSkillEffectiveness,
|
|
78
|
+
runFinalEngineeringReview,
|
|
79
|
+
} = require('./adaptive_execution');
|
|
80
|
+
const {
|
|
81
|
+
MEMORY_TYPES,
|
|
82
|
+
PROVENANCE_TYPES,
|
|
83
|
+
TRUST_STATES,
|
|
84
|
+
TRUST_RANKS,
|
|
85
|
+
MEMORY_SCOPES,
|
|
86
|
+
sanitizeContentAndEvidence,
|
|
87
|
+
validateMemoryAdmission,
|
|
88
|
+
createMemoryRecord,
|
|
89
|
+
validateApplicability,
|
|
90
|
+
evaluateMemoryStaleness,
|
|
91
|
+
evaluateMemoryHypothesisWithCurrentEvidence,
|
|
92
|
+
recordConflictResolution,
|
|
93
|
+
MemoryGraph,
|
|
94
|
+
EngineeringMemoryStore,
|
|
95
|
+
getEngineeringMemoryStore,
|
|
96
|
+
retrieveRelevantMemories,
|
|
97
|
+
extractEngineeringMemory,
|
|
98
|
+
} = require('./engineering_memory');
|
|
99
|
+
const {
|
|
100
|
+
SkillTelemetryRegistry,
|
|
101
|
+
getSkillTelemetryRegistry,
|
|
102
|
+
CapabilityGapTracker,
|
|
103
|
+
getCapabilityGapTracker,
|
|
104
|
+
PROPOSAL_STATUS,
|
|
105
|
+
SkillImprovementManager,
|
|
106
|
+
getSkillImprovementManager,
|
|
107
|
+
Phase5MetricsTracker,
|
|
108
|
+
getPhase5MetricsTracker,
|
|
109
|
+
} = require('./capability_evolution');
|
|
110
|
+
const {
|
|
111
|
+
FAILURE_TAXONOMY,
|
|
112
|
+
BLAST_RADIUS_TIERS,
|
|
113
|
+
SIMULATION_LEVELS,
|
|
114
|
+
PREDICTION_STATUS,
|
|
115
|
+
createPredictionRecord,
|
|
116
|
+
analyzeBlastRadius,
|
|
117
|
+
buildFailureChains,
|
|
118
|
+
simulateDependencyFailures,
|
|
119
|
+
simulateConcurrencyRisks,
|
|
120
|
+
simulateRetryAmplification,
|
|
121
|
+
simulateDatabaseFailures,
|
|
122
|
+
simulateQueueFailures,
|
|
123
|
+
simulateCacheFailures,
|
|
124
|
+
simulateCapacityAndQueueing,
|
|
125
|
+
simulateLatencyBudget,
|
|
126
|
+
runSecurityPreMortem,
|
|
127
|
+
runAgentPreMortem,
|
|
128
|
+
runCostPreMortem,
|
|
129
|
+
simulateDeploymentAndRecovery,
|
|
130
|
+
generateChaosScenarios,
|
|
131
|
+
detectUnsupportedClaims,
|
|
132
|
+
determineSimulationLevel,
|
|
133
|
+
runPreMortem,
|
|
134
|
+
comparePredictionsWithObserved,
|
|
135
|
+
Phase6MetricsTracker,
|
|
136
|
+
getPhase6MetricsTracker,
|
|
137
|
+
} = require('./simulation_engine');
|
|
138
|
+
const {
|
|
139
|
+
RELATIONSHIP_TYPES,
|
|
140
|
+
INTERACTION_PRIORITY,
|
|
141
|
+
INTERACTION_CONFIDENCE,
|
|
142
|
+
runCrossDomainAnalysis,
|
|
143
|
+
Phase9MetricsTracker,
|
|
144
|
+
getPhase9MetricsTracker,
|
|
145
|
+
} = require('./cross_domain_engine');
|
|
146
|
+
const {
|
|
147
|
+
OUTCOME_INVARIANT,
|
|
148
|
+
REQUIREMENT_SOURCES,
|
|
149
|
+
REQUIREMENT_CATEGORIES,
|
|
150
|
+
REQUIREMENT_PRIORITY: PHASE10_REQUIREMENT_PRIORITY,
|
|
151
|
+
COMPLEXITY_BUDGETS,
|
|
152
|
+
ASSUMPTION_STATUS,
|
|
153
|
+
REVERSIBILITY_LEVELS: PHASE10_REVERSIBILITY_LEVELS,
|
|
154
|
+
CAPABILITY_DEPTH,
|
|
155
|
+
REASONING_DEPTH,
|
|
156
|
+
discoverRequirements,
|
|
157
|
+
evaluateComplexityBudget,
|
|
158
|
+
auditArchitectureJustification,
|
|
159
|
+
generateDecisionRecords,
|
|
160
|
+
analyzeAssumptionsAndUnknowns,
|
|
161
|
+
buildSolutionShape,
|
|
162
|
+
verifyOutcomeAndRegressions,
|
|
163
|
+
runOutcomeOptimization,
|
|
164
|
+
evaluateSkillSelection,
|
|
165
|
+
Phase10OutcomeMemory,
|
|
166
|
+
getPhase10OutcomeMemory,
|
|
167
|
+
runAntiShortcutCheck,
|
|
168
|
+
runAntiOverengineeringCheck,
|
|
169
|
+
Phase10MetricsTracker,
|
|
170
|
+
getPhase10MetricsTracker,
|
|
171
|
+
} = require('./outcome_optimization_engine');
|
|
172
|
+
|
|
173
|
+
const _skillsCache = new Map();
|
|
174
|
+
|
|
175
|
+
function clearSkillsCache() {
|
|
176
|
+
_skillsCache.clear();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const STOP_WORDS = new Set([
|
|
180
|
+
'and',
|
|
181
|
+
'the',
|
|
182
|
+
'for',
|
|
183
|
+
'with',
|
|
184
|
+
'from',
|
|
185
|
+
'that',
|
|
186
|
+
'this',
|
|
187
|
+
'have',
|
|
188
|
+
'has',
|
|
189
|
+
'are',
|
|
190
|
+
'was',
|
|
191
|
+
'were',
|
|
192
|
+
'build',
|
|
193
|
+
'create',
|
|
194
|
+
'make',
|
|
195
|
+
'add',
|
|
196
|
+
'get',
|
|
197
|
+
'use',
|
|
198
|
+
'using',
|
|
199
|
+
'how',
|
|
200
|
+
'what',
|
|
201
|
+
'when',
|
|
202
|
+
'where',
|
|
203
|
+
'which',
|
|
204
|
+
'who',
|
|
205
|
+
'why',
|
|
206
|
+
'can',
|
|
207
|
+
'should',
|
|
208
|
+
'will',
|
|
209
|
+
'would',
|
|
210
|
+
'could',
|
|
211
|
+
'into',
|
|
212
|
+
'onto',
|
|
213
|
+
'about',
|
|
214
|
+
'than',
|
|
215
|
+
'then',
|
|
216
|
+
'also',
|
|
217
|
+
]);
|
|
218
|
+
|
|
219
|
+
function findAgentDir(start) {
|
|
220
|
+
let cur = path.resolve(start || process.cwd());
|
|
221
|
+
while (cur) {
|
|
222
|
+
const candidate = path.join(cur, '.agent');
|
|
223
|
+
if (fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()) {
|
|
224
|
+
return candidate;
|
|
225
|
+
}
|
|
226
|
+
const parent = path.dirname(cur);
|
|
227
|
+
if (parent === cur) break;
|
|
228
|
+
cur = parent;
|
|
229
|
+
}
|
|
230
|
+
return path.resolve('.agent');
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Failure modes mapping to high-signal skills
|
|
234
|
+
const FAILURE_SIGNALS = [
|
|
235
|
+
{
|
|
236
|
+
match: /(?:retry|duplicate|idempot|replay|network fail|double charge|dedup)/i,
|
|
237
|
+
skills: ['error-resilience', 'api-patterns'],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
match: /(?:transaction|acid|rollback|atomic|deadlock|isolation)/i,
|
|
241
|
+
skills: ['database-design', 'sql-pro', 'error-resilience'],
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
match: /(?:n\+1|slow query|index|query optim|latency|explain)/i,
|
|
245
|
+
skills: ['sql-pro', 'database-design'],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
match: /(?:auth|jwt|token|session|csrf|xss|injection|owasp|credential)/i,
|
|
249
|
+
skills: ['agentshield-security', 'audit-and-fix', 'authentication-best-practices'],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
match: /(?:responsive|mobile|breakpoint|touch|layout shift|cls)/i,
|
|
253
|
+
skills: ['adapt', 'mobile-design', 'better-ui'],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
match: /(?:memory leak|oom|heap|profiling|saturation|cpu)/i,
|
|
257
|
+
skills: ['performance-profiling'],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
match: /(?:regression|flaky|test fail|mock drift)/i,
|
|
261
|
+
skills: ['tdd-workflow', 'testing-patterns', 'verification-before-completion'],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
match: /(?:race condition|concurrency|mutex|lock|semaphore)/i,
|
|
265
|
+
skills: ['error-resilience', 'system-design-pro'],
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
match: /(?:prompt injection|jailbreak|llm security|hallucin)/i,
|
|
269
|
+
skills: ['ai-prompt-injection-defense', 'anti-slop-enforcement'],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
match: /(?:ci|cd|pipeline|github action|docker|deploy)/i,
|
|
273
|
+
skills: ['cicd-pro', 'devops-engineer'],
|
|
274
|
+
},
|
|
275
|
+
];
|
|
276
|
+
|
|
277
|
+
// Pipeline execution order weights (lower = earlier in DAG)
|
|
278
|
+
const PIPELINE_ORDER = {
|
|
279
|
+
architecture: 10,
|
|
280
|
+
'domain-modeling': 15,
|
|
281
|
+
'database-design': 20,
|
|
282
|
+
'sql-pro': 25,
|
|
283
|
+
'api-patterns': 30,
|
|
284
|
+
'clean-code': 35,
|
|
285
|
+
'error-resilience': 40,
|
|
286
|
+
'frontend-design': 45,
|
|
287
|
+
adapt: 50,
|
|
288
|
+
'better-ui': 55,
|
|
289
|
+
'tdd-workflow': 60,
|
|
290
|
+
'testing-patterns': 65,
|
|
291
|
+
'verification-before-completion': 70,
|
|
292
|
+
'agentshield-security': 80,
|
|
293
|
+
'audit-and-fix': 85,
|
|
294
|
+
'performance-profiling': 90,
|
|
295
|
+
'cicd-pro': 95,
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
function parseSkillFrontmatter(content) {
|
|
299
|
+
const match = content.match(/^---\s*([\s\S]*?)\s*---/);
|
|
300
|
+
if (!match) return {};
|
|
301
|
+
const lines = match[1].split('\n');
|
|
302
|
+
const meta = {};
|
|
303
|
+
for (const line of lines) {
|
|
304
|
+
const colon = line.indexOf(':');
|
|
305
|
+
if (colon !== -1) {
|
|
306
|
+
const key = line.slice(0, colon).trim();
|
|
307
|
+
const val = line
|
|
308
|
+
.slice(colon + 1)
|
|
309
|
+
.trim()
|
|
310
|
+
.replace(/^['"]|['"]$/g, '');
|
|
311
|
+
meta[key] = val;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return meta;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function loadAllSkills(agentDir) {
|
|
318
|
+
agentDir = agentDir || findAgentDir(process.cwd());
|
|
319
|
+
const cacheKey = path.resolve(agentDir);
|
|
320
|
+
if (_skillsCache.has(cacheKey)) {
|
|
321
|
+
return _skillsCache.get(cacheKey);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
let skillsDir = path.join(agentDir, 'skills');
|
|
325
|
+
if (!fs.existsSync(skillsDir)) {
|
|
326
|
+
const rootSkills = path.join(path.dirname(agentDir), 'skills');
|
|
327
|
+
if (fs.existsSync(rootSkills)) {
|
|
328
|
+
skillsDir = rootSkills;
|
|
329
|
+
} else {
|
|
330
|
+
return [];
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const list = [];
|
|
335
|
+
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
336
|
+
for (const entry of entries) {
|
|
337
|
+
if (!entry.isDirectory()) continue;
|
|
338
|
+
const skillName = entry.name;
|
|
339
|
+
const skillPath = path.join(skillsDir, skillName, 'SKILL.md');
|
|
340
|
+
let description = '';
|
|
341
|
+
let domain = 'general';
|
|
342
|
+
let triggers = [];
|
|
343
|
+
|
|
344
|
+
if (fs.existsSync(skillPath)) {
|
|
345
|
+
try {
|
|
346
|
+
const text = fs.readFileSync(skillPath, 'utf8');
|
|
347
|
+
const meta = parseSkillFrontmatter(text);
|
|
348
|
+
description = meta.description || '';
|
|
349
|
+
domain = meta.domain || 'general';
|
|
350
|
+
if (meta.triggers) {
|
|
351
|
+
triggers = meta.triggers.split(',').map(s => s.trim().toLowerCase());
|
|
352
|
+
}
|
|
353
|
+
} catch (_) {}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
list.push({
|
|
357
|
+
name: skillName,
|
|
358
|
+
description,
|
|
359
|
+
domain,
|
|
360
|
+
triggers,
|
|
361
|
+
path: skillPath,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
_skillsCache.set(cacheKey, list);
|
|
365
|
+
return list;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function discoverSkills(taskQuery, agentDir) {
|
|
369
|
+
const allSkills = loadAllSkills(agentDir);
|
|
370
|
+
const q = taskQuery.toLowerCase();
|
|
371
|
+
const rawTokens = q.split(/\W+/).filter(t => t.length > 2);
|
|
372
|
+
const queryTokens = rawTokens.filter(t => !STOP_WORDS.has(t));
|
|
373
|
+
|
|
374
|
+
// Evaluate failure mode hits
|
|
375
|
+
const failureSkills = new Set();
|
|
376
|
+
for (const sig of FAILURE_SIGNALS) {
|
|
377
|
+
if (sig.match.test(q)) {
|
|
378
|
+
sig.skills.forEach(s => failureSkills.add(s));
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const scored = [];
|
|
383
|
+
|
|
384
|
+
for (const skill of allSkills) {
|
|
385
|
+
let score = 0;
|
|
386
|
+
const sName = skill.name.toLowerCase();
|
|
387
|
+
const sDesc = skill.description.toLowerCase();
|
|
388
|
+
|
|
389
|
+
// Exact skill name in query
|
|
390
|
+
if (q.includes(sName.replace(/-/g, ' ')) || q.includes(sName)) {
|
|
391
|
+
score += 15;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Token matches in skill name
|
|
395
|
+
for (const token of queryTokens) {
|
|
396
|
+
if (sName === token) {
|
|
397
|
+
score += 12;
|
|
398
|
+
} else if (sName.includes(token)) {
|
|
399
|
+
score += 6;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Trigger matches
|
|
403
|
+
if (skill.triggers.some(tr => tr.includes(token))) {
|
|
404
|
+
score += 8;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Description token match (exact word boundary)
|
|
408
|
+
const wordRegex = new RegExp(`\\b${token}\\b`, 'i');
|
|
409
|
+
if (wordRegex.test(sDesc)) {
|
|
410
|
+
score += 3;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// Failure mode signal boost
|
|
415
|
+
if (failureSkills.has(skill.name)) {
|
|
416
|
+
score += 10;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (score >= 4) {
|
|
420
|
+
let state = 'OPTIONAL';
|
|
421
|
+
if (score >= 12) {
|
|
422
|
+
state = 'MANDATORY';
|
|
423
|
+
} else if (score >= 6) {
|
|
424
|
+
state = 'RECOMMENDED';
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
scored.push({
|
|
428
|
+
skill: skill.name,
|
|
429
|
+
score,
|
|
430
|
+
state,
|
|
431
|
+
domain: skill.domain,
|
|
432
|
+
description: skill.description,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// Sort descending by score
|
|
438
|
+
scored.sort((a, b) => b.score - a.score);
|
|
439
|
+
|
|
440
|
+
// Composed Execution Pipeline: Mandatory + Recommended skills (ordered by pipeline stage)
|
|
441
|
+
const pipelineCandidates = scored.filter(
|
|
442
|
+
s => s.state === 'MANDATORY' || s.state === 'RECOMMENDED',
|
|
443
|
+
);
|
|
444
|
+
const pipeline = [...pipelineCandidates].sort((a, b) => {
|
|
445
|
+
const orderA = PIPELINE_ORDER[a.skill] || 50;
|
|
446
|
+
const orderB = PIPELINE_ORDER[b.skill] || 50;
|
|
447
|
+
return orderA - orderB;
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
return {
|
|
451
|
+
query: taskQuery,
|
|
452
|
+
totalDiscovered: scored.length,
|
|
453
|
+
mandatory: scored.filter(s => s.state === 'MANDATORY'),
|
|
454
|
+
recommended: scored.filter(s => s.state === 'RECOMMENDED'),
|
|
455
|
+
optional: scored.filter(s => s.state === 'OPTIONAL'),
|
|
456
|
+
pipeline: pipeline.map(p => p.skill),
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function generateVerificationPlan(conceptData, considerations, coverageData) {
|
|
461
|
+
const plan = [];
|
|
462
|
+
for (const c of conceptData.all_concepts || []) {
|
|
463
|
+
switch (c.id) {
|
|
464
|
+
case 'idempotency':
|
|
465
|
+
plan.push({
|
|
466
|
+
target: 'idempotency',
|
|
467
|
+
test: 'Duplicate Request Safety',
|
|
468
|
+
action:
|
|
469
|
+
'Replay request with identical idempotency key; verify exactly one business effect executed.',
|
|
470
|
+
});
|
|
471
|
+
break;
|
|
472
|
+
case 'transaction-integrity':
|
|
473
|
+
plan.push({
|
|
474
|
+
target: 'transaction-integrity',
|
|
475
|
+
test: 'Atomic Rollback on Error',
|
|
476
|
+
action:
|
|
477
|
+
'Simulate mid-operation failure; verify database state rolls back completely without partial commits.',
|
|
478
|
+
});
|
|
479
|
+
break;
|
|
480
|
+
case 'concurrency-control':
|
|
481
|
+
plan.push({
|
|
482
|
+
target: 'concurrency-control',
|
|
483
|
+
test: 'Concurrent Mutation Race Test',
|
|
484
|
+
action:
|
|
485
|
+
'Dispatch parallel concurrent requests for same entity; verify race conditions are serialized/rejected.',
|
|
486
|
+
});
|
|
487
|
+
break;
|
|
488
|
+
case 'retry-and-backoff':
|
|
489
|
+
plan.push({
|
|
490
|
+
target: 'retry-and-backoff',
|
|
491
|
+
test: 'Retry Jitter & Circuit Breaking',
|
|
492
|
+
action:
|
|
493
|
+
'Simulate downstream latency/failure; verify retry backoff applies jitter and triggers circuit breaker.',
|
|
494
|
+
});
|
|
495
|
+
break;
|
|
496
|
+
case 'query-optimization':
|
|
497
|
+
plan.push({
|
|
498
|
+
target: 'query-optimization',
|
|
499
|
+
test: 'EXPLAIN Query Plan & Index Verification',
|
|
500
|
+
action:
|
|
501
|
+
'Run EXPLAIN ANALYZE on query; verify index scan is utilized and table scan is avoided.',
|
|
502
|
+
});
|
|
503
|
+
break;
|
|
504
|
+
case 'authentication-and-authorization':
|
|
505
|
+
plan.push({
|
|
506
|
+
target: 'authentication-and-authorization',
|
|
507
|
+
test: 'Unauthorized & Expired Token Rejection',
|
|
508
|
+
action:
|
|
509
|
+
'Send malformed, expired, and unauthorized requests; verify strict 401/403 rejection before business logic.',
|
|
510
|
+
});
|
|
511
|
+
break;
|
|
512
|
+
case 'input-validation-and-sanitization':
|
|
513
|
+
plan.push({
|
|
514
|
+
target: 'input-validation-and-sanitization',
|
|
515
|
+
test: 'Schema Boundary Mutation Defense',
|
|
516
|
+
action:
|
|
517
|
+
'Inject unexpected types and boundary extremes; verify 422 Unprocessable Entity without crashing.',
|
|
518
|
+
});
|
|
519
|
+
break;
|
|
520
|
+
case 'file-upload-and-storage':
|
|
521
|
+
plan.push({
|
|
522
|
+
target: 'file-upload-and-storage',
|
|
523
|
+
test: 'MIME Verification & Byte-Limit Defense',
|
|
524
|
+
action: 'Upload oversized and spoofed MIME files; verify immediate rejection.',
|
|
525
|
+
});
|
|
526
|
+
break;
|
|
527
|
+
case 'ai-agent-security-and-sandboxing':
|
|
528
|
+
plan.push({
|
|
529
|
+
target: 'ai-agent-security-and-sandboxing',
|
|
530
|
+
test: 'Subprocess Permission Boundary Check',
|
|
531
|
+
action: 'Inject shell escapes; verify permission gate blocks unauthorized system calls.',
|
|
532
|
+
});
|
|
533
|
+
break;
|
|
534
|
+
case 'realtime-collaboration-and-sync':
|
|
535
|
+
plan.push({
|
|
536
|
+
target: 'realtime-collaboration-and-sync',
|
|
537
|
+
test: 'CRDT Concurrent Edit Convergence',
|
|
538
|
+
action:
|
|
539
|
+
'Simulate concurrent conflicting edits from multiple clients; verify deterministic state convergence.',
|
|
540
|
+
});
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (plan.length === 0) {
|
|
546
|
+
plan.push({
|
|
547
|
+
target: 'general-verification',
|
|
548
|
+
test: 'Functional Contract Verification',
|
|
549
|
+
action: 'Run unit test suite and verify expected return schema and error handling.',
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
return plan;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function analyzeTask(taskQuery, agentDir, options = {}) {
|
|
557
|
+
if (typeof agentDir === 'object' && agentDir !== null && !options.store) {
|
|
558
|
+
options = agentDir;
|
|
559
|
+
agentDir = undefined;
|
|
560
|
+
}
|
|
561
|
+
agentDir = agentDir || findAgentDir(process.cwd());
|
|
562
|
+
const conceptData = extractConcepts(taskQuery, agentDir);
|
|
563
|
+
const considerations = generateConsiderations(conceptData, agentDir);
|
|
564
|
+
|
|
565
|
+
// Phase 5: Retrieve relevant engineering memory as hypotheses
|
|
566
|
+
const memStore = options.store || getEngineeringMemoryStore();
|
|
567
|
+
const metricsTracker = getPhase5MetricsTracker();
|
|
568
|
+
metricsTracker.recordEvent('total_retrieval_queries');
|
|
569
|
+
|
|
570
|
+
const retrievedMemories = retrieveRelevantMemories(
|
|
571
|
+
taskQuery,
|
|
572
|
+
{
|
|
573
|
+
concepts: conceptData.all_concepts,
|
|
574
|
+
technologies: options.technologies || [],
|
|
575
|
+
project_id: options.project_id || null,
|
|
576
|
+
scale: options.scale,
|
|
577
|
+
strict_freshness: options.strict_freshness,
|
|
578
|
+
},
|
|
579
|
+
memStore,
|
|
580
|
+
options,
|
|
581
|
+
);
|
|
582
|
+
|
|
583
|
+
metricsTracker.recordEvent('relevant_memories_retrieved', retrievedMemories.length);
|
|
584
|
+
|
|
585
|
+
const patternHypotheses = retrievedMemories.filter(m => m.type === MEMORY_TYPES.PATTERN);
|
|
586
|
+
const failureHypotheses = retrievedMemories.filter(
|
|
587
|
+
m => m.type === MEMORY_TYPES.FAILURE || m.type === MEMORY_TYPES.ANTI_PATTERN,
|
|
588
|
+
);
|
|
589
|
+
const verificationStrategies = retrievedMemories.filter(
|
|
590
|
+
m => m.type === MEMORY_TYPES.VERIFICATION,
|
|
591
|
+
);
|
|
592
|
+
const pastDecisions = retrievedMemories.filter(m => m.type === MEMORY_TYPES.DECISION);
|
|
593
|
+
|
|
594
|
+
// Surface failure memories into considerations risks (Section 10 & 11)
|
|
595
|
+
if (failureHypotheses.length > 0) {
|
|
596
|
+
metricsTracker.recordEvent('repeated_failures_prevented', failureHypotheses.length);
|
|
597
|
+
for (const f of failureHypotheses) {
|
|
598
|
+
const riskStr = `[HISTORICAL FAILURE PREVENTED] ${f.title}`;
|
|
599
|
+
if (!considerations.risks.some(r => typeof r === 'string' && r.includes(f.title))) {
|
|
600
|
+
considerations.risks.push(riskStr);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
const discoveredSkills = discoverSkills(taskQuery, agentDir);
|
|
606
|
+
const allSkills = loadAllSkills(agentDir);
|
|
607
|
+
const coverageData = evaluateCoverage(conceptData, discoveredSkills, allSkills);
|
|
608
|
+
|
|
609
|
+
const pipelineSet = new Set(discoveredSkills.pipeline);
|
|
610
|
+
for (const add of coverageData.candidate_additions) {
|
|
611
|
+
pipelineSet.add(add);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
const composedPipeline = Array.from(pipelineSet).sort((a, b) => {
|
|
615
|
+
const orderA = PIPELINE_ORDER[a] || 50;
|
|
616
|
+
const orderB = PIPELINE_ORDER[b] || 50;
|
|
617
|
+
return orderA - orderB;
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
const verificationPlan = generateVerificationPlan(conceptData, considerations, coverageData);
|
|
621
|
+
|
|
622
|
+
// Enhance verification plan with verified strategies from memory (Section 12)
|
|
623
|
+
if (verificationStrategies.length > 0) {
|
|
624
|
+
metricsTracker.recordEvent('verification_strategies_reused', verificationStrategies.length);
|
|
625
|
+
for (const vs of verificationStrategies) {
|
|
626
|
+
if (
|
|
627
|
+
!verificationPlan.some(vp => vp.test === vs.verification?.strategy || vp.test === vs.title)
|
|
628
|
+
) {
|
|
629
|
+
verificationPlan.unshift({
|
|
630
|
+
target: vs.concepts?.[0] || 'memory-verified-strategy',
|
|
631
|
+
test: vs.title,
|
|
632
|
+
action: `${vs.verification?.strategy || vs.content}. Assertion: ${vs.verification?.assertion || 'Strict property verification'}`,
|
|
633
|
+
provenance: vs.provenance,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
const materiality = evaluateMateriality(
|
|
640
|
+
considerations.all_considerations,
|
|
641
|
+
taskQuery,
|
|
642
|
+
conceptData,
|
|
643
|
+
);
|
|
644
|
+
const outcomeContract = generateOutcomeContract(taskQuery, conceptData, considerations, {
|
|
645
|
+
agentDir,
|
|
646
|
+
});
|
|
647
|
+
const tradeoffs = detectTradeoffs(composedPipeline);
|
|
648
|
+
|
|
649
|
+
const conceptsArray = conceptData.all_concepts.map(c => ({
|
|
650
|
+
id: c.id,
|
|
651
|
+
name: c.name,
|
|
652
|
+
domain: c.domain,
|
|
653
|
+
implicit: !conceptData.explicit_concepts.some(e => e.id === c.id),
|
|
654
|
+
reason: c.implied_reason || null,
|
|
655
|
+
}));
|
|
656
|
+
conceptsArray.explicit = conceptData.explicit_concepts;
|
|
657
|
+
conceptsArray.implicit = conceptData.implicit_concepts;
|
|
658
|
+
conceptsArray.all = conceptData.all_concepts.map(c => c.name);
|
|
659
|
+
|
|
660
|
+
const skillsList = [...composedPipeline];
|
|
661
|
+
skillsList.query = discoveredSkills.query;
|
|
662
|
+
skillsList.totalDiscovered = discoveredSkills.totalDiscovered;
|
|
663
|
+
skillsList.mandatory = discoveredSkills.mandatory;
|
|
664
|
+
skillsList.recommended = discoveredSkills.recommended;
|
|
665
|
+
skillsList.optional = discoveredSkills.optional;
|
|
666
|
+
skillsList.pipeline = composedPipeline;
|
|
667
|
+
|
|
668
|
+
const conflicts = detectRequirementConflicts(taskQuery);
|
|
669
|
+
const counterfactuals = runCounterfactualAnalysis(taskQuery);
|
|
670
|
+
const engineeringSmells = detectEngineeringSmells(taskQuery, composedPipeline);
|
|
671
|
+
const reversibility = classifyReversibility(taskQuery);
|
|
672
|
+
const relevantLessons = recallRelevantLessons(taskQuery);
|
|
673
|
+
const initialJudgment = evaluateJudgmentState({
|
|
674
|
+
task: taskQuery,
|
|
675
|
+
outcomeContract,
|
|
676
|
+
uncertainties: conflicts.map(c =>
|
|
677
|
+
createUncertaintyRecord(c.conflict, { impact_if_wrong: c.explanation, status: 'assumed' }),
|
|
678
|
+
),
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
// Phase 6: System Simulation & Pre-Mortem Intelligence
|
|
682
|
+
const phase6Tracker = getPhase6MetricsTracker();
|
|
683
|
+
phase6Tracker.recordEvent('pre_mortems_executed');
|
|
684
|
+
const preMortem = runPreMortem(taskQuery, {
|
|
685
|
+
concepts: conceptData.all_concepts.map(c => c.name),
|
|
686
|
+
technologies: options.technologies || [],
|
|
687
|
+
assumptions: options.assumptions,
|
|
688
|
+
dependencies: options.dependencies,
|
|
689
|
+
complexity: materiality.level,
|
|
690
|
+
evidence: options.evidence || [],
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
phase6Tracker.recordEvent('predictions_generated', preMortem.predictions.length);
|
|
694
|
+
if (preMortem.failure_chains.length > 0) {
|
|
695
|
+
phase6Tracker.recordEvent('failure_chains_detected', preMortem.failure_chains.length);
|
|
696
|
+
phase6Tracker.recordEvent(
|
|
697
|
+
'systemic_failures_identified',
|
|
698
|
+
preMortem.failure_chains.filter(c => c.systemic).length,
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
const unsupportedClaims = detectUnsupportedClaims(taskQuery);
|
|
703
|
+
if (unsupportedClaims.length > 0) {
|
|
704
|
+
phase6Tracker.recordEvent('unsupported_claims_caught', unsupportedClaims.length);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// Integrate pre-mortem predictions into verification plan
|
|
708
|
+
for (const p of preMortem.predictions) {
|
|
709
|
+
if (p.verification_method && !verificationPlan.some(v => v.test === p.prediction)) {
|
|
710
|
+
verificationPlan.push({
|
|
711
|
+
target: p.category,
|
|
712
|
+
test: p.prediction,
|
|
713
|
+
action: `[PRE-MORTEM VERIFICATION] ${p.verification_method}. Failure condition: ${p.reason}`,
|
|
714
|
+
status: p.status,
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// Phase 9: Cross-Domain Engineering Intelligence
|
|
720
|
+
const crossDomainAnalysis = runCrossDomainAnalysis(taskQuery, conceptData, options);
|
|
721
|
+
|
|
722
|
+
// Integrate cross-domain validation requirements into verification plan
|
|
723
|
+
if (!crossDomainAnalysis.skipped) {
|
|
724
|
+
for (const vr of crossDomainAnalysis.validation_requirements || []) {
|
|
725
|
+
if (!verificationPlan.some(v => v.test === vr.test)) {
|
|
726
|
+
verificationPlan.push({
|
|
727
|
+
target: vr.source,
|
|
728
|
+
test: vr.test,
|
|
729
|
+
action: `[CROSS-DOMAIN VERIFICATION] ${vr.reason}`,
|
|
730
|
+
status: 'pending',
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// Phase 10: Engineering Outcome Optimization
|
|
737
|
+
const outcomeOptimization = runOutcomeOptimization(taskQuery, {
|
|
738
|
+
conceptData,
|
|
739
|
+
considerationsData: considerations,
|
|
740
|
+
crossDomainAnalysis,
|
|
741
|
+
preMortem,
|
|
742
|
+
options,
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
// Integrate Phase 10 validation requirements into verification plan
|
|
746
|
+
for (const vr of outcomeOptimization.validation_requirements || []) {
|
|
747
|
+
if (!verificationPlan.some(v => v.test === vr.test)) {
|
|
748
|
+
verificationPlan.push({
|
|
749
|
+
target: vr.source,
|
|
750
|
+
test: vr.test,
|
|
751
|
+
action: `[OUTCOME OPTIMIZATION VERIFICATION] ${vr.reason}`,
|
|
752
|
+
status: 'pending',
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
return {
|
|
758
|
+
task: {
|
|
759
|
+
query: taskQuery,
|
|
760
|
+
actions: conceptData.actions,
|
|
761
|
+
domains: conceptData.domains,
|
|
762
|
+
},
|
|
763
|
+
concepts: conceptsArray,
|
|
764
|
+
considerations: considerations.all_considerations,
|
|
765
|
+
materiality: materiality.all_evaluated,
|
|
766
|
+
material_considerations: materiality.material,
|
|
767
|
+
outcome_contract: outcomeContract,
|
|
768
|
+
tradeoffs,
|
|
769
|
+
conflicts,
|
|
770
|
+
counterfactuals,
|
|
771
|
+
anti_slop: engineeringSmells,
|
|
772
|
+
engineering_smells: engineeringSmells,
|
|
773
|
+
reversibility,
|
|
774
|
+
institutional_lessons: relevantLessons,
|
|
775
|
+
judgment: initialJudgment,
|
|
776
|
+
memories: {
|
|
777
|
+
retrieved: retrievedMemories,
|
|
778
|
+
patterns: patternHypotheses,
|
|
779
|
+
failures_to_avoid: failureHypotheses,
|
|
780
|
+
verification_strategies: verificationStrategies,
|
|
781
|
+
decisions: pastDecisions,
|
|
782
|
+
},
|
|
783
|
+
metrics: metricsTracker.getMetrics(),
|
|
784
|
+
// Phase 6 System Simulation & Pre-Mortem artifacts
|
|
785
|
+
pre_mortem: preMortem,
|
|
786
|
+
predictions: preMortem.predictions,
|
|
787
|
+
failure_chains: preMortem.failure_chains,
|
|
788
|
+
blast_radius: preMortem.blast_radius,
|
|
789
|
+
unsupported_claims: unsupportedClaims,
|
|
790
|
+
simulation_plan: preMortem.simulation_plan,
|
|
791
|
+
phase6_metrics: phase6Tracker.getMetrics(),
|
|
792
|
+
// Phase 9: Cross-Domain Engineering Intelligence
|
|
793
|
+
cross_domain_analysis: crossDomainAnalysis.skipped
|
|
794
|
+
? null
|
|
795
|
+
: {
|
|
796
|
+
interactions: crossDomainAnalysis.interactions,
|
|
797
|
+
second_order_effects: crossDomainAnalysis.second_order_effects,
|
|
798
|
+
failure_propagation: crossDomainAnalysis.failure_propagation,
|
|
799
|
+
resource_contention: crossDomainAnalysis.resource_contention,
|
|
800
|
+
security_boundaries: crossDomainAnalysis.security_boundaries,
|
|
801
|
+
constraint_conflicts: crossDomainAnalysis.constraint_conflicts,
|
|
802
|
+
emergent_failures: crossDomainAnalysis.emergent_failures,
|
|
803
|
+
tradeoff_graph: crossDomainAnalysis.tradeoffs,
|
|
804
|
+
blind_spots: crossDomainAnalysis.blind_spots,
|
|
805
|
+
validation_requirements: crossDomainAnalysis.validation_requirements,
|
|
806
|
+
summary: crossDomainAnalysis.summary,
|
|
807
|
+
},
|
|
808
|
+
phase9_metrics: crossDomainAnalysis.phase9_metrics || null,
|
|
809
|
+
// Phase 10: Engineering Outcome Optimization
|
|
810
|
+
outcome_optimization: outcomeOptimization,
|
|
811
|
+
outcome_requirements: outcomeOptimization.requirements,
|
|
812
|
+
engineering_options: outcomeOptimization.engineering_options,
|
|
813
|
+
decision_records: outcomeOptimization.decision_records,
|
|
814
|
+
solution_shape: outcomeOptimization.solution_shape,
|
|
815
|
+
early_validations: outcomeOptimization.early_validations,
|
|
816
|
+
anti_slop_audit: outcomeOptimization.architecture_audit,
|
|
817
|
+
phase10_metrics: outcomeOptimization.phase10_metrics,
|
|
818
|
+
risks: considerations.risks,
|
|
819
|
+
failure_modes: considerations.failure_modes,
|
|
820
|
+
quality_attributes: considerations.quality_attributes,
|
|
821
|
+
skills: skillsList,
|
|
822
|
+
coverage: coverageData.coverage_matrix,
|
|
823
|
+
coverage_summary: {
|
|
824
|
+
full: coverageData.full.length,
|
|
825
|
+
partial: coverageData.partial.length,
|
|
826
|
+
uncovered: coverageData.uncovered.length,
|
|
827
|
+
},
|
|
828
|
+
composition: {
|
|
829
|
+
pipeline: composedPipeline,
|
|
830
|
+
candidate_promotions: coverageData.candidate_additions,
|
|
831
|
+
},
|
|
832
|
+
gaps: coverageData.true_gaps,
|
|
833
|
+
creation_gate: {
|
|
834
|
+
new_skill_required: coverageData.true_gaps.length > 0,
|
|
835
|
+
reason:
|
|
836
|
+
coverageData.true_gaps.length > 0
|
|
837
|
+
? `Uncovered gaps: ${coverageData.true_gaps.join(', ')}`
|
|
838
|
+
: 'Existing capabilities can be composed.',
|
|
839
|
+
},
|
|
840
|
+
verification_plan: verificationPlan,
|
|
841
|
+
confidence: {
|
|
842
|
+
concept_recall: 0.95,
|
|
843
|
+
coverage_score: coverageData.full.length / Math.max(1, coverageData.total_concepts),
|
|
844
|
+
},
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
function evaluateCreationGate(needDescription, agentDir) {
|
|
849
|
+
const allSkills = loadAllSkills(agentDir);
|
|
850
|
+
const target = needDescription.toLowerCase();
|
|
851
|
+
const rawTokens = target.split(/\W+/).filter(t => t.length > 2);
|
|
852
|
+
const tokens = rawTokens.filter(t => !STOP_WORDS.has(t));
|
|
853
|
+
|
|
854
|
+
const exact = allSkills.find(s => s.name === target || s.name.replace(/-/g, ' ') === target);
|
|
855
|
+
|
|
856
|
+
const overlaps = [];
|
|
857
|
+
for (const s of allSkills) {
|
|
858
|
+
let matchCount = 0;
|
|
859
|
+
for (const tok of tokens) {
|
|
860
|
+
if (s.name.includes(tok)) matchCount += 2;
|
|
861
|
+
const re = new RegExp(`\\b${tok}\\b`, 'i');
|
|
862
|
+
if (re.test(s.description)) matchCount += 1;
|
|
863
|
+
}
|
|
864
|
+
if (matchCount > 0) {
|
|
865
|
+
overlaps.push({ skill: s.name, matches: matchCount });
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
overlaps.sort((a, b) => b.matches - a.matches);
|
|
869
|
+
|
|
870
|
+
const topOverlaps = overlaps.slice(0, 3).map(o => o.skill);
|
|
871
|
+
const nearestSkill = topOverlaps[0] || null;
|
|
872
|
+
|
|
873
|
+
const checks = [
|
|
874
|
+
{
|
|
875
|
+
name: 'Existing skill searched',
|
|
876
|
+
passed: true,
|
|
877
|
+
detail: `Searched ${allSkills.length} skills`,
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
name: 'Semantic matches evaluated',
|
|
881
|
+
passed: true,
|
|
882
|
+
detail:
|
|
883
|
+
topOverlaps.length > 0
|
|
884
|
+
? `Found candidate matches: ${topOverlaps.join(', ')}`
|
|
885
|
+
: 'No direct matches',
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: 'Related skills checked',
|
|
889
|
+
passed: true,
|
|
890
|
+
detail: `${topOverlaps.length} related skills analyzed`,
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
name: 'Composition attempted',
|
|
894
|
+
passed: topOverlaps.length >= 2,
|
|
895
|
+
detail:
|
|
896
|
+
topOverlaps.length >= 2
|
|
897
|
+
? `Can potentially compose [${topOverlaps.join(', ')}]`
|
|
898
|
+
: 'Composition insufficient',
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
name: 'Duplicate capability checked',
|
|
902
|
+
passed: !exact,
|
|
903
|
+
detail: exact ? `Exact match exists: ${exact.name}` : 'No exact duplicate',
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: 'Capability gap confirmed',
|
|
907
|
+
passed: !exact && topOverlaps.length < 2,
|
|
908
|
+
detail: exact
|
|
909
|
+
? 'Duplicate exists'
|
|
910
|
+
: topOverlaps.length >= 2
|
|
911
|
+
? 'Covered by existing composition'
|
|
912
|
+
: 'Genuine gap',
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: 'Reusability justified',
|
|
916
|
+
passed: tokens.length >= 1,
|
|
917
|
+
detail: 'Assessed for modularity',
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
name: 'Concept coverage checked',
|
|
921
|
+
passed: topOverlaps.length < 2,
|
|
922
|
+
detail: topOverlaps.length >= 2 ? 'Covered by existing concepts' : 'New concept domain',
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
name: 'Failure-mode coverage checked',
|
|
926
|
+
passed: true,
|
|
927
|
+
detail: 'Failure modes evaluated against existing guardrails',
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
name: 'Verification capability checked',
|
|
931
|
+
passed: true,
|
|
932
|
+
detail: 'Automated test assertions possible',
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: 'Existing skill improvement evaluated',
|
|
936
|
+
passed: !nearestSkill,
|
|
937
|
+
detail: nearestSkill
|
|
938
|
+
? `Evaluate extending '${nearestSkill}' instead`
|
|
939
|
+
: 'No suitable base skill to extend',
|
|
940
|
+
},
|
|
941
|
+
];
|
|
942
|
+
|
|
943
|
+
const canCreate = !exact && !nearestSkill;
|
|
944
|
+
let recommendation = '';
|
|
945
|
+
if (exact) {
|
|
946
|
+
recommendation = `REJECT: Skill '${exact.name}' already exists. Use or enhance it instead.`;
|
|
947
|
+
} else if (topOverlaps.length >= 2) {
|
|
948
|
+
recommendation = `COMPOSE FIRST: Capabilities can be satisfied by composing existing skills: [${topOverlaps.join(', ')}].`;
|
|
949
|
+
} else if (nearestSkill) {
|
|
950
|
+
recommendation = `IMPROVE FIRST: Nearest skill '${nearestSkill}' can be extended to cover this capability without creating a new skill.`;
|
|
951
|
+
} else {
|
|
952
|
+
recommendation = `APPROVED: Capability gap confirmed. Minimal focused reusable skill creation justified.`;
|
|
953
|
+
try {
|
|
954
|
+
getCapabilityGapTracker().recordCapabilityGap({
|
|
955
|
+
capability_need: needDescription,
|
|
956
|
+
source_task: 'Creation Gate Evaluation',
|
|
957
|
+
reason_insufficient:
|
|
958
|
+
checks.find(c => c.name === 'Capability gap confirmed')?.detail ||
|
|
959
|
+
'Genuine capability gap',
|
|
960
|
+
});
|
|
961
|
+
} catch (e) {}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
return {
|
|
965
|
+
need: needDescription,
|
|
966
|
+
canCreate,
|
|
967
|
+
recommendation,
|
|
968
|
+
checks,
|
|
969
|
+
candidateSkills: topOverlaps,
|
|
970
|
+
nearestSkill,
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
function runAudit(agentDir) {
|
|
975
|
+
const all = loadAllSkills(agentDir);
|
|
976
|
+
console.log(
|
|
977
|
+
`\n${BOLD}${CYAN}━━━ Skill Intelligence Engine: Discovery Readiness Audit ━━━${RESET}\n`,
|
|
978
|
+
);
|
|
979
|
+
console.log(`Total skills indexed: ${BOLD}${all.length}${RESET}`);
|
|
980
|
+
|
|
981
|
+
let withoutDesc = 0;
|
|
982
|
+
for (const s of all) {
|
|
983
|
+
if (!s.description || s.description.length < 10) {
|
|
984
|
+
withoutDesc++;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
console.log(`Skills with full metadata: ${GREEN}${all.length - withoutDesc}${RESET}`);
|
|
989
|
+
if (withoutDesc > 0) {
|
|
990
|
+
console.log(`Skills needing richer description: ${YELLOW}${withoutDesc}${RESET}`);
|
|
991
|
+
} else {
|
|
992
|
+
console.log(`Coverage: ${GREEN}100% Discoverable${RESET}`);
|
|
993
|
+
}
|
|
994
|
+
console.log(
|
|
995
|
+
`\n${GREEN}✓ Skill Intelligence Engine ready for zero-hallucination discovery.${RESET}\n`,
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
function main() {
|
|
1000
|
+
const args = process.argv.slice(2);
|
|
1001
|
+
let query = null;
|
|
1002
|
+
let gateNeed = null;
|
|
1003
|
+
let audit = false;
|
|
1004
|
+
let json = false;
|
|
1005
|
+
let workspaceDir = '.';
|
|
1006
|
+
|
|
1007
|
+
let premortem = false;
|
|
1008
|
+
let simulate = false;
|
|
1009
|
+
let chainsOnly = false;
|
|
1010
|
+
let claimsOnly = false;
|
|
1011
|
+
|
|
1012
|
+
for (let i = 0; i < args.length; i++) {
|
|
1013
|
+
const a = args[i];
|
|
1014
|
+
if (a === '--query' && i + 1 < args.length) {
|
|
1015
|
+
query = args[++i];
|
|
1016
|
+
} else if (a === '--gate' || a === '-g') {
|
|
1017
|
+
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
1018
|
+
gateNeed = args[++i];
|
|
1019
|
+
}
|
|
1020
|
+
} else if (a === '--need' && i + 1 < args.length) {
|
|
1021
|
+
gateNeed = args[++i];
|
|
1022
|
+
} else if (a === '--audit') {
|
|
1023
|
+
audit = true;
|
|
1024
|
+
} else if (a === '--pre-mortem' || a === '--premortem') {
|
|
1025
|
+
premortem = true;
|
|
1026
|
+
} else if (a === '--simulate') {
|
|
1027
|
+
simulate = true;
|
|
1028
|
+
} else if (a === '--chains') {
|
|
1029
|
+
chainsOnly = true;
|
|
1030
|
+
} else if (a === '--claims') {
|
|
1031
|
+
claimsOnly = true;
|
|
1032
|
+
} else if (a === '--json') {
|
|
1033
|
+
json = true;
|
|
1034
|
+
} else if (a === '--workspace' && i + 1 < args.length) {
|
|
1035
|
+
workspaceDir = args[++i];
|
|
1036
|
+
} else if (!a.startsWith('-') && !query) {
|
|
1037
|
+
query = a;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
const agentDir = findAgentDir(path.resolve(workspaceDir));
|
|
1042
|
+
|
|
1043
|
+
if (audit) {
|
|
1044
|
+
runAudit(agentDir);
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
if (gateNeed) {
|
|
1049
|
+
const gateResult = evaluateCreationGate(gateNeed, agentDir);
|
|
1050
|
+
if (json) {
|
|
1051
|
+
console.log(JSON.stringify(gateResult, null, 2));
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
console.log(`\n${BOLD}${CYAN}━━━ New Skill Creation Gate Audit (11-Check Gate) ━━━${RESET}\n`);
|
|
1056
|
+
console.log(`Requested Capability: ${BOLD}${gateNeed}${RESET}`);
|
|
1057
|
+
console.log(
|
|
1058
|
+
`Gate Status: ${gateResult.canCreate ? GREEN + 'APPROVED' : RED + 'BLOCKED'}${RESET}\n`,
|
|
1059
|
+
);
|
|
1060
|
+
for (const c of gateResult.checks) {
|
|
1061
|
+
const icon = c.passed ? `${GREEN}✓ PASS${RESET}` : `${RED}✖ FAIL${RESET}`;
|
|
1062
|
+
console.log(` [${icon}] ${BOLD}${c.name.padEnd(38)}${RESET} ${DIM}(${c.detail})${RESET}`);
|
|
1063
|
+
}
|
|
1064
|
+
console.log(`\n${BOLD}Decision:${RESET} ${gateResult.recommendation}\n`);
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
if (query) {
|
|
1069
|
+
const analysis = analyzeTask(query, agentDir);
|
|
1070
|
+
|
|
1071
|
+
if (chainsOnly) {
|
|
1072
|
+
if (json) {
|
|
1073
|
+
console.log(JSON.stringify(analysis.failure_chains, null, 2));
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
console.log(`\n${BOLD}${CYAN}━━━ CAUSAL FAILURE CHAINS ━━━${RESET}\n`);
|
|
1077
|
+
for (const fc of analysis.failure_chains) {
|
|
1078
|
+
console.log(
|
|
1079
|
+
` ⚡ ${BOLD}${fc.name || fc.id}${RESET} [Blast: ${fc.blast_radius} | ${fc.severity}]`,
|
|
1080
|
+
);
|
|
1081
|
+
console.log(` ${DIM}${fc.chain}${RESET}\n`);
|
|
1082
|
+
}
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if (claimsOnly) {
|
|
1087
|
+
if (json) {
|
|
1088
|
+
console.log(JSON.stringify(analysis.unsupported_claims, null, 2));
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
console.log(`\n${BOLD}${CYAN}━━━ UNSUPPORTED CLAIMS AUDIT ━━━${RESET}\n`);
|
|
1092
|
+
if (analysis.unsupported_claims.length === 0) {
|
|
1093
|
+
console.log(` ${GREEN}✓ No unsupported architectural claims detected.${RESET}\n`);
|
|
1094
|
+
} else {
|
|
1095
|
+
for (const uc of analysis.unsupported_claims) {
|
|
1096
|
+
console.log(` ⚠ ${RED}"${uc.claim}"${RESET} — ${DIM}${uc.reason}${RESET}`);
|
|
1097
|
+
console.log(` Action: ${YELLOW}${uc.action_required}${RESET}\n`);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
if (premortem || simulate) {
|
|
1104
|
+
if (json) {
|
|
1105
|
+
console.log(JSON.stringify(analysis.pre_mortem, null, 2));
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
console.log(`\n${BOLD}${CYAN}━━━ SYSTEM PRE-MORTEM & FAILURE SIMULATION ━━━${RESET}\n`);
|
|
1109
|
+
console.log(`Task: ${BOLD}${query}${RESET}`);
|
|
1110
|
+
console.log(
|
|
1111
|
+
`Simulation Level: ${YELLOW}${analysis.simulation_plan.selected_level.name}${RESET}\n`,
|
|
1112
|
+
);
|
|
1113
|
+
|
|
1114
|
+
console.log(`${BOLD}Predictions & Hypotheses (${analysis.predictions.length}):${RESET}`);
|
|
1115
|
+
for (const p of analysis.predictions) {
|
|
1116
|
+
const impCol = p.impact === 'CRITICAL' ? RED : p.impact === 'HIGH' ? YELLOW : CYAN;
|
|
1117
|
+
console.log(
|
|
1118
|
+
` • [${impCol}${p.impact}${RESET}] ${BOLD}${p.prediction}${RESET} (${p.category})`,
|
|
1119
|
+
);
|
|
1120
|
+
console.log(` Reason: ${DIM}${p.reason}${RESET}`);
|
|
1121
|
+
console.log(` Verification: ${CYAN}${p.verification_method}${RESET}`);
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
if (analysis.failure_chains.length > 0) {
|
|
1125
|
+
console.log(`\n${BOLD}Causal Failure Chains (${analysis.failure_chains.length}):${RESET}`);
|
|
1126
|
+
for (const fc of analysis.failure_chains) {
|
|
1127
|
+
console.log(` ⚡ ${BOLD}${fc.name || fc.id}${RESET} [Blast: ${fc.blast_radius}]`);
|
|
1128
|
+
console.log(` ${DIM}${fc.chain}${RESET}`);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
if (analysis.unsupported_claims.length > 0) {
|
|
1133
|
+
console.log(
|
|
1134
|
+
`\n${BOLD}${RED}Unsupported Claims Detected (${analysis.unsupported_claims.length}):${RESET}`,
|
|
1135
|
+
);
|
|
1136
|
+
for (const uc of analysis.unsupported_claims) {
|
|
1137
|
+
console.log(` ⚠ "${uc.claim}" — ${DIM}${uc.reason}${RESET}`);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
console.log();
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
if (json) {
|
|
1145
|
+
console.log(JSON.stringify(analysis, null, 2));
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
console.log(`\n${BOLD}${CYAN}━━━ TASK INTELLIGENCE ━━━${RESET}\n`);
|
|
1150
|
+
console.log(`Task: ${BOLD}${query}${RESET}`);
|
|
1151
|
+
if (analysis.risks.length > 0) {
|
|
1152
|
+
console.log(`Risk Signals: ${RED}${analysis.risks.join(' | ')}${RESET}`);
|
|
1153
|
+
}
|
|
1154
|
+
console.log();
|
|
1155
|
+
|
|
1156
|
+
console.log(`${BOLD}${CYAN}━━━ CONCEPTS ━━━${RESET}`);
|
|
1157
|
+
if (analysis.concepts.explicit.length > 0) {
|
|
1158
|
+
console.log(` ${BOLD}Explicit Concepts:${RESET}`);
|
|
1159
|
+
analysis.concepts.explicit.forEach(c =>
|
|
1160
|
+
console.log(` • ${BOLD}${c.name}${RESET} ${DIM}(domain: ${c.domain})${RESET}`),
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
if (analysis.concepts.implicit.length > 0) {
|
|
1164
|
+
console.log(` ${BOLD}Implicit Considerations:${RESET}`);
|
|
1165
|
+
analysis.concepts.implicit.forEach(c =>
|
|
1166
|
+
console.log(
|
|
1167
|
+
` • ${BOLD}${c.name}${RESET} ${DIM}(domain: ${c.domain}) — ${c.reason}${RESET}`,
|
|
1168
|
+
),
|
|
1169
|
+
);
|
|
1170
|
+
}
|
|
1171
|
+
console.log();
|
|
1172
|
+
|
|
1173
|
+
console.log(`${BOLD}${CYAN}━━━ ENGINEERING CONSIDERATIONS ━━━${RESET}`);
|
|
1174
|
+
const critical = analysis.considerations.filter(c => c.severity === 'CRITICAL');
|
|
1175
|
+
const high = analysis.considerations.filter(c => c.severity === 'HIGH');
|
|
1176
|
+
const medium = analysis.considerations.filter(c => c.severity === 'MEDIUM');
|
|
1177
|
+
|
|
1178
|
+
if (critical.length > 0) {
|
|
1179
|
+
console.log(` ${BOLD}${RED}[CRITICAL]${RESET}`);
|
|
1180
|
+
critical.forEach(c =>
|
|
1181
|
+
console.log(` • ${BOLD}${c.title}${RESET} (${c.category}) — ${c.rationale}`),
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
if (high.length > 0) {
|
|
1185
|
+
console.log(` ${BOLD}${YELLOW}[HIGH]${RESET}`);
|
|
1186
|
+
high.forEach(c =>
|
|
1187
|
+
console.log(` • ${BOLD}${c.title}${RESET} (${c.category}) — ${c.rationale}`),
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
if (medium.length > 0) {
|
|
1191
|
+
console.log(` ${BOLD}${CYAN}[MEDIUM]${RESET}`);
|
|
1192
|
+
medium.forEach(c =>
|
|
1193
|
+
console.log(` • ${BOLD}${c.title}${RESET} (${c.category}) — ${c.rationale}`),
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
console.log();
|
|
1197
|
+
|
|
1198
|
+
console.log(`${BOLD}${CYAN}━━━ SKILL COVERAGE ━━━${RESET}`);
|
|
1199
|
+
console.log(` ${'Concept'.padEnd(38)} ${'Coverage'.padEnd(10)} Matched Skill`);
|
|
1200
|
+
console.log(` ${'─'.repeat(38)} ${'─'.repeat(10)} ${'─'.repeat(20)}`);
|
|
1201
|
+
for (const row of analysis.coverage) {
|
|
1202
|
+
const covColor = row.coverage === 'FULL' ? GREEN : row.coverage === 'PARTIAL' ? YELLOW : RED;
|
|
1203
|
+
console.log(
|
|
1204
|
+
` ${row.concept_name.slice(0, 36).padEnd(38)} ${covColor}${row.coverage.padEnd(10)}${RESET} ${row.matched_skill || DIM + 'NONE' + RESET}`,
|
|
1205
|
+
);
|
|
1206
|
+
}
|
|
1207
|
+
console.log();
|
|
1208
|
+
|
|
1209
|
+
console.log(`${BOLD}${CYAN}━━━ COMPOSED CAPABILITY PIPELINE DAG ━━━${RESET}`);
|
|
1210
|
+
console.log(` ${GREEN}${analysis.composition.pipeline.join(' → ')}${RESET}\n`);
|
|
1211
|
+
|
|
1212
|
+
console.log(`${BOLD}${CYAN}━━━ SYSTEM PRE-MORTEM HYPOTHESES & CHAINS ━━━${RESET}`);
|
|
1213
|
+
console.log(
|
|
1214
|
+
` Simulation Level: ${YELLOW}${analysis.simulation_plan.selected_level.name}${RESET}`,
|
|
1215
|
+
);
|
|
1216
|
+
console.log(
|
|
1217
|
+
` Predictions: ${BOLD}${analysis.predictions.length}${RESET} | Causal Chains: ${BOLD}${analysis.failure_chains.length}${RESET}`,
|
|
1218
|
+
);
|
|
1219
|
+
if (analysis.failure_chains.length > 0) {
|
|
1220
|
+
for (const fc of analysis.failure_chains.slice(0, 2)) {
|
|
1221
|
+
console.log(` ⚡ ${BOLD}${fc.name || fc.id}${RESET} [Blast: ${fc.blast_radius}]`);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
console.log();
|
|
1225
|
+
|
|
1226
|
+
console.log(`${BOLD}${CYAN}━━━ VERIFICATION PLAN ━━━${RESET}`);
|
|
1227
|
+
for (const v of analysis.verification_plan) {
|
|
1228
|
+
console.log(` • [${BOLD}${v.target}${RESET}] ${v.test}: ${DIM}${v.action}${RESET}`);
|
|
1229
|
+
}
|
|
1230
|
+
console.log();
|
|
1231
|
+
return;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
console.log(`
|
|
1235
|
+
${BOLD}Tribunal Skill Intelligence Engine — Phase 2${RESET}
|
|
1236
|
+
Usage:
|
|
1237
|
+
node scripts/skill_intelligence.js --query "<task>"
|
|
1238
|
+
node scripts/skill_intelligence.js --gate --need "<capability>"
|
|
1239
|
+
node scripts/skill_intelligence.js --audit
|
|
1240
|
+
node scripts/skill_intelligence.js --query "<task>" --json
|
|
1241
|
+
`);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
module.exports = {
|
|
1245
|
+
discoverSkills,
|
|
1246
|
+
evaluateCreationGate,
|
|
1247
|
+
loadAllSkills,
|
|
1248
|
+
clearSkillsCache,
|
|
1249
|
+
analyzeTask,
|
|
1250
|
+
generateVerificationPlan,
|
|
1251
|
+
auditPostExecution,
|
|
1252
|
+
generateImprovementProposal,
|
|
1253
|
+
evaluateMateriality,
|
|
1254
|
+
checkMinimumSufficientEngineering,
|
|
1255
|
+
determineOutcomeBudget,
|
|
1256
|
+
determineQualityDimensions,
|
|
1257
|
+
generateOutcomeContract,
|
|
1258
|
+
detectTradeoffs,
|
|
1259
|
+
auditOutcome,
|
|
1260
|
+
evaluateOutcomeRegression,
|
|
1261
|
+
FAILURE_SIGNALS,
|
|
1262
|
+
// Phase 4: Engineering Judgment & Adaptive Execution
|
|
1263
|
+
EVIDENCE_LEVELS,
|
|
1264
|
+
REVERSIBILITY_LEVELS,
|
|
1265
|
+
classifyEvidence,
|
|
1266
|
+
createUncertaintyRecord,
|
|
1267
|
+
calculateInformationValue,
|
|
1268
|
+
classifyReversibility,
|
|
1269
|
+
recordDecision,
|
|
1270
|
+
invalidateDecision,
|
|
1271
|
+
detectRequirementConflicts,
|
|
1272
|
+
runCounterfactualAnalysis,
|
|
1273
|
+
detectEngineeringSmells,
|
|
1274
|
+
evaluateEscalation,
|
|
1275
|
+
evaluateJudgmentState,
|
|
1276
|
+
DynamicCapabilityGraph,
|
|
1277
|
+
adaptPipelineOnSignal,
|
|
1278
|
+
analyzeChangeImpact,
|
|
1279
|
+
recordEngineeringLesson,
|
|
1280
|
+
recallRelevantLessons,
|
|
1281
|
+
evaluateSkillEffectiveness,
|
|
1282
|
+
runFinalEngineeringReview,
|
|
1283
|
+
// Phase 5: Engineering Memory & Continuous Capability Evolution
|
|
1284
|
+
MEMORY_TYPES,
|
|
1285
|
+
PROVENANCE_TYPES,
|
|
1286
|
+
TRUST_STATES,
|
|
1287
|
+
TRUST_RANKS,
|
|
1288
|
+
MEMORY_SCOPES,
|
|
1289
|
+
sanitizeContentAndEvidence,
|
|
1290
|
+
validateMemoryAdmission,
|
|
1291
|
+
createMemoryRecord,
|
|
1292
|
+
validateApplicability,
|
|
1293
|
+
evaluateMemoryStaleness,
|
|
1294
|
+
evaluateMemoryHypothesisWithCurrentEvidence,
|
|
1295
|
+
recordConflictResolution,
|
|
1296
|
+
MemoryGraph,
|
|
1297
|
+
EngineeringMemoryStore,
|
|
1298
|
+
getEngineeringMemoryStore,
|
|
1299
|
+
retrieveRelevantMemories,
|
|
1300
|
+
extractEngineeringMemory,
|
|
1301
|
+
SkillTelemetryRegistry,
|
|
1302
|
+
getSkillTelemetryRegistry,
|
|
1303
|
+
CapabilityGapTracker,
|
|
1304
|
+
getCapabilityGapTracker,
|
|
1305
|
+
PROPOSAL_STATUS,
|
|
1306
|
+
SkillImprovementManager,
|
|
1307
|
+
getSkillImprovementManager,
|
|
1308
|
+
Phase5MetricsTracker,
|
|
1309
|
+
getPhase5MetricsTracker,
|
|
1310
|
+
// Phase 6: System Simulation & Pre-Mortem Intelligence
|
|
1311
|
+
FAILURE_TAXONOMY,
|
|
1312
|
+
BLAST_RADIUS_TIERS,
|
|
1313
|
+
SIMULATION_LEVELS,
|
|
1314
|
+
PREDICTION_STATUS,
|
|
1315
|
+
createPredictionRecord,
|
|
1316
|
+
analyzeBlastRadius,
|
|
1317
|
+
buildFailureChains,
|
|
1318
|
+
simulateDependencyFailures,
|
|
1319
|
+
simulateConcurrencyRisks,
|
|
1320
|
+
simulateRetryAmplification,
|
|
1321
|
+
simulateDatabaseFailures,
|
|
1322
|
+
simulateQueueFailures,
|
|
1323
|
+
simulateCacheFailures,
|
|
1324
|
+
simulateCapacityAndQueueing,
|
|
1325
|
+
simulateLatencyBudget,
|
|
1326
|
+
runSecurityPreMortem,
|
|
1327
|
+
runAgentPreMortem,
|
|
1328
|
+
runCostPreMortem,
|
|
1329
|
+
simulateDeploymentAndRecovery,
|
|
1330
|
+
generateChaosScenarios,
|
|
1331
|
+
detectUnsupportedClaims,
|
|
1332
|
+
determineSimulationLevel,
|
|
1333
|
+
runPreMortem,
|
|
1334
|
+
comparePredictionsWithObserved,
|
|
1335
|
+
Phase6MetricsTracker,
|
|
1336
|
+
getPhase6MetricsTracker,
|
|
1337
|
+
// Phase 9: Cross-Domain Engineering Intelligence
|
|
1338
|
+
RELATIONSHIP_TYPES,
|
|
1339
|
+
INTERACTION_PRIORITY,
|
|
1340
|
+
INTERACTION_CONFIDENCE,
|
|
1341
|
+
runCrossDomainAnalysis,
|
|
1342
|
+
Phase9MetricsTracker,
|
|
1343
|
+
getPhase9MetricsTracker,
|
|
1344
|
+
// Phase 10: Engineering Outcome Optimization Engine
|
|
1345
|
+
OUTCOME_INVARIANT,
|
|
1346
|
+
REQUIREMENT_SOURCES,
|
|
1347
|
+
REQUIREMENT_CATEGORIES,
|
|
1348
|
+
COMPLEXITY_BUDGETS,
|
|
1349
|
+
ASSUMPTION_STATUS,
|
|
1350
|
+
CAPABILITY_DEPTH,
|
|
1351
|
+
REASONING_DEPTH,
|
|
1352
|
+
discoverRequirements,
|
|
1353
|
+
evaluateComplexityBudget,
|
|
1354
|
+
auditArchitectureJustification,
|
|
1355
|
+
generateDecisionRecords,
|
|
1356
|
+
analyzeAssumptionsAndUnknowns,
|
|
1357
|
+
buildSolutionShape,
|
|
1358
|
+
verifyOutcomeAndRegressions,
|
|
1359
|
+
runOutcomeOptimization,
|
|
1360
|
+
evaluateSkillSelection,
|
|
1361
|
+
Phase10OutcomeMemory,
|
|
1362
|
+
getPhase10OutcomeMemory,
|
|
1363
|
+
runAntiShortcutCheck,
|
|
1364
|
+
runAntiOverengineeringCheck,
|
|
1365
|
+
Phase10MetricsTracker,
|
|
1366
|
+
getPhase10MetricsTracker,
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
if (require.main === module) {
|
|
1370
|
+
main();
|
|
1371
|
+
}
|