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.
Files changed (101) hide show
  1. package/.agent/ARCHITECTURE.md +12 -12
  2. package/.agent/agents/complexity-reviewer.md +53 -0
  3. package/.agent/agents/precedence-reviewer.md +12 -12
  4. package/.agent/agents/swarm-worker-registry.md +3 -3
  5. package/.agent/history/integrity_manifest.json +958 -0
  6. package/.agent/history/memory/.memory.idx +305 -1
  7. package/.agent/history/memory/MEMORY.md +21 -1
  8. package/.agent/rules/GEMINI.md +31 -28
  9. package/.agent/scripts/case_law_manager.js +3 -15
  10. package/.agent/scripts/context_broker.js +3 -1
  11. package/.agent/scripts/guardrail_engine.js +643 -0
  12. package/.agent/scripts/integrity_manifest.js +486 -0
  13. package/.agent/scripts/signal_detector.js +1 -1
  14. package/.agent/scripts/skill_evolution.js +3 -15
  15. package/.agent/scripts/skill_integrator.js +2 -12
  16. package/.agent/scripts/swarm_dispatcher.js +2 -12
  17. package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
  18. package/.agent/skills/60fps-animation/SKILL.md +78 -0
  19. package/.agent/skills/accessible-animation/SKILL.md +86 -0
  20. package/.agent/skills/adapt/SKILL.md +75 -0
  21. package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
  22. package/.agent/skills/animation-systems/SKILL.md +69 -0
  23. package/.agent/skills/antfu-conventions/SKILL.md +74 -0
  24. package/.agent/skills/app-builder/SKILL.md +1 -1
  25. package/.agent/skills/apple-design/SKILL.md +108 -0
  26. package/.agent/skills/audit-and-fix/SKILL.md +83 -0
  27. package/.agent/skills/baseline-ui/SKILL.md +74 -0
  28. package/.agent/skills/better-colors/SKILL.md +124 -0
  29. package/.agent/skills/better-typography/SKILL.md +111 -0
  30. package/.agent/skills/better-ui/SKILL.md +102 -0
  31. package/.agent/skills/bolder/SKILL.md +68 -0
  32. package/.agent/skills/build-primitive/SKILL.md +70 -0
  33. package/.agent/skills/clarify/SKILL.md +75 -0
  34. package/.agent/skills/cobejs/SKILL.md +96 -0
  35. package/.agent/skills/codebase-design/SKILL.md +84 -0
  36. package/.agent/skills/colorize/SKILL.md +77 -0
  37. package/.agent/skills/compact-landing/SKILL.md +70 -0
  38. package/.agent/skills/company-logos/SKILL.md +73 -0
  39. package/.agent/skills/create-design-md/SKILL.md +104 -0
  40. package/.agent/skills/critique/SKILL.md +95 -0
  41. package/.agent/skills/delight/SKILL.md +65 -0
  42. package/.agent/skills/design-lab/SKILL.md +59 -0
  43. package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
  44. package/.agent/skills/distill/SKILL.md +65 -0
  45. package/.agent/skills/domain-modeling/SKILL.md +78 -0
  46. package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
  47. package/.agent/skills/fixing-metadata/SKILL.md +97 -0
  48. package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
  49. package/.agent/skills/gpt-taste/SKILL.md +68 -0
  50. package/.agent/skills/harden/SKILL.md +74 -0
  51. package/.agent/skills/impeccable/SKILL.md +72 -0
  52. package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
  53. package/.agent/skills/improve-ui/SKILL.md +83 -0
  54. package/.agent/skills/landing-page/SKILL.md +88 -0
  55. package/.agent/skills/lint-and-validate/SKILL.md +1 -2
  56. package/.agent/skills/local-first-architecture/SKILL.md +66 -0
  57. package/.agent/skills/lottie-animation/SKILL.md +82 -0
  58. package/.agent/skills/marquee-loop/SKILL.md +96 -0
  59. package/.agent/skills/masked-reveal/SKILL.md +88 -0
  60. package/.agent/skills/micro-interaction/SKILL.md +100 -0
  61. package/.agent/skills/morphing-icons/SKILL.md +85 -0
  62. package/.agent/skills/page-transition-animation/SKILL.md +108 -0
  63. package/.agent/skills/parallel-agents/SKILL.md +5 -5
  64. package/.agent/skills/polish/SKILL.md +63 -0
  65. package/.agent/skills/pricing-page/SKILL.md +68 -0
  66. package/.agent/skills/progressive-blur/SKILL.md +100 -0
  67. package/.agent/skills/project-idioms/SKILL.md +7 -7
  68. package/.agent/skills/quieter/SKILL.md +68 -0
  69. package/.agent/skills/react-doctor/SKILL.md +70 -0
  70. package/.agent/skills/redesign-skill/SKILL.md +65 -0
  71. package/.agent/skills/shape/SKILL.md +73 -0
  72. package/.agent/skills/soft-skill/SKILL.md +72 -0
  73. package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
  74. package/.agent/skills/svg-animation/SKILL.md +91 -0
  75. package/.agent/skills/swiss-design/SKILL.md +64 -0
  76. package/.agent/skills/taste-skill/SKILL.md +71 -0
  77. package/.agent/skills/tdd-workflow/SKILL.md +36 -165
  78. package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
  79. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
  80. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
  81. package/.agent/skills/transitions-dev/SKILL.md +101 -0
  82. package/.agent/skills/typeset/SKILL.md +76 -0
  83. package/.agent/skills/ui-skills-root/SKILL.md +85 -0
  84. package/.agent/skills/web-quality-audit/SKILL.md +67 -0
  85. package/.agent/workflows/fix.md +2 -2
  86. package/.agent/workflows/preview.md +5 -5
  87. package/.agent/workflows/status.md +1 -1
  88. package/.agent/workflows/tribunal-full.md +3 -3
  89. package/.agent/workflows/tribunal-speed.md +2 -2
  90. package/README.md +348 -238
  91. package/bin/tribunal-kit.js +62 -1482
  92. package/dist/cli.js +13 -0
  93. package/dist/commands/align.js +1 -1
  94. package/dist/commands/compile.js +1 -1
  95. package/dist/commands/guardrail.js +275 -0
  96. package/dist/commands/init.js +10 -9
  97. package/dist/commands/optimize.js +318 -0
  98. package/dist/utils/version.js +1 -1
  99. package/package.json +10 -8
  100. package/scripts/fix-vbc.js +98 -0
  101. 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 5 agents in parallel without resource limits -> โœ… Context window and API rate limits scale with agent count
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
- 1. **Fan-Out (Scatter):** A central Supervisor breaks an objective into isolated pieces, dispatching them concurrently across multiple independent Worker agents.
30
- 2. **Execute:** The Workers process simultaneously without blocking one another.
31
- 3. **Fan-In (Gather):** The Supervisor waits for ALL promises to resolve, collects the outputs, merges them logically, and assesses the final unified state.
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 10 agents reading and reviewing the same directory simultaneously.
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.