From a5d6f9c33ebc16a3fe76139af56259e1495a0011 Mon Sep 17 00:00:00 2001 From: HDCode Date: Sat, 28 Mar 2026 12:39:59 +0100 Subject: [PATCH] refactor: modernize docs-app with Tailwind CSS v4 and Shiki syntax highlighting Migrate the docs application to a Tailwind CSS v4 design system with oklch color tokens, replace react-syntax-highlighter with Shiki for improved code highlighting, switch from @mdx-js to react-markdown for rendering, and remove legacy agent skill directories in favor of a centralized .impeccable.md design context file. Co-Authored-By: Kilo --- .agents/skills/doc-coauthoring/SKILL.md | 375 ----- .agents/skills/frontend-design/SKILL.md | 147 -- .../reference/color-and-contrast.md | 132 -- .../reference/interaction-design.md | 195 --- .../reference/motion-design.md | 99 -- .../reference/responsive-design.md | 114 -- .../reference/spatial-design.md | 100 -- .../frontend-design/reference/typography.md | 133 -- .../frontend-design/reference/ux-writing.md | 107 -- .claude/skills/doc-coauthoring | 1 - .claude/skills/frontend-design | 1 - .impeccable.md | 33 + .kilocode/skills/doc-coauthoring | 1 - .kilocode/skills/frontend-design | 1 - content/2.0.0/wiki/examples.md | 70 +- content/2.0.0/wiki/index.md | 8 +- content/2.0.1/wiki/examples.md | 70 +- content/2.0.1/wiki/index.md | 8 +- content/2.1.0/wiki/index.md | 8 +- content/2.2.0/wiki/examples.md | 28 +- content/2.2.0/wiki/index.md | 8 +- content/snapshot/wiki/examples.md | 32 +- content/snapshot/wiki/index.md | 8 +- docs-app/app/[version]/agent/page.tsx | 2 +- docs-app/app/[version]/api/page.tsx | 52 +- docs-app/app/[version]/layout.tsx | 10 +- .../app/[version]/wiki/[[...slug]]/page.tsx | 15 +- docs-app/app/globals.css | 1421 +++------------- docs-app/app/layout.tsx | 40 +- docs-app/app/not-found.tsx | 63 +- docs-app/app/privacy-policy/layout.tsx | 40 + docs-app/app/privacy-policy/page.tsx | 43 +- docs-app/app/thanks/ThanksContent.tsx | 71 +- docs-app/app/thanks/data/charts-docs.json | 48 +- docs-app/app/thanks/layout.tsx | 49 +- docs-app/app/thanks/page.tsx | 4 +- docs-app/components/AgentPromptBuilder.tsx | 379 +++-- docs-app/components/Header.tsx | 36 +- docs-app/components/MarkdownRenderer.tsx | 628 ++++---- docs-app/components/Sidebar.tsx | 226 ++- docs-app/components/VersionSwitcher.tsx | 160 +- docs-app/components/icons/SidebarIcons.tsx | 1 + docs-app/eslint.config.mjs | 2 - docs-app/lib/copy-to-clipboard.ts | 25 + docs-app/lib/utils.ts | 13 + docs-app/next.config.ts | 6 +- docs-app/package-lock.json | 1422 +++++++++++++++-- docs-app/package.json | 17 +- docs-app/postcss.config.mjs | 8 + skills-lock.json | 15 - 50 files changed, 2817 insertions(+), 3658 deletions(-) delete mode 100644 .agents/skills/doc-coauthoring/SKILL.md delete mode 100644 .agents/skills/frontend-design/SKILL.md delete mode 100644 .agents/skills/frontend-design/reference/color-and-contrast.md delete mode 100644 .agents/skills/frontend-design/reference/interaction-design.md delete mode 100644 .agents/skills/frontend-design/reference/motion-design.md delete mode 100644 .agents/skills/frontend-design/reference/responsive-design.md delete mode 100644 .agents/skills/frontend-design/reference/spatial-design.md delete mode 100644 .agents/skills/frontend-design/reference/typography.md delete mode 100644 .agents/skills/frontend-design/reference/ux-writing.md delete mode 120000 .claude/skills/doc-coauthoring delete mode 120000 .claude/skills/frontend-design create mode 100644 .impeccable.md delete mode 120000 .kilocode/skills/doc-coauthoring delete mode 120000 .kilocode/skills/frontend-design create mode 100644 docs-app/app/privacy-policy/layout.tsx create mode 100644 docs-app/lib/copy-to-clipboard.ts create mode 100644 docs-app/lib/utils.ts create mode 100644 docs-app/postcss.config.mjs delete mode 100644 skills-lock.json diff --git a/.agents/skills/doc-coauthoring/SKILL.md b/.agents/skills/doc-coauthoring/SKILL.md deleted file mode 100644 index a5a6983..0000000 --- a/.agents/skills/doc-coauthoring/SKILL.md +++ /dev/null @@ -1,375 +0,0 @@ ---- -name: doc-coauthoring -description: Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. ---- - -# Doc Co-Authoring Workflow - -This skill provides a structured workflow for guiding users through collaborative document creation. Act as an active guide, walking users through three stages: Context Gathering, Refinement & Structure, and Reader Testing. - -## When to Offer This Workflow - -**Trigger conditions:** -- User mentions writing documentation: "write a doc", "draft a proposal", "create a spec", "write up" -- User mentions specific doc types: "PRD", "design doc", "decision doc", "RFC" -- User seems to be starting a substantial writing task - -**Initial offer:** -Offer the user a structured workflow for co-authoring the document. Explain the three stages: - -1. **Context Gathering**: User provides all relevant context while Claude asks clarifying questions -2. **Refinement & Structure**: Iteratively build each section through brainstorming and editing -3. **Reader Testing**: Test the doc with a fresh Claude (no context) to catch blind spots before others read it - -Explain that this approach helps ensure the doc works well when others read it (including when they paste it into Claude). Ask if they want to try this workflow or prefer to work freeform. - -If user declines, work freeform. If user accepts, proceed to Stage 1. - -## Stage 1: Context Gathering - -**Goal:** Close the gap between what the user knows and what Claude knows, enabling smart guidance later. - -### Initial Questions - -Start by asking the user for meta-context about the document: - -1. What type of document is this? (e.g., technical spec, decision doc, proposal) -2. Who's the primary audience? -3. What's the desired impact when someone reads this? -4. Is there a template or specific format to follow? -5. Any other constraints or context to know? - -Inform them they can answer in shorthand or dump information however works best for them. - -**If user provides a template or mentions a doc type:** -- Ask if they have a template document to share -- If they provide a link to a shared document, use the appropriate integration to fetch it -- If they provide a file, read it - -**If user mentions editing an existing shared document:** -- Use the appropriate integration to read the current state -- Check for images without alt-text -- If images exist without alt-text, explain that when others use Claude to understand the doc, Claude won't be able to see them. Ask if they want alt-text generated. If so, request they paste each image into chat for descriptive alt-text generation. - -### Info Dumping - -Once initial questions are answered, encourage the user to dump all the context they have. Request information such as: -- Background on the project/problem -- Related team discussions or shared documents -- Why alternative solutions aren't being used -- Organizational context (team dynamics, past incidents, politics) -- Timeline pressures or constraints -- Technical architecture or dependencies -- Stakeholder concerns - -Advise them not to worry about organizing it - just get it all out. Offer multiple ways to provide context: -- Info dump stream-of-consciousness -- Point to team channels or threads to read -- Link to shared documents - -**If integrations are available** (e.g., Slack, Teams, Google Drive, SharePoint, or other MCP servers), mention that these can be used to pull in context directly. - -**If no integrations are detected and in Claude.ai or Claude app:** Suggest they can enable connectors in their Claude settings to allow pulling context from messaging apps and document storage directly. - -Inform them clarifying questions will be asked once they've done their initial dump. - -**During context gathering:** - -- If user mentions team channels or shared documents: - - If integrations available: Inform them the content will be read now, then use the appropriate integration - - If integrations not available: Explain lack of access. Suggest they enable connectors in Claude settings, or paste the relevant content directly. - -- If user mentions entities/projects that are unknown: - - Ask if connected tools should be searched to learn more - - Wait for user confirmation before searching - -- As user provides context, track what's being learned and what's still unclear - -**Asking clarifying questions:** - -When user signals they've done their initial dump (or after substantial context provided), ask clarifying questions to ensure understanding: - -Generate 5-10 numbered questions based on gaps in the context. - -Inform them they can use shorthand to answer (e.g., "1: yes, 2: see #channel, 3: no because backwards compat"), link to more docs, point to channels to read, or just keep info-dumping. Whatever's most efficient for them. - -**Exit condition:** -Sufficient context has been gathered when questions show understanding - when edge cases and trade-offs can be asked about without needing basics explained. - -**Transition:** -Ask if there's any more context they want to provide at this stage, or if it's time to move on to drafting the document. - -If user wants to add more, let them. When ready, proceed to Stage 2. - -## Stage 2: Refinement & Structure - -**Goal:** Build the document section by section through brainstorming, curation, and iterative refinement. - -**Instructions to user:** -Explain that the document will be built section by section. For each section: -1. Clarifying questions will be asked about what to include -2. 5-20 options will be brainstormed -3. User will indicate what to keep/remove/combine -4. The section will be drafted -5. It will be refined through surgical edits - -Start with whichever section has the most unknowns (usually the core decision/proposal), then work through the rest. - -**Section ordering:** - -If the document structure is clear: -Ask which section they'd like to start with. - -Suggest starting with whichever section has the most unknowns. For decision docs, that's usually the core proposal. For specs, it's typically the technical approach. Summary sections are best left for last. - -If user doesn't know what sections they need: -Based on the type of document and template, suggest 3-5 sections appropriate for the doc type. - -Ask if this structure works, or if they want to adjust it. - -**Once structure is agreed:** - -Create the initial document structure with placeholder text for all sections. - -**If access to artifacts is available:** -Use `create_file` to create an artifact. This gives both Claude and the user a scaffold to work from. - -Inform them that the initial structure with placeholders for all sections will be created. - -Create artifact with all section headers and brief placeholder text like "[To be written]" or "[Content here]". - -Provide the scaffold link and indicate it's time to fill in each section. - -**If no access to artifacts:** -Create a markdown file in the working directory. Name it appropriately (e.g., `decision-doc.md`, `technical-spec.md`). - -Inform them that the initial structure with placeholders for all sections will be created. - -Create file with all section headers and placeholder text. - -Confirm the filename has been created and indicate it's time to fill in each section. - -**For each section:** - -### Step 1: Clarifying Questions - -Announce work will begin on the [SECTION NAME] section. Ask 5-10 clarifying questions about what should be included: - -Generate 5-10 specific questions based on context and section purpose. - -Inform them they can answer in shorthand or just indicate what's important to cover. - -### Step 2: Brainstorming - -For the [SECTION NAME] section, brainstorm [5-20] things that might be included, depending on the section's complexity. Look for: -- Context shared that might have been forgotten -- Angles or considerations not yet mentioned - -Generate 5-20 numbered options based on section complexity. At the end, offer to brainstorm more if they want additional options. - -### Step 3: Curation - -Ask which points should be kept, removed, or combined. Request brief justifications to help learn priorities for the next sections. - -Provide examples: -- "Keep 1,4,7,9" -- "Remove 3 (duplicates 1)" -- "Remove 6 (audience already knows this)" -- "Combine 11 and 12" - -**If user gives freeform feedback** (e.g., "looks good" or "I like most of it but...") instead of numbered selections, extract their preferences and proceed. Parse what they want kept/removed/changed and apply it. - -### Step 4: Gap Check - -Based on what they've selected, ask if there's anything important missing for the [SECTION NAME] section. - -### Step 5: Drafting - -Use `str_replace` to replace the placeholder text for this section with the actual drafted content. - -Announce the [SECTION NAME] section will be drafted now based on what they've selected. - -**If using artifacts:** -After drafting, provide a link to the artifact. - -Ask them to read through it and indicate what to change. Note that being specific helps learning for the next sections. - -**If using a file (no artifacts):** -After drafting, confirm completion. - -Inform them the [SECTION NAME] section has been drafted in [filename]. Ask them to read through it and indicate what to change. Note that being specific helps learning for the next sections. - -**Key instruction for user (include when drafting the first section):** -Provide a note: Instead of editing the doc directly, ask them to indicate what to change. This helps learning of their style for future sections. For example: "Remove the X bullet - already covered by Y" or "Make the third paragraph more concise". - -### Step 6: Iterative Refinement - -As user provides feedback: -- Use `str_replace` to make edits (never reprint the whole doc) -- **If using artifacts:** Provide link to artifact after each edit -- **If using files:** Just confirm edits are complete -- If user edits doc directly and asks to read it: mentally note the changes they made and keep them in mind for future sections (this shows their preferences) - -**Continue iterating** until user is satisfied with the section. - -### Quality Checking - -After 3 consecutive iterations with no substantial changes, ask if anything can be removed without losing important information. - -When section is done, confirm [SECTION NAME] is complete. Ask if ready to move to the next section. - -**Repeat for all sections.** - -### Near Completion - -As approaching completion (80%+ of sections done), announce intention to re-read the entire document and check for: -- Flow and consistency across sections -- Redundancy or contradictions -- Anything that feels like "slop" or generic filler -- Whether every sentence carries weight - -Read entire document and provide feedback. - -**When all sections are drafted and refined:** -Announce all sections are drafted. Indicate intention to review the complete document one more time. - -Review for overall coherence, flow, completeness. - -Provide any final suggestions. - -Ask if ready to move to Reader Testing, or if they want to refine anything else. - -## Stage 3: Reader Testing - -**Goal:** Test the document with a fresh Claude (no context bleed) to verify it works for readers. - -**Instructions to user:** -Explain that testing will now occur to see if the document actually works for readers. This catches blind spots - things that make sense to the authors but might confuse others. - -### Testing Approach - -**If access to sub-agents is available (e.g., in Claude Code):** - -Perform the testing directly without user involvement. - -### Step 1: Predict Reader Questions - -Announce intention to predict what questions readers might ask when trying to discover this document. - -Generate 5-10 questions that readers would realistically ask. - -### Step 2: Test with Sub-Agent - -Announce that these questions will be tested with a fresh Claude instance (no context from this conversation). - -For each question, invoke a sub-agent with just the document content and the question. - -Summarize what Reader Claude got right/wrong for each question. - -### Step 3: Run Additional Checks - -Announce additional checks will be performed. - -Invoke sub-agent to check for ambiguity, false assumptions, contradictions. - -Summarize any issues found. - -### Step 4: Report and Fix - -If issues found: -Report that Reader Claude struggled with specific issues. - -List the specific issues. - -Indicate intention to fix these gaps. - -Loop back to refinement for problematic sections. - ---- - -**If no access to sub-agents (e.g., claude.ai web interface):** - -The user will need to do the testing manually. - -### Step 1: Predict Reader Questions - -Ask what questions people might ask when trying to discover this document. What would they type into Claude.ai? - -Generate 5-10 questions that readers would realistically ask. - -### Step 2: Setup Testing - -Provide testing instructions: -1. Open a fresh Claude conversation: https://claude.ai -2. Paste or share the document content (if using a shared doc platform with connectors enabled, provide the link) -3. Ask Reader Claude the generated questions - -For each question, instruct Reader Claude to provide: -- The answer -- Whether anything was ambiguous or unclear -- What knowledge/context the doc assumes is already known - -Check if Reader Claude gives correct answers or misinterprets anything. - -### Step 3: Additional Checks - -Also ask Reader Claude: -- "What in this doc might be ambiguous or unclear to readers?" -- "What knowledge or context does this doc assume readers already have?" -- "Are there any internal contradictions or inconsistencies?" - -### Step 4: Iterate Based on Results - -Ask what Reader Claude got wrong or struggled with. Indicate intention to fix those gaps. - -Loop back to refinement for any problematic sections. - ---- - -### Exit Condition (Both Approaches) - -When Reader Claude consistently answers questions correctly and doesn't surface new gaps or ambiguities, the doc is ready. - -## Final Review - -When Reader Testing passes: -Announce the doc has passed Reader Claude testing. Before completion: - -1. Recommend they do a final read-through themselves - they own this document and are responsible for its quality -2. Suggest double-checking any facts, links, or technical details -3. Ask them to verify it achieves the impact they wanted - -Ask if they want one more review, or if the work is done. - -**If user wants final review, provide it. Otherwise:** -Announce document completion. Provide a few final tips: -- Consider linking this conversation in an appendix so readers can see how the doc was developed -- Use appendices to provide depth without bloating the main doc -- Update the doc as feedback is received from real readers - -## Tips for Effective Guidance - -**Tone:** -- Be direct and procedural -- Explain rationale briefly when it affects user behavior -- Don't try to "sell" the approach - just execute it - -**Handling Deviations:** -- If user wants to skip a stage: Ask if they want to skip this and write freeform -- If user seems frustrated: Acknowledge this is taking longer than expected. Suggest ways to move faster -- Always give user agency to adjust the process - -**Context Management:** -- Throughout, if context is missing on something mentioned, proactively ask -- Don't let gaps accumulate - address them as they come up - -**Artifact Management:** -- Use `create_file` for drafting full sections -- Use `str_replace` for all edits -- Provide artifact link after every change -- Never use artifacts for brainstorming lists - that's just conversation - -**Quality over Speed:** -- Don't rush through stages -- Each iteration should make meaningful improvements -- The goal is a document that actually works for readers diff --git a/.agents/skills/frontend-design/SKILL.md b/.agents/skills/frontend-design/SKILL.md deleted file mode 100644 index dd7c5dd..0000000 --- a/.agents/skills/frontend-design/SKILL.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -name: frontend-design -description: Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context. -license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. ---- - -This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices. - -## Context Gathering Protocol - -Design skills produce generic output without project context. You MUST have confirmed design context before doing any design work. - -**Required context** — every design skill needs at minimum: -- **Target audience**: Who uses this product and in what context? -- **Use cases**: What jobs are they trying to get done? -- **Brand personality/tone**: How should the interface feel? - -Individual skills may require additional context — check the skill's preparation section for specifics. - -**CRITICAL**: You cannot infer this context by reading the codebase. Code tells you what was built, not who it's for or what it should feel like. Only the creator can provide this context. - -**Gathering order:** -1. **Check current instructions (instant)**: If your loaded instructions already contain a **Design Context** section, proceed immediately. -2. **Check .impeccable.md (fast)**: If not in instructions, read `.impeccable.md` from the project root. If it exists and contains the required context, proceed. -3. **Run teach-impeccable (REQUIRED)**: If neither source has context, you MUST run /teach-impeccable NOW before doing anything else. Do NOT skip this step. Do NOT attempt to infer context from the codebase instead. - ---- - -## Design Direction - -Commit to a BOLD aesthetic direction: -- **Purpose**: What problem does this interface solve? Who uses it? -- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction. -- **Constraints**: Technical requirements (framework, performance, accessibility). -- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember? - -**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work—the key is intentionality, not intensity. - -Then implement working code that is: -- Production-grade and functional -- Visually striking and memorable -- Cohesive with a clear aesthetic point-of-view -- Meticulously refined in every detail - -## Frontend Aesthetics Guidelines - -### Typography -→ *Consult [typography reference](reference/typography.md) for scales, pairing, and loading strategies.* - -Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font. - -**DO**: Use a modular type scale with fluid sizing (clamp) -**DO**: Vary font weights and sizes to create clear visual hierarchy -**DON'T**: Use overused fonts—Inter, Roboto, Arial, Open Sans, system defaults -**DON'T**: Use monospace typography as lazy shorthand for "technical/developer" vibes -**DON'T**: Put large icons with rounded corners above every heading—they rarely add value and make sites look templated - -### Color & Theme -→ *Consult [color reference](reference/color-and-contrast.md) for OKLCH, palettes, and dark mode.* - -Commit to a cohesive palette. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. - -**DO**: Use modern CSS color functions (oklch, color-mix, light-dark) for perceptually uniform, maintainable palettes -**DO**: Tint your neutrals toward your brand hue—even a subtle hint creates subconscious cohesion -**DON'T**: Use gray text on colored backgrounds—it looks washed out; use a shade of the background color instead -**DON'T**: Use pure black (#000) or pure white (#fff)—always tint; pure black/white never appears in nature -**DON'T**: Use the AI color palette: cyan-on-dark, purple-to-blue gradients, neon accents on dark backgrounds -**DON'T**: Use gradient text for "impact"—especially on metrics or headings; it's decorative rather than meaningful -**DON'T**: Default to dark mode with glowing accents—it looks "cool" without requiring actual design decisions - -### Layout & Space -→ *Consult [spatial reference](reference/spatial-design.md) for grids, rhythm, and container queries.* - -Create visual rhythm through varied spacing—not the same padding everywhere. Embrace asymmetry and unexpected compositions. Break the grid intentionally for emphasis. - -**DO**: Create visual rhythm through varied spacing—tight groupings, generous separations -**DO**: Use fluid spacing with clamp() that breathes on larger screens -**DO**: Use asymmetry and unexpected compositions; break the grid intentionally for emphasis -**DON'T**: Wrap everything in cards—not everything needs a container -**DON'T**: Nest cards inside cards—visual noise, flatten the hierarchy -**DON'T**: Use identical card grids—same-sized cards with icon + heading + text, repeated endlessly -**DON'T**: Use the hero metric layout template—big number, small label, supporting stats, gradient accent -**DON'T**: Center everything—left-aligned text with asymmetric layouts feels more designed -**DON'T**: Use the same spacing everywhere—without rhythm, layouts feel monotonous - -### Visual Details -**DO**: Use intentional, purposeful decorative elements that reinforce brand -**DON'T**: Use glassmorphism everywhere—blur effects, glass cards, glow borders used decoratively rather than purposefully -**DON'T**: Use rounded elements with thick colored border on one side—a lazy accent that almost never looks intentional -**DON'T**: Use sparklines as decoration—tiny charts that look sophisticated but convey nothing meaningful -**DON'T**: Use rounded rectangles with generic drop shadows—safe, forgettable, could be any AI output -**DON'T**: Use modals unless there's truly no better alternative—modals are lazy - -### Motion -→ *Consult [motion reference](reference/motion-design.md) for timing, easing, and reduced motion.* - -Focus on high-impact moments: one well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions. - -**DO**: Use motion to convey state changes—entrances, exits, feedback -**DO**: Use exponential easing (ease-out-quart/quint/expo) for natural deceleration -**DO**: For height animations, use grid-template-rows transitions instead of animating height directly -**DON'T**: Animate layout properties (width, height, padding, margin)—use transform and opacity only -**DON'T**: Use bounce or elastic easing—they feel dated and tacky; real objects decelerate smoothly - -### Interaction -→ *Consult [interaction reference](reference/interaction-design.md) for forms, focus, and loading patterns.* - -Make interactions feel fast. Use optimistic UI—update immediately, sync later. - -**DO**: Use progressive disclosure—start simple, reveal sophistication through interaction (basic options first, advanced behind expandable sections; hover states that reveal secondary actions) -**DO**: Design empty states that teach the interface, not just say "nothing here" -**DO**: Make every interactive surface feel intentional and responsive -**DON'T**: Repeat the same information—redundant headers, intros that restate the heading -**DON'T**: Make every button primary—use ghost buttons, text links, secondary styles; hierarchy matters - -### Responsive -→ *Consult [responsive reference](reference/responsive-design.md) for mobile-first, fluid design, and container queries.* - -**DO**: Use container queries (@container) for component-level responsiveness -**DO**: Adapt the interface for different contexts—don't just shrink it -**DON'T**: Hide critical functionality on mobile—adapt the interface, don't amputate it - -### UX Writing -→ *Consult [ux-writing reference](reference/ux-writing.md) for labels, errors, and empty states.* - -**DO**: Make every word earn its place -**DON'T**: Repeat information users can already see - ---- - -## The AI Slop Test - -**Critical quality check**: If you showed this interface to someone and said "AI made this," would they believe you immediately? If yes, that's the problem. - -A distinctive interface should make someone ask "how was this made?" not "which AI made this?" - -Review the DON'T guidelines above—they are the fingerprints of AI-generated work from 2024-2025. - ---- - -## Implementation Principles - -Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. - -Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices across generations. - -Remember: the model is capable of extraordinary creative work. Don't hold back—show what can truly be created when thinking outside the box and committing fully to a distinctive vision. \ No newline at end of file diff --git a/.agents/skills/frontend-design/reference/color-and-contrast.md b/.agents/skills/frontend-design/reference/color-and-contrast.md deleted file mode 100644 index 77aaf03..0000000 --- a/.agents/skills/frontend-design/reference/color-and-contrast.md +++ /dev/null @@ -1,132 +0,0 @@ -# Color & Contrast - -## Color Spaces: Use OKLCH - -**Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness *look* equal—unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark. - -```css -/* OKLCH: lightness (0-100%), chroma (0-0.4+), hue (0-360) */ ---color-primary: oklch(60% 0.15 250); /* Blue */ ---color-primary-light: oklch(85% 0.08 250); /* Same hue, lighter */ ---color-primary-dark: oklch(35% 0.12 250); /* Same hue, darker */ -``` - -**Key insight**: As you move toward white or black, reduce chroma (saturation). High chroma at extreme lightness looks garish. A light blue at 85% lightness needs ~0.08 chroma, not the 0.15 of your base color. - -## Building Functional Palettes - -### The Tinted Neutral Trap - -**Pure gray is dead.** Add a subtle hint of your brand hue to all neutrals: - -```css -/* Dead grays */ ---gray-100: oklch(95% 0 0); /* No personality */ ---gray-900: oklch(15% 0 0); - -/* Warm-tinted grays (add brand warmth) */ ---gray-100: oklch(95% 0.01 60); /* Hint of warmth */ ---gray-900: oklch(15% 0.01 60); - -/* Cool-tinted grays (tech, professional) */ ---gray-100: oklch(95% 0.01 250); /* Hint of blue */ ---gray-900: oklch(15% 0.01 250); -``` - -The chroma is tiny (0.01) but perceptible. It creates subconscious cohesion between your brand color and your UI. - -### Palette Structure - -A complete system needs: - -| Role | Purpose | Example | -|------|---------|---------| -| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades | -| **Neutral** | Text, backgrounds, borders | 9-11 shade scale | -| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each | -| **Surface** | Cards, modals, overlays | 2-3 elevation levels | - -**Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise. - -### The 60-30-10 Rule (Applied Correctly) - -This rule is about **visual weight**, not pixel count: - -- **60%**: Neutral backgrounds, white space, base surfaces -- **30%**: Secondary colors—text, borders, inactive states -- **10%**: Accent—CTAs, highlights, focus states - -The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work *because* they're rare. Overuse kills their power. - -## Contrast & Accessibility - -### WCAG Requirements - -| Content Type | AA Minimum | AAA Target | -|--------------|------------|------------| -| Body text | 4.5:1 | 7:1 | -| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 | -| UI components, icons | 3:1 | 4.5:1 | -| Non-essential decorations | None | None | - -**The gotcha**: Placeholder text still needs 4.5:1. That light gray placeholder you see everywhere? Usually fails WCAG. - -### Dangerous Color Combinations - -These commonly fail contrast or cause readability issues: - -- Light gray text on white (the #1 accessibility fail) -- **Gray text on any colored background**—gray looks washed out and dead on color. Use a darker shade of the background color, or transparency -- Red text on green background (or vice versa)—8% of men can't distinguish these -- Blue text on red background (vibrates visually) -- Yellow text on white (almost always fails) -- Thin light text on images (unpredictable contrast) - -### Never Use Pure Gray or Pure Black - -Pure gray (`oklch(50% 0 0)`) and pure black (`#000`) don't exist in nature—real shadows and surfaces always have a color cast. Even a chroma of 0.005-0.01 is enough to feel natural without being obviously tinted. (See tinted neutrals example above.) - -### Testing - -Don't trust your eyes. Use tools: - -- [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/) -- Browser DevTools → Rendering → Emulate vision deficiencies -- [Polypane](https://polypane.app/) for real-time testing - -## Theming: Light & Dark Mode - -### Dark Mode Is Not Inverted Light Mode - -You can't just swap colors. Dark mode requires different design decisions: - -| Light Mode | Dark Mode | -|------------|-----------| -| Shadows for depth | Lighter surfaces for depth (no shadows) | -| Dark text on light | Light text on dark (reduce font weight) | -| Vibrant accents | Desaturate accents slightly | -| White backgrounds | Never pure black—use dark gray (oklch 12-18%) | - -```css -/* Dark mode depth via surface color, not shadow */ -:root[data-theme="dark"] { - --surface-1: oklch(15% 0.01 250); - --surface-2: oklch(20% 0.01 250); /* "Higher" = lighter */ - --surface-3: oklch(25% 0.01 250); - - /* Reduce text weight slightly */ - --body-weight: 350; /* Instead of 400 */ -} -``` - -### Token Hierarchy - -Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer—primitives stay the same. - -## Alpha Is A Design Smell - -Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed. - ---- - -**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Using pure black (#000) for large areas. Skipping color blindness testing (8% of men affected). diff --git a/.agents/skills/frontend-design/reference/interaction-design.md b/.agents/skills/frontend-design/reference/interaction-design.md deleted file mode 100644 index 19d6809..0000000 --- a/.agents/skills/frontend-design/reference/interaction-design.md +++ /dev/null @@ -1,195 +0,0 @@ -# Interaction Design - -## The Eight Interactive States - -Every interactive element needs these states designed: - -| State | When | Visual Treatment | -|-------|------|------------------| -| **Default** | At rest | Base styling | -| **Hover** | Pointer over (not touch) | Subtle lift, color shift | -| **Focus** | Keyboard/programmatic focus | Visible ring (see below) | -| **Active** | Being pressed | Pressed in, darker | -| **Disabled** | Not interactive | Reduced opacity, no pointer | -| **Loading** | Processing | Spinner, skeleton | -| **Error** | Invalid state | Red border, icon, message | -| **Success** | Completed | Green check, confirmation | - -**The common miss**: Designing hover without focus, or vice versa. They're different. Keyboard users never see hover states. - -## Focus Rings: Do Them Right - -**Never `outline: none` without replacement.** It's an accessibility violation. Instead, use `:focus-visible` to show focus only for keyboard users: - -```css -/* Hide focus ring for mouse/touch */ -button:focus { - outline: none; -} - -/* Show focus ring for keyboard */ -button:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} -``` - -**Focus ring design**: -- High contrast (3:1 minimum against adjacent colors) -- 2-3px thick -- Offset from element (not inside it) -- Consistent across all interactive elements - -## Form Design: The Non-Obvious - -**Placeholders aren't labels**—they disappear on input. Always use visible `