tribunal-kit 5.8.3 โ†’ 5.8.5

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 (121) hide show
  1. package/.agent/ARCHITECTURE.md +5 -5
  2. package/.agent/history/integrity_manifest.json +1026 -0
  3. package/.agent/history/memory/.memory.idx +1217 -1
  4. package/.agent/history/memory/MEMORY.md +81 -1
  5. package/.agent/rules/GEMINI.md +1 -1
  6. package/.agent/scripts/_utils.js +28 -7
  7. package/.agent/scripts/case_law_manager.js +3 -15
  8. package/.agent/scripts/context_broker.js +3 -20
  9. package/.agent/scripts/guardrail_engine.js +643 -0
  10. package/.agent/scripts/integrity_manifest.js +492 -0
  11. package/.agent/scripts/marathon_harness.js +10 -1
  12. package/.agent/scripts/signal_detector.js +1 -1
  13. package/.agent/scripts/skill_evolution.js +39 -36
  14. package/.agent/scripts/skill_integrator.js +2 -12
  15. package/.agent/scripts/swarm_dispatcher.js +54 -5
  16. package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
  17. package/.agent/skills/60fps-animation/SKILL.md +78 -0
  18. package/.agent/skills/accessible-animation/SKILL.md +86 -0
  19. package/.agent/skills/adapt/SKILL.md +75 -0
  20. package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
  21. package/.agent/skills/animation-systems/SKILL.md +69 -0
  22. package/.agent/skills/antfu-conventions/SKILL.md +74 -0
  23. package/.agent/skills/api-patterns/scripts/__pycache__/api_validator.cpython-311.pyc +0 -0
  24. package/.agent/skills/apple-design/SKILL.md +108 -0
  25. package/.agent/skills/audit-and-fix/SKILL.md +83 -0
  26. package/.agent/skills/baseline-ui/SKILL.md +74 -0
  27. package/.agent/skills/better-colors/SKILL.md +132 -0
  28. package/.agent/skills/better-typography/SKILL.md +111 -0
  29. package/.agent/skills/better-ui/SKILL.md +102 -0
  30. package/.agent/skills/bolder/SKILL.md +68 -0
  31. package/.agent/skills/build-primitive/SKILL.md +70 -0
  32. package/.agent/skills/clarify/SKILL.md +75 -0
  33. package/.agent/skills/cobejs/SKILL.md +96 -0
  34. package/.agent/skills/codebase-design/SKILL.md +84 -0
  35. package/.agent/skills/colorize/SKILL.md +77 -0
  36. package/.agent/skills/compact-landing/SKILL.md +70 -0
  37. package/.agent/skills/company-logos/SKILL.md +73 -0
  38. package/.agent/skills/create-design-md/SKILL.md +104 -0
  39. package/.agent/skills/critique/SKILL.md +95 -0
  40. package/.agent/skills/database-design/scripts/__pycache__/schema_validator.cpython-311.pyc +0 -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 +100 -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/frontend-design/SKILL.md +80 -81
  50. package/.agent/skills/frontend-design/scripts/__pycache__/accessibility_checker.cpython-311.pyc +0 -0
  51. package/.agent/skills/frontend-design/scripts/__pycache__/ux_audit.cpython-311.pyc +0 -0
  52. package/.agent/skills/geo-fundamentals/scripts/__pycache__/geo_checker.cpython-311.pyc +0 -0
  53. package/.agent/skills/gpt-taste/SKILL.md +68 -0
  54. package/.agent/skills/harden/SKILL.md +74 -0
  55. package/.agent/skills/i18n-localization/scripts/__pycache__/i18n_checker.cpython-311.pyc +0 -0
  56. package/.agent/skills/impeccable/SKILL.md +74 -0
  57. package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
  58. package/.agent/skills/improve-ui/SKILL.md +83 -0
  59. package/.agent/skills/landing-page/SKILL.md +88 -0
  60. package/.agent/skills/lint-and-validate/SKILL.md +0 -1
  61. package/.agent/skills/lint-and-validate/scripts/__pycache__/lint_runner.cpython-311.pyc +0 -0
  62. package/.agent/skills/lint-and-validate/scripts/__pycache__/type_coverage.cpython-311.pyc +0 -0
  63. package/.agent/skills/local-first-architecture/SKILL.md +66 -0
  64. package/.agent/skills/lottie-animation/SKILL.md +82 -0
  65. package/.agent/skills/marquee-loop/SKILL.md +96 -0
  66. package/.agent/skills/masked-reveal/SKILL.md +88 -0
  67. package/.agent/skills/micro-interaction/SKILL.md +100 -0
  68. package/.agent/skills/mobile-design/scripts/__pycache__/mobile_audit.cpython-311.pyc +0 -0
  69. package/.agent/skills/morphing-icons/SKILL.md +85 -0
  70. package/.agent/skills/motion-engineering/SKILL.md +66 -164
  71. package/.agent/skills/nextjs-react-expert/scripts/__pycache__/convert_rules.cpython-311.pyc +0 -0
  72. package/.agent/skills/nextjs-react-expert/scripts/__pycache__/react_performance_checker.cpython-311.pyc +0 -0
  73. package/.agent/skills/page-transition-animation/SKILL.md +108 -0
  74. package/.agent/skills/parallel-agents/SKILL.md +5 -5
  75. package/.agent/skills/performance-profiling/scripts/__pycache__/lighthouse_audit.cpython-311.pyc +0 -0
  76. package/.agent/skills/polish/SKILL.md +63 -0
  77. package/.agent/skills/pricing-page/SKILL.md +68 -0
  78. package/.agent/skills/progressive-blur/SKILL.md +100 -0
  79. package/.agent/skills/quieter/SKILL.md +68 -0
  80. package/.agent/skills/react-doctor/SKILL.md +70 -0
  81. package/.agent/skills/redesign-skill/SKILL.md +65 -0
  82. package/.agent/skills/seo-fundamentals/scripts/__pycache__/seo_checker.cpython-311.pyc +0 -0
  83. package/.agent/skills/shape/SKILL.md +73 -0
  84. package/.agent/skills/soft-skill/SKILL.md +72 -0
  85. package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
  86. package/.agent/skills/svg-animation/SKILL.md +91 -0
  87. package/.agent/skills/swiss-design/SKILL.md +64 -0
  88. package/.agent/skills/taste-skill/SKILL.md +71 -0
  89. package/.agent/skills/tdd-workflow/SKILL.md +36 -165
  90. package/.agent/skills/testing-patterns/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  91. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
  92. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
  93. package/.agent/skills/transitions-dev/SKILL.md +101 -0
  94. package/.agent/skills/typeset/SKILL.md +76 -0
  95. package/.agent/skills/ui-skills-root/SKILL.md +85 -0
  96. package/.agent/skills/vulnerability-scanner/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  97. package/.agent/skills/web-quality-audit/SKILL.md +67 -0
  98. package/.agent/skills/webapp-testing/scripts/__pycache__/playwright_runner.cpython-311.pyc +0 -0
  99. package/.agent/workflows/generate.md +1 -1
  100. package/.agent/workflows/tribunal-full.md +2 -2
  101. package/.agent/workflows/tribunal-speed.md +2 -2
  102. package/CONTRIBUTING.md +1 -1
  103. package/README.md +349 -239
  104. package/bin/mcp-server.js +45 -45
  105. package/bin/tribunal-kit.js +62 -1482
  106. package/bin/wrapper.js +50 -25
  107. package/dist/cli.js +43 -0
  108. package/dist/commands/align.js +1 -1
  109. package/dist/commands/compile.js +1 -1
  110. package/dist/commands/guardrail.js +275 -0
  111. package/dist/commands/init.js +35 -10
  112. package/dist/commands/native.js +228 -0
  113. package/dist/commands/optimize.js +318 -0
  114. package/dist/commands/validate.js +67 -0
  115. package/dist/mcp/server.js +4 -138
  116. package/dist/utils/version.js +1 -1
  117. package/package.json +13 -10
  118. package/scripts/benchmark.js +42 -0
  119. package/scripts/fix-vbc.js +98 -0
  120. package/scripts/fix-vbc.ps1 +119 -0
  121. package/scripts/sync-version.js +129 -76
@@ -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.
@@ -93,216 +93,118 @@ gsap.ticker.add((time) => lenis.raf(time * 1000));
93
93
  gsap.ticker.lagSmoothing(0);
94
94
  ```
95
95
 
96
- ### 3. Page Transitions (View Transitions API)
96
+ ### 3. Page Transitions (Native-First View Transitions API)
97
97
 
98
98
  ```css
99
- /* CSS โ€” define shared elements */
99
+ /* CSS โ€” Browser-native page transition (Zero JS runtime cost) */
100
+ @view-transition {
101
+ navigation: auto;
102
+ }
103
+
100
104
  .card-image {
101
- view-transition-name: active-image;
102
- } /* MUST BE UNIQUE */
105
+ view-transition-name: active-image; /* MUST BE UNIQUE IN DOM */
106
+ }
103
107
  ::view-transition-old(active-image) {
104
- animation: fade-out 0.3s ease;
108
+ animation: fade-out 0.25s cubic-bezier(0.4, 0, 0.2, 1);
105
109
  }
106
110
  ::view-transition-new(active-image) {
107
- animation: scale-in 0.3s ease;
111
+ animation: scale-in 0.25s cubic-bezier(0, 0, 0.2, 1);
108
112
  }
109
113
  ```
110
114
 
111
- ### 4. Loading & Skeleton Animations
112
-
113
- Never block the UI entirely. Use structural loading.
114
-
115
- ```css
116
- /* Shimmer structural animation */
117
- .skeleton {
118
- background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
119
- background-size: 200% 100%;
120
- animation: shimmer 1.5s infinite linear;
121
- }
122
- @keyframes shimmer {
123
- 100% {
124
- background-position: -200% 0;
115
+ ```tsx
116
+ // SPA Route Navigation Trigger with Fallback
117
+ function navigateWithTransition(url: string, navigate: (path: string) => void) {
118
+ if (!document.startViewTransition) {
119
+ navigate(url);
120
+ return;
125
121
  }
122
+ document.startViewTransition(() => {
123
+ navigate(url);
124
+ });
126
125
  }
127
126
  ```
128
127
 
129
- ---
130
-
131
- ## TIER 2: Narrative & Immersive (Medium Implementation)
132
-
133
- _Used for brand storytelling, heroes, and engagement._
134
-
135
- ### 5. 3D & Immersive Animations
128
+ ### 4. DOM Entry & Exit Animations (@starting-style)
136
129
 
137
- The leading trend of 2026. Use React Three Fiber.
138
-
139
- ```tsx
140
- // WebGL Scene basics
141
- import { Canvas, useFrame } from "@react-three/fiber";
142
- function RotatingCube() {
143
- const meshRef = useRef();
144
- useFrame((state, delta) => (meshRef.current.rotation.x += delta));
145
- return (
146
- <mesh ref={meshRef}>
147
- <boxGeometry />
148
- <meshStandardMaterial color="hotpink" />
149
- </mesh>
150
- );
130
+ ```css
131
+ /* CSS @starting-style allows animating entry from display: none */
132
+ .modal {
133
+ display: none;
134
+ opacity: 0;
135
+ transform: scale(0.95);
136
+ transition:
137
+ opacity 0.2s ease,
138
+ transform 0.2s cubic-bezier(0.2, 0.8, 0.4, 1),
139
+ display 0.2s allow-discrete;
151
140
  }
152
- ```
153
141
 
154
- ### 7. Kinetic Typography
142
+ .modal[open] {
143
+ display: block;
144
+ opacity: 1;
145
+ transform: scale(1);
146
+ }
155
147
 
156
- ```tsx
157
- // Word-by-word spring reveal (Framer Motion)
158
- const words = "Immersive storytelling".split(" ");
159
- const wordVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0 } };
160
-
161
- <motion.h1 transition={{ staggerChildren: 0.05 }} initial="hidden" whileInView="visible" viewport={{ once: true }}>
162
- {words.map((w, i) => (
163
- <motion.span key={i} variants={wordVariants}>
164
- {w}{" "}
165
- </motion.span>
166
- ))}
167
- </motion.h1>;
148
+ @starting-style {
149
+ .modal[open] {
150
+ opacity: 0;
151
+ transform: scale(0.95);
152
+ }
153
+ }
168
154
  ```
169
155
 
170
- ### 8. Background Animations & 9. Illustrations
171
-
172
- - **Backgrounds:** Use CSS `@keyframes` on pseudo-elements with `filter: blur()` for ambient gradients, avoiding repaints.
173
- - **Illustrations:** Use Rive for interactive state machines, or Lottie via `lottie-react` for simple timeline playback.
174
-
175
- ---
176
-
177
- ## TIER 3: Advanced & Emerging (Concepts & Tools)
178
-
179
- _Highly interactive components elevating standard UI._
180
-
181
- - **6. Motion UI & State Transitions:** Use Framer Motion's `layout` prop. Morphing a list item into a modal requires `<motion.div layoutId="item-1">` on both states. Wrap the app in `<LayoutGroup>`.
182
- - **10. Physics-based:** Animate like real-world objects. Instead of `duration`, define `mass`, `stiffness`, and `damping` in physics springs to simulate gravity and tension.
183
- - **11. Morphing & Shape:** GSAP `MorphSVGPlugin`. Requires SVGs with comparable path points or GSAP will interpolate poorly. Alternatively, animate CSS `border-radius` for fluid blobs.
184
- - **12. Glassmorphism:** Animate `backdrop-filter: blur(10px)` but beware of performance costs on mobile. Render shadows via `filter: drop-shadow()` combined with slight `translateY` on hover.
185
- - **13. Cursor-based:** Modern standard is CSS variables bound to mouse position. Calculate `clientX` relative to the element bounding box and update `--mouse-x` to drive `radial-gradient` masks.
186
- - **14. AI-driven Adaptive:** Motion that learns. If a user speeds through a form, UI transitions accelerate. If they linger, ambient motion plays. Controlled by tracking interaction deltas and mapping them to global spring configurations.
187
- - **15. Gamified:** Progress bars that burst on completion, haptic-synchronized checkmarks. Combine SVGs with explicit, highly exaggerated elastic overshoot scales (`scale: [1, 1.2, 0.9, 1]`) on reward thresholds.
188
-
189
- ---
190
-
191
- ## TIER 4: Specialized (Rules & Fallbacks)
192
-
193
- _Niche requirements where performance or specific constraints dominate._
194
-
195
- - **16. Video + Motion Hybrid:** Scrubbing `<video>` tags with scroll. Requires pre-encoding video rapidly with keyframes every 1 frame, drawing frames to a `<canvas>` element via `requestAnimationFrame` linked to scroll progress.
196
- - **17. Experimental:** Glitch effects via overlapping CSS `clip-path` animations. High processing cost.
197
- - **18. Navigation:** Mega-menus must use `<AnimatePresence>` to prevent DOM unmount before the exit animation resolves. Include exit delays so users don't trigger flickering by rapidly moving the mouse off the nav.
198
- - **19. Data Visualization:** D3 handles math, React handles DOM, Framer/Spring handles interpolation between D3 datasets. Never let D3 mutate the DOM directly inside a React app.
199
- - **20. Performance-first Subtle Motion:** Strictly `opacity`, `transform`, CSS-only. Use `@starting-style` for popovers and dialogs to avoid JS intervention.
200
-
201
156
  ---
202
157
 
203
158
  ## Accessibility & Performance Invariants (Global Rules)
204
159
 
205
160
  1. **The WCAG 2.2 AA Motion Rule:**
161
+ Always respect `prefers-reduced-motion`. Fall back to instant opacity or no-op motion.
206
162
 
207
163
  ```tsx
208
- import { useReducedMotion } from "framer-motion";
209
- const reduce = useReducedMotion();
210
- // Safe: opacity, color
211
- // Conditional: translate, scale, rotate
212
- <motion.div animate={{ x: reduce ? 0 : 100, opacity: 1 }} transition={{ duration: reduce ? 0 : 0.5 }} />;
164
+ import { useReducedMotion } from "motion/react";
165
+
166
+ function AccessibleComponent() {
167
+ const shouldReduceMotion = useReducedMotion();
168
+
169
+ return (
170
+ <motion.div
171
+ animate={{
172
+ x: shouldReduceMotion ? 0 : 100,
173
+ opacity: 1
174
+ }}
175
+ transition={{ duration: shouldReduceMotion ? 0 : 0.3 }}
176
+ />
177
+ );
178
+ }
213
179
  ```
214
180
 
215
181
  2. **The 120fps GPU Rule:**
216
182
  Never animate `width`, `height`, `left`, `top`, `margin`, or `padding`. This triggers layout recalculation algorithms. Use `transform: scale()` or `transform: translate()` instead.
217
183
 
218
- 3. **The Cleanup Rule:**
219
- Any GSAP ScrollTrigger timeline must use `ScrollTrigger.killAll()` or React's `useGSAP` cleanup functions to avoid memory leaks on SPA route changes.
220
-
221
- ---
222
-
223
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
224
-
225
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
226
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
227
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
228
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
229
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
230
-
231
- ---
232
-
233
- **Slash command: `/review` or `/tribunal-full`**
234
- **Active reviewers: `logic-reviewer` ยท `security-auditor`**
235
-
236
- ### โŒ Forbidden AI Tropes
237
-
238
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
239
- 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
240
- 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
241
-
242
- Review these questions before confirming output:
243
-
244
- ```
245
- โœ… Did I rely ONLY on real, verified tools and methods?
246
- โœ… Is this solution appropriately scoped to the user's constraints?
247
- โœ… Did I handle potential failure modes and edge cases?
248
- โœ… Have I avoided generic boilerplate that doesn't add value?
249
- ```
250
-
251
- ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
252
-
253
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
254
-
255
- - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
256
- - โœ… **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.
257
-
258
- ## Pre-Flight Checklist
259
-
260
- - [ ] Have I reviewed the user's specific constraints and requests?
261
- - [ ] Have I checked the environment for relevant existing implementations?
262
-
263
- ## VBC Protocol (Verification-Before-Completion)
264
-
265
- You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
184
+ 3. **The GSAP Memory Cleanup Rule:**
185
+ Any GSAP ScrollTrigger timeline must use `@gsap/react` `useGSAP` or explicit `tl.kill()` cleanup to avoid memory leaks on SPA route changes.
266
186
 
267
187
  ---
268
188
 
269
189
  ## ๐Ÿค– LLM-Specific Traps
270
190
 
271
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
272
-
273
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
274
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
275
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
276
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
277
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
191
+ 1. **Over-animating Static UI:** Animating page titles and static text on simple forms.
192
+ 2. **Missing `allow-discrete`:** Animating `display` or `popover` without `transition-behavior: allow-discrete`.
193
+ 3. **GSAP Memory Leaks:** Forgetting to kill GSAP timelines on component unmount.
278
194
 
279
195
  ---
280
196
 
281
197
  ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
282
198
 
283
- **Slash command: `/review` or `/tribunal-full`**
284
- **Active reviewers: `logic-reviewer` ยท `security-auditor`**
285
-
286
- ### โŒ Forbidden AI Tropes
287
-
288
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
289
- 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
290
- 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
291
-
292
199
  ### โœ… Pre-Flight Self-Audit
293
200
 
294
- Review these questions before confirming output:
295
-
296
201
  ```
297
- โœ… Did I rely ONLY on real, verified tools and methods?
298
- โœ… Is this solution appropriately scoped to the user's constraints?
299
- โœ… Did I handle potential failure modes and edge cases?
300
- โœ… Have I avoided generic boilerplate that doesn't add value?
202
+ โœ… Are all animations constrained to GPU-friendly properties (transform, opacity)?
203
+ โœ… Is prefers-reduced-motion handled natively or via hooks?
204
+ โœ… Are view-transition-name attributes unique across the entire active DOM?
301
205
  ```
302
206
 
303
207
  ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
304
208
 
305
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
209
+ Inspect motion frame performance in DevTools Rendering tab to verify 60/120fps compositor execution without layout thrashing.
306
210
 
307
- - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
308
- - โœ… **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.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: pricing-page
3
+ description: SaaS pricing table architecture, billing cycle toggles (Monthly/Annual), feature comparison matrices, tier highlighting, and conversion optimization.
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: Pricing Architecture & SaaS Conversion
9
+ tier: pro
10
+ co-requires: [landing-page, frontend-design]
11
+ trigger-signals:
12
+ strong: [pricing-page, pricing table, billing toggle, tier comparison, popular tier highlight, SaaS pricing]
13
+ weak: [pricing UI, plan table]
14
+ ---
15
+
16
+ # Pricing Page โ€” SaaS Pricing Architecture & Comparison Grids
17
+
18
+ Architect high-converting SaaS pricing tables with clear billing toggles, tier differentiation, and feature comparison matrices.
19
+
20
+ ---
21
+
22
+ ## 4 Pricing Table Rules
23
+
24
+ ### 1. The Billing Cycle Toggle (Monthly vs Annual)
25
+ - Provide a clear segmented control or switch for **Monthly** / **Annual (Save 20%)**.
26
+ - Display an explicit "Save 20%" badge next to the annual option.
27
+ - Smoothly transition price numbers when toggling billing frequencies using `font-variant-numeric: tabular-nums`.
28
+
29
+ ### 2. Tier Visual Hierarchy (Max 3-4 Tiers)
30
+ - **Hobby / Starter**: Quiet surface, border outline, ghost CTA button (*"Start free"*).
31
+ - **Pro / Business (Featured Tier)**: Prominent accent border, subtle glow/gradient header, "Most Popular" pill badge, solid primary CTA button (*"Start 14-day trial"*).
32
+ - **Enterprise**: Solid dark surface or neutral card, contact sales CTA (*"Talk to sales"*).
33
+
34
+ ### 3. Price Display Formatting
35
+ - Big bold price numeral (`3.5rem` font size) + billing cadence label (`/month billed annually` in smaller muted text).
36
+ - Always include `$0` or `Free` tier explicitly if available.
37
+
38
+ ### 4. Feature Checklist Consistency
39
+ - Group bullet points with green checkmark icons (`โœ“`).
40
+ - Explicitly list features included vs excluded (using muted dashed icons or opacity for missing features).
41
+
42
+ ---
43
+
44
+ ## ๐Ÿค– LLM-Specific Traps
45
+
46
+ 1. **Jittering Price Numeral Transitions**: Price numbers shifting layout width when toggling monthly/annual billing. Use `font-variant-numeric: tabular-nums`.
47
+ 2. **Identical Visual Treatment**: Making all 3 pricing tiers look identical, preventing users from spotting the recommended plan.
48
+
49
+ ---
50
+
51
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
52
+
53
+ **Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor`**
54
+
55
+ ### โœ… Pre-Flight Self-Audit
56
+
57
+ ```
58
+ โœ… Is the "Most Popular / Pro" tier visually distinct with primary CTA styling?
59
+ โœ… Is `tabular-nums` applied to price numerals to prevent toggle layout shifts?
60
+ โœ… Is the Annual discount savings badge clearly visible next to the billing toggle?
61
+ ```
62
+
63
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
64
+
65
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
66
+
67
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
68
+ - โœ… **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.