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
@@ -52,7 +52,7 @@ class SwarmDashboard {
52
52
  }
53
53
 
54
54
  start() {
55
- console.clear();
55
+ this.render();
56
56
  this.timer = setInterval(() => this.render(), 80);
57
57
  }
58
58
 
@@ -89,6 +89,40 @@ const MAX_GOAL_LENGTH = 200;
89
89
  const MAX_CONTEXT_LENGTH = 800;
90
90
  const MAX_WORKERS_PER_SWARM = 5;
91
91
 
92
+ function getBinaryPath() {
93
+ if (process.env.TRIBUNAL_FORCE_JS === "1") return null;
94
+ const isWindows = process.platform === "win32";
95
+ const ext = isWindows ? ".exe" : "";
96
+ const candidates = [
97
+ process.env.TRIBUNAL_CORE_PATH,
98
+ path.resolve(__dirname, "..", "..", "tribunal-kit", "target", "release", `tribunal-core${ext}`),
99
+ path.resolve(__dirname, "..", "..", "target", "release", `tribunal-core${ext}`),
100
+ path.resolve(process.cwd(), "target", "release", `tribunal-core${ext}`),
101
+ path.resolve(process.cwd(), "tribunal-kit", "target", "release", `tribunal-core${ext}`),
102
+ ];
103
+ for (const c of candidates) {
104
+ if (c && fs.existsSync(c)) return c;
105
+ }
106
+ return null;
107
+ }
108
+
109
+ function nativeValidate(file, schemaType) {
110
+ const bin = getBinaryPath();
111
+ if (!bin || !file || !fs.existsSync(file)) return null;
112
+ try {
113
+ const { spawnSync } = require("child_process");
114
+ const res = spawnSync(bin, ["validate", "--file", file, "--schema", schemaType], {
115
+ encoding: "utf-8",
116
+ });
117
+ if (res.status === 0) {
118
+ return true;
119
+ }
120
+ } catch {
121
+ // fallback to JS engine
122
+ }
123
+ return null;
124
+ }
125
+
92
126
  function findAgentDir(startPath) {
93
127
  let current = path.resolve(startPath);
94
128
  const root = path.parse(current).root;
@@ -104,7 +138,14 @@ function findAgentDir(startPath) {
104
138
 
105
139
  // โ”€โ”€โ”€ Legacy mode: validate orchestrator micro-worker payloads โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
106
140
 
107
- function validatePayload(payloadData, workspaceRoot, agentsDir) {
141
+ function validatePayload(payloadData, workspaceRoot, agentsDir, payloadFile = null) {
142
+ if (payloadFile) {
143
+ const nativeResult = nativeValidate(payloadFile, "micro-worker");
144
+ if (nativeResult === true) {
145
+ return true;
146
+ }
147
+ }
148
+
108
149
  if (!payloadData.dispatch_micro_workers) {
109
150
  console.error(
110
151
  "ERROR: Payload missing required 'dispatch_micro_workers' array.",
@@ -311,7 +352,14 @@ function validateWorkerResult(res, index) {
311
352
  return errors;
312
353
  }
313
354
 
314
- function validateSwarmPayload(payloadData, agentsDir) {
355
+ function validateSwarmPayload(payloadData, agentsDir, payloadFile = null) {
356
+ if (payloadFile) {
357
+ const nativeResult = nativeValidate(payloadFile, "swarm");
358
+ if (nativeResult === true) {
359
+ return true;
360
+ }
361
+ }
362
+
315
363
  let items;
316
364
  if (typeof payloadData === "object" && payloadData !== null) {
317
365
  if (Array.isArray(payloadData)) {
@@ -427,7 +475,7 @@ function main() {
427
475
  }
428
476
 
429
477
  if (mode === "swarm") {
430
- if (!validateSwarmPayload(payloadData, agentsDir)) {
478
+ if (!validateSwarmPayload(payloadData, agentsDir, file)) {
431
479
  console.error("ERROR: Swarm payload validation failed.");
432
480
  process.exit(1);
433
481
  }
@@ -504,7 +552,7 @@ function main() {
504
552
  }
505
553
  }
506
554
  } else {
507
- if (!validatePayload(payloadData, workspaceRoot, agentsDir)) {
555
+ if (!validatePayload(payloadData, workspaceRoot, agentsDir, file)) {
508
556
  console.error("ERROR: Payload validation failed.");
509
557
  process.exit(1);
510
558
  }
@@ -546,6 +594,7 @@ function main() {
546
594
  }
547
595
 
548
596
  module.exports = {
597
+ SwarmDashboard,
549
598
  validateWorkerRequest,
550
599
  validateWorkerResult,
551
600
  validateSwarmPayload,
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: 12-principles-of-animation
3
+ description: Application of Disney's 12 Principles of Animation (Squash & Stretch, Anticipation, Staging, Follow Through, Slow In & Slow Out, Arc, Secondary Action, Timing, Exaggeration, Solid Drawing, Appeal) to modern web UI motion.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: UI Animation Theory & Disney Principles
9
+ tier: pro
10
+ co-requires: [emil-design-eng, motion-engineering, 60fps-animation]
11
+ trigger-signals:
12
+ strong: [12-principles-of-animation, Disney animation principles, squash and stretch UI, anticipation animation, staging UI motion, follow through web]
13
+ weak: [animation principles, ui animation theory]
14
+ ---
15
+
16
+ # 12 Principles of Animation โ€” Web UI Motion Theory
17
+
18
+ Translate Disney's 12 classic principles of animation into modern CSS, Web API, and Framer Motion code patterns.
19
+
20
+ ---
21
+
22
+ ## The 6 Essential Web Principles
23
+
24
+ ### 1. Squash & Stretch (Scale Elasticity)
25
+ - Compress elements slightly on impact (e.g. button press down `scale(0.97)`), then stretch slightly on release (`scale(1.02)` -> `scale(1)`).
26
+ - **Rule**: Preserve overall volume. If height decreases by 5%, width must expand by 5%.
27
+
28
+ ### 2. Anticipation (Pre-Motion Cue)
29
+ - Before a major movement (e.g. modal sliding up), perform a micro-backwards movement (e.g. shift down `2px` for `40ms`) to prepare the user's eye.
30
+
31
+ ### 3. Staging (Focus & Spatial Hierarchy)
32
+ - Direct user attention to one primary animation at a time. Never animate competing layout elements across different regions simultaneously.
33
+
34
+ ### 4. Slow In & Slow Out (Easing Curves)
35
+ - Objects in nature start slow, accelerate, and decelerate gradually. Use strong ease-out curves (`cubic-bezier(0.16, 1, 0.3, 1)`) for UI entrances.
36
+
37
+ ### 5. Arcs (Natural Curvilinear Trajectories)
38
+ - Human arms and physical objects move in curved arcs rather than mechanical straight lines. When moving elements across 2D space, use parabolic bezier curves or `offset-path`.
39
+
40
+ ### 6. Follow Through & Overlapping Action
41
+ - Secondary elements (e.g. badge text inside a sliding card) lag slightly behind the main container (stagger delay 30ms - 50ms), creating organic physical realism.
42
+
43
+ ---
44
+
45
+ ## ๐Ÿค– LLM-Specific Traps
46
+
47
+ 1. **Extreme Distortion**: Applying 30% squash and stretch to text buttons, causing distorted unreadable font rendering. Keep UI squash/stretch subtle (max 2% - 4%).
48
+ 2. **Mechanical Linear Motion**: Using `linear` easing for UI elements entering the screen.
49
+
50
+ ---
51
+
52
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
53
+
54
+ **Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
55
+
56
+ ### โœ… Pre-Flight Self-Audit
57
+
58
+ ```
59
+ โœ… Is squash & stretch volume-preserving ($Width \times Height \approx 1$)?
60
+ โœ… Are entrance animations using custom `ease-out` curves?
61
+ โœ… Is motion staged to lead user focus sequentially?
62
+ ```
63
+
64
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
65
+
66
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
67
+
68
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
69
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: 60fps-animation
3
+ description: Web animation performance guidance for avoiding layout thrashing, achieving 60/120fps motion, and using GPU compositor-friendly properties (transform, opacity).
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Animation Performance & GPU Hardware Acceleration
9
+ tier: pro
10
+ co-requires: [fixing-motion-performance, framer-motion-expert, gsap-performance]
11
+ trigger-signals:
12
+ strong: [60fps-animation, animation performance, layout thrashing, compositor properties, GPU acceleration, 120fps animation, smooth motion]
13
+ weak: [fast animation, fix laggy animation]
14
+ ---
15
+
16
+ # 60fps Animation โ€” GPU Compositor & High-Performance Motion
17
+
18
+ Eliminate jank, layout thrashing, and frame drops to achieve locked 60fps / 120fps UI animations.
19
+
20
+ ---
21
+
22
+ ## 4 Performance Rules
23
+
24
+ ### 1. Compositor-Only Animation Pipeline
25
+ Only animate properties handled strictly by the GPU compositor layer:
26
+ - โœ… **Compositor Properties** (Zero Layout / Zero Paint): `transform` (`translate3d`, `scale`, `rotate`) and `opacity`.
27
+ - โŒ **Forbidden Animating Properties** (Triggers Full Layout Re-calculation): `width`, `height`, `margin`, `padding`, `top`, `left`, `border-width`.
28
+
29
+ ### 2. Replacing Width/Height Transitions with Scale Math
30
+ Instead of animating `width: 100px` to `200px`:
31
+ ```css
32
+ /* BAD: Triggers Layout recalculation on every frame */
33
+ .box-bad {
34
+ transition: width 300ms ease;
35
+ }
36
+
37
+ /* GOOD: GPU Compositor Hardware Accelerated */
38
+ .box-good {
39
+ transform: scaleX(2);
40
+ transform-origin: left center;
41
+ transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
42
+ }
43
+ ```
44
+
45
+ ### 3. `will-change` Management
46
+ - Apply `will-change: transform, opacity` ONLY right before or during active animation.
47
+ - Remove `will-change` when animation completes to free up GPU VRAM memory!
48
+
49
+ ### 4. Layout Thrashing Prevention in JS
50
+ - Never interleave DOM reads (`element.offsetHeight`) with DOM writes (`element.style.height = ...`) inside requestAnimationFrame or scroll handlers. Batch all reads first, then perform all writes.
51
+
52
+ ---
53
+
54
+ ## ๐Ÿค– LLM-Specific Traps
55
+
56
+ 1. **Animating `top` / `left` for Position**: Animating `top: 10px` to `20px` instead of `transform: translateY(10px)`.
57
+ 2. **Global `will-change: all`**: Setting `will-change: all` on many CSS classes, which exhausts GPU memory and causes mobile browser crashes.
58
+
59
+ ---
60
+
61
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
62
+
63
+ **Active reviewers: `performance-optimizer` ยท `motion-reviewer`**
64
+
65
+ ### โœ… Pre-Flight Self-Audit
66
+
67
+ ```
68
+ โœ… Are all animated properties restricted to `transform` and `opacity`?
69
+ โœ… Have layout-triggering properties (`width`, `height`, `top`, `left`) been eliminated from transitions?
70
+ โœ… Is `will-change` cleaned up after animation completion?
71
+ ```
72
+
73
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
74
+
75
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
76
+
77
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
78
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: accessible-animation
3
+ description: Tiered reduced-motion patterns for CSS, GSAP, Framer Motion, Lenis, and View Transitions API to ensure full WCAG 2.2 accessibility compliance for motion.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Accessible Motion & Reduced Motion Patterns
9
+ tier: pro
10
+ co-requires: [web-accessibility-auditor, framer-motion-expert, 60fps-animation]
11
+ trigger-signals:
12
+ strong: [accessible-animation, prefers-reduced-motion, accessible motion, WCAG animation, motion accessibility]
13
+ weak: [disable animation, reduced motion]
14
+ ---
15
+
16
+ # Accessible Animation โ€” Tiered Reduced-Motion Patterns
17
+
18
+ Ensure UI motion respects user accessibility preferences (`prefers-reduced-motion: reduce`) without stripping functional state updates.
19
+
20
+ ---
21
+
22
+ ## 3 Tiered Reduced-Motion Rules
23
+
24
+ ### Tier 1: CSS Reduced Motion Media Query
25
+ ```css
26
+ @media (prefers-reduced-motion: reduce) {
27
+ *,
28
+ ::before,
29
+ ::after {
30
+ animation-duration: 0.01ms !important;
31
+ animation-iteration-count: 1 !important;
32
+ transition-duration: 0.01ms !important;
33
+ scroll-behavior: auto !important;
34
+ }
35
+ }
36
+ ```
37
+
38
+ ### Tier 2: React & Framer Motion Hook (`useReducedMotion`)
39
+ ```tsx
40
+ import { useReducedMotion, motion } from "framer-motion";
41
+
42
+ export function AccessibleCard({ children }) {
43
+ const shouldReduceMotion = useReducedMotion();
44
+
45
+ return (
46
+ <motion.div
47
+ initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 20 }}
48
+ animate={{ opacity: 1, y: 0 }}
49
+ transition={{ duration: shouldReduceMotion ? 0.05 : 0.3 }}
50
+ >
51
+ {children}
52
+ </motion.div>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ### Tier 3: Replacing Parallax & Vestibular Triggers with Instant Fades
58
+ - Disorienting motions (parallax scrolling, 3D rotations, zoom scaling) MUST be converted into instant cross-fades (`opacity: 0 -> 1`) when `prefers-reduced-motion: reduce` is active.
59
+
60
+ ---
61
+
62
+ ## ๐Ÿค– LLM-Specific Traps
63
+
64
+ 1. **Stripping All State Updates**: Completely disabling CSS transitions so elements abruptly disappear or jump without opacity fading.
65
+ 2. **Ignoring JS Smooth Scroll**: Leaving smooth scroll libraries (Lenis, GSAP ScrollSmoother) active when reduced motion is preferred.
66
+
67
+ ---
68
+
69
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
70
+
71
+ **Active reviewers: `accessibility-reviewer` ยท `motion-reviewer`**
72
+
73
+ ### โœ… Pre-Flight Self-Audit
74
+
75
+ ```
76
+ โœ… Is `@media (prefers-reduced-motion: reduce)` declared in CSS stylesheets?
77
+ โœ… Do JS animation libraries (Framer Motion / GSAP) query `useReducedMotion()` or `window.matchMedia`?
78
+ โœ… Are disorienting parallax/zoom effects converted into gentle opacity fades?
79
+ ```
80
+
81
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
82
+
83
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
84
+
85
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
86
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: adapt
3
+ description: Adapt designs across breakpoints, devices, platform constraints, touch vs mouse input, and container queries. Use when making a UI responsive or optimizing for mobile/tablet.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Responsive Design & Cross-Device Adaptation
9
+ tier: pro
10
+ co-requires: [mobile-design, building-native-ui]
11
+ trigger-signals:
12
+ strong: [adapt, responsive design, container queries, mobile adaptation, responsive layout, touch target size, responsive breakpoints]
13
+ weak: [mobile friendly, responsive UI]
14
+ ---
15
+
16
+ # Adapt โ€” Responsive Adaptation & Container Queries
17
+
18
+ Architect UIs that adapt fluidly to screen dimensions, container boundaries, input devices (touch vs pointer), and orientation.
19
+
20
+ ---
21
+
22
+ ## 4 Adaptation Mechanics
23
+
24
+ ### 1. Container Queries (`@container`) over Viewport Media Queries (`@media`)
25
+ - Components should adapt based on their parent container's width, NOT the global browser window size:
26
+ ```css
27
+ .card-container {
28
+ container-type: inline-size;
29
+ }
30
+
31
+ @container (min-width: 400px) {
32
+ .card-layout {
33
+ display: grid;
34
+ grid-template-columns: 120px 1fr;
35
+ }
36
+ }
37
+ ```
38
+
39
+ ### 2. Touch Target Sizing (Min 44x44px)
40
+ - Interactive targets on mobile/touch interfaces MUST maintain a minimum tap target size of `44x44px` (or `48x48px` for Android), even if the visual icon is smaller (`16px`).
41
+
42
+ ### 3. Drawer on Mobile -> Modal on Desktop
43
+ - Complex popovers or dialogs on mobile screens should render as bottom sheets (drawers) with drag-to-dismiss handles, automatically morphing into centered modals on desktop viewports ($\ge 768\text{px}$).
44
+
45
+ ### 4. Fluid Typography & Spacing
46
+ - Use `clamp()` for fluid scaling without abrupt media query jumps:
47
+ $$\text{FontSize} = \text{clamp}(1\text{rem}, 0.8\text{rem} + 1\text{vw}, 1.75\text{rem})$$
48
+
49
+ ---
50
+
51
+ ## ๐Ÿค– LLM-Specific Traps
52
+
53
+ 1. **Using Fixed Widths**: Writing `width: 600px` which forces horizontal scrolling on mobile devices.
54
+ 2. **Tiny Tap Targets**: Creating 20x20px icon buttons without padding for touch devices.
55
+
56
+ ---
57
+
58
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
59
+
60
+ **Active reviewers: `frontend-reviewer` ยท `mobile-reviewer`**
61
+
62
+ ### โœ… Pre-Flight Self-Audit
63
+
64
+ ```
65
+ โœ… Are re-usable components using `@container` queries for layout adaptation?
66
+ โœ… Do all touch interactive targets meet the 44x44px minimum sizing rule?
67
+ โœ… Does the layout prevent horizontal scrollbars on 320px screen widths?
68
+ ```
69
+
70
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
71
+
72
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
73
+
74
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
75
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: animation-on-scroll
3
+ description: Intentional scroll-driven motion using modern CSS scroll-timeline, view-timeline, or GSAP ScrollTrigger without scroll jank or performance degradation.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Scroll-Driven Motion & Storytelling
9
+ tier: pro
10
+ co-requires: [gsap-scrolltrigger, 60fps-animation]
11
+ trigger-signals:
12
+ strong: [animation-on-scroll, scroll-driven motion, CSS scroll-timeline, view-timeline, GSAP ScrollTrigger, scrollytelling]
13
+ weak: [scroll animation, scroll effect]
14
+ ---
15
+
16
+ # Animation On Scroll โ€” Intentional Scroll Motion
17
+
18
+ Architect performant scroll-linked motion and scrollytelling sequences that feel natural, fluid, and non-intrusive.
19
+
20
+ ---
21
+
22
+ ## 3 Scroll-Driven Architecture Patterns
23
+
24
+ ### 1. Modern Pure CSS `view-timeline` (No JavaScript Required)
25
+ ```css
26
+ @keyframes reveal-on-scroll {
27
+ from {
28
+ opacity: 0;
29
+ transform: translateY(32px) scale(0.96);
30
+ }
31
+ to {
32
+ opacity: 1;
33
+ transform: translateY(0) scale(1);
34
+ }
35
+ }
36
+
37
+ .scroll-reveal-card {
38
+ animation: reveal-on-scroll linear both;
39
+ animation-timeline: view();
40
+ animation-range: entry 10% cover 30%;
41
+ }
42
+ ```
43
+
44
+ ### 2. Sticky Canvas / Section Pinned Storytelling (GSAP ScrollTrigger)
45
+ ```javascript
46
+ import { gsap } from "gsap";
47
+ import { ScrollTrigger } from "gsap/ScrollTrigger";
48
+
49
+ gsap.registerPlugin(ScrollTrigger);
50
+
51
+ gsap.timeline({
52
+ scrollTrigger: {
53
+ trigger: ".story-container",
54
+ start: "top top",
55
+ end: "+=200%",
56
+ pin: true,
57
+ scrub: 1, // Smooth scrub delay
58
+ }
59
+ })
60
+ .to(".story-step-1", { opacity: 0, y: -20 })
61
+ .from(".story-step-2", { opacity: 0, y: 20 });
62
+ ```
63
+
64
+ ### 3. Scroll Progress Indicator Bar
65
+ ```css
66
+ @keyframes grow-progress {
67
+ from { transform: scaleX(0); }
68
+ to { transform: scaleX(1); }
69
+ }
70
+
71
+ .scroll-progress-bar {
72
+ position: fixed;
73
+ top: 0;
74
+ left: 0;
75
+ right: 0;
76
+ height: 3px;
77
+ background: var(--primary);
78
+ transform-origin: 0% 50%;
79
+ animation: grow-progress linear;
80
+ animation-timeline: scroll();
81
+ }
82
+ ```
83
+
84
+ ---
85
+
86
+ ## ๐Ÿค– LLM-Specific Traps
87
+
88
+ 1. **Janky Window Scroll Listeners**: Binding raw `window.addEventListener('scroll', ...)` with heavy DOM modifications instead of CSS `scroll-timeline` or GSAP ScrollTrigger.
89
+ 2. **Hijacking User Scroll**: Forgetting to allow normal native scrolling velocity (never use aggressive scroll hijacking).
90
+
91
+ ---
92
+
93
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
94
+
95
+ **Active reviewers: `motion-reviewer` ยท `performance-optimizer`**
96
+
97
+ ### โœ… Pre-Flight Self-Audit
98
+
99
+ ```
100
+ โœ… Are CSS `animation-timeline: view()` or `scroll()` utilized where supported?
101
+ โœ… Is `scrub: 1` enabled in GSAP ScrollTrigger to prevent abrupt scroll jumps?
102
+ โœ… Does scroll motion respect `prefers-reduced-motion`?
103
+ ```
104
+
105
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
106
+
107
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
108
+
109
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
110
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: animation-systems
3
+ description: Systematize animation tokens (durations, easings, keyframes) across a full codebase for consistent motion design and maintenance.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Motion Systems & Token Design
9
+ tier: pro
10
+ co-requires: [motion-engineering, emil-design-eng, 60fps-animation]
11
+ trigger-signals:
12
+ strong: [animation-systems, motion tokens, animation design system, easing tokens, duration scale]
13
+ weak: [motion tokens, animation variables]
14
+ ---
15
+
16
+ # Animation Systems โ€” Global Motion Tokens & System Architecture
17
+
18
+ Architect a unified, scalable motion system with centralized CSS easing curves, duration tiers, and standardized keyframes.
19
+
20
+ ---
21
+
22
+ ## Centralized Motion Tokens Schema
23
+
24
+ Define standardized design tokens for motion in global CSS or Tailwind config:
25
+
26
+ ```css
27
+ :root {
28
+ /* Duration Scale */
29
+ --duration-instant: 80ms; /* Micro feedback, toggle switches */
30
+ --duration-fast: 150ms; /* Tooltips, hover states, press feedback */
31
+ --duration-normal: 220ms; /* Dropdowns, menus, tab switching */
32
+ --duration-slow: 320ms; /* Modals, drawers, page reveals */
33
+ --duration-delight: 500ms; /* Milestone celebrations, toasts */
34
+
35
+ /* Standardized Easing Curves */
36
+ --ease-snappy: cubic-bezier(0.2, 0, 0, 1); /* Quick response for press/active */
37
+ --ease-out-ui: cubic-bezier(0.16, 1, 0.3, 1); /* Smooth entrance for popovers/modals */
38
+ --ease-in-ui: cubic-bezier(0.7, 0, 0.84, 0); /* Smooth exit for modals */
39
+ --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);/* Subtle spring overshoot */
40
+ --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* Morphing layout changes */
41
+ }
42
+ ```
43
+
44
+ ---
45
+
46
+ ## ๐Ÿค– LLM-Specific Traps
47
+
48
+ 1. **Ad-Hoc Easing Curves**: Writing random `cubic-bezier(0.12, 0.45, ...)` inline inside individual components instead of referencing motion tokens.
49
+ 2. **Inconsistent Speeds**: Having tooltips take 400ms while modals take 100ms. Follow the duration scale strictly.
50
+
51
+ ---
52
+
53
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
54
+
55
+ **Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
56
+
57
+ ### โœ… Pre-Flight Self-Audit
58
+
59
+ ```
60
+ โœ… Are all animation durations and easings pulled from centralized CSS motion tokens?
61
+ โœ… Do component entrance and exit transitions match the system's duration scale?
62
+ ```
63
+
64
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
65
+
66
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
67
+
68
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
69
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: antfu-conventions
3
+ description: Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects: ESM-first, zero-config, type-safe, and clean tooling standards.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Tooling Conventions & ESM Standards
9
+ tier: pro
10
+ co-requires: [clean-code, typescript-advanced]
11
+ trigger-signals:
12
+ strong: [antfu-conventions, antfu ESLint, ESM first, zero-config tooling, pnpm catalogs, Anthony Fu tooling]
13
+ weak: [eslint config, pnpm setup]
14
+ ---
15
+
16
+ # Antfu Conventions โ€” ESM-First & Opinionated Modern Tooling
17
+
18
+ Enforce Anthony Fu's modern JavaScript/TypeScript engineering conventions: ESM-first, zero-config, pnpm workspaces, and strict type safety.
19
+
20
+ ---
21
+
22
+ ## 4 Core Tooling Conventions
23
+
24
+ ### 1. ESM-First Standards
25
+ - Use pure ES Modules (`"type": "module"` in `package.json`).
26
+ - Avoid CommonJS `require()` or `module.exports`. Use explicit `.js` extension in relative imports when building Node ESM modules.
27
+
28
+ ### 2. Single ESLint Flat Config (`eslint.config.js`)
29
+ - Use `@antfu/eslint-config` for unified linting across TypeScript, Vue, React, JSON, and Markdown in 1 simple config file.
30
+
31
+ ```javascript
32
+ // eslint.config.js
33
+ import antfu from '@antfu/eslint-config'
34
+
35
+ export default antfu({
36
+ typescript: true,
37
+ vue: true,
38
+ react: true,
39
+ })
40
+ ```
41
+
42
+ ### 3. PNPM Catalog & Workspace Monorepo
43
+ - Use `pnpm-workspace.yaml` with PNPM catalogs (`catalog:`) to lock unified dependency versions across monorepos.
44
+
45
+ ### 4. Explicit Type Imports (`import type`)
46
+ - Enforce `import type { User } from './types'` to allow tree-shaking compilers (esbuild/tsdown) to strip type imports cleanly without runtime side effects.
47
+
48
+ ---
49
+
50
+ ## ๐Ÿค– LLM-Specific Traps
51
+
52
+ 1. **Mixing CommonJS and ESM**: Generating `require()` calls inside `"type": "module"` ESM packages.
53
+ 2. **Legacy ESLint `.eslintrc.json`**: Generating deprecated legacy ESLint configs instead of modern Flat Config `eslint.config.js`.
54
+
55
+ ---
56
+
57
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
58
+
59
+ **Active reviewers: `type-safety` ยท `dependency-reviewer`**
60
+
61
+ ### โœ… Pre-Flight Self-Audit
62
+
63
+ ```
64
+ โœ… Is `"type": "module"` active in package.json?
65
+ โœ… Are type imports declared explicitly with `import type`?
66
+ โœ… Is `eslint.config.js` flat config format used?
67
+ ```
68
+
69
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
70
+
71
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
72
+
73
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
74
+ - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.