@kinqs/brainrouter-mcp-server 0.3.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/.env.example +144 -0
- package/README.md +56 -0
- package/agents/README.md +120 -0
- package/agents/code-reviewer.md +97 -0
- package/agents/security-auditor.md +101 -0
- package/agents/test-engineer.md +95 -0
- package/dist/__tests__/agent_mode.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.js +170 -0
- package/dist/__tests__/crypto.test.d.ts +1 -0
- package/dist/__tests__/crypto.test.js +28 -0
- package/dist/__tests__/host-integrations.test.d.ts +1 -0
- package/dist/__tests__/host-integrations.test.js +82 -0
- package/dist/__tests__/integration.test.d.ts +1 -0
- package/dist/__tests__/integration.test.js +50 -0
- package/dist/__tests__/loader.test.d.ts +1 -0
- package/dist/__tests__/loader.test.js +89 -0
- package/dist/__tests__/neural-spark.test.d.ts +1 -0
- package/dist/__tests__/neural-spark.test.js +112 -0
- package/dist/__tests__/pagination.test.d.ts +1 -0
- package/dist/__tests__/pagination.test.js +23 -0
- package/dist/__tests__/redaction.test.d.ts +1 -0
- package/dist/__tests__/redaction.test.js +17 -0
- package/dist/__tests__/registry.test.d.ts +1 -0
- package/dist/__tests__/registry.test.js +56 -0
- package/dist/__tests__/retry.test.d.ts +1 -0
- package/dist/__tests__/retry.test.js +30 -0
- package/dist/__tests__/skill-activation.test.d.ts +1 -0
- package/dist/__tests__/skill-activation.test.js +112 -0
- package/dist/__tests__/working-memory.test.d.ts +1 -0
- package/dist/__tests__/working-memory.test.js +200 -0
- package/dist/__tests__/workspace-paths.test.d.ts +1 -0
- package/dist/__tests__/workspace-paths.test.js +56 -0
- package/dist/__tests__/writer.test.d.ts +1 -0
- package/dist/__tests__/writer.test.js +94 -0
- package/dist/api/auth/crypto.d.ts +4 -0
- package/dist/api/auth/crypto.js +54 -0
- package/dist/api/middleware/auth.d.ts +12 -0
- package/dist/api/middleware/auth.js +90 -0
- package/dist/api/pagination.d.ts +18 -0
- package/dist/api/pagination.js +32 -0
- package/dist/api/routes/auth.d.ts +1 -0
- package/dist/api/routes/auth.js +130 -0
- package/dist/api/routes/chat-completions.d.ts +7 -0
- package/dist/api/routes/chat-completions.js +474 -0
- package/dist/api/routes/contradictions.d.ts +1 -0
- package/dist/api/routes/contradictions.js +28 -0
- package/dist/api/routes/evidence.d.ts +1 -0
- package/dist/api/routes/evidence.js +59 -0
- package/dist/api/routes/governance.d.ts +1 -0
- package/dist/api/routes/governance.js +95 -0
- package/dist/api/routes/graph.d.ts +1 -0
- package/dist/api/routes/graph.js +25 -0
- package/dist/api/routes/hooks.d.ts +1 -0
- package/dist/api/routes/hooks.js +88 -0
- package/dist/api/routes/memories.d.ts +1 -0
- package/dist/api/routes/memories.js +92 -0
- package/dist/api/routes/persona.d.ts +1 -0
- package/dist/api/routes/persona.js +9 -0
- package/dist/api/routes/scenes.d.ts +1 -0
- package/dist/api/routes/scenes.js +35 -0
- package/dist/api/routes/skills.d.ts +1 -0
- package/dist/api/routes/skills.js +14 -0
- package/dist/api/routes/stats.d.ts +1 -0
- package/dist/api/routes/stats.js +8 -0
- package/dist/api/routes/users.d.ts +1 -0
- package/dist/api/routes/users.js +82 -0
- package/dist/api/routes/working.d.ts +1 -0
- package/dist/api/routes/working.js +88 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +492 -0
- package/dist/integrations/claude-code.d.ts +12 -0
- package/dist/integrations/claude-code.js +35 -0
- package/dist/integrations/codex.d.ts +12 -0
- package/dist/integrations/codex.js +34 -0
- package/dist/integrations/generic-mcp.d.ts +52 -0
- package/dist/integrations/generic-mcp.js +118 -0
- package/dist/loader.d.ts +29 -0
- package/dist/loader.js +200 -0
- package/dist/memory/capture.d.ts +35 -0
- package/dist/memory/capture.js +230 -0
- package/dist/memory/config.d.ts +2 -0
- package/dist/memory/config.js +3 -0
- package/dist/memory/engine.d.ts +203 -0
- package/dist/memory/engine.js +626 -0
- package/dist/memory/llm-semaphore.d.ts +41 -0
- package/dist/memory/llm-semaphore.js +81 -0
- package/dist/memory/memory-type-config.d.ts +11 -0
- package/dist/memory/memory-type-config.js +65 -0
- package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
- package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
- package/dist/memory/pipeline/cognitive-dedup.js +38 -0
- package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
- package/dist/memory/pipeline/cognitive-extractor.js +183 -0
- package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
- package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
- package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/focus-direction-shift.js +27 -0
- package/dist/memory/pipeline/graph-builder.d.ts +11 -0
- package/dist/memory/pipeline/graph-builder.js +88 -0
- package/dist/memory/pipeline/graph-recall.d.ts +13 -0
- package/dist/memory/pipeline/graph-recall.js +55 -0
- package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
- package/dist/memory/pipeline/identity-distiller.js +40 -0
- package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/l1-contradiction.js +66 -0
- package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
- package/dist/memory/pipeline/l1-dedup.js +39 -0
- package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
- package/dist/memory/pipeline/l1-extractor.js +180 -0
- package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/l2-direction-shift.js +27 -0
- package/dist/memory/pipeline/l2-scene.d.ts +15 -0
- package/dist/memory/pipeline/l2-scene.js +140 -0
- package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
- package/dist/memory/pipeline/l3-distiller.js +40 -0
- package/dist/memory/pipeline/neural-spark.d.ts +27 -0
- package/dist/memory/pipeline/neural-spark.js +78 -0
- package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
- package/dist/memory/pipeline/skill-prewarm.js +127 -0
- package/dist/memory/pipeline/task-queue.d.ts +54 -0
- package/dist/memory/pipeline/task-queue.js +117 -0
- package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
- package/dist/memory/prompts/cognitive-contradiction.js +25 -0
- package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
- package/dist/memory/prompts/cognitive-extraction.js +114 -0
- package/dist/memory/prompts/core-identity.d.ts +6 -0
- package/dist/memory/prompts/core-identity.js +60 -0
- package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/focus-direction-shift.js +32 -0
- package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/focus-scene-cluster.js +33 -0
- package/dist/memory/prompts/focus-scene.d.ts +7 -0
- package/dist/memory/prompts/focus-scene.js +40 -0
- package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
- package/dist/memory/prompts/graph-extraction-batch.js +54 -0
- package/dist/memory/prompts/graph-extraction.d.ts +2 -0
- package/dist/memory/prompts/graph-extraction.js +53 -0
- package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
- package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
- package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
- package/dist/memory/prompts/l1-contradiction.js +25 -0
- package/dist/memory/prompts/l1-extraction.d.ts +10 -0
- package/dist/memory/prompts/l1-extraction.js +114 -0
- package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/l2-direction-shift.js +32 -0
- package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/l2-scene-cluster.js +33 -0
- package/dist/memory/prompts/l2-scene.d.ts +7 -0
- package/dist/memory/prompts/l2-scene.js +40 -0
- package/dist/memory/prompts/l3-persona.d.ts +6 -0
- package/dist/memory/prompts/l3-persona.js +60 -0
- package/dist/memory/recall.d.ts +47 -0
- package/dist/memory/recall.js +427 -0
- package/dist/memory/redaction.d.ts +1 -0
- package/dist/memory/redaction.js +24 -0
- package/dist/memory/retry.d.ts +13 -0
- package/dist/memory/retry.js +53 -0
- package/dist/memory/scheduler.d.ts +9 -0
- package/dist/memory/scheduler.js +16 -0
- package/dist/memory/skill-hints-loader.d.ts +30 -0
- package/dist/memory/skill-hints-loader.js +100 -0
- package/dist/memory/store/embedding.d.ts +16 -0
- package/dist/memory/store/embedding.js +68 -0
- package/dist/memory/store/reranker.d.ts +24 -0
- package/dist/memory/store/reranker.js +83 -0
- package/dist/memory/store/sqlite.d.ts +167 -0
- package/dist/memory/store/sqlite.js +1816 -0
- package/dist/memory/store/types.d.ts +101 -0
- package/dist/memory/store/types.js +1 -0
- package/dist/memory/types.d.ts +207 -0
- package/dist/memory/types.js +7 -0
- package/dist/memory/validation.d.ts +441 -0
- package/dist/memory/validation.js +129 -0
- package/dist/memory/working/canvas.d.ts +5 -0
- package/dist/memory/working/canvas.js +43 -0
- package/dist/memory/working/offload.d.ts +71 -0
- package/dist/memory/working/offload.js +211 -0
- package/dist/memory/working/step-log.d.ts +16 -0
- package/dist/memory/working/step-log.js +35 -0
- package/dist/registry.d.ts +34 -0
- package/dist/registry.js +305 -0
- package/dist/resolver.d.ts +17 -0
- package/dist/resolver.js +126 -0
- package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
- package/dist/scripts/validate-foreign-workspace-path.js +39 -0
- package/dist/tools/agent_memory_tools.d.ts +485 -0
- package/dist/tools/agent_memory_tools.js +793 -0
- package/dist/tools/create_skill.d.ts +46 -0
- package/dist/tools/create_skill.js +46 -0
- package/dist/tools/get_doc.d.ts +21 -0
- package/dist/tools/get_doc.js +24 -0
- package/dist/tools/get_persona.d.ts +15 -0
- package/dist/tools/get_persona.js +20 -0
- package/dist/tools/get_reference.d.ts +15 -0
- package/dist/tools/get_reference.js +20 -0
- package/dist/tools/get_skill.d.ts +34 -0
- package/dist/tools/get_skill.js +65 -0
- package/dist/tools/get_template_doc.d.ts +21 -0
- package/dist/tools/get_template_doc.js +24 -0
- package/dist/tools/list_docs.d.ts +15 -0
- package/dist/tools/list_docs.js +16 -0
- package/dist/tools/list_skills.d.ts +18 -0
- package/dist/tools/list_skills.js +17 -0
- package/dist/tools/list_template_docs.d.ts +15 -0
- package/dist/tools/list_template_docs.js +16 -0
- package/dist/tools/memory-engineering.d.ts +225 -0
- package/dist/tools/memory-engineering.js +284 -0
- package/dist/tools/memory-explain.d.ts +34 -0
- package/dist/tools/memory-explain.js +109 -0
- package/dist/tools/memory-governance.d.ts +171 -0
- package/dist/tools/memory-governance.js +224 -0
- package/dist/tools/memory-hooks.d.ts +67 -0
- package/dist/tools/memory-hooks.js +102 -0
- package/dist/tools/memory-working.d.ts +98 -0
- package/dist/tools/memory-working.js +101 -0
- package/dist/tools/memory_capture_turn.d.ts +66 -0
- package/dist/tools/memory_capture_turn.js +85 -0
- package/dist/tools/memory_consolidate.d.ts +55 -0
- package/dist/tools/memory_consolidate.js +176 -0
- package/dist/tools/memory_contradictions.d.ts +53 -0
- package/dist/tools/memory_contradictions.js +52 -0
- package/dist/tools/memory_graph_query.d.ts +51 -0
- package/dist/tools/memory_graph_query.js +35 -0
- package/dist/tools/memory_mark_cited.d.ts +43 -0
- package/dist/tools/memory_mark_cited.js +63 -0
- package/dist/tools/memory_recall.d.ts +77 -0
- package/dist/tools/memory_recall.js +81 -0
- package/dist/tools/memory_register_skill_hints.d.ts +49 -0
- package/dist/tools/memory_register_skill_hints.js +55 -0
- package/dist/tools/memory_resolve_session.d.ts +24 -0
- package/dist/tools/memory_resolve_session.js +133 -0
- package/dist/tools/memory_search.d.ts +146 -0
- package/dist/tools/memory_search.js +84 -0
- package/dist/tools/search_skills.d.ts +18 -0
- package/dist/tools/search_skills.js +17 -0
- package/dist/tools/update_doc.d.ts +24 -0
- package/dist/tools/update_doc.js +35 -0
- package/dist/tools/update_skill.d.ts +30 -0
- package/dist/tools/update_skill.js +80 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.js +4 -0
- package/dist/writer.d.ts +30 -0
- package/dist/writer.js +220 -0
- package/docs/TEMPLATE ONLY +1 -0
- package/docs/api/API.md +64 -0
- package/docs/api/security/SECURITY.md +58 -0
- package/docs/deployment/DockerDeployment.md +30 -0
- package/docs/design/Design.md +59 -0
- package/docs/design/themes/apple.md +101 -0
- package/docs/design/themes/dieter-grid.md +100 -0
- package/docs/design/themes/gallery-white.md +100 -0
- package/docs/design/themes/pinterest.md +101 -0
- package/docs/design/themes/realty-open-house.md +101 -0
- package/docs/design/themes/vodafone.md +101 -0
- package/docs/hooks/Hooks.md +30 -0
- package/docs/schema/Schema.md +35 -0
- package/docs/strategy/ScalingStrategy.md +19 -0
- package/package.json +88 -0
- package/references/accessibility-checklist.md +160 -0
- package/references/orchestration-patterns.md +370 -0
- package/references/performance-checklist.md +153 -0
- package/references/security-checklist.md +134 -0
- package/references/testing-patterns.md +236 -0
- package/skills/agent/adr-skill/SKILL.md +299 -0
- package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
- package/skills/agent/bootstrap-skill/SKILL.md +103 -0
- package/skills/agent/context-engineering/SKILL.md +307 -0
- package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
- package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
- package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
- package/skills/agent/handover-skill/SKILL.md +112 -0
- package/skills/agent/idea-refine-skill/SKILL.md +185 -0
- package/skills/agent/idea-refine-skill/examples.md +238 -0
- package/skills/agent/idea-refine-skill/frameworks.md +99 -0
- package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
- package/skills/agent/interview-skill/SKILL.md +226 -0
- package/skills/agent/planning-skill/SKILL.md +270 -0
- package/skills/agent/skill-authoring/SKILL.md +189 -0
- package/skills/agent/source-driven-skill/SKILL.md +197 -0
- package/skills/agent/spec-driven-skill/SKILL.md +221 -0
- package/skills/agent/sync-skill/SKILL.md +92 -0
- package/skills/agent/using-agent-skills/SKILL.md +189 -0
- package/skills/api/a11y-skill/SKILL.md +88 -0
- package/skills/api/api-skill/SKILL.md +123 -0
- package/skills/api/auth-skill/SKILL.md +80 -0
- package/skills/api/debug-skill/SKILL.md +535 -0
- package/skills/api/performance-skill/SKILL.md +100 -0
- package/skills/api/testing-skill/SKILL.md +100 -0
- package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
- package/skills/codebase/code-simplification/SKILL.md +352 -0
- package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
- package/skills/codebase/concerns-skill/SKILL.md +89 -0
- package/skills/codebase/conventions-skill/SKILL.md +95 -0
- package/skills/codebase/doc-management-skill/SKILL.md +47 -0
- package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
- package/skills/communication/1-3-1-rule/SKILL.md +120 -0
- package/skills/design/brutalist-skill/SKILL.md +131 -0
- package/skills/design/concept-diagrams/SKILL.md +387 -0
- package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/skills/design/concept-diagrams/templates/template.html +174 -0
- package/skills/design/gpt-tasteskill/SKILL.md +114 -0
- package/skills/design/minimalist-skill/SKILL.md +116 -0
- package/skills/design/output-skill/SKILL.md +87 -0
- package/skills/design/redesign-skill/SKILL.md +213 -0
- package/skills/design/soft-skill/SKILL.md +132 -0
- package/skills/design/stitch-skill/EXAMPLE.md +121 -0
- package/skills/design/stitch-skill/SKILL.md +222 -0
- package/skills/design/taste-skill/SKILL.md +269 -0
- package/skills/devops/ci-cd-skill/SKILL.md +402 -0
- package/skills/devops/docker-skill/SKILL.md +297 -0
- package/skills/devops/domain-skill/SKILL.md +234 -0
- package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
- package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
- package/skills/lifecycle/migration-skill/SKILL.md +218 -0
- package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
- package/skills/memory/agent-memory/SKILL.md +122 -0
- package/skills/qa/browser-testing-skill/SKILL.md +314 -0
- package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stitch-skill
|
|
3
|
+
description: Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.
|
|
4
|
+
hints:
|
|
5
|
+
- "Produce highly detailed, descriptive DESIGN.md rules mapping tokens to concrete hex parameters."
|
|
6
|
+
- "Calibrate colors with a single accent under 80% saturation, strictly banning neon or purple glow elements."
|
|
7
|
+
- "Define custom display typography constraints, banning default Inter and generic serif configurations."
|
|
8
|
+
- "Implement signature layout structures like inline visual typography inside macro headlines."
|
|
9
|
+
- "Mandate weight-calibrated spring physics and staggered children mounting for lists."
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Stitch Design Taste — Semantic Design System Skill
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
This skill generates `DESIGN.md` files optimized for Google Stitch screen generation. It translates the battle-tested anti-slop frontend engineering directives into Stitch's native semantic design language — descriptive, natural-language rules paired with precise values that Stitch's AI agent can interpret to produce premium, non-generic interfaces.
|
|
16
|
+
|
|
17
|
+
The generated `DESIGN.md` serves as the **single source of truth** for prompting Stitch to generate new screens that align with a curated, high-agency design language. Stitch interprets design through **"Visual Descriptions"** supported by specific color values, typography specs, and component behaviors.
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
- Access to Google Stitch via [labs.google.com/stitch](https://labs.google.com/stitch)
|
|
21
|
+
- Optionally: Stitch MCP Server for programmatic integration with Cursor, Antigravity, or Gemini CLI
|
|
22
|
+
|
|
23
|
+
## The Goal
|
|
24
|
+
Generate a `DESIGN.md` file that encodes:
|
|
25
|
+
1. **Visual atmosphere** — the mood, density, and design philosophy
|
|
26
|
+
2. **Color calibration** — neutrals, accents, and banned patterns with hex codes
|
|
27
|
+
3. **Typographic architecture** — font stacks, scale hierarchy, and anti-patterns
|
|
28
|
+
4. **Component behaviors** — buttons, cards, inputs with interaction states
|
|
29
|
+
5. **Layout principles** — grid systems, spacing philosophy, responsive strategy
|
|
30
|
+
6. **Motion philosophy** — animation engine specs, spring physics, perpetual micro-interactions
|
|
31
|
+
7. **Anti-patterns** — explicit list of banned AI design clichés
|
|
32
|
+
|
|
33
|
+
## Analysis & Synthesis Instructions
|
|
34
|
+
|
|
35
|
+
### 1. Define the Atmosphere
|
|
36
|
+
Evaluate the target project's intent. Use evocative adjectives from the taste spectrum:
|
|
37
|
+
- **Density:** "Art Gallery Airy" (1–3) → "Daily App Balanced" (4–7) → "Cockpit Dense" (8–10)
|
|
38
|
+
- **Variance:** "Predictable Symmetric" (1–3) → "Offset Asymmetric" (4–7) → "Artsy Chaotic" (8–10)
|
|
39
|
+
- **Motion:** "Static Restrained" (1–3) → "Fluid CSS" (4–7) → "Cinematic Choreography" (8–10)
|
|
40
|
+
|
|
41
|
+
Default baseline: Variance 8, Motion 6, Density 4. Adapt dynamically based on user's vibe description.
|
|
42
|
+
|
|
43
|
+
### 2. Map the Color Palette
|
|
44
|
+
For each color provide: **Descriptive Name** + **Hex Code** + **Functional Role**.
|
|
45
|
+
|
|
46
|
+
**Mandatory constraints:**
|
|
47
|
+
- Maximum 1 accent color. Saturation below 80%
|
|
48
|
+
- The "AI Purple/Blue Neon" aesthetic is strictly BANNED — no purple button glows, no neon gradients
|
|
49
|
+
- Use absolute neutral bases (Zinc/Slate) with high-contrast singular accents
|
|
50
|
+
- Stick to one palette for the entire output — no warm/cool gray fluctuation
|
|
51
|
+
- Never use pure black (`#000000`) — use Off-Black, Zinc-950, or Charcoal
|
|
52
|
+
|
|
53
|
+
### 3. Establish Typography Rules
|
|
54
|
+
- **Display/Headlines:** Track-tight, controlled scale. Not screaming. Hierarchy through weight and color, not just massive size
|
|
55
|
+
- **Body:** Relaxed leading, max 65 characters per line
|
|
56
|
+
- **Font Selection:** `Inter` is BANNED for premium/creative contexts. Force unique character: `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`
|
|
57
|
+
- **Serif Ban:** Generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`, `Palatino`) are BANNED. If serif is needed for editorial/creative contexts, use only distinctive modern serifs: `Fraunces`, `Gambarino`, `Editorial New`, or `Instrument Serif`. Serif is always BANNED in dashboards or software UIs
|
|
58
|
+
- **Dashboard Constraint:** Use Sans-Serif pairings exclusively (`Geist` + `Geist Mono` or `Satoshi` + `JetBrains Mono`)
|
|
59
|
+
- **High-Density Override:** When density exceeds 7, all numbers must use Monospace
|
|
60
|
+
|
|
61
|
+
### 4. Define the Hero Section
|
|
62
|
+
The Hero is the first impression and must be creative, striking, and never generic:
|
|
63
|
+
- **Inline Image Typography:** Embed small, contextual photos or visuals directly between words or letters in the headline. Images sit inline at type-height, rounded, acting as visual punctuation. This is the signature creative technique
|
|
64
|
+
- **No Overlapping:** Text must never overlap images or other text. Every element occupies its own clean spatial zone
|
|
65
|
+
- **No Filler Text:** "Scroll to explore", "Swipe down", scroll arrow icons, bouncing chevrons are BANNED. The content should pull users in naturally
|
|
66
|
+
- **Asymmetric Structure:** Centered Hero layouts BANNED when variance exceeds 4
|
|
67
|
+
- **CTA Restraint:** Maximum one primary CTA. No secondary "Learn more" links
|
|
68
|
+
|
|
69
|
+
### 5. Describe Component Stylings
|
|
70
|
+
For each component type, describe shape, color, shadow depth, and interaction behavior:
|
|
71
|
+
- **Buttons:** Tactile push feedback on active state. No neon outer glows. No custom mouse cursors
|
|
72
|
+
- **Cards:** Use ONLY when elevation communicates hierarchy. Tint shadows to background hue. For high-density layouts, replace cards with border-top dividers or negative space
|
|
73
|
+
- **Inputs/Forms:** Label above input, helper text optional, error text below. Standard gap spacing
|
|
74
|
+
- **Loading States:** Skeletal loaders matching layout dimensions — no generic circular spinners
|
|
75
|
+
- **Empty States:** Composed compositions indicating how to populate data
|
|
76
|
+
- **Error States:** Clear, inline error reporting
|
|
77
|
+
|
|
78
|
+
### 6. Define Layout Principles
|
|
79
|
+
- No overlapping elements — every element occupies its own clear spatial zone. No absolute-positioned content stacking
|
|
80
|
+
- Centered Hero sections are BANNED when variance exceeds 4 — force Split Screen, Left-Aligned, or Asymmetric Whitespace
|
|
81
|
+
- The generic "3 equal cards horizontally" feature row is BANNED — use 2-column Zig-Zag, asymmetric grid, or horizontal scroll
|
|
82
|
+
- CSS Grid over Flexbox math — never use `calc()` percentage hacks
|
|
83
|
+
- Contain layouts using max-width constraints (e.g., 1400px centered)
|
|
84
|
+
- Full-height sections must use `min-h-[100dvh]` — never `h-screen` (iOS Safari catastrophic jump)
|
|
85
|
+
|
|
86
|
+
### 7. Define Responsive Rules
|
|
87
|
+
Every design must work across all viewports:
|
|
88
|
+
- **Mobile-First Collapse (< 768px):** All multi-column layouts collapse to single column. No exceptions
|
|
89
|
+
- **No Horizontal Scroll:** Horizontal overflow on mobile is a critical failure
|
|
90
|
+
- **Typography Scaling:** Headlines scale via `clamp()`. Body text minimum `1rem`/`14px`
|
|
91
|
+
- **Touch Targets:** All interactive elements minimum `44px` tap target
|
|
92
|
+
- **Image Behavior:** Inline typography images (photos between words) stack below headline on mobile
|
|
93
|
+
- **Navigation:** Desktop horizontal nav collapses to clean mobile menu
|
|
94
|
+
- **Spacing:** Vertical section gaps reduce proportionally (`clamp(3rem, 8vw, 6rem)`)
|
|
95
|
+
|
|
96
|
+
### 8. Encode Motion Philosophy
|
|
97
|
+
- **Spring Physics default:** `stiffness: 100, damping: 20` — premium, weighty feel. No linear easing
|
|
98
|
+
- **Perpetual Micro-Interactions:** Every active component should have an infinite loop state (Pulse, Typewriter, Float, Shimmer)
|
|
99
|
+
- **Staggered Orchestration:** Never mount lists instantly — use cascade delays for waterfall reveals
|
|
100
|
+
- **Performance:** Animate exclusively via `transform` and `opacity`. Never animate `top`, `left`, `width`, `height`. Grain/noise filters on fixed pseudo-elements only
|
|
101
|
+
|
|
102
|
+
### 9. List Anti-Patterns (AI Tells)
|
|
103
|
+
Encode these as explicit "NEVER DO" rules in the DESIGN.md:
|
|
104
|
+
- No emojis anywhere
|
|
105
|
+
- No `Inter` font
|
|
106
|
+
- No generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`) — distinctive modern serifs only if needed
|
|
107
|
+
- No pure black (`#000000`)
|
|
108
|
+
- No neon/outer glow shadows
|
|
109
|
+
- No oversaturated accents
|
|
110
|
+
- No excessive gradient text on large headers
|
|
111
|
+
- No custom mouse cursors
|
|
112
|
+
- No overlapping elements — clean spatial separation always
|
|
113
|
+
- No 3-column equal card layouts
|
|
114
|
+
- No generic names ("John Doe", "Acme", "Nexus")
|
|
115
|
+
- No fake round numbers (`99.99%`, `50%`)
|
|
116
|
+
- No AI copywriting clichés ("Elevate", "Seamless", "Unleash", "Next-Gen")
|
|
117
|
+
- No filler UI text: "Scroll to explore", "Swipe down", scroll arrows, bouncing chevrons
|
|
118
|
+
- No broken Unsplash links — use `picsum.photos` or SVG avatars
|
|
119
|
+
- No centered Hero sections (for high-variance projects)
|
|
120
|
+
|
|
121
|
+
## Output Format (DESIGN.md Structure)
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
# Design System: [Project Title]
|
|
125
|
+
|
|
126
|
+
## 1. Visual Theme & Atmosphere
|
|
127
|
+
(Evocative description of the mood, density, variance, and motion intensity.
|
|
128
|
+
Example: "A restrained, gallery-airy interface with confident asymmetric layouts
|
|
129
|
+
and fluid spring-physics motion. The atmosphere is clinical yet warm — like a
|
|
130
|
+
well-lit architecture studio.")
|
|
131
|
+
|
|
132
|
+
## 2. Color Palette & Roles
|
|
133
|
+
- **Canvas White** (#F9FAFB) — Primary background surface
|
|
134
|
+
- **Pure Surface** (#FFFFFF) — Card and container fill
|
|
135
|
+
- **Charcoal Ink** (#18181B) — Primary text, Zinc-950 depth
|
|
136
|
+
- **Muted Steel** (#71717A) — Secondary text, descriptions, metadata
|
|
137
|
+
- **Whisper Border** (rgba(226,232,240,0.5)) — Card borders, 1px structural lines
|
|
138
|
+
- **[Accent Name]** (#XXXXXX) — Single accent for CTAs, active states, focus rings
|
|
139
|
+
(Max 1 accent. Saturation < 80%. No purple/neon.)
|
|
140
|
+
|
|
141
|
+
## 3. Typography Rules
|
|
142
|
+
- **Display:** [Font Name] — Track-tight, controlled scale, weight-driven hierarchy
|
|
143
|
+
- **Body:** [Font Name] — Relaxed leading, 65ch max-width, neutral secondary color
|
|
144
|
+
- **Mono:** [Font Name] — For code, metadata, timestamps, high-density numbers
|
|
145
|
+
- **Banned:** Inter, generic system fonts for premium contexts. Serif fonts banned in dashboards.
|
|
146
|
+
|
|
147
|
+
## 4. Component Stylings
|
|
148
|
+
* **Buttons:** Flat, no outer glow. Tactile -1px translate on active. Accent fill for primary, ghost/outline for secondary.
|
|
149
|
+
* **Cards:** Generously rounded corners (2.5rem). Diffused whisper shadow. Used only when elevation serves hierarchy. High-density: replace with border-top dividers.
|
|
150
|
+
* **Inputs:** Label above, error below. Focus ring in accent color. No floating labels.
|
|
151
|
+
* **Loaders:** Skeletal shimmer matching exact layout dimensions. No circular spinners.
|
|
152
|
+
* **Empty States:** Composed, illustrated compositions — not just "No data" text.
|
|
153
|
+
|
|
154
|
+
## 5. Layout Principles
|
|
155
|
+
(Grid-first responsive architecture. Asymmetric splits for Hero sections.
|
|
156
|
+
Strict single-column collapse below 768px. Max-width containment.
|
|
157
|
+
No flexbox percentage math. Generous internal padding.)
|
|
158
|
+
|
|
159
|
+
## 6. Motion & Interaction
|
|
160
|
+
(Spring physics for all interactive elements. Staggered cascade reveals.
|
|
161
|
+
Perpetual micro-loops on active dashboard components. Hardware-accelerated
|
|
162
|
+
transforms only. Isolated Client Components for CPU-heavy animations.)
|
|
163
|
+
|
|
164
|
+
## 7. Anti-Patterns (Banned)
|
|
165
|
+
(Explicit list of forbidden patterns: no emojis, no Inter, no pure black,
|
|
166
|
+
no neon glows, no 3-column equal grids, no AI copywriting clichés,
|
|
167
|
+
no generic placeholder names, no broken image links.)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Best Practices
|
|
171
|
+
- **Be Descriptive:** "Deep Charcoal Ink (#18181B)" — not just "dark text"
|
|
172
|
+
- **Be Functional:** Explain what each element is used for
|
|
173
|
+
- **Be Consistent:** Same terminology throughout the document
|
|
174
|
+
- **Be Precise:** Include exact hex codes, rem values, pixel values in parentheses
|
|
175
|
+
- **Be Opinionated:** This is not a neutral template — it enforces a specific, premium aesthetic
|
|
176
|
+
|
|
177
|
+
## Tips for Success
|
|
178
|
+
1. Start with the atmosphere — understand the vibe before detailing tokens
|
|
179
|
+
2. Look for patterns — identify consistent spacing, sizing, and styling
|
|
180
|
+
3. Think semantically — name colors by purpose, not just appearance
|
|
181
|
+
4. Consider hierarchy — document how visual weight communicates importance
|
|
182
|
+
5. Encode the bans — anti-patterns are as important as the rules themselves
|
|
183
|
+
|
|
184
|
+
## Common Pitfalls to Avoid
|
|
185
|
+
- Using technical jargon without translation ("rounded-xl" instead of "generously rounded corners")
|
|
186
|
+
- Omitting hex codes or using only descriptive names
|
|
187
|
+
- Forgetting functional roles of design elements
|
|
188
|
+
- Being too vague in atmosphere descriptions
|
|
189
|
+
- Ignoring the anti-pattern list — these are what make the output premium
|
|
190
|
+
- Defaulting to generic "safe" designs instead of enforcing the curated aesthetic
|
|
191
|
+
|
|
192
|
+
## When to Use
|
|
193
|
+
- **Use when:** Working with Google Stitch, authoring premium design guidelines inside standard folders to guide AI generations, or standardizing UI directives for agent-driven frontends.
|
|
194
|
+
- **NOT for:** Designing simple code snippets that do not require external guidelines, or when writing styling configurations in pure code without building a design documentation layout.
|
|
195
|
+
|
|
196
|
+
## Workflow
|
|
197
|
+
1. **Audit Mood & Density:** Select numerical values for density, variance, and motion.
|
|
198
|
+
2. **Standardize Palette:** Write hex codes and roles for canvas, surface, ink, and a single accent.
|
|
199
|
+
3. **Map Typography:** Select unique display and body fonts, explicitly banning Inter.
|
|
200
|
+
4. **Draft Component States:** Document button translations, nested card rules, input offsets, and loading skeletons.
|
|
201
|
+
5. **Output DESIGN.md:** Export the complete, structured design specification file to the project folder.
|
|
202
|
+
|
|
203
|
+
## Common Rationalizations
|
|
204
|
+
| Rationalization | Reality |
|
|
205
|
+
|---|---|
|
|
206
|
+
| A short list of colors is enough for the agent | The agent needs absolute constraints (like hex codes, roles, and explicit bans) to prevent returning standard AI blue/purple layouts. |
|
|
207
|
+
| Writing standard Tailwind rules is fine | Stitch works best with natural-language architectural visual descriptions supported by precise tokens. |
|
|
208
|
+
| I can skip listing the banned patterns | Listing the explicit bans prevents the agent from falling back on its statistical defaults during subsequent screen generation steps. |
|
|
209
|
+
|
|
210
|
+
## Red Flags
|
|
211
|
+
- Presence of generic placeholders or empty lists in generated `DESIGN.md` assets.
|
|
212
|
+
- Suggestions of Inter or Times New Roman in premium UI specifications.
|
|
213
|
+
- Allowing multiple distinct accent colors or glowing shadows in the instructions.
|
|
214
|
+
- Lack of mobile collapse strategies or single-column directives in the layout section.
|
|
215
|
+
|
|
216
|
+
## Verification
|
|
217
|
+
After completing the skill, confirm:
|
|
218
|
+
- [ ] A complete `DESIGN.md` was generated with all required sections populated.
|
|
219
|
+
- [ ] Only one accent color is defined with saturation explicitly limited.
|
|
220
|
+
- [ ] An explicit section detailing anti-patterns and AI tells is included.
|
|
221
|
+
- [ ] The generated system focuses on descriptive, high-agency typography and layout rules.
|
|
222
|
+
- [ ] Automatic mobile-first collapse rules are documented.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: taste-skill
|
|
3
|
+
description: Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.
|
|
4
|
+
hints:
|
|
5
|
+
- "Apply all directives based on configurable DESIGN_VARIANCE, MOTION_INTENSITY, and VISUAL_DENSITY knobs before writing code."
|
|
6
|
+
- "Verify dependencies in package.json before importing any 3rd party library."
|
|
7
|
+
- "Default to React Server Components with isolated 'use client' islands for interactivity and animations."
|
|
8
|
+
- "Use CSS Grid exclusively over flexbox percentage math for multi-column structures."
|
|
9
|
+
- "Animate only transform and opacity properties; never animate top, left, width, or height."
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# High-Agency Frontend Skill
|
|
13
|
+
|
|
14
|
+
## 1. ACTIVE BASELINE CONFIGURATION
|
|
15
|
+
* DESIGN_VARIANCE: 8 (1=Perfect Symmetry, 10=Artsy Chaos)
|
|
16
|
+
* MOTION_INTENSITY: 6 (1=Static/No movement, 10=Cinematic/Magic Physics)
|
|
17
|
+
* VISUAL_DENSITY: 4 (1=Art Gallery/Airy, 10=Pilot Cockpit/Packed Data)
|
|
18
|
+
|
|
19
|
+
**AI Instruction:** The standard baseline for all generations is strictly set to these values (8, 6, 4). Do not ask the user to edit this file. Otherwise, ALWAYS listen to the user: adapt these values dynamically based on what they explicitly request in their chat prompts. Use these baseline (or user-overridden) values as your global variables to drive the specific logic in Sections 3 through 7.
|
|
20
|
+
|
|
21
|
+
## 2. DEFAULT ARCHITECTURE & CONVENTIONS
|
|
22
|
+
Unless the user explicitly specifies a different stack, adhere to these structural constraints to maintain consistency:
|
|
23
|
+
|
|
24
|
+
* **DOCUMENTATION VERIFICATION [MANDATORY]:** Before making design decisions, you MUST run `list_template_docs` and use `get_template_doc` to read target design or theme constraints (e.g., from `docs/design` or `docs/theme`). The design documentation must guide your architectural choices.
|
|
25
|
+
* **DEPENDENCY VERIFICATION [MANDATORY]:** Before importing ANY 3rd party library (e.g. `framer-motion`, `lucide-react`, `zustand`), you MUST check `package.json`. If the package is missing, you MUST output the installation command (e.g. `npm install package-name`) before providing the code. **Never** assume a library exists.
|
|
26
|
+
* **Framework & Interactivity:** React or Next.js. Default to Server Components (`RSC`).
|
|
27
|
+
* **RSC SAFETY:** Global state works ONLY in Client Components. In Next.js, wrap providers in a `"use client"` component.
|
|
28
|
+
* **INTERACTIVITY ISOLATION:** If Sections 4 or 7 (Motion/Liquid Glass) are active, the specific interactive UI component MUST be extracted as an isolated leaf component with `'use client'` at the very top. Server Components must exclusively render static layouts.
|
|
29
|
+
* **State Management:** Use local `useState`/`useReducer` for isolated UI. Use global state strictly for deep prop-drilling avoidance.
|
|
30
|
+
* **Styling Policy:** Use Tailwind CSS (v3/v4) for 90% of styling.
|
|
31
|
+
* **TAILWIND VERSION LOCK:** Check `package.json` first. Do not use v4 syntax in v3 projects.
|
|
32
|
+
* **T4 CONFIG GUARD:** For v4, do NOT use `tailwindcss` plugin in `postcss.config.js`. Use `@tailwindcss/postcss` or the Vite plugin.
|
|
33
|
+
* **ANTI-EMOJI POLICY [CRITICAL]:** NEVER use emojis in code, markup, text content, or alt text. Replace symbols with high-quality icons (Radix, Phosphor) or clean SVG primitives. Emojis are BANNED.
|
|
34
|
+
* **Responsiveness & Spacing:**
|
|
35
|
+
* Standardize breakpoints (`sm`, `md`, `lg`, `xl`).
|
|
36
|
+
* Contain page layouts using `max-w-[1400px] mx-auto` or `max-w-7xl`.
|
|
37
|
+
* **Viewport Stability [CRITICAL]:** NEVER use `h-screen` for full-height Hero sections. ALWAYS use `min-h-[100dvh]` to prevent catastrophic layout jumping on mobile browsers (iOS Safari).
|
|
38
|
+
* **Grid over Flex-Math:** NEVER use complex flexbox percentage math (`w-[calc(33%-1rem)]`). ALWAYS use CSS Grid (`grid grid-cols-1 md:grid-cols-3 gap-6`) for reliable structures.
|
|
39
|
+
* **Icons:** You MUST use exactly `@phosphor-icons/react` or `@radix-ui/react-icons` as the import paths (check installed version). Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`).
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 3. DESIGN ENGINEERING DIRECTIVES (Bias Correction)
|
|
43
|
+
LLMs have statistical biases toward specific UI cliché patterns. Proactively construct premium interfaces using these engineered rules:
|
|
44
|
+
|
|
45
|
+
**Rule 1: Deterministic Typography**
|
|
46
|
+
* **Display/Headlines:** Default to `text-4xl md:text-6xl tracking-tighter leading-none`.
|
|
47
|
+
* **ANTI-SLOP:** Discourage `Inter` for "Premium" or "Creative" vibes. Force unique character using `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`.
|
|
48
|
+
* **TECHNICAL UI RULE:** Serif fonts are strictly BANNED for Dashboard/Software UIs. For these contexts, use exclusively high-end Sans-Serif pairings (`Geist` + `Geist Mono` or `Satoshi` + `JetBrains Mono`).
|
|
49
|
+
* **Body/Paragraphs:** Default to `text-base text-gray-600 leading-relaxed max-w-[65ch]`.
|
|
50
|
+
|
|
51
|
+
**Rule 2: Color Calibration**
|
|
52
|
+
* **Constraint:** Max 1 Accent Color. Saturation < 80%.
|
|
53
|
+
* **THE LILA BAN:** The "AI Purple/Blue" aesthetic is strictly BANNED. No purple button glows, no neon gradients. Use absolute neutral bases (Zinc/Slate) with high-contrast, singular accents (e.g. Emerald, Electric Blue, or Deep Rose).
|
|
54
|
+
* **COLOR CONSISTENCY:** Stick to one palette for the entire output. Do not fluctuate between warm and cool grays within the same project.
|
|
55
|
+
|
|
56
|
+
**Rule 3: Layout Diversification**
|
|
57
|
+
* **ANTI-CENTER BIAS:** Centered Hero/H1 sections are strictly BANNED when `LAYOUT_VARIANCE > 4`. Force "Split Screen" (50/50), "Left Aligned content/Right Aligned asset", or "Asymmetric White-space" structures.
|
|
58
|
+
|
|
59
|
+
**Rule 4: Materiality, Shadows, and "Anti-Card Overuse"**
|
|
60
|
+
* **DASHBOARD HARDENING:** For `VISUAL_DENSITY > 7`, generic card containers are strictly BANNED. Use logic-grouping via `border-t`, `divide-y`, or purely negative space. Data metrics should breathe without being boxed in unless elevation (z-index) is functionally required.
|
|
61
|
+
* **Execution:** Use cards ONLY when elevation communicates hierarchy. When a shadow is used, tint it to the background hue.
|
|
62
|
+
|
|
63
|
+
**Rule 5: Interactive UI States**
|
|
64
|
+
* **Mandatory Generation:** LLMs naturally generate "static" successful states. You MUST implement full interaction cycles:
|
|
65
|
+
* **Loading:** Skeletal loaders matching layout sizes (avoid generic circular spinners).
|
|
66
|
+
* **Empty States:** Beautifully composed empty states indicating how to populate data.
|
|
67
|
+
* **Error States:** Clear, inline error reporting (e.g., forms).
|
|
68
|
+
* **Tactile Feedback:** On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push indicating success/action.
|
|
69
|
+
|
|
70
|
+
**Rule 6: Data & Form Patterns**
|
|
71
|
+
* **Forms:** Label MUST sit above input. Helper text is optional but should exist in markup. Error text below input. Use a standard `gap-2` for input blocks.
|
|
72
|
+
|
|
73
|
+
## 4. CREATIVE PROACTIVITY (Anti-Slop Implementation)
|
|
74
|
+
To actively combat generic AI designs, systematically implement these high-end coding concepts as your baseline:
|
|
75
|
+
* **"Liquid Glass" Refraction:** When glassmorphism is needed, go beyond `backdrop-blur`. Add a 1px inner border (`border-white/10`) and a subtle inner shadow (`shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]`) to simulate physical edge refraction.
|
|
76
|
+
* **Magnetic Micro-physics (If MOTION_INTENSITY > 5):** Implement buttons that pull slightly toward the mouse cursor. **CRITICAL:** NEVER use React `useState` for magnetic hover or continuous animations. Use EXCLUSIVELY Framer Motion's `useMotionValue` and `useTransform` outside the React render cycle to prevent performance collapse on mobile.
|
|
77
|
+
* **Perpetual Micro-Interactions:** When `MOTION_INTENSITY > 5`, embed continuous, infinite micro-animations (Pulse, Typewriter, Float, Shimmer, Carousel) in standard components (avatars, status dots, backgrounds). Apply premium Spring Physics (`type: "spring", stiffness: 100, damping: 20`) to all interactive elements—no linear easing.
|
|
78
|
+
* **Layout Transitions:** Always utilize Framer Motion's `layout` and `layoutId` props for smooth re-ordering, resizing, and shared element transitions across state changes.
|
|
79
|
+
* **Staggered Orchestration:** Do not mount lists or grids instantly. Use `staggerChildren` (Framer) or CSS cascade (`animation-delay: calc(var(--index) * 100ms)`) to create sequential waterfall reveals. **CRITICAL:** For `staggerChildren`, the Parent (`variants`) and Children MUST reside in the identical Client Component tree. If data is fetched asynchronously, pass the data as props into a centralized Parent Motion wrapper.
|
|
80
|
+
|
|
81
|
+
## 5. PERFORMANCE GUARDRAILS
|
|
82
|
+
* **DOM Cost:** Apply grain/noise filters exclusively to fixed, pointer-event-none pseudo-elements (e.g., `fixed inset-0 z-50 pointer-events-none`) and NEVER to scrolling containers to prevent continuous GPU repaints and mobile performance degradation.
|
|
83
|
+
* **Hardware Acceleration:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`.
|
|
84
|
+
* **Z-Index Restraint:** NEVER spam arbitrary `z-50` or `z-10` unprompted. Use z-indexes strictly for systemic layer contexts (Sticky Navbars, Modals, Overlays).
|
|
85
|
+
|
|
86
|
+
## 6. TECHNICAL REFERENCE (Dial Definitions)
|
|
87
|
+
|
|
88
|
+
### DESIGN_VARIANCE (Level 1-10)
|
|
89
|
+
* **1-3 (Predictable):** Flexbox `justify-center`, strict 12-column symmetrical grids, equal paddings.
|
|
90
|
+
* **4-7 (Offset):** Use `margin-top: -2rem` overlapping, varied image aspect ratios (e.g., 4:3 next to 16:9), left-aligned headers over center-aligned data.
|
|
91
|
+
* **8-10 (Asymmetric):** Masonry layouts, CSS Grid with fractional units (e.g., `grid-template-columns: 2fr 1fr 1fr`), massive empty zones (`padding-left: 20vw`).
|
|
92
|
+
* **MOBILE OVERRIDE:** For levels 4-10, any asymmetric layout above `md:` MUST aggressively fall back to a strict, single-column layout (`w-full`, `px-4`, `py-8`) on viewports `< 768px` to prevent horizontal scrolling and layout breakage.
|
|
93
|
+
|
|
94
|
+
### MOTION_INTENSITY (Level 1-10)
|
|
95
|
+
* **1-3 (Static):** No automatic animations. CSS `:hover` and `:active` states only.
|
|
96
|
+
* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. Use `will-change: transform` sparingly.
|
|
97
|
+
* **8-10 (Advanced Choreography):** Complex scroll-triggered reveals or parallax. Use Framer Motion hooks. NEVER use `window.addEventListener('scroll')`.
|
|
98
|
+
|
|
99
|
+
### VISUAL_DENSITY (Level 1-10)
|
|
100
|
+
* **1-3 (Art Gallery Mode):** Lots of white space. Huge section gaps. Everything feels very expensive and clean.
|
|
101
|
+
* **4-7 (Daily App Mode):** Normal spacing for standard web apps.
|
|
102
|
+
* **8-10 (Cockpit Mode):** Tiny paddings. No card boxes; just 1px lines to separate data. Everything is packed. **Mandatory:** Use Monospace (`font-mono`) for all numbers.
|
|
103
|
+
|
|
104
|
+
## 7. AI TELLS (Forbidden Patterns)
|
|
105
|
+
To guarantee a premium, non-generic output, you MUST strictly avoid these common AI design signatures unless explicitly requested:
|
|
106
|
+
|
|
107
|
+
### Visual & CSS
|
|
108
|
+
* **NO Neon/Outer Glows:** Do not use default `box-shadow` glows or auto-glows. Use inner borders or subtle tinted shadows.
|
|
109
|
+
* **NO Pure Black:** Never use `#000000`. Use Off-Black, Zinc-950, or Charcoal.
|
|
110
|
+
* **NO Oversaturated Accents:** Desaturate accents to blend elegantly with neutrals.
|
|
111
|
+
* **NO Excessive Gradient Text:** Do not use text-fill gradients for large headers.
|
|
112
|
+
* **NO Custom Mouse Cursors:** They are outdated and ruin performance/accessibility.
|
|
113
|
+
|
|
114
|
+
### Typography
|
|
115
|
+
* **NO Inter Font:** Banned. Use `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`.
|
|
116
|
+
* **NO Oversized H1s:** The first heading should not scream. Control hierarchy with weight and color, not just massive scale.
|
|
117
|
+
* **Serif Constraints:** Use Serif fonts ONLY for creative/editorial designs. **NEVER** use Serif on clean Dashboards.
|
|
118
|
+
|
|
119
|
+
### Layout & Spacing
|
|
120
|
+
* **Align & Space Perfectly:** Ensure padding and margins are mathematically perfect. Avoid floating elements with awkward gaps.
|
|
121
|
+
* **NO 3-Column Card Layouts:** The generic "3 equal cards horizontally" feature row is BANNED. Use a 2-column Zig-Zag, asymmetric grid, or horizontal scrolling approach instead.
|
|
122
|
+
|
|
123
|
+
### Content & Data (The "Jane Doe" Effect)
|
|
124
|
+
* **NO Generic Names:** "John Doe", "Sarah Chan", or "Jack Su" are banned. Use highly creative, realistic-sounding names.
|
|
125
|
+
* **NO Generic Avatars:** DO NOT use standard SVG "egg" or Lucide user icons for avatars. Use creative, believable photo placeholders or specific styling.
|
|
126
|
+
* **NO Fake Numbers:** Avoid predictable outputs like `99.99%`, `50%`, or basic phone numbers (`1234567`). Use organic, messy data (`47.2%`, `+1 (312) 847-1928`).
|
|
127
|
+
* **NO Startup Slop Names:** "Acme", "Nexus", "SmartFlow". Invent premium, contextual brand names.
|
|
128
|
+
* **NO Filler Words:** Avoid AI copywriting clichés like "Elevate", "Seamless", "Unleash", or "Next-Gen". Use concrete verbs.
|
|
129
|
+
|
|
130
|
+
### External Resources & Components
|
|
131
|
+
* **NO Broken Unsplash Links:** Do not use Unsplash. Use absolute, reliable placeholders like `https://picsum.photos/seed/{random_string}/800/600` or SVG UI Avatars.
|
|
132
|
+
* **shadcn/ui Customization:** You may use `shadcn/ui`, but NEVER in its generic default state. You MUST customize the radii, colors, and shadows to match the high-end project aesthetic.
|
|
133
|
+
* **Production-Ready Cleanliness:** Code must be extremely clean, visually striking, memorable, and meticulously refined in every detail.
|
|
134
|
+
|
|
135
|
+
## 8. THE CREATIVE ARSENAL (High-End Inspiration)
|
|
136
|
+
Do not default to generic UI. Pull from this library of advanced concepts to ensure the output is visually striking and memorable. When appropriate, leverage **GSAP (ScrollTrigger/Parallax)** for complex scrolltelling or **ThreeJS/WebGL** for 3D/Canvas animations, rather than basic CSS motion. **CRITICAL:** Never mix GSAP/ThreeJS with Framer Motion in the same component tree. Default to Framer Motion for UI/Bento interactions. Use GSAP/ThreeJS EXCLUSIVELY for isolated full-page scrolltelling or canvas backgrounds, wrapped in strict useEffect cleanup blocks.
|
|
137
|
+
|
|
138
|
+
### The Standard Hero Paradigm
|
|
139
|
+
* Stop doing centered text over a dark image. Try asymmetric Hero sections: Text cleanly aligned to the left or right. The background should feature a high-quality, relevant image with a subtle stylistic fade (darkening or lightening gracefully into the background color depending on if it is Light or Dark mode).
|
|
140
|
+
|
|
141
|
+
### Navigation & Menüs
|
|
142
|
+
* **Mac OS Dock Magnification:** Nav-bar at the edge; icons scale fluidly on hover.
|
|
143
|
+
* **Magnetic Button:** Buttons that physically pull toward the cursor.
|
|
144
|
+
* **Gooey Menu:** Sub-items detach from the main button like a viscous liquid.
|
|
145
|
+
* **Dynamic Island:** A pill-shaped UI component that morphs to show status/alerts.
|
|
146
|
+
* **Contextual Radial Menu:** A circular menu expanding exactly at the click coordinates.
|
|
147
|
+
* **Floating Speed Dial:** A FAB that springs out into a curved line of secondary actions.
|
|
148
|
+
* **Mega Menu Reveal:** Full-screen dropdowns that stagger-fade complex content.
|
|
149
|
+
|
|
150
|
+
### Layout & Grids
|
|
151
|
+
* **Bento Grid:** Asymmetric, tile-based grouping (e.g., Apple Control Center).
|
|
152
|
+
* **Masonry Layout:** Staggered grid without fixed row heights (e.g., Pinterest).
|
|
153
|
+
* **Chroma Grid:** Grid borders or tiles showing subtle, continuously animating color gradients.
|
|
154
|
+
* **Split Screen Scroll:** Two screen halves sliding in opposite directions on scroll.
|
|
155
|
+
* **Curtain Reveal:** A Hero section parting in the middle like a curtain on scroll.
|
|
156
|
+
|
|
157
|
+
### Cards & Containers
|
|
158
|
+
* **Parallax Tilt Card:** A 3D-tilting card tracking the mouse coordinates.
|
|
159
|
+
* **Spotlight Border Card:** Card borders that illuminate dynamically under the cursor.
|
|
160
|
+
* **Glassmorphism Panel:** True frosted glass with inner refraction borders.
|
|
161
|
+
* **Holographic Foil Card:** Iridescent, rainbow light reflections shifting on hover.
|
|
162
|
+
* **Tinder Swipe Stack:** A physical stack of cards the user can swipe away.
|
|
163
|
+
* **Morphing Modal:** A button that seamlessly expands into its own full-screen dialog container.
|
|
164
|
+
|
|
165
|
+
### Scroll-Animations
|
|
166
|
+
* **Sticky Scroll Stack:** Cards that stick to the top and physically stack over each other.
|
|
167
|
+
* **Horizontal Scroll Hijack:** Vertical scroll translates into a smooth horizontal gallery pan.
|
|
168
|
+
* **Locomotive Scroll Sequence:** Video/3D sequences where framerate is tied directly to the scrollbar.
|
|
169
|
+
* **Zoom Parallax:** A central background image zooming in/out seamlessly as you scroll.
|
|
170
|
+
* **Scroll Progress Path:** SVG vector lines or routes that draw themselves as the user scrolls.
|
|
171
|
+
* **Liquid Swipe Transition:** Page transitions that wipe the screen like a viscous liquid.
|
|
172
|
+
|
|
173
|
+
### Galleries & Media
|
|
174
|
+
* **Dome Gallery:** A 3D gallery feeling like a panoramic dome.
|
|
175
|
+
* **Coverflow Carousel:** 3D carousel with the center focused and edges angled back.
|
|
176
|
+
* **Drag-to-Pan Grid:** A boundless grid you can freely drag in any compass direction.
|
|
177
|
+
* **Accordion Image Slider:** Narrow vertical/horizontal image strips that expand fully on hover.
|
|
178
|
+
* **Hover Image Trail:** The mouse leaves a trail of popping/fading images behind it.
|
|
179
|
+
* **Glitch Effect Image:** Brief RGB-channel shifting digital distortion on hover.
|
|
180
|
+
|
|
181
|
+
### Typography & Text
|
|
182
|
+
* **Kinetic Marquee:** Endless text bands that reverse direction or speed up on scroll.
|
|
183
|
+
* **Text Mask Reveal:** Massive typography acting as a transparent window to a video background.
|
|
184
|
+
* **Text Scramble Effect:** Matrix-style character decoding on load or hover.
|
|
185
|
+
* **Circular Text Path:** Text curved along a spinning circular path.
|
|
186
|
+
* **Gradient Stroke Animation:** Outlined text with a gradient continuously running along the stroke.
|
|
187
|
+
* **Kinetic Typography Grid:** A grid of letters dodging or rotating away from the cursor.
|
|
188
|
+
|
|
189
|
+
### Micro-Interactions & Effects
|
|
190
|
+
* **Particle Explosion Button:** CTAs that shatter into particles upon success.
|
|
191
|
+
* **Liquid Pull-to-Refresh:** Mobile reload indicators acting like detaching water droplets.
|
|
192
|
+
* **Skeleton Shimmer:** Shifting light reflections moving across placeholder boxes.
|
|
193
|
+
* **Directional Hover Aware Button:** Hover fill entering from the exact side the mouse entered.
|
|
194
|
+
* **Ripple Click Effect:** Visual waves rippling precisely from the click coordinates.
|
|
195
|
+
* **Animated SVG Line Drawing:** Vectors that draw their own contours in real-time.
|
|
196
|
+
* **Mesh Gradient Background:** Organic, lava-lamp-like animated color blobs.
|
|
197
|
+
* **Lens Blur Depth:** Dynamic focus blurring background UI layers to highlight a foreground action.
|
|
198
|
+
|
|
199
|
+
## 9. THE "MOTION-ENGINE" BENTO PARADIGM
|
|
200
|
+
When generating modern SaaS dashboards or feature sections, you MUST utilize the following "Bento 2.0" architecture and motion philosophy. This goes beyond static cards and enforces a "Vercel-core meets Dribbble-clean" aesthetic heavily reliant on perpetual physics.
|
|
201
|
+
|
|
202
|
+
### A. Core Design Philosophy
|
|
203
|
+
* **Aesthetic:** High-end, minimal, and functional.
|
|
204
|
+
* **Palette:** Background in `#f9fafb`. Cards are pure white (`#ffffff`) with a 1px border of `border-slate-200/50`.
|
|
205
|
+
* **Surfaces:** Use `rounded-[2.5rem]` for all major containers. Apply a "diffusion shadow" (a very light, wide-spreading shadow, e.g., `shadow-[0_20px_40px_-15px_rgba(0,0,0,0.05)]`) to create depth without clutter.
|
|
206
|
+
* **Typography:** Strict `Geist`, `Satoshi`, or `Cabinet Grotesk` font stack. Use subtle tracking (`tracking-tight`) for headers.
|
|
207
|
+
* **Labels:** Titles and descriptions must be placed **outside and below** the cards to maintain a clean, gallery-style presentation.
|
|
208
|
+
* **Pixel-Perfection:** Use generous `p-8` or `p-10` padding inside cards.
|
|
209
|
+
|
|
210
|
+
### B. The Animation Engine Specs (Perpetual Motion)
|
|
211
|
+
All cards must contain **"Perpetual Micro-Interactions."** Use the following Framer Motion principles:
|
|
212
|
+
* **Spring Physics:** No linear easing. Use `type: "spring", stiffness: 100, damping: 20` for a premium, weighty feel.
|
|
213
|
+
* **Layout Transitions:** Heavily utilize the `layout` and `layoutId` props to ensure smooth re-ordering, resizing, and shared element state transitions.
|
|
214
|
+
* **Infinite Loops:** Every card must have an "Active State" that loops infinitely (Pulse, Typewriter, Float, or Carousel) to ensure the dashboard feels "alive".
|
|
215
|
+
* **Performance:** Wrap dynamic lists in `<AnimatePresence>` and optimize for 60fps. **PERFORMANCE CRITICAL:** Any perpetual motion or infinite loop MUST be memoized (React.memo) and completely isolated in its own microscopic Client Component. Never trigger re-renders in the parent layout.
|
|
216
|
+
|
|
217
|
+
### C. The 5-Card Archetypes (Micro-Animation Specs)
|
|
218
|
+
Implement these specific micro-animations when constructing Bento grids (e.g., Row 1: 3 cols | Row 2: 2 cols split 70/30):
|
|
219
|
+
1. **The Intelligent List:** A vertical stack of items with an infinite auto-sorting loop. Items swap positions using `layoutId`, simulating an AI prioritizing tasks in real-time.
|
|
220
|
+
2. **The Command Input:** A search/AI bar with a multi-step Typewriter Effect. It cycles through complex prompts, including a blinking cursor and a "processing" state with a shimmering loading gradient.
|
|
221
|
+
3. **The Live Status:** A scheduling interface with "breathing" status indicators. Include a pop-up notification badge that emerges with an "Overshoot" spring effect, stays for 3 seconds, and vanishes.
|
|
222
|
+
4. **The Wide Data Stream:** A horizontal "Infinite Carousel" of data cards or metrics. Ensure the loop is seamless (using `x: ["0%", "-100%"]`) with a speed that feels effortless.
|
|
223
|
+
5. **The Contextual UI (Focus Mode):** A document view that animates a staggered highlight of a text block, followed by a "Float-in" of a floating action toolbar with micro-icons.
|
|
224
|
+
|
|
225
|
+
## Required Checks
|
|
226
|
+
Evaluate your code against this matrix before outputting. This is the **last** filter you apply to your logic.
|
|
227
|
+
- [ ] Is global state used appropriately to avoid deep prop-drilling rather than arbitrarily?
|
|
228
|
+
- [ ] Is mobile layout collapse (`w-full`, `px-4`, `max-w-7xl mx-auto`) guaranteed for high-variance designs?
|
|
229
|
+
- [ ] Do full-height sections safely use `min-h-[100dvh]` instead of the bugged `h-screen`?
|
|
230
|
+
- [ ] Do `useEffect` animations contain strict cleanup functions?
|
|
231
|
+
- [ ] Are empty, loading, and error states provided?
|
|
232
|
+
- [ ] Are cards omitted in favor of spacing where possible?
|
|
233
|
+
- [ ] Did you strictly isolate CPU-heavy perpetual animations in their own Client Components?
|
|
234
|
+
|
|
235
|
+
## Overview
|
|
236
|
+
This skill acts as the primary high-agency frontend design system for React/Next.js projects. It overrides statistical LLM bias patterns, enforces correct performance guardrails, and provides precise stylistic guidelines that produce premium, non-generic UI implementations.
|
|
237
|
+
|
|
238
|
+
## When to Use
|
|
239
|
+
- **Use when:** Creating new application interfaces, upgrading existing product page designs, building SaaS dashboards, developer tool UIs, or brand-forward product landing pages.
|
|
240
|
+
- **NOT for:** Simple CLI tools or server-only scripts with no UI layer, basic markdown files or READMEs, or raw terminal emulators where design variance is prohibited.
|
|
241
|
+
|
|
242
|
+
## Workflow
|
|
243
|
+
1. **Read Design Docs:** Run `list_template_docs` and check `docs/design` or `docs/theme` for any existing design constraints.
|
|
244
|
+
2. **Set the Dials:** Confirm or adapt the `DESIGN_VARIANCE`, `MOTION_INTENSITY`, and `VISUAL_DENSITY` values based on the project context.
|
|
245
|
+
3. **Verify Dependencies:** Check `package.json` before importing any third-party package. Only import what is installed.
|
|
246
|
+
4. **Architect Components:** Apply the defined rules to the design (color, typography, grid, interactive states) as code.
|
|
247
|
+
5. **Performance Audit:** Scan animated elements for disallowed layout properties and isolate all heavy Client Components.
|
|
248
|
+
|
|
249
|
+
## Common Rationalizations
|
|
250
|
+
| Rationalization | Reality |
|
|
251
|
+
|---|---|
|
|
252
|
+
| Using Inter font keeps things clean | Inter signals generic AI-generated output. Geist, Outfit, or Satoshi add distinct character without sacrificing legibility. |
|
|
253
|
+
| `h-screen` works fine for most cases | On iOS Safari, `h-screen` shifts when the browser chrome hides, causing layout jumps. `min-h-[100dvh]` is required. |
|
|
254
|
+
| Framer Motion can be placed in a Server Component | Framer Motion requires DOM access. All interactive or animated components must be isolated in `'use client'` leaf components. |
|
|
255
|
+
|
|
256
|
+
## Red Flags
|
|
257
|
+
- Multiple accent colors used across the same project page.
|
|
258
|
+
- Purple or neon blue gradient glows applied as primary brand elements.
|
|
259
|
+
- Animated motion using `top`, `left`, `width`, or `height` properties instead of `transform`.
|
|
260
|
+
- Inline SVG icon eggs used as avatar placeholders without contextual personalization.
|
|
261
|
+
- Global state providers placed inside Server Components.
|
|
262
|
+
|
|
263
|
+
## Verification
|
|
264
|
+
After completing the skill, confirm:
|
|
265
|
+
- [ ] All dependencies used in the output are confirmed to exist in `package.json`.
|
|
266
|
+
- [ ] Interactivity and animations are isolated in Client Components.
|
|
267
|
+
- [ ] No banned fonts (Inter), icons, or layout patterns from Section 7 are present.
|
|
268
|
+
- [ ] Full mobile collapse behavior is verified (single-column, `w-full`, `px-4`, `min-h-[100dvh]`).
|
|
269
|
+
- [ ] Loading, empty, and error states have been implemented for all data-dependent components.
|