tribunal-kit 5.8.2 โ†’ 5.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.agent/ARCHITECTURE.md +12 -12
  2. package/.agent/agents/complexity-reviewer.md +53 -0
  3. package/.agent/agents/precedence-reviewer.md +12 -12
  4. package/.agent/agents/swarm-worker-registry.md +3 -3
  5. package/.agent/history/integrity_manifest.json +958 -0
  6. package/.agent/history/memory/.memory.idx +305 -1
  7. package/.agent/history/memory/MEMORY.md +21 -1
  8. package/.agent/rules/GEMINI.md +31 -28
  9. package/.agent/scripts/case_law_manager.js +3 -15
  10. package/.agent/scripts/context_broker.js +3 -1
  11. package/.agent/scripts/guardrail_engine.js +643 -0
  12. package/.agent/scripts/integrity_manifest.js +486 -0
  13. package/.agent/scripts/signal_detector.js +1 -1
  14. package/.agent/scripts/skill_evolution.js +3 -15
  15. package/.agent/scripts/skill_integrator.js +2 -12
  16. package/.agent/scripts/swarm_dispatcher.js +2 -12
  17. package/.agent/skills/12-principles-of-animation/SKILL.md +69 -0
  18. package/.agent/skills/60fps-animation/SKILL.md +78 -0
  19. package/.agent/skills/accessible-animation/SKILL.md +86 -0
  20. package/.agent/skills/adapt/SKILL.md +75 -0
  21. package/.agent/skills/animation-on-scroll/SKILL.md +110 -0
  22. package/.agent/skills/animation-systems/SKILL.md +69 -0
  23. package/.agent/skills/antfu-conventions/SKILL.md +74 -0
  24. package/.agent/skills/app-builder/SKILL.md +1 -1
  25. package/.agent/skills/apple-design/SKILL.md +108 -0
  26. package/.agent/skills/audit-and-fix/SKILL.md +83 -0
  27. package/.agent/skills/baseline-ui/SKILL.md +74 -0
  28. package/.agent/skills/better-colors/SKILL.md +124 -0
  29. package/.agent/skills/better-typography/SKILL.md +111 -0
  30. package/.agent/skills/better-ui/SKILL.md +102 -0
  31. package/.agent/skills/bolder/SKILL.md +68 -0
  32. package/.agent/skills/build-primitive/SKILL.md +70 -0
  33. package/.agent/skills/clarify/SKILL.md +75 -0
  34. package/.agent/skills/cobejs/SKILL.md +96 -0
  35. package/.agent/skills/codebase-design/SKILL.md +84 -0
  36. package/.agent/skills/colorize/SKILL.md +77 -0
  37. package/.agent/skills/compact-landing/SKILL.md +70 -0
  38. package/.agent/skills/company-logos/SKILL.md +73 -0
  39. package/.agent/skills/create-design-md/SKILL.md +104 -0
  40. package/.agent/skills/critique/SKILL.md +95 -0
  41. package/.agent/skills/delight/SKILL.md +65 -0
  42. package/.agent/skills/design-lab/SKILL.md +59 -0
  43. package/.agent/skills/diagnosing-bugs/SKILL.md +190 -0
  44. package/.agent/skills/distill/SKILL.md +65 -0
  45. package/.agent/skills/domain-modeling/SKILL.md +78 -0
  46. package/.agent/skills/fixing-accessibility/SKILL.md +98 -0
  47. package/.agent/skills/fixing-metadata/SKILL.md +97 -0
  48. package/.agent/skills/fixing-motion-performance/SKILL.md +96 -0
  49. package/.agent/skills/gpt-taste/SKILL.md +68 -0
  50. package/.agent/skills/harden/SKILL.md +74 -0
  51. package/.agent/skills/impeccable/SKILL.md +72 -0
  52. package/.agent/skills/improve-codebase-architecture/SKILL.md +67 -0
  53. package/.agent/skills/improve-ui/SKILL.md +83 -0
  54. package/.agent/skills/landing-page/SKILL.md +88 -0
  55. package/.agent/skills/lint-and-validate/SKILL.md +1 -2
  56. package/.agent/skills/local-first-architecture/SKILL.md +66 -0
  57. package/.agent/skills/lottie-animation/SKILL.md +82 -0
  58. package/.agent/skills/marquee-loop/SKILL.md +96 -0
  59. package/.agent/skills/masked-reveal/SKILL.md +88 -0
  60. package/.agent/skills/micro-interaction/SKILL.md +100 -0
  61. package/.agent/skills/morphing-icons/SKILL.md +85 -0
  62. package/.agent/skills/page-transition-animation/SKILL.md +108 -0
  63. package/.agent/skills/parallel-agents/SKILL.md +5 -5
  64. package/.agent/skills/polish/SKILL.md +63 -0
  65. package/.agent/skills/pricing-page/SKILL.md +68 -0
  66. package/.agent/skills/progressive-blur/SKILL.md +100 -0
  67. package/.agent/skills/project-idioms/SKILL.md +7 -7
  68. package/.agent/skills/quieter/SKILL.md +68 -0
  69. package/.agent/skills/react-doctor/SKILL.md +70 -0
  70. package/.agent/skills/redesign-skill/SKILL.md +65 -0
  71. package/.agent/skills/shape/SKILL.md +73 -0
  72. package/.agent/skills/soft-skill/SKILL.md +72 -0
  73. package/.agent/skills/sounds-on-the-web/SKILL.md +100 -0
  74. package/.agent/skills/svg-animation/SKILL.md +91 -0
  75. package/.agent/skills/swiss-design/SKILL.md +64 -0
  76. package/.agent/skills/taste-skill/SKILL.md +71 -0
  77. package/.agent/skills/tdd-workflow/SKILL.md +36 -165
  78. package/.agent/skills/test-result-analyzer/SKILL.md +1 -1
  79. package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +82 -0
  80. package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +66 -0
  81. package/.agent/skills/transitions-dev/SKILL.md +101 -0
  82. package/.agent/skills/typeset/SKILL.md +76 -0
  83. package/.agent/skills/ui-skills-root/SKILL.md +85 -0
  84. package/.agent/skills/web-quality-audit/SKILL.md +67 -0
  85. package/.agent/workflows/fix.md +2 -2
  86. package/.agent/workflows/preview.md +5 -5
  87. package/.agent/workflows/status.md +1 -1
  88. package/.agent/workflows/tribunal-full.md +3 -3
  89. package/.agent/workflows/tribunal-speed.md +2 -2
  90. package/README.md +348 -238
  91. package/bin/tribunal-kit.js +62 -1482
  92. package/dist/cli.js +13 -0
  93. package/dist/commands/align.js +1 -1
  94. package/dist/commands/compile.js +1 -1
  95. package/dist/commands/guardrail.js +275 -0
  96. package/dist/commands/init.js +10 -9
  97. package/dist/commands/optimize.js +318 -0
  98. package/dist/utils/version.js +1 -1
  99. package/package.json +10 -8
  100. package/scripts/fix-vbc.js +98 -0
  101. package/scripts/fix-vbc.ps1 +119 -0
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: delight
3
+ description: Inject micro-moments of delight, subtle surprise interactions, personality, and tactile feedback into user interfaces. Use when building success celebrations, copy-to-clipboard feedback, empty states, or playful UI elements.
4
+ version: 1.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Micro-Delight & Interactive Polish
9
+ tier: pro
10
+ co-requires: [whimsy-injector, micro-interaction, emil-design-eng]
11
+ trigger-signals:
12
+ strong: [delight, micro-delight, make it playful, add personality, surprise animation, tactile feedback]
13
+ weak: [sparkle, fun ui, success feedback]
14
+ ---
15
+
16
+ # Delight โ€” Micro-Moments of Tactile UI Polish
17
+
18
+ Elevate everyday digital interactions with subtle, memorable details that make software a joy to use.
19
+
20
+ ---
21
+
22
+ ## 5 Micro-Delight Patterns
23
+
24
+ ### 1. The Morphing State Checkmark
25
+ - When clicking "Copy Link" or "Save", morph the button icon or label smoothly into a checkmark icon with a quick spring bounce (`scale(1.15) -> scale(1)` over `180ms`), holding for 1.5 seconds before morphing back.
26
+
27
+ ### 2. Micro-Confetti & Particle Bursts
28
+ - On completing a key milestone (e.g. completing onboarding, submitting a project), trigger a lightweight 12-particle CSS/canvas burst anchored directly to the submit button.
29
+
30
+ ### 3. Tactile Drag & Reorder Haptics
31
+ - When dragging list items, elevate the item with a slight tilt ($2^\circ$), drop shadow increase, and scale (`scale(1.02)`), giving a physical card feeling.
32
+
33
+ ### 4. Playful Empty State Animations
34
+ - Transform boring zero-data states with subtle floating illustrations, witty microcopy, and a prominent primary action button.
35
+
36
+ ### 5. Keyboard Shortcut Badges with Tooltips
37
+ - Display subtle keyboard shortcut hints (e.g. `โŒ˜K` or `Ctrl+K`) inside inputs or hover tooltips that respond with a subtle keypress press animation when pressed.
38
+
39
+ ---
40
+
41
+ ## ๐Ÿค– LLM-Specific Traps
42
+
43
+ 1. **Overdoing Delight on High-Frequency Actions**: Adding confetti bursts or long animations to actions users perform 50+ times a day. Keep high-frequency delight under 100ms and non-intrusive.
44
+ 2. **Ignoring Accessibility**: Failing to check `prefers-reduced-motion` for particle effects or canvas animations.
45
+
46
+ ---
47
+
48
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
49
+
50
+ **Active reviewers: `motion-reviewer` ยท `frontend-reviewer`**
51
+
52
+ ### โœ… Pre-Flight Self-Audit
53
+
54
+ ```
55
+ โœ… Is the delight moment brief (< 300ms for motion, 1.5s total hold)?
56
+ โœ… Does it respect `prefers-reduced-motion`?
57
+ โœ… Is it restricted to occasional milestones or state confirmations?
58
+ ```
59
+
60
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
61
+
62
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
63
+
64
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
65
+ - โœ… **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,59 @@
1
+ ---
2
+ name: design-lab
3
+ description: Interactive design exploration workflow: conduct interviews, generate variants, and refine UI designs through user feedback loops.
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: Design Exploration & UI Variants
9
+ tier: pro
10
+ co-requires: [brainstorming, shape, frontend-design]
11
+ trigger-signals:
12
+ strong: [design-lab, design exploration, generate variants, interactive design workflow, UI experiment]
13
+ weak: [explore designs, design options]
14
+ ---
15
+
16
+ # Design Lab โ€” Interactive Design Exploration & Variants
17
+
18
+ Conduct rapid design experiments, explore multiple structural variants, and iteratively refine interfaces with feedback.
19
+
20
+ ---
21
+
22
+ ## 3 Design Lab Phases
23
+
24
+ ### Phase 1: Context & Constraint Gathering
25
+ Ask 2 targeted questions to map out design direction:
26
+ 1. What aesthetic tone fits best? (e.g. Minimalist Editorial vs High-Impact Brutalist vs Clean Corporate SaaS)
27
+ 2. What component variants would you like to explore? (e.g. Card layout options A vs B)
28
+
29
+ ### Phase 2: Generating Distinct Structural Variants
30
+ Generate 2 distinct visual variants (e.g. Option A: Centered Minimalist vs Option B: Asymmetrical Card Grid).
31
+
32
+ ### Phase 3: Interactive Refinement
33
+ Synthesize feedback on preferred elements and build the polished final component.
34
+
35
+ ---
36
+
37
+ ## ๐Ÿค– LLM-Specific Traps
38
+
39
+ 1. **Generating Micro-Variations**: Creating 2 "variants" that differ by only a 1px border or hex color. Make variants structurally distinct.
40
+
41
+ ---
42
+
43
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
44
+
45
+ **Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor`**
46
+
47
+ ### โœ… Pre-Flight Self-Audit
48
+
49
+ ```
50
+ โœ… Are the generated design variants visually and layout-wise distinct?
51
+ โœ… Is user feedback incorporated before committing to the final version?
52
+ ```
53
+
54
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
55
+
56
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
57
+
58
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
59
+ - โœ… **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,190 @@
1
+ ---
2
+ name: diagnosing-bugs
3
+ description: Systematic bug diagnosis methodology for hard bugs: Phase 1 (Build feedback loop), Phase 2 (Reproduce + minimise), Phase 3 (Hypothesise), Phase 4 (Instrument), Phase 5 (Fix + regression test), Phase 6 (Cleanup + post-mortem).
4
+ version: 2.0.0
5
+ last-updated: 2026-07-22
6
+ applies-to-model: gemini-3-6-flash, claude-3-7-sonnet
7
+ routing:
8
+ domain: Systematic Debugging & Root Cause Isolation
9
+ tier: pro
10
+ co-requires: [systematic-debugging, test-result-analyzer]
11
+ trigger-signals:
12
+ strong: [diagnosing-bugs, systematic bug diagnosis, reproduce bug, root cause isolation, intermittent bug, debug protocol, hard bugs]
13
+ weak: [fix bug, investigate error]
14
+ ---
15
+
16
+ # Diagnosing Bugs โ€” A Discipline for Hard Bugs
17
+
18
+ A systematic discipline for hard bugs. Skip phases only when explicitly justified.
19
+
20
+ When exploring the codebase, read `CONTEXT.md` (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
21
+
22
+ ---
23
+
24
+ ## Protocol Overview
25
+
26
+ ```
27
+ Phase 1: Build a Feedback Loop โ”€โ”€โ–บ Phase 2: Reproduce + Minimise โ”€โ”€โ–บ Phase 3: Hypothesise
28
+ โ”‚
29
+ Phase 6: Cleanup + Post-Mortem โ—„โ”€โ”€ Phase 5: Fix + Regression Test โ—„โ”€โ”€ Phase 4: Instrument
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Phase 1 โ€” Build a Feedback Loop
35
+
36
+ This is the core skill. Everything else is mechanical. If you have a tight pass/fail signal for the bug โ€” one that goes red on this bug โ€” you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you.
37
+
38
+ Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.
39
+
40
+ ### 10 Strategies to Construct a Feedback Loop (in priority order)
41
+
42
+ 1. **Failing Test at Whatever Seam Reaches the Bug**: Unit, integration, or E2E test.
43
+ 2. **Curl / HTTP Script**: Send requests against a running dev server.
44
+ 3. **CLI Invocation with Fixture Input**: Diffing stdout/stderr against a known-good snapshot.
45
+ 4. **Headless Browser Script (Playwright / Puppeteer)**: Drives the UI, asserts on DOM/console/network.
46
+ 5. **Replay a Captured Trace**: Save a real network request / payload / event log to disk; replay it through the code path in isolation.
47
+ 6. **Throwaway Harness**: Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
48
+ 7. **Property / Fuzz Loop**: If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
49
+ 8. **Bisection Harness**: If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can run `git bisect`.
50
+ 9. **Differential Loop**: Run the same input through old-version vs new-version (or two configs) and diff outputs.
51
+ 10. **HITL Bash Script**: Last resort. If a human must click, drive them with `scripts/hitl-loop.template.sh` so the loop is still structured. Captured output feeds back to you.
52
+
53
+ Build the right feedback loop, and the bug is 90% fixed.
54
+
55
+ ### Tighten the Loop
56
+
57
+ Treat the loop as a product. Once you have a loop, tighten it:
58
+ - **Can I make it faster?** (Cache setup, skip unrelated init, narrow the test scope.)
59
+ - **Can I make the signal sharper?** (Assert on the specific symptom, not "didn't crash".)
60
+ - **Can I make it more deterministic?** (Pin time, seed RNG, isolate filesystem, freeze network.)
61
+
62
+ > โšก **Debugging Superpower**: A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is a debugging superpower.
63
+
64
+ ### Non-Deterministic Bugs
65
+
66
+ The goal is not a clean repro but a higher reproduction rate. Loop the trigger 100ร—, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not โ€” keep raising the rate until it's debuggable.
67
+
68
+ ### When You Genuinely Cannot Build a Loop
69
+
70
+ Stop and say so explicitly. List what you tried. Ask the user for:
71
+ 1. Access to whatever environment reproduces it.
72
+ 2. A captured artifact (HAR file, log dump, core dump, screen recording with timestamps).
73
+ 3. Permission to add temporary production instrumentation.
74
+
75
+ *Do not proceed to hypothesise without a loop.*
76
+
77
+ ### Phase 1 Completion Criterion โ€” A Tight Loop That Goes Red
78
+
79
+ Phase 1 is done when the loop is tight and red-capable: you can name **one command** โ€” a script path, a test invocation, a curl โ€” that you have already run at least once (paste the invocation and its output), and that is:
80
+ - โœ… **Red-capable**: Drives the actual bug code path and asserts the user's exact symptom, going red on this bug and green once fixed. Not "runs without erroring" โ€” it must catch this specific bug.
81
+ - โœ… **Deterministic**: Same verdict every run (or high, pinned reproduction rate).
82
+ - โœ… **Fast**: Seconds, not minutes.
83
+ - โœ… **Agent-runnable**: Runnable unattended (HITL only via `scripts/hitl-loop.template.sh`).
84
+
85
+ *If you catch yourself reading code to build a theory before this command exists, stop. No red-capable command, no Phase 2.*
86
+
87
+ ---
88
+
89
+ ## Phase 2 โ€” Reproduce + Minimise
90
+
91
+ Run the loop. Watch it go red โ€” the bug appears.
92
+
93
+ ### Confirm
94
+ 1. The loop produces the failure mode the user described โ€” not a different failure nearby. (Wrong bug = wrong fix.)
95
+ 2. The failure is reproducible across multiple runs (or at a high enough reproduction rate).
96
+ 3. You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix addresses it.
97
+
98
+ ### Minimise
99
+ Once it's red, shrink the repro to the smallest scenario that still goes red. Cut inputs, callers, config, data, and steps one at a time, re-running the loop after each cut โ€” keep only what's load-bearing for the failure.
100
+
101
+ > ๐ŸŽฏ **Why bother**: A minimal repro shrinks the hypothesis space in Phase 3 (fewer moving parts left to suspect) and becomes the clean regression test in Phase 5.
102
+
103
+ **Done when every remaining element is load-bearing โ€” removing any single one makes the loop go green.**
104
+
105
+ ---
106
+
107
+ ## Phase 3 โ€” Hypothesise
108
+
109
+ Generate **3โ€“5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
110
+
111
+ Each hypothesis must be **falsifiable**: state the prediction it makes.
112
+
113
+ **Format**: `"If [X] is the cause, then [Y] will make the bug disappear / will make it worse."`
114
+
115
+ If you cannot state the prediction, the hypothesis is a vibe โ€” discard or sharpen it.
116
+
117
+ Show the ranked list to the user before testing. (Proceed with your ranking if the user is AFK.)
118
+
119
+ ---
120
+
121
+ ## Phase 4 โ€” Instrument
122
+
123
+ Each probe must map to a specific prediction from Phase 3. Change one variable at a time.
124
+
125
+ ### Tool Preference
126
+ 1. **Debugger / REPL Inspection**: If the environment supports it. One breakpoint beats ten logs.
127
+ 2. **Targeted Logs**: Place logs at boundaries that distinguish hypotheses. Never "log everything and grep".
128
+ 3. **Tag Every Debug Log**: Prefix every debug log with a unique tag, e.g. `[DEBUG-a4f2]`. Cleanup at the end becomes a single grep.
129
+ 4. **Performance Profiling Branch**: For performance regressions, establish a baseline measurement (`timing harness`, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second.
130
+
131
+ ---
132
+
133
+ ## Phase 5 โ€” Fix + Regression Test
134
+
135
+ Write the regression test before the fix โ€” but only if there is a correct seam for it.
136
+
137
+ A correct seam is one where the test exercises the real bug pattern as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that can't replicate the chain that triggered the bug), a regression test there gives false confidence.
138
+
139
+ If no correct seam exists, note it. The codebase architecture is preventing the bug from being locked down. Flag this for Phase 6.
140
+
141
+ ### If a Correct Seam Exists:
142
+ 1. Turn the minimised repro into a failing test at that seam.
143
+ 2. Watch it fail.
144
+ 3. Apply the fix.
145
+ 4. Watch it pass.
146
+ 5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.
147
+
148
+ ---
149
+
150
+ ## Phase 6 โ€” Cleanup + Post-Mortem
151
+
152
+ ### Required Before Declaring Done
153
+ - [ ] Original repro no longer reproduces (re-run Phase 1 loop)
154
+ - [ ] Regression test passes (or absence of seam is documented)
155
+ - [ ] All `[DEBUG-...]` instrumentation removed (grep the prefix)
156
+ - [ ] Throwaway prototypes deleted (or moved to debug location)
157
+ - [ ] Correct hypothesis stated in commit / PR message
158
+
159
+ ### Post-Mortem Handoff
160
+ Ask: **What would have prevented this bug?** If the answer involves architectural debt (no good test seam, tangled callers, hidden coupling), hand off to `/improve-codebase-architecture` with specific findings.
161
+
162
+ ---
163
+
164
+ ## ๐Ÿค– LLM-Specific Traps
165
+
166
+ 1. **Shotgun Debugging**: Making random edits across multiple files hoping the error disappears.
167
+ 2. **Reading Code to Build Theories Before Having a Red Loop**: Jumping straight to hypotheses without a red-capable command.
168
+ 3. **Symptom Swallowing**: Wrapping a throwing call in silent `try/catch` or returning empty fallbacks instead of addressing root cause.
169
+ 4. **Testing Multiple Hypotheses at Once**: Changing multiple variables simultaneously, creating ambiguous results.
170
+
171
+ ---
172
+
173
+ ## ๐Ÿ›๏ธ Tribunal Integration & Pre-Flight Self-Audit
174
+
175
+ **Active Reviewers: `debugger` ยท `logic-reviewer` ยท `resilience-reviewer`**
176
+
177
+ ```
178
+ โœ… Has a red-capable feedback loop command been executed and verified red?
179
+ โœ… Has the repro scenario been minimised to only load-bearing elements?
180
+ โœ… Were 3โ€“5 falsifiable hypotheses formulated before testing?
181
+ โœ… Are all debug logs tagged with [DEBUG-...] and cleaned up before merge?
182
+ โœ… Has a regression test been added at a valid seam?
183
+ ```
184
+
185
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
186
+
187
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
188
+
189
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
190
+ - โœ… **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,65 @@
1
+ ---
2
+ name: distill
3
+ description: Simplify noisy interfaces by removing non-essential visual and operational complexity. Use when a UI has too many options, crowded toolbars, redundant text, or unnecessary visual containers.
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: UX Simplification & Reduction
9
+ tier: pro
10
+ co-requires: [quieter, clarify, baseline-ui]
11
+ trigger-signals:
12
+ strong: [distill, simplify ui, declutter, remove complexity, streamline interface, too crowded]
13
+ weak: [clean up, simplify options]
14
+ ---
15
+
16
+ # Distill โ€” UX Simplification & Decluttering
17
+
18
+ Systematically strip away visual clutter, redundant controls, and cognitive friction to reveal the core user task.
19
+
20
+ ---
21
+
22
+ ## The 4 Distillation Steps
23
+
24
+ ### 1. Identify & Remove Visual Noise
25
+ - **Container Reduction**: Eliminate unnecessary nested cards, boxes inside boxes, and decorative borders. Use whitespace instead of lines to separate content blocks.
26
+ - **Icon Pruning**: Remove decorative icons that restate obvious text labels (e.g. an envelope icon next to a button that clearly says "Send Email").
27
+
28
+ ### 2. Collapse Secondary Actions
29
+ - **Primary vs Overflow**: Keep only 1 primary action button and max 1 secondary button visible. Hide tertiary actions inside an overflow dropdown (`...` menu).
30
+ - **Progressive Disclosure**: Hide advanced settings or non-essential controls behind an "Advanced Settings" accordion or popover.
31
+
32
+ ### 3. Trim Copy & Microcopy
33
+ - **Cut Conversational Filler**: Strip verbose instructions. Change *"Please fill out the form below to register your account"* to *"Create account"*.
34
+ - **Shorten Button Labels**: Change *"Click here to update your profile settings"* to *"Save profile"*.
35
+
36
+ ### 4. Group Related Fields
37
+ - **Consolidate Form Inputs**: Merge separate "First Name" and "Last Name" fields into "Full Name" if separate values aren't strictly required. Merge city/state/zip into single address lookup where possible.
38
+
39
+ ---
40
+
41
+ ## ๐Ÿค– LLM-Specific Traps
42
+
43
+ 1. **Hiding Essential Actions**: Removing actions that users need frequently, forcing extra clicks.
44
+ 2. **Deleting Error Context**: Removing helpful inline validation messages while trimming copy.
45
+
46
+ ---
47
+
48
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
49
+
50
+ **Active reviewers: `frontend-reviewer` ยท `ui-ux-auditor`**
51
+
52
+ ### โœ… Pre-Flight Self-Audit
53
+
54
+ ```
55
+ โœ… Is the primary task front and center without distraction?
56
+ โœ… Have secondary/tertiary options been cleanly collapsed or progressively disclosed?
57
+ โœ… Is all microcopy concise, active, and direct?
58
+ ```
59
+
60
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
61
+
62
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
63
+
64
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
65
+ - โœ… **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: domain-modeling
3
+ description: Builds and sharpens project domain models, ubiquitous language, entity relationships, and bounded contexts before writing code.
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: Domain Driven Design & Business Modeling
9
+ tier: pro
10
+ co-requires: [architecture, codebase-design]
11
+ trigger-signals:
12
+ strong: [domain-modeling, ubiquitous language, bounded context, aggregate root, domain entity, business logic model]
13
+ weak: [model data, data entities]
14
+ ---
15
+
16
+ # Domain Modeling โ€” Ubiquitous Language & Bounded Contexts
17
+
18
+ Model business domain concepts cleanly before committing to database schemas or API signatures.
19
+
20
+ ---
21
+
22
+ ## 4 Domain Modeling Rules
23
+
24
+ ### 1. Establish Ubiquitous Language
25
+ - Agree on strict, unambiguous terms used identically across domain experts, code variable names, database tables, and UI copy.
26
+ - โŒ *User*, *Account*, *Member*, *Client* used interchangeably for the same concept.
27
+ - โœ… Define 1 clear term: **Customer** (for billing context) vs **User** (for authentication context).
28
+
29
+ ### 2. Define Bounded Contexts
30
+ - Separate large systems into distinct bounded contexts. An entity named `Product` in the *Inventory Context* (stock level, warehouse bin) has different attributes than `Product` in the *Catalog Context* (hero image, pricing).
31
+
32
+ ### 3. Aggregates & Invariants
33
+ - An **Aggregate Root** (e.g. `Order`) enforces internal business invariants across child entities (`OrderItem`).
34
+ - Never mutate a child entity (`OrderItem`) directly without passing through the aggregate root method (`order.addItem(product, qty)`).
35
+
36
+ ### 4. Value Objects Over Primitives
37
+ - Wrap primitives into type-safe Value Objects to enforce validation logic:
38
+ ```typescript
39
+ // Value Object enforcing domain rule
40
+ export class EmailAddress {
41
+ private readonly value: string;
42
+
43
+ constructor(email: string) {
44
+ if (!email.includes("@")) throw new Error("Invalid email domain");
45
+ this.value = email.toLowerCase().trim();
46
+ }
47
+
48
+ public toString(): string { return this.value; }
49
+ }
50
+ ```
51
+
52
+ ---
53
+
54
+ ## ๐Ÿค– LLM-Specific Traps
55
+
56
+ 1. **Anemic Domain Models**: Creating plain data structures (`DTOs`) without domain methods, pushing business logic into scattered service files.
57
+ 2. **Mixing Contexts**: Creating 1 giant `User` table with 60 columns spanning auth, billing, shipping, and notification preferences.
58
+
59
+ ---
60
+
61
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
62
+
63
+ **Active reviewers: `logic-reviewer` ยท `type-safety`**
64
+
65
+ ### โœ… Pre-Flight Self-Audit
66
+
67
+ ```
68
+ โœ… Are entity names strictly consistent with the project's ubiquitous language?
69
+ โœ… Are domain invariants enforced inside Aggregate Roots?
70
+ โœ… Have complex primitives been converted into type-safe Value Objects?
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,98 @@
1
+ ---
2
+ name: fixing-accessibility
3
+ description: Audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewing WCAG compliance.
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 & Accessibility
9
+ tier: pro
10
+ co-requires: [audit-and-fix, web-accessibility-auditor]
11
+ trigger-signals:
12
+ strong: [fixing-accessibility, accessibility audit, WCAG 2.2, aria-label, keyboard navigation, focus trap, color contrast]
13
+ weak: [a11y, focus ring, screen reader]
14
+ ---
15
+
16
+ # Fixing Accessibility โ€” WCAG 2.2 AA Audit & Remediation
17
+
18
+ Guidelines for detecting, prioritizing, and fixing accessibility defects across web interfaces.
19
+
20
+ ---
21
+
22
+ ## 1. Priority Priority Matrix
23
+
24
+ | Priority | Category | Critical Requirements |
25
+ | --- | --- | --- |
26
+ | **P1** | **Accessible Names** | Every icon button MUST have `aria-label` or `aria-labelledby`. Decorative icons MUST have `aria-hidden="true"`. |
27
+ | **P2** | **Keyboard Access** | All interactive controls MUST be reachable and operable via `Tab` / `Shift+Tab`, `Space`, `Enter`. NEVER use `<div>` or `<span>` as clickable elements without `role="button"`, `tabIndex={0}`, and key handlers. |
28
+ | **P3** | **Focus & Dialogs** | Modals/Dialogs MUST trap focus within the dialog container while open, return focus to trigger on close, and dismiss on `Escape`. |
29
+ | **P4** | **Color Contrast** | Text MUST satisfy WCAG AA 4.5:1 ratio (3.0:1 for large text). Focus rings MUST have at least 3.0:1 contrast against adjacent background. |
30
+ | **P5** | **Form Validation** | Inputs MUST have explicit `<label>` or `aria-labelledby`. Errors MUST use `aria-invalid="true"` and `aria-describedby` pointing to error text. |
31
+
32
+ ---
33
+
34
+ ## 2. Accessible Code Patterns
35
+
36
+ ### Icon-Only Button
37
+ ```tsx
38
+ // โœ… SAFE & ACCESSIBLE
39
+ <button
40
+ type="button"
41
+ onClick={onClose}
42
+ className="p-2 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-800"
43
+ aria-label="Close dialog"
44
+ >
45
+ <XIcon className="w-5 h-5" aria-hidden="true" />
46
+ </button>
47
+ ```
48
+
49
+ ### Accessible Modal Dialog Focus Trap
50
+ ```tsx
51
+ // โœ… SAFE & ACCESSIBLE
52
+ <div
53
+ role="dialog"
54
+ aria-modal="true"
55
+ aria-labelledby="dialog-title"
56
+ aria-describedby="dialog-description"
57
+ className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
58
+ >
59
+ <div className="bg-surface p-6 rounded-xl max-w-md w-full">
60
+ <h2 id="dialog-title" className="text-xl font-bold">Confirm Deletion</h2>
61
+ <p id="dialog-description" className="text-muted mt-2">This action cannot be undone.</p>
62
+ {/* Actions */}
63
+ </div>
64
+ </div>
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Anti-Slop Table
70
+
71
+ | Violation | Accessible Fix | Impact |
72
+ | --- | --- | --- |
73
+ | `<div onClick={submit}>Submit</div>` | `<button type="button" onClick={submit}>Submit</button>` | Fixes screen reader announcement & keyboard trigger |
74
+ | `<button><TrashIcon /></button>` | `<button aria-label="Delete item"><TrashIcon aria-hidden="true" /></button>` | Gives screen reader clear accessible name |
75
+ | `outline: none` in CSS | `:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }` | Restores visible keyboard focus indicator |
76
+
77
+ ---
78
+
79
+ ## ๐Ÿค– LLM-Specific Traps
80
+
81
+ 1. **Stripping Focus Outlines**: Setting `outline: none` without providing a visible `:focus-visible` replacement.
82
+ 2. **Duplicate ARIA Labels**: Putting `aria-label` on both a outer button and inner text/icon simultaneously.
83
+
84
+ ---
85
+
86
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
87
+
88
+ ### โœ… Pre-Flight Self-Audit
89
+
90
+ ```
91
+ โœ… Are all icon buttons properly labeled with aria-label?
92
+ โœ… Can all interactive elements be operated using keyboard only (Tab + Space/Enter)?
93
+ โœ… Do form fields have explicit aria-describedby associations for helper and error text?
94
+ ```
95
+
96
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
97
+
98
+ Test keyboard navigation (`Tab`, `Shift+Tab`, `Escape`) in browser preview before finalizing code.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: fixing-metadata
3
+ description: Audit and fix page metadata including page titles, meta descriptions, Open Graph, Twitter cards, canonical URLs, and JSON-LD structured data.
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: Technical SEO & Metadata Optimization
9
+ tier: pro
10
+ co-requires: [seo-fundamentals, web-quality-audit]
11
+ trigger-signals:
12
+ strong: [fixing-metadata, Open Graph tags, Twitter card metadata, canonical URL, JSON-LD structured data, meta description fix]
13
+ weak: [fix metadata, SEO tags]
14
+ ---
15
+
16
+ # Fixing Metadata โ€” Technical SEO & Open Graph Tags
17
+
18
+ Audit, generate, and fix page metadata for rich social previews, search engine indexing, and structured data.
19
+
20
+ ---
21
+
22
+ ## 4 Metadata Standard Requirements
23
+
24
+ ### 1. Title & Meta Description Length & Formatting
25
+ - **Title Tag**: 50โ€“60 characters max (*"Product Title | Brand Name"*).
26
+ - **Meta Description**: 140โ€“155 characters max. Must contain active call to value without truncating on search result cards.
27
+
28
+ ### 2. Open Graph & Twitter Card Matrix
29
+ ```html
30
+ <!-- Open Graph / Facebook / LinkedIn -->
31
+ <meta property="og:type" content="website" />
32
+ <meta property="og:title" content="UI Skills for Design Engineers" />
33
+ <meta property="og:description" content="A curated collection of design-engineering skills for accessibility, motion, and frontend craft." />
34
+ <meta property="og:image" content="https://example.com/og-image.jpg" />
35
+ <meta property="og:image:width" content="1200" />
36
+ <meta property="og:image:height" content="630" />
37
+
38
+ <!-- Twitter / X -->
39
+ <meta name="twitter:card" content="summary_large_image" />
40
+ <meta name="twitter:title" content="UI Skills for Design Engineers" />
41
+ <meta name="twitter:description" content="A curated collection of design-engineering skills for accessibility, motion, and frontend craft." />
42
+ <meta name="twitter:image" content="https://example.com/twitter-image.jpg" />
43
+ ```
44
+
45
+ ### 3. Canonical Tag Verification
46
+ ```html
47
+ <link rel="canonical" href="https://example.com/current-page-path" />
48
+ ```
49
+
50
+ ### 4. Next.js App Router Metadata Export Example
51
+ ```typescript
52
+ import type { Metadata } from "next";
53
+
54
+ export const metadata: Metadata = {
55
+ title: "UI Skills for Design Engineers",
56
+ description: "Curated design-engineering skills for accessibility, motion, and frontend craft.",
57
+ openGraph: {
58
+ title: "UI Skills for Design Engineers",
59
+ description: "Curated design-engineering skills for accessibility, motion, and frontend craft.",
60
+ url: "https://example.com",
61
+ images: [{ url: "https://example.com/og.jpg", width: 1200, height: 630 }],
62
+ },
63
+ twitter: {
64
+ card: "summary_large_image",
65
+ title: "UI Skills for Design Engineers",
66
+ images: ["https://example.com/twitter.jpg"],
67
+ },
68
+ };
69
+ ```
70
+
71
+ ---
72
+
73
+ ## ๐Ÿค– LLM-Specific Traps
74
+
75
+ 1. **Relative Image URLs in OG Metadata**: Using `<meta property="og:image" content="/og.jpg">` instead of full absolute HTTPS URLs (`https://domain.com/og.jpg`).
76
+ 2. **Missing `summary_large_image`**: Forgetting `twitter:card` type, causing Twitter/X to render a tiny square thumbnail instead of a prominent banner preview.
77
+
78
+ ---
79
+
80
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
81
+
82
+ **Active reviewers: `seo-specialist` ยท `frontend-reviewer`**
83
+
84
+ ### โœ… Pre-Flight Self-Audit
85
+
86
+ ```
87
+ โœ… Are OpenGraph and Twitter card image URLs absolute HTTPS links?
88
+ โœ… Is title length between 50 and 60 characters?
89
+ โœ… Is canonical URL explicitly defined?
90
+ ```
91
+
92
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
93
+
94
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
95
+
96
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
97
+ - โœ… **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.