tribunal-kit 4.2.0 → 4.3.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 +21 -14
- package/.agent/agents/swarm-worker-contracts.md +5 -5
- package/.agent/agents/ui-ux-auditor.md +292 -0
- package/.agent/rules/GEMINI.md +8 -8
- package/.agent/scripts/__pycache__/_colors.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/_utils.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/case_law_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/_colors.js +18 -0
- package/.agent/scripts/_utils.js +42 -0
- package/.agent/scripts/auto_preview.js +197 -0
- package/.agent/scripts/bundle_analyzer.js +290 -0
- package/.agent/scripts/case_law_manager.js +684 -0
- package/.agent/scripts/checklist.js +266 -0
- package/.agent/scripts/colors.js +17 -0
- package/.agent/scripts/compress_skills.js +141 -0
- package/.agent/scripts/consolidate_skills.js +149 -0
- package/.agent/scripts/context_broker.js +609 -0
- package/.agent/scripts/deep_compress.js +150 -0
- package/.agent/scripts/dependency_analyzer.js +272 -0
- package/.agent/scripts/inner_loop_validator.js +465 -0
- package/.agent/scripts/lint_runner.js +187 -0
- package/.agent/scripts/minify_context.js +100 -0
- package/.agent/scripts/patch_skills_meta.js +156 -0
- package/.agent/scripts/patch_skills_output.js +244 -0
- package/.agent/scripts/schema_validator.js +297 -0
- package/.agent/scripts/security_scan.js +303 -0
- package/.agent/scripts/session_manager.js +276 -0
- package/.agent/scripts/skill_evolution.js +644 -0
- package/.agent/scripts/skill_integrator.js +313 -0
- package/.agent/scripts/strengthen_skills.js +193 -0
- package/.agent/scripts/strip_tribunal.js +47 -0
- package/.agent/scripts/swarm_dispatcher.js +360 -0
- package/.agent/scripts/test_runner.js +193 -0
- package/.agent/scripts/utils.js +32 -0
- package/.agent/scripts/verify_all.js +256 -0
- package/.agent/skills/agent-organizer/SKILL.md +3 -3
- package/.agent/skills/agentic-patterns/SKILL.md +3 -3
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +3 -3
- package/.agent/skills/api-patterns/SKILL.md +3 -3
- package/.agent/skills/api-security-auditor/SKILL.md +3 -3
- package/.agent/skills/app-builder/SKILL.md +3 -3
- package/.agent/skills/app-builder/templates/SKILL.md +1 -1
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +1 -1
- package/.agent/skills/appflow-wireframe/SKILL.md +3 -3
- package/.agent/skills/architecture/SKILL.md +3 -3
- package/.agent/skills/authentication-best-practices/SKILL.md +3 -3
- package/.agent/skills/bash-linux/SKILL.md +3 -3
- package/.agent/skills/behavioral-modes/SKILL.md +3 -3
- package/.agent/skills/brainstorming/SKILL.md +3 -3
- package/.agent/skills/building-native-ui/SKILL.md +3 -3
- package/.agent/skills/clean-code/SKILL.md +3 -3
- package/.agent/skills/code-review-checklist/SKILL.md +3 -3
- package/.agent/skills/config-validator/SKILL.md +3 -3
- package/.agent/skills/csharp-developer/SKILL.md +3 -3
- package/.agent/skills/data-validation-schemas/SKILL.md +3 -3
- package/.agent/skills/database-design/SKILL.md +3 -3
- package/.agent/skills/deployment-procedures/SKILL.md +3 -3
- package/.agent/skills/devops-engineer/SKILL.md +3 -3
- package/.agent/skills/devops-incident-responder/SKILL.md +3 -3
- package/.agent/skills/doc.md +1 -1
- package/.agent/skills/documentation-templates/SKILL.md +3 -3
- package/.agent/skills/edge-computing/SKILL.md +3 -3
- package/.agent/skills/error-resilience/SKILL.md +3 -3
- package/.agent/skills/extract-design-system/SKILL.md +3 -3
- package/.agent/skills/framer-motion-expert/SKILL.md +3 -4
- package/.agent/skills/frontend-design/SKILL.md +3 -3
- package/.agent/skills/game-design-expert/SKILL.md +3 -3
- package/.agent/skills/game-engineering-expert/SKILL.md +3 -3
- package/.agent/skills/geo-fundamentals/SKILL.md +3 -3
- package/.agent/skills/github-operations/SKILL.md +3 -3
- package/.agent/skills/gsap-core/SKILL.md +0 -2
- package/.agent/skills/gsap-frameworks/SKILL.md +0 -2
- package/.agent/skills/gsap-performance/SKILL.md +0 -2
- package/.agent/skills/gsap-plugins/SKILL.md +0 -2
- package/.agent/skills/gsap-react/SKILL.md +0 -2
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +0 -2
- package/.agent/skills/gsap-timeline/SKILL.md +0 -2
- package/.agent/skills/gsap-utils/SKILL.md +0 -2
- package/.agent/skills/i18n-localization/SKILL.md +3 -3
- package/.agent/skills/intelligent-routing/SKILL.md +3 -3
- package/.agent/skills/lint-and-validate/SKILL.md +3 -3
- package/.agent/skills/llm-engineering/SKILL.md +3 -3
- package/.agent/skills/local-first/SKILL.md +3 -3
- package/.agent/skills/mcp-builder/SKILL.md +3 -3
- package/.agent/skills/mobile-design/SKILL.md +3 -3
- package/.agent/skills/monorepo-management/SKILL.md +3 -3
- package/.agent/skills/motion-engineering/SKILL.md +4 -4
- package/.agent/skills/nextjs-react-expert/SKILL.md +3 -3
- package/.agent/skills/nodejs-best-practices/SKILL.md +3 -3
- package/.agent/skills/observability/SKILL.md +3 -3
- package/.agent/skills/parallel-agents/SKILL.md +3 -3
- package/.agent/skills/performance-profiling/SKILL.md +3 -3
- package/.agent/skills/plan-writing/SKILL.md +3 -3
- package/.agent/skills/platform-engineer/SKILL.md +3 -3
- package/.agent/skills/playwright-best-practices/SKILL.md +3 -3
- package/.agent/skills/powershell-windows/SKILL.md +3 -3
- package/.agent/skills/project-idioms/SKILL.md +3 -3
- package/.agent/skills/python-patterns/SKILL.md +3 -3
- package/.agent/skills/python-pro/SKILL.md +3 -3
- package/.agent/skills/react-specialist/SKILL.md +3 -3
- package/.agent/skills/readme-builder/SKILL.md +3 -3
- package/.agent/skills/realtime-patterns/SKILL.md +3 -3
- package/.agent/skills/red-team-tactics/SKILL.md +3 -3
- package/.agent/skills/rust-pro/SKILL.md +3 -3
- package/.agent/skills/seo-fundamentals/SKILL.md +3 -3
- package/.agent/skills/server-management/SKILL.md +3 -3
- package/.agent/skills/shadcn-ui-expert/SKILL.md +3 -3
- package/.agent/skills/skill-creator/SKILL.md +3 -3
- package/.agent/skills/sql-pro/SKILL.md +3 -3
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +3 -3
- package/.agent/skills/swiftui-expert/SKILL.md +3 -3
- package/.agent/skills/systematic-debugging/SKILL.md +3 -3
- package/.agent/skills/tailwind-patterns/SKILL.md +3 -3
- package/.agent/skills/tdd-workflow/SKILL.md +3 -3
- package/.agent/skills/test-result-analyzer/SKILL.md +3 -3
- package/.agent/skills/testing-patterns/SKILL.md +3 -3
- package/.agent/skills/trend-researcher/SKILL.md +3 -3
- package/.agent/skills/typescript-advanced/SKILL.md +3 -3
- package/.agent/skills/ui-ux-pro-max/SKILL.md +3 -3
- package/.agent/skills/ui-ux-researcher/SKILL.md +3 -3
- package/.agent/skills/vue-expert/SKILL.md +3 -3
- package/.agent/skills/vulnerability-scanner/SKILL.md +3 -3
- package/.agent/skills/web-accessibility-auditor/SKILL.md +3 -3
- package/.agent/skills/web-design-guidelines/SKILL.md +3 -3
- package/.agent/skills/webapp-testing/SKILL.md +3 -3
- package/.agent/skills/whimsy-injector/SKILL.md +3 -3
- package/.agent/skills/workflow-optimizer/SKILL.md +3 -3
- package/.agent/workflows/audit.md +6 -6
- package/.agent/workflows/deploy.md +1 -1
- package/.agent/workflows/generate.md +23 -6
- package/.agent/workflows/session.md +5 -5
- package/.agent/workflows/swarm.md +2 -2
- package/README.md +64 -8
- package/bin/tribunal-kit.js +277 -45
- package/package.json +9 -6
- package/scripts/changelog.js +167 -0
- package/scripts/sync-version.js +81 -0
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/scripts/auto_preview.py +0 -180
- package/.agent/scripts/bundle_analyzer.py +0 -259
- package/.agent/scripts/case_law_manager.py +0 -755
- package/.agent/scripts/checklist.py +0 -209
- package/.agent/scripts/compress_skills.py +0 -167
- package/.agent/scripts/consolidate_skills.py +0 -173
- package/.agent/scripts/deep_compress.py +0 -202
- package/.agent/scripts/dependency_analyzer.py +0 -247
- package/.agent/scripts/lint_runner.py +0 -188
- package/.agent/scripts/minify_context.py +0 -80
- package/.agent/scripts/patch_skills_meta.py +0 -177
- package/.agent/scripts/patch_skills_output.py +0 -285
- package/.agent/scripts/schema_validator.py +0 -279
- package/.agent/scripts/security_scan.py +0 -224
- package/.agent/scripts/session_manager.py +0 -261
- package/.agent/scripts/skill_evolution.py +0 -563
- package/.agent/scripts/skill_integrator.py +0 -234
- package/.agent/scripts/strengthen_skills.py +0 -220
- package/.agent/scripts/strip_tribunal.py +0 -41
- package/.agent/scripts/swarm_dispatcher.py +0 -350
- package/.agent/scripts/test_runner.py +0 -192
- package/.agent/scripts/test_swarm_dispatcher.py +0 -163
- package/.agent/scripts/verify_all.py +0 -195
package/.agent/ARCHITECTURE.md
CHANGED
|
@@ -42,7 +42,7 @@ Type any of these in your AI IDE chat:
|
|
|
42
42
|
|---|---|---|
|
|
43
43
|
|`/generate`|Full Tribunal: Maker → Parallel Review → Human Gate|`workflows/generate.md`|
|
|
44
44
|
|`/review`|Audit existing code (no generation)|`workflows/review.md`|
|
|
45
|
-
|`/tribunal-full`|ALL
|
|
45
|
+
|`/tribunal-full`|ALL 16 reviewers at once — maximum coverage|`workflows/tribunal-full.md`|
|
|
46
46
|
|`/tribunal-backend`|Logic + Security + Deps + Types|`workflows/tribunal-backend.md`|
|
|
47
47
|
|`/tribunal-frontend`|Logic + Security + Frontend + Types|`workflows/tribunal-frontend.md`|
|
|
48
48
|
|`/tribunal-database`|Logic + Security + SQL|`workflows/tribunal-database.md`|
|
|
@@ -71,7 +71,7 @@ Type any of these in your AI IDE chat:
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
## The
|
|
74
|
+
## The 16 Tribunal Agents
|
|
75
75
|
|
|
76
76
|
|Agent|File|Activates When|
|
|
77
77
|
|---|---|---|
|
|
@@ -86,6 +86,11 @@ Type any of these in your AI IDE chat:
|
|
|
86
86
|
|`mobile-reviewer`|`agents/mobile-reviewer.md`|"mobile", "react native", "flutter", `/tribunal-full`|
|
|
87
87
|
|`ai-code-reviewer`|`agents/ai-code-reviewer.md`|"llm", "openai", "anthropic", "ai", `/tribunal-full`, `/review-ai`|
|
|
88
88
|
|`accessibility-reviewer`|`agents/accessibility-reviewer.md`|"a11y", "wcag", "aria", `/tribunal-frontend`, `/tribunal-full`|
|
|
89
|
+
|`resilience-reviewer`|`agents/resilience-reviewer.md`|"retry", "circuit breaker", "error boundary", `/tribunal-backend`, `/tribunal-full`|
|
|
90
|
+
|`schema-reviewer`|`agents/schema-reviewer.md`|"validation", "zod", "pydantic", `/tribunal-backend`, `/tribunal-full`|
|
|
91
|
+
|`precedence-reviewer`|`agents/precedence-reviewer.md`|All sessions — checks Case Law before generation|
|
|
92
|
+
|`penetration-tester`|`agents/penetration-tester.md`|"pentest", "red team", "attack surface", `/tribunal-full`|
|
|
93
|
+
|`db-latency-auditor`|`agents/db-latency-auditor.md`|"slow query", "index", "N+1", `/tribunal-database`, `/tribunal-full`|
|
|
89
94
|
|
|
90
95
|
---
|
|
91
96
|
|
|
@@ -121,7 +126,7 @@ The Swarm system decomposes complex multi-domain goals into independent sub-task
|
|
|
121
126
|
|`agents/swarm-worker-contracts.md`|WorkerRequest + WorkerResult JSON schemas|
|
|
122
127
|
|`agents/swarm-worker-registry.md`|Maps task types and keywords to specialist agents|
|
|
123
128
|
|`workflows/swarm.md`|`/swarm` slash command procedure|
|
|
124
|
-
|`scripts/swarm_dispatcher.
|
|
129
|
+
|`scripts/swarm_dispatcher.js`|Validates WorkerRequest/WorkerResult JSON (use `--mode swarm`)|
|
|
125
130
|
|
|
126
131
|
**Constraints:**
|
|
127
132
|
- Maximum 5 Workers per swarm invocation
|
|
@@ -217,20 +222,20 @@ All scripts live in `.agent/scripts/`:
|
|
|
217
222
|
|
|
218
223
|
|Script|Purpose|Usage|
|
|
219
224
|
|---|---|---|
|
|
220
|
-
|`checklist.
|
|
221
|
-
|`verify_all.
|
|
225
|
+
|`checklist.js`|Priority-ordered project audit|`node .agent/scripts/checklist.js .`|
|
|
226
|
+
|`verify_all.js`|Full pre-deploy validation|`node .agent/scripts/verify_all.js`|
|
|
222
227
|
|`auto_preview.py`|Local dev server management|`python .agent/scripts/auto_preview.py start`|
|
|
223
|
-
|`session_manager.
|
|
228
|
+
|`session_manager.js`|Multi-session state tracking|`node .agent/scripts/session_manager.js status`|
|
|
224
229
|
|`lint_runner.py`|Standalone lint runner|`python .agent/scripts/lint_runner.py . --fix`|
|
|
225
230
|
|`test_runner.py`|Auto-detecting test runner|`python .agent/scripts/test_runner.py . --coverage`|
|
|
226
|
-
|`security_scan.
|
|
231
|
+
|`security_scan.js`|OWASP-aware source code scanner|`node .agent/scripts/security_scan.js .`|
|
|
227
232
|
|`dependency_analyzer.py`|Unused/phantom dep checker|`python .agent/scripts/dependency_analyzer.py . --audit`|
|
|
228
233
|
|`schema_validator.py`|DB schema validator|`python .agent/scripts/schema_validator.py .`|
|
|
229
234
|
|`bundle_analyzer.py`|JS/TS bundle size analyzer|`python .agent/scripts/bundle_analyzer.py . --build`|
|
|
230
235
|
|`strengthen_skills.py`|Appends Tribunal guardrails (LLM Traps + Pre-Flight + VBC) to skills missing them|`python .agent/scripts/strengthen_skills.py . --dry-run`|
|
|
231
|
-
|`swarm_dispatcher.
|
|
236
|
+
|`swarm_dispatcher.js`|Validate Orchestrator micro-worker JSON payloads|`node .agent/scripts/swarm_dispatcher.js --file payload.json`|
|
|
232
237
|
|`skill_integrator.py`|Map active skills to executable scripts|`python .agent/scripts/skill_integrator.py`|
|
|
233
|
-
|`test_swarm_dispatcher.
|
|
238
|
+
|`test_swarm_dispatcher.js`|Unit tests for swarm_dispatcher|`npx jest test/integration/swarm_dispatcher.test.js`|
|
|
234
239
|
|
|
235
240
|
---
|
|
236
241
|
|
|
@@ -257,14 +262,16 @@ Script failures follow cascade rules:
|
|
|
257
262
|
.agent/
|
|
258
263
|
├── ARCHITECTURE.md ← This file
|
|
259
264
|
├── GEMINI.md ← Root behavior config (includes /swarm routing)
|
|
260
|
-
├── agents/ ←
|
|
265
|
+
├── agents/ ← 40 specialist + reviewer agents (16 reviewers + 24 domain)
|
|
261
266
|
│ ├── supervisor-agent.md ← Swarm triage, dispatch, synthesis
|
|
262
267
|
│ ├── swarm-worker-contracts.md ← WorkerRequest/WorkerResult schemas
|
|
263
268
|
│ └── swarm-worker-registry.md ← Task type → agent routing map
|
|
264
269
|
├── rules/GEMINI.md ← Master rules (P0 priority)
|
|
265
|
-
├── scripts/ ←
|
|
266
|
-
│ └── swarm_dispatcher.
|
|
267
|
-
├── skills/ ←
|
|
268
|
-
|
|
270
|
+
├── scripts/ ← 25 Python/JS automation scripts
|
|
271
|
+
│ └── swarm_dispatcher.js ← Validates WorkerRequest/WorkerResult JSON
|
|
272
|
+
├── skills/ ← 90 modular skill packages (all hardened)
|
|
273
|
+
├── patterns/ ← 5 ADK skill base patterns
|
|
274
|
+
├── history/ ← Case Law + Skill Evolution data (user-generated, preserved on update)
|
|
275
|
+
└── workflows/ ← 31 slash command definitions
|
|
269
276
|
└── swarm.md ← /swarm orchestration procedure
|
|
270
277
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Defines the strict JSON schemas for all Swarm dispatch and result payloads.
|
|
4
4
|
Every `WorkerRequest` and `WorkerResult` MUST conform to these schemas.
|
|
5
|
-
Used by: `supervisor-agent`, `swarm_dispatcher.
|
|
5
|
+
Used by: `supervisor-agent`, `swarm_dispatcher.js`, `/swarm` workflow.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -153,14 +153,14 @@ interface WorkerResult {
|
|
|
153
153
|
|
|
154
154
|
---
|
|
155
155
|
|
|
156
|
-
## swarm_dispatcher.
|
|
156
|
+
## swarm_dispatcher.js Integration
|
|
157
157
|
|
|
158
|
-
The `swarm_dispatcher.
|
|
158
|
+
The `swarm_dispatcher.js` script validates **WorkerRequest** payloads before dispatch.
|
|
159
159
|
|
|
160
160
|
**Usage:**
|
|
161
161
|
```bash
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
node .agent/scripts/swarm_dispatcher.js --mode swarm --file worker_request.json
|
|
163
|
+
node .agent/scripts/swarm_dispatcher.js --mode swarm --payload '{"task_id":"...","type":"generate_code","agent":"backend-specialist","goal":"...","context":"...","max_retries":3}'
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
Exits `0` on valid payload. Exits `1` on any schema violation with a specific error message per field.
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-auditor
|
|
3
|
+
role: Tribunal Reviewer — Premium Design Enforcement
|
|
4
|
+
activates_for: component, hook, react, vue, jsx, tsx, landing, page, ui, design, layout, animation, css, style, tailwind
|
|
5
|
+
pattern: reviewer
|
|
6
|
+
skills:
|
|
7
|
+
- ui-ux-pro-max
|
|
8
|
+
- frontend-design
|
|
9
|
+
- web-design-guidelines
|
|
10
|
+
- web-accessibility-auditor
|
|
11
|
+
- motion-engineering
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# UI/UX Auditor — Premium Design Reviewer
|
|
15
|
+
|
|
16
|
+
> **Tribunal Reviewer Position:** Activated for all frontend, component, and UI-related code.
|
|
17
|
+
> **Authority Level:** Design violations are treated as REJECTED, not warnings.
|
|
18
|
+
> **Mission:** Ensure every UI output is production-grade and WOW-worthy. Generic AI aesthetics are forbidden.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## What This Reviewer Catches
|
|
23
|
+
|
|
24
|
+
### 🚨 Instant REJECTION Criteria (Blocking)
|
|
25
|
+
|
|
26
|
+
These patterns represent the "Generic AI" aesthetic syndrome. Code producing these patterns is immediately REJECTED and returned to the Maker Agent.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
❌ Purple/violet as the primary brand color (#7C3AED, #8B5CF6, purple, violet)
|
|
30
|
+
Reason: The #1 AI design cliché. Signals "AI-generated" to users instantly.
|
|
31
|
+
|
|
32
|
+
❌ Mesh gradients as premium backgrounds (background: linear-gradient with 5+ stops blurred)
|
|
33
|
+
Reason: Banned. Use grain texture, solid contrast, or depth instead.
|
|
34
|
+
|
|
35
|
+
❌ Standard hero layout: left text block + right illustration image side-by-side
|
|
36
|
+
Reason: Forbidden without explicit creative justification.
|
|
37
|
+
|
|
38
|
+
❌ Bento grid as the primary layout pattern without strong editorial justification
|
|
39
|
+
Reason: Overused. Requires specific reasoning to use.
|
|
40
|
+
|
|
41
|
+
❌ Flat glass cards with white/20% opacity and backdrop-blur everywhere
|
|
42
|
+
Reason: Glassmorphism overuse. Use it as an exception, not the rule.
|
|
43
|
+
|
|
44
|
+
❌ Default shadcn/ui or Radix colors without brand customization
|
|
45
|
+
Reason: Out-of-box component libraries look generic. Must be customized.
|
|
46
|
+
|
|
47
|
+
❌ Google Fonts defaults (Roboto, Open Sans, Lato) without strong typography hierarchy
|
|
48
|
+
Reason: Use Inter, Outfit, Geist, Plus Jakarta Sans — but pair with strong scaling.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### ⚠️ WARNING Criteria (Non-blocking, must be addressed before deploy)
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
⚠️ Missing hover/focus states on interactive elements
|
|
55
|
+
⚠️ Micro-animations absent on buttons, cards, and list items
|
|
56
|
+
⚠️ Color contrast below WCAG AA (4.5:1 for text, 3:1 for UI components)
|
|
57
|
+
⚠️ No mobile-first responsive breakpoints defined
|
|
58
|
+
⚠️ Raw hex colors not defined as CSS custom properties
|
|
59
|
+
⚠️ Typography scale not following a harmonic ratio (golden ratio 1.618 or minor third 1.25)
|
|
60
|
+
⚠️ Spacing values not following an 8pt grid system
|
|
61
|
+
⚠️ Animation using linear easing without cubic-bezier refinement
|
|
62
|
+
⚠️ Loading states absent for async UI operations
|
|
63
|
+
⚠️ Empty/error states not designed (just "no data" text)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Verdict Guide
|
|
69
|
+
|
|
70
|
+
### How to Issue a Verdict
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
━━━ UI/UX Auditor Verdict ━━━━━━━━━━━━━━━━━━━━━━
|
|
74
|
+
Verdict: [ ✅ APPROVED | ⚠️ WARNING | ❌ REJECTED ]
|
|
75
|
+
|
|
76
|
+
Rule violated: [exact rule from this document]
|
|
77
|
+
Location: [component name / line reference]
|
|
78
|
+
Issue: [specific description]
|
|
79
|
+
Required fix: [concrete action the Maker Agent must take]
|
|
80
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Verdict Definitions
|
|
84
|
+
|
|
85
|
+
| Verdict | When to Use | Effect |
|
|
86
|
+
|:--------|:-----------|:-------|
|
|
87
|
+
| `✅ APPROVED` | No design anti-patterns. Fully premium-grade. | Passes to Human Gate |
|
|
88
|
+
| `⚠️ WARNING` | UX/a11y issues that don't block render. Requires fix before deploy. | Highlighted at Human Gate |
|
|
89
|
+
| `❌ REJECTED` | Generic AI aesthetic detected. Blocking pattern present. | Maker must revise |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Positive Design Standards (What APPROVED Looks Like)
|
|
94
|
+
|
|
95
|
+
### Color
|
|
96
|
+
```
|
|
97
|
+
✅ HSL color system: hsl(220, 90%, 56%) — not hex hacks
|
|
98
|
+
✅ Custom CSS properties: --color-brand-500: hsl(220, 90%, 56%)
|
|
99
|
+
✅ Dark mode: background should be dark-950 (#0A0A0F or similar near-black)
|
|
100
|
+
✅ Accent color: high-contrast, non-purple (electric blue, warm amber, coral)
|
|
101
|
+
✅ Semantic tokens: --color-interactive, --color-surface-raised, --color-text-muted
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Typography
|
|
105
|
+
```
|
|
106
|
+
✅ Type scale using clamp() for fluid sizing:
|
|
107
|
+
font-size: clamp(1rem, 2.5vw, 1.25rem)
|
|
108
|
+
✅ Variable font weight for hierarchy (300 body, 600 subheadings, 800 hero)
|
|
109
|
+
✅ Line height: 1.5–1.6 for body, 1.1–1.2 for display headings
|
|
110
|
+
✅ Letter spacing: -0.02em to -0.04em for large headings (tighten at scale)
|
|
111
|
+
✅ Max line length: 60–75ch for reading comfort
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Motion & Animation
|
|
115
|
+
```
|
|
116
|
+
✅ Entrance animations: translateY(20px) → 0 with opacity 0 → 1
|
|
117
|
+
✅ Duration: 200ms (micro) → 400ms (standard) → 600ms (page transitions)
|
|
118
|
+
✅ Easing: cubic-bezier(0.16, 1, 0.3, 1) for spring-like deceleration
|
|
119
|
+
✅ Stagger: 50–100ms delay between list items
|
|
120
|
+
✅ Reduced motion: @media (prefers-reduced-motion: reduce) must be included
|
|
121
|
+
✅ Hover lifts: transform: translateY(-2px) + enhanced box-shadow
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Spacing
|
|
125
|
+
```
|
|
126
|
+
✅ 8pt grid system: 8px, 16px, 24px, 32px, 48px, 64px, 96px, 128px
|
|
127
|
+
✅ CSS custom properties: --space-2: 8px, --space-4: 16px, --space-6: 24px
|
|
128
|
+
✅ Section padding: 80px–120px vertical on desktop, 48px–64px on mobile
|
|
129
|
+
✅ Component padding: consistent horizontal padding on all containers
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Texture & Depth
|
|
133
|
+
```
|
|
134
|
+
✅ Grain overlay: SVG noise filter or CSS noise texture on hero/header backgrounds
|
|
135
|
+
✅ Box shadows: layered (ambient + key) — not flat Material shadows
|
|
136
|
+
Good: box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.1);
|
|
137
|
+
✅ Border: 1px solid rgba(255,255,255,0.08) — luminous hairlines in dark mode
|
|
138
|
+
✅ Depth layers: background (z0) → cards (z1) → modals (z2) — each layer has distinct visual treatment
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Anti-Pattern Detection Code Examples
|
|
144
|
+
|
|
145
|
+
### 🚨 REJECTED: Purple Primary Color
|
|
146
|
+
```css
|
|
147
|
+
/* ❌ REJECTED */
|
|
148
|
+
:root {
|
|
149
|
+
--color-primary: #7C3AED; /* violet-600 — AI cliché */
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* ✅ FIX: Use a distinctive, intentional color */
|
|
153
|
+
:root {
|
|
154
|
+
--color-primary: hsl(212, 96%, 52%); /* electric blue */
|
|
155
|
+
--color-primary: hsl(24, 94%, 56%); /* warm amber */
|
|
156
|
+
--color-primary: hsl(352, 82%, 52%); /* vibrant coral */
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 🚨 REJECTED: Mesh Gradient Background
|
|
161
|
+
```css
|
|
162
|
+
/* ❌ REJECTED */
|
|
163
|
+
.hero {
|
|
164
|
+
background: radial-gradient(at 20% 80%, #7C3AED 0, transparent 50%),
|
|
165
|
+
radial-gradient(at 80% 20%, #3B82F6 0, transparent 50%);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* ✅ FIX: Use grain texture + solid near-black */
|
|
169
|
+
.hero {
|
|
170
|
+
background-color: hsl(230, 15%, 8%);
|
|
171
|
+
background-image: url("data:image/svg+xml,..."); /* SVG grain */
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ⚠️ WARNING: No Hover State
|
|
176
|
+
```jsx
|
|
177
|
+
/* ❌ WARNING */
|
|
178
|
+
<button className="bg-blue-600 text-white px-4 py-2 rounded">
|
|
179
|
+
Submit
|
|
180
|
+
</button>
|
|
181
|
+
|
|
182
|
+
/* ✅ FIX: Add hover + focus + active states */
|
|
183
|
+
<button className="
|
|
184
|
+
bg-blue-600 text-white px-4 py-2 rounded
|
|
185
|
+
transition-all duration-200 ease-out
|
|
186
|
+
hover:bg-blue-500 hover:-translate-y-px hover:shadow-lg
|
|
187
|
+
focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500
|
|
188
|
+
active:translate-y-0 active:shadow-none
|
|
189
|
+
">
|
|
190
|
+
Submit
|
|
191
|
+
</button>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### ⚠️ WARNING: Missing Reduced Motion
|
|
195
|
+
```css
|
|
196
|
+
/* ❌ WARNING */
|
|
197
|
+
.card {
|
|
198
|
+
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* ✅ FIX: Respect user preference */
|
|
202
|
+
.card {
|
|
203
|
+
transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@media (prefers-reduced-motion: reduce) {
|
|
207
|
+
.card {
|
|
208
|
+
transition: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Review Checklist (Run Before Every Verdict)
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
COLOR
|
|
219
|
+
□ Primary color is not purple/violet
|
|
220
|
+
□ Using CSS custom properties, not raw hex values
|
|
221
|
+
□ Dark mode background is near-black (not generic gray-900)
|
|
222
|
+
□ Contrast ratios meet WCAG AA
|
|
223
|
+
|
|
224
|
+
TYPOGRAPHY
|
|
225
|
+
□ Fluid sizing with clamp() for responsive text
|
|
226
|
+
□ Clear hierarchy: hero / heading / subheading / body / caption
|
|
227
|
+
□ Max line length bounded for readability
|
|
228
|
+
|
|
229
|
+
MOTION
|
|
230
|
+
□ Entrance animation present on key elements
|
|
231
|
+
□ Hover states on all interactive elements
|
|
232
|
+
□ @media (prefers-reduced-motion) implemented
|
|
233
|
+
□ No linear easing — use cubic-bezier throughout
|
|
234
|
+
|
|
235
|
+
LAYOUT
|
|
236
|
+
□ Not a standard hero layout without justification
|
|
237
|
+
□ Not a bento grid without justification
|
|
238
|
+
□ 8pt spacing grid used consistently
|
|
239
|
+
|
|
240
|
+
TEXTURE
|
|
241
|
+
□ Background has depth: grain, shadow, or layering
|
|
242
|
+
□ No flat mesh gradient backgrounds
|
|
243
|
+
□ Glassmorphism used sparingly, not as the default
|
|
244
|
+
|
|
245
|
+
ACCESSIBILITY
|
|
246
|
+
□ Focus-visible styles on all interactive elements
|
|
247
|
+
□ Semantic HTML (button not div, nav not ul, etc.)
|
|
248
|
+
□ ARIA labels where needed for icon-only buttons
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Self-Healing Instructions Template
|
|
254
|
+
|
|
255
|
+
If REJECTED, return this to the Maker Agent:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
❌ UI/UX Auditor REJECTION
|
|
259
|
+
|
|
260
|
+
Rule violated: [rule name]
|
|
261
|
+
Location: [file/component/line]
|
|
262
|
+
Issue: [what was found]
|
|
263
|
+
|
|
264
|
+
Required correction:
|
|
265
|
+
[Specific code change using the positive patterns above]
|
|
266
|
+
|
|
267
|
+
Do not change any code other than the identified violation.
|
|
268
|
+
Re-submit after correction for re-review.
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Guardrails
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
LLM TRAPS — What this agent must never do:
|
|
277
|
+
□ Never approve purple/violet as primary without explicit developer override
|
|
278
|
+
□ Never mark accessibility warnings as low-priority
|
|
279
|
+
□ Never skip the checklist for "simple" components — every component ships to users
|
|
280
|
+
□ Never invent design tokens that aren't in the codebase already
|
|
281
|
+
□ Never approve "we'll fix the animation later" — ship it right or REJECT
|
|
282
|
+
|
|
283
|
+
PRE-FLIGHT:
|
|
284
|
+
□ Did I read the actual code, not just the description?
|
|
285
|
+
□ Did I check ALL items in the checklist, not just obvious failures?
|
|
286
|
+
□ Did I verify the primary color is NOT purple?
|
|
287
|
+
|
|
288
|
+
VBC PROTOCOL (Verdict-Based Correction):
|
|
289
|
+
□ Every REJECTED verdict includes a concrete "Required fix" with code
|
|
290
|
+
□ Every WARNING includes a code example from the positive patterns above
|
|
291
|
+
□ No vague feedback — every verdict is actionable
|
|
292
|
+
```
|
package/.agent/rules/GEMINI.md
CHANGED
|
@@ -222,7 +222,7 @@ These scripts live in `.agent/scripts/`. Agents and skills can invoke them:
|
|
|
222
222
|
|`checklist.py`|Priority audit: Security→Lint→Schema→Tests→UX→SEO|Before/after any major change|
|
|
223
223
|
|`verify_all.py`|Full pre-deploy validation suite|Pre-deploy|
|
|
224
224
|
|`auto_preview.py`|Start/stop/restart local dev server|After /create or /enhance|
|
|
225
|
-
|`session_manager.
|
|
225
|
+
|`session_manager.js`|Track session state between conversations|Multi-session work|
|
|
226
226
|
|`lint_runner.py`|Standalone lint runner (ESLint, Prettier, Ruff)|Every code change|
|
|
227
227
|
|`test_runner.py`|Standalone test runner (Jest, Vitest, pytest, Go)|After logic changes|
|
|
228
228
|
|`security_scan.py`|Deep OWASP-aware source code security scan|Always on deploy, /audit|
|
|
@@ -230,22 +230,22 @@ These scripts live in `.agent/scripts/`. Agents and skills can invoke them:
|
|
|
230
230
|
|`schema_validator.py`|Database schema validation (Prisma, SQL)|After DB changes|
|
|
231
231
|
|`bundle_analyzer.py`|JS/TS bundle size analysis|Before deploy|
|
|
232
232
|
|`skill_integrator.py`|Maps active skills to their executable scripts|Automatically when skills are invoked|
|
|
233
|
-
|`swarm_dispatcher.
|
|
234
|
-
|`test_swarm_dispatcher.
|
|
233
|
+
|`swarm_dispatcher.js`|Validate Orchestrator micro-worker JSON payloads|After /orchestrate, before dispatching agents|
|
|
234
|
+
|`test_swarm_dispatcher.js`|Unit tests for swarm_dispatcher|After modifying swarm_dispatcher.js|
|
|
235
235
|
|
|
236
236
|
**Run pattern:**
|
|
237
237
|
```
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
node .agent/scripts/checklist.js .
|
|
239
|
+
node .agent/scripts/verify_all.js
|
|
240
|
+
node .agent/scripts/security_scan.js .
|
|
241
241
|
python .agent/scripts/lint_runner.py . --fix
|
|
242
242
|
python .agent/scripts/test_runner.py . --coverage
|
|
243
243
|
python .agent/scripts/dependency_analyzer.py . --audit
|
|
244
244
|
python .agent/scripts/schema_validator.py .
|
|
245
245
|
python .agent/scripts/bundle_analyzer.py . --build
|
|
246
246
|
python .agent/scripts/skill_integrator.py
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
node .agent/scripts/swarm_dispatcher.js --file payload.json
|
|
248
|
+
npx jest test/integration/swarm_dispatcher.test.js
|
|
249
249
|
```
|
|
250
250
|
|
|
251
251
|
---
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared ANSI color constants for Tribunal Kit scripts.
|
|
3
|
+
* Import this module instead of duplicating color codes.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const GREEN = '\x1b[92m';
|
|
9
|
+
const YELLOW = '\x1b[93m';
|
|
10
|
+
const CYAN = '\x1b[96m';
|
|
11
|
+
const RED = '\x1b[91m';
|
|
12
|
+
const BLUE = '\x1b[94m';
|
|
13
|
+
const MAGENTA = '\x1b[95m';
|
|
14
|
+
const BOLD = '\x1b[1m';
|
|
15
|
+
const DIM = '\x1b[2m';
|
|
16
|
+
const RESET = '\x1b[0m';
|
|
17
|
+
|
|
18
|
+
module.exports = { GREEN, YELLOW, CYAN, RED, BLUE, MAGENTA, BOLD, DIM, RESET };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for Tribunal Kit scripts.
|
|
3
|
+
* Import this module instead of duplicating helper functions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const { RED, RESET } = require('./_colors');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Walk up the directory tree to find the nearest .agent/ folder.
|
|
14
|
+
* @param {string} [startDir] - Directory to start searching from (defaults to cwd).
|
|
15
|
+
* @returns {string} Absolute path to the .agent directory.
|
|
16
|
+
*/
|
|
17
|
+
function findAgentDir(startDir) {
|
|
18
|
+
let current = path.resolve(startDir || process.cwd());
|
|
19
|
+
const root = path.parse(current).root;
|
|
20
|
+
|
|
21
|
+
while (current !== root) {
|
|
22
|
+
const candidate = path.join(current, '.agent');
|
|
23
|
+
if (fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()) {
|
|
24
|
+
return candidate;
|
|
25
|
+
}
|
|
26
|
+
current = path.dirname(current);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
console.error(`${RED}✖ Error: '.agent' directory not found. Please run 'npx tribunal-kit init' first.${RESET}`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check if a package.json exists in the given directory.
|
|
35
|
+
* @param {string} dir - Directory to check.
|
|
36
|
+
* @returns {boolean}
|
|
37
|
+
*/
|
|
38
|
+
function hasNpm(dir) {
|
|
39
|
+
return fs.existsSync(path.join(dir, 'package.json'));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = { findAgentDir, hasNpm };
|