tribunal-kit 9.2.1 → 9.2.3
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/agents/orchestrator.md +2 -0
- package/.agent/config/claude.json +1 -1
- package/.agent/config/plugin.json +1 -1
- package/.agent/history/architecture-explorer.html +352 -0
- package/.agent/history/architecture-graph.yaml +181 -1
- package/.agent/history/graph-cache.json +323 -13
- package/.agent/history/integrity_manifest.json +3937 -299
- package/.agent/history/memory/.memory.idx +50 -50
- package/.agent/history/snapshots/.opencode__plugins__tribunal.js.json +12 -0
- package/.agent/history/snapshots/.pi__extensions__tribunal.ts.json +12 -0
- package/.agent/history/snapshots/bin__adapter-install.js.json +1 -1
- package/.agent/history/snapshots/bin__mcp-server.js.json +4 -2
- package/.agent/history/snapshots/bin__proxy-server.js.json +1 -1
- package/.agent/history/snapshots/bin__spawn-agent.js.json +1 -1
- package/.agent/history/snapshots/bin__wrapper.js.json +1 -1
- package/.agent/history/snapshots/eslint.config.js.json +1 -1
- package/.agent/history/snapshots/hooks__session-start.js.json +11 -0
- package/.agent/history/snapshots/scripts__apply-version.js.json +11 -0
- package/.agent/history/snapshots/scripts__audit_skill_sdo.js.json +11 -0
- package/.agent/history/snapshots/scripts__clean-pycache.js.json +11 -0
- package/.agent/history/snapshots/scripts__context_compiler.js.json +17 -0
- package/.agent/history/snapshots/scripts__modernize_skills.js.json +11 -0
- package/.agent/history/snapshots/scripts__package-cores.js.json +12 -0
- package/.agent/history/snapshots/scripts__skill_enhancement_engine.js.json +11 -0
- package/.agent/history/snapshots/scripts__sync-skills.js.json +11 -0
- package/.agent/history/snapshots/scripts__telemetry_gc.js.json +11 -0
- package/.agent/history/snapshots/scripts__validate-payload.js.json +1 -1
- package/.agent/history/snapshots/test__integration__browser_cli.test.js.json +12 -0
- package/.agent/history/snapshots/test__integration__sync_status.test.js.json +1 -1
- package/.agent/history/snapshots/test__unit__ast_context_loader.test.js.json +12 -0
- package/.agent/history/snapshots/test__unit__browser_case_bridge.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__browser_discovery.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__browser_idpi.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__browser_sentinel.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__browser_synapse.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__browser_trimmer.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__context_compiler.test.js.json +26 -0
- package/.agent/history/snapshots/test__unit__init.test.js.json +1 -1
- package/.agent/history/snapshots/test__unit__learn.test.js.json +1 -1
- package/.agent/history/snapshots/test__unit__mcp_server.test.js.json +1 -1
- package/.agent/history/snapshots/test__unit__platform_download_audit.test.js.json +11 -0
- package/.agent/history/snapshots/test__unit__prompt_compiler.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__sdd_integration.test.js.json +12 -0
- package/.agent/history/snapshots/test__unit__stress.test.js.json +1 -1
- package/.agent/history/snapshots/test__unit__token_budget_broker.test.js.json +10 -0
- package/.agent/history/snapshots/test__unit__tui.test.js.json +10 -0
- package/.agent/routing_index.json +1 -1
- package/.agent/rules/kernel.md +86 -0
- package/.agent/scripts/_utils.js +78 -0
- package/.agent/scripts/context_broker.js +0 -8
- package/.agent/scripts/context_compiler.js +1106 -3
- package/.agent/scripts/guardrail_engine.js +48 -11
- package/.agent/scripts/memory_engine.js +490 -329
- package/.agent/scripts/pipeline_engine.js +29 -106
- package/.agent/scripts/swarm_dispatcher.js +123 -48
- package/.agent/skill_topic_map.json +71 -22
- package/.agent/skills/12-principles-of-animation/SKILL.md +1 -76
- package/.agent/skills/60fps-animation/SKILL.md +1 -76
- package/.agent/skills/accessible-animation/SKILL.md +1 -76
- package/.agent/skills/adapt/SKILL.md +1 -76
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +1 -76
- package/.agent/skills/agent-organizer/SKILL.md +1 -76
- package/.agent/skills/agentic-patterns/SKILL.md +1 -76
- package/.agent/skills/agentic-workflows-2026/SKILL.md +1 -76
- package/.agent/skills/ai-app-hardening/SKILL.md +1 -76
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +1 -76
- package/.agent/skills/animation-on-scroll/SKILL.md +1 -76
- package/.agent/skills/animation-systems/SKILL.md +1 -76
- package/.agent/skills/antfu-conventions/SKILL.md +0 -75
- package/.agent/skills/api-patterns/SKILL.md +1 -76
- package/.agent/skills/api-security-auditor/SKILL.md +1 -76
- package/.agent/skills/app-builder/SKILL.md +1 -76
- package/.agent/skills/appflow-wireframe/SKILL.md +1 -76
- package/.agent/skills/apple-design/SKILL.md +1 -76
- package/.agent/skills/architecture/SKILL.md +1 -76
- package/.agent/skills/audit-and-fix/SKILL.md +41 -77
- package/.agent/skills/authentication-best-practices/SKILL.md +1 -76
- package/.agent/skills/backend-security-expert/SKILL.md +1 -76
- package/.agent/skills/baseline-ui/SKILL.md +1 -76
- package/.agent/skills/bash-linux/SKILL.md +1 -76
- package/.agent/skills/behavioral-modes/SKILL.md +1 -76
- package/.agent/skills/better-colors/SKILL.md +1 -76
- package/.agent/skills/better-typography/SKILL.md +1 -76
- package/.agent/skills/better-ui/SKILL.md +1 -76
- package/.agent/skills/bolder/SKILL.md +1 -76
- package/.agent/skills/brainstorming/SKILL.md +1 -76
- package/.agent/skills/browser-audit/SKILL.md +1 -76
- package/.agent/skills/browser-native-ai/SKILL.md +1 -76
- package/.agent/skills/build-primitive/SKILL.md +1 -76
- package/.agent/skills/building-native-ui/SKILL.md +1 -76
- package/.agent/skills/cicd-pro/SKILL.md +1 -76
- package/.agent/skills/clarify/SKILL.md +1 -76
- package/.agent/skills/clean-code/SKILL.md +1 -76
- package/.agent/skills/cloud-architect/SKILL.md +1 -76
- package/.agent/skills/cobejs/SKILL.md +1 -76
- package/.agent/skills/code-review-checklist/SKILL.md +1 -76
- package/.agent/skills/codebase-design/SKILL.md +1 -76
- package/.agent/skills/colorize/SKILL.md +1 -76
- package/.agent/skills/compact-landing/SKILL.md +1 -76
- package/.agent/skills/company-logos/SKILL.md +1 -76
- package/.agent/skills/config-validator/SKILL.md +1 -76
- package/.agent/skills/containerization-pro/SKILL.md +1 -76
- package/.agent/skills/context-engineering-pro/SKILL.md +1 -76
- package/.agent/skills/create-design-md/SKILL.md +1 -76
- package/.agent/skills/critique/SKILL.md +1 -76
- package/.agent/skills/csharp-developer/SKILL.md +1 -76
- package/.agent/skills/data-validation-schemas/SKILL.md +1 -76
- package/.agent/skills/database-design/SKILL.md +1 -76
- package/.agent/skills/delight/SKILL.md +1 -76
- package/.agent/skills/deployment-procedures/SKILL.md +1 -76
- package/.agent/skills/design-lab/SKILL.md +1 -76
- package/.agent/skills/devops-engineer/SKILL.md +1 -76
- package/.agent/skills/devops-incident-responder/SKILL.md +1 -76
- package/.agent/skills/diagnosing-bugs/SKILL.md +1 -76
- package/.agent/skills/distill/SKILL.md +1 -76
- package/.agent/skills/documentation-templates/SKILL.md +1 -76
- package/.agent/skills/domain-modeling/SKILL.md +1 -76
- package/.agent/skills/duckdb-analytical-sql/SKILL.md +1 -76
- package/.agent/skills/edge-ai-mobile/SKILL.md +1 -76
- package/.agent/skills/edge-computing/SKILL.md +1 -76
- package/.agent/skills/emil-design-eng/SKILL.md +1 -76
- package/.agent/skills/error-resilience/SKILL.md +1 -76
- package/.agent/skills/expo-router-v4/SKILL.md +1 -76
- package/.agent/skills/extract-design-system/SKILL.md +1 -76
- package/.agent/skills/fabel-protocol/SKILL.md +1 -76
- package/.agent/skills/fixing-accessibility/SKILL.md +1 -76
- package/.agent/skills/fixing-metadata/SKILL.md +1 -76
- package/.agent/skills/fixing-motion-performance/SKILL.md +1 -76
- package/.agent/skills/framer-motion-expert/SKILL.md +1 -76
- package/.agent/skills/frontend-design/SKILL.md +1 -76
- package/.agent/skills/frontend-security-expert/SKILL.md +1 -76
- package/.agent/skills/game-design-expert/SKILL.md +1 -76
- package/.agent/skills/game-engineering-expert/SKILL.md +1 -76
- package/.agent/skills/generative-ui-expert/SKILL.md +1 -76
- package/.agent/skills/geo-fundamentals/SKILL.md +1 -76
- package/.agent/skills/git-pro/SKILL.md +1 -76
- package/.agent/skills/github-operations/SKILL.md +1 -76
- package/.agent/skills/gpt-taste/SKILL.md +1 -76
- package/.agent/skills/gsap-core/SKILL.md +1 -76
- package/.agent/skills/gsap-frameworks/SKILL.md +1 -76
- package/.agent/skills/gsap-performance/SKILL.md +1 -76
- package/.agent/skills/gsap-plugins/SKILL.md +1 -76
- package/.agent/skills/gsap-react/SKILL.md +1 -76
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +1 -76
- package/.agent/skills/gsap-timeline/SKILL.md +1 -76
- package/.agent/skills/gsap-utils/SKILL.md +1 -76
- package/.agent/skills/harden/SKILL.md +1 -76
- package/.agent/skills/harness-protocol/SKILL.md +1 -76
- package/.agent/skills/i18n-localization/SKILL.md +1 -76
- package/.agent/skills/impeccable/SKILL.md +1 -76
- package/.agent/skills/improve-codebase-architecture/SKILL.md +1 -76
- package/.agent/skills/improve-ui/SKILL.md +1 -76
- package/.agent/skills/intelligent-routing/SKILL.md +2 -88
- package/.agent/skills/knowledge-graph/SKILL.md +1 -76
- package/.agent/skills/landing-page/SKILL.md +1 -76
- package/.agent/skills/lint-and-validate/SKILL.md +1 -76
- package/.agent/skills/llm-engineering/SKILL.md +1 -76
- package/.agent/skills/local-first/SKILL.md +1 -76
- package/.agent/skills/local-first-architecture/SKILL.md +1 -76
- package/.agent/skills/lottie-animation/SKILL.md +1 -76
- package/.agent/skills/marquee-loop/SKILL.md +1 -76
- package/.agent/skills/masked-reveal/SKILL.md +1 -76
- package/.agent/skills/mcp-builder/SKILL.md +1 -76
- package/.agent/skills/micro-interaction/SKILL.md +1 -76
- package/.agent/skills/mobile-design/SKILL.md +1 -76
- package/.agent/skills/monorepo-management/SKILL.md +1 -76
- package/.agent/skills/morphing-icons/SKILL.md +1 -76
- package/.agent/skills/motion-engineering/SKILL.md +1 -76
- package/.agent/skills/nextjs-react-expert/SKILL.md +1 -76
- package/.agent/skills/nodejs-best-practices/SKILL.md +1 -76
- package/.agent/skills/observability/SKILL.md +1 -76
- package/.agent/skills/opentelemetry-observability/SKILL.md +1 -76
- package/.agent/skills/page-transition-animation/SKILL.md +1 -76
- package/.agent/skills/parallel-agents/SKILL.md +1 -76
- package/.agent/skills/performance-profiling/SKILL.md +1 -76
- package/.agent/skills/plan-writing/SKILL.md +1 -76
- package/.agent/skills/platform-engineer/SKILL.md +1 -76
- package/.agent/skills/platform-engineering-opentofu/SKILL.md +1 -76
- package/.agent/skills/playwright-ai-e2e/SKILL.md +1 -76
- package/.agent/skills/playwright-best-practices/SKILL.md +1 -76
- package/.agent/skills/polish/SKILL.md +1 -76
- package/.agent/skills/powershell-windows/SKILL.md +1 -76
- package/.agent/skills/pricing-page/SKILL.md +1 -76
- package/.agent/skills/product-aware-heuristics/SKILL.md +1 -76
- package/.agent/skills/progressive-blur/SKILL.md +1 -76
- package/.agent/skills/project-idioms/SKILL.md +1 -76
- package/.agent/skills/property-based-testing/SKILL.md +1 -76
- package/.agent/skills/python-patterns/SKILL.md +1 -76
- package/.agent/skills/python-pro/SKILL.md +1 -76
- package/.agent/skills/quieter/SKILL.md +1 -76
- package/.agent/skills/react-doctor/SKILL.md +1 -76
- package/.agent/skills/react-specialist/SKILL.md +1 -76
- package/.agent/skills/readme-builder/SKILL.md +1 -76
- package/.agent/skills/realtime-patterns/SKILL.md +1 -76
- package/.agent/skills/red-team-tactics/SKILL.md +1 -76
- package/.agent/skills/redesign-skill/SKILL.md +1 -76
- package/.agent/skills/review-animations/SKILL.md +1 -76
- package/.agent/skills/rust-pro/SKILL.md +1 -76
- package/.agent/skills/seo-fundamentals/SKILL.md +1 -76
- package/.agent/skills/server-management/SKILL.md +1 -76
- package/.agent/skills/shadcn-ui-expert/SKILL.md +1 -76
- package/.agent/skills/shape/SKILL.md +1 -76
- package/.agent/skills/skill-creator/SKILL.md +124 -90
- package/.agent/skills/soft-skill/SKILL.md +1 -76
- package/.agent/skills/sounds-on-the-web/SKILL.md +1 -76
- package/.agent/skills/sql-pro/SKILL.md +1 -76
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +1 -76
- package/.agent/skills/svg-animation/SKILL.md +1 -76
- package/.agent/skills/swiftui-expert/SKILL.md +1 -76
- package/.agent/skills/swiss-design/SKILL.md +1 -76
- package/.agent/skills/system-design-pro/SKILL.md +1 -76
- package/.agent/skills/systematic-debugging/SKILL.md +1 -76
- package/.agent/skills/tailwind-patterns/SKILL.md +1 -76
- package/.agent/skills/taste-skill/SKILL.md +1 -76
- package/.agent/skills/tdd-workflow/SKILL.md +1 -76
- package/.agent/skills/test-result-analyzer/SKILL.md +1 -76
- package/.agent/skills/testing-patterns/SKILL.md +1 -76
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +1 -76
- package/.agent/skills/thinking-protocol/SKILL.md +1 -78
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +1 -76
- package/.agent/skills/transitions-dev/SKILL.md +1 -76
- package/.agent/skills/trend-researcher/SKILL.md +1 -76
- package/.agent/skills/typescript-advanced/SKILL.md +1 -76
- package/.agent/skills/typeset/SKILL.md +1 -76
- package/.agent/skills/ui-reasoning-engine/SKILL.md +1 -76
- package/.agent/skills/ui-skill-packs/SKILL.md +1 -76
- package/.agent/skills/ui-skills-root/SKILL.md +1 -76
- package/.agent/skills/ui-ux-pro-max/SKILL.md +1 -76
- package/.agent/skills/ui-ux-researcher/SKILL.md +1 -76
- package/.agent/skills/vector-search-pgvector/SKILL.md +1 -76
- package/.agent/skills/verification-before-completion/SKILL.md +1 -76
- package/.agent/skills/vue-expert/SKILL.md +1 -76
- package/.agent/skills/vulnerability-scanner/SKILL.md +1 -76
- package/.agent/skills/web-accessibility-auditor/SKILL.md +1 -76
- package/.agent/skills/web-design-guidelines/SKILL.md +1 -76
- package/.agent/skills/web-quality-audit/SKILL.md +1 -76
- package/.agent/skills/webapp-testing/SKILL.md +1 -76
- package/.agent/skills/webgpu-performance/SKILL.md +1 -76
- package/.agent/skills/whimsy-injector/SKILL.md +1 -76
- package/.agent/skills/workflow-optimizer/SKILL.md +1 -76
- package/.agent/skills/zero-trust-passkeys/SKILL.md +1 -76
- package/.agent/workflows/generate.md +1 -1
- package/.agent/workflows/orchestrate.md +1 -1
- package/.agent/workflows/review-ai.md +1 -1
- package/.agent/workflows/skill-enhancement-engine.md +6 -10
- package/.agent/workflows/swarm.md +1 -1
- package/.agent/workflows/tribunal-backend.md +1 -1
- package/.agent/workflows/tribunal-cicd.md +1 -1
- package/.agent/workflows/tribunal-database.md +1 -1
- package/.agent/workflows/tribunal-frontend.md +1 -1
- package/.agent/workflows/tribunal-full.md +9 -9
- package/.agent/workflows/tribunal-mobile.md +1 -1
- package/.agent/workflows/tribunal-speed.md +1 -1
- package/.agent/workflows/tribunal-ui.md +1 -1
- package/.agents/skills/12-principles-of-animation/SKILL.md +1 -76
- package/.agents/skills/60fps-animation/SKILL.md +1 -76
- package/.agents/skills/accessible-animation/SKILL.md +1 -76
- package/.agents/skills/adapt/SKILL.md +1 -76
- package/.agents/skills/advanced-rag-pipelines/SKILL.md +1 -76
- package/.agents/skills/agent-organizer/SKILL.md +1 -76
- package/.agents/skills/agentic-patterns/SKILL.md +1 -76
- package/.agents/skills/agentic-workflows-2026/SKILL.md +1 -76
- package/.agents/skills/ai-app-hardening/SKILL.md +1 -76
- package/.agents/skills/ai-prompt-injection-defense/SKILL.md +1 -76
- package/.agents/skills/animation-on-scroll/SKILL.md +1 -76
- package/.agents/skills/animation-systems/SKILL.md +1 -76
- package/.agents/skills/antfu-conventions/SKILL.md +0 -75
- package/.agents/skills/api-patterns/SKILL.md +1 -76
- package/.agents/skills/api-security-auditor/SKILL.md +1 -76
- package/.agents/skills/app-builder/SKILL.md +1 -76
- package/.agents/skills/appflow-wireframe/SKILL.md +1 -76
- package/.agents/skills/apple-design/SKILL.md +1 -76
- package/.agents/skills/architecture/SKILL.md +1 -76
- package/.agents/skills/audit-and-fix/SKILL.md +41 -77
- package/.agents/skills/authentication-best-practices/SKILL.md +1 -76
- package/.agents/skills/backend-security-expert/SKILL.md +1 -76
- package/.agents/skills/baseline-ui/SKILL.md +1 -76
- package/.agents/skills/bash-linux/SKILL.md +1 -76
- package/.agents/skills/behavioral-modes/SKILL.md +1 -76
- package/.agents/skills/better-colors/SKILL.md +1 -76
- package/.agents/skills/better-typography/SKILL.md +1 -76
- package/.agents/skills/better-ui/SKILL.md +1 -76
- package/.agents/skills/bolder/SKILL.md +1 -76
- package/.agents/skills/brainstorming/SKILL.md +1 -76
- package/.agents/skills/browser-audit/SKILL.md +1 -76
- package/.agents/skills/browser-native-ai/SKILL.md +1 -76
- package/.agents/skills/build-primitive/SKILL.md +1 -76
- package/.agents/skills/building-native-ui/SKILL.md +1 -76
- package/.agents/skills/cicd-pro/SKILL.md +1 -76
- package/.agents/skills/clarify/SKILL.md +1 -76
- package/.agents/skills/clean-code/SKILL.md +1 -76
- package/.agents/skills/cloud-architect/SKILL.md +1 -76
- package/.agents/skills/cobejs/SKILL.md +1 -76
- package/.agents/skills/code-review-checklist/SKILL.md +1 -76
- package/.agents/skills/codebase-design/SKILL.md +1 -76
- package/.agents/skills/colorize/SKILL.md +1 -76
- package/.agents/skills/compact-landing/SKILL.md +1 -76
- package/.agents/skills/company-logos/SKILL.md +1 -76
- package/.agents/skills/config-validator/SKILL.md +1 -76
- package/.agents/skills/containerization-pro/SKILL.md +1 -76
- package/.agents/skills/context-engineering-pro/SKILL.md +1 -76
- package/.agents/skills/create-design-md/SKILL.md +1 -76
- package/.agents/skills/critique/SKILL.md +1 -76
- package/.agents/skills/csharp-developer/SKILL.md +1 -76
- package/.agents/skills/data-validation-schemas/SKILL.md +1 -76
- package/.agents/skills/database-design/SKILL.md +1 -76
- package/.agents/skills/delight/SKILL.md +1 -76
- package/.agents/skills/deployment-procedures/SKILL.md +1 -76
- package/.agents/skills/design-lab/SKILL.md +1 -76
- package/.agents/skills/devops-engineer/SKILL.md +1 -76
- package/.agents/skills/devops-incident-responder/SKILL.md +1 -76
- package/.agents/skills/diagnosing-bugs/SKILL.md +1 -76
- package/.agents/skills/distill/SKILL.md +1 -76
- package/.agents/skills/documentation-templates/SKILL.md +1 -76
- package/.agents/skills/domain-modeling/SKILL.md +1 -76
- package/.agents/skills/duckdb-analytical-sql/SKILL.md +1 -76
- package/.agents/skills/edge-ai-mobile/SKILL.md +1 -76
- package/.agents/skills/edge-computing/SKILL.md +1 -76
- package/.agents/skills/emil-design-eng/SKILL.md +1 -76
- package/.agents/skills/error-resilience/SKILL.md +1 -76
- package/.agents/skills/expo-router-v4/SKILL.md +1 -76
- package/.agents/skills/extract-design-system/SKILL.md +1 -76
- package/.agents/skills/fabel-protocol/SKILL.md +1 -76
- package/.agents/skills/fixing-accessibility/SKILL.md +1 -76
- package/.agents/skills/fixing-metadata/SKILL.md +1 -76
- package/.agents/skills/fixing-motion-performance/SKILL.md +1 -76
- package/.agents/skills/framer-motion-expert/SKILL.md +1 -76
- package/.agents/skills/frontend-design/SKILL.md +1 -76
- package/.agents/skills/frontend-security-expert/SKILL.md +1 -76
- package/.agents/skills/game-design-expert/SKILL.md +1 -76
- package/.agents/skills/game-engineering-expert/SKILL.md +1 -76
- package/.agents/skills/generative-ui-expert/SKILL.md +1 -76
- package/.agents/skills/geo-fundamentals/SKILL.md +1 -76
- package/.agents/skills/git-pro/SKILL.md +1 -76
- package/.agents/skills/github-operations/SKILL.md +1 -76
- package/.agents/skills/gpt-taste/SKILL.md +1 -76
- package/.agents/skills/gsap-core/SKILL.md +1 -76
- package/.agents/skills/gsap-frameworks/SKILL.md +1 -76
- package/.agents/skills/gsap-performance/SKILL.md +1 -76
- package/.agents/skills/gsap-plugins/SKILL.md +1 -76
- package/.agents/skills/gsap-react/SKILL.md +1 -76
- package/.agents/skills/gsap-scrolltrigger/SKILL.md +1 -76
- package/.agents/skills/gsap-timeline/SKILL.md +1 -76
- package/.agents/skills/gsap-utils/SKILL.md +1 -76
- package/.agents/skills/harden/SKILL.md +1 -76
- package/.agents/skills/harness-protocol/SKILL.md +1 -76
- package/.agents/skills/i18n-localization/SKILL.md +1 -76
- package/.agents/skills/impeccable/SKILL.md +1 -76
- package/.agents/skills/improve-codebase-architecture/SKILL.md +1 -76
- package/.agents/skills/improve-ui/SKILL.md +1 -76
- package/.agents/skills/intelligent-routing/SKILL.md +2 -88
- package/.agents/skills/knowledge-graph/SKILL.md +1 -76
- package/.agents/skills/landing-page/SKILL.md +1 -76
- package/.agents/skills/lint-and-validate/SKILL.md +1 -76
- package/.agents/skills/llm-engineering/SKILL.md +1 -76
- package/.agents/skills/local-first/SKILL.md +1 -76
- package/.agents/skills/local-first-architecture/SKILL.md +1 -76
- package/.agents/skills/lottie-animation/SKILL.md +1 -76
- package/.agents/skills/marquee-loop/SKILL.md +1 -76
- package/.agents/skills/masked-reveal/SKILL.md +1 -76
- package/.agents/skills/mcp-builder/SKILL.md +1 -76
- package/.agents/skills/micro-interaction/SKILL.md +1 -76
- package/.agents/skills/mobile-design/SKILL.md +1 -76
- package/.agents/skills/monorepo-management/SKILL.md +1 -76
- package/.agents/skills/morphing-icons/SKILL.md +1 -76
- package/.agents/skills/motion-engineering/SKILL.md +1 -76
- package/.agents/skills/nextjs-react-expert/SKILL.md +1 -76
- package/.agents/skills/nodejs-best-practices/SKILL.md +1 -76
- package/.agents/skills/observability/SKILL.md +1 -76
- package/.agents/skills/opentelemetry-observability/SKILL.md +1 -76
- package/.agents/skills/page-transition-animation/SKILL.md +1 -76
- package/.agents/skills/parallel-agents/SKILL.md +1 -76
- package/.agents/skills/performance-profiling/SKILL.md +1 -76
- package/.agents/skills/plan-writing/SKILL.md +1 -76
- package/.agents/skills/platform-engineer/SKILL.md +1 -76
- package/.agents/skills/platform-engineering-opentofu/SKILL.md +1 -76
- package/.agents/skills/playwright-ai-e2e/SKILL.md +1 -76
- package/.agents/skills/playwright-best-practices/SKILL.md +1 -76
- package/.agents/skills/polish/SKILL.md +1 -76
- package/.agents/skills/powershell-windows/SKILL.md +1 -76
- package/.agents/skills/pricing-page/SKILL.md +1 -76
- package/.agents/skills/product-aware-heuristics/SKILL.md +1 -76
- package/.agents/skills/progressive-blur/SKILL.md +1 -76
- package/.agents/skills/project-idioms/SKILL.md +1 -76
- package/.agents/skills/property-based-testing/SKILL.md +1 -76
- package/.agents/skills/python-patterns/SKILL.md +1 -76
- package/.agents/skills/python-pro/SKILL.md +1 -76
- package/.agents/skills/quieter/SKILL.md +1 -76
- package/.agents/skills/react-doctor/SKILL.md +1 -76
- package/.agents/skills/react-specialist/SKILL.md +1 -76
- package/.agents/skills/readme-builder/SKILL.md +1 -76
- package/.agents/skills/realtime-patterns/SKILL.md +1 -76
- package/.agents/skills/red-team-tactics/SKILL.md +1 -76
- package/.agents/skills/redesign-skill/SKILL.md +1 -76
- package/.agents/skills/review-animations/SKILL.md +1 -76
- package/.agents/skills/rust-pro/SKILL.md +1 -76
- package/.agents/skills/seo-fundamentals/SKILL.md +1 -76
- package/.agents/skills/server-management/SKILL.md +1 -76
- package/.agents/skills/shadcn-ui-expert/SKILL.md +1 -76
- package/.agents/skills/shape/SKILL.md +1 -76
- package/.agents/skills/skill-creator/SKILL.md +124 -90
- package/.agents/skills/soft-skill/SKILL.md +1 -76
- package/.agents/skills/sounds-on-the-web/SKILL.md +1 -76
- package/.agents/skills/sql-pro/SKILL.md +1 -76
- package/.agents/skills/supabase-postgres-best-practices/SKILL.md +1 -76
- package/.agents/skills/svg-animation/SKILL.md +1 -76
- package/.agents/skills/swiftui-expert/SKILL.md +1 -76
- package/.agents/skills/swiss-design/SKILL.md +1 -76
- package/.agents/skills/system-design-pro/SKILL.md +1 -76
- package/.agents/skills/systematic-debugging/SKILL.md +1 -76
- package/.agents/skills/tailwind-patterns/SKILL.md +1 -76
- package/.agents/skills/taste-skill/SKILL.md +1 -76
- package/.agents/skills/tdd-workflow/SKILL.md +1 -76
- package/.agents/skills/test-result-analyzer/SKILL.md +1 -76
- package/.agents/skills/testing-patterns/SKILL.md +1 -76
- package/.agents/skills/thermo-nuclear-code-quality-review/SKILL.md +1 -76
- package/.agents/skills/thinking-protocol/SKILL.md +1 -78
- package/.agents/skills/to-spring-or-not-to-spring/SKILL.md +1 -76
- package/.agents/skills/transitions-dev/SKILL.md +1 -76
- package/.agents/skills/trend-researcher/SKILL.md +1 -76
- package/.agents/skills/typescript-advanced/SKILL.md +1 -76
- package/.agents/skills/typeset/SKILL.md +1 -76
- package/.agents/skills/ui-reasoning-engine/SKILL.md +1 -76
- package/.agents/skills/ui-skill-packs/SKILL.md +1 -76
- package/.agents/skills/ui-skills-root/SKILL.md +1 -76
- package/.agents/skills/ui-ux-pro-max/SKILL.md +1 -76
- package/.agents/skills/ui-ux-researcher/SKILL.md +1 -76
- package/.agents/skills/vector-search-pgvector/SKILL.md +1 -76
- package/.agents/skills/verification-before-completion/SKILL.md +1 -76
- package/.agents/skills/vue-expert/SKILL.md +1 -76
- package/.agents/skills/vulnerability-scanner/SKILL.md +1 -76
- package/.agents/skills/web-accessibility-auditor/SKILL.md +1 -76
- package/.agents/skills/web-design-guidelines/SKILL.md +1 -76
- package/.agents/skills/web-quality-audit/SKILL.md +1 -76
- package/.agents/skills/webapp-testing/SKILL.md +1 -76
- package/.agents/skills/webgpu-performance/SKILL.md +1 -76
- package/.agents/skills/whimsy-injector/SKILL.md +1 -76
- package/.agents/skills/workflow-optimizer/SKILL.md +1 -76
- package/.agents/skills/zero-trust-passkeys/SKILL.md +1 -76
- package/README.md +542 -542
- package/bin/adapter-install.js +263 -263
- package/bin/mcp-server.js +71 -46
- package/bin/wrapper.js +10 -1
- package/dist/commands/init.js +25 -11
- package/dist/tui/banner.js +1 -1
- package/gemini-extension.json +1 -1
- package/package.json +13 -10
- package/plugin.json +1 -1
- package/scripts/context_compiler.js +49 -0
- package/scripts/skill_enhancement_engine.js +5 -31
- package/scripts/telemetry_gc.js +3 -1
- package/scripts/validate-payload.js +1 -6
- package/skills/12-principles-of-animation/SKILL.md +1 -76
- package/skills/60fps-animation/SKILL.md +1 -76
- package/skills/accessible-animation/SKILL.md +1 -76
- package/skills/adapt/SKILL.md +1 -76
- package/skills/advanced-rag-pipelines/SKILL.md +1 -76
- package/skills/agent-organizer/SKILL.md +1 -76
- package/skills/agentic-patterns/SKILL.md +1 -76
- package/skills/agentic-workflows-2026/SKILL.md +1 -76
- package/skills/ai-app-hardening/SKILL.md +1 -76
- package/skills/ai-prompt-injection-defense/SKILL.md +1 -76
- package/skills/animation-on-scroll/SKILL.md +1 -76
- package/skills/animation-systems/SKILL.md +1 -76
- package/skills/antfu-conventions/SKILL.md +0 -75
- package/skills/api-patterns/SKILL.md +1 -76
- package/skills/api-security-auditor/SKILL.md +1 -76
- package/skills/app-builder/SKILL.md +1 -76
- package/skills/appflow-wireframe/SKILL.md +1 -76
- package/skills/apple-design/SKILL.md +1 -76
- package/skills/architecture/SKILL.md +1 -76
- package/skills/audit-and-fix/SKILL.md +41 -77
- package/skills/authentication-best-practices/SKILL.md +1 -76
- package/skills/backend-security-expert/SKILL.md +1 -76
- package/skills/baseline-ui/SKILL.md +1 -76
- package/skills/bash-linux/SKILL.md +1 -76
- package/skills/behavioral-modes/SKILL.md +1 -76
- package/skills/better-colors/SKILL.md +1 -76
- package/skills/better-typography/SKILL.md +1 -76
- package/skills/better-ui/SKILL.md +1 -76
- package/skills/bolder/SKILL.md +1 -76
- package/skills/brainstorming/SKILL.md +1 -76
- package/skills/browser-audit/SKILL.md +1 -76
- package/skills/browser-native-ai/SKILL.md +1 -76
- package/skills/build-primitive/SKILL.md +1 -76
- package/skills/building-native-ui/SKILL.md +1 -76
- package/skills/cicd-pro/SKILL.md +1 -76
- package/skills/clarify/SKILL.md +1 -76
- package/skills/clean-code/SKILL.md +1 -76
- package/skills/cloud-architect/SKILL.md +1 -76
- package/skills/cobejs/SKILL.md +1 -76
- package/skills/code-review-checklist/SKILL.md +1 -76
- package/skills/codebase-design/SKILL.md +1 -76
- package/skills/colorize/SKILL.md +1 -76
- package/skills/compact-landing/SKILL.md +1 -76
- package/skills/company-logos/SKILL.md +1 -76
- package/skills/config-validator/SKILL.md +1 -76
- package/skills/containerization-pro/SKILL.md +1 -76
- package/skills/context-engineering-pro/SKILL.md +1 -76
- package/skills/create-design-md/SKILL.md +1 -76
- package/skills/critique/SKILL.md +1 -76
- package/skills/csharp-developer/SKILL.md +1 -76
- package/skills/data-validation-schemas/SKILL.md +1 -76
- package/skills/database-design/SKILL.md +1 -76
- package/skills/delight/SKILL.md +1 -76
- package/skills/deployment-procedures/SKILL.md +1 -76
- package/skills/design-lab/SKILL.md +1 -76
- package/skills/devops-engineer/SKILL.md +1 -76
- package/skills/devops-incident-responder/SKILL.md +1 -76
- package/skills/diagnosing-bugs/SKILL.md +1 -76
- package/skills/distill/SKILL.md +1 -76
- package/skills/documentation-templates/SKILL.md +1 -76
- package/skills/domain-modeling/SKILL.md +1 -76
- package/skills/duckdb-analytical-sql/SKILL.md +1 -76
- package/skills/edge-ai-mobile/SKILL.md +1 -76
- package/skills/edge-computing/SKILL.md +1 -76
- package/skills/emil-design-eng/SKILL.md +1 -76
- package/skills/error-resilience/SKILL.md +1 -76
- package/skills/expo-router-v4/SKILL.md +1 -76
- package/skills/extract-design-system/SKILL.md +1 -76
- package/skills/fabel-protocol/SKILL.md +1 -76
- package/skills/fixing-accessibility/SKILL.md +1 -76
- package/skills/fixing-metadata/SKILL.md +1 -76
- package/skills/fixing-motion-performance/SKILL.md +1 -76
- package/skills/framer-motion-expert/SKILL.md +1 -76
- package/skills/frontend-design/SKILL.md +1 -76
- package/skills/frontend-security-expert/SKILL.md +1 -76
- package/skills/game-design-expert/SKILL.md +1 -76
- package/skills/game-engineering-expert/SKILL.md +1 -76
- package/skills/generative-ui-expert/SKILL.md +1 -76
- package/skills/geo-fundamentals/SKILL.md +1 -76
- package/skills/git-pro/SKILL.md +1 -76
- package/skills/github-operations/SKILL.md +1 -76
- package/skills/gpt-taste/SKILL.md +1 -76
- package/skills/gsap-core/SKILL.md +1 -76
- package/skills/gsap-frameworks/SKILL.md +1 -76
- package/skills/gsap-performance/SKILL.md +1 -76
- package/skills/gsap-plugins/SKILL.md +1 -76
- package/skills/gsap-react/SKILL.md +1 -76
- package/skills/gsap-scrolltrigger/SKILL.md +1 -76
- package/skills/gsap-timeline/SKILL.md +1 -76
- package/skills/gsap-utils/SKILL.md +1 -76
- package/skills/harden/SKILL.md +1 -76
- package/skills/harness-protocol/SKILL.md +1 -76
- package/skills/i18n-localization/SKILL.md +1 -76
- package/skills/impeccable/SKILL.md +1 -76
- package/skills/improve-codebase-architecture/SKILL.md +1 -76
- package/skills/improve-ui/SKILL.md +1 -76
- package/skills/intelligent-routing/SKILL.md +2 -88
- package/skills/knowledge-graph/SKILL.md +1 -76
- package/skills/landing-page/SKILL.md +1 -76
- package/skills/lint-and-validate/SKILL.md +1 -76
- package/skills/llm-engineering/SKILL.md +1 -76
- package/skills/local-first/SKILL.md +1 -76
- package/skills/local-first-architecture/SKILL.md +1 -76
- package/skills/lottie-animation/SKILL.md +1 -76
- package/skills/marquee-loop/SKILL.md +1 -76
- package/skills/masked-reveal/SKILL.md +1 -76
- package/skills/mcp-builder/SKILL.md +1 -76
- package/skills/micro-interaction/SKILL.md +1 -76
- package/skills/mobile-design/SKILL.md +1 -76
- package/skills/monorepo-management/SKILL.md +1 -76
- package/skills/morphing-icons/SKILL.md +1 -76
- package/skills/motion-engineering/SKILL.md +1 -76
- package/skills/nextjs-react-expert/SKILL.md +1 -76
- package/skills/nodejs-best-practices/SKILL.md +1 -76
- package/skills/observability/SKILL.md +1 -76
- package/skills/opentelemetry-observability/SKILL.md +1 -76
- package/skills/page-transition-animation/SKILL.md +1 -76
- package/skills/parallel-agents/SKILL.md +1 -76
- package/skills/performance-profiling/SKILL.md +1 -76
- package/skills/plan-writing/SKILL.md +1 -76
- package/skills/platform-engineer/SKILL.md +1 -76
- package/skills/platform-engineering-opentofu/SKILL.md +1 -76
- package/skills/playwright-ai-e2e/SKILL.md +1 -76
- package/skills/playwright-best-practices/SKILL.md +1 -76
- package/skills/polish/SKILL.md +1 -76
- package/skills/powershell-windows/SKILL.md +1 -76
- package/skills/pricing-page/SKILL.md +1 -76
- package/skills/product-aware-heuristics/SKILL.md +1 -76
- package/skills/progressive-blur/SKILL.md +1 -76
- package/skills/project-idioms/SKILL.md +1 -76
- package/skills/property-based-testing/SKILL.md +1 -76
- package/skills/python-patterns/SKILL.md +1 -76
- package/skills/python-pro/SKILL.md +1 -76
- package/skills/quieter/SKILL.md +1 -76
- package/skills/react-doctor/SKILL.md +1 -76
- package/skills/react-specialist/SKILL.md +1 -76
- package/skills/readme-builder/SKILL.md +1 -76
- package/skills/realtime-patterns/SKILL.md +1 -76
- package/skills/red-team-tactics/SKILL.md +1 -76
- package/skills/redesign-skill/SKILL.md +1 -76
- package/skills/review-animations/SKILL.md +1 -76
- package/skills/rust-pro/SKILL.md +1 -76
- package/skills/seo-fundamentals/SKILL.md +1 -76
- package/skills/server-management/SKILL.md +1 -76
- package/skills/shadcn-ui-expert/SKILL.md +1 -76
- package/skills/shape/SKILL.md +1 -76
- package/skills/skill-creator/SKILL.md +124 -90
- package/skills/soft-skill/SKILL.md +1 -76
- package/skills/sounds-on-the-web/SKILL.md +1 -76
- package/skills/sql-pro/SKILL.md +1 -76
- package/skills/supabase-postgres-best-practices/SKILL.md +1 -76
- package/skills/svg-animation/SKILL.md +1 -76
- package/skills/swiftui-expert/SKILL.md +1 -76
- package/skills/swiss-design/SKILL.md +1 -76
- package/skills/system-design-pro/SKILL.md +1 -76
- package/skills/systematic-debugging/SKILL.md +1 -76
- package/skills/tailwind-patterns/SKILL.md +1 -76
- package/skills/taste-skill/SKILL.md +1 -76
- package/skills/tdd-workflow/SKILL.md +1 -76
- package/skills/test-result-analyzer/SKILL.md +1 -76
- package/skills/testing-patterns/SKILL.md +1 -76
- package/skills/thermo-nuclear-code-quality-review/SKILL.md +1 -76
- package/skills/thinking-protocol/SKILL.md +1 -78
- package/skills/to-spring-or-not-to-spring/SKILL.md +1 -76
- package/skills/transitions-dev/SKILL.md +1 -76
- package/skills/trend-researcher/SKILL.md +1 -76
- package/skills/typescript-advanced/SKILL.md +1 -76
- package/skills/typeset/SKILL.md +1 -76
- package/skills/ui-reasoning-engine/SKILL.md +1 -76
- package/skills/ui-skill-packs/SKILL.md +1 -76
- package/skills/ui-skills-root/SKILL.md +1 -76
- package/skills/ui-ux-pro-max/SKILL.md +1 -76
- package/skills/ui-ux-researcher/SKILL.md +1 -76
- package/skills/vector-search-pgvector/SKILL.md +1 -76
- package/skills/verification-before-completion/SKILL.md +1 -76
- package/skills/vue-expert/SKILL.md +1 -76
- package/skills/vulnerability-scanner/SKILL.md +1 -76
- package/skills/web-accessibility-auditor/SKILL.md +1 -76
- package/skills/web-design-guidelines/SKILL.md +1 -76
- package/skills/web-quality-audit/SKILL.md +1 -76
- package/skills/webapp-testing/SKILL.md +1 -76
- package/skills/webgpu-performance/SKILL.md +1 -76
- package/skills/whimsy-injector/SKILL.md +1 -76
- package/skills/workflow-optimizer/SKILL.md +1 -76
- package/skills/zero-trust-passkeys/SKILL.md +1 -76
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "test/unit/token_budget_broker.test.js",
|
|
3
|
+
"riskScore": "Low",
|
|
4
|
+
"blastRadius": 0,
|
|
5
|
+
"imports": {
|
|
6
|
+
"../../.agent/scripts/token_budget_broker": []
|
|
7
|
+
},
|
|
8
|
+
"dependents": [],
|
|
9
|
+
"content": "/**\n * token_budget_broker.test.js - Tests for Token Budget Broker\n */\n\nconst {\n getTokenBudget,\n TIER_TOKEN_LIMITS: _TIER_TOKEN_LIMITS,\n MODEL_CONTEXT_LIMITS,\n} = require('../../.agent/scripts/token_budget_broker');\n\ndescribe('token_budget_broker.js', () => {\n describe('getTokenBudget()', () => {\n // Test backward compatibility with original signature\n describe('Backward Compatibility', () => {\n test('returns correct values for Tier 0', () => {\n const budget = getTokenBudget(0);\n expect(budget.tier).toBe(0);\n expect(budget.maxTokens).toBe(0);\n expect(budget.includeFullRepo).toBe(false);\n expect(budget.maxSkills).toBe(0);\n expect(budget.maxReviewers).toBe(0);\n });\n\n test('returns correct values for Tier 1', () => {\n const budget = getTokenBudget(1);\n expect(budget.tier).toBe(1);\n expect(budget.maxTokens).toBe(2000);\n expect(budget.includeFullRepo).toBe(false);\n expect(budget.maxSkills).toBe(1);\n expect(budget.maxReviewers).toBe(1);\n });\n\n test('returns correct values for Tier 2', () => {\n const budget = getTokenBudget(2);\n expect(budget.tier).toBe(2);\n expect(budget.maxTokens).toBe(8000);\n expect(budget.includeFullRepo).toBe(true);\n expect(budget.maxSkills).toBe(3);\n expect(budget.maxReviewers).toBe(2);\n });\n\n test('returns correct values for Tier 3', () => {\n const budget = getTokenBudget(3);\n expect(budget.tier).toBe(3);\n expect(budget.maxTokens).toBe(32000);\n expect(budget.includeFullRepo).toBe(true);\n expect(budget.maxSkills).toBe(10);\n expect(budget.maxReviewers).toBe(8);\n });\n\n test('normalizes invalid tiers', () => {\n expect(getTokenBudget(-1).tier).toBe(0);\n expect(getTokenBudget(4).tier).toBe(3);\n expect(getTokenBudget(1.5).tier).toBe(2); // 1.5 rounds to 2\n });\n });\n\n // Test new dynamic functionality\n describe('Dynamic Budget Calculation', () => {\n test('adjusts budget based on model context limit', () => {\n // Claude Sonnet 5: 200k tokens\n // Tier 1 ratio: 0.02\n // Expected: 200000 * 0.02 = 4000, but capped at TIER_TOKEN_LIMITS[1] = 2000\n const budget = getTokenBudget(1, 'claude-sonnet-5', 0);\n expect(budget.maxTokens).toBe(2000); // Should be capped at static limit\n expect(budget.modelLimit).toBe(200000);\n expect(budget.availableForContext).toBe(190000); // 200000 - 0 - 10000 reserve\n expect(budget.dynamicMaxTokens).toBe(3800); // 190000 * 0.02\n });\n\n test('uses lower limit for smaller models', () => {\n // GPT-4o mini: 128k tokens\n // Tier 2 ratio: 0.06\n // Expected: 128000 * 0.06 = 7680, but capped at TIER_TOKEN_LIMITS[2] = 8000\n const budget = getTokenBudget(2, 'gpt-4o-mini', 0);\n expect(budget.maxTokens).toBe(7680); // Not capped since 7680 < 8000\n expect(budget.modelLimit).toBe(128000);\n });\n\n test('accounts for conversation history tokens', () => {\n // With 50k history tokens, less available for context\n const budget = getTokenBudget(2, 'claude-sonnet-5', 50000);\n // Available: 200000 - 50000 - 10000 = 140000\n // Dynamic: 140000 * 0.06 = 8400\n // Capped at: 8000\n expect(budget.maxTokens).toBe(8000);\n expect(budget.availableForContext).toBe(140000);\n expect(budget.dynamicMaxTokens).toBe(8400);\n });\n\n test('handles zero available context', () => {\n // If history tokens exceed available space\n const budget = getTokenBudget(2, 'claude-sonnet-5', 190000);\n // Available: 200000 - 190000 - 10000 = 0\n expect(budget.maxTokens).toBe(0);\n expect(budget.availableForContext).toBe(0);\n expect(budget.dynamicMaxTokens).toBe(0);\n });\n\n test('respects model context limits', () => {\n // Test with Gemini 2.5 Pro: 1M tokens\n const budget = getTokenBudget(3, 'gemini-2.5-pro', 0);\n // Available: 1000000 - 0 - 10000 = 990000\n // Dynamic: 990000 * 0.25 = 247500\n // But capped at TIER_TOKEN_LIMITS[3] = 32000\n expect(budget.maxTokens).toBe(32000);\n expect(budget.modelLimit).toBe(1000000);\n });\n\n test('uses default model when unknown model provided', () => {\n const budget = getTokenBudget(1, 'unknown-model', 0);\n expect(budget.modelLimit).toBe(MODEL_CONTEXT_LIMITS['claude-sonnet-5']);\n });\n });\n\n // Test density scoring\n describe('Context Density Scoring', () => {\n test('applies density factor when skill metrics provided', () => {\n const skillMetrics = { densityScore: 1.0 }; // Maximum density\n const budget = getTokenBudget(1, 'claude-sonnet-5', 0, skillMetrics);\n // Base budget for Tier 1: 2000\n // Density factor for score 1.0: 0.5 + (1.0 * 1.5) = 2.0\n // Expected: 2000 * 2.0 = 4000, but capped at 2000\n expect(budget.maxTokens).toBe(2000); // Still capped\n expect(budget.densityFactor).toBe(2.0);\n });\n\n test('applies density factor within limits', () => {\n const skillMetrics = { densityScore: 0.5 }; // Medium density\n const budget = getTokenBudget(2, 'claude-sonnet-5', 0, skillMetrics);\n // Base budget for Tier 2: 8000\n // Density factor for score 0.5: 0.5 + (0.5 * 1.5) = 1.25\n // Expected: 8000 * 1.25 = 10000\n expect(budget.maxTokens).toBe(10000);\n expect(budget.densityFactor).toBe(1.25);\n });\n\n test('combines multiple density metrics', () => {\n const skillMetrics = {\n densityScore: 0.5,\n ruleDensity: 0.5,\n codeExampleDensity: 0.5,\n };\n const budget = getTokenBudget(1, 'claude-sonnet-5', 0, skillMetrics);\n // Should have applied all three metrics\n expect(budget.maxTokens).toBeGreaterThan(2000);\n expect(budget.densityFactor).toBeGreaterThan(1.0);\n });\n\n test('clamps density factor to reasonable range', () => {\n // Test with extreme values\n const skillMetrics = { densityScore: 2.0 }; // Way above max\n const budget = getTokenBudget(1, 'claude-sonnet-5', 0, skillMetrics);\n expect(budget.densityFactor).toBeLessThanOrEqual(2.0);\n\n const skillMetrics2 = { densityScore: -1.0 }; // Below min\n const budget2 = getTokenBudget(1, 'claude-sonnet-5', 0, skillMetrics2);\n expect(budget2.densityFactor).toBeGreaterThanOrEqual(0.5);\n });\n });\n });\n});\n"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"file": "test/unit/tui.test.js",
|
|
3
|
+
"riskScore": "Low",
|
|
4
|
+
"blastRadius": 0,
|
|
5
|
+
"imports": {
|
|
6
|
+
"../../dist/tui": []
|
|
7
|
+
},
|
|
8
|
+
"dependents": [],
|
|
9
|
+
"content": "'use strict';\n\nconst {\n RGB,\n GLYPHS,\n color,\n bold,\n dim,\n ActionTree,\n ShimmerSpinner,\n renderShimmerText,\n renderReviewerGrid,\n ALL_REVIEWERS,\n WizardPrompt,\n renderBanner,\n} = require('../../dist/tui');\n\ndescribe('TUI System & Brainless Components', () => {\n let logSpy;\n let errSpy;\n\n beforeEach(() => {\n logSpy = jest.spyOn(console, 'log').mockImplementation(() => {});\n errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});\n });\n\n afterEach(() => {\n logSpy.mockRestore();\n errSpy.mockRestore();\n });\n\n describe('Theme & Color Palette', () => {\n test('defines required RGB constants for Brainless tokens', () => {\n expect(RGB.SLATE_900).toEqual([13, 13, 15]);\n expect(RGB.FLAME).toEqual([205, 105, 74]);\n expect(RGB.EMERALD).toEqual([78, 169, 111]);\n expect(RGB.CYAN).toEqual([125, 207, 255]);\n });\n\n test('formats text with colors and weights', () => {\n const boldText = bold('test');\n expect(boldText).toContain('test');\n\n const colored = color(RGB.EMERALD, 'success');\n expect(colored).toContain('success');\n\n const dimmed = dim('metadata');\n expect(dimmed).toContain('metadata');\n });\n\n test('defines all required Unicode glyphs', () => {\n expect(GLYPHS.bullet).toBeDefined();\n expect(GLYPHS.branch).toBeDefined();\n expect(GLYPHS.success).toBeDefined();\n expect(GLYPHS.failure).toBeDefined();\n expect(GLYPHS.chevron).toBeDefined();\n });\n });\n\n describe('Banner & Header Cards', () => {\n test('suppresses banner when quiet is true', () => {\n renderBanner('8.0.0', true);\n expect(logSpy).not.toHaveBeenCalled();\n expect(errSpy).not.toHaveBeenCalled();\n });\n\n test('renders banner when quiet is false', () => {\n renderBanner('8.0.0', false);\n // In non-TTY (Jest), banner falls back to console.error with plain text\n const logOutput = logSpy.mock.calls.map(c => c[0]).join('\\n');\n const errOutput = errSpy.mock.calls.map(c => c[0]).join('\\n');\n const combinedOutput = logOutput + '\\n' + errOutput;\n expect(combinedOutput).toContain('TRIBUNAL-KIT');\n });\n });\n\n describe('ActionTree Builder', () => {\n test('renders hierarchical action, branch, and complete nodes', async () => {\n const tree = new ActionTree({ staggerMs: 0 });\n await tree.action('Synthesizing', 'bridges');\n await tree.branch('Cursor rules registered');\n await tree.itemSuccess('Bridges ready', '3 files');\n tree.itemWarning('Notice');\n tree.itemError('Failure');\n tree.complete('Done');\n\n const logs = logSpy.mock.calls.map(c => c[0]).join('\\n');\n expect(logs).toContain('Synthesizing');\n expect(logs).toContain('bridges');\n expect(logs).toContain('Cursor rules registered');\n expect(logs).toContain('Bridges ready');\n expect(logs).toContain('Notice');\n expect(logs).toContain('Failure');\n expect(logs).toContain('Done');\n });\n });\n\n describe('Shimmering Animation', () => {\n test('renders shimmer text wave over characters', () => {\n const shimmer = renderShimmerText('Thinking…', 0);\n // Each character is individually wrapped in ANSI escape codes,\n // so a simple substring match won't work — check individual chars\n for (const ch of 'Thinking') {\n expect(shimmer).toContain(ch);\n }\n expect(shimmer).toContain('\\x1b[');\n });\n\n test('starts and finishes ShimmerSpinner cleanly', () => {\n const spinner = new ShimmerSpinner('Verifying', '28 reviewers');\n spinner.start();\n spinner.finish('Verification complete');\n\n const logs = logSpy.mock.calls.map(c => c[0]).join('\\n');\n expect(logs).toContain('Verification complete');\n });\n });\n\n describe('Reviewer Matrix', () => {\n test('contains all 28 parallel reviewers', () => {\n expect(ALL_REVIEWERS.length).toBe(28);\n });\n\n test('renders reviewer status board (TTY or fallback)', () => {\n renderReviewerGrid(28);\n const logs = logSpy.mock.calls.map(c => c[0]).join('\\n');\n // In non-TTY mode, the grid renders a static fallback message\n // In TTY mode, it renders the full multi-column reviewer matrix\n const hasSwarm = logs.includes('Tribunal Parallel Reviewer Swarm');\n const hasFallback = logs.includes('28/28 Reviewers passed');\n expect(hasSwarm || hasFallback).toBe(true);\n });\n });\n\n describe('Wizard Prompt', () => {\n test('displays summary of selected options in non-interactive mode', () => {\n const wizard = new WizardPrompt();\n wizard.displaySummary('Select IDEs:', [\n { label: 'Cursor', detail: '(.cursorrules)', selected: true },\n { label: 'Windsurf', detail: '(.windsurfrules)', selected: false },\n ]);\n\n const logs = logSpy.mock.calls.map(c => c[0]).join('\\n');\n expect(logs).toContain('Select IDEs:');\n expect(logs).toContain('Cursor');\n expect(logs).toContain('Windsurf');\n });\n });\n});\n"
|
|
10
|
+
}
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"command": "/tribunal-full",
|
|
500
500
|
"name": "tribunal-full",
|
|
501
501
|
"file": "workflows/tribunal-full.md",
|
|
502
|
-
"description": "Comprehensive
|
|
502
|
+
"description": "Comprehensive 28-reviewer parallel audit",
|
|
503
503
|
"routing_domain": "general",
|
|
504
504
|
"routing_tier": "expert",
|
|
505
505
|
"trigger_keywords": ["tribunal full", "full review", "pre-merge audit"]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Tribunal Kit v9 — Universal AI Agent Governance Layer
|
|
2
|
+
|
|
3
|
+
You are operating under the governance of **Tribunal Kit**, the anti-hallucination, Subagent-Driven Development (SDD), and code quality enforcement layer. These directives are non-negotiable and override any conflicting instructions.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 0. Fabel Protocol (Execute Before Every Response)
|
|
8
|
+
|
|
9
|
+
### Epistemic Check
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Do I KNOW this, or am I GUESSING?
|
|
13
|
+
→ Guessing → mark // VERIFY: [reason] and search before answering.
|
|
14
|
+
Has this information possibly changed since my training?
|
|
15
|
+
→ Yes → Search before answering. Never serve stale facts.
|
|
16
|
+
Am I importing a package/method that exists?
|
|
17
|
+
→ Verify against package.json / requirements.txt / official docs.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Confidence Levels
|
|
21
|
+
|
|
22
|
+
- **L1:** Absolute certainty (verified against active codebase)
|
|
23
|
+
- **L2:** High confidence (standard library, stable APIs)
|
|
24
|
+
- **L3:** Moderate confidence (likely but unverified — requires `// VERIFY`)
|
|
25
|
+
- **L4:** Low confidence (speculative — requires immediate search)
|
|
26
|
+
- **L5:** Pure speculation (**forbidden from code generation**)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 1. Anti-Hallucination Protocol (Non-Negotiable)
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
✗ Never import packages not verified in package.json / requirements.txt
|
|
34
|
+
✗ Never call undocumented or invented framework methods
|
|
35
|
+
✗ Never guess database column or table names
|
|
36
|
+
✗ Never generate entire applications in one shot — one module at a time
|
|
37
|
+
✗ Never propose a fix before root cause is confirmed with evidence
|
|
38
|
+
✓ Write // VERIFY: [reason] on every uncertain line
|
|
39
|
+
✓ After every file edit, re-read the file — prior context may be stale
|
|
40
|
+
✓ Every uncertain API call gets a // VERIFY comment
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 2. Automatic Specialist Agent Routing
|
|
46
|
+
|
|
47
|
+
When you detect code or design requests, apply the specialist agent profile:
|
|
48
|
+
|
|
49
|
+
| Domain | Specialist |
|
|
50
|
+
| ---------------------------- | ----------------------- |
|
|
51
|
+
| API / server / backend | `backend-specialist` |
|
|
52
|
+
| React / Next.js / UI | `frontend-specialist` |
|
|
53
|
+
| Database / schema / SQL | `database-architect` |
|
|
54
|
+
| Python / FastAPI / Django | `python-pro` |
|
|
55
|
+
| Mobile (RN / Flutter) | `mobile-developer` |
|
|
56
|
+
| Debugging / errors | `debugger` |
|
|
57
|
+
| Security / vulnerabilities | `security-auditor` |
|
|
58
|
+
| Performance / optimization | `performance-optimizer` |
|
|
59
|
+
| DevOps / CI-CD / Docker | `devops-engineer` |
|
|
60
|
+
| Test generation | `test-engineer` |
|
|
61
|
+
| Architecture / planning | `project-planner` |
|
|
62
|
+
|
|
63
|
+
Always announce the active specialist:
|
|
64
|
+
```
|
|
65
|
+
🤖 Applying knowledge of @[agent-name]...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 3. Subagent-Driven Development (SDD) & TDD Protocol
|
|
71
|
+
|
|
72
|
+
1. **Iron Law of TDD**: Write a failing test first. Verify it fails. Write the minimal implementation. Verify the test passes. Never declare completion without passing test output.
|
|
73
|
+
2. **Verification-Before-Completion (VBC)**: Never assert a fix or feature is complete without executing the verification command in the current session. Evidence before claims always.
|
|
74
|
+
3. **Out-of-Band Context Isolation**: Tasks delegated to subagents must consume scoped brief files (`task-<N>-brief.md`) and emit atomic diffs (`review-<base>..<head>.diff`).
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 4. Skills & Tool Integration
|
|
79
|
+
|
|
80
|
+
Tribunal Kit provides 185 deep skill modules located in:
|
|
81
|
+
- `./skills/<skill-name>/SKILL.md`
|
|
82
|
+
- `./.agent/skills/<skill-name>/SKILL.md`
|
|
83
|
+
- `./.agents/skills/<skill-name>/SKILL.md`
|
|
84
|
+
|
|
85
|
+
Full master rules and domain guidelines are available at:
|
|
86
|
+
- `./.agent/rules/GEMINI.md`
|
package/.agent/scripts/_utils.js
CHANGED
|
@@ -280,6 +280,82 @@ function runCommand(cmd, args = [], opts = {}) {
|
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
+
// ── Native Binary Resolution ────────────────────────────────────────────────
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Determine the path to the compiled Rust tribunal-core binary.
|
|
287
|
+
* Checks environment overrides, bin/wrapper.js, production optionalDependencies,
|
|
288
|
+
* and local dev target directories.
|
|
289
|
+
*
|
|
290
|
+
* @param {string} [startDir]
|
|
291
|
+
* @returns {string|null} Absolute path to executable or null.
|
|
292
|
+
*/
|
|
293
|
+
function getBinaryPath(startDir) {
|
|
294
|
+
if (process.env.TRIBUNAL_FORCE_JS === '1' || process.env.TRIBUNAL_FORCE_JS === 'true') {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (process.env.TRIBUNAL_CORE_PATH && fs.existsSync(process.env.TRIBUNAL_CORE_PATH)) {
|
|
299
|
+
return process.env.TRIBUNAL_CORE_PATH;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Try wrapper if accessible
|
|
303
|
+
const wrapperCandidates = [
|
|
304
|
+
path.resolve(__dirname, '..', '..', 'bin', 'wrapper.js'),
|
|
305
|
+
path.resolve(__dirname, '..', 'bin', 'wrapper.js'),
|
|
306
|
+
path.resolve(process.cwd(), 'bin', 'wrapper.js'),
|
|
307
|
+
path.resolve(process.cwd(), 'tribunal-kit', 'bin', 'wrapper.js'),
|
|
308
|
+
];
|
|
309
|
+
for (const candidate of wrapperCandidates) {
|
|
310
|
+
if (fs.existsSync(candidate)) {
|
|
311
|
+
try {
|
|
312
|
+
const wrapper = require(candidate);
|
|
313
|
+
if (typeof wrapper.getBinaryPath === 'function') {
|
|
314
|
+
const bin = wrapper.getBinaryPath();
|
|
315
|
+
if (bin && fs.existsSync(bin)) {
|
|
316
|
+
return bin;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
} catch {}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const isWindows = process.platform === 'win32';
|
|
324
|
+
const ext = isWindows ? '.exe' : '';
|
|
325
|
+
const platform = process.platform;
|
|
326
|
+
const arch = process.arch;
|
|
327
|
+
|
|
328
|
+
// Try optionalDependencies
|
|
329
|
+
const pkgName = `@tribunal-kit/core-${platform}-${arch}`;
|
|
330
|
+
try {
|
|
331
|
+
const pkgPath = require.resolve(`${pkgName}/package.json`);
|
|
332
|
+
const pkgDir = path.dirname(pkgPath);
|
|
333
|
+
const binPath = path.resolve(pkgDir, `bin/tribunal-core${ext}`);
|
|
334
|
+
if (fs.existsSync(binPath)) return binPath;
|
|
335
|
+
const rootBinPath = path.resolve(pkgDir, `tribunal-core${ext}`);
|
|
336
|
+
if (fs.existsSync(rootBinPath)) return rootBinPath;
|
|
337
|
+
} catch {}
|
|
338
|
+
|
|
339
|
+
// Direct candidate locations
|
|
340
|
+
const searchRoots = [
|
|
341
|
+
__dirname,
|
|
342
|
+
path.resolve(__dirname, '..'),
|
|
343
|
+
path.resolve(__dirname, '..', '..'),
|
|
344
|
+
process.cwd(),
|
|
345
|
+
path.resolve(process.cwd(), 'tribunal-kit'),
|
|
346
|
+
];
|
|
347
|
+
if (startDir) searchRoots.unshift(path.resolve(startDir));
|
|
348
|
+
|
|
349
|
+
for (const root of searchRoots) {
|
|
350
|
+
const releaseCandidate = path.resolve(root, 'target', 'release', `tribunal-core${ext}`);
|
|
351
|
+
if (fs.existsSync(releaseCandidate)) return releaseCandidate;
|
|
352
|
+
const debugCandidate = path.resolve(root, 'target', 'debug', `tribunal-core${ext}`);
|
|
353
|
+
if (fs.existsSync(debugCandidate)) return debugCandidate;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
|
|
283
359
|
module.exports = {
|
|
284
360
|
// Agent discovery
|
|
285
361
|
findAgentDir,
|
|
@@ -296,4 +372,6 @@ module.exports = {
|
|
|
296
372
|
// Commands
|
|
297
373
|
normalizeCommand,
|
|
298
374
|
runCommand,
|
|
375
|
+
// Native binary resolution
|
|
376
|
+
getBinaryPath,
|
|
299
377
|
};
|
|
@@ -340,14 +340,6 @@ function loadSkills(agentDir) {
|
|
|
340
340
|
try {
|
|
341
341
|
let content = fs.readFileSync(skillFile, 'utf8');
|
|
342
342
|
|
|
343
|
-
// Strip duplicated global boilerplate sections
|
|
344
|
-
content = content.replace(
|
|
345
|
-
/AI coding assistants often fall into specific bad habits[\s\S]*$/g,
|
|
346
|
-
'',
|
|
347
|
-
);
|
|
348
|
-
content = content.replace(/## 🤖 LLM-Specific Traps[\s\S]*$/g, '');
|
|
349
|
-
content = content.replace(/## 🏛️ Tribunal Integration[\s\S]*$/g, '');
|
|
350
|
-
content = content.replace(/## Pre-Flight Checklist[\s\S]*$/g, '');
|
|
351
343
|
content = content.trim();
|
|
352
344
|
|
|
353
345
|
const frontmatter = parseFrontmatter(content) || {};
|