tribunal-kit 5.8.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ARCHITECTURE.md +219 -215
- package/.agent/agents/accessibility-reviewer.md +66 -151
- package/.agent/agents/ai-code-reviewer.md +22 -2
- package/.agent/agents/anti-pattern-reviewer.md +99 -0
- package/.agent/agents/api-architect.md +19 -2
- package/.agent/agents/backend-specialist.md +25 -3
- package/.agent/agents/cloud-engineer.md +21 -0
- package/.agent/agents/code-archaeologist.md +20 -3
- package/.agent/agents/complexity-reviewer.md +22 -2
- package/.agent/agents/database-architect.md +24 -3
- package/.agent/agents/db-latency-auditor.md +22 -2
- package/.agent/agents/debugger.md +19 -3
- package/.agent/agents/dependency-reviewer.md +19 -2
- package/.agent/agents/devops-engineer.md +24 -3
- package/.agent/agents/documentation-writer.md +21 -3
- package/.agent/agents/explorer-agent.md +21 -3
- package/.agent/agents/frontend-reviewer.md +19 -3
- package/.agent/agents/frontend-specialist.md +72 -224
- package/.agent/agents/game-developer.md +22 -3
- package/.agent/agents/interaction-reviewer.md +118 -0
- package/.agent/agents/logic-reviewer.md +18 -3
- package/.agent/agents/minimalist-reviewer.md +98 -0
- package/.agent/agents/mobile-developer.md +21 -3
- package/.agent/agents/mobile-reviewer.md +22 -2
- package/.agent/agents/orchestrator.md +19 -3
- package/.agent/agents/penetration-tester.md +22 -3
- package/.agent/agents/performance-optimizer.md +21 -3
- package/.agent/agents/performance-reviewer.md +2 -0
- package/.agent/agents/precedence-reviewer.md +19 -5
- package/.agent/agents/product-manager.md +20 -3
- package/.agent/agents/product-owner.md +22 -1
- package/.agent/agents/product-reviewer.md +98 -0
- package/.agent/agents/project-planner.md +19 -3
- package/.agent/agents/qa-automation-engineer.md +24 -3
- package/.agent/agents/resilience-reviewer.md +21 -2
- package/.agent/agents/schema-reviewer.md +21 -2
- package/.agent/agents/security-auditor.md +7 -1
- package/.agent/agents/seo-specialist.md +18 -3
- package/.agent/agents/sql-reviewer.md +22 -2
- package/.agent/agents/supervisor-agent.md +22 -3
- package/.agent/agents/swarm-worker-registry.md +7 -0
- package/.agent/agents/system-architect.md +19 -0
- package/.agent/agents/test-coverage-reviewer.md +22 -2
- package/.agent/agents/test-engineer.md +21 -2
- package/.agent/agents/throughput-optimizer.md +22 -2
- package/.agent/agents/type-safety-reviewer.md +21 -2
- package/.agent/agents/ui-ux-auditor.md +44 -242
- package/.agent/agents/ui-visual-auditor.md +99 -0
- package/.agent/agents/ux-reviewer.md +104 -0
- package/.agent/agents/visual-reviewer.md +98 -0
- package/.agent/agents/vitals-reviewer.md +23 -2
- package/.agent/history/README.md +53 -0
- package/.agent/history/case-law/cases/template-case.json +19 -0
- package/.agent/history/integrity_manifest.json +131 -33
- package/.agent/history/memory/.memory.idx +1581 -1
- package/.agent/history/memory/MEMORY.md +105 -1
- package/.agent/routing_index.json +272 -690
- package/.agent/rules/GEMINI.md +10 -12
- package/.agent/rules/GEMINI_PLANNER.md +84 -0
- package/.agent/scripts/_utils.js +28 -7
- package/.agent/scripts/case_law_manager.js +2 -0
- package/.agent/scripts/context_broker.js +152 -19
- package/.agent/scripts/guardrail_engine.js +60 -5
- package/.agent/scripts/impact_classifier.js +167 -0
- package/.agent/scripts/integrity_manifest.js +10 -4
- package/.agent/scripts/marathon_harness.js +10 -1
- package/.agent/scripts/minimal_change_engine.js +437 -0
- package/.agent/scripts/pipeline_engine.js +856 -0
- package/.agent/scripts/skill_evolution.js +36 -21
- package/.agent/scripts/socratic_gate_policy.js +60 -0
- package/.agent/scripts/swarm_dispatcher.js +65 -6
- package/.agent/scripts/token_budget_broker.js +52 -0
- package/.agent/scripts/verify_all.js +13 -0
- package/.agent/scripts/visual_audit.js +92 -0
- package/.agent/skills/12-principles-of-animation/SKILL.md +19 -10
- package/.agent/skills/60fps-animation/SKILL.md +19 -10
- package/.agent/skills/accessible-animation/SKILL.md +19 -10
- package/.agent/skills/adapt/SKILL.md +19 -10
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +21 -3
- package/.agent/skills/agent-organizer/SKILL.md +21 -7
- package/.agent/skills/agentic-patterns/SKILL.md +19 -7
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +21 -7
- package/.agent/skills/animation-on-scroll/SKILL.md +19 -10
- package/.agent/skills/animation-systems/SKILL.md +19 -10
- package/.agent/skills/antfu-conventions/SKILL.md +21 -10
- package/.agent/skills/api-patterns/SKILL.md +21 -7
- package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
- package/.agent/skills/api-security-auditor/SKILL.md +21 -7
- package/.agent/skills/app-builder/SKILL.md +21 -7
- package/.agent/skills/apple-design/SKILL.md +19 -10
- package/.agent/skills/architecture/SKILL.md +21 -7
- package/.agent/skills/audit-and-fix/SKILL.md +19 -10
- package/.agent/skills/authentication-best-practices/SKILL.md +21 -7
- package/.agent/skills/backend-security-expert/SKILL.md +21 -7
- package/.agent/skills/baseline-ui/SKILL.md +19 -10
- package/.agent/skills/bash-linux/SKILL.md +21 -7
- package/.agent/skills/behavioral-modes/SKILL.md +19 -7
- package/.agent/skills/better-colors/SKILL.md +31 -14
- package/.agent/skills/better-ui/SKILL.md +19 -10
- package/.agent/skills/bolder/SKILL.md +19 -10
- package/.agent/skills/brainstorming/SKILL.md +17 -7
- package/.agent/skills/browser-native-ai/SKILL.md +19 -3
- package/.agent/skills/build-primitive/SKILL.md +19 -10
- package/.agent/skills/building-native-ui/SKILL.md +21 -7
- package/.agent/skills/cicd-pro/SKILL.md +21 -10
- package/.agent/skills/clarify/SKILL.md +19 -10
- package/.agent/skills/clean-code/SKILL.md +21 -7
- package/.agent/skills/cloud-architect/SKILL.md +21 -10
- package/.agent/skills/cobejs/SKILL.md +19 -10
- package/.agent/skills/code-review-checklist/SKILL.md +21 -7
- package/.agent/skills/codebase-design/SKILL.md +21 -10
- package/.agent/skills/colorize/SKILL.md +19 -10
- package/.agent/skills/compact-landing/SKILL.md +19 -10
- package/.agent/skills/company-logos/SKILL.md +19 -10
- package/.agent/skills/config-validator/SKILL.md +21 -7
- package/.agent/skills/containerization-pro/SKILL.md +21 -10
- package/.agent/skills/create-design-md/SKILL.md +19 -10
- package/.agent/skills/critique/SKILL.md +19 -10
- package/.agent/skills/csharp-developer/SKILL.md +21 -7
- package/.agent/skills/data-validation-schemas/SKILL.md +21 -7
- package/.agent/skills/database-design/SKILL.md +21 -7
- package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -0
- package/.agent/skills/delight/SKILL.md +19 -10
- package/.agent/skills/deployment-procedures/SKILL.md +21 -7
- package/.agent/skills/design-lab/SKILL.md +21 -10
- package/.agent/skills/devops-engineer/SKILL.md +21 -7
- package/.agent/skills/devops-incident-responder/SKILL.md +21 -7
- package/.agent/skills/diagnosing-bugs/SKILL.md +21 -10
- package/.agent/skills/distill/SKILL.md +19 -10
- package/.agent/skills/documentation-templates/SKILL.md +21 -7
- package/.agent/skills/domain-modeling/SKILL.md +21 -10
- package/.agent/skills/edge-computing/SKILL.md +21 -7
- package/.agent/skills/emil-design-eng/SKILL.md +19 -10
- package/.agent/skills/error-resilience/SKILL.md +21 -7
- package/.agent/skills/extract-design-system/SKILL.md +21 -7
- package/.agent/skills/fabel-protocol/SKILL.md +19 -2
- package/.agent/skills/fixing-accessibility/SKILL.md +25 -14
- package/.agent/skills/fixing-metadata/SKILL.md +19 -10
- package/.agent/skills/fixing-motion-performance/SKILL.md +19 -10
- package/.agent/skills/framer-motion-expert/SKILL.md +19 -6
- package/.agent/skills/frontend-design/SKILL.md +66 -204
- package/.agent/skills/frontend-design/scripts/__pycache__/accessibility_checker.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-design/scripts/__pycache__/ux_audit.cpython-311.pyc +0 -0
- package/.agent/skills/frontend-security-expert/SKILL.md +21 -7
- package/.agent/skills/game-design-expert/SKILL.md +21 -7
- package/.agent/skills/game-engineering-expert/SKILL.md +21 -7
- package/.agent/skills/generative-ui-expert/SKILL.md +19 -3
- package/.agent/skills/geo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/git-pro/SKILL.md +21 -10
- package/.agent/skills/github-operations/SKILL.md +21 -7
- package/.agent/skills/gpt-taste/SKILL.md +19 -10
- package/.agent/skills/gsap-core/SKILL.md +21 -4
- package/.agent/skills/gsap-frameworks/SKILL.md +21 -4
- package/.agent/skills/gsap-performance/SKILL.md +20 -5
- package/.agent/skills/gsap-plugins/SKILL.md +20 -5
- package/.agent/skills/gsap-react/SKILL.md +20 -5
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +21 -4
- package/.agent/skills/gsap-timeline/SKILL.md +20 -5
- package/.agent/skills/gsap-utils/SKILL.md +20 -5
- package/.agent/skills/harden/SKILL.md +19 -10
- package/.agent/skills/harness-protocol/SKILL.md +20 -4
- package/.agent/skills/i18n-localization/SKILL.md +21 -7
- package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
- package/.agent/skills/impeccable/SKILL.md +21 -10
- package/.agent/skills/improve-codebase-architecture/SKILL.md +21 -10
- package/.agent/skills/improve-ui/SKILL.md +19 -10
- package/.agent/skills/intelligent-routing/SKILL.md +19 -7
- package/.agent/skills/knowledge-graph/SKILL.md +20 -4
- package/.agent/skills/landing-page/SKILL.md +20 -10
- package/.agent/skills/lint-and-validate/SKILL.md +21 -7
- package/.agent/skills/lint-and-validate/scripts/__pycache__/lint_runner.cpython-311.pyc +0 -0
- package/.agent/skills/lint-and-validate/scripts/__pycache__/type_coverage.cpython-311.pyc +0 -0
- package/.agent/skills/llm-engineering/SKILL.md +21 -7
- package/.agent/skills/local-first/SKILL.md +21 -7
- package/.agent/skills/local-first-architecture/SKILL.md +19 -10
- package/.agent/skills/lottie-animation/SKILL.md +19 -10
- package/.agent/skills/marquee-loop/SKILL.md +19 -10
- package/.agent/skills/masked-reveal/SKILL.md +19 -10
- package/.agent/skills/mcp-builder/SKILL.md +21 -7
- package/.agent/skills/micro-interaction/SKILL.md +19 -10
- package/.agent/skills/mobile-design/SKILL.md +21 -6
- package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
- package/.agent/skills/monorepo-management/SKILL.md +21 -7
- package/.agent/skills/morphing-icons/SKILL.md +19 -10
- package/.agent/skills/motion-engineering/SKILL.md +86 -171
- package/.agent/skills/nextjs-react-expert/SKILL.md +19 -7
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/convert_rules.cpython-311.pyc +0 -0
- package/.agent/skills/nextjs-react-expert/scripts/__pycache__/react_performance_checker.cpython-311.pyc +0 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +21 -7
- package/.agent/skills/observability/SKILL.md +21 -7
- package/.agent/skills/page-transition-animation/SKILL.md +19 -10
- package/.agent/skills/parallel-agents/SKILL.md +23 -7
- package/.agent/skills/performance-profiling/SKILL.md +21 -7
- package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
- package/.agent/skills/plan-writing/SKILL.md +21 -7
- package/.agent/skills/platform-engineer/SKILL.md +21 -7
- package/.agent/skills/playwright-best-practices/SKILL.md +21 -7
- package/.agent/skills/polish/SKILL.md +19 -10
- package/.agent/skills/powershell-windows/SKILL.md +21 -7
- package/.agent/skills/pricing-page/SKILL.md +19 -10
- package/.agent/skills/product-aware-heuristics/SKILL.md +358 -0
- package/.agent/skills/progressive-blur/SKILL.md +19 -10
- package/.agent/skills/project-idioms/SKILL.md +20 -8
- package/.agent/skills/python-patterns/SKILL.md +21 -7
- package/.agent/skills/python-pro/SKILL.md +21 -6
- package/.agent/skills/quieter/SKILL.md +19 -10
- package/.agent/skills/react-doctor/SKILL.md +19 -10
- package/.agent/skills/react-specialist/SKILL.md +19 -6
- package/.agent/skills/readme-builder/SKILL.md +21 -7
- package/.agent/skills/realtime-patterns/SKILL.md +21 -7
- package/.agent/skills/red-team-tactics/SKILL.md +21 -7
- package/.agent/skills/redesign-skill/SKILL.md +19 -10
- package/.agent/skills/review-animations/SKILL.md +21 -10
- package/.agent/skills/rust-pro/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/SKILL.md +21 -7
- package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
- package/.agent/skills/server-management/SKILL.md +21 -7
- package/.agent/skills/shadcn-ui-expert/SKILL.md +21 -7
- package/.agent/skills/shape/SKILL.md +19 -10
- package/.agent/skills/skill-creator/SKILL.md +21 -7
- package/.agent/skills/soft-skill/SKILL.md +19 -10
- package/.agent/skills/sounds-on-the-web/SKILL.md +19 -10
- package/.agent/skills/sql-pro/SKILL.md +21 -7
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +21 -7
- package/.agent/skills/svg-animation/SKILL.md +19 -10
- package/.agent/skills/swiftui-expert/SKILL.md +21 -7
- package/.agent/skills/swiss-design/SKILL.md +19 -10
- package/.agent/skills/system-design-pro/SKILL.md +21 -9
- package/.agent/skills/systematic-debugging/SKILL.md +21 -7
- package/.agent/skills/tailwind-patterns/SKILL.md +21 -7
- package/.agent/skills/taste-skill/SKILL.md +19 -10
- package/.agent/skills/tdd-workflow/SKILL.md +21 -10
- package/.agent/skills/test-result-analyzer/SKILL.md +18 -6
- package/.agent/skills/testing-patterns/SKILL.md +21 -7
- package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +21 -10
- package/.agent/skills/thinking-protocol/SKILL.md +20 -8
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +19 -10
- package/.agent/skills/transitions-dev/SKILL.md +19 -10
- package/.agent/skills/trend-researcher/SKILL.md +17 -6
- package/.agent/skills/typescript-advanced/SKILL.md +21 -7
- package/.agent/skills/typeset/SKILL.md +19 -10
- package/.agent/skills/ui-reasoning-engine/SKILL.md +154 -0
- package/.agent/skills/ui-skill-packs/SKILL.md +77 -0
- package/.agent/skills/ui-skills-root/SKILL.md +21 -9
- package/.agent/skills/ui-ux-pro-max/SKILL.md +62 -583
- package/.agent/skills/ui-ux-researcher/SKILL.md +17 -6
- package/.agent/skills/vue-expert/SKILL.md +19 -6
- package/.agent/skills/vulnerability-scanner/SKILL.md +21 -7
- package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/skills/web-accessibility-auditor/SKILL.md +21 -7
- package/.agent/skills/web-design-guidelines/SKILL.md +32 -206
- package/.agent/skills/web-quality-audit/SKILL.md +19 -10
- package/.agent/skills/webapp-testing/SKILL.md +21 -7
- package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
- package/.agent/skills/webgpu-performance/SKILL.md +19 -3
- package/.agent/skills/whimsy-injector/SKILL.md +20 -10
- package/.agent/skills/workflow-optimizer/SKILL.md +16 -6
- package/.agent/templates/DESIGN.md +292 -0
- package/.agent/templates/design-tokens.json +137 -0
- package/.agent/workflows/acf.md +13 -6
- package/.agent/workflows/api-tester.md +15 -8
- package/.agent/workflows/audit.md +19 -8
- package/.agent/workflows/brainstorm.md +14 -9
- package/.agent/workflows/changelog.md +14 -8
- package/.agent/workflows/create.md +16 -8
- package/.agent/workflows/debug.md +15 -10
- package/.agent/workflows/deploy.md +16 -8
- package/.agent/workflows/enhance.md +15 -10
- package/.agent/workflows/fix.md +15 -8
- package/.agent/workflows/generate.md +17 -11
- package/.agent/workflows/marathon.md +15 -8
- package/.agent/workflows/migrate.md +16 -8
- package/.agent/workflows/minimal.md +94 -0
- package/.agent/workflows/orchestrate.md +15 -8
- package/.agent/workflows/performance-benchmarker.md +15 -8
- package/.agent/workflows/pipeline.md +155 -0
- package/.agent/workflows/plan.md +14 -10
- package/.agent/workflows/preview.md +14 -7
- package/.agent/workflows/refactor.md +16 -8
- package/.agent/workflows/review-ai.md +15 -7
- package/.agent/workflows/review.md +15 -7
- package/.agent/workflows/session.md +14 -7
- package/.agent/workflows/status.md +13 -7
- package/.agent/workflows/strengthen-skills.md +15 -6
- package/.agent/workflows/super-prompt.md +19 -10
- package/.agent/workflows/swarm.md +15 -7
- package/.agent/workflows/test.md +15 -8
- package/.agent/workflows/tribunal-backend.md +16 -9
- package/.agent/workflows/tribunal-database.md +15 -8
- package/.agent/workflows/tribunal-frontend.md +26 -11
- package/.agent/workflows/tribunal-full.md +29 -14
- package/.agent/workflows/tribunal-mobile.md +15 -8
- package/.agent/workflows/tribunal-performance.md +15 -8
- package/.agent/workflows/tribunal-speed.md +16 -9
- package/.agent/workflows/tribunal-ui.md +82 -0
- package/.agent/workflows/ui-ux-pro-max.md +51 -107
- package/CONTRIBUTING.md +2 -2
- package/README.md +5 -5
- package/bin/mcp-server.js +126 -76
- package/bin/wrapper.js +67 -31
- package/dist/cli.js +39 -1
- package/dist/commands/compile.js +7 -0
- package/dist/commands/context.js +8 -3
- package/dist/commands/graph.js +8 -2
- package/dist/commands/init.js +37 -2
- package/dist/commands/memory.js +119 -68
- package/dist/commands/minimal.js +71 -0
- package/dist/commands/native.js +228 -0
- package/dist/commands/optimize.js +15 -5
- package/dist/commands/validate.js +67 -0
- package/dist/esm/index.mjs +26 -32
- package/dist/mcp/server.js +4 -138
- package/dist/utils/fs.js +10 -4
- package/dist/utils/helpers.js +10 -1
- package/dist/utils/version.js +9 -2
- package/mcp_config.json +10 -1
- package/package.json +19 -15
- package/scripts/benchmark.js +58 -0
- package/scripts/sync-version.js +129 -76
- package/scripts/visual_audit.js +126 -0
package/scripts/sync-version.js
CHANGED
|
@@ -1,94 +1,147 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* sync-version.js —
|
|
3
|
+
* sync-version.js — Release metadata consistency check for Tribunal Kit.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Run manually or as a preversion npm script:
|
|
9
|
-
* node scripts/sync-version.js
|
|
5
|
+
* Verifies the package version, native package metadata, lockfile metadata,
|
|
6
|
+
* and public asset-count claims before a release. It intentionally performs
|
|
7
|
+
* no implicit writes: a failed check makes stale release metadata visible.
|
|
10
8
|
*/
|
|
11
9
|
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
12
|
const fs = require("fs");
|
|
13
13
|
const path = require("path");
|
|
14
14
|
|
|
15
15
|
const ROOT = path.resolve(__dirname, "..");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const PKG_PATH = path.join(ROOT, "package.json");
|
|
17
|
+
const PKG = JSON.parse(fs.readFileSync(PKG_PATH, "utf8"));
|
|
18
|
+
const VERSION = PKG.version;
|
|
19
|
+
|
|
20
|
+
function readText(relativePath) {
|
|
21
|
+
return fs.readFileSync(path.join(ROOT, relativePath), "utf8");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function readJson(relativePath) {
|
|
25
|
+
return JSON.parse(readText(relativePath));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function countDirectory(relativePath, predicate) {
|
|
29
|
+
const directory = path.join(ROOT, relativePath);
|
|
30
|
+
if (!fs.existsSync(directory)) return 0;
|
|
31
|
+
return fs.readdirSync(directory, { withFileTypes: true }).filter(predicate).length;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function countReviewers() {
|
|
35
|
+
const agentsDir = path.join(ROOT, ".agent", "agents");
|
|
36
|
+
return countDirectory(".agent/agents", (entry) => {
|
|
37
|
+
if (!entry.isFile() || !entry.name.endsWith(".md")) return false;
|
|
38
|
+
const content = fs.readFileSync(path.join(agentsDir, entry.name), "utf8");
|
|
39
|
+
return /reviewer|auditor|tester|throughput-optimizer/i.test(entry.name) || /^role:\s*reviewer\s*$/im.test(content);
|
|
40
|
+
});
|
|
25
41
|
}
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
expected
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
43
|
+
|
|
44
|
+
const COUNTS = {
|
|
45
|
+
agents: countDirectory(".agent/agents", (entry) => entry.isFile() && entry.name.endsWith(".md")),
|
|
46
|
+
reviewers: countReviewers(),
|
|
47
|
+
skills: countDirectory(".agent/skills", (entry) => entry.isDirectory() && fs.existsSync(path.join(ROOT, ".agent", "skills", entry.name, "SKILL.md"))),
|
|
48
|
+
workflows: countDirectory(".agent/workflows", (entry) => entry.isFile() && entry.name.endsWith(".md")),
|
|
49
|
+
scripts: countDirectory(".agent/scripts", (entry) => entry.isFile() && /\.(?:js|py)$/.test(entry.name)),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const failures = [];
|
|
53
|
+
|
|
54
|
+
function fail(message) {
|
|
55
|
+
failures.push(message);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function checkVersionMetadata() {
|
|
59
|
+
const expectedOptionalVersion = `^${VERSION}`;
|
|
60
|
+
for (const [name, declaredVersion] of Object.entries(PKG.optionalDependencies || {})) {
|
|
61
|
+
if (declaredVersion !== expectedOptionalVersion) {
|
|
62
|
+
fail(`package.json optional dependency ${name} is ${declaredVersion}, expected ${expectedOptionalVersion}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const lock = readJson("package-lock.json");
|
|
67
|
+
if (lock.version !== VERSION || lock.packages?.[""]?.version !== VERSION) {
|
|
68
|
+
fail(`package-lock.json root version does not match package.json (${VERSION})`);
|
|
69
|
+
}
|
|
70
|
+
for (const [name, declaredVersion] of Object.entries(lock.packages?.[""]?.optionalDependencies || {})) {
|
|
71
|
+
if (declaredVersion !== expectedOptionalVersion) {
|
|
72
|
+
fail(`package-lock.json optional dependency ${name} is ${declaredVersion}, expected ${expectedOptionalVersion}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const cargoToml = readText("crates/core/Cargo.toml");
|
|
77
|
+
const cargoTomlVersion = cargoToml.match(/^version\s*=\s*"([^"]+)"/m)?.[1];
|
|
78
|
+
if (cargoTomlVersion !== VERSION) {
|
|
79
|
+
fail(`crates/core/Cargo.toml version is ${cargoTomlVersion || "missing"}, expected ${VERSION}`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const cargoLock = readText("Cargo.lock");
|
|
83
|
+
const cargoLockVersion = cargoLock.match(/name\s*=\s*"tribunal-core"\s+version\s*=\s*"([^"]+)"/)?.[1];
|
|
84
|
+
if (cargoLockVersion !== VERSION) {
|
|
85
|
+
fail(`Cargo.lock tribunal-core version is ${cargoLockVersion || "missing"}, expected ${VERSION}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const readmeRelease = readText("README.md").match(/Release-v([0-9]+\.[0-9]+\.[0-9]+)/)?.[1];
|
|
89
|
+
if (readmeRelease !== VERSION) {
|
|
90
|
+
fail(`README release badge is ${readmeRelease || "missing"}, expected ${VERSION}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const DOCUMENTS = [
|
|
95
|
+
"README.md",
|
|
96
|
+
".agent/ARCHITECTURE.md",
|
|
97
|
+
".agent/rules/GEMINI.md",
|
|
98
|
+
"CONTRIBUTING.md",
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const CLAIM_PATTERNS = [
|
|
102
|
+
{ entity: "agents", regex: /(\d+)\s*(?:specialist\s+)?agents?\b/gi },
|
|
103
|
+
{
|
|
104
|
+
entity: "reviewers",
|
|
105
|
+
regex: /(\d+)\s*(?:-\s*)?(?:(?:parallel|domain(?:-specific)?|tribunal|code)\s+)*reviewers?\b/gi,
|
|
106
|
+
},
|
|
107
|
+
{ entity: "skills", regex: /(\d+)\s*(?:valid\s+|modular\s+)?skills?(?:\s+(?:packages?|modules?))?\b/gi },
|
|
108
|
+
{ entity: "workflows", regex: /(\d+)\s*(?:slash\s+)?workflows?\b/gi },
|
|
109
|
+
{ entity: "scripts", regex: /(\d+)\s*(?:JS\s+)?(?:automation\s+)?scripts?\b/gi },
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
function checkDocumentCounts() {
|
|
113
|
+
for (const relativePath of DOCUMENTS) {
|
|
114
|
+
const content = readText(relativePath);
|
|
115
|
+
for (const { entity, regex } of CLAIM_PATTERNS) {
|
|
116
|
+
regex.lastIndex = 0;
|
|
117
|
+
let match;
|
|
118
|
+
while ((match = regex.exec(content)) !== null) {
|
|
119
|
+
const claimed = Number.parseInt(match[1], 10);
|
|
120
|
+
if (claimed < 5 || claimed > 500) continue;
|
|
121
|
+
if (claimed !== COUNTS[entity]) {
|
|
122
|
+
const line = content.slice(0, match.index).split(/\r?\n/).length;
|
|
123
|
+
fail(`${relativePath}:${line} says ${claimed} ${entity}, actual is ${COUNTS[entity]}`);
|
|
124
|
+
}
|
|
78
125
|
}
|
|
79
126
|
}
|
|
80
127
|
}
|
|
81
128
|
}
|
|
82
129
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
130
|
+
console.log(`\n Tribunal Kit v${VERSION} — Release Metadata Check`);
|
|
131
|
+
console.log(" ────────────────────────────────────────────────");
|
|
132
|
+
console.log(` Agents: ${COUNTS.agents} (${COUNTS.reviewers} reviewers)`);
|
|
133
|
+
console.log(` Skills: ${COUNTS.skills}`);
|
|
134
|
+
console.log(` Workflows: ${COUNTS.workflows}`);
|
|
135
|
+
console.log(` Scripts: ${COUNTS.scripts}`);
|
|
136
|
+
|
|
137
|
+
checkVersionMetadata();
|
|
138
|
+
checkDocumentCounts();
|
|
139
|
+
|
|
140
|
+
if (failures.length > 0) {
|
|
141
|
+
console.log();
|
|
142
|
+
for (const message of failures) console.log(` ✗ ${message}`);
|
|
143
|
+
console.log(`\n Found ${failures.length} release metadata inconsistency${failures.length === 1 ? "" : "ies"}.`);
|
|
144
|
+
process.exitCode = 1;
|
|
87
145
|
} else {
|
|
88
|
-
console.log(
|
|
89
|
-
`\n ❌ Found ${staleFound} stale reference(s). Update manually or run the sync tool.`,
|
|
90
|
-
);
|
|
91
|
-
process.exit(1);
|
|
146
|
+
console.log(`\n ✓ Version metadata and public count claims are in sync across ${DOCUMENTS.length} documents.\n`);
|
|
92
147
|
}
|
|
93
|
-
|
|
94
|
-
console.log();
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Automated UI Visual & Anti-Slop Audit Script
|
|
5
|
+
* Analyzes frontend files (JSX/TSX/CSS/HTML) for visual depth, color spaces, anti-slop rules, and interactive state completeness.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
function runVisualAudit(filePath) {
|
|
12
|
+
if (!fs.existsSync(filePath)) {
|
|
13
|
+
return {
|
|
14
|
+
status: 'ERROR',
|
|
15
|
+
score: 0,
|
|
16
|
+
message: `File not found: ${filePath}`,
|
|
17
|
+
violations: []
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
22
|
+
const violations = [];
|
|
23
|
+
let score = 100;
|
|
24
|
+
|
|
25
|
+
// 1. Purple/Violet AI cliché color check
|
|
26
|
+
const purpleRegex = /#(?:7[cC]3[aA][eE][dD]|8[bB]5[cC][fF]6|9333ea|a855f7|c084fc)/i;
|
|
27
|
+
if (purpleRegex.test(content) || /color:\s*(?:purple|violet)/i.test(content)) {
|
|
28
|
+
violations.push({
|
|
29
|
+
rule: 'NO_PURPLE_CLICHE',
|
|
30
|
+
severity: 'REJECTED',
|
|
31
|
+
description: 'Primary color uses AI cliché purple/violet (#7C3AED, #8B5CF6). Use signal orange, acid green, slate, or OKLCH blue instead.',
|
|
32
|
+
impact: -25
|
|
33
|
+
});
|
|
34
|
+
score -= 25;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 2. Raw Hex without OKLCH or design tokens
|
|
38
|
+
const rawHexRegex = /#[0-9a-fA-F]{6}\b/g;
|
|
39
|
+
const hexMatches = content.match(rawHexRegex) || [];
|
|
40
|
+
if (hexMatches.length > 4 && !/oklch/i.test(content) && !/var\(--/i.test(content)) {
|
|
41
|
+
violations.push({
|
|
42
|
+
rule: 'USE_OKLCH_OR_TOKENS',
|
|
43
|
+
severity: 'REJECTED',
|
|
44
|
+
description: 'Found raw hex colors without modern OKLCH color spaces or design token variables.',
|
|
45
|
+
impact: -15
|
|
46
|
+
});
|
|
47
|
+
score -= 15;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 3. Interactive state check on clickable elements
|
|
51
|
+
if (/<button|<a\b|onClick=/i.test(content)) {
|
|
52
|
+
if (!/hover:/i.test(content) && !/:hover/i.test(content)) {
|
|
53
|
+
violations.push({
|
|
54
|
+
rule: 'MISSING_HOVER_STATE',
|
|
55
|
+
severity: 'WARNING',
|
|
56
|
+
description: 'Interactive buttons/links lack visible hover state handling.',
|
|
57
|
+
impact: -10
|
|
58
|
+
});
|
|
59
|
+
score -= 10;
|
|
60
|
+
}
|
|
61
|
+
if (!/focus-visible:/i.test(content) && !/:focus/i.test(content)) {
|
|
62
|
+
violations.push({
|
|
63
|
+
rule: 'MISSING_FOCUS_INDICATOR',
|
|
64
|
+
severity: 'WARNING',
|
|
65
|
+
description: 'Interactive elements lack focus-visible outlines for keyboard accessibility.',
|
|
66
|
+
impact: -10
|
|
67
|
+
});
|
|
68
|
+
score -= 10;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 4. Visual depth & border check for container elements
|
|
73
|
+
if (/className=["'][^"']*(?:card|container|box|panel|wrapper)[^"']*["']/i.test(content) || /<article|<section/i.test(content)) {
|
|
74
|
+
if (!/border|shadow|hairline|depth/i.test(content)) {
|
|
75
|
+
violations.push({
|
|
76
|
+
rule: 'MISSING_SURFACE_DEPTH',
|
|
77
|
+
severity: 'WARNING',
|
|
78
|
+
description: 'Container elements lack 1px luminous border or ambient shadow depth layers.',
|
|
79
|
+
impact: -15
|
|
80
|
+
});
|
|
81
|
+
score -= 15;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 5. Hardcoded static offsets vs dynamic math
|
|
86
|
+
if (/style=\{\{[^}]*\b(?:top|left|height|width):\s*['"]\d+px['"]/i.test(content)) {
|
|
87
|
+
violations.push({
|
|
88
|
+
rule: 'HARDCODED_PIXEL_LAYOUT',
|
|
89
|
+
severity: 'WARNING',
|
|
90
|
+
description: 'Hardcoded static pixel offsets found in inline styles. Use responsive clamp() or layout bounds.',
|
|
91
|
+
impact: -10
|
|
92
|
+
});
|
|
93
|
+
score -= 10;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const finalScore = Math.max(0, score);
|
|
97
|
+
const status = violations.some(v => v.severity === 'REJECTED') ? 'REJECTED' : (violations.length > 0 ? 'WARNING' : 'APPROVED');
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
status,
|
|
101
|
+
score: finalScore,
|
|
102
|
+
file: filePath,
|
|
103
|
+
violations
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// CLI Execution Support
|
|
108
|
+
if (require.main === module) {
|
|
109
|
+
const args = process.argv.slice(2);
|
|
110
|
+
const fileArgIndex = args.indexOf('--file');
|
|
111
|
+
const targetPath = fileArgIndex !== -1 ? args[fileArgIndex + 1] : args[0];
|
|
112
|
+
|
|
113
|
+
if (!targetPath) {
|
|
114
|
+
console.error('Usage: node visual_audit.js --file <path-to-file>');
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const result = runVisualAudit(path.resolve(targetPath));
|
|
119
|
+
console.log(JSON.stringify(result, null, 2));
|
|
120
|
+
|
|
121
|
+
if (result.status === 'REJECTED') {
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
module.exports = { runVisualAudit };
|