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.
Files changed (182) hide show
  1. package/.agent/ARCHITECTURE.md +21 -14
  2. package/.agent/agents/swarm-worker-contracts.md +5 -5
  3. package/.agent/agents/ui-ux-auditor.md +292 -0
  4. package/.agent/rules/GEMINI.md +8 -8
  5. package/.agent/scripts/__pycache__/_colors.cpython-311.pyc +0 -0
  6. package/.agent/scripts/__pycache__/_utils.cpython-311.pyc +0 -0
  7. package/.agent/scripts/__pycache__/case_law_manager.cpython-311.pyc +0 -0
  8. package/.agent/scripts/_colors.js +18 -0
  9. package/.agent/scripts/_utils.js +42 -0
  10. package/.agent/scripts/auto_preview.js +197 -0
  11. package/.agent/scripts/bundle_analyzer.js +290 -0
  12. package/.agent/scripts/case_law_manager.js +684 -0
  13. package/.agent/scripts/checklist.js +266 -0
  14. package/.agent/scripts/colors.js +17 -0
  15. package/.agent/scripts/compress_skills.js +141 -0
  16. package/.agent/scripts/consolidate_skills.js +149 -0
  17. package/.agent/scripts/context_broker.js +609 -0
  18. package/.agent/scripts/deep_compress.js +150 -0
  19. package/.agent/scripts/dependency_analyzer.js +272 -0
  20. package/.agent/scripts/inner_loop_validator.js +465 -0
  21. package/.agent/scripts/lint_runner.js +187 -0
  22. package/.agent/scripts/minify_context.js +100 -0
  23. package/.agent/scripts/patch_skills_meta.js +156 -0
  24. package/.agent/scripts/patch_skills_output.js +244 -0
  25. package/.agent/scripts/schema_validator.js +297 -0
  26. package/.agent/scripts/security_scan.js +303 -0
  27. package/.agent/scripts/session_manager.js +276 -0
  28. package/.agent/scripts/skill_evolution.js +644 -0
  29. package/.agent/scripts/skill_integrator.js +313 -0
  30. package/.agent/scripts/strengthen_skills.js +193 -0
  31. package/.agent/scripts/strip_tribunal.js +47 -0
  32. package/.agent/scripts/swarm_dispatcher.js +360 -0
  33. package/.agent/scripts/test_runner.js +193 -0
  34. package/.agent/scripts/utils.js +32 -0
  35. package/.agent/scripts/verify_all.js +256 -0
  36. package/.agent/skills/agent-organizer/SKILL.md +3 -3
  37. package/.agent/skills/agentic-patterns/SKILL.md +3 -3
  38. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +3 -3
  39. package/.agent/skills/api-patterns/SKILL.md +3 -3
  40. package/.agent/skills/api-security-auditor/SKILL.md +3 -3
  41. package/.agent/skills/app-builder/SKILL.md +3 -3
  42. package/.agent/skills/app-builder/templates/SKILL.md +1 -1
  43. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +1 -1
  44. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
  45. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +1 -1
  46. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
  47. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +1 -1
  48. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +1 -1
  49. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +1 -1
  50. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +1 -1
  51. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
  52. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +1 -1
  53. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +1 -1
  54. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +1 -1
  55. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +1 -1
  56. package/.agent/skills/appflow-wireframe/SKILL.md +3 -3
  57. package/.agent/skills/architecture/SKILL.md +3 -3
  58. package/.agent/skills/authentication-best-practices/SKILL.md +3 -3
  59. package/.agent/skills/bash-linux/SKILL.md +3 -3
  60. package/.agent/skills/behavioral-modes/SKILL.md +3 -3
  61. package/.agent/skills/brainstorming/SKILL.md +3 -3
  62. package/.agent/skills/building-native-ui/SKILL.md +3 -3
  63. package/.agent/skills/clean-code/SKILL.md +3 -3
  64. package/.agent/skills/code-review-checklist/SKILL.md +3 -3
  65. package/.agent/skills/config-validator/SKILL.md +3 -3
  66. package/.agent/skills/csharp-developer/SKILL.md +3 -3
  67. package/.agent/skills/data-validation-schemas/SKILL.md +3 -3
  68. package/.agent/skills/database-design/SKILL.md +3 -3
  69. package/.agent/skills/deployment-procedures/SKILL.md +3 -3
  70. package/.agent/skills/devops-engineer/SKILL.md +3 -3
  71. package/.agent/skills/devops-incident-responder/SKILL.md +3 -3
  72. package/.agent/skills/doc.md +1 -1
  73. package/.agent/skills/documentation-templates/SKILL.md +3 -3
  74. package/.agent/skills/edge-computing/SKILL.md +3 -3
  75. package/.agent/skills/error-resilience/SKILL.md +3 -3
  76. package/.agent/skills/extract-design-system/SKILL.md +3 -3
  77. package/.agent/skills/framer-motion-expert/SKILL.md +3 -4
  78. package/.agent/skills/frontend-design/SKILL.md +3 -3
  79. package/.agent/skills/game-design-expert/SKILL.md +3 -3
  80. package/.agent/skills/game-engineering-expert/SKILL.md +3 -3
  81. package/.agent/skills/geo-fundamentals/SKILL.md +3 -3
  82. package/.agent/skills/github-operations/SKILL.md +3 -3
  83. package/.agent/skills/gsap-core/SKILL.md +0 -2
  84. package/.agent/skills/gsap-frameworks/SKILL.md +0 -2
  85. package/.agent/skills/gsap-performance/SKILL.md +0 -2
  86. package/.agent/skills/gsap-plugins/SKILL.md +0 -2
  87. package/.agent/skills/gsap-react/SKILL.md +0 -2
  88. package/.agent/skills/gsap-scrolltrigger/SKILL.md +0 -2
  89. package/.agent/skills/gsap-timeline/SKILL.md +0 -2
  90. package/.agent/skills/gsap-utils/SKILL.md +0 -2
  91. package/.agent/skills/i18n-localization/SKILL.md +3 -3
  92. package/.agent/skills/intelligent-routing/SKILL.md +3 -3
  93. package/.agent/skills/lint-and-validate/SKILL.md +3 -3
  94. package/.agent/skills/llm-engineering/SKILL.md +3 -3
  95. package/.agent/skills/local-first/SKILL.md +3 -3
  96. package/.agent/skills/mcp-builder/SKILL.md +3 -3
  97. package/.agent/skills/mobile-design/SKILL.md +3 -3
  98. package/.agent/skills/monorepo-management/SKILL.md +3 -3
  99. package/.agent/skills/motion-engineering/SKILL.md +4 -4
  100. package/.agent/skills/nextjs-react-expert/SKILL.md +3 -3
  101. package/.agent/skills/nodejs-best-practices/SKILL.md +3 -3
  102. package/.agent/skills/observability/SKILL.md +3 -3
  103. package/.agent/skills/parallel-agents/SKILL.md +3 -3
  104. package/.agent/skills/performance-profiling/SKILL.md +3 -3
  105. package/.agent/skills/plan-writing/SKILL.md +3 -3
  106. package/.agent/skills/platform-engineer/SKILL.md +3 -3
  107. package/.agent/skills/playwright-best-practices/SKILL.md +3 -3
  108. package/.agent/skills/powershell-windows/SKILL.md +3 -3
  109. package/.agent/skills/project-idioms/SKILL.md +3 -3
  110. package/.agent/skills/python-patterns/SKILL.md +3 -3
  111. package/.agent/skills/python-pro/SKILL.md +3 -3
  112. package/.agent/skills/react-specialist/SKILL.md +3 -3
  113. package/.agent/skills/readme-builder/SKILL.md +3 -3
  114. package/.agent/skills/realtime-patterns/SKILL.md +3 -3
  115. package/.agent/skills/red-team-tactics/SKILL.md +3 -3
  116. package/.agent/skills/rust-pro/SKILL.md +3 -3
  117. package/.agent/skills/seo-fundamentals/SKILL.md +3 -3
  118. package/.agent/skills/server-management/SKILL.md +3 -3
  119. package/.agent/skills/shadcn-ui-expert/SKILL.md +3 -3
  120. package/.agent/skills/skill-creator/SKILL.md +3 -3
  121. package/.agent/skills/sql-pro/SKILL.md +3 -3
  122. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +3 -3
  123. package/.agent/skills/swiftui-expert/SKILL.md +3 -3
  124. package/.agent/skills/systematic-debugging/SKILL.md +3 -3
  125. package/.agent/skills/tailwind-patterns/SKILL.md +3 -3
  126. package/.agent/skills/tdd-workflow/SKILL.md +3 -3
  127. package/.agent/skills/test-result-analyzer/SKILL.md +3 -3
  128. package/.agent/skills/testing-patterns/SKILL.md +3 -3
  129. package/.agent/skills/trend-researcher/SKILL.md +3 -3
  130. package/.agent/skills/typescript-advanced/SKILL.md +3 -3
  131. package/.agent/skills/ui-ux-pro-max/SKILL.md +3 -3
  132. package/.agent/skills/ui-ux-researcher/SKILL.md +3 -3
  133. package/.agent/skills/vue-expert/SKILL.md +3 -3
  134. package/.agent/skills/vulnerability-scanner/SKILL.md +3 -3
  135. package/.agent/skills/web-accessibility-auditor/SKILL.md +3 -3
  136. package/.agent/skills/web-design-guidelines/SKILL.md +3 -3
  137. package/.agent/skills/webapp-testing/SKILL.md +3 -3
  138. package/.agent/skills/whimsy-injector/SKILL.md +3 -3
  139. package/.agent/skills/workflow-optimizer/SKILL.md +3 -3
  140. package/.agent/workflows/audit.md +6 -6
  141. package/.agent/workflows/deploy.md +1 -1
  142. package/.agent/workflows/generate.md +23 -6
  143. package/.agent/workflows/session.md +5 -5
  144. package/.agent/workflows/swarm.md +2 -2
  145. package/README.md +64 -8
  146. package/bin/tribunal-kit.js +277 -45
  147. package/package.json +9 -6
  148. package/scripts/changelog.js +167 -0
  149. package/scripts/sync-version.js +81 -0
  150. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  151. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  152. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  153. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  154. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  155. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  156. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  157. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  158. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  159. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  160. package/.agent/scripts/auto_preview.py +0 -180
  161. package/.agent/scripts/bundle_analyzer.py +0 -259
  162. package/.agent/scripts/case_law_manager.py +0 -755
  163. package/.agent/scripts/checklist.py +0 -209
  164. package/.agent/scripts/compress_skills.py +0 -167
  165. package/.agent/scripts/consolidate_skills.py +0 -173
  166. package/.agent/scripts/deep_compress.py +0 -202
  167. package/.agent/scripts/dependency_analyzer.py +0 -247
  168. package/.agent/scripts/lint_runner.py +0 -188
  169. package/.agent/scripts/minify_context.py +0 -80
  170. package/.agent/scripts/patch_skills_meta.py +0 -177
  171. package/.agent/scripts/patch_skills_output.py +0 -285
  172. package/.agent/scripts/schema_validator.py +0 -279
  173. package/.agent/scripts/security_scan.py +0 -224
  174. package/.agent/scripts/session_manager.py +0 -261
  175. package/.agent/scripts/skill_evolution.py +0 -563
  176. package/.agent/scripts/skill_integrator.py +0 -234
  177. package/.agent/scripts/strengthen_skills.py +0 -220
  178. package/.agent/scripts/strip_tribunal.py +0 -41
  179. package/.agent/scripts/swarm_dispatcher.py +0 -350
  180. package/.agent/scripts/test_runner.py +0 -192
  181. package/.agent/scripts/test_swarm_dispatcher.py +0 -163
  182. package/.agent/scripts/verify_all.py +0 -195
@@ -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 8 agents at once — maximum coverage|`workflows/tribunal-full.md`|
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 11 Tribunal Agents
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.py`|Validates WorkerRequest/WorkerResult JSON (use `--mode swarm`)|
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.py`|Priority-ordered project audit|`python .agent/scripts/checklist.py .`|
221
- |`verify_all.py`|Full pre-deploy validation|`python .agent/scripts/verify_all.py`|
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.py`|Multi-session state tracking|`python .agent/scripts/session_manager.py status`|
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.py`|OWASP-aware source code scanner|`python .agent/scripts/security_scan.py .`|
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.py`|Validate Orchestrator micro-worker JSON payloads|`python .agent/scripts/swarm_dispatcher.py --file payload.json`|
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.py`|Unit tests for swarm_dispatcher|`python .agent/scripts/test_swarm_dispatcher.py`|
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/ ← 33 specialist + reviewer 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/ ← 13 Python automation scripts
266
- │ └── swarm_dispatcher.py ← Validates WorkerRequest/WorkerResult JSON
267
- ├── skills/ ← 44 modular skill packages
268
- └── workflows/ 25 slash command definitions
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.py`, `/swarm` workflow.
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.py Integration
156
+ ## swarm_dispatcher.js Integration
157
157
 
158
- The `swarm_dispatcher.py` script validates **WorkerRequest** payloads before dispatch.
158
+ The `swarm_dispatcher.js` script validates **WorkerRequest** payloads before dispatch.
159
159
 
160
160
  **Usage:**
161
161
  ```bash
162
- python .agent/scripts/swarm_dispatcher.py --mode swarm --file worker_request.json
163
- python .agent/scripts/swarm_dispatcher.py --mode swarm --payload '{"task_id":"...","type":"generate_code","agent":"backend-specialist","goal":"...","context":"...","max_retries":3}'
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
+ ```
@@ -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.py`|Track session state between conversations|Multi-session work|
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.py`|Validate Orchestrator micro-worker JSON payloads|After /orchestrate, before dispatching agents|
234
- |`test_swarm_dispatcher.py`|Unit tests for swarm_dispatcher|After modifying swarm_dispatcher.py|
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
- python .agent/scripts/checklist.py .
239
- python .agent/scripts/verify_all.py
240
- python .agent/scripts/security_scan.py .
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
- python .agent/scripts/swarm_dispatcher.py --file payload.json
248
- python .agent/scripts/test_swarm_dispatcher.py
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
  ---
@@ -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 };