tribunal-kit 4.6.0 → 5.7.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 +7 -4
- package/.agent/routing_index.json +714 -654
- package/.agent/rules/GEMINI.md +10 -9
- package/.agent/skills/emil-design-eng/SKILL.md +147 -0
- package/.agent/skills/review-animations/SKILL.md +72 -0
- package/.agent/skills/review-animations/STANDARDS.md +73 -0
- package/.agent/workflows/generate.md +1 -1
- package/.agent/workflows/tribunal-database.md +8 -1
- package/.agent/workflows/tribunal-frontend.md +18 -99
- package/.agent/workflows/tribunal-full.md +12 -10
- package/.agent/workflows/tribunal-mobile.md +8 -1
- package/.agent/workflows/tribunal-performance.md +1 -1
- package/.agent/workflows/tribunal-speed.md +1 -1
- package/.agent/workflows/ui-ux-pro-max.md +22 -12
- package/README.md +15 -1
- package/bin/mcp-server.js +89 -19
- package/bin/wrapper.js +5 -4
- package/dist/cli.js +234 -0
- package/dist/commands/case.js +48 -0
- package/dist/commands/context.js +66 -0
- package/dist/commands/graph.js +38 -0
- package/dist/commands/hook.js +28 -0
- package/dist/commands/init.js +297 -0
- package/dist/commands/learn.js +60 -0
- package/dist/commands/marathon.js +45 -0
- package/dist/commands/mutate.js +30 -0
- package/dist/commands/status.js +35 -0
- package/dist/commands/sync.js +25 -0
- package/dist/commands/uninstall.js +42 -0
- package/dist/commands/update.js +37 -0
- package/dist/mcp/server.js +142 -0
- package/dist/types.js +8 -0
- package/dist/utils/fs.js +96 -0
- package/dist/utils/hasher.js +142 -0
- package/dist/utils/helpers.js +68 -0
- package/dist/utils/logger.js +54 -0
- package/dist/utils/version.js +150 -0
- package/package.json +3 -2
- package/scripts/benchmark.js +160 -0
- package/.agent/GEMINI.md +0 -127
- package/.agent/skills/doc.md +0 -209
package/.agent/rules/GEMINI.md
CHANGED
|
@@ -70,6 +70,8 @@ Every code or design request activates an agent. This is not optional.
|
|
|
70
70
|
| System design / scale / capacity planning | `system-architect` |
|
|
71
71
|
| Cloud infrastructure / AWS / Terraform / Docker / CI-CD | `cloud-engineer` |
|
|
72
72
|
|
|
73
|
+
> **Agent vs Skill:** Some entries above (e.g., `python-pro`, `vue-expert`, `dotnet-core-expert`, `sql-pro`, `react-specialist`, `platform-engineer`, `devops-incident-responder`) are **skills** loaded from `skills/SKILL.md`, not full agent definitions in `agents/`. The routing and announcement protocol still applies — load the skill's rules and announce it. If an `.md` file exists in `agents/`, it takes priority (P1) over the skill (P2).
|
|
74
|
+
|
|
73
75
|
**When activated, announce the agent:**
|
|
74
76
|
|
|
75
77
|
```
|
|
@@ -156,14 +158,14 @@ The Human Gate is never skipped. No code is written to a file without explicit u
|
|
|
156
158
|
|
|
157
159
|
**Reviewer assignment by domain:**
|
|
158
160
|
|
|
159
|
-
| Code type | Reviewers
|
|
160
|
-
| --------------------- |
|
|
161
|
-
| Backend/API | logic + security + dependency + type-safety + resilience + schema
|
|
162
|
-
| Frontend/React | logic + security + frontend + type-safety
|
|
163
|
-
| Database/SQL | logic + security + sql + schema
|
|
164
|
-
| Mobile/Cross-platform | logic + security + mobile-reviewer + type-safety
|
|
165
|
-
| Any domain | + performance (if optimization)
|
|
166
|
-
| Before merge | /tribunal-full (all
|
|
161
|
+
| Code type | Reviewers |
|
|
162
|
+
| --------------------- | --------------------------------------------------------------------------------------------------- |
|
|
163
|
+
| Backend/API | logic + security + dependency + type-safety + resilience + schema |
|
|
164
|
+
| Frontend/React | logic + security + frontend + type-safety + ui-ux-auditor + review-animations |
|
|
165
|
+
| Database/SQL | logic + security + sql + schema |
|
|
166
|
+
| Mobile/Cross-platform | logic + security + mobile-reviewer + type-safety |
|
|
167
|
+
| Any domain | + performance (if optimization) |
|
|
168
|
+
| Before merge | /tribunal-full (all 19) |
|
|
167
169
|
|
|
168
170
|
---
|
|
169
171
|
|
|
@@ -355,4 +357,3 @@ Before modifying any file:
|
|
|
355
357
|
**Workflows:** `.agent/workflows/`
|
|
356
358
|
**Rules (this file):** `.agent/rules/GEMINI.md`
|
|
357
359
|
**Architecture:** `.agent/ARCHITECTURE.md`
|
|
358
|
-
**Full flow diagram:** `AGENT_FLOW.md`
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: emil-design-eng
|
|
3
|
+
description: Encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great. Helps agents shape interfaces that feel refined through spacing, typography, interaction, and animation choices, aiming for subtle details and high-quality polish that elevate the whole product.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-06-26
|
|
6
|
+
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: frontend
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [frontend-design, motion-engineering]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [emil, kowalski, design engineering, interface craft, ui polish, micro-interactions, animations.dev, craft sensibility]
|
|
13
|
+
weak: [animations, feel right, ui polish, subtle details]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Design Engineering
|
|
17
|
+
|
|
18
|
+
## Initial Response
|
|
19
|
+
|
|
20
|
+
When this skill is first invoked without a specific question, respond only with:
|
|
21
|
+
|
|
22
|
+
> I'm ready to help you build interfaces that feel right, my knowledge comes from Emil Kowalski's design engineering philosophy. If you want to dive even deeper, check out Emil’s course: [animations.dev](https://animations.dev/).
|
|
23
|
+
|
|
24
|
+
You are a design engineer with the craft sensibility. You build interfaces where every detail compounds into something that feels right. You understand that in a world where everyone's software is good enough, taste is the differentiator.
|
|
25
|
+
|
|
26
|
+
## Core Philosophy
|
|
27
|
+
|
|
28
|
+
### Taste is trained, not innate
|
|
29
|
+
Good taste is not personal preference. It is a trained instinct: the ability to see beyond the obvious and recognize what elevates. Develop it by surrounding yourself with great work, thinking deeply about why something feels good, and practicing relentlessly.
|
|
30
|
+
|
|
31
|
+
### Unseen details compound
|
|
32
|
+
Most details users never consciously notice. That is the point. When a feature functions exactly as someone assumes it should, they proceed without giving it a second thought. Every decision below exists because the aggregate of invisible correctness creates interfaces people love without knowing why.
|
|
33
|
+
|
|
34
|
+
### Beauty is leverage
|
|
35
|
+
People select tools based on the overall experience, not just functionality. Good defaults and good animations are real differentiators. Use beauty as leverage to stand out.
|
|
36
|
+
|
|
37
|
+
## Review Format (Required)
|
|
38
|
+
|
|
39
|
+
When reviewing UI code, you MUST use a markdown table with Before/After columns. Do NOT use a list with "Before:" and "After:" on separate lines. Always output an actual markdown table like this:
|
|
40
|
+
|
|
41
|
+
| Before | After | Why |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; avoid `all` |
|
|
44
|
+
| `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing in the real world appears from nothing |
|
|
45
|
+
| `ease-in` on dropdown | `ease-out` with custom curve | `ease-in` feels sluggish; `ease-out` gives instant feedback |
|
|
46
|
+
| No `:active` state on button | `transform: scale(0.97)` on `:active` | Buttons must feel responsive to press |
|
|
47
|
+
| `transform-origin: center` | `transform-origin: var(--radix-popover-content-transform-origin)` | Popovers should scale from their trigger |
|
|
48
|
+
|
|
49
|
+
## The Animation Decision Framework
|
|
50
|
+
|
|
51
|
+
Before writing any animation code, answer these questions in order:
|
|
52
|
+
|
|
53
|
+
### 1. Should this animate at all?
|
|
54
|
+
**Ask:** How often will users see this animation?
|
|
55
|
+
|
|
56
|
+
| Frequency | Decision |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| 100+ times/day (keyboard shortcuts, command palette) | No animation. Ever. |
|
|
59
|
+
| Tens of times/day (hover effects, list navigation) | Remove or drastically reduce |
|
|
60
|
+
| Occasional (modals, drawers, toasts) | Standard animation |
|
|
61
|
+
| Rare/first-time (onboarding, feedback forms, celebrations) | Can add delight |
|
|
62
|
+
|
|
63
|
+
**Never animate keyboard-initiated actions.** These actions are repeated hundreds of times daily. Animation makes them feel slow and disconnected.
|
|
64
|
+
|
|
65
|
+
### 2. What is the purpose?
|
|
66
|
+
Valid purposes:
|
|
67
|
+
- **Spatial consistency**: toast enters/exits from the same direction.
|
|
68
|
+
- **State indication**: a morphing feedback button shows state change.
|
|
69
|
+
- **Explanation**: a marketing animation showing a feature.
|
|
70
|
+
- **Feedback**: a button scales down on press.
|
|
71
|
+
- **Preventing jarring changes**: elements appearing/disappearing smoothly.
|
|
72
|
+
|
|
73
|
+
If the purpose is just "it looks cool" and the user sees it often, don't animate.
|
|
74
|
+
|
|
75
|
+
### 3. What easing should it use?
|
|
76
|
+
Is the element entering or exiting?
|
|
77
|
+
Yes → ease-out (starts fast, feels responsive)
|
|
78
|
+
No →
|
|
79
|
+
Is it moving/morphing on screen?
|
|
80
|
+
Yes → ease-in-out (natural acceleration/deceleration)
|
|
81
|
+
Is it a hover/color change?
|
|
82
|
+
Yes → ease
|
|
83
|
+
Is it constant motion?
|
|
84
|
+
Yes → linear
|
|
85
|
+
Default → ease-out
|
|
86
|
+
|
|
87
|
+
**Critical: use custom easing curves.**
|
|
88
|
+
```css
|
|
89
|
+
/* Strong ease-out for UI interactions */
|
|
90
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
|
|
91
|
+
/* Strong ease-in-out for on-screen movement */
|
|
92
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
|
|
93
|
+
```
|
|
94
|
+
**Never use ease-in for UI animations.** It makes the interface feel sluggish.
|
|
95
|
+
|
|
96
|
+
### 4. How fast should it be?
|
|
97
|
+
| Element | Duration |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| Button press feedback | 100-160ms |
|
|
100
|
+
| Tooltips, small popovers | 125-200ms |
|
|
101
|
+
| Dropdowns, selects | 150-250ms |
|
|
102
|
+
| Modals, drawers | 200-500ms |
|
|
103
|
+
|
|
104
|
+
**Rule: UI animations should stay under 300ms.** Perception of speed matters as much as actual speed.
|
|
105
|
+
|
|
106
|
+
## Component Building Principles
|
|
107
|
+
|
|
108
|
+
### Buttons must feel responsive
|
|
109
|
+
Add `transform: scale(0.97)` on `:active` with subtle transition (160ms ease-out).
|
|
110
|
+
|
|
111
|
+
### Never animate from scale(0)
|
|
112
|
+
Start from `scale(0.95)` or higher combined with opacity.
|
|
113
|
+
|
|
114
|
+
### Make popovers origin-aware
|
|
115
|
+
Popovers should scale in from their trigger, not from center. Explicitly set `transform-origin` to the trigger coordinates (e.g., `var(--radix-popover-content-transform-origin)`). Modals are exempt as they are viewport-centered.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 🤖 LLM-Specific Traps
|
|
120
|
+
|
|
121
|
+
1. **Over-animating:** Applying animations to elements users interact with 100+ times a day.
|
|
122
|
+
2. **Default Easings:** Using built-in CSS `ease` or `ease-in` for entering UI elements.
|
|
123
|
+
3. **Sluggishness:** Proposing UI animations longer than 300ms.
|
|
124
|
+
4. **Unnatural Entrances:** Animating elements from `scale(0)` or `opacity: 0` without a physical origin.
|
|
125
|
+
5. **Ignoring Accessibility:** Failing to wrap animations in `prefers-reduced-motion` media queries.
|
|
126
|
+
|
|
127
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
128
|
+
|
|
129
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
130
|
+
**Active reviewers: `frontend-reviewer` · `accessibility-reviewer`**
|
|
131
|
+
|
|
132
|
+
### ✅ Pre-Flight Self-Audit
|
|
133
|
+
|
|
134
|
+
Review these questions before confirming output:
|
|
135
|
+
```
|
|
136
|
+
✅ Did I justify the animation's existence based on frequency?
|
|
137
|
+
✅ Are all UI animations under 300ms?
|
|
138
|
+
✅ Did I use `ease-out` (custom cubic-bezier) for entering elements?
|
|
139
|
+
✅ Are popovers origin-aware and avoiding `scale(0)`?
|
|
140
|
+
✅ Is `prefers-reduced-motion` respected?
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
144
|
+
|
|
145
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
146
|
+
- ❌ **Forbidden:** Declaring animation work complete because the code compiles.
|
|
147
|
+
- ✅ **Required:** Provide evidence that the animation executes flawlessly at 60fps in the browser, adhering to the 300ms budget and easing rules.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-animations
|
|
3
|
+
description: Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-06-26
|
|
6
|
+
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
7
|
+
disable-model-invocation: true
|
|
8
|
+
routing:
|
|
9
|
+
domain: review
|
|
10
|
+
tier: specialized
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [review animations, motion review, ui animation craft, 60fps, animation standards, evaluate motion]
|
|
13
|
+
weak: [review UI, check transitions, smooth animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Reviewing Animations
|
|
17
|
+
|
|
18
|
+
A specialized review skill. It does ONE thing: review animation and motion code against a high craft bar. It does not write features, fix unrelated bugs, or review non-motion code. If asked to review general code, decline and point to a general review skill.
|
|
19
|
+
|
|
20
|
+
## Operating Posture
|
|
21
|
+
|
|
22
|
+
You are a senior motion-design reviewer with a brutal eye for craft. Your bias is toward **motion that feels right**, not motion that merely runs. A transition that "works" but feels sluggish, lands from the wrong origin, fires too often, or drops frames is a regression, not a pass. Default to flagging. Approval is earned, not assumed.
|
|
23
|
+
|
|
24
|
+
The substantive bar comes from Emil Kowalski's animation philosophy (animations.dev). The review *method* — non-negotiable standards, escalation triggers, a remedial hierarchy, tiered output, and explicit approval criteria — is adapted from aggressive code-quality review.
|
|
25
|
+
|
|
26
|
+
For the full rule catalog (easing curves, duration tables, spring config, gestures, clip-path, performance, a11y), see [STANDARDS.md](STANDARDS.md). Load it whenever a finding needs a precise value or citation.
|
|
27
|
+
|
|
28
|
+
## The Ten Non-Negotiable Standards
|
|
29
|
+
|
|
30
|
+
Every animation in the diff is measured against these. A violation is a finding.
|
|
31
|
+
|
|
32
|
+
1. **Justified motion.** Every animation must answer "why does this animate?" — spatial consistency, state indication, feedback, explanation, or preventing a jarring change. "It looks cool" on a frequently-seen element is a block.
|
|
33
|
+
2. **Frequency-appropriate.** Match motion to how often it's seen. Keyboard-initiated and 100+/day actions get **no** animation. Tens/day gets reduced motion. Occasional gets standard. Rare/first-time can have delight.
|
|
34
|
+
3. **Responsive easing.** Entering/exiting elements use `ease-out` or a strong custom curve. `ease-in` on UI is a block — it delays the moment the user watches most. Built-in CSS easings are too weak; expect custom cubic-beziers.
|
|
35
|
+
4. **Sub-300ms UI.** UI animations stay under 300ms; anything slower on a UI element needs justification or it's a finding.
|
|
36
|
+
5. **Origin & physical correctness.** Popovers/dropdowns/tooltips scale from their trigger (`transform-origin`), not center. Never animate from `scale(0)` — start from `scale(0.9–0.97)` + opacity. (Modals are exempt — they stay centered.)
|
|
37
|
+
6. **Interruptibility.** Rapidly-triggered or gesture-driven motion (toasts, toggles, drags) must be interruptible — CSS transitions or springs that retarget from current state, not keyframes that restart from zero.
|
|
38
|
+
7. **GPU-only properties.** Animate `transform` and `opacity` only. Animating `width`/`height`/`margin`/`padding`/`top`/`left` is a performance finding.
|
|
39
|
+
8. **Accessibility.** `prefers-reduced-motion` is honored (gentler, not zero — keep opacity/color, drop movement). Hover animations are gated behind `@media (hover: hover) and (pointer: fine)`.
|
|
40
|
+
9. **Asymmetric enter/exit.** Deliberate actions (a press, a hold, a destructive confirm) animate slower; system responses snap. Symmetric timing on a press-and-release or hold interaction is a finding.
|
|
41
|
+
10. **Cohesion.** Motion matches the component's personality and the rest of the product — playful can be appropriate for consumer apps, but not for enterprise dashboards. Verify the motion fits the context.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🤖 LLM-Specific Traps
|
|
46
|
+
|
|
47
|
+
1. **Passive Approval:** Approving animations just because the syntax is correct. You must evaluate the *feel* and *performance* against the Standards.
|
|
48
|
+
2. **Ignoring Physics:** Failing to flag elements appearing from nothing (`scale(0)`) or scaling from the wrong origin point.
|
|
49
|
+
3. **Overlooking Duration:** Missing sluggish transitions that exceed the 300ms budget for UI elements.
|
|
50
|
+
4. **Accepting Default Easings:** Approving `ease-in` or generic `ease` on entering UI elements instead of demanding strong `ease-out` curves.
|
|
51
|
+
|
|
52
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
53
|
+
|
|
54
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
55
|
+
**Active reviewers: `frontend-reviewer` · `performance-reviewer`**
|
|
56
|
+
|
|
57
|
+
### ✅ Pre-Flight Self-Audit
|
|
58
|
+
|
|
59
|
+
Review these questions before confirming output:
|
|
60
|
+
```
|
|
61
|
+
✅ Did I measure the diff against all 10 non-negotiable standards?
|
|
62
|
+
✅ Did I flag any UI animations exceeding 300ms?
|
|
63
|
+
✅ Did I reject any `ease-in` usage on entering elements?
|
|
64
|
+
✅ Did I verify GPU-only properties (`transform` and `opacity`)?
|
|
65
|
+
✅ Did I check for interruptibility and physical correctness?
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
69
|
+
|
|
70
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
71
|
+
- ❌ **Forbidden:** Marking the review as "Pass" without explicitly evaluating against the STANDARDS.md criteria.
|
|
72
|
+
- ✅ **Required:** Output the review in the standard table format (`| Before | After | Why |`) highlighting all violations, and explicitly stating why approval is earned or withheld.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Animation Standards Reference
|
|
2
|
+
|
|
3
|
+
The precise values, curves, and rules behind the review. Cite these in findings instead of approximating. Distilled from Emil Kowalski's design engineering philosophy ([animations.dev](https://animations.dev/)).
|
|
4
|
+
|
|
5
|
+
## Should it animate? (frequency table)
|
|
6
|
+
|
|
7
|
+
| Frequency | Decision |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| 100+ times/day (keyboard shortcuts, command palette) | No animation. Ever. |
|
|
10
|
+
| Tens of times/day (hover effects, list navigation) | Remove or drastically reduce |
|
|
11
|
+
| Occasional (modals, drawers, toasts) | Standard animation |
|
|
12
|
+
| Rare / first-time (onboarding, feedback, celebrations) | Can add delight |
|
|
13
|
+
|
|
14
|
+
**Never animate keyboard-initiated actions** — they repeat hundreds of times daily; animation makes them feel slow and disconnected.
|
|
15
|
+
Valid purposes for motion: spatial consistency, state indication, explanation, feedback, preventing jarring change. "It looks cool" on a frequently-seen element is not valid.
|
|
16
|
+
|
|
17
|
+
## Easing
|
|
18
|
+
|
|
19
|
+
Decision order:
|
|
20
|
+
- Entering or exiting → **`ease-out`** (starts fast, feels responsive)
|
|
21
|
+
- Moving / morphing on screen → **`ease-in-out`**
|
|
22
|
+
- Hover / color change → **`ease`**
|
|
23
|
+
- Constant motion (marquee, progress) → **`linear`**
|
|
24
|
+
- Default → **`ease-out`**
|
|
25
|
+
|
|
26
|
+
**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. `ease-out` at 200ms *feels* faster than `ease-in` at 200ms.
|
|
27
|
+
|
|
28
|
+
Built-in CSS easings are too weak. Use strong custom curves:
|
|
29
|
+
```css
|
|
30
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
|
|
31
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
|
|
32
|
+
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer curve (Ionic) */
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Duration
|
|
36
|
+
|
|
37
|
+
| Element | Duration |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Button press feedback | 100–160ms |
|
|
40
|
+
| Tooltips, small popovers | 125–200ms |
|
|
41
|
+
| Dropdowns, selects | 150–250ms |
|
|
42
|
+
| Modals, drawers | 200–500ms |
|
|
43
|
+
| Marketing / explanatory | Can be longer |
|
|
44
|
+
|
|
45
|
+
**Rule: UI animations stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one.
|
|
46
|
+
|
|
47
|
+
## Physicality
|
|
48
|
+
|
|
49
|
+
- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
|
|
50
|
+
- **Origin-aware popovers.** Scale from the trigger, not center.
|
|
51
|
+
- **Button press feedback.** `transform: scale(0.97)` on `:active`, `transition: transform 160ms ease-out`. Subtle (0.95–0.98).
|
|
52
|
+
|
|
53
|
+
## Springs
|
|
54
|
+
|
|
55
|
+
Feel natural because they simulate physics; no fixed duration. Use for drag with momentum, interruptible gestures.
|
|
56
|
+
```js
|
|
57
|
+
// Apple-style (easier to reason about) — recommended
|
|
58
|
+
{ type: "spring", duration: 0.5, bounce: 0.2 }
|
|
59
|
+
```
|
|
60
|
+
Keep bounce subtle (0.1–0.3); avoid bounce in most UI.
|
|
61
|
+
|
|
62
|
+
## Interruptibility
|
|
63
|
+
|
|
64
|
+
CSS **transitions** can be interrupted and retargeted mid-animation; **keyframes** restart from zero. For anything triggered rapidly, transitions are smoother.
|
|
65
|
+
```css
|
|
66
|
+
/* Interruptible — good for dynamic UI */
|
|
67
|
+
.toast { transition: transform 400ms ease; }
|
|
68
|
+
|
|
69
|
+
/* Not interruptible — avoid for dynamic UI */
|
|
70
|
+
@keyframes slideIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use `@starting-style` for entry without JS.
|
|
@@ -127,7 +127,7 @@ security-auditor → OWASP vulnerabilities, hardcoded secrets, injection
|
|
|
127
127
|
| `aria`, `wcag`, `a11y`, `accessibility` | `accessibility-reviewer` + `ui-ux-auditor` |
|
|
128
128
|
| `import`, `package`, `npm`, `require` | `dependency-reviewer` |
|
|
129
129
|
|
|
130
|
-
> For maximum safety on critical code: use `/tribunal-full` for all
|
|
130
|
+
> For maximum safety on critical code: use `/tribunal-full` for all 18 reviewers simultaneously.
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
@@ -32,7 +32,7 @@ Read BEFORE database review:
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 4 Active Reviewers (All Run Simultaneously)
|
|
36
36
|
|
|
37
37
|
### precedence-reviewer → Checks local repo Case Law for past rejections
|
|
38
38
|
|
|
@@ -59,6 +59,13 @@ logic-reviewer
|
|
|
59
59
|
- Missing rollback in raw SQL catch block
|
|
60
60
|
- Expand vs contract migration not followed
|
|
61
61
|
|
|
62
|
+
### schema-reviewer
|
|
63
|
+
|
|
64
|
+
- Missing input validation before DB persistence
|
|
65
|
+
- Schema out of sync with code validation logic
|
|
66
|
+
- Prisma schema lacking proper relational constraints
|
|
67
|
+
- Enum types not matching between app and database
|
|
68
|
+
|
|
62
69
|
---
|
|
63
70
|
|
|
64
71
|
## Verdict System
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Frontend and React specific Tribunal. Runs Logic + Security + Frontend + Type Safety reviewers. Use for React components, hooks, UI code, Next.js pages, Server Components, and Client Components.
|
|
3
|
-
required-skills: react-specialist, nextjs-react-expert
|
|
2
|
+
description: Frontend and React specific Tribunal. Runs Logic + Security + Frontend + Type Safety + UI/UX + Motion reviewers. Use for React components, hooks, UI code, Next.js pages, Server Components, and Client Components.
|
|
3
|
+
required-skills: react-specialist, nextjs-react-expert, frontend-design, review-animations, emil-design-eng
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /tribunal-frontend — Frontend Code Audit
|
|
@@ -32,11 +32,11 @@ Read BEFORE frontend review:
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 6 Active Reviewers (All Run Simultaneously)
|
|
36
36
|
|
|
37
37
|
### precedence-reviewer → Checks local repo Case Law for past rejections
|
|
38
38
|
|
|
39
|
-
logic-reviewer
|
|
39
|
+
### logic-reviewer
|
|
40
40
|
|
|
41
41
|
- Hallucinated React 19 hooks (non-existent hook names)
|
|
42
42
|
- useFormState called instead of useActionState (React 19 rename)
|
|
@@ -66,111 +66,29 @@ logic-reviewer
|
|
|
66
66
|
- Server Component async props typed without Promise<> (Next.js 15 params)
|
|
67
67
|
- No explicit return type on custom hooks
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## Verdict System
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
If ANY reviewer → ❌ REJECTED: fix before Human Gate
|
|
75
|
-
If any reviewer → ⚠️ WARNING: proceed with flagged items
|
|
76
|
-
If all reviewers → ✅ APPROVED: Human Gate
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Frontend-Specific Hallucination Traps (Common LLM Mistakes)
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
// ❌ React 19: useFormState renamed to useActionState
|
|
85
|
-
import { useFormState } from 'react'; // useFormState no longer exists in React 19
|
|
86
|
-
import { useActionState } from 'react'; // Correct React 19 name
|
|
87
|
-
|
|
88
|
-
// ❌ Next.js 15: params and searchParams must be awaited
|
|
89
|
-
const { id } = params; // WRONG — params is a Promise in Next.js 15
|
|
90
|
-
const { id } = await params; // CORRECT
|
|
91
|
-
|
|
92
|
-
// ❌ Hook not valid in Server Component
|
|
93
|
-
export default async function Page() {
|
|
94
|
-
const [count, setCount] = useState(0); // Server Components cannot use hooks
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// ❌ Server Action missing 'use server'
|
|
98
|
-
---
|
|
99
|
-
description: Frontend and React specific Tribunal. Runs Logic + Security + Frontend + Type Safety reviewers. Use for React components, hooks, UI code, Next.js pages, Server Components, and Client Components.
|
|
100
|
-
required-skills: react-specialist, nextjs-react-expert
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
# /tribunal-frontend — Frontend Code Audit
|
|
104
|
-
|
|
105
|
-
$ARGUMENTS
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## $CONTEXT_REQUIRED
|
|
110
|
-
|
|
111
|
-
```
|
|
69
|
+
### ui-ux-auditor
|
|
112
70
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
```
|
|
71
|
+
- Generic AI Aesthetics (purple gradients, standard hero layouts)
|
|
72
|
+
- Missing hover/focus states on interactive elements
|
|
73
|
+
- Color contrast below WCAG AA (4.5:1)
|
|
74
|
+
- Typography and spacing not following design system logic
|
|
119
75
|
|
|
120
|
-
|
|
76
|
+
### review-animations (The Socratic Gate)
|
|
121
77
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|React components (Server or Client)|Backend routes → `/tribunal-backend`|
|
|
127
|
-
|Custom hooks|Database queries → `/tribunal-database`|
|
|
128
|
-
|Next.js pages and layouts|Mobile (React Native) → `/tribunal-mobile`|
|
|
129
|
-
|UI state management|Maximum coverage → `/tribunal-full`|
|
|
130
|
-
|Form handling with Server Actions||
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## 4 Active Reviewers (All Run Simultaneously)
|
|
135
|
-
|
|
136
|
-
### precedence-reviewer → Checks local repo Case Law for past rejections
|
|
137
|
-
logic-reviewer
|
|
138
|
-
- Hallucinated React 19 hooks (non-existent hook names)
|
|
139
|
-
- useFormState called instead of useActionState (React 19 rename)
|
|
140
|
-
- useEffect missing dependencies (stale closure)
|
|
141
|
-
- Multiple setStates that should be batched (React 19 auto-batches in most cases)
|
|
142
|
-
|
|
143
|
-
### security-auditor
|
|
144
|
-
- `dangerouslySetInnerHTML` with user-controlled content (XSS)
|
|
145
|
-
- eval/Function() calls in component code
|
|
146
|
-
- Exposing sensitive data in client-rendered output
|
|
147
|
-
|
|
148
|
-
### frontend-reviewer
|
|
149
|
-
- useState/useReducer in Server Components (no client runtime!)
|
|
150
|
-
- 'use client' directive missing on components using hooks
|
|
151
|
-
- Missing 'use server' on Server Actions
|
|
152
|
-
- cookies()/headers()/params not awaited in Next.js 15
|
|
153
|
-
- useEffect not cleaned up (subscription leaks)
|
|
154
|
-
- Keys not unique in list rendering (using index as key)
|
|
155
|
-
- Direct DOM mutations (document.querySelector inside React)
|
|
156
|
-
|
|
157
|
-
### type-safety-reviewer
|
|
158
|
-
- Props typed as `any`
|
|
159
|
-
- Event handlers typed as `any` (use `React.MouseEvent<HTMLButtonElement>`)
|
|
160
|
-
- Server Component async props typed without Promise<> (Next.js 15 params)
|
|
161
|
-
- No explicit return type on custom hooks
|
|
78
|
+
- Any UI animation exceeding 300ms budget
|
|
79
|
+
- Use of `ease-in` on entering UI elements instead of `ease-out`
|
|
80
|
+
- Elements appearing from `scale(0)` instead of `0.95`
|
|
81
|
+
- Non-interruptible motion or missing hover/active states
|
|
162
82
|
|
|
163
83
|
---
|
|
164
84
|
|
|
165
85
|
## Verdict System
|
|
166
86
|
|
|
167
87
|
```
|
|
168
|
-
|
|
169
88
|
If ANY reviewer → ❌ REJECTED: fix before Human Gate
|
|
170
|
-
If any reviewer → ⚠️ WARNING:
|
|
89
|
+
If any reviewer → ⚠️ WARNING: proceed with flagged items
|
|
171
90
|
If all reviewers → ✅ APPROVED: Human Gate
|
|
172
|
-
|
|
173
|
-
````
|
|
91
|
+
```
|
|
174
92
|
|
|
175
93
|
---
|
|
176
94
|
|
|
@@ -193,7 +111,8 @@ export default async function Page() {
|
|
|
193
111
|
// ❌ Server Action missing 'use server'
|
|
194
112
|
async function saveData(formData: FormData) { // Without 'use server' — not a Server Action
|
|
195
113
|
'use server'; // Must be FIRST line
|
|
196
|
-
|
|
114
|
+
}
|
|
115
|
+
```
|
|
197
116
|
|
|
198
117
|
---
|
|
199
118
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run ALL
|
|
2
|
+
description: Run ALL 19 Tribunal reviewer agents simultaneously. Maximum hallucination coverage. Use before merging any AI-generated code, before production deployments, or when maximum confidence is required.
|
|
3
3
|
required-skills: all domain skills auto-loaded
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /tribunal-full — Complete
|
|
6
|
+
# /tribunal-full — Complete 19-Reviewer Audit
|
|
7
7
|
|
|
8
8
|
$ARGUMENTS
|
|
9
9
|
|
|
@@ -32,7 +32,7 @@ Read BEFORE full review:
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 19 Reviewers — All Active Simultaneously
|
|
36
36
|
|
|
37
37
|
```
|
|
38
38
|
Tier 1: Always active (universal concerns)
|
|
@@ -53,7 +53,9 @@ Tier 3: Domain-specific
|
|
|
53
53
|
├── mobile-reviewer → Reanimated thread safety, FlashList, safe area insets
|
|
54
54
|
├── ai-code-reviewer → Model name hallucinations, prompt injection, cost explosion
|
|
55
55
|
├── test-coverage-reviewer → Happy path only, brittle selectors, missing edge cases
|
|
56
|
-
|
|
56
|
+
├── accessibility-reviewer → WCAG 2.2 AA, ARIA misuse, focus management, live regions
|
|
57
|
+
├── ui-ux-auditor → Generic AI aesthetics, missing hover states, contrast
|
|
58
|
+
└── review-animations → UI animations >300ms, origin-unaware popovers, ease-in
|
|
57
59
|
|
|
58
60
|
Tier 4: Performance Swarm (token-scoped specialists)
|
|
59
61
|
├── vitals-reviewer → Frontend CWV depth: Suspense waterfalls, paint jank, animation leaks
|
|
@@ -65,17 +67,17 @@ Tier 4: Performance Swarm (token-scoped specialists)
|
|
|
65
67
|
|
|
66
68
|
## Active Reviewers by Code Type
|
|
67
69
|
|
|
68
|
-
Not all
|
|
70
|
+
Not all 19 reviewers produce meaningful findings on all code types. Active reviewers detect their first finding immediately — inactive reviewers auto-pass with "N/A for this code type."
|
|
69
71
|
|
|
70
72
|
| Code Under Review | Critical Reviewers |
|
|
71
73
|
| :------------------ | :---------------------------------------------------------------- |
|
|
72
74
|
| REST API route | logic, security, dependency, type-safety, sql, schema, resilience |
|
|
73
|
-
| React component | logic, frontend, accessibility, type-safety, resilience
|
|
75
|
+
| React component | logic, frontend, accessibility, type-safety, resilience, ui-ux |
|
|
74
76
|
| Database query | logic, security, sql, resilience |
|
|
75
77
|
| AI LLM integration | logic, security, ai-code, dependency |
|
|
76
78
|
| Test file | test-coverage, logic |
|
|
77
|
-
| React Native / Expo | mobile, logic, security, performance
|
|
78
|
-
| Next.js page | logic, frontend, performance, accessibility |
|
|
79
|
+
| React Native / Expo | mobile, logic, security, performance, ui-ux |
|
|
80
|
+
| Next.js page | logic, frontend, performance, accessibility, ui-ux |
|
|
79
81
|
| Auth/JWT code | security, logic, type-safety |
|
|
80
82
|
|
|
81
83
|
---
|
|
@@ -83,7 +85,7 @@ Not all 11 reviewers produce meaningful findings on all code types. Active revie
|
|
|
83
85
|
## Verdict Aggregation
|
|
84
86
|
|
|
85
87
|
```
|
|
86
|
-
All
|
|
88
|
+
All 19 verdicts are collected. Aggregated result:
|
|
87
89
|
|
|
88
90
|
If ANY reviewer = ❌ REJECTED → Global verdict: ❌ REJECTED (must fix before Human Gate)
|
|
89
91
|
If any reviewer = ⚠️ WARNING → Global verdict: ⚠️ WARNINGS (proceed with attention)
|
|
@@ -121,7 +123,7 @@ After 3 failed attempts:
|
|
|
121
123
|
|
|
122
124
|
| Outcome | Next Command |
|
|
123
125
|
| :------------------------- | :--------------------------------------------- |
|
|
124
|
-
| All
|
|
126
|
+
| All 19 reviewers approve | → `/deploy` — highest confidence state |
|
|
125
127
|
| Reject with multiple fixes | → `/fix` for simple issues, `/debug` for logic |
|
|
126
128
|
| Performance rejection | → `/tribunal-speed` for granular profiling |
|
|
127
129
|
| Security rejection | → Immediate `/tribunal-backend` to resolve |
|
|
@@ -32,7 +32,7 @@ Read BEFORE mobile review:
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## 4 Active Reviewers (All Run Simultaneously)
|
|
36
36
|
|
|
37
37
|
### precedence-reviewer → Checks local repo Case Law for past rejections
|
|
38
38
|
|
|
@@ -60,6 +60,13 @@ logic-reviewer
|
|
|
60
60
|
- Missing `AppState` subscription cleanup (`subscription.remove()`)
|
|
61
61
|
- `react-native Image` used instead of `expo-image` (poor caching)
|
|
62
62
|
|
|
63
|
+
### type-safety-reviewer
|
|
64
|
+
|
|
65
|
+
- React Native components with `any` typed props
|
|
66
|
+
- Navigation route params missing strict types (e.g., React Navigation types)
|
|
67
|
+
- Untyped gesture handler events
|
|
68
|
+
- Unsafe type assertions when bridging native modules
|
|
69
|
+
|
|
63
70
|
---
|
|
64
71
|
|
|
65
72
|
## Verdict System
|
|
@@ -181,7 +181,7 @@ If a specialist fails after 3 retries:
|
|
|
181
181
|
| :------------------------- | :------------------------------- | :--------------------- | :--------------------------------------- |
|
|
182
182
|
| `/tribunal-performance` | logic + performance-reviewer | Generic CWV check | Quick single-file perf scan |
|
|
183
183
|
| `/tribunal-speed` | vitals + db-latency + throughput | Deep 3-domain parallel | Full-stack perf audit |
|
|
184
|
-
| `/tribunal-full` | All
|
|
184
|
+
| `/tribunal-full` | All 18 agents | Everything | Maximum coverage (security + perf + all) |
|
|
185
185
|
| `/performance-benchmarker` | Lighthouse + bundle | Measurement only | Get actual scores, not code review |
|
|
186
186
|
|
|
187
187
|
---
|