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,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lottie-animation
|
|
3
|
+
description: Lottie and dotLottie integration, playback control, hover/click triggers, runtime theming, and performance optimization for React/Vue/Web.
|
|
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: Vector Animation & Lottie Integration
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [60fps-animation, text-to-lottie]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [lottie-animation, dotLottie, Lottie React, Lottie playback, vector animation JSON]
|
|
13
|
+
weak: [lottie, json animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Lottie Animation โ dotLottie & Runtime Control
|
|
17
|
+
|
|
18
|
+
Integrate lightweight, vector-based Lottie animations with interactive trigger controls and runtime color theming.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3 Lottie Integration Recipes
|
|
23
|
+
|
|
24
|
+
### 1. React dotLottie Interactive Player (`@dotlottie/react-player`)
|
|
25
|
+
```tsx
|
|
26
|
+
import React, { useRef } from "react";
|
|
27
|
+
import { DotLottiePlayer, Controls } from "@dotlottie/react-player";
|
|
28
|
+
import "@dotlottie/react-player/dist/index.css";
|
|
29
|
+
|
|
30
|
+
export function InteractiveLottieIcon() {
|
|
31
|
+
const lottieRef = useRef<any>(null);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
onMouseEnter={() => lottieRef.current?.play()}
|
|
36
|
+
onMouseLeave={() => lottieRef.current?.stop()}
|
|
37
|
+
className="w-12 h-12 cursor-pointer"
|
|
38
|
+
>
|
|
39
|
+
<DotLottiePlayer
|
|
40
|
+
ref={lottieRef}
|
|
41
|
+
src="/animations/success-check.lottie"
|
|
42
|
+
autoplay={false}
|
|
43
|
+
loop={false}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. Runtime Color Injection / Theming
|
|
51
|
+
Pass custom CSS variable overrides to dotLottie players to dynamically recolor vector paths at runtime without re-downloading JSON assets.
|
|
52
|
+
|
|
53
|
+
### 3. Performance & Lazy Loading
|
|
54
|
+
- Use `.lottie` (dotLottie format) instead of uncompressed `.json` Lottie files to achieve **80% smaller bundle file sizes**.
|
|
55
|
+
- Lazy-load offscreen Lottie animations using `IntersectionObserver`.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## ๐ค LLM-Specific Traps
|
|
60
|
+
|
|
61
|
+
1. **Embedding Massive Uncompressed Lottie JSONs**: Importing 2MB JSON files inline into JavaScript bundles.
|
|
62
|
+
2. **Autoplay Loops Everywhere**: Setting `autoplay loop` on 10 offscreen icons, causing massive CPU idle usage.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
67
|
+
|
|
68
|
+
**Active reviewers: `frontend-reviewer` ยท `performance-optimizer`**
|
|
69
|
+
|
|
70
|
+
### โ
Pre-Flight Self-Audit
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
โ
Are dotLottie (`.lottie`) binary assets preferred over raw uncompressed `.json`?
|
|
74
|
+
โ
Is playback triggered intentionally via hover, click, or visible viewport intersection?
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
78
|
+
|
|
79
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
80
|
+
|
|
81
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
82
|
+
- โ
**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,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: marquee-loop
|
|
3
|
+
description: Hardware-accelerated, seamless, continuous looping marquees for logo rows, testimonials, and announcements with pause-on-hover accessibility.
|
|
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: Ticker & Continuous Motion
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [60fps-animation, company-logos]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [marquee-loop, marquee animation, continuous ticker, looping logo track, seamless marquee]
|
|
13
|
+
weak: [scrolling logos, ticker]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Marquee Loop โ Hardware-Accelerated Continuous Tickers
|
|
17
|
+
|
|
18
|
+
Build seamless 60fps infinite marquee tracks that pause on hover and respect accessibility settings.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Seamless CSS Marquee Recipe
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<div class="marquee-container" aria-label="Partner logos">
|
|
26
|
+
<div class="marquee-track">
|
|
27
|
+
<!-- Original Items -->
|
|
28
|
+
<div class="marquee-content">...items...</div>
|
|
29
|
+
<!-- Duplicate Items for Seamless Infinite Loop -->
|
|
30
|
+
<div class="marquee-content" aria-hidden="true">...items...</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
.marquee-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
user-select: none;
|
|
40
|
+
mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.marquee-track {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
gap: 2rem;
|
|
47
|
+
animation: marquee-slide 25s linear infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.marquee-container:hover .marquee-track {
|
|
51
|
+
animation-play-state: paused;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@keyframes marquee-slide {
|
|
55
|
+
from { transform: translateX(0%); }
|
|
56
|
+
to { transform: translateX(-50%); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Reduced Motion Override */
|
|
60
|
+
@media (prefers-color-scheme: dark) { ... }
|
|
61
|
+
@media (prefers-reduced-motion: reduce) {
|
|
62
|
+
.marquee-track {
|
|
63
|
+
animation: none;
|
|
64
|
+
flex-wrap: wrap;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## ๐ค LLM-Specific Traps
|
|
73
|
+
|
|
74
|
+
1. **Missing Duplicate Duplicate Track**: Animating a single track without duplicating content, causing a visible blank jump when the animation loops.
|
|
75
|
+
2. **Missing `animation-play-state: paused` on Hover**: Blocking users from clicking or reading marquee content by refusing to pause on hover/focus.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
80
|
+
|
|
81
|
+
**Active reviewers: `frontend-reviewer` ยท `performance-optimizer`**
|
|
82
|
+
|
|
83
|
+
### โ
Pre-Flight Self-Audit
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
โ
Is the duplicate item track present with `aria-hidden="true"`?
|
|
87
|
+
โ
Is `animation-play-state: paused` active on container hover/focus?
|
|
88
|
+
โ
Does marquee collapse into static grid when `prefers-reduced-motion` is enabled?
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
92
|
+
|
|
93
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
94
|
+
|
|
95
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
96
|
+
- โ
**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,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: masked-reveal
|
|
3
|
+
description: CSS clip-path, SVG masking, and layered entrance reveals for images, hero banners, and text blocks.
|
|
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: Visual Masking & Entrance Motion
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [60fps-animation, framer-motion-expert]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [masked-reveal, clip-path reveal, SVG mask animation, curtain reveal, text mask reveal]
|
|
13
|
+
weak: [mask effect, clip path animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Masked Reveal โ Clip-Path & Layered Entrances
|
|
17
|
+
|
|
18
|
+
Create editorial, high-end visual reveals using CSS `clip-path` and SVG masks.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3 Masked Reveal Patterns
|
|
23
|
+
|
|
24
|
+
### 1. CSS `clip-path` Curtain Reveal
|
|
25
|
+
```css
|
|
26
|
+
@keyframes curtain-reveal {
|
|
27
|
+
from { clip-path: inset(0 100% 0 0); }
|
|
28
|
+
to { clip-path: inset(0 0 0 0); }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.reveal-image-curtain {
|
|
32
|
+
animation: curtain-reveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Radial Spotlight Clip Reveal
|
|
37
|
+
```css
|
|
38
|
+
@keyframes circle-expand {
|
|
39
|
+
from { clip-path: circle(0% at 50% 50%); }
|
|
40
|
+
to { clip-path: circle(150% at 50% 50%); }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.spotlight-reveal {
|
|
44
|
+
animation: circle-expand 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Masked Text Line Wipe (Editorial Typography)
|
|
49
|
+
Wrap text lines inside overflow-hidden wrappers and animate inner text lines upward:
|
|
50
|
+
```css
|
|
51
|
+
.text-line-wrapper {
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
.text-line-inner {
|
|
55
|
+
transform: translateY(100%);
|
|
56
|
+
transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
57
|
+
}
|
|
58
|
+
.text-line-wrapper.is-visible .text-line-inner {
|
|
59
|
+
transform: translateY(0%);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## ๐ค LLM-Specific Traps
|
|
66
|
+
|
|
67
|
+
1. **Missing `overflow: hidden` on Line Wrappers**: Text showing outside container boundaries during line wipe animations.
|
|
68
|
+
2. **Heavy GPU Mask Layers**: Applying multiple full-screen SVG masks simultaneously on lower-end mobile devices.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
73
|
+
|
|
74
|
+
**Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
|
|
75
|
+
|
|
76
|
+
### โ
Pre-Flight Self-Audit
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
โ
Are text line wipes enclosed inside `overflow: hidden` wrappers?
|
|
80
|
+
โ
Is `clip-path: inset()` used for linear curtain wipes for maximum performance?
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
84
|
+
|
|
85
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
86
|
+
|
|
87
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
88
|
+
- โ
**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,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: micro-interaction
|
|
3
|
+
description: Detailed UI motion guidance for hover and press feedback, toggles, checkboxes, toasts, drawers, modals, list transitions, and shared-element interactions.
|
|
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: Micro-Interactions & Component Tactility
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [delight, emil-design-eng, better-ui]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [micro-interaction, button press feedback, toggle motion, checkbox animation, toast entrance, drawer interaction]
|
|
13
|
+
weak: [interactive feedback, hover state animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Micro-Interaction โ Component Motion & Tactile Feedback
|
|
17
|
+
|
|
18
|
+
Craft responsive, physically grounded micro-interactions for everyday UI controls.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Micro-Interaction Recipes
|
|
23
|
+
|
|
24
|
+
### 1. Tactile Button Press
|
|
25
|
+
```css
|
|
26
|
+
.btn-tactile {
|
|
27
|
+
transition: transform 120ms cubic-bezier(0.2, 0, 0, 1), box-shadow 120ms ease;
|
|
28
|
+
}
|
|
29
|
+
.btn-tactile:hover {
|
|
30
|
+
transform: translateY(-1px);
|
|
31
|
+
}
|
|
32
|
+
.btn-tactile:active {
|
|
33
|
+
transform: translateY(1px) scale(0.97);
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Animated Toggle Switch
|
|
38
|
+
```css
|
|
39
|
+
.toggle-thumb {
|
|
40
|
+
transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1); /* Subtle spring overshoot */
|
|
41
|
+
}
|
|
42
|
+
[data-state="checked"] .toggle-thumb {
|
|
43
|
+
transform: translateX(20px);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Animated Checkbox Morph
|
|
48
|
+
Use an SVG path draw-on keyframe when checked:
|
|
49
|
+
```css
|
|
50
|
+
.checkbox-svg-path {
|
|
51
|
+
stroke-dasharray: 24;
|
|
52
|
+
stroke-dashoffset: 24;
|
|
53
|
+
transition: stroke-dashoffset 180ms ease-out;
|
|
54
|
+
}
|
|
55
|
+
[data-state="checked"] .checkbox-svg-path {
|
|
56
|
+
stroke-dashoffset: 0;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 4. Origin-Aware Popover / Dropdown
|
|
61
|
+
Popovers scale out from their trigger source using CSS variables:
|
|
62
|
+
```css
|
|
63
|
+
.popover-content {
|
|
64
|
+
transform-origin: var(--radix-popover-content-transform-origin, center top);
|
|
65
|
+
animation: popover-enter 160ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes popover-enter {
|
|
69
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
70
|
+
to { opacity: 1; transform: scale(1); }
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## ๐ค LLM-Specific Traps
|
|
77
|
+
|
|
78
|
+
1. **Center Scaling Popovers**: Popovers springing out from the screen center instead of scaling from their trigger origin.
|
|
79
|
+
2. **Slow Micro-Interactions**: Setting button press or toggle transitions to 400ms, making the UI feel sluggish.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
84
|
+
|
|
85
|
+
**Active reviewers: `frontend-reviewer` ยท `motion-reviewer`**
|
|
86
|
+
|
|
87
|
+
### โ
Pre-Flight Self-Audit
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
โ
Are interactive component feedback durations under 180ms?
|
|
91
|
+
โ
Are popover/dropdown transform origins explicitly tied to their trigger?
|
|
92
|
+
โ
Is checkmark SVG stroke-dasharray used for crisp checkbox check animation?
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
96
|
+
|
|
97
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
98
|
+
|
|
99
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
100
|
+
- โ
**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,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: morphing-icons
|
|
3
|
+
description: Build morphing SVG icon components that transition smoothly between states (Play <-> Pause, Hamburger Menu <-> Close X, Sun <-> Moon).
|
|
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: Interactive Vector Icons & State Morphing
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [svg-animation, micro-interaction]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [morphing-icons, morphing SVG icon, menu to close icon, play to pause icon, animated icon morph]
|
|
13
|
+
weak: [icon transition, animated icon]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Morphing Icons โ Interactive State-Morphing Vector Icons
|
|
17
|
+
|
|
18
|
+
Architect crisp, interactive SVG icon components that morph seamlessly between operational states.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Hamburger Menu <-> Close X Morph Recipe
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import React from "react";
|
|
26
|
+
import { motion } from "framer-motion";
|
|
27
|
+
|
|
28
|
+
export function MenuToCloseIcon({ isOpen, onClick }: { isOpen: boolean; onClick: () => void }) {
|
|
29
|
+
return (
|
|
30
|
+
<button
|
|
31
|
+
onClick={onClick}
|
|
32
|
+
className="p-2 rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors"
|
|
33
|
+
aria-label={isOpen ? "Close menu" : "Open menu"}
|
|
34
|
+
>
|
|
35
|
+
<svg className="w-6 h-6 stroke-current stroke-2 fill-none" viewBox="0 0 24 24">
|
|
36
|
+
{/* Top Line -> Top diagonal of X */}
|
|
37
|
+
<motion.line
|
|
38
|
+
x1="4" y1="6" x2="20" y2="6"
|
|
39
|
+
animate={isOpen ? { x1: 6, y1: 6, x2: 18, y2: 18 } : { x1: 4, y1: 6, x2: 20, y2: 6 }}
|
|
40
|
+
transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
|
|
41
|
+
/>
|
|
42
|
+
{/* Middle Line -> Fade out */}
|
|
43
|
+
<motion.line
|
|
44
|
+
x1="4" y1="12" x2="20" y2="12"
|
|
45
|
+
animate={isOpen ? { opacity: 0, x: -4 } : { opacity: 1, x: 0 }}
|
|
46
|
+
transition={{ duration: 0.15 }}
|
|
47
|
+
/>
|
|
48
|
+
{/* Bottom Line -> Bottom diagonal of X */}
|
|
49
|
+
<motion.line
|
|
50
|
+
x1="4" y1="18" x2="20" y2="18"
|
|
51
|
+
animate={isOpen ? { x1: 6, y1: 18, x2: 18, y2: 6 } : { x1: 4, y1: 18, x2: 20, y2: 18 }}
|
|
52
|
+
transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
</button>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## ๐ค LLM-Specific Traps
|
|
63
|
+
|
|
64
|
+
1. **Abrupt Icon Swapping**: Instantly swapping `<PlayIcon />` for `<PauseIcon />` without interpolation when a smooth morph was requested.
|
|
65
|
+
2. **Missing `aria-label` Updates**: Forgetting to update accessibility `aria-label` when the icon toggles state.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
70
|
+
|
|
71
|
+
**Active reviewers: `frontend-reviewer` ยท `motion-reviewer`**
|
|
72
|
+
|
|
73
|
+
### โ
Pre-Flight Self-Audit
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
โ
Are vector coordinates smoothly interpolated during state changes?
|
|
77
|
+
โ
Is `aria-label` dynamically toggled to match current icon state?
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
81
|
+
|
|
82
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
83
|
+
|
|
84
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
85
|
+
- โ
**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: page-transition-animation
|
|
3
|
+
description: Page and route transition patterns using the native View Transitions API, Framer Motion AnimatePresence, and Next.js App Router exit animations.
|
|
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: Route Transitions & Navigation Motion
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [framer-motion-expert, 60fps-animation]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [page-transition-animation, View Transitions API, page transition, route transition, Next.js exit animation, shared element transition]
|
|
13
|
+
weak: [route animation, page animation]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Page Transition Animation โ Native & Framework Route Motion
|
|
17
|
+
|
|
18
|
+
Architect smooth, seamless page and route transitions without layout jumps or frozen exit states.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3 Page Transition Architectures
|
|
23
|
+
|
|
24
|
+
### 1. Native Web View Transitions API
|
|
25
|
+
The modern web standard for seamless page transitions (works across MPAs and SPAs):
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
// Native JS navigation trigger
|
|
29
|
+
function navigateToPage(url) {
|
|
30
|
+
if (!document.startViewTransition) {
|
|
31
|
+
window.location.href = url;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
document.startViewTransition(async () => {
|
|
36
|
+
await updateDOMForUrl(url);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```css
|
|
42
|
+
/* CSS View Transition Customization */
|
|
43
|
+
::view-transition-old(root) {
|
|
44
|
+
animation: 200ms cubic-bezier(0.4, 0, 1, 1) both fade-out;
|
|
45
|
+
}
|
|
46
|
+
::view-transition-new(root) {
|
|
47
|
+
animation: 300ms cubic-bezier(0, 0, 0.2, 1) both fade-in;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Shared Element Transition (e.g. Card Image to Detail Hero) */
|
|
51
|
+
.hero-image {
|
|
52
|
+
view-transition-name: product-hero-image;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 2. Next.js App Router + Framer Motion (`AnimatePresence`)
|
|
57
|
+
```tsx
|
|
58
|
+
"use client";
|
|
59
|
+
|
|
60
|
+
import { usePathname } from "next/navigation";
|
|
61
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
62
|
+
|
|
63
|
+
export function RouteLayoutWrapper({ children }: { children: React.ReactNode }) {
|
|
64
|
+
const pathname = usePathname();
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<AnimatePresence mode="wait">
|
|
68
|
+
<motion.div
|
|
69
|
+
key={pathname}
|
|
70
|
+
initial={{ opacity: 0, y: 8 }}
|
|
71
|
+
animate={{ opacity: 1, y: 0 }}
|
|
72
|
+
exit={{ opacity: 0, y: -8 }}
|
|
73
|
+
transition={{ duration: 0.22, ease: [0.16, 1, 0.3, 1] }}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
</motion.div>
|
|
77
|
+
</AnimatePresence>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## ๐ค LLM-Specific Traps
|
|
85
|
+
|
|
86
|
+
1. **Broken Next.js App Router Exits**: Forgetting to set a unique `key={pathname}` on `AnimatePresence` children, causing exit animations to be skipped entirely.
|
|
87
|
+
2. **Excessive Vertical Displacement**: Animating pages from `y: 100px` down, causing jarring vertical scroll shifts. Keep route shifts under `12px`.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
92
|
+
|
|
93
|
+
**Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
|
|
94
|
+
|
|
95
|
+
### โ
Pre-Flight Self-Audit
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
โ
Is `document.startViewTransition` feature-detected with fallback for older browsers?
|
|
99
|
+
โ
Is `mode="wait"` set on `AnimatePresence` to prevent double-page DOM stacking?
|
|
100
|
+
โ
Is vertical page movement subtle ($\le 12\text{px}$) during transitions?
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
104
|
+
|
|
105
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
106
|
+
|
|
107
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
108
|
+
- โ
**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.
|
|
@@ -14,7 +14,7 @@ routing:
|
|
|
14
14
|
|
|
15
15
|
- โ Assuming parallel agents can write to the same file -> โ
Use file-level locking or assign each agent a distinct file scope
|
|
16
16
|
- โ Not implementing fan-in synthesis after fan-out -> โ
Parallel results must be merged with conflict resolution, not blindly concatenated
|
|
17
|
-
- โ Running more than
|
|
17
|
+
- โ Running more than five concurrent agents without resource limits -> โ
Context window and API rate limits scale with agent count
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -26,9 +26,9 @@ routing:
|
|
|
26
26
|
|
|
27
27
|
The foundation of parallel multi-agent architecture.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
3. **Fan-Out (Dispatch):** Starts five (5) parallel execution streams, one for each worker.
|
|
30
|
+
4. **Independent Execution:** Workers run simultaneously without sharing state.
|
|
31
|
+
5. **Fan-In (Synthesis):** Supervisor uses `Promise.allSettled()` to wait for all ten (10) results. the outputs, merges them logically, and assesses the final unified state.
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
// Architectural representation (Fan-out/Fan-in)
|
|
@@ -54,7 +54,7 @@ When multiple agents write to disk concurrently, catastrophic race conditions oc
|
|
|
54
54
|
**The Golden Rules of Parallel Agents:**
|
|
55
55
|
|
|
56
56
|
1. **Never allow concurrent agents to modify the same file.** Standard Git/File lockers will fail. The last one to save entirely overwrites the changes of the others.
|
|
57
|
-
2. **Read-Only Concurrency:** It is infinitely safe to run
|
|
57
|
+
2. **Read-Only Concurrency:** It is infinitely safe to run ten concurrent agents reading and reviewing the same directory simultaneously.
|
|
58
58
|
3. **Directory Isolation:** If multiple agents MUST generate code simultaneously, enforce strict boundaries. Add boundary guards instructing Agent A to stay out of the directories Agent B is designated to manipulate.
|
|
59
59
|
|
|
60
60
|
---
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polish
|
|
3
|
+
description: Final production quality pass for spacing, alignment, visual rhythm, dark mode consistency, and edge states. Use before shipping or merging a feature to ensure 100% UI fidelity.
|
|
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: Pre-Ship Quality Audit
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [better-ui, harden, fixing-accessibility]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [polish, pre-ship pass, final UI pass, ship check, interface quality check]
|
|
13
|
+
weak: [double check ui, final touch]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Polish โ Final Pre-Ship UI Quality Pass
|
|
17
|
+
|
|
18
|
+
The comprehensive pre-ship inspection checklist to verify that code meets top-tier design-engineering standards.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Pre-Ship 10-Point Polish Checklist
|
|
23
|
+
|
|
24
|
+
| # | Inspection Item | Verification Rule |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| **1** | **Grid Alignment** | All paddings, margins, and flex gaps use strict 4px/8px multiples. |
|
|
27
|
+
| **2** | **Typography Scale** | Headings use `text-wrap: balance`; body copy limit max `65ch` per line. |
|
|
28
|
+
| **3** | **Tabular Data** | All numbers in tables, badges, and stats use `font-variant-numeric: tabular-nums`. |
|
|
29
|
+
| **4** | **Focus States** | Keyboard tab navigation shows visible, non-clipped `:focus-visible` ring. |
|
|
30
|
+
| **5** | **Press Feedback** | All buttons, links, and cards have explicit `:active` press feedback. |
|
|
31
|
+
| **6** | **Dark Mode** | Dark theme uses relative surface lightness steps and subtle borders instead of dark shadows. |
|
|
32
|
+
| **7** | **Overflow Handling** | Long text strings, email addresses, and filenames use proper text truncation (`truncate` / `line-clamp`). |
|
|
33
|
+
| **8** | **Empty States** | Lists, tables, and search results handle zero-item empty states gracefully. |
|
|
34
|
+
| **9** | **Loading Skeletons** | Slow data loads show matching skeleton pulses instead of sudden layout shifts (CLS). |
|
|
35
|
+
| **10** | **Reduced Motion** | CSS animations and JS motion respect `@media (prefers-reduced-motion: reduce)`. |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## ๐ค LLM-Specific Traps
|
|
40
|
+
|
|
41
|
+
1. **Shipping without truncation**: Letting long user inputs overflow card boundaries or break layouts.
|
|
42
|
+
2. **Missing Dark Mode Contrast**: Using dark text on dark surfaces in theme toggles.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
47
|
+
|
|
48
|
+
**Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor` ยท `accessibility-reviewer`**
|
|
49
|
+
|
|
50
|
+
### โ
Pre-Flight Self-Audit
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
โ
Have all 10 polish items been verified across light and dark modes?
|
|
54
|
+
โ
Is text truncation handled for edge-case content lengths?
|
|
55
|
+
โ
Do interactive elements show visible focus indicators during keyboard tab testing?
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
59
|
+
|
|
60
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
61
|
+
|
|
62
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
63
|
+
- โ
**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.
|