tribunal-kit 5.8.2 โ 5.8.4
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 +12 -12
- package/.agent/agents/complexity-reviewer.md +53 -0
- package/.agent/agents/precedence-reviewer.md +12 -12
- package/.agent/agents/swarm-worker-registry.md +3 -3
- package/.agent/history/integrity_manifest.json +958 -0
- package/.agent/history/memory/.memory.idx +305 -1
- package/.agent/history/memory/MEMORY.md +21 -1
- package/.agent/rules/GEMINI.md +31 -28
- package/.agent/scripts/case_law_manager.js +3 -15
- package/.agent/scripts/context_broker.js +3 -1
- package/.agent/scripts/guardrail_engine.js +643 -0
- package/.agent/scripts/integrity_manifest.js +486 -0
- package/.agent/scripts/signal_detector.js +1 -1
- package/.agent/scripts/skill_evolution.js +3 -15
- package/.agent/scripts/skill_integrator.js +2 -12
- package/.agent/scripts/swarm_dispatcher.js +2 -12
- package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
- package/.agent/skills/60fps-animation/SKILL.md +78 -0
- package/.agent/skills/accessible-animation/SKILL.md +86 -0
- package/.agent/skills/adapt/SKILL.md +75 -0
- package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
- package/.agent/skills/animation-systems/SKILL.md +69 -0
- package/.agent/skills/antfu-conventions/SKILL.md +74 -0
- package/.agent/skills/app-builder/SKILL.md +1 -1
- package/.agent/skills/apple-design/SKILL.md +108 -0
- package/.agent/skills/audit-and-fix/SKILL.md +83 -0
- package/.agent/skills/baseline-ui/SKILL.md +74 -0
- package/.agent/skills/better-colors/SKILL.md +124 -0
- package/.agent/skills/better-typography/SKILL.md +111 -0
- package/.agent/skills/better-ui/SKILL.md +102 -0
- package/.agent/skills/bolder/SKILL.md +68 -0
- package/.agent/skills/build-primitive/SKILL.md +70 -0
- package/.agent/skills/clarify/SKILL.md +75 -0
- package/.agent/skills/cobejs/SKILL.md +96 -0
- package/.agent/skills/codebase-design/SKILL.md +84 -0
- package/.agent/skills/colorize/SKILL.md +77 -0
- package/.agent/skills/compact-landing/SKILL.md +70 -0
- package/.agent/skills/company-logos/SKILL.md +73 -0
- package/.agent/skills/create-design-md/SKILL.md +104 -0
- package/.agent/skills/critique/SKILL.md +95 -0
- package/.agent/skills/delight/SKILL.md +65 -0
- package/.agent/skills/design-lab/SKILL.md +59 -0
- package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
- package/.agent/skills/distill/SKILL.md +65 -0
- package/.agent/skills/domain-modeling/SKILL.md +78 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
- package/.agent/skills/fixing-metadata/SKILL.md +97 -0
- package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
- package/.agent/skills/gpt-taste/SKILL.md +68 -0
- package/.agent/skills/harden/SKILL.md +74 -0
- package/.agent/skills/impeccable/SKILL.md +72 -0
- package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
- package/.agent/skills/improve-ui/SKILL.md +83 -0
- package/.agent/skills/landing-page/SKILL.md +88 -0
- package/.agent/skills/lint-and-validate/SKILL.md +1 -2
- package/.agent/skills/local-first-architecture/SKILL.md +66 -0
- package/.agent/skills/lottie-animation/SKILL.md +82 -0
- package/.agent/skills/marquee-loop/SKILL.md +96 -0
- package/.agent/skills/masked-reveal/SKILL.md +88 -0
- package/.agent/skills/micro-interaction/SKILL.md +100 -0
- package/.agent/skills/morphing-icons/SKILL.md +85 -0
- package/.agent/skills/page-transition-animation/SKILL.md +108 -0
- package/.agent/skills/parallel-agents/SKILL.md +5 -5
- package/.agent/skills/polish/SKILL.md +63 -0
- package/.agent/skills/pricing-page/SKILL.md +68 -0
- package/.agent/skills/progressive-blur/SKILL.md +100 -0
- package/.agent/skills/project-idioms/SKILL.md +7 -7
- package/.agent/skills/quieter/SKILL.md +68 -0
- package/.agent/skills/react-doctor/SKILL.md +70 -0
- package/.agent/skills/redesign-skill/SKILL.md +65 -0
- package/.agent/skills/shape/SKILL.md +73 -0
- package/.agent/skills/soft-skill/SKILL.md +72 -0
- package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
- package/.agent/skills/svg-animation/SKILL.md +91 -0
- package/.agent/skills/swiss-design/SKILL.md +64 -0
- package/.agent/skills/taste-skill/SKILL.md +71 -0
- package/.agent/skills/tdd-workflow/SKILL.md +36 -165
- package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
- package/.agent/skills/transitions-dev/SKILL.md +101 -0
- package/.agent/skills/typeset/SKILL.md +76 -0
- package/.agent/skills/ui-skills-root/SKILL.md +85 -0
- package/.agent/skills/web-quality-audit/SKILL.md +67 -0
- package/.agent/workflows/fix.md +2 -2
- package/.agent/workflows/preview.md +5 -5
- package/.agent/workflows/status.md +1 -1
- package/.agent/workflows/tribunal-full.md +3 -3
- package/.agent/workflows/tribunal-speed.md +2 -2
- package/README.md +348 -238
- package/bin/tribunal-kit.js +62 -1482
- package/dist/cli.js +13 -0
- package/dist/commands/align.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/guardrail.js +275 -0
- package/dist/commands/init.js +10 -9
- package/dist/commands/optimize.js +318 -0
- package/dist/utils/version.js +1 -1
- package/package.json +10 -8
- package/scripts/fix-vbc.js +98 -0
- package/scripts/fix-vbc.ps1 +119 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 60fps-animation
|
|
3
|
+
description: Web animation performance guidance for avoiding layout thrashing, achieving 60/120fps motion, and using GPU compositor-friendly properties (transform, opacity).
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Animation Performance & GPU Hardware Acceleration
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [fixing-motion-performance, framer-motion-expert, gsap-performance]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [60fps-animation, animation performance, layout thrashing, compositor properties, GPU acceleration, 120fps animation, smooth motion]
|
|
13
|
+
weak: [fast animation, fix laggy animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# 60fps Animation โ GPU Compositor & High-Performance Motion
|
|
17
|
+
|
|
18
|
+
Eliminate jank, layout thrashing, and frame drops to achieve locked 60fps / 120fps UI animations.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Performance Rules
|
|
23
|
+
|
|
24
|
+
### 1. Compositor-Only Animation Pipeline
|
|
25
|
+
Only animate properties handled strictly by the GPU compositor layer:
|
|
26
|
+
- โ
**Compositor Properties** (Zero Layout / Zero Paint): `transform` (`translate3d`, `scale`, `rotate`) and `opacity`.
|
|
27
|
+
- โ **Forbidden Animating Properties** (Triggers Full Layout Re-calculation): `width`, `height`, `margin`, `padding`, `top`, `left`, `border-width`.
|
|
28
|
+
|
|
29
|
+
### 2. Replacing Width/Height Transitions with Scale Math
|
|
30
|
+
Instead of animating `width: 100px` to `200px`:
|
|
31
|
+
```css
|
|
32
|
+
/* BAD: Triggers Layout recalculation on every frame */
|
|
33
|
+
.box-bad {
|
|
34
|
+
transition: width 300ms ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* GOOD: GPU Compositor Hardware Accelerated */
|
|
38
|
+
.box-good {
|
|
39
|
+
transform: scaleX(2);
|
|
40
|
+
transform-origin: left center;
|
|
41
|
+
transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. `will-change` Management
|
|
46
|
+
- Apply `will-change: transform, opacity` ONLY right before or during active animation.
|
|
47
|
+
- Remove `will-change` when animation completes to free up GPU VRAM memory!
|
|
48
|
+
|
|
49
|
+
### 4. Layout Thrashing Prevention in JS
|
|
50
|
+
- Never interleave DOM reads (`element.offsetHeight`) with DOM writes (`element.style.height = ...`) inside requestAnimationFrame or scroll handlers. Batch all reads first, then perform all writes.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## ๐ค LLM-Specific Traps
|
|
55
|
+
|
|
56
|
+
1. **Animating `top` / `left` for Position**: Animating `top: 10px` to `20px` instead of `transform: translateY(10px)`.
|
|
57
|
+
2. **Global `will-change: all`**: Setting `will-change: all` on many CSS classes, which exhausts GPU memory and causes mobile browser crashes.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
62
|
+
|
|
63
|
+
**Active reviewers: `performance-optimizer` ยท `motion-reviewer`**
|
|
64
|
+
|
|
65
|
+
### โ
Pre-Flight Self-Audit
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
โ
Are all animated properties restricted to `transform` and `opacity`?
|
|
69
|
+
โ
Have layout-triggering properties (`width`, `height`, `top`, `left`) been eliminated from transitions?
|
|
70
|
+
โ
Is `will-change` cleaned up after animation completion?
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
74
|
+
|
|
75
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
76
|
+
|
|
77
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
78
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessible-animation
|
|
3
|
+
description: Tiered reduced-motion patterns for CSS, GSAP, Framer Motion, Lenis, and View Transitions API to ensure full WCAG 2.2 accessibility compliance for motion.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Accessible Motion & Reduced Motion Patterns
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [web-accessibility-auditor, framer-motion-expert, 60fps-animation]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [accessible-animation, prefers-reduced-motion, accessible motion, WCAG animation, motion accessibility]
|
|
13
|
+
weak: [disable animation, reduced motion]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Accessible Animation โ Tiered Reduced-Motion Patterns
|
|
17
|
+
|
|
18
|
+
Ensure UI motion respects user accessibility preferences (`prefers-reduced-motion: reduce`) without stripping functional state updates.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3 Tiered Reduced-Motion Rules
|
|
23
|
+
|
|
24
|
+
### Tier 1: CSS Reduced Motion Media Query
|
|
25
|
+
```css
|
|
26
|
+
@media (prefers-reduced-motion: reduce) {
|
|
27
|
+
*,
|
|
28
|
+
::before,
|
|
29
|
+
::after {
|
|
30
|
+
animation-duration: 0.01ms !important;
|
|
31
|
+
animation-iteration-count: 1 !important;
|
|
32
|
+
transition-duration: 0.01ms !important;
|
|
33
|
+
scroll-behavior: auto !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Tier 2: React & Framer Motion Hook (`useReducedMotion`)
|
|
39
|
+
```tsx
|
|
40
|
+
import { useReducedMotion, motion } from "framer-motion";
|
|
41
|
+
|
|
42
|
+
export function AccessibleCard({ children }) {
|
|
43
|
+
const shouldReduceMotion = useReducedMotion();
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<motion.div
|
|
47
|
+
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 20 }}
|
|
48
|
+
animate={{ opacity: 1, y: 0 }}
|
|
49
|
+
transition={{ duration: shouldReduceMotion ? 0.05 : 0.3 }}
|
|
50
|
+
>
|
|
51
|
+
{children}
|
|
52
|
+
</motion.div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Tier 3: Replacing Parallax & Vestibular Triggers with Instant Fades
|
|
58
|
+
- Disorienting motions (parallax scrolling, 3D rotations, zoom scaling) MUST be converted into instant cross-fades (`opacity: 0 -> 1`) when `prefers-reduced-motion: reduce` is active.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## ๐ค LLM-Specific Traps
|
|
63
|
+
|
|
64
|
+
1. **Stripping All State Updates**: Completely disabling CSS transitions so elements abruptly disappear or jump without opacity fading.
|
|
65
|
+
2. **Ignoring JS Smooth Scroll**: Leaving smooth scroll libraries (Lenis, GSAP ScrollSmoother) active when reduced motion is preferred.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
70
|
+
|
|
71
|
+
**Active reviewers: `accessibility-reviewer` ยท `motion-reviewer`**
|
|
72
|
+
|
|
73
|
+
### โ
Pre-Flight Self-Audit
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
โ
Is `@media (prefers-reduced-motion: reduce)` declared in CSS stylesheets?
|
|
77
|
+
โ
Do JS animation libraries (Framer Motion / GSAP) query `useReducedMotion()` or `window.matchMedia`?
|
|
78
|
+
โ
Are disorienting parallax/zoom effects converted into gentle opacity fades?
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
82
|
+
|
|
83
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
84
|
+
|
|
85
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
86
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adapt
|
|
3
|
+
description: Adapt designs across breakpoints, devices, platform constraints, touch vs mouse input, and container queries. Use when making a UI responsive or optimizing for mobile/tablet.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Responsive Design & Cross-Device Adaptation
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [mobile-design, building-native-ui]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [adapt, responsive design, container queries, mobile adaptation, responsive layout, touch target size, responsive breakpoints]
|
|
13
|
+
weak: [mobile friendly, responsive UI]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Adapt โ Responsive Adaptation & Container Queries
|
|
17
|
+
|
|
18
|
+
Architect UIs that adapt fluidly to screen dimensions, container boundaries, input devices (touch vs pointer), and orientation.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Adaptation Mechanics
|
|
23
|
+
|
|
24
|
+
### 1. Container Queries (`@container`) over Viewport Media Queries (`@media`)
|
|
25
|
+
- Components should adapt based on their parent container's width, NOT the global browser window size:
|
|
26
|
+
```css
|
|
27
|
+
.card-container {
|
|
28
|
+
container-type: inline-size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@container (min-width: 400px) {
|
|
32
|
+
.card-layout {
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-columns: 120px 1fr;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Touch Target Sizing (Min 44x44px)
|
|
40
|
+
- Interactive targets on mobile/touch interfaces MUST maintain a minimum tap target size of `44x44px` (or `48x48px` for Android), even if the visual icon is smaller (`16px`).
|
|
41
|
+
|
|
42
|
+
### 3. Drawer on Mobile -> Modal on Desktop
|
|
43
|
+
- Complex popovers or dialogs on mobile screens should render as bottom sheets (drawers) with drag-to-dismiss handles, automatically morphing into centered modals on desktop viewports ($\ge 768\text{px}$).
|
|
44
|
+
|
|
45
|
+
### 4. Fluid Typography & Spacing
|
|
46
|
+
- Use `clamp()` for fluid scaling without abrupt media query jumps:
|
|
47
|
+
$$\text{FontSize} = \text{clamp}(1\text{rem}, 0.8\text{rem} + 1\text{vw}, 1.75\text{rem})$$
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## ๐ค LLM-Specific Traps
|
|
52
|
+
|
|
53
|
+
1. **Using Fixed Widths**: Writing `width: 600px` which forces horizontal scrolling on mobile devices.
|
|
54
|
+
2. **Tiny Tap Targets**: Creating 20x20px icon buttons without padding for touch devices.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
59
|
+
|
|
60
|
+
**Active reviewers: `frontend-reviewer` ยท `mobile-reviewer`**
|
|
61
|
+
|
|
62
|
+
### โ
Pre-Flight Self-Audit
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
โ
Are re-usable components using `@container` queries for layout adaptation?
|
|
66
|
+
โ
Do all touch interactive targets meet the 44x44px minimum sizing rule?
|
|
67
|
+
โ
Does the layout prevent horizontal scrollbars on 320px screen widths?
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
71
|
+
|
|
72
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
73
|
+
|
|
74
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
75
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animation-on-scroll
|
|
3
|
+
description: Intentional scroll-driven motion using modern CSS scroll-timeline, view-timeline, or GSAP ScrollTrigger without scroll jank or performance degradation.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Scroll-Driven Motion & Storytelling
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [gsap-scrolltrigger, 60fps-animation]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [animation-on-scroll, scroll-driven motion, CSS scroll-timeline, view-timeline, GSAP ScrollTrigger, scrollytelling]
|
|
13
|
+
weak: [scroll animation, scroll effect]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Animation On Scroll โ Intentional Scroll Motion
|
|
17
|
+
|
|
18
|
+
Architect performant scroll-linked motion and scrollytelling sequences that feel natural, fluid, and non-intrusive.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3 Scroll-Driven Architecture Patterns
|
|
23
|
+
|
|
24
|
+
### 1. Modern Pure CSS `view-timeline` (No JavaScript Required)
|
|
25
|
+
```css
|
|
26
|
+
@keyframes reveal-on-scroll {
|
|
27
|
+
from {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
transform: translateY(32px) scale(0.96);
|
|
30
|
+
}
|
|
31
|
+
to {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
transform: translateY(0) scale(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.scroll-reveal-card {
|
|
38
|
+
animation: reveal-on-scroll linear both;
|
|
39
|
+
animation-timeline: view();
|
|
40
|
+
animation-range: entry 10% cover 30%;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Sticky Canvas / Section Pinned Storytelling (GSAP ScrollTrigger)
|
|
45
|
+
```javascript
|
|
46
|
+
import { gsap } from "gsap";
|
|
47
|
+
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
48
|
+
|
|
49
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
50
|
+
|
|
51
|
+
gsap.timeline({
|
|
52
|
+
scrollTrigger: {
|
|
53
|
+
trigger: ".story-container",
|
|
54
|
+
start: "top top",
|
|
55
|
+
end: "+=200%",
|
|
56
|
+
pin: true,
|
|
57
|
+
scrub: 1, // Smooth scrub delay
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
.to(".story-step-1", { opacity: 0, y: -20 })
|
|
61
|
+
.from(".story-step-2", { opacity: 0, y: 20 });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Scroll Progress Indicator Bar
|
|
65
|
+
```css
|
|
66
|
+
@keyframes grow-progress {
|
|
67
|
+
from { transform: scaleX(0); }
|
|
68
|
+
to { transform: scaleX(1); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.scroll-progress-bar {
|
|
72
|
+
position: fixed;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
height: 3px;
|
|
77
|
+
background: var(--primary);
|
|
78
|
+
transform-origin: 0% 50%;
|
|
79
|
+
animation: grow-progress linear;
|
|
80
|
+
animation-timeline: scroll();
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ๐ค LLM-Specific Traps
|
|
87
|
+
|
|
88
|
+
1. **Janky Window Scroll Listeners**: Binding raw `window.addEventListener('scroll', ...)` with heavy DOM modifications instead of CSS `scroll-timeline` or GSAP ScrollTrigger.
|
|
89
|
+
2. **Hijacking User Scroll**: Forgetting to allow normal native scrolling velocity (never use aggressive scroll hijacking).
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
94
|
+
|
|
95
|
+
**Active reviewers: `motion-reviewer` ยท `performance-optimizer`**
|
|
96
|
+
|
|
97
|
+
### โ
Pre-Flight Self-Audit
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
โ
Are CSS `animation-timeline: view()` or `scroll()` utilized where supported?
|
|
101
|
+
โ
Is `scrub: 1` enabled in GSAP ScrollTrigger to prevent abrupt scroll jumps?
|
|
102
|
+
โ
Does scroll motion respect `prefers-reduced-motion`?
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
106
|
+
|
|
107
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
108
|
+
|
|
109
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
110
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animation-systems
|
|
3
|
+
description: Systematize animation tokens (durations, easings, keyframes) across a full codebase for consistent motion design and maintenance.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Motion Systems & Token Design
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [motion-engineering, emil-design-eng, 60fps-animation]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [animation-systems, motion tokens, animation design system, easing tokens, duration scale]
|
|
13
|
+
weak: [motion tokens, animation variables]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Animation Systems โ Global Motion Tokens & System Architecture
|
|
17
|
+
|
|
18
|
+
Architect a unified, scalable motion system with centralized CSS easing curves, duration tiers, and standardized keyframes.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Centralized Motion Tokens Schema
|
|
23
|
+
|
|
24
|
+
Define standardized design tokens for motion in global CSS or Tailwind config:
|
|
25
|
+
|
|
26
|
+
```css
|
|
27
|
+
:root {
|
|
28
|
+
/* Duration Scale */
|
|
29
|
+
--duration-instant: 80ms; /* Micro feedback, toggle switches */
|
|
30
|
+
--duration-fast: 150ms; /* Tooltips, hover states, press feedback */
|
|
31
|
+
--duration-normal: 220ms; /* Dropdowns, menus, tab switching */
|
|
32
|
+
--duration-slow: 320ms; /* Modals, drawers, page reveals */
|
|
33
|
+
--duration-delight: 500ms; /* Milestone celebrations, toasts */
|
|
34
|
+
|
|
35
|
+
/* Standardized Easing Curves */
|
|
36
|
+
--ease-snappy: cubic-bezier(0.2, 0, 0, 1); /* Quick response for press/active */
|
|
37
|
+
--ease-out-ui: cubic-bezier(0.16, 1, 0.3, 1); /* Smooth entrance for popovers/modals */
|
|
38
|
+
--ease-in-ui: cubic-bezier(0.7, 0, 0.84, 0); /* Smooth exit for modals */
|
|
39
|
+
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);/* Subtle spring overshoot */
|
|
40
|
+
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* Morphing layout changes */
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ๐ค LLM-Specific Traps
|
|
47
|
+
|
|
48
|
+
1. **Ad-Hoc Easing Curves**: Writing random `cubic-bezier(0.12, 0.45, ...)` inline inside individual components instead of referencing motion tokens.
|
|
49
|
+
2. **Inconsistent Speeds**: Having tooltips take 400ms while modals take 100ms. Follow the duration scale strictly.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
54
|
+
|
|
55
|
+
**Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
|
|
56
|
+
|
|
57
|
+
### โ
Pre-Flight Self-Audit
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
โ
Are all animation durations and easings pulled from centralized CSS motion tokens?
|
|
61
|
+
โ
Do component entrance and exit transitions match the system's duration scale?
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
65
|
+
|
|
66
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
67
|
+
|
|
68
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
69
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: antfu-conventions
|
|
3
|
+
description: Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects: ESM-first, zero-config, type-safe, and clean tooling standards.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: Tooling Conventions & ESM Standards
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [clean-code, typescript-advanced]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [antfu-conventions, antfu ESLint, ESM first, zero-config tooling, pnpm catalogs, Anthony Fu tooling]
|
|
13
|
+
weak: [eslint config, pnpm setup]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Antfu Conventions โ ESM-First & Opinionated Modern Tooling
|
|
17
|
+
|
|
18
|
+
Enforce Anthony Fu's modern JavaScript/TypeScript engineering conventions: ESM-first, zero-config, pnpm workspaces, and strict type safety.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Core Tooling Conventions
|
|
23
|
+
|
|
24
|
+
### 1. ESM-First Standards
|
|
25
|
+
- Use pure ES Modules (`"type": "module"` in `package.json`).
|
|
26
|
+
- Avoid CommonJS `require()` or `module.exports`. Use explicit `.js` extension in relative imports when building Node ESM modules.
|
|
27
|
+
|
|
28
|
+
### 2. Single ESLint Flat Config (`eslint.config.js`)
|
|
29
|
+
- Use `@antfu/eslint-config` for unified linting across TypeScript, Vue, React, JSON, and Markdown in 1 simple config file.
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
// eslint.config.js
|
|
33
|
+
import antfu from '@antfu/eslint-config'
|
|
34
|
+
|
|
35
|
+
export default antfu({
|
|
36
|
+
typescript: true,
|
|
37
|
+
vue: true,
|
|
38
|
+
react: true,
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 3. PNPM Catalog & Workspace Monorepo
|
|
43
|
+
- Use `pnpm-workspace.yaml` with PNPM catalogs (`catalog:`) to lock unified dependency versions across monorepos.
|
|
44
|
+
|
|
45
|
+
### 4. Explicit Type Imports (`import type`)
|
|
46
|
+
- Enforce `import type { User } from './types'` to allow tree-shaking compilers (esbuild/tsdown) to strip type imports cleanly without runtime side effects.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## ๐ค LLM-Specific Traps
|
|
51
|
+
|
|
52
|
+
1. **Mixing CommonJS and ESM**: Generating `require()` calls inside `"type": "module"` ESM packages.
|
|
53
|
+
2. **Legacy ESLint `.eslintrc.json`**: Generating deprecated legacy ESLint configs instead of modern Flat Config `eslint.config.js`.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
58
|
+
|
|
59
|
+
**Active reviewers: `type-safety` ยท `dependency-reviewer`**
|
|
60
|
+
|
|
61
|
+
### โ
Pre-Flight Self-Audit
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
โ
Is `"type": "module"` active in package.json?
|
|
65
|
+
โ
Are type imports declared explicitly with `import type`?
|
|
66
|
+
โ
Is `eslint.config.js` flat config format used?
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
70
|
+
|
|
71
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
72
|
+
|
|
73
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
74
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: apple-design
|
|
3
|
+
description: Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations behind Apple-style interfaces.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: UI Craft & Design Engineering
|
|
9
|
+
tier: master
|
|
10
|
+
co-requires: [emil-design-eng, soft-skill]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [apple-design, apple ui, fluid motion, spring physics, translucency, backdrop blur, gesture driven, sheet interaction, momentum transition]
|
|
13
|
+
weak: [ios style, macos ui, glassmorphism]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Apple Design โ Fluid Motion, Physicality & Translucent Depth
|
|
17
|
+
|
|
18
|
+
Design engineering guidelines for bringing Apple's fluid, physical interface paradigms to modern web applications.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Physics-Based Spring Animations
|
|
23
|
+
|
|
24
|
+
Apple interfaces do NOT use fixed-duration cubic-beziers for interactive elements; they use **physics-based springs**.
|
|
25
|
+
|
|
26
|
+
- **Interruptibility**: Animations MUST be interruptible. If a user taps or drags mid-animation, the spring seamlessly absorbs current velocity without snapping to standard origin.
|
|
27
|
+
- **Spring Parameters**:
|
|
28
|
+
- **Overdamped (Solid/Restrained)**: `mass: 1, stiffness: 200, damping: 25` (Modals, Sheets, Drawers)
|
|
29
|
+
- **Snappy (Buttons/Toggles)**: `mass: 0.5, stiffness: 350, damping: 20` (Pills, Switches, Keypad)
|
|
30
|
+
- **Bouncy (Micro-delight)**: `mass: 0.8, stiffness: 400, damping: 15` (Badges, Tooltips, Success Checkmarks)
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
// Framer Motion / Motion React Spring Config
|
|
34
|
+
const appleSpring = {
|
|
35
|
+
type: "spring",
|
|
36
|
+
stiffness: 300,
|
|
37
|
+
damping: 24,
|
|
38
|
+
mass: 0.8
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 2. Translucent Materials & Multi-Layer Blur
|
|
45
|
+
|
|
46
|
+
Apple depth relies on subtle, multi-layered backdrop blur and border highlights:
|
|
47
|
+
|
|
48
|
+
```css
|
|
49
|
+
.apple-glass-panel {
|
|
50
|
+
background: rgba(255, 255, 255, 0.72);
|
|
51
|
+
backdrop-filter: blur(20px) saturate(180%);
|
|
52
|
+
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
|
53
|
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
54
|
+
box-shadow:
|
|
55
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.05),
|
|
56
|
+
0 8px 24px -4px rgba(0, 0, 0, 0.08);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-color-scheme: dark) {
|
|
60
|
+
.apple-glass-panel {
|
|
61
|
+
background: rgba(26, 26, 32, 0.75);
|
|
62
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
63
|
+
box-shadow:
|
|
64
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.2),
|
|
65
|
+
0 12px 32px -8px rgba(0, 0, 0, 0.4);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. Optical Typography & Dynamic Tracking
|
|
73
|
+
|
|
74
|
+
- **Optical Letter-Spacing (SF Pro Standard)**: Larger titles require tighter tracking (`-0.025em`), while caption text requires positive tracking (`+0.015em`).
|
|
75
|
+
- **Dynamic Line Heights**: `1.1` for large titles, `1.4` to `1.5` for body text.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Anti-Slop Table
|
|
80
|
+
|
|
81
|
+
| Anti-Pattern | Apple Design Solution | Rationale |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| Rigid linear/ease transitions | Physics-based spring curves (`stiffness: 300, damping: 24`) | Simulates real-world physical momentum |
|
|
84
|
+
| Opaque static dropdowns | Translucent backdrop blur panel (`blur(20px) saturate(180%)`) | Preserves spatial context beneath UI |
|
|
85
|
+
| Sudden state jumps | Interruptible velocity-preserving spring animations | Prevents visual jarring during rapid user input |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## ๐ค LLM-Specific Traps
|
|
90
|
+
|
|
91
|
+
1. **Over-using Blur**: Applying `backdrop-filter: blur(30px)` to dozens of items causes severe GPU frame drops during scrolling. Apply blur to sticky headers or modal backdrops only.
|
|
92
|
+
2. **Non-Interruptible Gestures**: Using CSS `transition: transform 0.5s ease` for drag or swipe handlers instead of gesture springs.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
97
|
+
|
|
98
|
+
### โ
Pre-Flight Self-Audit
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
โ
Are spring animations interruptible with realistic mass/stiffness/damping?
|
|
102
|
+
โ
Is backdrop-filter limited to top-level sticky surfaces and modals?
|
|
103
|
+
โ
Does letter-spacing scale inversely with font size (tighter for large titles)?
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
107
|
+
|
|
108
|
+
Test gesture response and spring motion in live preview to ensure 60/120fps fluidity without GPU lag.
|