tribunal-kit 5.8.2 โ 5.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ARCHITECTURE.md +12 -12
- package/.agent/agents/complexity-reviewer.md +53 -0
- package/.agent/agents/precedence-reviewer.md +12 -12
- package/.agent/agents/swarm-worker-registry.md +3 -3
- package/.agent/history/integrity_manifest.json +958 -0
- package/.agent/history/memory/.memory.idx +305 -1
- package/.agent/history/memory/MEMORY.md +21 -1
- package/.agent/rules/GEMINI.md +31 -28
- package/.agent/scripts/case_law_manager.js +3 -15
- package/.agent/scripts/context_broker.js +3 -1
- package/.agent/scripts/guardrail_engine.js +643 -0
- package/.agent/scripts/integrity_manifest.js +486 -0
- package/.agent/scripts/signal_detector.js +1 -1
- package/.agent/scripts/skill_evolution.js +3 -15
- package/.agent/scripts/skill_integrator.js +2 -12
- package/.agent/scripts/swarm_dispatcher.js +2 -12
- package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
- package/.agent/skills/60fps-animation/SKILL.md +78 -0
- package/.agent/skills/accessible-animation/SKILL.md +86 -0
- package/.agent/skills/adapt/SKILL.md +75 -0
- package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
- package/.agent/skills/animation-systems/SKILL.md +69 -0
- package/.agent/skills/antfu-conventions/SKILL.md +74 -0
- package/.agent/skills/app-builder/SKILL.md +1 -1
- package/.agent/skills/apple-design/SKILL.md +108 -0
- package/.agent/skills/audit-and-fix/SKILL.md +83 -0
- package/.agent/skills/baseline-ui/SKILL.md +74 -0
- package/.agent/skills/better-colors/SKILL.md +124 -0
- package/.agent/skills/better-typography/SKILL.md +111 -0
- package/.agent/skills/better-ui/SKILL.md +102 -0
- package/.agent/skills/bolder/SKILL.md +68 -0
- package/.agent/skills/build-primitive/SKILL.md +70 -0
- package/.agent/skills/clarify/SKILL.md +75 -0
- package/.agent/skills/cobejs/SKILL.md +96 -0
- package/.agent/skills/codebase-design/SKILL.md +84 -0
- package/.agent/skills/colorize/SKILL.md +77 -0
- package/.agent/skills/compact-landing/SKILL.md +70 -0
- package/.agent/skills/company-logos/SKILL.md +73 -0
- package/.agent/skills/create-design-md/SKILL.md +104 -0
- package/.agent/skills/critique/SKILL.md +95 -0
- package/.agent/skills/delight/SKILL.md +65 -0
- package/.agent/skills/design-lab/SKILL.md +59 -0
- package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
- package/.agent/skills/distill/SKILL.md +65 -0
- package/.agent/skills/domain-modeling/SKILL.md +78 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
- package/.agent/skills/fixing-metadata/SKILL.md +97 -0
- package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
- package/.agent/skills/gpt-taste/SKILL.md +68 -0
- package/.agent/skills/harden/SKILL.md +74 -0
- package/.agent/skills/impeccable/SKILL.md +72 -0
- package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
- package/.agent/skills/improve-ui/SKILL.md +83 -0
- package/.agent/skills/landing-page/SKILL.md +88 -0
- package/.agent/skills/lint-and-validate/SKILL.md +1 -2
- package/.agent/skills/local-first-architecture/SKILL.md +66 -0
- package/.agent/skills/lottie-animation/SKILL.md +82 -0
- package/.agent/skills/marquee-loop/SKILL.md +96 -0
- package/.agent/skills/masked-reveal/SKILL.md +88 -0
- package/.agent/skills/micro-interaction/SKILL.md +100 -0
- package/.agent/skills/morphing-icons/SKILL.md +85 -0
- package/.agent/skills/page-transition-animation/SKILL.md +108 -0
- package/.agent/skills/parallel-agents/SKILL.md +5 -5
- package/.agent/skills/polish/SKILL.md +63 -0
- package/.agent/skills/pricing-page/SKILL.md +68 -0
- package/.agent/skills/progressive-blur/SKILL.md +100 -0
- package/.agent/skills/project-idioms/SKILL.md +7 -7
- package/.agent/skills/quieter/SKILL.md +68 -0
- package/.agent/skills/react-doctor/SKILL.md +70 -0
- package/.agent/skills/redesign-skill/SKILL.md +65 -0
- package/.agent/skills/shape/SKILL.md +73 -0
- package/.agent/skills/soft-skill/SKILL.md +72 -0
- package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
- package/.agent/skills/svg-animation/SKILL.md +91 -0
- package/.agent/skills/swiss-design/SKILL.md +64 -0
- package/.agent/skills/taste-skill/SKILL.md +71 -0
- package/.agent/skills/tdd-workflow/SKILL.md +36 -165
- package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
- package/.agent/skills/transitions-dev/SKILL.md +101 -0
- package/.agent/skills/typeset/SKILL.md +76 -0
- package/.agent/skills/ui-skills-root/SKILL.md +85 -0
- package/.agent/skills/web-quality-audit/SKILL.md +67 -0
- package/.agent/workflows/fix.md +2 -2
- package/.agent/workflows/preview.md +5 -5
- package/.agent/workflows/status.md +1 -1
- package/.agent/workflows/tribunal-full.md +3 -3
- package/.agent/workflows/tribunal-speed.md +2 -2
- package/README.md +348 -238
- package/bin/tribunal-kit.js +62 -1482
- package/dist/cli.js +13 -0
- package/dist/commands/align.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/guardrail.js +275 -0
- package/dist/commands/init.js +10 -9
- package/dist/commands/optimize.js +318 -0
- package/dist/utils/version.js +1 -1
- package/package.json +10 -8
- package/scripts/fix-vbc.js +98 -0
- package/scripts/fix-vbc.ps1 +119 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fixing-motion-performance
|
|
3
|
+
description: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.
|
|
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 Motion & Performance
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [60fps-animation, gsap-performance]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [fixing-motion-performance, layout thrashing, compositor properties, scroll jank, animation stutter, GPU acceleration, will-change]
|
|
13
|
+
weak: [jank, slow animation, stutter]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Fixing Motion Performance โ 60/120fps Jank-Free Animation
|
|
17
|
+
|
|
18
|
+
Guidelines for auditing and resolving web animation jank, layout thrashing, and GPU rendering bottlenecks.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Browser Rendering Pipeline & Compositor Rules
|
|
23
|
+
|
|
24
|
+
Animations trigger one of 3 rendering costs:
|
|
25
|
+
1. **Layout (Expensive)**: Animating `width`, `height`, `margin`, `padding`, `top`, `left`, `flex`, `grid`. Forces full geometry recalculation across the page.
|
|
26
|
+
2. **Paint (Moderate)**: Animating `color`, `background-color`, `border-color`, `box-shadow`, `filter`. Forces pixel repaint.
|
|
27
|
+
3. **Composite (GPU Fast)**: Animating **`transform`** (`translate`, `scale`, `rotate`) and **`opacity`**. Offloaded entirely to GPU compositor thread!
|
|
28
|
+
|
|
29
|
+
$$\text{Rule: } \text{Animate ONLY } \mathbf{transform} \text{ and } \mathbf{opacity}$$
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Layout Thrashing (Read/Write Interleaving)
|
|
34
|
+
|
|
35
|
+
NEVER interleave DOM layout measurements (`offsetHeight`, `getBoundingClientRect()`) with DOM mutations (`style.height = ...`) in the same event loop or frame loop!
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
// โ WRONG โ Triggers Layout Thrashing (Multiple Recalculations)
|
|
39
|
+
elements.forEach(el => {
|
|
40
|
+
const h = el.offsetHeight; // READ (Forces Layout Calculation)
|
|
41
|
+
el.style.height = `${h + 10}px`; // WRITE (Invalidates Layout)
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// โ
CORRECT โ Batch Reads First, Then Batch Writes
|
|
45
|
+
const heights = elements.map(el => el.offsetHeight); // BATCH READS
|
|
46
|
+
elements.forEach((el, i) => {
|
|
47
|
+
el.style.height = `${heights[i] + 10}px`; // BATCH WRITES
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 3. GPU Hinting (`will-change`)
|
|
54
|
+
|
|
55
|
+
- Use `will-change: transform, opacity` ONLY on actively animated elements right before interaction begins.
|
|
56
|
+
- Remove `will-change` when animation ends to free GPU memory. NEVER place `will-change: transform` globally on hundreds of DOM nodes.
|
|
57
|
+
|
|
58
|
+
```css
|
|
59
|
+
/* Apply hardware acceleration hint to GPU */
|
|
60
|
+
.animated-card {
|
|
61
|
+
will-change: transform, opacity;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Anti-Slop Table
|
|
68
|
+
|
|
69
|
+
| Performance Issue | Motion Performance Fix | FPS Gain |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| Animating `height: 0` to `auto` | FLIP technique or `scaleY` transform animation | 15fps โ 60fps |
|
|
72
|
+
| Scroll listener mutating inline CSS | `CSS scroll-timeline` or `IntersectionObserver` | Prevents main-thread scroll jank |
|
|
73
|
+
| `transition: all 0.3s` | `transition: transform 200ms cubic-bezier(0.16,1,0.3,1), opacity 200ms ease` | Eliminates accidental layout/color recalculations |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## ๐ค LLM-Specific Traps
|
|
78
|
+
|
|
79
|
+
1. **`transition: all`**: Using `all` causes layout recalculation and repaint on every hover.
|
|
80
|
+
2. **`requestAnimationFrame` Memory Leaks**: Launching continuous `rAF` loops without cancellation logic (`cancelAnimationFrame`).
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
85
|
+
|
|
86
|
+
### โ
Pre-Flight Self-Audit
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
โ
Are all continuous animations restricted strictly to transform and opacity?
|
|
90
|
+
โ
Are DOM reads and writes batched to eliminate layout thrashing?
|
|
91
|
+
โ
Is will-change used sparingly on active animated elements only?
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
95
|
+
|
|
96
|
+
Inspect Chrome Performance tab rendering profile in live preview to verify 60/120fps motion without frame drops.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gpt-taste
|
|
3
|
+
description: High-agency UX/UI skill with strict layout variance, typography, and GSAP motion engineering constraints for superior visual judgment.
|
|
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: High-Agency Aesthetic Judgment
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [taste-skill, better-ui, frontend-design]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [gpt-taste, high agency UI, visual refinement, layout variance, superior aesthetic judgment]
|
|
13
|
+
weak: [aesthetic UI, refined visual]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# GPT Taste โ High-Agency Visual Refinement & Layout Variance
|
|
17
|
+
|
|
18
|
+
Inject high-agency visual judgment and layout variance into AI-generated interfaces.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 High-Agency Visual Constraints
|
|
23
|
+
|
|
24
|
+
### 1. Structural Layout Variance
|
|
25
|
+
Never use standard symmetrical layouts by default. Vary structural axes across sections:
|
|
26
|
+
- **Hero**: Asymmetric 60/40 split or left-aligned stacked text with offset app preview frame.
|
|
27
|
+
- **Features**: Alternating 2-column image/text rhythm or horizontal scroll cards.
|
|
28
|
+
- **CTA**: Single full-width card with progressive backdrop blur overlay.
|
|
29
|
+
|
|
30
|
+
### 2. OKLCH Perceptual Palette Generation
|
|
31
|
+
Always generate color schemes in OKLCH:
|
|
32
|
+
- Background: `oklch(0.98 0.005 240)`
|
|
33
|
+
- Foreground: `oklch(0.18 0.01 240)`
|
|
34
|
+
- Accent: `oklch(0.62 0.22 250)`
|
|
35
|
+
|
|
36
|
+
### 3. GSAP / Motion Engineering Integration
|
|
37
|
+
When animation is requested, use explicit GSAP timelines with custom easing curves (`power3.out`, `expo.out`), avoiding default linear transitions.
|
|
38
|
+
|
|
39
|
+
### 4. Zero Output Truncation
|
|
40
|
+
Never output placeholder `// TODO: add remaining items` comments in UI code. Generate full, production-ready JSX/CSS markup.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ๐ค LLM-Specific Traps
|
|
45
|
+
|
|
46
|
+
1. **Truncated Code Outputs**: Outputting incomplete code snippets or placeholder comments.
|
|
47
|
+
2. **Symmetrical Grid Boredom**: Using 3 identical square cards side-by-side without visual hierarchy differentiation.
|
|
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
|
+
โ
Are code outputs 100% complete without placeholder TODOs?
|
|
59
|
+
โ
Is structural layout varied across different page sections?
|
|
60
|
+
โ
Are colors declared via OKLCH variables?
|
|
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.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harden
|
|
3
|
+
description: Make interfaces production-resilient with robust empty states, error boundaries, loading skeletons, offline indicators, and internationalization (i18n) layout support.
|
|
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 Resilience & Production Safety
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [error-resilience, polish, web-accessibility-auditor]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [harden, ui resilience, error states, empty states, loading skeletons, offline support, i18n layout]
|
|
13
|
+
weak: [error handling ui, loading state]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Harden โ Production UI Resilience & Edge Case Protection
|
|
17
|
+
|
|
18
|
+
Ensure UI components gracefully handle network failures, missing data, slow connections, extreme text lengths, and internationalization.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 5 Resilience Domains
|
|
23
|
+
|
|
24
|
+
### 1. Zero-Data Empty States
|
|
25
|
+
- Never render empty blank slates or blank boxes.
|
|
26
|
+
- Always render a dedicated empty state component featuring:
|
|
27
|
+
- Contextual icon or subtle illustration
|
|
28
|
+
- Clear heading explaining the zero state (*"No active projects found"*)
|
|
29
|
+
- Secondary helper copy (*"Get started by creating your first project."*)
|
|
30
|
+
- Prominent primary action CTA button (*"Create Project"*)
|
|
31
|
+
|
|
32
|
+
### 2. Error Boundary UI & Retry Hooks
|
|
33
|
+
- Wrap high-risk component trees in React/framework Error Boundaries.
|
|
34
|
+
- Display localized inline error callouts with explicit "Retry" action buttons rather than crashing the full page view.
|
|
35
|
+
|
|
36
|
+
### 3. Cumulative Layout Shift (CLS) Loading Skeletons
|
|
37
|
+
- Match skeleton placeholder dimensions EXACTLY to incoming data elements.
|
|
38
|
+
- Use animated pulse keyframes (`@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }`).
|
|
39
|
+
|
|
40
|
+
### 4. Extreme String Expansion (i18n)
|
|
41
|
+
- German, French, and Spanish strings are 30% - 50% longer than English.
|
|
42
|
+
- Avoid fixed button or container widths (`width: 120px`). Use `min-width` with flexible auto sizing and `flex-wrap: wrap` or text truncation.
|
|
43
|
+
|
|
44
|
+
### 5. Offline & Network Disconnection Handling
|
|
45
|
+
- Detect `navigator.onLine` state and display subtle offline status banners.
|
|
46
|
+
- Disable mutation buttons during offline mode with explicit tooltip explanation.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## ๐ค LLM-Specific Traps
|
|
51
|
+
|
|
52
|
+
1. **Swallowing Errors**: Catching API errors and displaying a blank container without informing the user.
|
|
53
|
+
2. **Fixed Container Widths**: Using hardcoded `width: 200px` on containers with international text.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
58
|
+
|
|
59
|
+
**Active reviewers: `resilience-reviewer` ยท `frontend-reviewer`**
|
|
60
|
+
|
|
61
|
+
### โ
Pre-Flight Self-Audit
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
โ
Does every async data container have explicit loading, error, and empty states?
|
|
65
|
+
โ
Are all containers built flexibly to accommodate 50% text expansion (i18n)?
|
|
66
|
+
โ
Do error fallbacks include actionable retry buttons?
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
70
|
+
|
|
71
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
72
|
+
|
|
73
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
74
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: impeccable
|
|
3
|
+
description: Flagship design engineering skill for creating production-grade, anti-generic frontend interfaces with supreme craftsmanship, visual hierarchy, typography, spatial systems, and micro-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: Premium Frontend Craft
|
|
9
|
+
tier: flagship
|
|
10
|
+
co-requires: [frontend-design, better-ui, emil-design-eng]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [impeccable, supreme craft, world-class ui, anti-generic design, production-grade interface]
|
|
13
|
+
weak: [beautiful ui, premium frontend]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Impeccable โ Production-Grade Frontend Craft
|
|
17
|
+
|
|
18
|
+
The gold standard framework for crafting bespoke, world-class web applications that feel custom-built by elite design engineers.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Core Pillars of Impeccable UI
|
|
23
|
+
|
|
24
|
+
### 1. Typography & Typographic Rhythm
|
|
25
|
+
- **Optical Sizing & Tracking**: Large display headings (32px+) require tight letter-spacing (`letter-spacing: -0.03em`). Small caption text (12px) requires positive tracking (`letter-spacing: +0.01em`).
|
|
26
|
+
- **Tabular Numbers**: Any numeric data that updates, increments, or displays in columns MUST use `font-variant-numeric: tabular-nums` or `font-feature-settings: "tnum"` to prevent visual jitter.
|
|
27
|
+
- **Text Wrapping & Balance**: Headings MUST use `text-wrap: balance` to prevent typographic orphans. Body paragraphs MUST use `text-wrap: pretty` (where supported) or max `65ch` width.
|
|
28
|
+
|
|
29
|
+
### 2. Color Systems & Gamut Precision
|
|
30
|
+
- **OKLCH Color Space**: Prefer `oklch()` over `hsl()` or `hex` for smooth perceptual uniformity across hue and lightness shifts.
|
|
31
|
+
- **Subtle Surface Steps**: Define surface colors with small perceptual lightness steps ($L \pm 2\%$) to create hierarchy without harsh dividers.
|
|
32
|
+
- **Adaptive Contrast**: Text contrast MUST adapt automatically across light/dark themes with high legibility ratios ($\ge 7:1$ for primary, $\ge 4.5:1$ for secondary).
|
|
33
|
+
|
|
34
|
+
### 3. Motion & Micro-Interactions
|
|
35
|
+
- **Intentional Motion**: Animations exist ONLY to convey spatial continuity, provide press feedback, or indicate state changes.
|
|
36
|
+
- **Duration Constraints**: Micro-interactions $\le 160\text{ms}$; dropdowns/popovers $\le 220\text{ms}$; page transitions $\le 300\text{ms}$.
|
|
37
|
+
- **Physically Grounded Entrances**: Elements scale in from `scale(0.96)` and opacity `0`, anchored to their trigger origin.
|
|
38
|
+
|
|
39
|
+
### 4. Layout Mechanics & Spatial Math
|
|
40
|
+
- **8px Grid System**: Every margin, padding, gap, and height MUST derive from an 8px grid (or 4px micro-grid).
|
|
41
|
+
- **Asymmetrical Balance**: Avoid cookie-cutter centered layouts for SaaS apps. Use strong left-aligned structural axes with generous negative space.
|
|
42
|
+
- **Container Queries**: Components adjust layout based on container size (`@container`), not viewport size (`@media`), making them context-agnostic.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ๐ค LLM-Specific Traps
|
|
47
|
+
|
|
48
|
+
1. **Generic AI Aesthetics**: Using purple-to-blue gradients, glow effects on every button, or heavy glassmorphism on white text.
|
|
49
|
+
2. **Hardcoded Pixel Values**: Writing hardcoded `px` font sizes and dimensions instead of `rem` and fluid `clamp()` utilities.
|
|
50
|
+
3. **Orphaned Text**: Failing to apply `text-wrap: balance` to multi-line headings.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
55
|
+
|
|
56
|
+
**Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor` ยท `motion-reviewer`**
|
|
57
|
+
|
|
58
|
+
### โ
Pre-Flight Self-Audit
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
โ
Are tabular numbers enabled on all changing numeric values?
|
|
62
|
+
โ
Is heading text wrapped using `text-wrap: balance`?
|
|
63
|
+
โ
Is container query responsiveness utilized where components are reused?
|
|
64
|
+
โ
Are transitions tuned with custom cubic-bezier curves under 300ms?
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
68
|
+
|
|
69
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
70
|
+
|
|
71
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
72
|
+
- โ
**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,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: improve-codebase-architecture
|
|
3
|
+
description: Scans a codebase for deepening opportunities, architectural bottlenecks, tight coupling, and produces a prioritized visual improvement roadmap.
|
|
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: Codebase Architectural Audit
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [codebase-design, clean-code, architecture]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [improve-codebase-architecture, architectural audit, refactor architecture, decouple modules, codebase refactor plan]
|
|
13
|
+
weak: [architecture check, fix architecture]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Improve Codebase Architecture โ Architectural Audit & Refactoring
|
|
17
|
+
|
|
18
|
+
Audit an existing codebase for structural rot, circular dependencies, monolithic controllers, and produce a prioritized refactoring roadmap.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Audit Steps
|
|
23
|
+
|
|
24
|
+
### 1. Dependency Graph Inspection
|
|
25
|
+
- Map import relationships across modules. Identify circular dependencies (`A -> B -> C -> A`) and break them by introducing event buses or interface abstractions.
|
|
26
|
+
|
|
27
|
+
### 2. Monolithic Controller Detection
|
|
28
|
+
- Flag files exceeding 500 lines of code containing mixed concerns (database queries, HTTP response handling, email sending, data validation).
|
|
29
|
+
|
|
30
|
+
### 3. Interface Shrinking (Deepening Modules)
|
|
31
|
+
- Audit public exports. Convert large multi-parameter interfaces into thin, single-responsibility contracts.
|
|
32
|
+
|
|
33
|
+
### 4. Prioritized Architectural Roadmap Output
|
|
34
|
+
Output audit findings in a clear prioritized Markdown table:
|
|
35
|
+
|
|
36
|
+
| Impact Level | Architectural Issue | Proposed Seam / Refactor |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| ๐ด **High Impact** | Direct DB queries inside React Server Components | Extract Repository layer pattern |
|
|
39
|
+
| ๐ **Medium Impact** | Circular import between Auth and User modules | Introduce `EventBus` for user registration events |
|
|
40
|
+
| ๐ก **Low Impact** | Hardcoded API base URLs across 12 files | Centralize in typed `ConfigService` |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ๐ค LLM-Specific Traps
|
|
45
|
+
|
|
46
|
+
1. **Shotgun Surgery**: Refactoring 20 files at once without establishing tests or clean interfaces first.
|
|
47
|
+
2. **Ignoring Existing Conventions**: Forgetting existing project patterns and forcing an incompatible framework structure.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
52
|
+
|
|
53
|
+
**Active reviewers: `logic-reviewer` ยท `complexity-reviewer`**
|
|
54
|
+
|
|
55
|
+
### โ
Pre-Flight Self-Audit
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
โ
Are circular dependencies identified and resolved via clean seams?
|
|
59
|
+
โ
Is the refactoring plan broken down into safe, testable phases?
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
63
|
+
|
|
64
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
65
|
+
|
|
66
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
67
|
+
- โ
**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,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: improve-ui
|
|
3
|
+
description: Audit an existing product surface against its own design evidence, identify verified UI problems, and write self-contained implementation plans for another agent. Strictly read-only on product source. Use when asked to review, refine, improve, or clean up an interface without replacing its identity.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
last-updated: 2026-07-22
|
|
6
|
+
applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
|
|
7
|
+
routing:
|
|
8
|
+
domain: UI Craft & Design Audit
|
|
9
|
+
tier: master
|
|
10
|
+
co-requires: [better-ui, baseline-ui]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [improve-ui, audit interface, refine UI, UI review, design-system drift, UI cleanup plan]
|
|
13
|
+
weak: [review layout, UI feedback]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Improve UI โ Evidence-Based UI Audit & Implementation Planning
|
|
17
|
+
|
|
18
|
+
Audit a specific product surface against its governing design tokens and guidelines, identify verified UI defects, and generate self-contained implementation plans for remediation.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Operating Rules & Boundaries
|
|
23
|
+
|
|
24
|
+
- **Strictly Read-Only on Product Source**: Never modify product source files (`src/`, `components/`, `app/`) during an `improve-ui` audit session.
|
|
25
|
+
- **Output Artifacts Only**: Create plans under `design-plans/` or return an actionable implementation plan to the user.
|
|
26
|
+
- **Respect Product Identity**: Preserve existing component architecture, routing, and product identity.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. The 4-Phase Audit Protocol
|
|
31
|
+
|
|
32
|
+
### Phase 1: Surface Selection & Path Tracing
|
|
33
|
+
1. Focus on one deployable application and one coherent surface family (e.g. `Dashboard / Overview`).
|
|
34
|
+
2. Trace the path from route layout $\rightarrow$ page composition $\rightarrow$ shared UI primitives $\rightarrow$ tokens/CSS variables.
|
|
35
|
+
|
|
36
|
+
### Phase 2: Design Language Reconstruction
|
|
37
|
+
1. Inspect `DESIGN.md`, `index.css`, Tailwind tokens, or custom properties.
|
|
38
|
+
2. Record active background tokens, typography roles, spatial rules, and border/shadow contracts.
|
|
39
|
+
|
|
40
|
+
### Phase 3: Proof-Gated Defect Verification
|
|
41
|
+
Before reporting a finding, require 3 explicit proofs:
|
|
42
|
+
- **Observation**: Exact code line or rendered element showing the discrepancy.
|
|
43
|
+
- **Basis**: Violation of documented design token or 8px grid baseline.
|
|
44
|
+
- **Consequence**: Measurable degradation of visual hierarchy, readability, or interaction response.
|
|
45
|
+
|
|
46
|
+
### Phase 4: Implementation Plan Generation
|
|
47
|
+
Write a self-contained plan specifying:
|
|
48
|
+
- Files to modify
|
|
49
|
+
- Exact CSS/JSX diffs
|
|
50
|
+
- Verification steps (browser preview, contrast check, visual alignment)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Anti-Slop Table
|
|
55
|
+
|
|
56
|
+
| Audit Pattern | Evidence-Based Rule | Rationale |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| Rewriting entire components | Targeted visual diff plan | Preserves business logic & state |
|
|
59
|
+
| Guessing design tokens | Citing verified `var(--...)` declarations | Ensures token adherence |
|
|
60
|
+
| Speculative visual preferences | Reporting only verified WCAG/token violations | Prevents arbitrary churn |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ๐ค LLM-Specific Traps
|
|
65
|
+
|
|
66
|
+
1. **Mutating Code During Audit**: Applying code changes immediately instead of generating a clean implementation plan.
|
|
67
|
+
2. **Re-architecting Scope**: Re-writing component state hooks when only CSS spacing and contrast fixes were requested.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
72
|
+
|
|
73
|
+
### โ
Pre-Flight Self-Audit
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
โ
Is the audit strictly read-only on product source code?
|
|
77
|
+
โ
Are all reported findings supported by concrete token or layout evidence?
|
|
78
|
+
โ
Is the generated implementation plan self-contained and ready for execution?
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
82
|
+
|
|
83
|
+
Confirm all plan recommendations match project CSS custom properties before delivery.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: landing-page
|
|
3
|
+
description: High-converting landing page structure, hero section layout variance, CTA hierarchy, visual pacing, feature grid storytelling, and social proof placement.
|
|
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: Landing Page Architecture & Conversion
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [compact-landing, company-logos, pricing-page, frontend-design]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [landing-page, hero section, CTA hierarchy, conversion landing page, SaaS landing page, feature grid storytelling]
|
|
13
|
+
weak: [homepage design, marketing page]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Landing Page โ Conversion Architecture & Visual Pacing
|
|
17
|
+
|
|
18
|
+
Build high-converting, visually stunning landing pages that guide visitors from curiosity to conversion.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The 6-Section Landing Page Blueprint
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
1. Navigation Header
|
|
26
|
+
- Sticky blur backdrop, clear logo, 3-4 nav links, primary CTA button on top-right.
|
|
27
|
+
|
|
28
|
+
2. Hero Section (Above the Fold)
|
|
29
|
+
- Category Pill / Announcement Badge (top)
|
|
30
|
+
- High-Impact H1 Headline (max 8 words, text-wrap: balance)
|
|
31
|
+
- Subtitle (max 2 lines, high legibility)
|
|
32
|
+
- Dual CTA Buttons: Primary (solid accent) + Secondary (ghost / watch demo)
|
|
33
|
+
- Interactive Product Preview / App Frame (centered below CTAs)
|
|
34
|
+
|
|
35
|
+
3. Social Proof Row
|
|
36
|
+
- Monochromatic company logo bar or customer rating badge immediately below hero.
|
|
37
|
+
|
|
38
|
+
4. Feature Value Sections (Alternating Rhythm)
|
|
39
|
+
- 3-column feature grid OR alternating left-text / right-visual sections.
|
|
40
|
+
- Interactive micro-demos or high-resolution app screenshots over static icons.
|
|
41
|
+
|
|
42
|
+
5. Testimonials & Case Studies
|
|
43
|
+
- Real customer quote cards with avatar, name, title, and verified metric ("Boosted retention by 42%").
|
|
44
|
+
|
|
45
|
+
6. Final Call to Action & Footer
|
|
46
|
+
- Prominent conversion card banner + comprehensive 4-column footer link map.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Hero Layout Variance Models
|
|
52
|
+
|
|
53
|
+
Avoid standard left-text / right-image templates on every project. Choose based on product type:
|
|
54
|
+
|
|
55
|
+
- **Model A: Centered Stacked (Best for Developer Tools & SaaS)**
|
|
56
|
+
- Centered Pill -> Centered H1 -> Centered Subtitle -> Centered Dual CTA -> Full-width app preview mockup below.
|
|
57
|
+
- **Model B: Asymmetric Split (Best for Complex B2B & Mobile Apps)**
|
|
58
|
+
- 60% Left column (Heading, bullets, CTA) + 40% Right column (Interactive phone frame or live code preview).
|
|
59
|
+
- **Model C: Full-Bleed Canvas (Best for Creative & AI Tools)**
|
|
60
|
+
- Full-screen canvas visual background with floating frosted-glass prompt bar and primary CTA.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ๐ค LLM-Specific Traps
|
|
65
|
+
|
|
66
|
+
1. **Standard Generic Left-Text / Right-Image Every Time**: Re-using the exact same layout template for every marketing page request.
|
|
67
|
+
2. **Multiple Equal Primary Buttons**: Displaying 3 solid colored buttons together, creating CTA confusion.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
72
|
+
|
|
73
|
+
**Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor`**
|
|
74
|
+
|
|
75
|
+
### โ
Pre-Flight Self-Audit
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
โ
Is there a single, unambiguous primary CTA button above the fold?
|
|
79
|
+
โ
Is heading text balanced with `text-wrap: balance`?
|
|
80
|
+
โ
Is social proof placed immediately following the hero section?
|
|
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.
|
|
@@ -185,8 +185,7 @@ repos:
|
|
|
185
185
|
|
|
186
186
|
| Script | Purpose | Run With |
|
|
187
187
|
| -------------------------- | ----------------------------------------- | ------------------------------------------------ |
|
|
188
|
-
|
|
|
189
|
-
| `scripts/type_coverage.py` | Measures TypeScript type coverage | `python scripts/type_coverage.py <project_path>` |
|
|
188
|
+
| `.agent/scripts/lint_runner.js` | Runs project linting and reports findings | `node .agent/scripts/lint_runner.js <project_path>` |
|
|
190
189
|
|
|
191
190
|
---
|
|
192
191
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: local-first-architecture
|
|
3
|
+
description: Local-first architecture guidance for instant-feeling web & desktop apps, optimistic updates, IndexedDB sync engines, offline operation, and Conflict-free Replicated Data Types (CRDTs).
|
|
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: Local-First Architecture & Sync Engines
|
|
9
|
+
tier: pro
|
|
10
|
+
co-requires: [local-first, realtime-patterns, architecture]
|
|
11
|
+
trigger-signals:
|
|
12
|
+
strong: [local-first-architecture, Linear architecture, optimistic updates, IndexedDB sync, CRDT, offline-first app, zero-latency UI]
|
|
13
|
+
weak: [offline sync, optimistic state]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Local-First Architecture โ Instant UI & Sync Engines
|
|
17
|
+
|
|
18
|
+
Architect software that reads and writes to local storage (SQLite/IndexedDB) first, ensuring instant zero-latency UI mutations with background server synchronization.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 4 Pillars of Local-First Architecture
|
|
23
|
+
|
|
24
|
+
### 1. Read & Write Local First
|
|
25
|
+
- **Zero Network Latency**: UI queries (`select * from tasks`) run synchronously or near-instantaneously against in-memory or IndexedDB caches.
|
|
26
|
+
- Mutations update the local cache immediately (*optimistic write*), appending a mutation log item to an outbound sync queue.
|
|
27
|
+
|
|
28
|
+
### 2. Outbound Mutation Queue & Idempotency
|
|
29
|
+
- Store mutation logs in a persistent local queue (`IndexedDB` / `SQLite`).
|
|
30
|
+
- Assign every client mutation a unique UUID (`idempotencyKey`).
|
|
31
|
+
- When network connection is restored, flush queue items sequentially with automatic retry on 5xx failures.
|
|
32
|
+
|
|
33
|
+
### 3. Conflict Resolution (CRDTs & LWW)
|
|
34
|
+
- **Last-Write-Wins (LWW)**: Timestamp + Client ID ordering for simple fields.
|
|
35
|
+
- **CRDTs (Yjs / Automerge)**: Conflict-free Replicated Data Types for collaborative text editing and array state.
|
|
36
|
+
|
|
37
|
+
### 4. Background Delta Streaming
|
|
38
|
+
- Receive database updates via WebSockets or Server-Sent Events (SSE) as thin binary deltas (`sync_version > client_version`), applying changes to local storage without re-fetching full datasets.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## ๐ค LLM-Specific Traps
|
|
43
|
+
|
|
44
|
+
1. **Waiting for Server API Response Before UI Render**: Blocking the user interface with a spinner while waiting for a POST request response.
|
|
45
|
+
2. **Volatile Local State**: Keeping mutation queues in non-persistent JS memory, losing unsaved user edits on page refresh.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
50
|
+
|
|
51
|
+
**Active reviewers: `logic-reviewer` ยท `resilience-reviewer` ยท `architecture-reviewer`**
|
|
52
|
+
|
|
53
|
+
### โ
Pre-Flight Self-Audit
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
โ
Are user actions reflected instantly in local UI state?
|
|
57
|
+
โ
Is the mutation queue persisted in IndexedDB/SQLite for offline durability?
|
|
58
|
+
โ
Are all server API mutations idempotent with client-generated UUID keys?
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
62
|
+
|
|
63
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
64
|
+
|
|
65
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
66
|
+
- โ
**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.
|