From f957fcad206b6534c9bf89064d015ae941c4b6cf Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 10 Apr 2026 19:09:55 -0700 Subject: [PATCH 001/125] Fix: quote YAML scalars that contain colon-space in frontmatter generateYamlFrontmatter only re-quoted values starting with `[` or `{`, but parseFrontmatter strips surrounding quotes on input. Descriptions containing `: ` (e.g. "Also handles: critique...") round-tripped into unquoted plain scalars that YAML parsers reject. Added a yamlNeedsQuoting check covering colon-space, space-hash, YAML indicator chars, reserved keywords, and number-like strings, plus regression tests. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/lib/utils.js | 44 ++++++++++++++++++++++++++++++++++++----- tests/lib/utils.test.js | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 3ea386c32..3f672e826 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -456,6 +456,41 @@ export function replacePlaceholders(content, provider, commandNames = [], allSki return result; } +/** + * Decide whether a YAML scalar string value must be quoted to survive parsing. + * + * Plain (unquoted) YAML scalars cannot contain `: ` or ` #`, cannot start with + * a YAML indicator character, cannot look like a boolean/null/number, and + * cannot carry leading/trailing whitespace. parseFrontmatter strips surrounding + * quotes on input, so we must re-detect the need to quote on output — otherwise + * descriptions like "Handles: critique/review..." round-trip into invalid YAML. + */ +function yamlNeedsQuoting(value) { + if (typeof value !== 'string') return false; + if (value === '') return true; + // Leading or trailing whitespace + if (/^\s|\s$/.test(value)) return true; + // Starts with a YAML flow/indicator character + if (/^[\[\]{},&*!|>'"%@`#]/.test(value)) return true; + // Starts with `?`, `:`, or `-` followed by space or end of string + if (/^[?:-](\s|$)/.test(value)) return true; + // Contains `: ` (ends plain scalar) or ` #` (starts comment), or ends with `:` + if (/: |\s#|:$/.test(value)) return true; + // Reserved keywords that YAML 1.1 parsers coerce to boolean/null + if (/^(true|false|null|yes|no|on|off|~)$/i.test(value)) return true; + // Looks like a number + if (/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(value)) return true; + return false; +} + +function formatYamlScalar(value) { + if (typeof value !== 'string') return String(value); + if (yamlNeedsQuoting(value)) { + return `"${value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`; + } + return value; +} + /** * Generate YAML frontmatter string */ @@ -467,18 +502,17 @@ export function generateYamlFrontmatter(data) { lines.push(`${key}:`); for (const item of value) { if (typeof item === 'object') { - lines.push(` - name: ${item.name}`); - if (item.description) lines.push(` description: ${item.description}`); + lines.push(` - name: ${formatYamlScalar(item.name)}`); + if (item.description) lines.push(` description: ${formatYamlScalar(item.description)}`); if (item.required !== undefined) lines.push(` required: ${item.required}`); } else { - lines.push(` - ${item}`); + lines.push(` - ${formatYamlScalar(item)}`); } } } else if (typeof value === 'boolean') { lines.push(`${key}: ${value}`); } else { - const needsQuoting = typeof value === 'string' && /^[\[{]/.test(value); - lines.push(`${key}: ${needsQuoting ? `"${value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"` : value}`); + lines.push(`${key}: ${formatYamlScalar(value)}`); } } diff --git a/tests/lib/utils.test.js b/tests/lib/utils.test.js index 89cebd52d..7a0664005 100644 --- a/tests/lib/utils.test.js +++ b/tests/lib/utils.test.js @@ -166,6 +166,42 @@ describe('generateYamlFrontmatter', () => { expect(parsed.frontmatter.description).toBe(original.description); expect(parsed.frontmatter['argument-hint']).toBe(''); }); + + test('should quote strings containing colon-space (breaks plain scalars)', () => { + const data = { + name: 'impeccable', + description: 'Design fluency. Also handles: critique, audit. Commands: craft, polish.' + }; + + const result = generateYamlFrontmatter(data); + // Must be wrapped in quotes so YAML parsers don't mis-read the inner `: ` as a mapping + expect(result).toContain('description: "Design fluency. Also handles: critique, audit. Commands: craft, polish."'); + + // Roundtrip through our parser should recover the original string intact + const parsed = parseFrontmatter(`${result}\n\nbody`); + expect(parsed.frontmatter.description).toBe(data.description); + }); + + test('should quote strings starting with YAML flow indicators', () => { + const data = { + name: 'test', + 'argument-hint': '[command] [target]' + }; + + const result = generateYamlFrontmatter(data); + expect(result).toContain('argument-hint: "[command] [target]"'); + }); + + test('should not quote plain strings without special chars', () => { + const data = { + name: 'simple', + description: 'A plain description with no colons or hashes' + }; + + const result = generateYamlFrontmatter(data); + expect(result).toContain('description: A plain description with no colons or hashes'); + expect(result).not.toContain('"A plain'); + }); }); describe('ensureDir', () => { From b0f44f83c61e2fb7689d958dc4e713fded289da8 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 10 Apr 2026 19:42:14 -0700 Subject: [PATCH 002/125] Consolidate 18 skills into 1 /impeccable skill with 20 commands Biggest change in a while. Users previously had 18 standalone skill entries cluttering their /menu; now they have one entry (/impeccable) that routes to 20 specialized commands via argument dispatch. The pin mechanism (/impeccable pin audit) restores standalone shortcuts on demand for commands users hit all the time. ## Architecture - Single /impeccable skill with command router section in SKILL.md - 20 commands served via reference files under source/skills/impeccable/reference/ - /impeccable pin creates a lightweight redirect shim so users who prefer /audit, /polish, etc. can still have them - Context gathering (teach) auto-runs on first use - command-metadata.json is the single source of truth for command descriptions, argument hints, and relationships ## Site rewrite - Docs URL: /skills renamed to /docs (with /skills permanent redirects) - Homepage hero frames Impeccable as "one skill with 20 commands" - "Get Started" split into 50/50 install + how-to-use with editorial numbered steps, /impeccable shown as the home command with three modes - New /docs overview: home command hero card + dense category rows matching the old cheatsheet density, with leads-to/pairs-with/ combines-with relationship metadata served from a shared source - Cheatsheet merged into /docs, /cheatsheet redirects - Magazine spread and mobile cards show /impeccable as a stacked namespace label above the command name at full display size - Periodic table updated with craft/teach/extract as first-class cells - Skill detail pages generate from reference files, with an editorial wrapper per command for tagline + body - Tutorials and anti-patterns pages updated to use /impeccable ## Build system - Dead code removed (scripts/lib/transformers/shared.js) - Build log wording fixed ("1 skill" not "1 skills (1 user-invocable)") - generateApiData fallback branch removed (throws loudly if metadata missing instead of silently degrading) - Commands API includes editorial tagline alongside the long description; UI surfaces prefer tagline for human display, description for auto- trigger keyword matching ## Gitignore - Added .claude/scheduled_tasks.lock, .claude/settings.local.json to ignore list (local Claude Code state that should not be tracked). - Harness skill directories (.claude/skills/, .agents/skills/, etc.) remain tracked by design: npx skills reads them from this repo at install time and they enable clean submodule use. Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/adapt/SKILL.md | 199 --------- .agents/skills/animate/SKILL.md | 175 -------- .agents/skills/audit/SKILL.md | 148 ------- .agents/skills/bolder/SKILL.md | 117 ------ .agents/skills/clarify/SKILL.md | 183 -------- .agents/skills/colorize/SKILL.md | 143 ------- .agents/skills/delight/SKILL.md | 304 -------------- .agents/skills/distill/SKILL.md | 122 ------ .agents/skills/harden/SKILL.md | 389 ------------------ .agents/skills/impeccable/SKILL.md | 166 ++++---- .../skills/impeccable/reference/adapt.md | 11 +- .../skills/impeccable/reference/animate.md | 11 +- .../skills/impeccable/reference/audit.md | 22 +- .../skills/impeccable/reference/bolder.md | 15 +- .../skills/impeccable/reference/clarify.md | 11 +- .../reference/cognitive-load.md | 0 .../skills/impeccable/reference/colorize.md | 11 +- .agents/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 42 +- .../skills/impeccable/reference/delight.md | 11 +- .../skills/impeccable/reference/distill.md | 11 +- .../skills/impeccable/reference/harden.md | 8 +- .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 13 +- .../skills/impeccable/reference/optimize.md | 8 +- .../skills/impeccable/reference/overdrive.md | 26 +- .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 14 +- .../skills/impeccable/reference/quieter.md | 11 +- .../skills/impeccable/reference/shape.md | 24 +- .agents/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 13 +- .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .agents/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .agents/skills/layout/SKILL.md | 125 ------ .agents/skills/optimize/SKILL.md | 266 ------------ .agents/skills/overdrive/SKILL.md | 142 ------- .agents/skills/polish/SKILL.md | 224 ---------- .agents/skills/quieter/SKILL.md | 103 ----- .agents/skills/shape/SKILL.md | 96 ----- .agents/skills/typeset/SKILL.md | 116 ------ .claude-plugin/marketplace.json | 4 +- .claude-plugin/plugin.json | 2 +- .claude/skills/adapt/SKILL.md | 199 --------- .claude/skills/audit/SKILL.md | 148 ------- .claude/skills/clarify/SKILL.md | 183 -------- .claude/skills/harden/SKILL.md | 389 ------------------ .claude/skills/impeccable/SKILL.md | 168 ++++---- .../skills/impeccable/reference/adapt.md | 11 +- .../reference/animate.md} | 13 +- .../skills/impeccable/reference/audit.md | 22 +- .../reference/bolder.md} | 17 +- .../skills/impeccable/reference/clarify.md | 11 +- .../reference/cognitive-load.md | 0 .../reference/colorize.md} | 13 +- .claude/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 44 +- .../reference/delight.md} | 13 +- .../reference/distill.md} | 13 +- .../skills/impeccable/reference/harden.md | 8 +- .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 13 +- .../skills/impeccable/reference/optimize.md | 8 +- .../reference/overdrive.md} | 28 +- .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 14 +- .../reference/quieter.md} | 13 +- .../reference/shape.md} | 26 +- .claude/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 13 +- .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .claude/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .claude/skills/layout/SKILL.md | 125 ------ .claude/skills/optimize/SKILL.md | 266 ------------ .claude/skills/polish/SKILL.md | 224 ---------- .claude/skills/typeset/SKILL.md | 116 ------ .codex/skills/adapt/SKILL.md | 198 --------- .codex/skills/animate/SKILL.md | 174 -------- .codex/skills/bolder/SKILL.md | 116 ------ .codex/skills/clarify/SKILL.md | 182 -------- .codex/skills/colorize/SKILL.md | 142 ------- .codex/skills/delight/SKILL.md | 303 -------------- .codex/skills/distill/SKILL.md | 121 ------ .codex/skills/harden/SKILL.md | 388 ----------------- .codex/skills/impeccable/SKILL.md | 166 ++++---- .../skills/impeccable/reference/adapt.md | 11 +- .../skills/impeccable/reference/animate.md | 11 +- .../reference/audit.md} | 23 +- .../skills/impeccable/reference/bolder.md | 15 +- .../skills/impeccable/reference/clarify.md | 11 +- .../reference/cognitive-load.md | 0 .../skills/impeccable/reference/colorize.md | 11 +- .codex/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 43 +- .../skills/impeccable/reference/delight.md | 11 +- .../skills/impeccable/reference/distill.md | 11 +- .../skills/impeccable/reference/harden.md | 8 +- .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 13 +- .../skills/impeccable/reference/optimize.md | 8 +- .../skills/impeccable/reference/overdrive.md | 26 +- .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 14 +- .../skills/impeccable/reference/quieter.md | 11 +- .../reference/shape.md} | 25 +- .codex/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 13 +- .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .codex/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .codex/skills/layout/SKILL.md | 124 ------ .codex/skills/optimize/SKILL.md | 265 ------------ .codex/skills/overdrive/SKILL.md | 141 ------- .codex/skills/polish/SKILL.md | 223 ---------- .codex/skills/quieter/SKILL.md | 102 ----- .codex/skills/typeset/SKILL.md | 115 ------ .cursor/skills/impeccable/SKILL.md | 164 ++++---- .../skills/impeccable/reference/adapt.md | 11 +- .../reference/animate.md} | 11 +- .../skills/impeccable/reference/audit.md | 22 +- .../skills/impeccable/reference/bolder.md | 15 +- .../reference/clarify.md} | 11 +- .../reference/cognitive-load.md | 0 .../reference/colorize.md} | 11 +- .cursor/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 40 +- .../reference/delight.md} | 11 +- .../skills/impeccable/reference/distill.md | 11 +- .../skills/impeccable/reference/harden.md | 8 +- .../reference/heuristics-scoring.md | 0 .../reference/layout.md} | 13 +- .../skills/impeccable/reference/optimize.md | 8 +- .../skills/impeccable/reference/overdrive.md | 26 +- .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 14 +- .../reference/quieter.md} | 11 +- .../skills/impeccable/reference/shape.md | 24 +- .cursor/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 13 +- .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .cursor/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .gemini/skills/impeccable/SKILL.md | 164 ++++---- .gemini/skills/impeccable/reference/adapt.md | 190 +++++++++ .../skills/impeccable/reference/animate.md | 11 +- .../reference/audit.md} | 22 +- .../skills/impeccable/reference/bolder.md | 15 +- .../skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .../skills/impeccable/reference/colorize.md | 11 +- .gemini/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 40 +- .../reference/delight.md} | 11 +- .../skills/impeccable/reference/distill.md | 11 +- .gemini/skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .gemini/skills/impeccable/reference/layout.md | 114 +++++ .../skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../reference/overdrive.md} | 26 +- .../reference/personas.md | 0 .gemini/skills/impeccable/reference/polish.md | 212 ++++++++++ .../skills/impeccable/reference/quieter.md | 11 +- .../reference/shape.md} | 24 +- .gemini/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .gemini/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .gitignore | 11 +- .kiro/skills/impeccable/SKILL.md | 164 ++++---- .kiro/skills/impeccable/reference/adapt.md | 190 +++++++++ .kiro/skills/impeccable/reference/animate.md | 166 ++++++++ .kiro/skills/impeccable/reference/audit.md | 134 ++++++ .kiro/skills/impeccable/reference/bolder.md | 106 +++++ .kiro/skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .kiro/skills/impeccable/reference/colorize.md | 134 ++++++ .kiro/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 40 +- .kiro/skills/impeccable/reference/delight.md | 295 +++++++++++++ .kiro/skills/impeccable/reference/distill.md | 111 +++++ .kiro/skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .kiro/skills/impeccable/reference/layout.md | 114 +++++ .kiro/skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../skills/impeccable/reference/overdrive.md | 130 ++++++ .../reference/personas.md | 0 .kiro/skills/impeccable/reference/polish.md | 212 ++++++++++ .kiro/skills/impeccable/reference/quieter.md | 92 +++++ .../skills/impeccable/reference/shape.md | 24 +- .kiro/skills/impeccable/reference/teach.md | 67 +++ .kiro/skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .kiro/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .opencode/skills/adapt/SKILL.md | 199 --------- .opencode/skills/audit/SKILL.md | 148 ------- .opencode/skills/clarify/SKILL.md | 183 -------- .opencode/skills/harden/SKILL.md | 389 ------------------ .opencode/skills/impeccable/SKILL.md | 168 ++++---- .../skills/impeccable/reference/adapt.md | 190 +++++++++ .../reference/animate.md} | 13 +- .../skills/impeccable/reference/audit.md | 134 ++++++ .../reference/bolder.md} | 17 +- .../skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .../reference/colorize.md} | 13 +- .../skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 44 +- .../reference/delight.md} | 13 +- .../reference/distill.md} | 13 +- .../skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 114 +++++ .../skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../reference/overdrive.md} | 28 +- .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 212 ++++++++++ .../reference/quieter.md} | 13 +- .../reference/shape.md} | 26 +- .../skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .opencode/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .opencode/skills/layout/SKILL.md | 125 ------ .opencode/skills/optimize/SKILL.md | 266 ------------ .opencode/skills/polish/SKILL.md | 224 ---------- .opencode/skills/typeset/SKILL.md | 116 ------ .pi/skills/impeccable/SKILL.md | 166 ++++---- .pi/skills/impeccable/reference/adapt.md | 190 +++++++++ .pi/skills/impeccable/reference/animate.md | 166 ++++++++ .pi/skills/impeccable/reference/audit.md | 134 ++++++ .pi/skills/impeccable/reference/bolder.md | 106 +++++ .pi/skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .pi/skills/impeccable/reference/colorize.md | 134 ++++++ .pi/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 42 +- .pi/skills/impeccable/reference/delight.md | 295 +++++++++++++ .pi/skills/impeccable/reference/distill.md | 111 +++++ .pi/skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .pi/skills/impeccable/reference/layout.md | 114 +++++ .pi/skills/impeccable/reference/optimize.md | 258 ++++++++++++ .pi/skills/impeccable/reference/overdrive.md | 130 ++++++ .../reference/personas.md | 0 .pi/skills/impeccable/reference/polish.md | 212 ++++++++++ .pi/skills/impeccable/reference/quieter.md | 92 +++++ .pi/skills/impeccable/reference/shape.md | 82 ++++ .pi/skills/impeccable/reference/teach.md | 67 +++ .pi/skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .pi/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .rovodev/skills/adapt/SKILL.md | 199 --------- .rovodev/skills/animate/SKILL.md | 175 -------- .rovodev/skills/audit/SKILL.md | 148 ------- .rovodev/skills/bolder/SKILL.md | 117 ------ .rovodev/skills/clarify/SKILL.md | 183 -------- .rovodev/skills/colorize/SKILL.md | 143 ------- .rovodev/skills/delight/SKILL.md | 304 -------------- .rovodev/skills/distill/SKILL.md | 122 ------ .rovodev/skills/harden/SKILL.md | 389 ------------------ .rovodev/skills/impeccable/SKILL.md | 168 ++++---- .rovodev/skills/impeccable/reference/adapt.md | 190 +++++++++ .../skills/impeccable/reference/animate.md | 166 ++++++++ .rovodev/skills/impeccable/reference/audit.md | 134 ++++++ .../skills/impeccable/reference/bolder.md | 106 +++++ .../skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .../skills/impeccable/reference/colorize.md | 134 ++++++ .rovodev/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 44 +- .../skills/impeccable/reference/delight.md | 295 +++++++++++++ .../skills/impeccable/reference/distill.md | 111 +++++ .../skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 114 +++++ .../skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../skills/impeccable/reference/overdrive.md | 130 ++++++ .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 212 ++++++++++ .../skills/impeccable/reference/quieter.md | 92 +++++ .rovodev/skills/impeccable/reference/shape.md | 82 ++++ .rovodev/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .rovodev/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .rovodev/skills/layout/SKILL.md | 125 ------ .rovodev/skills/optimize/SKILL.md | 266 ------------ .rovodev/skills/overdrive/SKILL.md | 142 ------- .rovodev/skills/polish/SKILL.md | 224 ---------- .rovodev/skills/quieter/SKILL.md | 103 ----- .rovodev/skills/shape/SKILL.md | 96 ----- .rovodev/skills/typeset/SKILL.md | 116 ------ .trae-cn/skills/adapt/SKILL.md | 199 --------- .trae-cn/skills/animate/SKILL.md | 175 -------- .trae-cn/skills/audit/SKILL.md | 148 ------- .trae-cn/skills/bolder/SKILL.md | 117 ------ .trae-cn/skills/clarify/SKILL.md | 183 -------- .trae-cn/skills/colorize/SKILL.md | 143 ------- .trae-cn/skills/delight/SKILL.md | 304 -------------- .trae-cn/skills/distill/SKILL.md | 122 ------ .trae-cn/skills/harden/SKILL.md | 389 ------------------ .trae-cn/skills/impeccable/SKILL.md | 166 ++++---- .trae-cn/skills/impeccable/reference/adapt.md | 190 +++++++++ .../skills/impeccable/reference/animate.md | 166 ++++++++ .trae-cn/skills/impeccable/reference/audit.md | 134 ++++++ .../skills/impeccable/reference/bolder.md | 106 +++++ .../skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .../skills/impeccable/reference/colorize.md | 134 ++++++ .trae-cn/skills/impeccable/reference/craft.md | 4 +- .../skills/impeccable/reference/critique.md | 42 +- .../skills/impeccable/reference/delight.md | 295 +++++++++++++ .../skills/impeccable/reference/distill.md | 111 +++++ .../skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .../skills/impeccable/reference/layout.md | 114 +++++ .../skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../skills/impeccable/reference/overdrive.md | 130 ++++++ .../reference/personas.md | 0 .../skills/impeccable/reference/polish.md | 212 ++++++++++ .../skills/impeccable/reference/quieter.md | 92 +++++ .trae-cn/skills/impeccable/reference/shape.md | 82 ++++ .trae-cn/skills/impeccable/reference/teach.md | 67 +++ .../skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .trae-cn/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .trae-cn/skills/layout/SKILL.md | 125 ------ .trae-cn/skills/optimize/SKILL.md | 266 ------------ .trae-cn/skills/overdrive/SKILL.md | 142 ------- .trae-cn/skills/polish/SKILL.md | 224 ---------- .trae-cn/skills/quieter/SKILL.md | 103 ----- .trae-cn/skills/shape/SKILL.md | 96 ----- .trae-cn/skills/typeset/SKILL.md | 116 ------ .trae/skills/adapt/SKILL.md | 199 --------- .trae/skills/animate/SKILL.md | 175 -------- .trae/skills/audit/SKILL.md | 148 ------- .trae/skills/bolder/SKILL.md | 117 ------ .trae/skills/clarify/SKILL.md | 183 -------- .trae/skills/colorize/SKILL.md | 143 ------- .trae/skills/delight/SKILL.md | 304 -------------- .trae/skills/distill/SKILL.md | 122 ------ .trae/skills/harden/SKILL.md | 389 ------------------ .trae/skills/impeccable/SKILL.md | 166 ++++---- .trae/skills/impeccable/reference/adapt.md | 190 +++++++++ .trae/skills/impeccable/reference/animate.md | 166 ++++++++ .trae/skills/impeccable/reference/audit.md | 134 ++++++ .trae/skills/impeccable/reference/bolder.md | 106 +++++ .trae/skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .trae/skills/impeccable/reference/colorize.md | 134 ++++++ .trae/skills/impeccable/reference/craft.md | 4 +- .../skills/impeccable/reference/critique.md | 42 +- .trae/skills/impeccable/reference/delight.md | 295 +++++++++++++ .trae/skills/impeccable/reference/distill.md | 111 +++++ .trae/skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 .trae/skills/impeccable/reference/layout.md | 114 +++++ .trae/skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../skills/impeccable/reference/overdrive.md | 130 ++++++ .../reference/personas.md | 0 .trae/skills/impeccable/reference/polish.md | 212 ++++++++++ .trae/skills/impeccable/reference/quieter.md | 92 +++++ .trae/skills/impeccable/reference/shape.md | 82 ++++ .trae/skills/impeccable/reference/teach.md | 67 +++ .trae/skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ .trae/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ .trae/skills/layout/SKILL.md | 125 ------ .trae/skills/optimize/SKILL.md | 266 ------------ .trae/skills/overdrive/SKILL.md | 142 ------- .trae/skills/polish/SKILL.md | 224 ---------- .trae/skills/quieter/SKILL.md | 103 ----- .trae/skills/shape/SKILL.md | 96 ----- .trae/skills/typeset/SKILL.md | 116 ------ AGENTS.md | 2 +- CLAUDE.md | 30 +- NOTICE.md | 2 +- README.md | 80 ++-- content/site/anti-patterns-catalog.js | 2 +- content/site/partials/header.html | 2 +- content/site/skills/adapt.md | 6 +- content/site/skills/animate.md | 4 +- content/site/skills/audit.md | 10 +- content/site/skills/bolder.md | 10 +- content/site/skills/clarify.md | 6 +- content/site/skills/colorize.md | 8 +- content/site/skills/craft.md | 42 ++ content/site/skills/critique.md | 8 +- content/site/skills/delight.md | 4 +- content/site/skills/distill.md | 8 +- content/site/skills/extract.md | 4 +- content/site/skills/harden.md | 6 +- content/site/skills/impeccable.md | 36 +- content/site/skills/layout.md | 6 +- content/site/skills/optimize.md | 6 +- content/site/skills/overdrive.md | 4 +- content/site/skills/polish.md | 10 +- content/site/skills/quieter.md | 8 +- content/site/skills/shape.md | 10 +- content/site/skills/teach.md | 3 + content/site/skills/typeset.md | 6 +- .../site/tutorials/critique-with-overlay.md | 20 +- content/site/tutorials/getting-started.md | 29 +- public/cheatsheet.html | 316 -------------- public/css/main.css | 222 +++++++++- public/css/sub-pages.css | 325 +++++++++++---- public/css/workflow.css | 18 + public/index.html | 198 +++++---- public/js/components/framework-viz.js | 65 +-- public/js/components/glass-terminal.js | 52 ++- public/js/data.js | 26 +- public/js/demo-renderer.js | 72 ++++ public/js/generated/counts.js | 2 +- public/privacy.html | 2 +- public/sitemap.xml | 78 ++-- scripts/build-sub-pages.js | 210 ++++++---- scripts/build.js | 90 +++- scripts/lib/render-markdown.js | 8 +- scripts/lib/sub-pages-data.js | 136 ++++-- scripts/lib/transformers/factory.js | 4 +- scripts/lib/transformers/index.js | 3 + scripts/lib/transformers/shared.js | 81 ---- scripts/lib/utils.js | 28 +- server/index.js | 16 +- server/lib/api-handlers.js | 62 ++- skills-lock.json | 30 -- source/skills/adapt/SKILL.md | 199 --------- source/skills/clarify/SKILL.md | 183 -------- source/skills/harden/SKILL.md | 389 ------------------ source/skills/impeccable/SKILL.md | 168 ++++---- source/skills/impeccable/reference/adapt.md | 190 +++++++++ .../reference/animate.md} | 10 +- .../reference/audit.md} | 19 +- .../reference/bolder.md} | 14 +- source/skills/impeccable/reference/clarify.md | 174 ++++++++ .../reference/cognitive-load.md | 0 .../reference/colorize.md} | 10 +- source/skills/impeccable/reference/craft.md | 4 +- .../reference/critique.md} | 39 +- .../reference/delight.md} | 10 +- .../reference/distill.md} | 10 - source/skills/impeccable/reference/harden.md | 381 +++++++++++++++++ .../reference/heuristics-scoring.md | 0 source/skills/impeccable/reference/layout.md | 114 +++++ .../skills/impeccable/reference/optimize.md | 258 ++++++++++++ .../reference/overdrive.md} | 25 +- .../reference/personas.md | 0 source/skills/impeccable/reference/polish.md | 212 ++++++++++ .../reference/quieter.md} | 10 - .../reference/shape.md} | 25 +- source/skills/impeccable/reference/teach.md | 67 +++ source/skills/impeccable/reference/typeset.md | 105 +++++ .../impeccable/scripts/cleanup-deprecated.mjs | 34 +- .../impeccable/scripts/command-metadata.json | 82 ++++ source/skills/impeccable/scripts/pin.mjs | 214 ++++++++++ source/skills/layout/SKILL.md | 124 ------ source/skills/optimize/SKILL.md | 266 ------------ source/skills/polish/SKILL.md | 224 ---------- source/skills/typeset/SKILL.md | 115 ------ tests/cleanup-deprecated.test.mjs | 16 +- 469 files changed, 25435 insertions(+), 22231 deletions(-) delete mode 100644 .agents/skills/adapt/SKILL.md delete mode 100644 .agents/skills/animate/SKILL.md delete mode 100644 .agents/skills/audit/SKILL.md delete mode 100644 .agents/skills/bolder/SKILL.md delete mode 100644 .agents/skills/clarify/SKILL.md delete mode 100644 .agents/skills/colorize/SKILL.md delete mode 100644 .agents/skills/delight/SKILL.md delete mode 100644 .agents/skills/distill/SKILL.md delete mode 100644 .agents/skills/harden/SKILL.md rename .gemini/skills/adapt/SKILL.md => .agents/skills/impeccable/reference/adapt.md (90%) rename .gemini/skills/animate/SKILL.md => .agents/skills/impeccable/reference/animate.md (91%) rename .kiro/skills/audit/SKILL.md => .agents/skills/impeccable/reference/audit.md (80%) rename .pi/skills/bolder/SKILL.md => .agents/skills/impeccable/reference/bolder.md (88%) rename .pi/skills/clarify/SKILL.md => .agents/skills/impeccable/reference/clarify.md (89%) rename .agents/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .kiro/skills/colorize/SKILL.md => .agents/skills/impeccable/reference/colorize.md (90%) rename .agents/skills/{critique/SKILL.md => impeccable/reference/critique.md} (84%) rename .kiro/skills/delight/SKILL.md => .agents/skills/impeccable/reference/delight.md (92%) rename .gemini/skills/distill/SKILL.md => .agents/skills/impeccable/reference/distill.md (91%) rename .pi/skills/harden/SKILL.md => .agents/skills/impeccable/reference/harden.md (96%) rename .agents/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) rename .gemini/skills/layout/SKILL.md => .agents/skills/impeccable/reference/layout.md (89%) rename .cursor/skills/optimize/SKILL.md => .agents/skills/impeccable/reference/optimize.md (96%) rename .pi/skills/overdrive/SKILL.md => .agents/skills/impeccable/reference/overdrive.md (78%) rename .agents/skills/{critique => impeccable}/reference/personas.md (100%) rename .pi/skills/polish/SKILL.md => .agents/skills/impeccable/reference/polish.md (93%) rename .kiro/skills/quieter/SKILL.md => .agents/skills/impeccable/reference/quieter.md (89%) rename .kiro/skills/shape/SKILL.md => .agents/skills/impeccable/reference/shape.md (80%) create mode 100644 .agents/skills/impeccable/reference/teach.md rename .cursor/skills/typeset/SKILL.md => .agents/skills/impeccable/reference/typeset.md (87%) create mode 100644 .agents/skills/impeccable/scripts/command-metadata.json create mode 100644 .agents/skills/impeccable/scripts/pin.mjs delete mode 100644 .agents/skills/layout/SKILL.md delete mode 100644 .agents/skills/optimize/SKILL.md delete mode 100644 .agents/skills/overdrive/SKILL.md delete mode 100644 .agents/skills/polish/SKILL.md delete mode 100644 .agents/skills/quieter/SKILL.md delete mode 100644 .agents/skills/shape/SKILL.md delete mode 100644 .agents/skills/typeset/SKILL.md delete mode 100644 .claude/skills/adapt/SKILL.md delete mode 100644 .claude/skills/audit/SKILL.md delete mode 100644 .claude/skills/clarify/SKILL.md delete mode 100644 .claude/skills/harden/SKILL.md rename .pi/skills/adapt/SKILL.md => .claude/skills/impeccable/reference/adapt.md (90%) rename .claude/skills/{animate/SKILL.md => impeccable/reference/animate.md} (90%) rename .cursor/skills/audit/SKILL.md => .claude/skills/impeccable/reference/audit.md (80%) rename .claude/skills/{bolder/SKILL.md => impeccable/reference/bolder.md} (87%) rename .gemini/skills/clarify/SKILL.md => .claude/skills/impeccable/reference/clarify.md (89%) rename .claude/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .claude/skills/{colorize/SKILL.md => impeccable/reference/colorize.md} (89%) rename .claude/skills/{critique/SKILL.md => impeccable/reference/critique.md} (84%) rename .claude/skills/{delight/SKILL.md => impeccable/reference/delight.md} (92%) rename .claude/skills/{distill/SKILL.md => impeccable/reference/distill.md} (90%) rename .cursor/skills/harden/SKILL.md => .claude/skills/impeccable/reference/harden.md (96%) rename .claude/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) rename .pi/skills/layout/SKILL.md => .claude/skills/impeccable/reference/layout.md (89%) rename .gemini/skills/optimize/SKILL.md => .claude/skills/impeccable/reference/optimize.md (96%) rename .claude/skills/{overdrive/SKILL.md => impeccable/reference/overdrive.md} (77%) rename .claude/skills/{critique => impeccable}/reference/personas.md (100%) rename .cursor/skills/polish/SKILL.md => .claude/skills/impeccable/reference/polish.md (93%) rename .claude/skills/{quieter/SKILL.md => impeccable/reference/quieter.md} (88%) rename .claude/skills/{shape/SKILL.md => impeccable/reference/shape.md} (79%) create mode 100644 .claude/skills/impeccable/reference/teach.md rename .gemini/skills/typeset/SKILL.md => .claude/skills/impeccable/reference/typeset.md (87%) create mode 100644 .claude/skills/impeccable/scripts/command-metadata.json create mode 100644 .claude/skills/impeccable/scripts/pin.mjs delete mode 100644 .claude/skills/layout/SKILL.md delete mode 100644 .claude/skills/optimize/SKILL.md delete mode 100644 .claude/skills/polish/SKILL.md delete mode 100644 .claude/skills/typeset/SKILL.md delete mode 100644 .codex/skills/adapt/SKILL.md delete mode 100644 .codex/skills/animate/SKILL.md delete mode 100644 .codex/skills/bolder/SKILL.md delete mode 100644 .codex/skills/clarify/SKILL.md delete mode 100644 .codex/skills/colorize/SKILL.md delete mode 100644 .codex/skills/delight/SKILL.md delete mode 100644 .codex/skills/distill/SKILL.md delete mode 100644 .codex/skills/harden/SKILL.md rename .cursor/skills/adapt/SKILL.md => .codex/skills/impeccable/reference/adapt.md (90%) rename .kiro/skills/animate/SKILL.md => .codex/skills/impeccable/reference/animate.md (91%) rename .codex/skills/{audit/SKILL.md => impeccable/reference/audit.md} (79%) rename .cursor/skills/bolder/SKILL.md => .codex/skills/impeccable/reference/bolder.md (88%) rename .kiro/skills/clarify/SKILL.md => .codex/skills/impeccable/reference/clarify.md (89%) rename .codex/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .gemini/skills/colorize/SKILL.md => .codex/skills/impeccable/reference/colorize.md (90%) rename .codex/skills/{critique/SKILL.md => impeccable/reference/critique.md} (84%) rename .pi/skills/delight/SKILL.md => .codex/skills/impeccable/reference/delight.md (92%) rename .cursor/skills/distill/SKILL.md => .codex/skills/impeccable/reference/distill.md (91%) rename .gemini/skills/harden/SKILL.md => .codex/skills/impeccable/reference/harden.md (96%) rename .codex/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) rename .kiro/skills/layout/SKILL.md => .codex/skills/impeccable/reference/layout.md (89%) rename .pi/skills/optimize/SKILL.md => .codex/skills/impeccable/reference/optimize.md (96%) rename .cursor/skills/overdrive/SKILL.md => .codex/skills/impeccable/reference/overdrive.md (78%) rename .codex/skills/{critique => impeccable}/reference/personas.md (100%) rename .gemini/skills/polish/SKILL.md => .codex/skills/impeccable/reference/polish.md (93%) rename .gemini/skills/quieter/SKILL.md => .codex/skills/impeccable/reference/quieter.md (89%) rename .codex/skills/{shape/SKILL.md => impeccable/reference/shape.md} (79%) create mode 100644 .codex/skills/impeccable/reference/teach.md rename .kiro/skills/typeset/SKILL.md => .codex/skills/impeccable/reference/typeset.md (87%) create mode 100644 .codex/skills/impeccable/scripts/command-metadata.json create mode 100644 .codex/skills/impeccable/scripts/pin.mjs delete mode 100644 .codex/skills/layout/SKILL.md delete mode 100644 .codex/skills/optimize/SKILL.md delete mode 100644 .codex/skills/overdrive/SKILL.md delete mode 100644 .codex/skills/polish/SKILL.md delete mode 100644 .codex/skills/quieter/SKILL.md delete mode 100644 .codex/skills/typeset/SKILL.md rename .kiro/skills/adapt/SKILL.md => .cursor/skills/impeccable/reference/adapt.md (90%) rename .cursor/skills/{animate/SKILL.md => impeccable/reference/animate.md} (91%) rename .pi/skills/audit/SKILL.md => .cursor/skills/impeccable/reference/audit.md (80%) rename .gemini/skills/bolder/SKILL.md => .cursor/skills/impeccable/reference/bolder.md (88%) rename .cursor/skills/{clarify/SKILL.md => impeccable/reference/clarify.md} (89%) rename .cursor/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .cursor/skills/{colorize/SKILL.md => impeccable/reference/colorize.md} (90%) rename .cursor/skills/{critique/SKILL.md => impeccable/reference/critique.md} (85%) rename .cursor/skills/{delight/SKILL.md => impeccable/reference/delight.md} (92%) rename .kiro/skills/distill/SKILL.md => .cursor/skills/impeccable/reference/distill.md (91%) rename .kiro/skills/harden/SKILL.md => .cursor/skills/impeccable/reference/harden.md (96%) rename .cursor/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) rename .cursor/skills/{layout/SKILL.md => impeccable/reference/layout.md} (89%) rename .kiro/skills/optimize/SKILL.md => .cursor/skills/impeccable/reference/optimize.md (96%) rename .kiro/skills/overdrive/SKILL.md => .cursor/skills/impeccable/reference/overdrive.md (78%) rename .cursor/skills/{critique => impeccable}/reference/personas.md (100%) rename .kiro/skills/polish/SKILL.md => .cursor/skills/impeccable/reference/polish.md (93%) rename .cursor/skills/{quieter/SKILL.md => impeccable/reference/quieter.md} (89%) rename .pi/skills/shape/SKILL.md => .cursor/skills/impeccable/reference/shape.md (80%) create mode 100644 .cursor/skills/impeccable/reference/teach.md rename .pi/skills/typeset/SKILL.md => .cursor/skills/impeccable/reference/typeset.md (87%) create mode 100644 .cursor/skills/impeccable/scripts/command-metadata.json create mode 100644 .cursor/skills/impeccable/scripts/pin.mjs create mode 100644 .gemini/skills/impeccable/reference/adapt.md rename .pi/skills/animate/SKILL.md => .gemini/skills/impeccable/reference/animate.md (91%) rename .gemini/skills/{audit/SKILL.md => impeccable/reference/audit.md} (80%) rename .kiro/skills/bolder/SKILL.md => .gemini/skills/impeccable/reference/bolder.md (88%) create mode 100644 .gemini/skills/impeccable/reference/clarify.md rename .gemini/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .pi/skills/colorize/SKILL.md => .gemini/skills/impeccable/reference/colorize.md (90%) rename .gemini/skills/{critique/SKILL.md => impeccable/reference/critique.md} (85%) rename .gemini/skills/{delight/SKILL.md => impeccable/reference/delight.md} (92%) rename .pi/skills/distill/SKILL.md => .gemini/skills/impeccable/reference/distill.md (91%) create mode 100644 .gemini/skills/impeccable/reference/harden.md rename .gemini/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .gemini/skills/impeccable/reference/layout.md create mode 100644 .gemini/skills/impeccable/reference/optimize.md rename .gemini/skills/{overdrive/SKILL.md => impeccable/reference/overdrive.md} (78%) rename .gemini/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .gemini/skills/impeccable/reference/polish.md rename .pi/skills/quieter/SKILL.md => .gemini/skills/impeccable/reference/quieter.md (89%) rename .gemini/skills/{shape/SKILL.md => impeccable/reference/shape.md} (80%) create mode 100644 .gemini/skills/impeccable/reference/teach.md create mode 100644 .gemini/skills/impeccable/reference/typeset.md create mode 100644 .gemini/skills/impeccable/scripts/command-metadata.json create mode 100644 .gemini/skills/impeccable/scripts/pin.mjs create mode 100644 .kiro/skills/impeccable/reference/adapt.md create mode 100644 .kiro/skills/impeccable/reference/animate.md create mode 100644 .kiro/skills/impeccable/reference/audit.md create mode 100644 .kiro/skills/impeccable/reference/bolder.md create mode 100644 .kiro/skills/impeccable/reference/clarify.md rename .kiro/skills/{critique => impeccable}/reference/cognitive-load.md (100%) create mode 100644 .kiro/skills/impeccable/reference/colorize.md rename .kiro/skills/{critique/SKILL.md => impeccable/reference/critique.md} (85%) create mode 100644 .kiro/skills/impeccable/reference/delight.md create mode 100644 .kiro/skills/impeccable/reference/distill.md create mode 100644 .kiro/skills/impeccable/reference/harden.md rename .kiro/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .kiro/skills/impeccable/reference/layout.md create mode 100644 .kiro/skills/impeccable/reference/optimize.md create mode 100644 .kiro/skills/impeccable/reference/overdrive.md rename .kiro/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .kiro/skills/impeccable/reference/polish.md create mode 100644 .kiro/skills/impeccable/reference/quieter.md rename .cursor/skills/shape/SKILL.md => .kiro/skills/impeccable/reference/shape.md (80%) create mode 100644 .kiro/skills/impeccable/reference/teach.md create mode 100644 .kiro/skills/impeccable/reference/typeset.md create mode 100644 .kiro/skills/impeccable/scripts/command-metadata.json create mode 100644 .kiro/skills/impeccable/scripts/pin.mjs delete mode 100644 .opencode/skills/adapt/SKILL.md delete mode 100644 .opencode/skills/audit/SKILL.md delete mode 100644 .opencode/skills/clarify/SKILL.md delete mode 100644 .opencode/skills/harden/SKILL.md create mode 100644 .opencode/skills/impeccable/reference/adapt.md rename .opencode/skills/{animate/SKILL.md => impeccable/reference/animate.md} (90%) create mode 100644 .opencode/skills/impeccable/reference/audit.md rename .opencode/skills/{bolder/SKILL.md => impeccable/reference/bolder.md} (87%) create mode 100644 .opencode/skills/impeccable/reference/clarify.md rename .opencode/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename .opencode/skills/{colorize/SKILL.md => impeccable/reference/colorize.md} (89%) rename .opencode/skills/{critique/SKILL.md => impeccable/reference/critique.md} (84%) rename .opencode/skills/{delight/SKILL.md => impeccable/reference/delight.md} (92%) rename .opencode/skills/{distill/SKILL.md => impeccable/reference/distill.md} (90%) create mode 100644 .opencode/skills/impeccable/reference/harden.md rename .opencode/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .opencode/skills/impeccable/reference/layout.md create mode 100644 .opencode/skills/impeccable/reference/optimize.md rename .opencode/skills/{overdrive/SKILL.md => impeccable/reference/overdrive.md} (77%) rename .opencode/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .opencode/skills/impeccable/reference/polish.md rename .opencode/skills/{quieter/SKILL.md => impeccable/reference/quieter.md} (88%) rename .opencode/skills/{shape/SKILL.md => impeccable/reference/shape.md} (79%) create mode 100644 .opencode/skills/impeccable/reference/teach.md create mode 100644 .opencode/skills/impeccable/reference/typeset.md create mode 100644 .opencode/skills/impeccable/scripts/command-metadata.json create mode 100644 .opencode/skills/impeccable/scripts/pin.mjs delete mode 100644 .opencode/skills/layout/SKILL.md delete mode 100644 .opencode/skills/optimize/SKILL.md delete mode 100644 .opencode/skills/polish/SKILL.md delete mode 100644 .opencode/skills/typeset/SKILL.md create mode 100644 .pi/skills/impeccable/reference/adapt.md create mode 100644 .pi/skills/impeccable/reference/animate.md create mode 100644 .pi/skills/impeccable/reference/audit.md create mode 100644 .pi/skills/impeccable/reference/bolder.md create mode 100644 .pi/skills/impeccable/reference/clarify.md rename .pi/skills/{critique => impeccable}/reference/cognitive-load.md (100%) create mode 100644 .pi/skills/impeccable/reference/colorize.md rename .pi/skills/{critique/SKILL.md => impeccable/reference/critique.md} (85%) create mode 100644 .pi/skills/impeccable/reference/delight.md create mode 100644 .pi/skills/impeccable/reference/distill.md create mode 100644 .pi/skills/impeccable/reference/harden.md rename .pi/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .pi/skills/impeccable/reference/layout.md create mode 100644 .pi/skills/impeccable/reference/optimize.md create mode 100644 .pi/skills/impeccable/reference/overdrive.md rename .pi/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .pi/skills/impeccable/reference/polish.md create mode 100644 .pi/skills/impeccable/reference/quieter.md create mode 100644 .pi/skills/impeccable/reference/shape.md create mode 100644 .pi/skills/impeccable/reference/teach.md create mode 100644 .pi/skills/impeccable/reference/typeset.md create mode 100644 .pi/skills/impeccable/scripts/command-metadata.json create mode 100644 .pi/skills/impeccable/scripts/pin.mjs delete mode 100644 .rovodev/skills/adapt/SKILL.md delete mode 100644 .rovodev/skills/animate/SKILL.md delete mode 100644 .rovodev/skills/audit/SKILL.md delete mode 100644 .rovodev/skills/bolder/SKILL.md delete mode 100644 .rovodev/skills/clarify/SKILL.md delete mode 100644 .rovodev/skills/colorize/SKILL.md delete mode 100644 .rovodev/skills/delight/SKILL.md delete mode 100644 .rovodev/skills/distill/SKILL.md delete mode 100644 .rovodev/skills/harden/SKILL.md create mode 100644 .rovodev/skills/impeccable/reference/adapt.md create mode 100644 .rovodev/skills/impeccable/reference/animate.md create mode 100644 .rovodev/skills/impeccable/reference/audit.md create mode 100644 .rovodev/skills/impeccable/reference/bolder.md create mode 100644 .rovodev/skills/impeccable/reference/clarify.md rename .rovodev/skills/{critique => impeccable}/reference/cognitive-load.md (100%) create mode 100644 .rovodev/skills/impeccable/reference/colorize.md rename .rovodev/skills/{critique/SKILL.md => impeccable/reference/critique.md} (84%) create mode 100644 .rovodev/skills/impeccable/reference/delight.md create mode 100644 .rovodev/skills/impeccable/reference/distill.md create mode 100644 .rovodev/skills/impeccable/reference/harden.md rename .rovodev/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .rovodev/skills/impeccable/reference/layout.md create mode 100644 .rovodev/skills/impeccable/reference/optimize.md create mode 100644 .rovodev/skills/impeccable/reference/overdrive.md rename .rovodev/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .rovodev/skills/impeccable/reference/polish.md create mode 100644 .rovodev/skills/impeccable/reference/quieter.md create mode 100644 .rovodev/skills/impeccable/reference/shape.md create mode 100644 .rovodev/skills/impeccable/reference/teach.md create mode 100644 .rovodev/skills/impeccable/reference/typeset.md create mode 100644 .rovodev/skills/impeccable/scripts/command-metadata.json create mode 100644 .rovodev/skills/impeccable/scripts/pin.mjs delete mode 100644 .rovodev/skills/layout/SKILL.md delete mode 100644 .rovodev/skills/optimize/SKILL.md delete mode 100644 .rovodev/skills/overdrive/SKILL.md delete mode 100644 .rovodev/skills/polish/SKILL.md delete mode 100644 .rovodev/skills/quieter/SKILL.md delete mode 100644 .rovodev/skills/shape/SKILL.md delete mode 100644 .rovodev/skills/typeset/SKILL.md delete mode 100644 .trae-cn/skills/adapt/SKILL.md delete mode 100644 .trae-cn/skills/animate/SKILL.md delete mode 100644 .trae-cn/skills/audit/SKILL.md delete mode 100644 .trae-cn/skills/bolder/SKILL.md delete mode 100644 .trae-cn/skills/clarify/SKILL.md delete mode 100644 .trae-cn/skills/colorize/SKILL.md delete mode 100644 .trae-cn/skills/delight/SKILL.md delete mode 100644 .trae-cn/skills/distill/SKILL.md delete mode 100644 .trae-cn/skills/harden/SKILL.md create mode 100644 .trae-cn/skills/impeccable/reference/adapt.md create mode 100644 .trae-cn/skills/impeccable/reference/animate.md create mode 100644 .trae-cn/skills/impeccable/reference/audit.md create mode 100644 .trae-cn/skills/impeccable/reference/bolder.md create mode 100644 .trae-cn/skills/impeccable/reference/clarify.md rename .trae-cn/skills/{critique => impeccable}/reference/cognitive-load.md (100%) create mode 100644 .trae-cn/skills/impeccable/reference/colorize.md rename .trae/skills/critique/SKILL.md => .trae-cn/skills/impeccable/reference/critique.md (84%) create mode 100644 .trae-cn/skills/impeccable/reference/delight.md create mode 100644 .trae-cn/skills/impeccable/reference/distill.md create mode 100644 .trae-cn/skills/impeccable/reference/harden.md rename .trae-cn/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .trae-cn/skills/impeccable/reference/layout.md create mode 100644 .trae-cn/skills/impeccable/reference/optimize.md create mode 100644 .trae-cn/skills/impeccable/reference/overdrive.md rename .trae-cn/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .trae-cn/skills/impeccable/reference/polish.md create mode 100644 .trae-cn/skills/impeccable/reference/quieter.md create mode 100644 .trae-cn/skills/impeccable/reference/shape.md create mode 100644 .trae-cn/skills/impeccable/reference/teach.md create mode 100644 .trae-cn/skills/impeccable/reference/typeset.md create mode 100644 .trae-cn/skills/impeccable/scripts/command-metadata.json create mode 100644 .trae-cn/skills/impeccable/scripts/pin.mjs delete mode 100644 .trae-cn/skills/layout/SKILL.md delete mode 100644 .trae-cn/skills/optimize/SKILL.md delete mode 100644 .trae-cn/skills/overdrive/SKILL.md delete mode 100644 .trae-cn/skills/polish/SKILL.md delete mode 100644 .trae-cn/skills/quieter/SKILL.md delete mode 100644 .trae-cn/skills/shape/SKILL.md delete mode 100644 .trae-cn/skills/typeset/SKILL.md delete mode 100644 .trae/skills/adapt/SKILL.md delete mode 100644 .trae/skills/animate/SKILL.md delete mode 100644 .trae/skills/audit/SKILL.md delete mode 100644 .trae/skills/bolder/SKILL.md delete mode 100644 .trae/skills/clarify/SKILL.md delete mode 100644 .trae/skills/colorize/SKILL.md delete mode 100644 .trae/skills/delight/SKILL.md delete mode 100644 .trae/skills/distill/SKILL.md delete mode 100644 .trae/skills/harden/SKILL.md create mode 100644 .trae/skills/impeccable/reference/adapt.md create mode 100644 .trae/skills/impeccable/reference/animate.md create mode 100644 .trae/skills/impeccable/reference/audit.md create mode 100644 .trae/skills/impeccable/reference/bolder.md create mode 100644 .trae/skills/impeccable/reference/clarify.md rename .trae/skills/{critique => impeccable}/reference/cognitive-load.md (100%) create mode 100644 .trae/skills/impeccable/reference/colorize.md rename .trae-cn/skills/critique/SKILL.md => .trae/skills/impeccable/reference/critique.md (84%) create mode 100644 .trae/skills/impeccable/reference/delight.md create mode 100644 .trae/skills/impeccable/reference/distill.md create mode 100644 .trae/skills/impeccable/reference/harden.md rename .trae/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 .trae/skills/impeccable/reference/layout.md create mode 100644 .trae/skills/impeccable/reference/optimize.md create mode 100644 .trae/skills/impeccable/reference/overdrive.md rename .trae/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 .trae/skills/impeccable/reference/polish.md create mode 100644 .trae/skills/impeccable/reference/quieter.md create mode 100644 .trae/skills/impeccable/reference/shape.md create mode 100644 .trae/skills/impeccable/reference/teach.md create mode 100644 .trae/skills/impeccable/reference/typeset.md create mode 100644 .trae/skills/impeccable/scripts/command-metadata.json create mode 100644 .trae/skills/impeccable/scripts/pin.mjs delete mode 100644 .trae/skills/layout/SKILL.md delete mode 100644 .trae/skills/optimize/SKILL.md delete mode 100644 .trae/skills/overdrive/SKILL.md delete mode 100644 .trae/skills/polish/SKILL.md delete mode 100644 .trae/skills/quieter/SKILL.md delete mode 100644 .trae/skills/shape/SKILL.md delete mode 100644 .trae/skills/typeset/SKILL.md create mode 100644 content/site/skills/craft.md create mode 100644 content/site/skills/teach.md delete mode 100644 public/cheatsheet.html delete mode 100644 scripts/lib/transformers/shared.js delete mode 100644 source/skills/adapt/SKILL.md delete mode 100644 source/skills/clarify/SKILL.md delete mode 100644 source/skills/harden/SKILL.md create mode 100644 source/skills/impeccable/reference/adapt.md rename source/skills/{animate/SKILL.md => impeccable/reference/animate.md} (91%) rename source/skills/{audit/SKILL.md => impeccable/reference/audit.md} (85%) rename source/skills/{bolder/SKILL.md => impeccable/reference/bolder.md} (87%) create mode 100644 source/skills/impeccable/reference/clarify.md rename source/skills/{critique => impeccable}/reference/cognitive-load.md (100%) rename source/skills/{colorize/SKILL.md => impeccable/reference/colorize.md} (90%) rename source/skills/{critique/SKILL.md => impeccable/reference/critique.md} (86%) rename source/skills/{delight/SKILL.md => impeccable/reference/delight.md} (92%) rename source/skills/{distill/SKILL.md => impeccable/reference/distill.md} (90%) create mode 100644 source/skills/impeccable/reference/harden.md rename source/skills/{critique => impeccable}/reference/heuristics-scoring.md (100%) create mode 100644 source/skills/impeccable/reference/layout.md create mode 100644 source/skills/impeccable/reference/optimize.md rename source/skills/{overdrive/SKILL.md => impeccable/reference/overdrive.md} (77%) rename source/skills/{critique => impeccable}/reference/personas.md (100%) create mode 100644 source/skills/impeccable/reference/polish.md rename source/skills/{quieter/SKILL.md => impeccable/reference/quieter.md} (88%) rename source/skills/{shape/SKILL.md => impeccable/reference/shape.md} (77%) create mode 100644 source/skills/impeccable/reference/teach.md create mode 100644 source/skills/impeccable/reference/typeset.md create mode 100644 source/skills/impeccable/scripts/command-metadata.json create mode 100644 source/skills/impeccable/scripts/pin.mjs delete mode 100644 source/skills/layout/SKILL.md delete mode 100644 source/skills/optimize/SKILL.md delete mode 100644 source/skills/polish/SKILL.md delete mode 100644 source/skills/typeset/SKILL.md diff --git a/.agents/skills/adapt/SKILL.md b/.agents/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.agents/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.agents/skills/animate/SKILL.md b/.agents/skills/animate/SKILL.md deleted file mode 100644 index 89933bfb5..000000000 --- a/.agents/skills/animate/SKILL.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. - ---- - -## Assess Animation Opportunities - -Analyze where motion would improve the experience: - -1. **Identify static areas**: - - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) - - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) - - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious - - **Lack of delight**: Functional but joyless interactions - - **Missed guidance**: Opportunities to direct attention or explain behavior - -2. **Understand the context**: - - What's the personality? (Playful vs serious, energetic vs calm) - - What's the performance budget? (Mobile-first? Complex page?) - - Who's the audience? (Motion-sensitive users? Power users who want speed?) - - What matters most? (One hero animation vs many micro-interactions?) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. - -## Plan Animation Strategy - -Create a purposeful animation plan: - -- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) -- **Feedback layer**: Which interactions need acknowledgment? -- **Transition layer**: Which state changes need smoothing? -- **Delight layer**: Where can we surprise and delight? - -**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. - -## Implement Animations - -Add motion systematically across these categories: - -### Entrance Animations -- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations -- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) -- **Content reveals**: Scroll-triggered animations using intersection observer -- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management - -### Micro-interactions -- **Button feedback**: - - Hover: Subtle scale (1.02-1.05), color shift, shadow increase - - Click: Quick scale down then up (0.95 → 1), ripple effect - - Loading: Spinner or pulse state -- **Form interactions**: - - Input focus: Border color transition, slight scale or glow - - Validation: Shake on error, check mark on success, smooth color transitions -- **Toggle switches**: Smooth slide + color transition (200-300ms) -- **Checkboxes/radio**: Check mark animation, ripple effect -- **Like/favorite**: Scale + rotation, particle effects, color transition - -### State Transitions -- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) -- **Expand/collapse**: Height transition with overflow handling, icon rotation -- **Loading states**: Skeleton screen fades, spinner animations, progress bars -- **Success/error**: Color transitions, icon animations, gentle scale pulse -- **Enable/disable**: Opacity transitions, cursor changes - -### Navigation & Flow -- **Page transitions**: Crossfade between routes, shared element transitions -- **Tab switching**: Slide indicator, content fade/slide -- **Carousel/slider**: Smooth transforms, snap points, momentum -- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators - -### Feedback & Guidance -- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights -- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning -- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation -- **Focus flow**: Highlight path through form or workflow - -### Delight Moments -- **Empty states**: Subtle floating animations on illustrations -- **Completed actions**: Confetti, check mark flourish, success celebrations -- **Easter eggs**: Hidden interactions for discovery -- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches - -## Technical Implementation - -Use appropriate techniques for each animation: - -### Timing & Easing - -**Durations by purpose:** -- **100-150ms**: Instant feedback (button press, toggle) -- **200-300ms**: State changes (hover, menu open) -- **300-500ms**: Layout changes (accordion, modal) -- **500-800ms**: Entrance animations (page load) - -**Easing curves (use these, not CSS defaults):** -```css -/* Recommended - natural deceleration */ ---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ ---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ ---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ - -/* AVOID - feel dated and tacky */ -/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ -/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ -``` - -**Exit animations are faster than entrances.** Use ~75% of enter duration. - -### CSS Animations -```css -/* Prefer for simple, declarative animations */ -- transitions for state changes -- @keyframes for complex sequences -- transform + opacity only (GPU-accelerated) -``` - -### JavaScript Animation -```javascript -/* Use for complex, interactive animations */ -- Web Animations API for programmatic control -- Framer Motion for React -- GSAP for complex sequences -``` - -### Performance -- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties -- **will-change**: Add sparingly for known expensive animations -- **Reduce paint**: Minimize repaints, use `contain` where appropriate -- **Monitor FPS**: Ensure 60fps on target devices - -### Accessibility -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**NEVER**: -- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself -- Animate layout properties (width, height, top, left)—use transform instead -- Use durations over 500ms for feedback—it feels laggy -- Animate without purpose—every animation needs a reason -- Ignore `prefers-reduced-motion`—this is an accessibility violation -- Animate everything—animation fatigue makes interfaces feel exhausting -- Block interaction during animations unless intentional - -## Verify Quality - -Test animations thoroughly: - -- **Smooth at 60fps**: No jank on target devices -- **Feels natural**: Easing curves feel organic, not robotic -- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) -- **Reduced motion works**: Animations disabled or simplified appropriately -- **Doesn't block**: Users can interact during/after animations -- **Adds value**: Makes interface clearer or more delightful - -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file diff --git a/.agents/skills/audit/SKILL.md b/.agents/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.agents/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.agents/skills/bolder/SKILL.md b/.agents/skills/bolder/SKILL.md deleted file mode 100644 index e80f55ed1..000000000 --- a/.agents/skills/bolder/SKILL.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too safe or boring: - -1. **Identify weakness sources**: - - **Generic choices**: System fonts, basic colors, standard layouts - - **Timid scale**: Everything is medium-sized with no drama - - **Low contrast**: Everything has similar visual weight - - **Static**: No motion, no energy, no life - - **Predictable**: Standard patterns with no surprises - - **Flat hierarchy**: Nothing stands out or commands attention - -2. **Understand the context**: - - What's the brand personality? (How far can we push?) - - What's the purpose? (Marketing can be bolder than financial dashboards) - - Who's the audience? (What will resonate?) - - What are the constraints? (Brand guidelines, accessibility, performance) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. - -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." - -## Plan Amplification - -Create a strategy to increase impact while maintaining coherence: - -- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) -- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. -- **Risk budget**: How experimental can we be? Push boundaries within constraints. -- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) - -**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. - -## Amplify the Design - -Systematically increase impact across these dimensions: - -### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) -- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) -- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 -- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) - -### Color Intensification -- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) -- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop -- **Dominant color strategy**: Let one bold color own 60% of the design -- **Sharp accents**: High-contrast accent colors that pop -- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette -- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) - -### Spatial Drama -- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings -- **Break the grid**: Let hero elements escape containers and cross boundaries -- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry -- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) -- **Overlap**: Layer elements intentionally for depth - -### Visual Effects -- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) -- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) -- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) -- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) -- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand - -### Motion & Animation -- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays -- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences -- **Micro-interactions**: Satisfying hover effects, click feedback, state changes -- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) - -### Composition Boldness -- **Hero moments**: Create clear focal points with dramatic treatment -- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements -- **Full-bleed elements**: Use full viewport width/height for impact -- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits - -**NEVER**: -- Add effects randomly without purpose (chaos ≠ bold) -- Sacrifice readability for aesthetics (body text must be readable) -- Make everything bold (then nothing is bold - need contrast) -- Ignore accessibility (bold design must still meet WCAG standards) -- Overwhelm with motion (animation fatigue is real) -- Copy trendy aesthetics blindly (bold means distinctive, not derivative) - -## Verify Quality - -Ensure amplification maintains usability and coherence: - -- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. -- **Still functional**: Can users accomplish tasks without distraction? -- **Coherent**: Does everything feel intentional and unified? -- **Memorable**: Will users remember this experience? -- **Performant**: Do all these effects run smoothly? -- **Accessible**: Does it still meet accessibility standards? - -**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." - -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file diff --git a/.agents/skills/clarify/SKILL.md b/.agents/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.agents/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.agents/skills/colorize/SKILL.md b/.agents/skills/colorize/SKILL.md deleted file mode 100644 index 76075804f..000000000 --- a/.agents/skills/colorize/SKILL.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. - ---- - -## Assess Color Opportunity - -Analyze the current state and identify opportunities: - -1. **Understand current state**: - - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? - - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? - - **Context**: What's appropriate for this domain and audience? - - **Brand**: Are there existing brand colors we should use? - -2. **Identify where color adds value**: - - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) - - **Hierarchy**: Drawing attention to important elements - - **Categorization**: Different sections, types, or states - - **Emotional tone**: Warmth, energy, trust, creativity - - **Wayfinding**: Helping users navigate and understand structure - - **Delight**: Moments of visual interest and personality - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. - -## Plan Color Strategy - -Create a purposeful color introduction plan: - -- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) -- **Dominant color**: Which color owns 60% of colored elements? -- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) -- **Application strategy**: Where does each color appear and why? - -**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. - -## Introduce Color Strategically - -Add color systematically across these dimensions: - -### Semantic Color -- **State indicators**: - - Success: Green tones (emerald, forest, mint) - - Error: Red/pink tones (rose, crimson, coral) - - Warning: Orange/amber tones - - Info: Blue tones (sky, ocean, indigo) - - Neutral: Gray/slate for inactive states - -- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) -- **Progress indicators**: Colored bars, rings, or charts showing completion or health - -### Accent Color Application -- **Primary actions**: Color the most important buttons/CTAs -- **Links**: Add color to clickable text (maintain accessibility) -- **Icons**: Colorize key icons for recognition and personality -- **Headers/titles**: Add color to section headers or key labels -- **Hover states**: Introduce color on interaction - -### Background & Surfaces -- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) -- **Colored sections**: Use subtle background colors to separate areas -- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) -- **Cards & surfaces**: Tint cards or surfaces slightly for warmth - -**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. - -### Data Visualization -- **Charts & graphs**: Use color to encode categories or values -- **Heatmaps**: Color intensity shows density or importance -- **Comparison**: Color coding for different datasets or timeframes - -### Borders & Accents -- **Accent borders**: Add colored left/top borders to cards or sections -- **Underlines**: Color underlines for emphasis or active states -- **Dividers**: Subtle colored dividers instead of gray lines -- **Focus rings**: Colored focus indicators matching brand - -### Typography Color -- **Colored headings**: Use brand colors for section headings (maintain contrast) -- **Highlight text**: Color for emphasis or categories -- **Labels & tags**: Small colored labels for metadata or categories - -### Decorative Elements -- **Illustrations**: Add colored illustrations or icons -- **Shapes**: Geometric shapes in brand colors as background elements -- **Gradients**: Colorful gradient overlays or mesh backgrounds -- **Blobs/organic shapes**: Soft colored shapes for visual interest - -## Balance & Refinement - -Ensure color addition improves rather than overwhelms: - -### Maintain Hierarchy -- **Dominant color** (60%): Primary brand color or most used accent -- **Secondary color** (30%): Supporting color for variety -- **Accent color** (10%): High contrast for key moments -- **Neutrals** (remaining): Gray/black/white for structure - -### Accessibility -- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) -- **Don't rely on color alone**: Use icons, labels, or patterns alongside color -- **Test for color blindness**: Verify red/green combinations work for all users - -### Cohesion -- **Consistent palette**: Use colors from defined palette, not arbitrary choices -- **Systematic application**: Same color meanings throughout (green always = success) -- **Temperature consistency**: Warm palette stays warm, cool stays cool - -**NEVER**: -- Use every color in the rainbow (choose 2-4 colors beyond neutrals) -- Apply color randomly without semantic meaning -- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead -- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication -- Use pure black (`#000`) or pure white (`#fff`) for large areas -- Violate WCAG contrast requirements -- Use color as the only indicator (accessibility issue) -- Make everything colorful (defeats the purpose) -- Default to purple-blue gradients (AI slop aesthetic) - -## Verify Color Addition - -Test that colorization improves the experience: - -- **Better hierarchy**: Does color guide attention appropriately? -- **Clearer meaning**: Does color help users understand states/categories? -- **More engaging**: Does the interface feel warmer and more inviting? -- **Still accessible**: Do all color combinations meet WCAG standards? -- **Not overwhelming**: Is color balanced and purposeful? - -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file diff --git a/.agents/skills/delight/SKILL.md b/.agents/skills/delight/SKILL.md deleted file mode 100644 index fedebff9c..000000000 --- a/.agents/skills/delight/SKILL.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). - ---- - -## Assess Delight Opportunities - -Identify where delight would enhance (not distract from) the experience: - -1. **Find natural delight moments**: - - **Success states**: Completed actions (save, send, publish) - - **Empty states**: First-time experiences, onboarding - - **Loading states**: Waiting periods that could be entertaining - - **Achievements**: Milestones, streaks, completions - - **Interactions**: Hover states, clicks, drags - - **Errors**: Softening frustrating moments - - **Easter eggs**: Hidden discoveries for curious users - -2. **Understand the context**: - - What's the brand personality? (Playful? Professional? Quirky? Elegant?) - - Who's the audience? (Tech-savvy? Creative? Corporate?) - - What's the emotional context? (Accomplishment? Exploration? Frustration?) - - What's appropriate? (Banking app ≠ gaming app) - -3. **Define delight strategy**: - - **Subtle sophistication**: Refined micro-interactions (luxury brands) - - **Playful personality**: Whimsical illustrations and copy (consumer apps) - - **Helpful surprises**: Anticipating needs before users ask (productivity tools) - - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. - -## Delight Principles - -Follow these guidelines: - -### Delight Amplifies, Never Blocks -- Delight moments should be quick (< 1 second) -- Never delay core functionality for delight -- Make delight skippable or subtle -- Respect user's time and task focus - -### Surprise and Discovery -- Hide delightful details for users to discover -- Reward exploration and curiosity -- Don't announce every delight moment -- Let users share discoveries with others - -### Appropriate to Context -- Match delight to emotional moment (celebrate success, empathize with errors) -- Respect the user's state (don't be playful during critical errors) -- Match brand personality and audience expectations -- Cultural sensitivity (what's delightful varies by culture) - -### Compound Over Time -- Delight should remain fresh with repeated use -- Vary responses (not same animation every time) -- Reveal deeper layers with continued use -- Build anticipation through patterns - -## Delight Techniques - -Add personality and joy through these methods: - -### Micro-interactions & Animation - -**Button delight**: -```css -/* Satisfying button press */ -.button { - transition: transform 0.1s, box-shadow 0.1s; -} -.button:active { - transform: translateY(2px); - box-shadow: 0 2px 4px rgba(0,0,0,0.2); -} - -/* Ripple effect on click */ -/* Smooth lift on hover */ -.button:hover { - transform: translateY(-2px); - transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ -} -``` - -**Loading delight**: -- Playful loading animations (not just spinners) -- Personality in loading messages (write product-specific ones, not generic AI filler) -- Progress indication with encouraging messages -- Skeleton screens with subtle animations - -**Success animations**: -- Checkmark draw animation -- Confetti burst for major achievements -- Gentle scale + fade for confirmation -- Satisfying sound effects (subtle) - -**Hover surprises**: -- Icons that animate on hover -- Color shifts or glow effects -- Tooltip reveals with personality -- Cursor changes (custom cursors for branded experiences) - -### Personality in Copy - -**Playful error messages**: -``` -"Error 404" -"This page is playing hide and seek. (And winning)" - -"Connection failed" -"Looks like the internet took a coffee break. Want to retry?" -``` - -**Encouraging empty states**: -``` -"No projects" -"Your canvas awaits. Create something amazing." - -"No messages" -"Inbox zero! You're crushing it today." -``` - -**Playful labels & tooltips**: -``` -"Delete" -"Send to void" (for playful brand) - -"Help" -"Rescue me" (tooltip) -``` - -**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. - -### Illustrations & Visual Personality - -**Custom illustrations**: -- Empty state illustrations (not stock icons) -- Error state illustrations (friendly monsters, quirky characters) -- Loading state illustrations (animated characters) -- Success state illustrations (celebrations) - -**Icon personality**: -- Custom icon set matching brand personality -- Animated icons (subtle motion on hover/click) -- Illustrative icons (more detailed than generic) -- Consistent style across all icons - -**Background effects**: -- Subtle particle effects -- Gradient mesh backgrounds -- Geometric patterns -- Parallax depth -- Time-of-day themes (morning vs night) - -### Satisfying Interactions - -**Drag and drop delight**: -- Lift effect on drag (shadow, scale) -- Snap animation when dropped -- Satisfying placement sound -- Undo toast ("Dropped in wrong place? [Undo]") - -**Toggle switches**: -- Smooth slide with spring physics -- Color transition -- Haptic feedback on mobile -- Optional sound effect - -**Progress & achievements**: -- Streak counters with celebratory milestones -- Progress bars that "celebrate" at 100% -- Badge unlocks with animation -- Playful stats ("You're on fire! 5 days in a row") - -**Form interactions**: -- Input fields that animate on focus -- Checkboxes with a satisfying scale pulse when checked -- Success state that celebrates valid input -- Auto-grow textareas - -### Sound Design - -**Subtle audio cues** (when appropriate): -- Notification sounds (distinctive but not annoying) -- Success sounds (satisfying "ding") -- Error sounds (empathetic, not harsh) -- Typing sounds for chat/messaging -- Ambient background audio (very subtle) - -**IMPORTANT**: -- Respect system sound settings -- Provide mute option -- Keep volumes quiet (subtle cues, not alarms) -- Don't play on every interaction (sound fatigue is real) - -### Easter Eggs & Hidden Delights - -**Discovery rewards**: -- Konami code unlocks special theme -- Hidden keyboard shortcuts (Cmd+K for special features) -- Hover reveals on logos or illustrations -- Alt text jokes on images (for screen reader users too!) -- Console messages for developers ("Like what you see? We're hiring!") - -**Seasonal touches**: -- Holiday themes (subtle, tasteful) -- Seasonal color shifts -- Weather-based variations -- Time-based changes (dark at night, light during day) - -**Contextual personality**: -- Different messages based on time of day -- Responses to specific user actions -- Randomized variations (not same every time) -- Progressive reveals with continued use - -### Loading & Waiting States - -**Make waiting engaging**: -- Interesting loading messages that rotate -- Progress bars with personality -- Mini-games during long loads -- Fun facts or tips while waiting -- Countdown with encouraging messages - -``` -Loading messages — write ones specific to your product, not generic AI filler: -- "Crunching your latest numbers..." -- "Syncing with your team's changes..." -- "Preparing your dashboard..." -- "Checking for updates since yesterday..." -``` - -**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. - -### Celebration Moments - -**Success celebrations**: -- Confetti for major milestones -- Animated checkmarks for completions -- Progress bar celebrations at 100% -- "Achievement unlocked" style notifications -- Personalized messages ("You published your 10th article!") - -**Milestone recognition**: -- First-time actions get special treatment -- Streak tracking and celebration -- Progress toward goals -- Anniversary celebrations - -## Implementation Patterns - -**Animation libraries**: -- Framer Motion (React) -- GSAP (universal) -- Lottie (After Effects animations) -- Canvas confetti (party effects) - -**Sound libraries**: -- Howler.js (audio management) -- Use-sound (React hook) - -**Physics libraries**: -- React Spring (spring physics) -- Popmotion (animation primitives) - -**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. - -**NEVER**: -- Delay core functionality for delight -- Force users through delightful moments (make skippable) -- Use delight to hide poor UX -- Overdo it (less is more) -- Ignore accessibility (animate responsibly, provide alternatives) -- Make every interaction delightful (special moments should be special) -- Sacrifice performance for delight -- Be inappropriate for context (read the room) - -## Verify Delight Quality - -Test that delight actually delights: - -- **User reactions**: Do users smile? Share screenshots? -- **Doesn't annoy**: Still pleasant after 100th time? -- **Doesn't block**: Can users opt out or skip? -- **Performant**: No jank, no slowdown -- **Appropriate**: Matches brand and context -- **Accessible**: Works with reduced motion, screen readers - -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file diff --git a/.agents/skills/distill/SKILL.md b/.agents/skills/distill/SKILL.md deleted file mode 100644 index f3f721c99..000000000 --- a/.agents/skills/distill/SKILL.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel complex or cluttered: - -1. **Identify complexity sources**: - - **Too many elements**: Competing buttons, redundant information, visual clutter - - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose - - **Information overload**: Everything visible at once, no progressive disclosure - - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations - - **Confusing hierarchy**: Unclear what matters most - - **Feature creep**: Too many options, actions, or paths forward - -2. **Find the essence**: - - What's the primary user goal? (There should be ONE) - - What's actually necessary vs nice-to-have? - - What can be removed, hidden, or combined? - - What's the 20% that delivers 80% of value? - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. - -## Plan Simplification - -Create a ruthless editing strategy: - -- **Core purpose**: What's the ONE thing this should accomplish? -- **Essential elements**: What's truly necessary to achieve that purpose? -- **Progressive disclosure**: What can be hidden until needed? -- **Consolidation opportunities**: What can be combined or integrated? - -**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. - -## Simplify the Design - -Systematically remove complexity across these dimensions: - -### Information Architecture -- **Reduce scope**: Remove secondary actions, optional features, redundant information -- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) -- **Combine related actions**: Merge similar buttons, consolidate forms, group related content -- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden -- **Remove redundancy**: If it's said elsewhere, don't repeat it here - -### Visual Simplification -- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors -- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights -- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function -- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards -- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead -- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps - -### Layout Simplification -- **Linear flow**: Replace complex grids with simple vertical flow where possible -- **Remove sidebars**: Move secondary content inline or hide it -- **Full-width**: Use available space generously instead of complex multi-column layouts -- **Consistent alignment**: Pick left or center, stick with it -- **Generous white space**: Let content breathe, don't pack everything tight - -### Interaction Simplification -- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) -- **Smart defaults**: Make common choices automatic, only ask when necessary -- **Inline actions**: Replace modal flows with inline editing where possible -- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? -- **Clear CTAs**: ONE obvious next step, not five competing actions - -### Content Simplification -- **Shorter copy**: Cut every sentence in half, then do it again -- **Active voice**: "Save changes" not "Changes will be saved" -- **Remove jargon**: Plain language always wins -- **Scannable structure**: Short paragraphs, bullet points, clear headings -- **Essential information only**: Remove marketing fluff, legalese, hedging -- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once - -### Code Simplification -- **Remove unused code**: Dead CSS, unused components, orphaned files -- **Flatten component trees**: Reduce nesting depth -- **Consolidate styles**: Merge similar styles, use utilities consistently -- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? - -**NEVER**: -- Remove necessary functionality (simplicity ≠ feature-less) -- Sacrifice accessibility for simplicity (clear labels and ARIA still required) -- Make things so simple they're unclear (mystery ≠ minimalism) -- Remove information users need to make decisions -- Eliminate hierarchy completely (some things should stand out) -- Oversimplify complex domains (match complexity to actual task complexity) - -## Verify Simplification - -Ensure simplification improves usability: - -- **Faster task completion**: Can users accomplish goals more quickly? -- **Reduced cognitive load**: Is it easier to understand what to do? -- **Still complete**: Are all necessary features still accessible? -- **Clearer hierarchy**: Is it obvious what matters most? -- **Better performance**: Does simpler design load faster? - -## Document Removed Complexity - -If you removed features or options: -- Document why they were removed -- Consider if they need alternative access points -- Note any user feedback to monitor - -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file diff --git a/.agents/skills/harden/SKILL.md b/.agents/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.agents/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index bc4574d35..14acacac2 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -1,16 +1,18 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +25,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +34,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +270,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +284,96 @@ Remember: the model is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .agents/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .github/copilot-instructions.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.gemini/skills/adapt/SKILL.md b/.agents/skills/impeccable/reference/adapt.md similarity index 90% rename from .gemini/skills/adapt/SKILL.md rename to .agents/skills/impeccable/reference/adapt.md index 35b00e3f9..249653d4c 100644 --- a/.gemini/skills/adapt/SKILL.md +++ b/.agents/skills/impeccable/reference/adapt.md @@ -1,14 +1,7 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 ---- +> **Additional context needed**: target platforms/devices and usage contexts. Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. --- @@ -194,4 +187,4 @@ Test thoroughly across contexts: - **Edge cases**: Very small screens (320px), very large screens (4K) - **Slow connections**: Test on throttled network -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.gemini/skills/animate/SKILL.md b/.agents/skills/impeccable/reference/animate.md similarity index 91% rename from .gemini/skills/animate/SKILL.md rename to .agents/skills/impeccable/reference/animate.md index 02294bc19..0186ce081 100644 --- a/.gemini/skills/animate/SKILL.md +++ b/.agents/skills/impeccable/reference/animate.md @@ -1,14 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -170,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.kiro/skills/audit/SKILL.md b/.agents/skills/impeccable/reference/audit.md similarity index 80% rename from .kiro/skills/audit/SKILL.md rename to .agents/skills/impeccable/reference/audit.md index 7fddc7b21..206fafb5c 100644 --- a/.kiro/skills/audit/SKILL.md +++ b/.agents/skills/impeccable/reference/audit.md @@ -1,15 +1,3 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -64,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -107,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -126,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/audit` after fixes to see your score improve. +> Re-run `/impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. @@ -143,4 +131,4 @@ After presenting the summary, tell the user: - Forget to prioritize (everything can't be P0) - Report false positives without verification -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.pi/skills/bolder/SKILL.md b/.agents/skills/impeccable/reference/bolder.md similarity index 88% rename from .pi/skills/bolder/SKILL.md rename to .agents/skills/impeccable/reference/bolder.md index e276b4d0b..cb3481663 100644 --- a/.pi/skills/bolder/SKILL.md +++ b/.agents/skills/impeccable/reference/bolder.md @@ -1,14 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -34,7 +25,7 @@ If any of these are unclear from the codebase, ask the user directly to clarify **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -52,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -112,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.pi/skills/clarify/SKILL.md b/.agents/skills/impeccable/reference/clarify.md similarity index 89% rename from .pi/skills/clarify/SKILL.md rename to .agents/skills/impeccable/reference/clarify.md index 468541090..dc116e745 100644 --- a/.pi/skills/clarify/SKILL.md +++ b/.agents/skills/impeccable/reference/clarify.md @@ -1,14 +1,7 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 ---- +> **Additional context needed**: audience technical level and users' mental state in context. Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. --- @@ -178,4 +171,4 @@ Test that copy improvements work: - **Consistency**: Does it match terminology elsewhere? - **Tone**: Is it appropriate for the situation? -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.agents/skills/critique/reference/cognitive-load.md b/.agents/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .agents/skills/critique/reference/cognitive-load.md rename to .agents/skills/impeccable/reference/cognitive-load.md diff --git a/.kiro/skills/colorize/SKILL.md b/.agents/skills/impeccable/reference/colorize.md similarity index 90% rename from .kiro/skills/colorize/SKILL.md rename to .agents/skills/impeccable/reference/colorize.md index 509a71c06..a4ce5072e 100644 --- a/.kiro/skills/colorize/SKILL.md +++ b/.agents/skills/impeccable/reference/colorize.md @@ -1,14 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -138,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.agents/skills/impeccable/reference/craft.md b/.agents/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.agents/skills/impeccable/reference/craft.md +++ b/.agents/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.agents/skills/critique/SKILL.md b/.agents/skills/impeccable/reference/critique.md similarity index 84% rename from .agents/skills/critique/SKILL.md rename to .agents/skills/impeccable/reference/critique.md index a827f2241..c6a867d50 100644 --- a/.agents/skills/critique/SKILL.md +++ b/.agents/skills/impeccable/reference/critique.md @@ -1,18 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -30,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -44,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -94,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -140,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `.github/copilot-instructions.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -176,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -196,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -209,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.kiro/skills/delight/SKILL.md b/.agents/skills/impeccable/reference/delight.md similarity index 92% rename from .kiro/skills/delight/SKILL.md rename to .agents/skills/impeccable/reference/delight.md index f323738dd..8a781e70e 100644 --- a/.kiro/skills/delight/SKILL.md +++ b/.agents/skills/impeccable/reference/delight.md @@ -1,14 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -299,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.gemini/skills/distill/SKILL.md b/.agents/skills/impeccable/reference/distill.md similarity index 91% rename from .gemini/skills/distill/SKILL.md rename to .agents/skills/impeccable/reference/distill.md index e462d1c27..4f47dc0b4 100644 --- a/.gemini/skills/distill/SKILL.md +++ b/.agents/skills/impeccable/reference/distill.md @@ -1,14 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -117,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.pi/skills/harden/SKILL.md b/.agents/skills/impeccable/reference/harden.md similarity index 96% rename from .pi/skills/harden/SKILL.md rename to .agents/skills/impeccable/reference/harden.md index 78eaa9881..af8b8a703 100644 --- a/.pi/skills/harden/SKILL.md +++ b/.agents/skills/impeccable/reference/harden.md @@ -1,9 +1,3 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 ---- - Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. ## Assess Hardening Needs @@ -384,4 +378,4 @@ Test thoroughly with edge cases: - **Errors**: Force API errors, test all error states - **Empty**: Remove all data, test empty states -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.agents/skills/critique/reference/heuristics-scoring.md b/.agents/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .agents/skills/critique/reference/heuristics-scoring.md rename to .agents/skills/impeccable/reference/heuristics-scoring.md diff --git a/.gemini/skills/layout/SKILL.md b/.agents/skills/impeccable/reference/layout.md similarity index 89% rename from .gemini/skills/layout/SKILL.md rename to .agents/skills/impeccable/reference/layout.md index e3355c314..cd6b778e7 100644 --- a/.gemini/skills/layout/SKILL.md +++ b/.agents/skills/impeccable/reference/layout.md @@ -1,14 +1,5 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 ---- - Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak about the current spatial design: ## Plan Layout Improvements -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. Create a systematic plan: @@ -120,4 +111,4 @@ Create a systematic plan: - **Consistency**: Is the spacing system applied uniformly? - **Responsiveness**: Does the layout adapt gracefully across screen sizes? -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.cursor/skills/optimize/SKILL.md b/.agents/skills/impeccable/reference/optimize.md similarity index 96% rename from .cursor/skills/optimize/SKILL.md rename to .agents/skills/impeccable/reference/optimize.md index 6d82e1265..4abf575ec 100644 --- a/.cursor/skills/optimize/SKILL.md +++ b/.agents/skills/impeccable/reference/optimize.md @@ -1,9 +1,3 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 ---- - Identify and fix performance issues to create faster, smoother user experiences. ## Assess Performance Issues @@ -261,4 +255,4 @@ Test that optimizations worked: - **No regressions**: Ensure functionality still works - **User perception**: Does it *feel* faster? -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.pi/skills/overdrive/SKILL.md b/.agents/skills/impeccable/reference/overdrive.md similarity index 78% rename from .pi/skills/overdrive/SKILL.md rename to .agents/skills/impeccable/reference/overdrive.md index 11bd0f4a8..d84a147dc 100644 --- a/.pi/skills/overdrive/SKILL.md +++ b/.agents/skills/impeccable/reference/overdrive.md @@ -1,9 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 ---- - Start your response with: ``` @@ -11,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -31,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -89,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -126,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -137,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.agents/skills/critique/reference/personas.md b/.agents/skills/impeccable/reference/personas.md similarity index 100% rename from .agents/skills/critique/reference/personas.md rename to .agents/skills/impeccable/reference/personas.md diff --git a/.pi/skills/polish/SKILL.md b/.agents/skills/impeccable/reference/polish.md similarity index 93% rename from .pi/skills/polish/SKILL.md rename to .agents/skills/impeccable/reference/polish.md index 4c84dc128..597c68847 100644 --- a/.pi/skills/polish/SKILL.md +++ b/.agents/skills/impeccable/reference/polish.md @@ -1,14 +1,4 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- +> **Additional context needed**: quality bar (MVP vs flagship). Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. @@ -219,4 +209,4 @@ After polishing, ensure code quality: - **Consolidate tokens**: If you introduced new values, check whether they should be tokens. - **Verify DRYness**: Look for duplication introduced during polishing and consolidate. -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.kiro/skills/quieter/SKILL.md b/.agents/skills/impeccable/reference/quieter.md similarity index 89% rename from .kiro/skills/quieter/SKILL.md rename to .agents/skills/impeccable/reference/quieter.md index ca17da694..a8ad41809 100644 --- a/.kiro/skills/quieter/SKILL.md +++ b/.agents/skills/impeccable/reference/quieter.md @@ -1,14 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -98,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.kiro/skills/shape/SKILL.md b/.agents/skills/impeccable/reference/shape.md similarity index 80% rename from .kiro/skills/shape/SKILL.md rename to .agents/skills/impeccable/reference/shape.md index 6a94ee74c..0ae281943 100644 --- a/.kiro/skills/shape/SKILL.md +++ b/.agents/skills/impeccable/reference/shape.md @@ -1,24 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -56,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -91,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.agents/skills/impeccable/reference/teach.md b/.agents/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..5ebd3ed67 --- /dev/null +++ b/.agents/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .github/copilot-instructions.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.cursor/skills/typeset/SKILL.md b/.agents/skills/impeccable/reference/typeset.md similarity index 87% rename from .cursor/skills/typeset/SKILL.md rename to .agents/skills/impeccable/reference/typeset.md index a5fff11a8..2e49ab6c0 100644 --- a/.cursor/skills/typeset/SKILL.md +++ b/.agents/skills/impeccable/reference/typeset.md @@ -1,14 +1,5 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 ---- - Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak or generic about the current type: ## Plan Typography Improvements -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. Create a systematic plan: @@ -111,4 +102,4 @@ Build a clear type scale: - **Performance**: Are web fonts loading efficiently without layout shift? - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs b/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.agents/skills/impeccable/scripts/command-metadata.json b/.agents/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.agents/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.agents/skills/impeccable/scripts/pin.mjs b/.agents/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.agents/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.agents/skills/layout/SKILL.md b/.agents/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.agents/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.agents/skills/optimize/SKILL.md b/.agents/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.agents/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.agents/skills/overdrive/SKILL.md b/.agents/skills/overdrive/SKILL.md deleted file mode 100644 index 862a4c9c4..000000000 --- a/.agents/skills/overdrive/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Start your response with: - -``` -──────────── ⚡ OVERDRIVE ───────────── -》》》 Entering overdrive mode... -``` - -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. - -### Propose Before Building - -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: - -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. -2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). -3. Only proceed with the direction the user confirms. - -Skipping this step risks building something embarrassing that needs to be thrown away. - -### Iterate with Browser Automation - -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. - ---- - -## Assess What "Extraordinary" Means Here - -The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** - -### For visual/marketing surfaces -Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. - -### For functional UI -Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. - -### For performance-critical UI -The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. - -### For data-heavy interfaces -Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. - -**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. - -## The Toolkit - -Organized by what you're trying to achieve, not by technology name. - -### Make transitions feel cinematic -- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. -- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes -- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. - -### Tie animation to scroll position -- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) - -### Render beyond CSS -- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. -- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. -- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. -- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. - -### Make data feel alive -- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. -- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. -- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. - -### Animate complex properties -- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. -- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. - -### Push performance boundaries -- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. -- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. -- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. - -### Interact with the device -- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. -- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. - -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. - -## Implement with Discipline - -### Progressive enhancement is non-negotiable - -Every technique must degrade gracefully. The experience without the enhancement must still be good. - -```css -@supports (animation-timeline: scroll()) { - .hero { animation-timeline: scroll(); } -} -``` - -```javascript -if ('gpu' in navigator) { /* WebGPU */ } -else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } -/* CSS-only fallback must still look good */ -``` - -### Performance rules - -- Target 60fps. If dropping below 50, simplify. -- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. -- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. -- Pause off-screen rendering. Kill what you can't see. -- Test on real mid-range devices, not just your development machine. - -### Polish is the difference - -The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. - -**NEVER**: -- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion -- Ship effects that cause jank on mid-range devices -- Use bleeding-edge APIs without a functional fallback -- Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills -- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise - -## Verify the Result - -- **The wow test**: Show it to someone who hasn't seen it. Do they react? -- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? -- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? -- **The accessibility test**: Enable reduced motion. Still beautiful? -- **The context test**: Does this make sense for THIS brand and audience? - -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file diff --git a/.agents/skills/polish/SKILL.md b/.agents/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.agents/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.agents/skills/quieter/SKILL.md b/.agents/skills/quieter/SKILL.md deleted file mode 100644 index 373ae6869..000000000 --- a/.agents/skills/quieter/SKILL.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too intense: - -1. **Identify intensity sources**: - - **Color saturation**: Overly bright or saturated colors - - **Contrast extremes**: Too much high-contrast juxtaposition - - **Visual weight**: Too many bold, heavy elements competing - - **Animation excess**: Too much motion or overly dramatic effects - - **Complexity**: Too many visual elements, patterns, or decorations - - **Scale**: Everything is large and loud with no hierarchy - -2. **Understand the context**: - - What's the purpose? (Marketing vs tool vs reading experience) - - Who's the audience? (Some contexts need energy) - - What's working? (Don't throw away good ideas) - - What's the core message? (Preserve what matters) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. - -## Plan Refinement - -Create a strategy to reduce intensity while maintaining impact: - -- **Color approach**: Desaturate or shift to more sophisticated tones? -- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? -- **Simplification approach**: What can be removed entirely? -- **Sophistication approach**: How can we signal quality through restraint? - -**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. - -## Refine the Design - -Systematically reduce intensity across these dimensions: - -### Color Refinement -- **Reduce saturation**: Shift from fully saturated to 70-85% saturation -- **Soften palette**: Replace bright colors with muted, sophisticated tones -- **Reduce color variety**: Use fewer colors more thoughtfully -- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) -- **Gentler contrasts**: High contrast only where it matters most -- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness -- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead - -### Visual Weight Reduction -- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate -- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness -- **White space**: Increase breathing room, reduce density -- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely - -### Simplification -- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose -- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes -- **Reduce layering**: Flatten visual hierarchy where possible -- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows - -### Motion Reduction -- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing -- **Remove decorative animations**: Keep functional motion, remove flourishes -- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback -- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic -- **Remove animations entirely** if they're not serving a clear purpose - -### Composition Refinement -- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling -- **Align to grid**: Bring rogue elements back into systematic alignment -- **Even out spacing**: Replace extreme spacing variations with consistent rhythm - -**NEVER**: -- Make everything the same size/weight (hierarchy still matters) -- Remove all color (quiet ≠ grayscale) -- Eliminate all personality (maintain character through refinement) -- Sacrifice usability for aesthetics (functional elements still need clear affordances) -- Make everything small and light (some anchors needed) - -## Verify Quality - -Ensure refinement maintains quality: - -- **Still functional**: Can users still accomplish tasks easily? -- **Still distinctive**: Does it have character, or is it generic now? -- **Better reading**: Is text easier to read for extended periods? -- **Sophistication**: Does it feel more refined and premium? - -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file diff --git a/.agents/skills/shape/SKILL.md b/.agents/skills/shape/SKILL.md deleted file mode 100644 index 7e83008b5..000000000 --- a/.agents/skills/shape/SKILL.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. - -## Philosophy - -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. - -## Phase 1: Discovery Interview - -**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. - -Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. - -### Purpose & Context -- What is this feature for? What problem does it solve? -- Who specifically will use it? (Not "users"; be specific: role, context, frequency) -- What does success look like? How will you know this feature is working? -- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) - -### Content & Data -- What content or data does this feature display or collect? -- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) -- What are the edge cases? (Empty state, error state, first-time use, power user) -- Is any content dynamic? What changes and how often? - -### Design Goals -- What's the single most important thing a user should do or understand here? -- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) -- Are there existing patterns in the product this should be consistent with? -- Are there specific examples (inside or outside the product) that capture what you're going for? - -### Constraints -- Are there technical constraints? (Framework, performance budget, browser support) -- Are there content constraints? (Localization, dynamic text length, user-generated content) -- Mobile/responsive requirements? -- Accessibility requirements beyond WCAG AA? - -### Anti-Goals -- What should this NOT be? What would be a wrong direction? -- What's the biggest risk of getting this wrong? - -## Phase 2: Design Brief - -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. - -### Brief Structure - -**1. Feature Summary** (2-3 sentences) -What this is, who it's for, what it needs to accomplish. - -**2. Primary User Action** -The single most important thing a user should do or understand here. - -**3. Design Direction** -How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. - -**4. Layout Strategy** -High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. - -**5. Key States** -List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. - -**6. Interaction Model** -How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? - -**7. Content Requirements** -What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. - -**8. Recommended References** -Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). - -**9. Open Questions** -Anything unresolved that the implementer should resolve during build. - ---- - -ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. - -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file diff --git a/.agents/skills/typeset/SKILL.md b/.agents/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.agents/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 404f96f73..7fcd222d2 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -2,7 +2,7 @@ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json", "name": "impeccable", "metadata": { - "description": "Design fluency for AI harnesses. 1 skill, 18 commands, and curated anti-patterns for impeccable frontend design." + "description": "Design fluency for AI harnesses. 1 skill, 20 commands, and curated anti-patterns for impeccable frontend design." }, "owner": { "name": "Paul Bakaus", @@ -11,7 +11,7 @@ "plugins": [ { "name": "impeccable", - "description": "Design vocabulary and skills for frontend development. Includes 18 commands (/polish, /distill, /audit, /typeset, /overdrive, etc.) and an enhanced impeccable skill with curated anti-patterns.", + "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", "version": "2.1.1", "author": { "name": "Paul Bakaus", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 32f8179c7..25dce892c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "impeccable", - "description": "Design vocabulary and skills for frontend development. Includes 18 commands (/polish, /distill, /audit, /typeset, /overdrive, etc.) and an enhanced impeccable skill with curated anti-patterns.", + "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", "version": "2.1.1", "author": { "name": "Paul Bakaus", diff --git a/.claude/skills/adapt/SKILL.md b/.claude/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.claude/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.claude/skills/audit/SKILL.md b/.claude/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.claude/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.claude/skills/clarify/SKILL.md b/.claude/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.claude/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.claude/skills/harden/SKILL.md b/.claude/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.claude/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.claude/skills/impeccable/SKILL.md b/.claude/skills/impeccable/SKILL.md index 18ecca274..5c0676008 100644 --- a/.claude/skills/impeccable/SKILL.md +++ b/.claude/skills/impeccable/SKILL.md @@ -1,16 +1,20 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. +allowed-tools: + - Bash(npx impeccable *) --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +27,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +36,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +272,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +286,96 @@ Remember: Claude is capable of extraordinary creative work. Don't hold back. Sho --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -STOP and call the AskUserQuestion tool to clarify. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .claude/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then STOP and call the AskUserQuestion tool to clarify. whether they'd also like the Design Context appended to CLAUDE.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.pi/skills/adapt/SKILL.md b/.claude/skills/impeccable/reference/adapt.md similarity index 90% rename from .pi/skills/adapt/SKILL.md rename to .claude/skills/impeccable/reference/adapt.md index 35b00e3f9..249653d4c 100644 --- a/.pi/skills/adapt/SKILL.md +++ b/.claude/skills/impeccable/reference/adapt.md @@ -1,14 +1,7 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 ---- +> **Additional context needed**: target platforms/devices and usage contexts. Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. --- @@ -194,4 +187,4 @@ Test thoroughly across contexts: - **Edge cases**: Very small screens (320px), very large screens (4K) - **Slow connections**: Test on throttled network -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.claude/skills/animate/SKILL.md b/.claude/skills/impeccable/reference/animate.md similarity index 90% rename from .claude/skills/animate/SKILL.md rename to .claude/skills/impeccable/reference/animate.md index a3b21a220..fdb5b579a 100644 --- a/.claude/skills/animate/SKILL.md +++ b/.claude/skills/impeccable/reference/animate.md @@ -1,16 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -172,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.cursor/skills/audit/SKILL.md b/.claude/skills/impeccable/reference/audit.md similarity index 80% rename from .cursor/skills/audit/SKILL.md rename to .claude/skills/impeccable/reference/audit.md index 7fddc7b21..206fafb5c 100644 --- a/.cursor/skills/audit/SKILL.md +++ b/.claude/skills/impeccable/reference/audit.md @@ -1,15 +1,3 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -64,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -107,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -126,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/audit` after fixes to see your score improve. +> Re-run `/impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. @@ -143,4 +131,4 @@ After presenting the summary, tell the user: - Forget to prioritize (everything can't be P0) - Report false positives without verification -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.claude/skills/bolder/SKILL.md b/.claude/skills/impeccable/reference/bolder.md similarity index 87% rename from .claude/skills/bolder/SKILL.md rename to .claude/skills/impeccable/reference/bolder.md index 2e15db324..32c12a6bf 100644 --- a/.claude/skills/bolder/SKILL.md +++ b/.claude/skills/impeccable/reference/bolder.md @@ -1,16 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -36,7 +25,7 @@ If any of these are unclear from the codebase, STOP and call the AskUserQuestion **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -54,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -114,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.gemini/skills/clarify/SKILL.md b/.claude/skills/impeccable/reference/clarify.md similarity index 89% rename from .gemini/skills/clarify/SKILL.md rename to .claude/skills/impeccable/reference/clarify.md index 468541090..dc116e745 100644 --- a/.gemini/skills/clarify/SKILL.md +++ b/.claude/skills/impeccable/reference/clarify.md @@ -1,14 +1,7 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 ---- +> **Additional context needed**: audience technical level and users' mental state in context. Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. --- @@ -178,4 +171,4 @@ Test that copy improvements work: - **Consistency**: Does it match terminology elsewhere? - **Tone**: Is it appropriate for the situation? -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.claude/skills/critique/reference/cognitive-load.md b/.claude/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .claude/skills/critique/reference/cognitive-load.md rename to .claude/skills/impeccable/reference/cognitive-load.md diff --git a/.claude/skills/colorize/SKILL.md b/.claude/skills/impeccable/reference/colorize.md similarity index 89% rename from .claude/skills/colorize/SKILL.md rename to .claude/skills/impeccable/reference/colorize.md index 5b4e961de..5cd4db209 100644 --- a/.claude/skills/colorize/SKILL.md +++ b/.claude/skills/impeccable/reference/colorize.md @@ -1,16 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -140,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.claude/skills/impeccable/reference/craft.md b/.claude/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.claude/skills/impeccable/reference/craft.md +++ b/.claude/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.claude/skills/critique/SKILL.md b/.claude/skills/impeccable/reference/critique.md similarity index 84% rename from .claude/skills/critique/SKILL.md rename to .claude/skills/impeccable/reference/critique.md index f0c2d92d0..e0d63443f 100644 --- a/.claude/skills/critique/SKILL.md +++ b/.claude/skills/impeccable/reference/critique.md @@ -1,20 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" -allowed-tools: - - Bash(npx impeccable *) ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -32,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -46,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -96,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -142,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `CLAUDE.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -178,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. STOP and call the AskUserQuestion tool to clarify. These answers will shape the action plan. @@ -198,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -211,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.claude/skills/delight/SKILL.md b/.claude/skills/impeccable/reference/delight.md similarity index 92% rename from .claude/skills/delight/SKILL.md rename to .claude/skills/impeccable/reference/delight.md index 441102c72..c3a24aeb6 100644 --- a/.claude/skills/delight/SKILL.md +++ b/.claude/skills/impeccable/reference/delight.md @@ -1,16 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -301,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.claude/skills/distill/SKILL.md b/.claude/skills/impeccable/reference/distill.md similarity index 90% rename from .claude/skills/distill/SKILL.md rename to .claude/skills/impeccable/reference/distill.md index 765d01437..441b9fd93 100644 --- a/.claude/skills/distill/SKILL.md +++ b/.claude/skills/impeccable/reference/distill.md @@ -1,16 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -119,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.cursor/skills/harden/SKILL.md b/.claude/skills/impeccable/reference/harden.md similarity index 96% rename from .cursor/skills/harden/SKILL.md rename to .claude/skills/impeccable/reference/harden.md index 78eaa9881..af8b8a703 100644 --- a/.cursor/skills/harden/SKILL.md +++ b/.claude/skills/impeccable/reference/harden.md @@ -1,9 +1,3 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 ---- - Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. ## Assess Hardening Needs @@ -384,4 +378,4 @@ Test thoroughly with edge cases: - **Errors**: Force API errors, test all error states - **Empty**: Remove all data, test empty states -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.claude/skills/critique/reference/heuristics-scoring.md b/.claude/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .claude/skills/critique/reference/heuristics-scoring.md rename to .claude/skills/impeccable/reference/heuristics-scoring.md diff --git a/.pi/skills/layout/SKILL.md b/.claude/skills/impeccable/reference/layout.md similarity index 89% rename from .pi/skills/layout/SKILL.md rename to .claude/skills/impeccable/reference/layout.md index e3355c314..cd6b778e7 100644 --- a/.pi/skills/layout/SKILL.md +++ b/.claude/skills/impeccable/reference/layout.md @@ -1,14 +1,5 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 ---- - Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak about the current spatial design: ## Plan Layout Improvements -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. Create a systematic plan: @@ -120,4 +111,4 @@ Create a systematic plan: - **Consistency**: Is the spacing system applied uniformly? - **Responsiveness**: Does the layout adapt gracefully across screen sizes? -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.gemini/skills/optimize/SKILL.md b/.claude/skills/impeccable/reference/optimize.md similarity index 96% rename from .gemini/skills/optimize/SKILL.md rename to .claude/skills/impeccable/reference/optimize.md index 6d82e1265..4abf575ec 100644 --- a/.gemini/skills/optimize/SKILL.md +++ b/.claude/skills/impeccable/reference/optimize.md @@ -1,9 +1,3 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 ---- - Identify and fix performance issues to create faster, smoother user experiences. ## Assess Performance Issues @@ -261,4 +255,4 @@ Test that optimizations worked: - **No regressions**: Ensure functionality still works - **User perception**: Does it *feel* faster? -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.claude/skills/overdrive/SKILL.md b/.claude/skills/impeccable/reference/overdrive.md similarity index 77% rename from .claude/skills/overdrive/SKILL.md rename to .claude/skills/impeccable/reference/overdrive.md index a2cfe05a5..e91734d77 100644 --- a/.claude/skills/overdrive/SKILL.md +++ b/.claude/skills/impeccable/reference/overdrive.md @@ -1,11 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Start your response with: ``` @@ -13,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **STOP and call the AskUserQuestion tool to clarify.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -33,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -91,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -128,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -139,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.claude/skills/critique/reference/personas.md b/.claude/skills/impeccable/reference/personas.md similarity index 100% rename from .claude/skills/critique/reference/personas.md rename to .claude/skills/impeccable/reference/personas.md diff --git a/.cursor/skills/polish/SKILL.md b/.claude/skills/impeccable/reference/polish.md similarity index 93% rename from .cursor/skills/polish/SKILL.md rename to .claude/skills/impeccable/reference/polish.md index 4c84dc128..597c68847 100644 --- a/.cursor/skills/polish/SKILL.md +++ b/.claude/skills/impeccable/reference/polish.md @@ -1,14 +1,4 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- +> **Additional context needed**: quality bar (MVP vs flagship). Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. @@ -219,4 +209,4 @@ After polishing, ensure code quality: - **Consolidate tokens**: If you introduced new values, check whether they should be tokens. - **Verify DRYness**: Look for duplication introduced during polishing and consolidate. -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.claude/skills/quieter/SKILL.md b/.claude/skills/impeccable/reference/quieter.md similarity index 88% rename from .claude/skills/quieter/SKILL.md rename to .claude/skills/impeccable/reference/quieter.md index a2457d65a..1b9de9450 100644 --- a/.claude/skills/quieter/SKILL.md +++ b/.claude/skills/impeccable/reference/quieter.md @@ -1,16 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -100,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.claude/skills/shape/SKILL.md b/.claude/skills/impeccable/reference/shape.md similarity index 79% rename from .claude/skills/shape/SKILL.md rename to .claude/skills/impeccable/reference/shape.md index 4bcfbc3b6..7e933b923 100644 --- a/.claude/skills/shape/SKILL.md +++ b/.claude/skills/impeccable/reference/shape.md @@ -1,26 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -58,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -93,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. STOP and call the AskUserQuestion tool to clarify. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.claude/skills/impeccable/reference/teach.md b/.claude/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..6fa81b276 --- /dev/null +++ b/.claude/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +STOP and call the AskUserQuestion tool to clarify. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then STOP and call the AskUserQuestion tool to clarify. whether they'd also like the Design Context appended to CLAUDE.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.gemini/skills/typeset/SKILL.md b/.claude/skills/impeccable/reference/typeset.md similarity index 87% rename from .gemini/skills/typeset/SKILL.md rename to .claude/skills/impeccable/reference/typeset.md index a5fff11a8..2e49ab6c0 100644 --- a/.gemini/skills/typeset/SKILL.md +++ b/.claude/skills/impeccable/reference/typeset.md @@ -1,14 +1,5 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 ---- - Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak or generic about the current type: ## Plan Typography Improvements -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. Create a systematic plan: @@ -111,4 +102,4 @@ Build a clear type scale: - **Performance**: Are web fonts loading efficiently without layout shift? - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs b/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.claude/skills/impeccable/scripts/command-metadata.json b/.claude/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.claude/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.claude/skills/impeccable/scripts/pin.mjs b/.claude/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.claude/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.claude/skills/layout/SKILL.md b/.claude/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.claude/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.claude/skills/optimize/SKILL.md b/.claude/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.claude/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.claude/skills/polish/SKILL.md b/.claude/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.claude/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.claude/skills/typeset/SKILL.md b/.claude/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.claude/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.codex/skills/adapt/SKILL.md b/.codex/skills/adapt/SKILL.md deleted file mode 100644 index 152d607b5..000000000 --- a/.codex/skills/adapt/SKILL.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.codex/skills/animate/SKILL.md b/.codex/skills/animate/SKILL.md deleted file mode 100644 index d2888c25a..000000000 --- a/.codex/skills/animate/SKILL.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -argument-hint: "[target]" ---- - -Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: performance constraints. - ---- - -## Assess Animation Opportunities - -Analyze where motion would improve the experience: - -1. **Identify static areas**: - - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) - - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) - - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious - - **Lack of delight**: Functional but joyless interactions - - **Missed guidance**: Opportunities to direct attention or explain behavior - -2. **Understand the context**: - - What's the personality? (Playful vs serious, energetic vs calm) - - What's the performance budget? (Mobile-first? Complex page?) - - Who's the audience? (Motion-sensitive users? Power users who want speed?) - - What matters most? (One hero animation vs many micro-interactions?) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. - -## Plan Animation Strategy - -Create a purposeful animation plan: - -- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) -- **Feedback layer**: Which interactions need acknowledgment? -- **Transition layer**: Which state changes need smoothing? -- **Delight layer**: Where can we surprise and delight? - -**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. - -## Implement Animations - -Add motion systematically across these categories: - -### Entrance Animations -- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations -- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) -- **Content reveals**: Scroll-triggered animations using intersection observer -- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management - -### Micro-interactions -- **Button feedback**: - - Hover: Subtle scale (1.02-1.05), color shift, shadow increase - - Click: Quick scale down then up (0.95 → 1), ripple effect - - Loading: Spinner or pulse state -- **Form interactions**: - - Input focus: Border color transition, slight scale or glow - - Validation: Shake on error, check mark on success, smooth color transitions -- **Toggle switches**: Smooth slide + color transition (200-300ms) -- **Checkboxes/radio**: Check mark animation, ripple effect -- **Like/favorite**: Scale + rotation, particle effects, color transition - -### State Transitions -- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) -- **Expand/collapse**: Height transition with overflow handling, icon rotation -- **Loading states**: Skeleton screen fades, spinner animations, progress bars -- **Success/error**: Color transitions, icon animations, gentle scale pulse -- **Enable/disable**: Opacity transitions, cursor changes - -### Navigation & Flow -- **Page transitions**: Crossfade between routes, shared element transitions -- **Tab switching**: Slide indicator, content fade/slide -- **Carousel/slider**: Smooth transforms, snap points, momentum -- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators - -### Feedback & Guidance -- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights -- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning -- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation -- **Focus flow**: Highlight path through form or workflow - -### Delight Moments -- **Empty states**: Subtle floating animations on illustrations -- **Completed actions**: Confetti, check mark flourish, success celebrations -- **Easter eggs**: Hidden interactions for discovery -- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches - -## Technical Implementation - -Use appropriate techniques for each animation: - -### Timing & Easing - -**Durations by purpose:** -- **100-150ms**: Instant feedback (button press, toggle) -- **200-300ms**: State changes (hover, menu open) -- **300-500ms**: Layout changes (accordion, modal) -- **500-800ms**: Entrance animations (page load) - -**Easing curves (use these, not CSS defaults):** -```css -/* Recommended - natural deceleration */ ---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ ---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ ---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ - -/* AVOID - feel dated and tacky */ -/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ -/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ -``` - -**Exit animations are faster than entrances.** Use ~75% of enter duration. - -### CSS Animations -```css -/* Prefer for simple, declarative animations */ -- transitions for state changes -- @keyframes for complex sequences -- transform + opacity only (GPU-accelerated) -``` - -### JavaScript Animation -```javascript -/* Use for complex, interactive animations */ -- Web Animations API for programmatic control -- Framer Motion for React -- GSAP for complex sequences -``` - -### Performance -- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties -- **will-change**: Add sparingly for known expensive animations -- **Reduce paint**: Minimize repaints, use `contain` where appropriate -- **Monitor FPS**: Ensure 60fps on target devices - -### Accessibility -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**NEVER**: -- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself -- Animate layout properties (width, height, top, left)—use transform instead -- Use durations over 500ms for feedback—it feels laggy -- Animate without purpose—every animation needs a reason -- Ignore `prefers-reduced-motion`—this is an accessibility violation -- Animate everything—animation fatigue makes interfaces feel exhausting -- Block interaction during animations unless intentional - -## Verify Quality - -Test animations thoroughly: - -- **Smooth at 60fps**: No jank on target devices -- **Feels natural**: Easing curves feel organic, not robotic -- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) -- **Reduced motion works**: Animations disabled or simplified appropriately -- **Doesn't block**: Users can interact during/after animations -- **Adds value**: Makes interface clearer or more delightful - -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file diff --git a/.codex/skills/bolder/SKILL.md b/.codex/skills/bolder/SKILL.md deleted file mode 100644 index e77f88117..000000000 --- a/.codex/skills/bolder/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -argument-hint: "[target]" ---- - -Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too safe or boring: - -1. **Identify weakness sources**: - - **Generic choices**: System fonts, basic colors, standard layouts - - **Timid scale**: Everything is medium-sized with no drama - - **Low contrast**: Everything has similar visual weight - - **Static**: No motion, no energy, no life - - **Predictable**: Standard patterns with no surprises - - **Flat hierarchy**: Nothing stands out or commands attention - -2. **Understand the context**: - - What's the brand personality? (How far can we push?) - - What's the purpose? (Marketing can be bolder than financial dashboards) - - Who's the audience? (What will resonate?) - - What are the constraints? (Brand guidelines, accessibility, performance) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. - -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." - -## Plan Amplification - -Create a strategy to increase impact while maintaining coherence: - -- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) -- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. -- **Risk budget**: How experimental can we be? Push boundaries within constraints. -- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) - -**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. - -## Amplify the Design - -Systematically increase impact across these dimensions: - -### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) -- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) -- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 -- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) - -### Color Intensification -- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) -- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop -- **Dominant color strategy**: Let one bold color own 60% of the design -- **Sharp accents**: High-contrast accent colors that pop -- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette -- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) - -### Spatial Drama -- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings -- **Break the grid**: Let hero elements escape containers and cross boundaries -- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry -- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) -- **Overlap**: Layer elements intentionally for depth - -### Visual Effects -- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) -- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) -- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) -- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) -- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand - -### Motion & Animation -- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays -- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences -- **Micro-interactions**: Satisfying hover effects, click feedback, state changes -- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) - -### Composition Boldness -- **Hero moments**: Create clear focal points with dramatic treatment -- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements -- **Full-bleed elements**: Use full viewport width/height for impact -- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits - -**NEVER**: -- Add effects randomly without purpose (chaos ≠ bold) -- Sacrifice readability for aesthetics (body text must be readable) -- Make everything bold (then nothing is bold - need contrast) -- Ignore accessibility (bold design must still meet WCAG standards) -- Overwhelm with motion (animation fatigue is real) -- Copy trendy aesthetics blindly (bold means distinctive, not derivative) - -## Verify Quality - -Ensure amplification maintains usability and coherence: - -- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. -- **Still functional**: Can users accomplish tasks without distraction? -- **Coherent**: Does everything feel intentional and unified? -- **Memorable**: Will users remember this experience? -- **Performant**: Do all these effects run smoothly? -- **Accessible**: Does it still meet accessibility standards? - -**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." - -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file diff --git a/.codex/skills/clarify/SKILL.md b/.codex/skills/clarify/SKILL.md deleted file mode 100644 index 57d0aa6b0..000000000 --- a/.codex/skills/clarify/SKILL.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.codex/skills/colorize/SKILL.md b/.codex/skills/colorize/SKILL.md deleted file mode 100644 index c9f743ced..000000000 --- a/.codex/skills/colorize/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -argument-hint: "[target]" ---- - -Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: existing brand colors. - ---- - -## Assess Color Opportunity - -Analyze the current state and identify opportunities: - -1. **Understand current state**: - - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? - - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? - - **Context**: What's appropriate for this domain and audience? - - **Brand**: Are there existing brand colors we should use? - -2. **Identify where color adds value**: - - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) - - **Hierarchy**: Drawing attention to important elements - - **Categorization**: Different sections, types, or states - - **Emotional tone**: Warmth, energy, trust, creativity - - **Wayfinding**: Helping users navigate and understand structure - - **Delight**: Moments of visual interest and personality - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. - -## Plan Color Strategy - -Create a purposeful color introduction plan: - -- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) -- **Dominant color**: Which color owns 60% of colored elements? -- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) -- **Application strategy**: Where does each color appear and why? - -**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. - -## Introduce Color Strategically - -Add color systematically across these dimensions: - -### Semantic Color -- **State indicators**: - - Success: Green tones (emerald, forest, mint) - - Error: Red/pink tones (rose, crimson, coral) - - Warning: Orange/amber tones - - Info: Blue tones (sky, ocean, indigo) - - Neutral: Gray/slate for inactive states - -- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) -- **Progress indicators**: Colored bars, rings, or charts showing completion or health - -### Accent Color Application -- **Primary actions**: Color the most important buttons/CTAs -- **Links**: Add color to clickable text (maintain accessibility) -- **Icons**: Colorize key icons for recognition and personality -- **Headers/titles**: Add color to section headers or key labels -- **Hover states**: Introduce color on interaction - -### Background & Surfaces -- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) -- **Colored sections**: Use subtle background colors to separate areas -- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) -- **Cards & surfaces**: Tint cards or surfaces slightly for warmth - -**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. - -### Data Visualization -- **Charts & graphs**: Use color to encode categories or values -- **Heatmaps**: Color intensity shows density or importance -- **Comparison**: Color coding for different datasets or timeframes - -### Borders & Accents -- **Accent borders**: Add colored left/top borders to cards or sections -- **Underlines**: Color underlines for emphasis or active states -- **Dividers**: Subtle colored dividers instead of gray lines -- **Focus rings**: Colored focus indicators matching brand - -### Typography Color -- **Colored headings**: Use brand colors for section headings (maintain contrast) -- **Highlight text**: Color for emphasis or categories -- **Labels & tags**: Small colored labels for metadata or categories - -### Decorative Elements -- **Illustrations**: Add colored illustrations or icons -- **Shapes**: Geometric shapes in brand colors as background elements -- **Gradients**: Colorful gradient overlays or mesh backgrounds -- **Blobs/organic shapes**: Soft colored shapes for visual interest - -## Balance & Refinement - -Ensure color addition improves rather than overwhelms: - -### Maintain Hierarchy -- **Dominant color** (60%): Primary brand color or most used accent -- **Secondary color** (30%): Supporting color for variety -- **Accent color** (10%): High contrast for key moments -- **Neutrals** (remaining): Gray/black/white for structure - -### Accessibility -- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) -- **Don't rely on color alone**: Use icons, labels, or patterns alongside color -- **Test for color blindness**: Verify red/green combinations work for all users - -### Cohesion -- **Consistent palette**: Use colors from defined palette, not arbitrary choices -- **Systematic application**: Same color meanings throughout (green always = success) -- **Temperature consistency**: Warm palette stays warm, cool stays cool - -**NEVER**: -- Use every color in the rainbow (choose 2-4 colors beyond neutrals) -- Apply color randomly without semantic meaning -- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead -- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication -- Use pure black (`#000`) or pure white (`#fff`) for large areas -- Violate WCAG contrast requirements -- Use color as the only indicator (accessibility issue) -- Make everything colorful (defeats the purpose) -- Default to purple-blue gradients (AI slop aesthetic) - -## Verify Color Addition - -Test that colorization improves the experience: - -- **Better hierarchy**: Does color guide attention appropriately? -- **Clearer meaning**: Does color help users understand states/categories? -- **More engaging**: Does the interface feel warmer and more inviting? -- **Still accessible**: Do all color combinations meet WCAG standards? -- **Not overwhelming**: Is color balanced and purposeful? - -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file diff --git a/.codex/skills/delight/SKILL.md b/.codex/skills/delight/SKILL.md deleted file mode 100644 index 01638978d..000000000 --- a/.codex/skills/delight/SKILL.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -argument-hint: "[target]" ---- - -Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). - ---- - -## Assess Delight Opportunities - -Identify where delight would enhance (not distract from) the experience: - -1. **Find natural delight moments**: - - **Success states**: Completed actions (save, send, publish) - - **Empty states**: First-time experiences, onboarding - - **Loading states**: Waiting periods that could be entertaining - - **Achievements**: Milestones, streaks, completions - - **Interactions**: Hover states, clicks, drags - - **Errors**: Softening frustrating moments - - **Easter eggs**: Hidden discoveries for curious users - -2. **Understand the context**: - - What's the brand personality? (Playful? Professional? Quirky? Elegant?) - - Who's the audience? (Tech-savvy? Creative? Corporate?) - - What's the emotional context? (Accomplishment? Exploration? Frustration?) - - What's appropriate? (Banking app ≠ gaming app) - -3. **Define delight strategy**: - - **Subtle sophistication**: Refined micro-interactions (luxury brands) - - **Playful personality**: Whimsical illustrations and copy (consumer apps) - - **Helpful surprises**: Anticipating needs before users ask (productivity tools) - - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. - -## Delight Principles - -Follow these guidelines: - -### Delight Amplifies, Never Blocks -- Delight moments should be quick (< 1 second) -- Never delay core functionality for delight -- Make delight skippable or subtle -- Respect user's time and task focus - -### Surprise and Discovery -- Hide delightful details for users to discover -- Reward exploration and curiosity -- Don't announce every delight moment -- Let users share discoveries with others - -### Appropriate to Context -- Match delight to emotional moment (celebrate success, empathize with errors) -- Respect the user's state (don't be playful during critical errors) -- Match brand personality and audience expectations -- Cultural sensitivity (what's delightful varies by culture) - -### Compound Over Time -- Delight should remain fresh with repeated use -- Vary responses (not same animation every time) -- Reveal deeper layers with continued use -- Build anticipation through patterns - -## Delight Techniques - -Add personality and joy through these methods: - -### Micro-interactions & Animation - -**Button delight**: -```css -/* Satisfying button press */ -.button { - transition: transform 0.1s, box-shadow 0.1s; -} -.button:active { - transform: translateY(2px); - box-shadow: 0 2px 4px rgba(0,0,0,0.2); -} - -/* Ripple effect on click */ -/* Smooth lift on hover */ -.button:hover { - transform: translateY(-2px); - transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ -} -``` - -**Loading delight**: -- Playful loading animations (not just spinners) -- Personality in loading messages (write product-specific ones, not generic AI filler) -- Progress indication with encouraging messages -- Skeleton screens with subtle animations - -**Success animations**: -- Checkmark draw animation -- Confetti burst for major achievements -- Gentle scale + fade for confirmation -- Satisfying sound effects (subtle) - -**Hover surprises**: -- Icons that animate on hover -- Color shifts or glow effects -- Tooltip reveals with personality -- Cursor changes (custom cursors for branded experiences) - -### Personality in Copy - -**Playful error messages**: -``` -"Error 404" -"This page is playing hide and seek. (And winning)" - -"Connection failed" -"Looks like the internet took a coffee break. Want to retry?" -``` - -**Encouraging empty states**: -``` -"No projects" -"Your canvas awaits. Create something amazing." - -"No messages" -"Inbox zero! You're crushing it today." -``` - -**Playful labels & tooltips**: -``` -"Delete" -"Send to void" (for playful brand) - -"Help" -"Rescue me" (tooltip) -``` - -**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. - -### Illustrations & Visual Personality - -**Custom illustrations**: -- Empty state illustrations (not stock icons) -- Error state illustrations (friendly monsters, quirky characters) -- Loading state illustrations (animated characters) -- Success state illustrations (celebrations) - -**Icon personality**: -- Custom icon set matching brand personality -- Animated icons (subtle motion on hover/click) -- Illustrative icons (more detailed than generic) -- Consistent style across all icons - -**Background effects**: -- Subtle particle effects -- Gradient mesh backgrounds -- Geometric patterns -- Parallax depth -- Time-of-day themes (morning vs night) - -### Satisfying Interactions - -**Drag and drop delight**: -- Lift effect on drag (shadow, scale) -- Snap animation when dropped -- Satisfying placement sound -- Undo toast ("Dropped in wrong place? [Undo]") - -**Toggle switches**: -- Smooth slide with spring physics -- Color transition -- Haptic feedback on mobile -- Optional sound effect - -**Progress & achievements**: -- Streak counters with celebratory milestones -- Progress bars that "celebrate" at 100% -- Badge unlocks with animation -- Playful stats ("You're on fire! 5 days in a row") - -**Form interactions**: -- Input fields that animate on focus -- Checkboxes with a satisfying scale pulse when checked -- Success state that celebrates valid input -- Auto-grow textareas - -### Sound Design - -**Subtle audio cues** (when appropriate): -- Notification sounds (distinctive but not annoying) -- Success sounds (satisfying "ding") -- Error sounds (empathetic, not harsh) -- Typing sounds for chat/messaging -- Ambient background audio (very subtle) - -**IMPORTANT**: -- Respect system sound settings -- Provide mute option -- Keep volumes quiet (subtle cues, not alarms) -- Don't play on every interaction (sound fatigue is real) - -### Easter Eggs & Hidden Delights - -**Discovery rewards**: -- Konami code unlocks special theme -- Hidden keyboard shortcuts (Cmd+K for special features) -- Hover reveals on logos or illustrations -- Alt text jokes on images (for screen reader users too!) -- Console messages for developers ("Like what you see? We're hiring!") - -**Seasonal touches**: -- Holiday themes (subtle, tasteful) -- Seasonal color shifts -- Weather-based variations -- Time-based changes (dark at night, light during day) - -**Contextual personality**: -- Different messages based on time of day -- Responses to specific user actions -- Randomized variations (not same every time) -- Progressive reveals with continued use - -### Loading & Waiting States - -**Make waiting engaging**: -- Interesting loading messages that rotate -- Progress bars with personality -- Mini-games during long loads -- Fun facts or tips while waiting -- Countdown with encouraging messages - -``` -Loading messages — write ones specific to your product, not generic AI filler: -- "Crunching your latest numbers..." -- "Syncing with your team's changes..." -- "Preparing your dashboard..." -- "Checking for updates since yesterday..." -``` - -**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. - -### Celebration Moments - -**Success celebrations**: -- Confetti for major milestones -- Animated checkmarks for completions -- Progress bar celebrations at 100% -- "Achievement unlocked" style notifications -- Personalized messages ("You published your 10th article!") - -**Milestone recognition**: -- First-time actions get special treatment -- Streak tracking and celebration -- Progress toward goals -- Anniversary celebrations - -## Implementation Patterns - -**Animation libraries**: -- Framer Motion (React) -- GSAP (universal) -- Lottie (After Effects animations) -- Canvas confetti (party effects) - -**Sound libraries**: -- Howler.js (audio management) -- Use-sound (React hook) - -**Physics libraries**: -- React Spring (spring physics) -- Popmotion (animation primitives) - -**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. - -**NEVER**: -- Delay core functionality for delight -- Force users through delightful moments (make skippable) -- Use delight to hide poor UX -- Overdo it (less is more) -- Ignore accessibility (animate responsibly, provide alternatives) -- Make every interaction delightful (special moments should be special) -- Sacrifice performance for delight -- Be inappropriate for context (read the room) - -## Verify Delight Quality - -Test that delight actually delights: - -- **User reactions**: Do users smile? Share screenshots? -- **Doesn't annoy**: Still pleasant after 100th time? -- **Doesn't block**: Can users opt out or skip? -- **Performant**: No jank, no slowdown -- **Appropriate**: Matches brand and context -- **Accessible**: Works with reduced motion, screen readers - -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file diff --git a/.codex/skills/distill/SKILL.md b/.codex/skills/distill/SKILL.md deleted file mode 100644 index 8cb1d40e2..000000000 --- a/.codex/skills/distill/SKILL.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -argument-hint: "[target]" ---- - -Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel complex or cluttered: - -1. **Identify complexity sources**: - - **Too many elements**: Competing buttons, redundant information, visual clutter - - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose - - **Information overload**: Everything visible at once, no progressive disclosure - - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations - - **Confusing hierarchy**: Unclear what matters most - - **Feature creep**: Too many options, actions, or paths forward - -2. **Find the essence**: - - What's the primary user goal? (There should be ONE) - - What's actually necessary vs nice-to-have? - - What can be removed, hidden, or combined? - - What's the 20% that delivers 80% of value? - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. - -## Plan Simplification - -Create a ruthless editing strategy: - -- **Core purpose**: What's the ONE thing this should accomplish? -- **Essential elements**: What's truly necessary to achieve that purpose? -- **Progressive disclosure**: What can be hidden until needed? -- **Consolidation opportunities**: What can be combined or integrated? - -**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. - -## Simplify the Design - -Systematically remove complexity across these dimensions: - -### Information Architecture -- **Reduce scope**: Remove secondary actions, optional features, redundant information -- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) -- **Combine related actions**: Merge similar buttons, consolidate forms, group related content -- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden -- **Remove redundancy**: If it's said elsewhere, don't repeat it here - -### Visual Simplification -- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors -- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights -- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function -- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards -- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead -- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps - -### Layout Simplification -- **Linear flow**: Replace complex grids with simple vertical flow where possible -- **Remove sidebars**: Move secondary content inline or hide it -- **Full-width**: Use available space generously instead of complex multi-column layouts -- **Consistent alignment**: Pick left or center, stick with it -- **Generous white space**: Let content breathe, don't pack everything tight - -### Interaction Simplification -- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) -- **Smart defaults**: Make common choices automatic, only ask when necessary -- **Inline actions**: Replace modal flows with inline editing where possible -- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? -- **Clear CTAs**: ONE obvious next step, not five competing actions - -### Content Simplification -- **Shorter copy**: Cut every sentence in half, then do it again -- **Active voice**: "Save changes" not "Changes will be saved" -- **Remove jargon**: Plain language always wins -- **Scannable structure**: Short paragraphs, bullet points, clear headings -- **Essential information only**: Remove marketing fluff, legalese, hedging -- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once - -### Code Simplification -- **Remove unused code**: Dead CSS, unused components, orphaned files -- **Flatten component trees**: Reduce nesting depth -- **Consolidate styles**: Merge similar styles, use utilities consistently -- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? - -**NEVER**: -- Remove necessary functionality (simplicity ≠ feature-less) -- Sacrifice accessibility for simplicity (clear labels and ARIA still required) -- Make things so simple they're unclear (mystery ≠ minimalism) -- Remove information users need to make decisions -- Eliminate hierarchy completely (some things should stand out) -- Oversimplify complex domains (match complexity to actual task complexity) - -## Verify Simplification - -Ensure simplification improves usability: - -- **Faster task completion**: Can users accomplish goals more quickly? -- **Reduced cognitive load**: Is it easier to understand what to do? -- **Still complete**: Are all necessary features still accessible? -- **Clearer hierarchy**: Is it obvious what matters most? -- **Better performance**: Does simpler design load faster? - -## Document Removed Complexity - -If you removed features or options: -- Document why they were removed -- Consider if they need alternative access points -- Note any user feedback to monitor - -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file diff --git a/.codex/skills/harden/SKILL.md b/.codex/skills/harden/SKILL.md deleted file mode 100644 index ccfa6f644..000000000 --- a/.codex/skills/harden/SKILL.md +++ /dev/null @@ -1,388 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.codex/skills/impeccable/SKILL.md b/.codex/skills/impeccable/SKILL.md index 6dd46e1b6..b96bef77e 100644 --- a/.codex/skills/impeccable/SKILL.md +++ b/.codex/skills/impeccable/SKILL.md @@ -1,15 +1,17 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `$layout`, `/normalize` was folded into `$polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through $impeccable (e.g., `$impeccable audit`). I'll clean up the old standalone skill files. Use `$impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -22,8 +24,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -33,7 +33,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -269,7 +269,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -283,82 +283,96 @@ Remember: GPT is capable of extraordinary creative work. Don't hold back. Show w --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `$impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `$impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `$impeccable craft [feature]` - Shape, then build a feature end-to-end +> `$impeccable shape [feature]` - Plan UX/UI before writing code +> `$impeccable teach` - Set up design context for this project (one-time) +> `$impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `$impeccable critique [target]` - UX design review with heuristic scoring +> `$impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `$impeccable polish [target]` - Final quality pass before shipping +> `$impeccable bolder [target]` - Amplify safe/bland designs +> `$impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `$impeccable distill [target]` - Strip to essence, remove complexity +> `$impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `$impeccable animate [target]` - Add purposeful animations and motion +> `$impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `$impeccable typeset [target]` - Improve typography hierarchy and fonts +> `$impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `$impeccable delight [target]` - Add personality and memorable touches +> `$impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `$impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `$impeccable adapt [target]` - Adapt for different devices and screen sizes +> `$impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `$impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates $audit) +> `$impeccable unpin ` - Remove a pinned shortcut +> +> Or use `$impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke $impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `$impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `$audit` instead of `$impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .codex/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `$impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.cursor/skills/adapt/SKILL.md b/.codex/skills/impeccable/reference/adapt.md similarity index 90% rename from .cursor/skills/adapt/SKILL.md rename to .codex/skills/impeccable/reference/adapt.md index 35b00e3f9..249653d4c 100644 --- a/.cursor/skills/adapt/SKILL.md +++ b/.codex/skills/impeccable/reference/adapt.md @@ -1,14 +1,7 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 ---- +> **Additional context needed**: target platforms/devices and usage contexts. Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. --- @@ -194,4 +187,4 @@ Test thoroughly across contexts: - **Edge cases**: Very small screens (320px), very large screens (4K) - **Slow connections**: Test on throttled network -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.kiro/skills/animate/SKILL.md b/.codex/skills/impeccable/reference/animate.md similarity index 91% rename from .kiro/skills/animate/SKILL.md rename to .codex/skills/impeccable/reference/animate.md index 02294bc19..0186ce081 100644 --- a/.kiro/skills/animate/SKILL.md +++ b/.codex/skills/impeccable/reference/animate.md @@ -1,14 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -170,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.codex/skills/audit/SKILL.md b/.codex/skills/impeccable/reference/audit.md similarity index 79% rename from .codex/skills/audit/SKILL.md rename to .codex/skills/impeccable/reference/audit.md index 84a55b188..a86b3be95 100644 --- a/.codex/skills/audit/SKILL.md +++ b/.codex/skills/impeccable/reference/audit.md @@ -1,16 +1,3 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -65,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -108,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: $animate, $quieter, $shape, $optimize, $adapt, $clarify, $layout, $distill, $delight, $audit, $harden, $polish, $bolder, $typeset, $critique, $colorize, $overdrive) +- **Suggested command**: Which command to use (prefer: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) ### Patterns & Systemic Issues @@ -127,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `$command-name`** — Brief description (specific context from audit findings) 2. **[P?] `$command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: $animate, $quieter, $shape, $optimize, $adapt, $clarify, $layout, $distill, $delight, $audit, $harden, $polish, $bolder, $typeset, $critique, $colorize, $overdrive. Map findings to the most appropriate command. End with `$polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset. Map findings to the most appropriate command. End with `$impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `$audit` after fixes to see your score improve. +> Re-run `$impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. @@ -144,4 +131,4 @@ After presenting the summary, tell the user: - Forget to prioritize (everything can't be P0) - Report false positives without verification -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.cursor/skills/bolder/SKILL.md b/.codex/skills/impeccable/reference/bolder.md similarity index 88% rename from .cursor/skills/bolder/SKILL.md rename to .codex/skills/impeccable/reference/bolder.md index e276b4d0b..cb3481663 100644 --- a/.cursor/skills/bolder/SKILL.md +++ b/.codex/skills/impeccable/reference/bolder.md @@ -1,14 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -34,7 +25,7 @@ If any of these are unclear from the codebase, ask the user directly to clarify **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -52,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -112,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.kiro/skills/clarify/SKILL.md b/.codex/skills/impeccable/reference/clarify.md similarity index 89% rename from .kiro/skills/clarify/SKILL.md rename to .codex/skills/impeccable/reference/clarify.md index 468541090..dc116e745 100644 --- a/.kiro/skills/clarify/SKILL.md +++ b/.codex/skills/impeccable/reference/clarify.md @@ -1,14 +1,7 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 ---- +> **Additional context needed**: audience technical level and users' mental state in context. Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. --- @@ -178,4 +171,4 @@ Test that copy improvements work: - **Consistency**: Does it match terminology elsewhere? - **Tone**: Is it appropriate for the situation? -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.codex/skills/critique/reference/cognitive-load.md b/.codex/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .codex/skills/critique/reference/cognitive-load.md rename to .codex/skills/impeccable/reference/cognitive-load.md diff --git a/.gemini/skills/colorize/SKILL.md b/.codex/skills/impeccable/reference/colorize.md similarity index 90% rename from .gemini/skills/colorize/SKILL.md rename to .codex/skills/impeccable/reference/colorize.md index 509a71c06..a4ce5072e 100644 --- a/.gemini/skills/colorize/SKILL.md +++ b/.codex/skills/impeccable/reference/colorize.md @@ -1,14 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -138,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.codex/skills/impeccable/reference/craft.md b/.codex/skills/impeccable/reference/craft.md index 6748e3259..3b95aac83 100644 --- a/.codex/skills/impeccable/reference/craft.md +++ b/.codex/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run $shape, passing along whatever feature description the user provided. +Run $impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run $shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run $impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.codex/skills/critique/SKILL.md b/.codex/skills/impeccable/reference/critique.md similarity index 84% rename from .codex/skills/critique/SKILL.md rename to .codex/skills/impeccable/reference/critique.md index 185049999..41ec68c4d 100644 --- a/.codex/skills/critique/SKILL.md +++ b/.codex/skills/impeccable/reference/critique.md @@ -1,17 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -argument-hint: "[area (feature, page, component...)]" ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke $impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run $impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -29,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -43,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -93,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -139,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: $animate, $quieter, $shape, $optimize, $adapt, $clarify, $layout, $distill, $delight, $audit, $harden, $polish, $bolder, $typeset, $critique, $colorize, $overdrive) +- **Suggested command**: Which command could address this (from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `AGENTS.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -175,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -183,7 +172,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene 1. **Priority direction**: Based on the issues found, ask which category matters most to the user right now. For example: "I found problems with visual hierarchy, color usage, and information overload. Which area should we tackle first?" Offer the top 2-3 issue categories as options. -2. **Design intent**: If the critique found a tonal mismatch, ask whether it was intentional. For example: "The interface feels clinical and corporate. Is that the intended tone, or should it feel warmer$bolder/more playful?" Offer 2-3 tonal directions as options based on what would fix the issues found. +2. **Design intent**: If the critique found a tonal mismatch, ask whether it was intentional. For example: "The interface feels clinical and corporate. Is that the intended tone, or should it feel warmer/bolder/more playful?" Offer 2-3 tonal directions as options based on what would fix the issues found. 3. **Scope**: Ask how much the user wants to take on. For example: "I found N issues. Want to address everything, or focus on the top 3?" Offer scope options like "Top 3 only", "All issues", "Critical issues only". @@ -195,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -208,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: $animate, $quieter, $shape, $optimize, $adapt, $clarify, $layout, $distill, $delight, $audit, $harden, $polish, $bolder, $typeset, $critique, $colorize, $overdrive +- Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `$polish` as the final step if any fixes were recommended +- End with `$impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `$critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `$impeccable critique` after fixes to see your score improve. diff --git a/.pi/skills/delight/SKILL.md b/.codex/skills/impeccable/reference/delight.md similarity index 92% rename from .pi/skills/delight/SKILL.md rename to .codex/skills/impeccable/reference/delight.md index f323738dd..8a781e70e 100644 --- a/.pi/skills/delight/SKILL.md +++ b/.codex/skills/impeccable/reference/delight.md @@ -1,14 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -299,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.cursor/skills/distill/SKILL.md b/.codex/skills/impeccable/reference/distill.md similarity index 91% rename from .cursor/skills/distill/SKILL.md rename to .codex/skills/impeccable/reference/distill.md index e462d1c27..4f47dc0b4 100644 --- a/.cursor/skills/distill/SKILL.md +++ b/.codex/skills/impeccable/reference/distill.md @@ -1,14 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -117,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.gemini/skills/harden/SKILL.md b/.codex/skills/impeccable/reference/harden.md similarity index 96% rename from .gemini/skills/harden/SKILL.md rename to .codex/skills/impeccable/reference/harden.md index 78eaa9881..af8b8a703 100644 --- a/.gemini/skills/harden/SKILL.md +++ b/.codex/skills/impeccable/reference/harden.md @@ -1,9 +1,3 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 ---- - Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. ## Assess Hardening Needs @@ -384,4 +378,4 @@ Test thoroughly with edge cases: - **Errors**: Force API errors, test all error states - **Empty**: Remove all data, test empty states -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.codex/skills/critique/reference/heuristics-scoring.md b/.codex/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .codex/skills/critique/reference/heuristics-scoring.md rename to .codex/skills/impeccable/reference/heuristics-scoring.md diff --git a/.kiro/skills/layout/SKILL.md b/.codex/skills/impeccable/reference/layout.md similarity index 89% rename from .kiro/skills/layout/SKILL.md rename to .codex/skills/impeccable/reference/layout.md index e3355c314..cd6b778e7 100644 --- a/.kiro/skills/layout/SKILL.md +++ b/.codex/skills/impeccable/reference/layout.md @@ -1,14 +1,5 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 ---- - Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak about the current spatial design: ## Plan Layout Improvements -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. Create a systematic plan: @@ -120,4 +111,4 @@ Create a systematic plan: - **Consistency**: Is the spacing system applied uniformly? - **Responsiveness**: Does the layout adapt gracefully across screen sizes? -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.pi/skills/optimize/SKILL.md b/.codex/skills/impeccable/reference/optimize.md similarity index 96% rename from .pi/skills/optimize/SKILL.md rename to .codex/skills/impeccable/reference/optimize.md index 6d82e1265..4abf575ec 100644 --- a/.pi/skills/optimize/SKILL.md +++ b/.codex/skills/impeccable/reference/optimize.md @@ -1,9 +1,3 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 ---- - Identify and fix performance issues to create faster, smoother user experiences. ## Assess Performance Issues @@ -261,4 +255,4 @@ Test that optimizations worked: - **No regressions**: Ensure functionality still works - **User perception**: Does it *feel* faster? -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.cursor/skills/overdrive/SKILL.md b/.codex/skills/impeccable/reference/overdrive.md similarity index 78% rename from .cursor/skills/overdrive/SKILL.md rename to .codex/skills/impeccable/reference/overdrive.md index 11bd0f4a8..d84a147dc 100644 --- a/.cursor/skills/overdrive/SKILL.md +++ b/.codex/skills/impeccable/reference/overdrive.md @@ -1,9 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 ---- - Start your response with: ``` @@ -11,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -31,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -89,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -126,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -137,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.codex/skills/critique/reference/personas.md b/.codex/skills/impeccable/reference/personas.md similarity index 100% rename from .codex/skills/critique/reference/personas.md rename to .codex/skills/impeccable/reference/personas.md diff --git a/.gemini/skills/polish/SKILL.md b/.codex/skills/impeccable/reference/polish.md similarity index 93% rename from .gemini/skills/polish/SKILL.md rename to .codex/skills/impeccable/reference/polish.md index 4c84dc128..597c68847 100644 --- a/.gemini/skills/polish/SKILL.md +++ b/.codex/skills/impeccable/reference/polish.md @@ -1,14 +1,4 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- +> **Additional context needed**: quality bar (MVP vs flagship). Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. @@ -219,4 +209,4 @@ After polishing, ensure code quality: - **Consolidate tokens**: If you introduced new values, check whether they should be tokens. - **Verify DRYness**: Look for duplication introduced during polishing and consolidate. -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.gemini/skills/quieter/SKILL.md b/.codex/skills/impeccable/reference/quieter.md similarity index 89% rename from .gemini/skills/quieter/SKILL.md rename to .codex/skills/impeccable/reference/quieter.md index ca17da694..a8ad41809 100644 --- a/.gemini/skills/quieter/SKILL.md +++ b/.codex/skills/impeccable/reference/quieter.md @@ -1,14 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -98,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.codex/skills/shape/SKILL.md b/.codex/skills/impeccable/reference/shape.md similarity index 79% rename from .codex/skills/shape/SKILL.md rename to .codex/skills/impeccable/reference/shape.md index 3e747afc2..8a6701e0f 100644 --- a/.codex/skills/shape/SKILL.md +++ b/.codex/skills/impeccable/reference/shape.md @@ -1,25 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -argument-hint: "[feature to shape]" ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke $impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run $impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to $impeccable craft, $impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to $impeccable craft, or directly to $impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -57,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -92,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to $impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use $impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to $impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use $impeccable craft instead, which runs this command internally.) diff --git a/.codex/skills/impeccable/reference/teach.md b/.codex/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..2d9f768f1 --- /dev/null +++ b/.codex/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.kiro/skills/typeset/SKILL.md b/.codex/skills/impeccable/reference/typeset.md similarity index 87% rename from .kiro/skills/typeset/SKILL.md rename to .codex/skills/impeccable/reference/typeset.md index a5fff11a8..2e49ab6c0 100644 --- a/.kiro/skills/typeset/SKILL.md +++ b/.codex/skills/impeccable/reference/typeset.md @@ -1,14 +1,5 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 ---- - Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak or generic about the current type: ## Plan Typography Improvements -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. Create a systematic plan: @@ -111,4 +102,4 @@ Build a clear type scale: - **Performance**: Are web fonts loading efficiently without layout shift? - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.codex/skills/impeccable/scripts/cleanup-deprecated.mjs b/.codex/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.codex/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.codex/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.codex/skills/impeccable/scripts/command-metadata.json b/.codex/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.codex/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.codex/skills/impeccable/scripts/pin.mjs b/.codex/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.codex/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.codex/skills/layout/SKILL.md b/.codex/skills/layout/SKILL.md deleted file mode 100644 index 0e212c0b6..000000000 --- a/.codex/skills/layout/SKILL.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.codex/skills/optimize/SKILL.md b/.codex/skills/optimize/SKILL.md deleted file mode 100644 index a9ec152d4..000000000 --- a/.codex/skills/optimize/SKILL.md +++ /dev/null @@ -1,265 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.codex/skills/overdrive/SKILL.md b/.codex/skills/overdrive/SKILL.md deleted file mode 100644 index c63cbb867..000000000 --- a/.codex/skills/overdrive/SKILL.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -argument-hint: "[target]" ---- - -Start your response with: - -``` -──────────── ⚡ OVERDRIVE ───────────── -》》》 Entering overdrive mode... -``` - -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. - -### Propose Before Building - -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: - -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. -2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). -3. Only proceed with the direction the user confirms. - -Skipping this step risks building something embarrassing that needs to be thrown away. - -### Iterate with Browser Automation - -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. - ---- - -## Assess What "Extraordinary" Means Here - -The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** - -### For visual/marketing surfaces -Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. - -### For functional UI -Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. - -### For performance-critical UI -The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. - -### For data-heavy interfaces -Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. - -**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. - -## The Toolkit - -Organized by what you're trying to achieve, not by technology name. - -### Make transitions feel cinematic -- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. -- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes -- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. - -### Tie animation to scroll position -- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) - -### Render beyond CSS -- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. -- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. -- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. -- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. - -### Make data feel alive -- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. -- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. -- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. - -### Animate complex properties -- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. -- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. - -### Push performance boundaries -- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. -- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. -- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. - -### Interact with the device -- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. -- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. - -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. - -## Implement with Discipline - -### Progressive enhancement is non-negotiable - -Every technique must degrade gracefully. The experience without the enhancement must still be good. - -```css -@supports (animation-timeline: scroll()) { - .hero { animation-timeline: scroll(); } -} -``` - -```javascript -if ('gpu' in navigator) { /* WebGPU */ } -else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } -/* CSS-only fallback must still look good */ -``` - -### Performance rules - -- Target 60fps. If dropping below 50, simplify. -- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. -- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. -- Pause off-screen rendering. Kill what you can't see. -- Test on real mid-range devices, not just your development machine. - -### Polish is the difference - -The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. - -**NEVER**: -- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion -- Ship effects that cause jank on mid-range devices -- Use bleeding-edge APIs without a functional fallback -- Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills -- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise - -## Verify the Result - -- **The wow test**: Show it to someone who hasn't seen it. Do they react? -- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? -- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? -- **The accessibility test**: Enable reduced motion. Still beautiful? -- **The context test**: Does this make sense for THIS brand and audience? - -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file diff --git a/.codex/skills/polish/SKILL.md b/.codex/skills/polish/SKILL.md deleted file mode 100644 index 47fe1199e..000000000 --- a/.codex/skills/polish/SKILL.md +++ /dev/null @@ -1,223 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.codex/skills/quieter/SKILL.md b/.codex/skills/quieter/SKILL.md deleted file mode 100644 index b01b87eb5..000000000 --- a/.codex/skills/quieter/SKILL.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -argument-hint: "[target]" ---- - -Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too intense: - -1. **Identify intensity sources**: - - **Color saturation**: Overly bright or saturated colors - - **Contrast extremes**: Too much high-contrast juxtaposition - - **Visual weight**: Too many bold, heavy elements competing - - **Animation excess**: Too much motion or overly dramatic effects - - **Complexity**: Too many visual elements, patterns, or decorations - - **Scale**: Everything is large and loud with no hierarchy - -2. **Understand the context**: - - What's the purpose? (Marketing vs tool vs reading experience) - - Who's the audience? (Some contexts need energy) - - What's working? (Don't throw away good ideas) - - What's the core message? (Preserve what matters) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. - -## Plan Refinement - -Create a strategy to reduce intensity while maintaining impact: - -- **Color approach**: Desaturate or shift to more sophisticated tones? -- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? -- **Simplification approach**: What can be removed entirely? -- **Sophistication approach**: How can we signal quality through restraint? - -**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. - -## Refine the Design - -Systematically reduce intensity across these dimensions: - -### Color Refinement -- **Reduce saturation**: Shift from fully saturated to 70-85% saturation -- **Soften palette**: Replace bright colors with muted, sophisticated tones -- **Reduce color variety**: Use fewer colors more thoughtfully -- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) -- **Gentler contrasts**: High contrast only where it matters most -- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness -- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead - -### Visual Weight Reduction -- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate -- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness -- **White space**: Increase breathing room, reduce density -- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely - -### Simplification -- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose -- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes -- **Reduce layering**: Flatten visual hierarchy where possible -- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows - -### Motion Reduction -- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing -- **Remove decorative animations**: Keep functional motion, remove flourishes -- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback -- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic -- **Remove animations entirely** if they're not serving a clear purpose - -### Composition Refinement -- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling -- **Align to grid**: Bring rogue elements back into systematic alignment -- **Even out spacing**: Replace extreme spacing variations with consistent rhythm - -**NEVER**: -- Make everything the same size/weight (hierarchy still matters) -- Remove all color (quiet ≠ grayscale) -- Eliminate all personality (maintain character through refinement) -- Sacrifice usability for aesthetics (functional elements still need clear affordances) -- Make everything small and light (some anchors needed) - -## Verify Quality - -Ensure refinement maintains quality: - -- **Still functional**: Can users still accomplish tasks easily? -- **Still distinctive**: Does it have character, or is it generic now? -- **Better reading**: Is text easier to read for extended periods? -- **Sophistication**: Does it feel more refined and premium? - -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file diff --git a/.codex/skills/typeset/SKILL.md b/.codex/skills/typeset/SKILL.md deleted file mode 100644 index 3a371d1c2..000000000 --- a/.codex/skills/typeset/SKILL.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke $impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run $impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.cursor/skills/impeccable/SKILL.md b/.cursor/skills/impeccable/SKILL.md index 8893bb42a..79ed6debb 100644 --- a/.cursor/skills/impeccable/SKILL.md +++ b/.cursor/skills/impeccable/SKILL.md @@ -1,14 +1,16 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -21,8 +23,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -32,7 +32,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -268,7 +268,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -282,82 +282,96 @@ Remember: the model is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .cursor/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .cursorrules. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.kiro/skills/adapt/SKILL.md b/.cursor/skills/impeccable/reference/adapt.md similarity index 90% rename from .kiro/skills/adapt/SKILL.md rename to .cursor/skills/impeccable/reference/adapt.md index 35b00e3f9..249653d4c 100644 --- a/.kiro/skills/adapt/SKILL.md +++ b/.cursor/skills/impeccable/reference/adapt.md @@ -1,14 +1,7 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 ---- +> **Additional context needed**: target platforms/devices and usage contexts. Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. --- @@ -194,4 +187,4 @@ Test thoroughly across contexts: - **Edge cases**: Very small screens (320px), very large screens (4K) - **Slow connections**: Test on throttled network -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.cursor/skills/animate/SKILL.md b/.cursor/skills/impeccable/reference/animate.md similarity index 91% rename from .cursor/skills/animate/SKILL.md rename to .cursor/skills/impeccable/reference/animate.md index 02294bc19..0186ce081 100644 --- a/.cursor/skills/animate/SKILL.md +++ b/.cursor/skills/impeccable/reference/animate.md @@ -1,14 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -170,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.pi/skills/audit/SKILL.md b/.cursor/skills/impeccable/reference/audit.md similarity index 80% rename from .pi/skills/audit/SKILL.md rename to .cursor/skills/impeccable/reference/audit.md index 7fddc7b21..206fafb5c 100644 --- a/.pi/skills/audit/SKILL.md +++ b/.cursor/skills/impeccable/reference/audit.md @@ -1,15 +1,3 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -64,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -107,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -126,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/audit` after fixes to see your score improve. +> Re-run `/impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. @@ -143,4 +131,4 @@ After presenting the summary, tell the user: - Forget to prioritize (everything can't be P0) - Report false positives without verification -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.gemini/skills/bolder/SKILL.md b/.cursor/skills/impeccable/reference/bolder.md similarity index 88% rename from .gemini/skills/bolder/SKILL.md rename to .cursor/skills/impeccable/reference/bolder.md index e276b4d0b..cb3481663 100644 --- a/.gemini/skills/bolder/SKILL.md +++ b/.cursor/skills/impeccable/reference/bolder.md @@ -1,14 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -34,7 +25,7 @@ If any of these are unclear from the codebase, ask the user directly to clarify **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -52,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -112,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.cursor/skills/clarify/SKILL.md b/.cursor/skills/impeccable/reference/clarify.md similarity index 89% rename from .cursor/skills/clarify/SKILL.md rename to .cursor/skills/impeccable/reference/clarify.md index 468541090..dc116e745 100644 --- a/.cursor/skills/clarify/SKILL.md +++ b/.cursor/skills/impeccable/reference/clarify.md @@ -1,14 +1,7 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 ---- +> **Additional context needed**: audience technical level and users' mental state in context. Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. --- @@ -178,4 +171,4 @@ Test that copy improvements work: - **Consistency**: Does it match terminology elsewhere? - **Tone**: Is it appropriate for the situation? -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.cursor/skills/critique/reference/cognitive-load.md b/.cursor/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .cursor/skills/critique/reference/cognitive-load.md rename to .cursor/skills/impeccable/reference/cognitive-load.md diff --git a/.cursor/skills/colorize/SKILL.md b/.cursor/skills/impeccable/reference/colorize.md similarity index 90% rename from .cursor/skills/colorize/SKILL.md rename to .cursor/skills/impeccable/reference/colorize.md index 509a71c06..a4ce5072e 100644 --- a/.cursor/skills/colorize/SKILL.md +++ b/.cursor/skills/impeccable/reference/colorize.md @@ -1,14 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -138,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.cursor/skills/impeccable/reference/craft.md b/.cursor/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.cursor/skills/impeccable/reference/craft.md +++ b/.cursor/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.cursor/skills/critique/SKILL.md b/.cursor/skills/impeccable/reference/critique.md similarity index 85% rename from .cursor/skills/critique/SKILL.md rename to .cursor/skills/impeccable/reference/critique.md index addaa3224..8a8ebeb35 100644 --- a/.cursor/skills/critique/SKILL.md +++ b/.cursor/skills/impeccable/reference/critique.md @@ -1,16 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -28,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -42,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -92,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -138,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `.cursorrules` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -174,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -194,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -207,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.cursor/skills/delight/SKILL.md b/.cursor/skills/impeccable/reference/delight.md similarity index 92% rename from .cursor/skills/delight/SKILL.md rename to .cursor/skills/impeccable/reference/delight.md index f323738dd..8a781e70e 100644 --- a/.cursor/skills/delight/SKILL.md +++ b/.cursor/skills/impeccable/reference/delight.md @@ -1,14 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -299,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.kiro/skills/distill/SKILL.md b/.cursor/skills/impeccable/reference/distill.md similarity index 91% rename from .kiro/skills/distill/SKILL.md rename to .cursor/skills/impeccable/reference/distill.md index e462d1c27..4f47dc0b4 100644 --- a/.kiro/skills/distill/SKILL.md +++ b/.cursor/skills/impeccable/reference/distill.md @@ -1,14 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -117,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.kiro/skills/harden/SKILL.md b/.cursor/skills/impeccable/reference/harden.md similarity index 96% rename from .kiro/skills/harden/SKILL.md rename to .cursor/skills/impeccable/reference/harden.md index 78eaa9881..af8b8a703 100644 --- a/.kiro/skills/harden/SKILL.md +++ b/.cursor/skills/impeccable/reference/harden.md @@ -1,9 +1,3 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 ---- - Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. ## Assess Hardening Needs @@ -384,4 +378,4 @@ Test thoroughly with edge cases: - **Errors**: Force API errors, test all error states - **Empty**: Remove all data, test empty states -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.cursor/skills/critique/reference/heuristics-scoring.md b/.cursor/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .cursor/skills/critique/reference/heuristics-scoring.md rename to .cursor/skills/impeccable/reference/heuristics-scoring.md diff --git a/.cursor/skills/layout/SKILL.md b/.cursor/skills/impeccable/reference/layout.md similarity index 89% rename from .cursor/skills/layout/SKILL.md rename to .cursor/skills/impeccable/reference/layout.md index e3355c314..cd6b778e7 100644 --- a/.cursor/skills/layout/SKILL.md +++ b/.cursor/skills/impeccable/reference/layout.md @@ -1,14 +1,5 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 ---- - Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak about the current spatial design: ## Plan Layout Improvements -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. Create a systematic plan: @@ -120,4 +111,4 @@ Create a systematic plan: - **Consistency**: Is the spacing system applied uniformly? - **Responsiveness**: Does the layout adapt gracefully across screen sizes? -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.kiro/skills/optimize/SKILL.md b/.cursor/skills/impeccable/reference/optimize.md similarity index 96% rename from .kiro/skills/optimize/SKILL.md rename to .cursor/skills/impeccable/reference/optimize.md index 6d82e1265..4abf575ec 100644 --- a/.kiro/skills/optimize/SKILL.md +++ b/.cursor/skills/impeccable/reference/optimize.md @@ -1,9 +1,3 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 ---- - Identify and fix performance issues to create faster, smoother user experiences. ## Assess Performance Issues @@ -261,4 +255,4 @@ Test that optimizations worked: - **No regressions**: Ensure functionality still works - **User perception**: Does it *feel* faster? -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.kiro/skills/overdrive/SKILL.md b/.cursor/skills/impeccable/reference/overdrive.md similarity index 78% rename from .kiro/skills/overdrive/SKILL.md rename to .cursor/skills/impeccable/reference/overdrive.md index 11bd0f4a8..d84a147dc 100644 --- a/.kiro/skills/overdrive/SKILL.md +++ b/.cursor/skills/impeccable/reference/overdrive.md @@ -1,9 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 ---- - Start your response with: ``` @@ -11,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -31,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -89,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -126,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -137,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.cursor/skills/critique/reference/personas.md b/.cursor/skills/impeccable/reference/personas.md similarity index 100% rename from .cursor/skills/critique/reference/personas.md rename to .cursor/skills/impeccable/reference/personas.md diff --git a/.kiro/skills/polish/SKILL.md b/.cursor/skills/impeccable/reference/polish.md similarity index 93% rename from .kiro/skills/polish/SKILL.md rename to .cursor/skills/impeccable/reference/polish.md index 4c84dc128..597c68847 100644 --- a/.kiro/skills/polish/SKILL.md +++ b/.cursor/skills/impeccable/reference/polish.md @@ -1,14 +1,4 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- +> **Additional context needed**: quality bar (MVP vs flagship). Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. @@ -219,4 +209,4 @@ After polishing, ensure code quality: - **Consolidate tokens**: If you introduced new values, check whether they should be tokens. - **Verify DRYness**: Look for duplication introduced during polishing and consolidate. -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.cursor/skills/quieter/SKILL.md b/.cursor/skills/impeccable/reference/quieter.md similarity index 89% rename from .cursor/skills/quieter/SKILL.md rename to .cursor/skills/impeccable/reference/quieter.md index ca17da694..a8ad41809 100644 --- a/.cursor/skills/quieter/SKILL.md +++ b/.cursor/skills/impeccable/reference/quieter.md @@ -1,14 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -98,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.pi/skills/shape/SKILL.md b/.cursor/skills/impeccable/reference/shape.md similarity index 80% rename from .pi/skills/shape/SKILL.md rename to .cursor/skills/impeccable/reference/shape.md index 6a94ee74c..0ae281943 100644 --- a/.pi/skills/shape/SKILL.md +++ b/.cursor/skills/impeccable/reference/shape.md @@ -1,24 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -56,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -91,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.cursor/skills/impeccable/reference/teach.md b/.cursor/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..952cf898a --- /dev/null +++ b/.cursor/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .cursorrules. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.pi/skills/typeset/SKILL.md b/.cursor/skills/impeccable/reference/typeset.md similarity index 87% rename from .pi/skills/typeset/SKILL.md rename to .cursor/skills/impeccable/reference/typeset.md index a5fff11a8..2e49ab6c0 100644 --- a/.pi/skills/typeset/SKILL.md +++ b/.cursor/skills/impeccable/reference/typeset.md @@ -1,14 +1,5 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 ---- - Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -45,7 +36,7 @@ Analyze what's weak or generic about the current type: ## Plan Typography Improvements -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. Create a systematic plan: @@ -111,4 +102,4 @@ Build a clear type scale: - **Performance**: Are web fonts loading efficiently without layout shift? - **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs b/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.cursor/skills/impeccable/scripts/command-metadata.json b/.cursor/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.cursor/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.cursor/skills/impeccable/scripts/pin.mjs b/.cursor/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.cursor/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.gemini/skills/impeccable/SKILL.md b/.gemini/skills/impeccable/SKILL.md index 51433d569..49b489705 100644 --- a/.gemini/skills/impeccable/SKILL.md +++ b/.gemini/skills/impeccable/SKILL.md @@ -1,13 +1,15 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -20,8 +22,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -31,7 +31,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -267,7 +267,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -281,82 +281,96 @@ Remember: Gemini is capable of extraordinary creative work. Don't hold back. Sho --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .gemini/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to GEMINI.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.gemini/skills/impeccable/reference/adapt.md b/.gemini/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.gemini/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.pi/skills/animate/SKILL.md b/.gemini/skills/impeccable/reference/animate.md similarity index 91% rename from .pi/skills/animate/SKILL.md rename to .gemini/skills/impeccable/reference/animate.md index 02294bc19..0186ce081 100644 --- a/.pi/skills/animate/SKILL.md +++ b/.gemini/skills/impeccable/reference/animate.md @@ -1,14 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -170,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.gemini/skills/audit/SKILL.md b/.gemini/skills/impeccable/reference/audit.md similarity index 80% rename from .gemini/skills/audit/SKILL.md rename to .gemini/skills/impeccable/reference/audit.md index 7fddc7b21..206fafb5c 100644 --- a/.gemini/skills/audit/SKILL.md +++ b/.gemini/skills/impeccable/reference/audit.md @@ -1,15 +1,3 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -64,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -107,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -126,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/audit` after fixes to see your score improve. +> Re-run `/impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. @@ -143,4 +131,4 @@ After presenting the summary, tell the user: - Forget to prioritize (everything can't be P0) - Report false positives without verification -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.kiro/skills/bolder/SKILL.md b/.gemini/skills/impeccable/reference/bolder.md similarity index 88% rename from .kiro/skills/bolder/SKILL.md rename to .gemini/skills/impeccable/reference/bolder.md index e276b4d0b..cb3481663 100644 --- a/.kiro/skills/bolder/SKILL.md +++ b/.gemini/skills/impeccable/reference/bolder.md @@ -1,14 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -34,7 +25,7 @@ If any of these are unclear from the codebase, ask the user directly to clarify **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -52,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -112,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.gemini/skills/impeccable/reference/clarify.md b/.gemini/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.gemini/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.gemini/skills/critique/reference/cognitive-load.md b/.gemini/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .gemini/skills/critique/reference/cognitive-load.md rename to .gemini/skills/impeccable/reference/cognitive-load.md diff --git a/.pi/skills/colorize/SKILL.md b/.gemini/skills/impeccable/reference/colorize.md similarity index 90% rename from .pi/skills/colorize/SKILL.md rename to .gemini/skills/impeccable/reference/colorize.md index 509a71c06..a4ce5072e 100644 --- a/.pi/skills/colorize/SKILL.md +++ b/.gemini/skills/impeccable/reference/colorize.md @@ -1,14 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -138,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.gemini/skills/impeccable/reference/craft.md b/.gemini/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.gemini/skills/impeccable/reference/craft.md +++ b/.gemini/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.gemini/skills/critique/SKILL.md b/.gemini/skills/impeccable/reference/critique.md similarity index 85% rename from .gemini/skills/critique/SKILL.md rename to .gemini/skills/impeccable/reference/critique.md index e7f74e8f1..aa3c4a64a 100644 --- a/.gemini/skills/critique/SKILL.md +++ b/.gemini/skills/impeccable/reference/critique.md @@ -1,16 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -28,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -42,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -92,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -138,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `GEMINI.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -174,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -194,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -207,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.gemini/skills/delight/SKILL.md b/.gemini/skills/impeccable/reference/delight.md similarity index 92% rename from .gemini/skills/delight/SKILL.md rename to .gemini/skills/impeccable/reference/delight.md index f323738dd..8a781e70e 100644 --- a/.gemini/skills/delight/SKILL.md +++ b/.gemini/skills/impeccable/reference/delight.md @@ -1,14 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -299,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.pi/skills/distill/SKILL.md b/.gemini/skills/impeccable/reference/distill.md similarity index 91% rename from .pi/skills/distill/SKILL.md rename to .gemini/skills/impeccable/reference/distill.md index e462d1c27..4f47dc0b4 100644 --- a/.pi/skills/distill/SKILL.md +++ b/.gemini/skills/impeccable/reference/distill.md @@ -1,14 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -117,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.gemini/skills/impeccable/reference/harden.md b/.gemini/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.gemini/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.gemini/skills/critique/reference/heuristics-scoring.md b/.gemini/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .gemini/skills/critique/reference/heuristics-scoring.md rename to .gemini/skills/impeccable/reference/heuristics-scoring.md diff --git a/.gemini/skills/impeccable/reference/layout.md b/.gemini/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.gemini/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.gemini/skills/impeccable/reference/optimize.md b/.gemini/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.gemini/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.gemini/skills/overdrive/SKILL.md b/.gemini/skills/impeccable/reference/overdrive.md similarity index 78% rename from .gemini/skills/overdrive/SKILL.md rename to .gemini/skills/impeccable/reference/overdrive.md index 11bd0f4a8..d84a147dc 100644 --- a/.gemini/skills/overdrive/SKILL.md +++ b/.gemini/skills/impeccable/reference/overdrive.md @@ -1,9 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 ---- - Start your response with: ``` @@ -11,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -31,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -89,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -126,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -137,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.gemini/skills/critique/reference/personas.md b/.gemini/skills/impeccable/reference/personas.md similarity index 100% rename from .gemini/skills/critique/reference/personas.md rename to .gemini/skills/impeccable/reference/personas.md diff --git a/.gemini/skills/impeccable/reference/polish.md b/.gemini/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.gemini/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.pi/skills/quieter/SKILL.md b/.gemini/skills/impeccable/reference/quieter.md similarity index 89% rename from .pi/skills/quieter/SKILL.md rename to .gemini/skills/impeccable/reference/quieter.md index ca17da694..a8ad41809 100644 --- a/.pi/skills/quieter/SKILL.md +++ b/.gemini/skills/impeccable/reference/quieter.md @@ -1,14 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -98,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.gemini/skills/shape/SKILL.md b/.gemini/skills/impeccable/reference/shape.md similarity index 80% rename from .gemini/skills/shape/SKILL.md rename to .gemini/skills/impeccable/reference/shape.md index 6a94ee74c..0ae281943 100644 --- a/.gemini/skills/shape/SKILL.md +++ b/.gemini/skills/impeccable/reference/shape.md @@ -1,24 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -56,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -91,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.gemini/skills/impeccable/reference/teach.md b/.gemini/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..b081ec456 --- /dev/null +++ b/.gemini/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to GEMINI.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.gemini/skills/impeccable/reference/typeset.md b/.gemini/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.gemini/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.gemini/skills/impeccable/scripts/cleanup-deprecated.mjs b/.gemini/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.gemini/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.gemini/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.gemini/skills/impeccable/scripts/command-metadata.json b/.gemini/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.gemini/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.gemini/skills/impeccable/scripts/pin.mjs b/.gemini/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.gemini/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.gitignore b/.gitignore index 11df7dc33..c9ddacd18 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,11 @@ Thumbs.db # IDE .vscode/ .idea/ + +# Claude Code local state .claude/projects/ +.claude/scheduled_tasks.lock +.claude/settings.local.json # Environment .env @@ -34,7 +38,12 @@ extension/detector/ evals/ # Generated sub-pages (built from source/skills + content/site at build time) -public/skills/ +public/docs/ public/anti-patterns/ public/tutorials/ public/visual-mode/ + +# Note: harness skill directories (.claude/skills/, .cursor/skills/, etc.) +# are intentionally tracked. npx skills reads them from this repo at install +# time, and they enable clean submodule use. Run `bun run build` to refresh +# them after editing source/skills/. diff --git a/.kiro/skills/impeccable/SKILL.md b/.kiro/skills/impeccable/SKILL.md index 5fe89dbc3..80efc2f9a 100644 --- a/.kiro/skills/impeccable/SKILL.md +++ b/.kiro/skills/impeccable/SKILL.md @@ -1,14 +1,16 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -21,8 +23,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -32,7 +32,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -268,7 +268,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -282,82 +282,96 @@ Remember: Claude is capable of extraordinary creative work. Don't hold back. Sho --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .kiro/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .kiro/settings.json. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.kiro/skills/impeccable/reference/adapt.md b/.kiro/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.kiro/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.kiro/skills/impeccable/reference/animate.md b/.kiro/skills/impeccable/reference/animate.md new file mode 100644 index 000000000..0186ce081 --- /dev/null +++ b/.kiro/skills/impeccable/reference/animate.md @@ -0,0 +1,166 @@ +> **Additional context needed**: performance constraints. + +Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. + + +--- + +## Assess Animation Opportunities + +Analyze where motion would improve the experience: + +1. **Identify static areas**: + - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) + - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) + - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious + - **Lack of delight**: Functional but joyless interactions + - **Missed guidance**: Opportunities to direct attention or explain behavior + +2. **Understand the context**: + - What's the personality? (Playful vs serious, energetic vs calm) + - What's the performance budget? (Mobile-first? Complex page?) + - Who's the audience? (Motion-sensitive users? Power users who want speed?) + - What matters most? (One hero animation vs many micro-interactions?) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. + +## Plan Animation Strategy + +Create a purposeful animation plan: + +- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) +- **Feedback layer**: Which interactions need acknowledgment? +- **Transition layer**: Which state changes need smoothing? +- **Delight layer**: Where can we surprise and delight? + +**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. + +## Implement Animations + +Add motion systematically across these categories: + +### Entrance Animations +- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations +- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) +- **Content reveals**: Scroll-triggered animations using intersection observer +- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management + +### Micro-interactions +- **Button feedback**: + - Hover: Subtle scale (1.02-1.05), color shift, shadow increase + - Click: Quick scale down then up (0.95 → 1), ripple effect + - Loading: Spinner or pulse state +- **Form interactions**: + - Input focus: Border color transition, slight scale or glow + - Validation: Shake on error, check mark on success, smooth color transitions +- **Toggle switches**: Smooth slide + color transition (200-300ms) +- **Checkboxes/radio**: Check mark animation, ripple effect +- **Like/favorite**: Scale + rotation, particle effects, color transition + +### State Transitions +- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) +- **Expand/collapse**: Height transition with overflow handling, icon rotation +- **Loading states**: Skeleton screen fades, spinner animations, progress bars +- **Success/error**: Color transitions, icon animations, gentle scale pulse +- **Enable/disable**: Opacity transitions, cursor changes + +### Navigation & Flow +- **Page transitions**: Crossfade between routes, shared element transitions +- **Tab switching**: Slide indicator, content fade/slide +- **Carousel/slider**: Smooth transforms, snap points, momentum +- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators + +### Feedback & Guidance +- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights +- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning +- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation +- **Focus flow**: Highlight path through form or workflow + +### Delight Moments +- **Empty states**: Subtle floating animations on illustrations +- **Completed actions**: Confetti, check mark flourish, success celebrations +- **Easter eggs**: Hidden interactions for discovery +- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches + +## Technical Implementation + +Use appropriate techniques for each animation: + +### Timing & Easing + +**Durations by purpose:** +- **100-150ms**: Instant feedback (button press, toggle) +- **200-300ms**: State changes (hover, menu open) +- **300-500ms**: Layout changes (accordion, modal) +- **500-800ms**: Entrance animations (page load) + +**Easing curves (use these, not CSS defaults):** +```css +/* Recommended - natural deceleration */ +--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ +--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ +--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ + +/* AVOID - feel dated and tacky */ +/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ +/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ +``` + +**Exit animations are faster than entrances.** Use ~75% of enter duration. + +### CSS Animations +```css +/* Prefer for simple, declarative animations */ +- transitions for state changes +- @keyframes for complex sequences +- transform + opacity only (GPU-accelerated) +``` + +### JavaScript Animation +```javascript +/* Use for complex, interactive animations */ +- Web Animations API for programmatic control +- Framer Motion for React +- GSAP for complex sequences +``` + +### Performance +- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties +- **will-change**: Add sparingly for known expensive animations +- **Reduce paint**: Minimize repaints, use `contain` where appropriate +- **Monitor FPS**: Ensure 60fps on target devices + +### Accessibility +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**NEVER**: +- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself +- Animate layout properties (width, height, top, left)—use transform instead +- Use durations over 500ms for feedback—it feels laggy +- Animate without purpose—every animation needs a reason +- Ignore `prefers-reduced-motion`—this is an accessibility violation +- Animate everything—animation fatigue makes interfaces feel exhausting +- Block interaction during animations unless intentional + +## Verify Quality + +Test animations thoroughly: + +- **Smooth at 60fps**: No jank on target devices +- **Feels natural**: Easing curves feel organic, not robotic +- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) +- **Reduced motion works**: Animations disabled or simplified appropriately +- **Doesn't block**: Users can interact during/after animations +- **Adds value**: Makes interface clearer or more delightful + +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.kiro/skills/impeccable/reference/audit.md b/.kiro/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.kiro/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.kiro/skills/impeccable/reference/bolder.md b/.kiro/skills/impeccable/reference/bolder.md new file mode 100644 index 000000000..cb3481663 --- /dev/null +++ b/.kiro/skills/impeccable/reference/bolder.md @@ -0,0 +1,106 @@ +Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. + + +--- + +## Assess Current State + +Analyze what makes the design feel too safe or boring: + +1. **Identify weakness sources**: + - **Generic choices**: System fonts, basic colors, standard layouts + - **Timid scale**: Everything is medium-sized with no drama + - **Low contrast**: Everything has similar visual weight + - **Static**: No motion, no energy, no life + - **Predictable**: Standard patterns with no surprises + - **Flat hierarchy**: Nothing stands out or commands attention + +2. **Understand the context**: + - What's the brand personality? (How far can we push?) + - What's the purpose? (Marketing can be bolder than financial dashboards) + - Who's the audience? (What will resonate?) + - What are the constraints? (Brand guidelines, accessibility, performance) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. + +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." + +## Plan Amplification + +Create a strategy to increase impact while maintaining coherence: + +- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) +- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. +- **Risk budget**: How experimental can we be? Push boundaries within constraints. +- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) + +**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. + +## Amplify the Design + +Systematically increase impact across these dimensions: + +### Typography Amplification +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) +- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) +- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 +- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) + +### Color Intensification +- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) +- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop +- **Dominant color strategy**: Let one bold color own 60% of the design +- **Sharp accents**: High-contrast accent colors that pop +- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette +- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) + +### Spatial Drama +- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings +- **Break the grid**: Let hero elements escape containers and cross boundaries +- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry +- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) +- **Overlap**: Layer elements intentionally for depth + +### Visual Effects +- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) +- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) +- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) +- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) +- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand + +### Motion & Animation +- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays +- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences +- **Micro-interactions**: Satisfying hover effects, click feedback, state changes +- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) + +### Composition Boldness +- **Hero moments**: Create clear focal points with dramatic treatment +- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements +- **Full-bleed elements**: Use full viewport width/height for impact +- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits + +**NEVER**: +- Add effects randomly without purpose (chaos ≠ bold) +- Sacrifice readability for aesthetics (body text must be readable) +- Make everything bold (then nothing is bold - need contrast) +- Ignore accessibility (bold design must still meet WCAG standards) +- Overwhelm with motion (animation fatigue is real) +- Copy trendy aesthetics blindly (bold means distinctive, not derivative) + +## Verify Quality + +Ensure amplification maintains usability and coherence: + +- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. +- **Still functional**: Can users accomplish tasks without distraction? +- **Coherent**: Does everything feel intentional and unified? +- **Memorable**: Will users remember this experience? +- **Performant**: Do all these effects run smoothly? +- **Accessible**: Does it still meet accessibility standards? + +**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." + +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.kiro/skills/impeccable/reference/clarify.md b/.kiro/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.kiro/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.kiro/skills/critique/reference/cognitive-load.md b/.kiro/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .kiro/skills/critique/reference/cognitive-load.md rename to .kiro/skills/impeccable/reference/cognitive-load.md diff --git a/.kiro/skills/impeccable/reference/colorize.md b/.kiro/skills/impeccable/reference/colorize.md new file mode 100644 index 000000000..a4ce5072e --- /dev/null +++ b/.kiro/skills/impeccable/reference/colorize.md @@ -0,0 +1,134 @@ +> **Additional context needed**: existing brand colors. + +Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. + + +--- + +## Assess Color Opportunity + +Analyze the current state and identify opportunities: + +1. **Understand current state**: + - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? + - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? + - **Context**: What's appropriate for this domain and audience? + - **Brand**: Are there existing brand colors we should use? + +2. **Identify where color adds value**: + - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) + - **Hierarchy**: Drawing attention to important elements + - **Categorization**: Different sections, types, or states + - **Emotional tone**: Warmth, energy, trust, creativity + - **Wayfinding**: Helping users navigate and understand structure + - **Delight**: Moments of visual interest and personality + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. + +## Plan Color Strategy + +Create a purposeful color introduction plan: + +- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) +- **Dominant color**: Which color owns 60% of colored elements? +- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) +- **Application strategy**: Where does each color appear and why? + +**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. + +## Introduce Color Strategically + +Add color systematically across these dimensions: + +### Semantic Color +- **State indicators**: + - Success: Green tones (emerald, forest, mint) + - Error: Red/pink tones (rose, crimson, coral) + - Warning: Orange/amber tones + - Info: Blue tones (sky, ocean, indigo) + - Neutral: Gray/slate for inactive states + +- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) +- **Progress indicators**: Colored bars, rings, or charts showing completion or health + +### Accent Color Application +- **Primary actions**: Color the most important buttons/CTAs +- **Links**: Add color to clickable text (maintain accessibility) +- **Icons**: Colorize key icons for recognition and personality +- **Headers/titles**: Add color to section headers or key labels +- **Hover states**: Introduce color on interaction + +### Background & Surfaces +- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) +- **Colored sections**: Use subtle background colors to separate areas +- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) +- **Cards & surfaces**: Tint cards or surfaces slightly for warmth + +**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. + +### Data Visualization +- **Charts & graphs**: Use color to encode categories or values +- **Heatmaps**: Color intensity shows density or importance +- **Comparison**: Color coding for different datasets or timeframes + +### Borders & Accents +- **Accent borders**: Add colored left/top borders to cards or sections +- **Underlines**: Color underlines for emphasis or active states +- **Dividers**: Subtle colored dividers instead of gray lines +- **Focus rings**: Colored focus indicators matching brand + +### Typography Color +- **Colored headings**: Use brand colors for section headings (maintain contrast) +- **Highlight text**: Color for emphasis or categories +- **Labels & tags**: Small colored labels for metadata or categories + +### Decorative Elements +- **Illustrations**: Add colored illustrations or icons +- **Shapes**: Geometric shapes in brand colors as background elements +- **Gradients**: Colorful gradient overlays or mesh backgrounds +- **Blobs/organic shapes**: Soft colored shapes for visual interest + +## Balance & Refinement + +Ensure color addition improves rather than overwhelms: + +### Maintain Hierarchy +- **Dominant color** (60%): Primary brand color or most used accent +- **Secondary color** (30%): Supporting color for variety +- **Accent color** (10%): High contrast for key moments +- **Neutrals** (remaining): Gray/black/white for structure + +### Accessibility +- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) +- **Don't rely on color alone**: Use icons, labels, or patterns alongside color +- **Test for color blindness**: Verify red/green combinations work for all users + +### Cohesion +- **Consistent palette**: Use colors from defined palette, not arbitrary choices +- **Systematic application**: Same color meanings throughout (green always = success) +- **Temperature consistency**: Warm palette stays warm, cool stays cool + +**NEVER**: +- Use every color in the rainbow (choose 2-4 colors beyond neutrals) +- Apply color randomly without semantic meaning +- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead +- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication +- Use pure black (`#000`) or pure white (`#fff`) for large areas +- Violate WCAG contrast requirements +- Use color as the only indicator (accessibility issue) +- Make everything colorful (defeats the purpose) +- Default to purple-blue gradients (AI slop aesthetic) + +## Verify Color Addition + +Test that colorization improves the experience: + +- **Better hierarchy**: Does color guide attention appropriately? +- **Clearer meaning**: Does color help users understand states/categories? +- **More engaging**: Does the interface feel warmer and more inviting? +- **Still accessible**: Do all color combinations meet WCAG standards? +- **Not overwhelming**: Is color balanced and purposeful? + +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.kiro/skills/impeccable/reference/craft.md b/.kiro/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.kiro/skills/impeccable/reference/craft.md +++ b/.kiro/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.kiro/skills/critique/SKILL.md b/.kiro/skills/impeccable/reference/critique.md similarity index 85% rename from .kiro/skills/critique/SKILL.md rename to .kiro/skills/impeccable/reference/critique.md index 4299a6156..2d9f41a65 100644 --- a/.kiro/skills/critique/SKILL.md +++ b/.kiro/skills/impeccable/reference/critique.md @@ -1,16 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -28,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -42,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -92,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -138,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `.kiro/settings.json` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -174,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -194,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -207,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.kiro/skills/impeccable/reference/delight.md b/.kiro/skills/impeccable/reference/delight.md new file mode 100644 index 000000000..8a781e70e --- /dev/null +++ b/.kiro/skills/impeccable/reference/delight.md @@ -0,0 +1,295 @@ +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). + +Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. + + +--- + +## Assess Delight Opportunities + +Identify where delight would enhance (not distract from) the experience: + +1. **Find natural delight moments**: + - **Success states**: Completed actions (save, send, publish) + - **Empty states**: First-time experiences, onboarding + - **Loading states**: Waiting periods that could be entertaining + - **Achievements**: Milestones, streaks, completions + - **Interactions**: Hover states, clicks, drags + - **Errors**: Softening frustrating moments + - **Easter eggs**: Hidden discoveries for curious users + +2. **Understand the context**: + - What's the brand personality? (Playful? Professional? Quirky? Elegant?) + - Who's the audience? (Tech-savvy? Creative? Corporate?) + - What's the emotional context? (Accomplishment? Exploration? Frustration?) + - What's appropriate? (Banking app ≠ gaming app) + +3. **Define delight strategy**: + - **Subtle sophistication**: Refined micro-interactions (luxury brands) + - **Playful personality**: Whimsical illustrations and copy (consumer apps) + - **Helpful surprises**: Anticipating needs before users ask (productivity tools) + - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. + +## Delight Principles + +Follow these guidelines: + +### Delight Amplifies, Never Blocks +- Delight moments should be quick (< 1 second) +- Never delay core functionality for delight +- Make delight skippable or subtle +- Respect user's time and task focus + +### Surprise and Discovery +- Hide delightful details for users to discover +- Reward exploration and curiosity +- Don't announce every delight moment +- Let users share discoveries with others + +### Appropriate to Context +- Match delight to emotional moment (celebrate success, empathize with errors) +- Respect the user's state (don't be playful during critical errors) +- Match brand personality and audience expectations +- Cultural sensitivity (what's delightful varies by culture) + +### Compound Over Time +- Delight should remain fresh with repeated use +- Vary responses (not same animation every time) +- Reveal deeper layers with continued use +- Build anticipation through patterns + +## Delight Techniques + +Add personality and joy through these methods: + +### Micro-interactions & Animation + +**Button delight**: +```css +/* Satisfying button press */ +.button { + transition: transform 0.1s, box-shadow 0.1s; +} +.button:active { + transform: translateY(2px); + box-shadow: 0 2px 4px rgba(0,0,0,0.2); +} + +/* Ripple effect on click */ +/* Smooth lift on hover */ +.button:hover { + transform: translateY(-2px); + transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ +} +``` + +**Loading delight**: +- Playful loading animations (not just spinners) +- Personality in loading messages (write product-specific ones, not generic AI filler) +- Progress indication with encouraging messages +- Skeleton screens with subtle animations + +**Success animations**: +- Checkmark draw animation +- Confetti burst for major achievements +- Gentle scale + fade for confirmation +- Satisfying sound effects (subtle) + +**Hover surprises**: +- Icons that animate on hover +- Color shifts or glow effects +- Tooltip reveals with personality +- Cursor changes (custom cursors for branded experiences) + +### Personality in Copy + +**Playful error messages**: +``` +"Error 404" +"This page is playing hide and seek. (And winning)" + +"Connection failed" +"Looks like the internet took a coffee break. Want to retry?" +``` + +**Encouraging empty states**: +``` +"No projects" +"Your canvas awaits. Create something amazing." + +"No messages" +"Inbox zero! You're crushing it today." +``` + +**Playful labels & tooltips**: +``` +"Delete" +"Send to void" (for playful brand) + +"Help" +"Rescue me" (tooltip) +``` + +**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. + +### Illustrations & Visual Personality + +**Custom illustrations**: +- Empty state illustrations (not stock icons) +- Error state illustrations (friendly monsters, quirky characters) +- Loading state illustrations (animated characters) +- Success state illustrations (celebrations) + +**Icon personality**: +- Custom icon set matching brand personality +- Animated icons (subtle motion on hover/click) +- Illustrative icons (more detailed than generic) +- Consistent style across all icons + +**Background effects**: +- Subtle particle effects +- Gradient mesh backgrounds +- Geometric patterns +- Parallax depth +- Time-of-day themes (morning vs night) + +### Satisfying Interactions + +**Drag and drop delight**: +- Lift effect on drag (shadow, scale) +- Snap animation when dropped +- Satisfying placement sound +- Undo toast ("Dropped in wrong place? [Undo]") + +**Toggle switches**: +- Smooth slide with spring physics +- Color transition +- Haptic feedback on mobile +- Optional sound effect + +**Progress & achievements**: +- Streak counters with celebratory milestones +- Progress bars that "celebrate" at 100% +- Badge unlocks with animation +- Playful stats ("You're on fire! 5 days in a row") + +**Form interactions**: +- Input fields that animate on focus +- Checkboxes with a satisfying scale pulse when checked +- Success state that celebrates valid input +- Auto-grow textareas + +### Sound Design + +**Subtle audio cues** (when appropriate): +- Notification sounds (distinctive but not annoying) +- Success sounds (satisfying "ding") +- Error sounds (empathetic, not harsh) +- Typing sounds for chat/messaging +- Ambient background audio (very subtle) + +**IMPORTANT**: +- Respect system sound settings +- Provide mute option +- Keep volumes quiet (subtle cues, not alarms) +- Don't play on every interaction (sound fatigue is real) + +### Easter Eggs & Hidden Delights + +**Discovery rewards**: +- Konami code unlocks special theme +- Hidden keyboard shortcuts (Cmd+K for special features) +- Hover reveals on logos or illustrations +- Alt text jokes on images (for screen reader users too!) +- Console messages for developers ("Like what you see? We're hiring!") + +**Seasonal touches**: +- Holiday themes (subtle, tasteful) +- Seasonal color shifts +- Weather-based variations +- Time-based changes (dark at night, light during day) + +**Contextual personality**: +- Different messages based on time of day +- Responses to specific user actions +- Randomized variations (not same every time) +- Progressive reveals with continued use + +### Loading & Waiting States + +**Make waiting engaging**: +- Interesting loading messages that rotate +- Progress bars with personality +- Mini-games during long loads +- Fun facts or tips while waiting +- Countdown with encouraging messages + +``` +Loading messages — write ones specific to your product, not generic AI filler: +- "Crunching your latest numbers..." +- "Syncing with your team's changes..." +- "Preparing your dashboard..." +- "Checking for updates since yesterday..." +``` + +**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. + +### Celebration Moments + +**Success celebrations**: +- Confetti for major milestones +- Animated checkmarks for completions +- Progress bar celebrations at 100% +- "Achievement unlocked" style notifications +- Personalized messages ("You published your 10th article!") + +**Milestone recognition**: +- First-time actions get special treatment +- Streak tracking and celebration +- Progress toward goals +- Anniversary celebrations + +## Implementation Patterns + +**Animation libraries**: +- Framer Motion (React) +- GSAP (universal) +- Lottie (After Effects animations) +- Canvas confetti (party effects) + +**Sound libraries**: +- Howler.js (audio management) +- Use-sound (React hook) + +**Physics libraries**: +- React Spring (spring physics) +- Popmotion (animation primitives) + +**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. + +**NEVER**: +- Delay core functionality for delight +- Force users through delightful moments (make skippable) +- Use delight to hide poor UX +- Overdo it (less is more) +- Ignore accessibility (animate responsibly, provide alternatives) +- Make every interaction delightful (special moments should be special) +- Sacrifice performance for delight +- Be inappropriate for context (read the room) + +## Verify Delight Quality + +Test that delight actually delights: + +- **User reactions**: Do users smile? Share screenshots? +- **Doesn't annoy**: Still pleasant after 100th time? +- **Doesn't block**: Can users opt out or skip? +- **Performant**: No jank, no slowdown +- **Appropriate**: Matches brand and context +- **Accessible**: Works with reduced motion, screen readers + +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.kiro/skills/impeccable/reference/distill.md b/.kiro/skills/impeccable/reference/distill.md new file mode 100644 index 000000000..4f47dc0b4 --- /dev/null +++ b/.kiro/skills/impeccable/reference/distill.md @@ -0,0 +1,111 @@ +Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. + + +--- + +## Assess Current State + +Analyze what makes the design feel complex or cluttered: + +1. **Identify complexity sources**: + - **Too many elements**: Competing buttons, redundant information, visual clutter + - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose + - **Information overload**: Everything visible at once, no progressive disclosure + - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations + - **Confusing hierarchy**: Unclear what matters most + - **Feature creep**: Too many options, actions, or paths forward + +2. **Find the essence**: + - What's the primary user goal? (There should be ONE) + - What's actually necessary vs nice-to-have? + - What can be removed, hidden, or combined? + - What's the 20% that delivers 80% of value? + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. + +## Plan Simplification + +Create a ruthless editing strategy: + +- **Core purpose**: What's the ONE thing this should accomplish? +- **Essential elements**: What's truly necessary to achieve that purpose? +- **Progressive disclosure**: What can be hidden until needed? +- **Consolidation opportunities**: What can be combined or integrated? + +**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. + +## Simplify the Design + +Systematically remove complexity across these dimensions: + +### Information Architecture +- **Reduce scope**: Remove secondary actions, optional features, redundant information +- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) +- **Combine related actions**: Merge similar buttons, consolidate forms, group related content +- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden +- **Remove redundancy**: If it's said elsewhere, don't repeat it here + +### Visual Simplification +- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors +- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights +- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function +- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards +- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead +- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps + +### Layout Simplification +- **Linear flow**: Replace complex grids with simple vertical flow where possible +- **Remove sidebars**: Move secondary content inline or hide it +- **Full-width**: Use available space generously instead of complex multi-column layouts +- **Consistent alignment**: Pick left or center, stick with it +- **Generous white space**: Let content breathe, don't pack everything tight + +### Interaction Simplification +- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) +- **Smart defaults**: Make common choices automatic, only ask when necessary +- **Inline actions**: Replace modal flows with inline editing where possible +- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? +- **Clear CTAs**: ONE obvious next step, not five competing actions + +### Content Simplification +- **Shorter copy**: Cut every sentence in half, then do it again +- **Active voice**: "Save changes" not "Changes will be saved" +- **Remove jargon**: Plain language always wins +- **Scannable structure**: Short paragraphs, bullet points, clear headings +- **Essential information only**: Remove marketing fluff, legalese, hedging +- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once + +### Code Simplification +- **Remove unused code**: Dead CSS, unused components, orphaned files +- **Flatten component trees**: Reduce nesting depth +- **Consolidate styles**: Merge similar styles, use utilities consistently +- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? + +**NEVER**: +- Remove necessary functionality (simplicity ≠ feature-less) +- Sacrifice accessibility for simplicity (clear labels and ARIA still required) +- Make things so simple they're unclear (mystery ≠ minimalism) +- Remove information users need to make decisions +- Eliminate hierarchy completely (some things should stand out) +- Oversimplify complex domains (match complexity to actual task complexity) + +## Verify Simplification + +Ensure simplification improves usability: + +- **Faster task completion**: Can users accomplish goals more quickly? +- **Reduced cognitive load**: Is it easier to understand what to do? +- **Still complete**: Are all necessary features still accessible? +- **Clearer hierarchy**: Is it obvious what matters most? +- **Better performance**: Does simpler design load faster? + +## Document Removed Complexity + +If you removed features or options: +- Document why they were removed +- Consider if they need alternative access points +- Note any user feedback to monitor + +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.kiro/skills/impeccable/reference/harden.md b/.kiro/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.kiro/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.kiro/skills/critique/reference/heuristics-scoring.md b/.kiro/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .kiro/skills/critique/reference/heuristics-scoring.md rename to .kiro/skills/impeccable/reference/heuristics-scoring.md diff --git a/.kiro/skills/impeccable/reference/layout.md b/.kiro/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.kiro/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.kiro/skills/impeccable/reference/optimize.md b/.kiro/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.kiro/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.kiro/skills/impeccable/reference/overdrive.md b/.kiro/skills/impeccable/reference/overdrive.md new file mode 100644 index 000000000..d84a147dc --- /dev/null +++ b/.kiro/skills/impeccable/reference/overdrive.md @@ -0,0 +1,130 @@ +Start your response with: + +``` +──────────── ⚡ OVERDRIVE ───────────── +》》》 Entering overdrive mode... +``` + +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. + +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. + +### Propose Before Building + +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: + +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). +3. Only proceed with the direction the user confirms. + +Skipping this step risks building something embarrassing that needs to be thrown away. + +### Iterate with Browser Automation + +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. + +--- + +## Assess What "Extraordinary" Means Here + +The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** + +### For visual/marketing surfaces +Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. + +### For functional UI +Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. + +### For performance-critical UI +The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. + +### For data-heavy interfaces +Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. + +**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. + +## The Toolkit + +Organized by what you're trying to achieve, not by technology name. + +### Make transitions feel cinematic +- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. +- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes +- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. + +### Tie animation to scroll position +- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) + +### Render beyond CSS +- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. +- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. +- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. +- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. + +### Make data feel alive +- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. +- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. +- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. + +### Animate complex properties +- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. +- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. + +### Push performance boundaries +- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. +- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. +- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. + +### Interact with the device +- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. +- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. + +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. + +## Implement with Discipline + +### Progressive enhancement is non-negotiable + +Every technique must degrade gracefully. The experience without the enhancement must still be good. + +```css +@supports (animation-timeline: scroll()) { + .hero { animation-timeline: scroll(); } +} +``` + +```javascript +if ('gpu' in navigator) { /* WebGPU */ } +else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } +/* CSS-only fallback must still look good */ +``` + +### Performance rules + +- Target 60fps. If dropping below 50, simplify. +- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. +- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. +- Pause off-screen rendering. Kill what you can't see. +- Test on real mid-range devices, not just your development machine. + +### Polish is the difference + +The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. + +**NEVER**: +- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion +- Ship effects that cause jank on mid-range devices +- Use bleeding-edge APIs without a functional fallback +- Add sound without explicit user opt-in +- Use technical ambition to mask weak design fundamentals; fix those first with other commands +- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise + +## Verify the Result + +- **The wow test**: Show it to someone who hasn't seen it. Do they react? +- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? +- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? +- **The accessibility test**: Enable reduced motion. Still beautiful? +- **The context test**: Does this make sense for THIS brand and audience? + +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.kiro/skills/critique/reference/personas.md b/.kiro/skills/impeccable/reference/personas.md similarity index 100% rename from .kiro/skills/critique/reference/personas.md rename to .kiro/skills/impeccable/reference/personas.md diff --git a/.kiro/skills/impeccable/reference/polish.md b/.kiro/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.kiro/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.kiro/skills/impeccable/reference/quieter.md b/.kiro/skills/impeccable/reference/quieter.md new file mode 100644 index 000000000..a8ad41809 --- /dev/null +++ b/.kiro/skills/impeccable/reference/quieter.md @@ -0,0 +1,92 @@ +Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. + + +--- + +## Assess Current State + +Analyze what makes the design feel too intense: + +1. **Identify intensity sources**: + - **Color saturation**: Overly bright or saturated colors + - **Contrast extremes**: Too much high-contrast juxtaposition + - **Visual weight**: Too many bold, heavy elements competing + - **Animation excess**: Too much motion or overly dramatic effects + - **Complexity**: Too many visual elements, patterns, or decorations + - **Scale**: Everything is large and loud with no hierarchy + +2. **Understand the context**: + - What's the purpose? (Marketing vs tool vs reading experience) + - Who's the audience? (Some contexts need energy) + - What's working? (Don't throw away good ideas) + - What's the core message? (Preserve what matters) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. + +## Plan Refinement + +Create a strategy to reduce intensity while maintaining impact: + +- **Color approach**: Desaturate or shift to more sophisticated tones? +- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? +- **Simplification approach**: What can be removed entirely? +- **Sophistication approach**: How can we signal quality through restraint? + +**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. + +## Refine the Design + +Systematically reduce intensity across these dimensions: + +### Color Refinement +- **Reduce saturation**: Shift from fully saturated to 70-85% saturation +- **Soften palette**: Replace bright colors with muted, sophisticated tones +- **Reduce color variety**: Use fewer colors more thoughtfully +- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) +- **Gentler contrasts**: High contrast only where it matters most +- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness +- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead + +### Visual Weight Reduction +- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate +- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness +- **White space**: Increase breathing room, reduce density +- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely + +### Simplification +- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose +- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes +- **Reduce layering**: Flatten visual hierarchy where possible +- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows + +### Motion Reduction +- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing +- **Remove decorative animations**: Keep functional motion, remove flourishes +- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback +- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic +- **Remove animations entirely** if they're not serving a clear purpose + +### Composition Refinement +- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling +- **Align to grid**: Bring rogue elements back into systematic alignment +- **Even out spacing**: Replace extreme spacing variations with consistent rhythm + +**NEVER**: +- Make everything the same size/weight (hierarchy still matters) +- Remove all color (quiet ≠ grayscale) +- Eliminate all personality (maintain character through refinement) +- Sacrifice usability for aesthetics (functional elements still need clear affordances) +- Make everything small and light (some anchors needed) + +## Verify Quality + +Ensure refinement maintains quality: + +- **Still functional**: Can users still accomplish tasks easily? +- **Still distinctive**: Does it have character, or is it generic now? +- **Better reading**: Is text easier to read for extended periods? +- **Sophistication**: Does it feel more refined and premium? + +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.cursor/skills/shape/SKILL.md b/.kiro/skills/impeccable/reference/shape.md similarity index 80% rename from .cursor/skills/shape/SKILL.md rename to .kiro/skills/impeccable/reference/shape.md index 6a94ee74c..0ae281943 100644 --- a/.cursor/skills/shape/SKILL.md +++ b/.kiro/skills/impeccable/reference/shape.md @@ -1,24 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -56,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -91,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.kiro/skills/impeccable/reference/teach.md b/.kiro/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..046f6065d --- /dev/null +++ b/.kiro/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to .kiro/settings.json. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.kiro/skills/impeccable/reference/typeset.md b/.kiro/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.kiro/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.kiro/skills/impeccable/scripts/cleanup-deprecated.mjs b/.kiro/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.kiro/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.kiro/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.kiro/skills/impeccable/scripts/command-metadata.json b/.kiro/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.kiro/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.kiro/skills/impeccable/scripts/pin.mjs b/.kiro/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.kiro/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.opencode/skills/adapt/SKILL.md b/.opencode/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.opencode/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.opencode/skills/audit/SKILL.md b/.opencode/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.opencode/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.opencode/skills/clarify/SKILL.md b/.opencode/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.opencode/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.opencode/skills/harden/SKILL.md b/.opencode/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.opencode/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.opencode/skills/impeccable/SKILL.md b/.opencode/skills/impeccable/SKILL.md index da88f1585..219cb7402 100644 --- a/.opencode/skills/impeccable/SKILL.md +++ b/.opencode/skills/impeccable/SKILL.md @@ -1,16 +1,20 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. +allowed-tools: + - Bash(npx impeccable *) --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +27,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +36,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +272,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +286,96 @@ Remember: Claude is capable of extraordinary creative work. Don't hold back. Sho --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -STOP and call the `question` tool to clarify. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .opencode/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then STOP and call the `question` tool to clarify. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.opencode/skills/impeccable/reference/adapt.md b/.opencode/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.opencode/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.opencode/skills/animate/SKILL.md b/.opencode/skills/impeccable/reference/animate.md similarity index 90% rename from .opencode/skills/animate/SKILL.md rename to .opencode/skills/impeccable/reference/animate.md index 4eb931b05..dfe993cea 100644 --- a/.opencode/skills/animate/SKILL.md +++ b/.opencode/skills/impeccable/reference/animate.md @@ -1,16 +1,7 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. --- @@ -172,4 +163,4 @@ Test animations thoroughly: - **Doesn't block**: Users can interact during/after animations - **Adds value**: Makes interface clearer or more delightful -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.opencode/skills/impeccable/reference/audit.md b/.opencode/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.opencode/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.opencode/skills/bolder/SKILL.md b/.opencode/skills/impeccable/reference/bolder.md similarity index 87% rename from .opencode/skills/bolder/SKILL.md rename to .opencode/skills/impeccable/reference/bolder.md index d0f2d7367..57bdc739d 100644 --- a/.opencode/skills/bolder/SKILL.md +++ b/.opencode/skills/impeccable/reference/bolder.md @@ -1,16 +1,5 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -36,7 +25,7 @@ If any of these are unclear from the codebase, STOP and call the `question` tool **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -54,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) @@ -114,4 +103,4 @@ Ensure amplification maintains usability and coherence: **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.opencode/skills/impeccable/reference/clarify.md b/.opencode/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.opencode/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.opencode/skills/critique/reference/cognitive-load.md b/.opencode/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .opencode/skills/critique/reference/cognitive-load.md rename to .opencode/skills/impeccable/reference/cognitive-load.md diff --git a/.opencode/skills/colorize/SKILL.md b/.opencode/skills/impeccable/reference/colorize.md similarity index 89% rename from .opencode/skills/colorize/SKILL.md rename to .opencode/skills/impeccable/reference/colorize.md index 86353330e..1a2ae7439 100644 --- a/.opencode/skills/colorize/SKILL.md +++ b/.opencode/skills/impeccable/reference/colorize.md @@ -1,16 +1,7 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. --- @@ -140,4 +131,4 @@ Test that colorization improves the experience: - **Still accessible**: Do all color combinations meet WCAG standards? - **Not overwhelming**: Is color balanced and purposeful? -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.opencode/skills/impeccable/reference/craft.md b/.opencode/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.opencode/skills/impeccable/reference/craft.md +++ b/.opencode/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.opencode/skills/critique/SKILL.md b/.opencode/skills/impeccable/reference/critique.md similarity index 84% rename from .opencode/skills/critique/SKILL.md rename to .opencode/skills/impeccable/reference/critique.md index e83febd6b..ea2c4d7a7 100644 --- a/.opencode/skills/critique/SKILL.md +++ b/.opencode/skills/impeccable/reference/critique.md @@ -1,20 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" -allowed-tools: - - Bash(npx impeccable *) ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -32,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -46,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -96,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -142,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `AGENTS.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -178,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. STOP and call the `question` tool to clarify. These answers will shape the action plan. @@ -198,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -211,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.opencode/skills/delight/SKILL.md b/.opencode/skills/impeccable/reference/delight.md similarity index 92% rename from .opencode/skills/delight/SKILL.md rename to .opencode/skills/impeccable/reference/delight.md index 1b105a666..ee529ce38 100644 --- a/.opencode/skills/delight/SKILL.md +++ b/.opencode/skills/impeccable/reference/delight.md @@ -1,16 +1,7 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- @@ -301,4 +292,4 @@ Test that delight actually delights: - **Appropriate**: Matches brand and context - **Accessible**: Works with reduced motion, screen readers -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.opencode/skills/distill/SKILL.md b/.opencode/skills/impeccable/reference/distill.md similarity index 90% rename from .opencode/skills/distill/SKILL.md rename to .opencode/skills/impeccable/reference/distill.md index 9342d1298..f4239bfae 100644 --- a/.opencode/skills/distill/SKILL.md +++ b/.opencode/skills/impeccable/reference/distill.md @@ -1,16 +1,5 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -119,4 +108,4 @@ If you removed features or options: - Consider if they need alternative access points - Note any user feedback to monitor -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.opencode/skills/impeccable/reference/harden.md b/.opencode/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.opencode/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.opencode/skills/critique/reference/heuristics-scoring.md b/.opencode/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .opencode/skills/critique/reference/heuristics-scoring.md rename to .opencode/skills/impeccable/reference/heuristics-scoring.md diff --git a/.opencode/skills/impeccable/reference/layout.md b/.opencode/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.opencode/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.opencode/skills/impeccable/reference/optimize.md b/.opencode/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.opencode/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.opencode/skills/overdrive/SKILL.md b/.opencode/skills/impeccable/reference/overdrive.md similarity index 77% rename from .opencode/skills/overdrive/SKILL.md rename to .opencode/skills/impeccable/reference/overdrive.md index 50bd442fe..4059d7e91 100644 --- a/.opencode/skills/overdrive/SKILL.md +++ b/.opencode/skills/impeccable/reference/overdrive.md @@ -1,11 +1,3 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Start your response with: ``` @@ -13,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **STOP and call the `question` tool to clarify.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -33,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -91,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -128,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result @@ -139,4 +127,4 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - **The accessibility test**: Enable reduced motion. Still beautiful? - **The context test**: Does this make sense for THIS brand and audience? -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.opencode/skills/critique/reference/personas.md b/.opencode/skills/impeccable/reference/personas.md similarity index 100% rename from .opencode/skills/critique/reference/personas.md rename to .opencode/skills/impeccable/reference/personas.md diff --git a/.opencode/skills/impeccable/reference/polish.md b/.opencode/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.opencode/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.opencode/skills/quieter/SKILL.md b/.opencode/skills/impeccable/reference/quieter.md similarity index 88% rename from .opencode/skills/quieter/SKILL.md rename to .opencode/skills/impeccable/reference/quieter.md index b6b7b000b..89968b824 100644 --- a/.opencode/skills/quieter/SKILL.md +++ b/.opencode/skills/impeccable/reference/quieter.md @@ -1,16 +1,5 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. --- @@ -100,4 +89,4 @@ Ensure refinement maintains quality: - **Better reading**: Is text easier to read for extended periods? - **Sophistication**: Does it feel more refined and premium? -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.opencode/skills/shape/SKILL.md b/.opencode/skills/impeccable/reference/shape.md similarity index 79% rename from .opencode/skills/shape/SKILL.md rename to .opencode/skills/impeccable/reference/shape.md index 4a3464660..34453fcc9 100644 --- a/.opencode/skills/shape/SKILL.md +++ b/.opencode/skills/impeccable/reference/shape.md @@ -1,26 +1,12 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -58,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -93,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. STOP and call the `question` tool to clarify. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.opencode/skills/impeccable/reference/teach.md b/.opencode/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..c72139b7d --- /dev/null +++ b/.opencode/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +STOP and call the `question` tool to clarify. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then STOP and call the `question` tool to clarify. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.opencode/skills/impeccable/reference/typeset.md b/.opencode/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.opencode/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs b/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.opencode/skills/impeccable/scripts/command-metadata.json b/.opencode/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.opencode/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.opencode/skills/impeccable/scripts/pin.mjs b/.opencode/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.opencode/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.opencode/skills/layout/SKILL.md b/.opencode/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.opencode/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.opencode/skills/optimize/SKILL.md b/.opencode/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.opencode/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.opencode/skills/polish/SKILL.md b/.opencode/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.opencode/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.opencode/skills/typeset/SKILL.md b/.opencode/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.opencode/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.pi/skills/impeccable/SKILL.md b/.pi/skills/impeccable/SKILL.md index 43e327949..ea2f01ccd 100644 --- a/.pi/skills/impeccable/SKILL.md +++ b/.pi/skills/impeccable/SKILL.md @@ -1,14 +1,18 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. +allowed-tools: + - Bash(npx impeccable *) --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -21,8 +25,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -32,7 +34,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -268,7 +270,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -282,82 +284,96 @@ Remember: the model is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .pi/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.pi/skills/impeccable/reference/adapt.md b/.pi/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.pi/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.pi/skills/impeccable/reference/animate.md b/.pi/skills/impeccable/reference/animate.md new file mode 100644 index 000000000..0186ce081 --- /dev/null +++ b/.pi/skills/impeccable/reference/animate.md @@ -0,0 +1,166 @@ +> **Additional context needed**: performance constraints. + +Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. + + +--- + +## Assess Animation Opportunities + +Analyze where motion would improve the experience: + +1. **Identify static areas**: + - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) + - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) + - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious + - **Lack of delight**: Functional but joyless interactions + - **Missed guidance**: Opportunities to direct attention or explain behavior + +2. **Understand the context**: + - What's the personality? (Playful vs serious, energetic vs calm) + - What's the performance budget? (Mobile-first? Complex page?) + - Who's the audience? (Motion-sensitive users? Power users who want speed?) + - What matters most? (One hero animation vs many micro-interactions?) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. + +## Plan Animation Strategy + +Create a purposeful animation plan: + +- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) +- **Feedback layer**: Which interactions need acknowledgment? +- **Transition layer**: Which state changes need smoothing? +- **Delight layer**: Where can we surprise and delight? + +**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. + +## Implement Animations + +Add motion systematically across these categories: + +### Entrance Animations +- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations +- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) +- **Content reveals**: Scroll-triggered animations using intersection observer +- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management + +### Micro-interactions +- **Button feedback**: + - Hover: Subtle scale (1.02-1.05), color shift, shadow increase + - Click: Quick scale down then up (0.95 → 1), ripple effect + - Loading: Spinner or pulse state +- **Form interactions**: + - Input focus: Border color transition, slight scale or glow + - Validation: Shake on error, check mark on success, smooth color transitions +- **Toggle switches**: Smooth slide + color transition (200-300ms) +- **Checkboxes/radio**: Check mark animation, ripple effect +- **Like/favorite**: Scale + rotation, particle effects, color transition + +### State Transitions +- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) +- **Expand/collapse**: Height transition with overflow handling, icon rotation +- **Loading states**: Skeleton screen fades, spinner animations, progress bars +- **Success/error**: Color transitions, icon animations, gentle scale pulse +- **Enable/disable**: Opacity transitions, cursor changes + +### Navigation & Flow +- **Page transitions**: Crossfade between routes, shared element transitions +- **Tab switching**: Slide indicator, content fade/slide +- **Carousel/slider**: Smooth transforms, snap points, momentum +- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators + +### Feedback & Guidance +- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights +- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning +- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation +- **Focus flow**: Highlight path through form or workflow + +### Delight Moments +- **Empty states**: Subtle floating animations on illustrations +- **Completed actions**: Confetti, check mark flourish, success celebrations +- **Easter eggs**: Hidden interactions for discovery +- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches + +## Technical Implementation + +Use appropriate techniques for each animation: + +### Timing & Easing + +**Durations by purpose:** +- **100-150ms**: Instant feedback (button press, toggle) +- **200-300ms**: State changes (hover, menu open) +- **300-500ms**: Layout changes (accordion, modal) +- **500-800ms**: Entrance animations (page load) + +**Easing curves (use these, not CSS defaults):** +```css +/* Recommended - natural deceleration */ +--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ +--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ +--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ + +/* AVOID - feel dated and tacky */ +/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ +/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ +``` + +**Exit animations are faster than entrances.** Use ~75% of enter duration. + +### CSS Animations +```css +/* Prefer for simple, declarative animations */ +- transitions for state changes +- @keyframes for complex sequences +- transform + opacity only (GPU-accelerated) +``` + +### JavaScript Animation +```javascript +/* Use for complex, interactive animations */ +- Web Animations API for programmatic control +- Framer Motion for React +- GSAP for complex sequences +``` + +### Performance +- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties +- **will-change**: Add sparingly for known expensive animations +- **Reduce paint**: Minimize repaints, use `contain` where appropriate +- **Monitor FPS**: Ensure 60fps on target devices + +### Accessibility +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**NEVER**: +- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself +- Animate layout properties (width, height, top, left)—use transform instead +- Use durations over 500ms for feedback—it feels laggy +- Animate without purpose—every animation needs a reason +- Ignore `prefers-reduced-motion`—this is an accessibility violation +- Animate everything—animation fatigue makes interfaces feel exhausting +- Block interaction during animations unless intentional + +## Verify Quality + +Test animations thoroughly: + +- **Smooth at 60fps**: No jank on target devices +- **Feels natural**: Easing curves feel organic, not robotic +- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) +- **Reduced motion works**: Animations disabled or simplified appropriately +- **Doesn't block**: Users can interact during/after animations +- **Adds value**: Makes interface clearer or more delightful + +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.pi/skills/impeccable/reference/audit.md b/.pi/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.pi/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.pi/skills/impeccable/reference/bolder.md b/.pi/skills/impeccable/reference/bolder.md new file mode 100644 index 000000000..cb3481663 --- /dev/null +++ b/.pi/skills/impeccable/reference/bolder.md @@ -0,0 +1,106 @@ +Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. + + +--- + +## Assess Current State + +Analyze what makes the design feel too safe or boring: + +1. **Identify weakness sources**: + - **Generic choices**: System fonts, basic colors, standard layouts + - **Timid scale**: Everything is medium-sized with no drama + - **Low contrast**: Everything has similar visual weight + - **Static**: No motion, no energy, no life + - **Predictable**: Standard patterns with no surprises + - **Flat hierarchy**: Nothing stands out or commands attention + +2. **Understand the context**: + - What's the brand personality? (How far can we push?) + - What's the purpose? (Marketing can be bolder than financial dashboards) + - Who's the audience? (What will resonate?) + - What are the constraints? (Brand guidelines, accessibility, performance) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. + +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." + +## Plan Amplification + +Create a strategy to increase impact while maintaining coherence: + +- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) +- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. +- **Risk budget**: How experimental can we be? Push boundaries within constraints. +- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) + +**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. + +## Amplify the Design + +Systematically increase impact across these dimensions: + +### Typography Amplification +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) +- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) +- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 +- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) + +### Color Intensification +- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) +- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop +- **Dominant color strategy**: Let one bold color own 60% of the design +- **Sharp accents**: High-contrast accent colors that pop +- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette +- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) + +### Spatial Drama +- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings +- **Break the grid**: Let hero elements escape containers and cross boundaries +- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry +- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) +- **Overlap**: Layer elements intentionally for depth + +### Visual Effects +- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) +- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) +- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) +- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) +- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand + +### Motion & Animation +- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays +- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences +- **Micro-interactions**: Satisfying hover effects, click feedback, state changes +- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) + +### Composition Boldness +- **Hero moments**: Create clear focal points with dramatic treatment +- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements +- **Full-bleed elements**: Use full viewport width/height for impact +- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits + +**NEVER**: +- Add effects randomly without purpose (chaos ≠ bold) +- Sacrifice readability for aesthetics (body text must be readable) +- Make everything bold (then nothing is bold - need contrast) +- Ignore accessibility (bold design must still meet WCAG standards) +- Overwhelm with motion (animation fatigue is real) +- Copy trendy aesthetics blindly (bold means distinctive, not derivative) + +## Verify Quality + +Ensure amplification maintains usability and coherence: + +- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. +- **Still functional**: Can users accomplish tasks without distraction? +- **Coherent**: Does everything feel intentional and unified? +- **Memorable**: Will users remember this experience? +- **Performant**: Do all these effects run smoothly? +- **Accessible**: Does it still meet accessibility standards? + +**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." + +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.pi/skills/impeccable/reference/clarify.md b/.pi/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.pi/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.pi/skills/critique/reference/cognitive-load.md b/.pi/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .pi/skills/critique/reference/cognitive-load.md rename to .pi/skills/impeccable/reference/cognitive-load.md diff --git a/.pi/skills/impeccable/reference/colorize.md b/.pi/skills/impeccable/reference/colorize.md new file mode 100644 index 000000000..a4ce5072e --- /dev/null +++ b/.pi/skills/impeccable/reference/colorize.md @@ -0,0 +1,134 @@ +> **Additional context needed**: existing brand colors. + +Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. + + +--- + +## Assess Color Opportunity + +Analyze the current state and identify opportunities: + +1. **Understand current state**: + - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? + - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? + - **Context**: What's appropriate for this domain and audience? + - **Brand**: Are there existing brand colors we should use? + +2. **Identify where color adds value**: + - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) + - **Hierarchy**: Drawing attention to important elements + - **Categorization**: Different sections, types, or states + - **Emotional tone**: Warmth, energy, trust, creativity + - **Wayfinding**: Helping users navigate and understand structure + - **Delight**: Moments of visual interest and personality + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. + +## Plan Color Strategy + +Create a purposeful color introduction plan: + +- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) +- **Dominant color**: Which color owns 60% of colored elements? +- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) +- **Application strategy**: Where does each color appear and why? + +**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. + +## Introduce Color Strategically + +Add color systematically across these dimensions: + +### Semantic Color +- **State indicators**: + - Success: Green tones (emerald, forest, mint) + - Error: Red/pink tones (rose, crimson, coral) + - Warning: Orange/amber tones + - Info: Blue tones (sky, ocean, indigo) + - Neutral: Gray/slate for inactive states + +- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) +- **Progress indicators**: Colored bars, rings, or charts showing completion or health + +### Accent Color Application +- **Primary actions**: Color the most important buttons/CTAs +- **Links**: Add color to clickable text (maintain accessibility) +- **Icons**: Colorize key icons for recognition and personality +- **Headers/titles**: Add color to section headers or key labels +- **Hover states**: Introduce color on interaction + +### Background & Surfaces +- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) +- **Colored sections**: Use subtle background colors to separate areas +- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) +- **Cards & surfaces**: Tint cards or surfaces slightly for warmth + +**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. + +### Data Visualization +- **Charts & graphs**: Use color to encode categories or values +- **Heatmaps**: Color intensity shows density or importance +- **Comparison**: Color coding for different datasets or timeframes + +### Borders & Accents +- **Accent borders**: Add colored left/top borders to cards or sections +- **Underlines**: Color underlines for emphasis or active states +- **Dividers**: Subtle colored dividers instead of gray lines +- **Focus rings**: Colored focus indicators matching brand + +### Typography Color +- **Colored headings**: Use brand colors for section headings (maintain contrast) +- **Highlight text**: Color for emphasis or categories +- **Labels & tags**: Small colored labels for metadata or categories + +### Decorative Elements +- **Illustrations**: Add colored illustrations or icons +- **Shapes**: Geometric shapes in brand colors as background elements +- **Gradients**: Colorful gradient overlays or mesh backgrounds +- **Blobs/organic shapes**: Soft colored shapes for visual interest + +## Balance & Refinement + +Ensure color addition improves rather than overwhelms: + +### Maintain Hierarchy +- **Dominant color** (60%): Primary brand color or most used accent +- **Secondary color** (30%): Supporting color for variety +- **Accent color** (10%): High contrast for key moments +- **Neutrals** (remaining): Gray/black/white for structure + +### Accessibility +- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) +- **Don't rely on color alone**: Use icons, labels, or patterns alongside color +- **Test for color blindness**: Verify red/green combinations work for all users + +### Cohesion +- **Consistent palette**: Use colors from defined palette, not arbitrary choices +- **Systematic application**: Same color meanings throughout (green always = success) +- **Temperature consistency**: Warm palette stays warm, cool stays cool + +**NEVER**: +- Use every color in the rainbow (choose 2-4 colors beyond neutrals) +- Apply color randomly without semantic meaning +- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead +- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication +- Use pure black (`#000`) or pure white (`#fff`) for large areas +- Violate WCAG contrast requirements +- Use color as the only indicator (accessibility issue) +- Make everything colorful (defeats the purpose) +- Default to purple-blue gradients (AI slop aesthetic) + +## Verify Color Addition + +Test that colorization improves the experience: + +- **Better hierarchy**: Does color guide attention appropriately? +- **Clearer meaning**: Does color help users understand states/categories? +- **More engaging**: Does the interface feel warmer and more inviting? +- **Still accessible**: Do all color combinations meet WCAG standards? +- **Not overwhelming**: Is color balanced and purposeful? + +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.pi/skills/impeccable/reference/craft.md b/.pi/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.pi/skills/impeccable/reference/craft.md +++ b/.pi/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.pi/skills/critique/SKILL.md b/.pi/skills/impeccable/reference/critique.md similarity index 85% rename from .pi/skills/critique/SKILL.md rename to .pi/skills/impeccable/reference/critique.md index 29e0a1ce4..c282a6c80 100644 --- a/.pi/skills/critique/SKILL.md +++ b/.pi/skills/impeccable/reference/critique.md @@ -1,18 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -allowed-tools: - - Bash(npx impeccable *) ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -30,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -44,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -94,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -140,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `AGENTS.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -176,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -196,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -209,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.pi/skills/impeccable/reference/delight.md b/.pi/skills/impeccable/reference/delight.md new file mode 100644 index 000000000..8a781e70e --- /dev/null +++ b/.pi/skills/impeccable/reference/delight.md @@ -0,0 +1,295 @@ +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). + +Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. + + +--- + +## Assess Delight Opportunities + +Identify where delight would enhance (not distract from) the experience: + +1. **Find natural delight moments**: + - **Success states**: Completed actions (save, send, publish) + - **Empty states**: First-time experiences, onboarding + - **Loading states**: Waiting periods that could be entertaining + - **Achievements**: Milestones, streaks, completions + - **Interactions**: Hover states, clicks, drags + - **Errors**: Softening frustrating moments + - **Easter eggs**: Hidden discoveries for curious users + +2. **Understand the context**: + - What's the brand personality? (Playful? Professional? Quirky? Elegant?) + - Who's the audience? (Tech-savvy? Creative? Corporate?) + - What's the emotional context? (Accomplishment? Exploration? Frustration?) + - What's appropriate? (Banking app ≠ gaming app) + +3. **Define delight strategy**: + - **Subtle sophistication**: Refined micro-interactions (luxury brands) + - **Playful personality**: Whimsical illustrations and copy (consumer apps) + - **Helpful surprises**: Anticipating needs before users ask (productivity tools) + - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. + +## Delight Principles + +Follow these guidelines: + +### Delight Amplifies, Never Blocks +- Delight moments should be quick (< 1 second) +- Never delay core functionality for delight +- Make delight skippable or subtle +- Respect user's time and task focus + +### Surprise and Discovery +- Hide delightful details for users to discover +- Reward exploration and curiosity +- Don't announce every delight moment +- Let users share discoveries with others + +### Appropriate to Context +- Match delight to emotional moment (celebrate success, empathize with errors) +- Respect the user's state (don't be playful during critical errors) +- Match brand personality and audience expectations +- Cultural sensitivity (what's delightful varies by culture) + +### Compound Over Time +- Delight should remain fresh with repeated use +- Vary responses (not same animation every time) +- Reveal deeper layers with continued use +- Build anticipation through patterns + +## Delight Techniques + +Add personality and joy through these methods: + +### Micro-interactions & Animation + +**Button delight**: +```css +/* Satisfying button press */ +.button { + transition: transform 0.1s, box-shadow 0.1s; +} +.button:active { + transform: translateY(2px); + box-shadow: 0 2px 4px rgba(0,0,0,0.2); +} + +/* Ripple effect on click */ +/* Smooth lift on hover */ +.button:hover { + transform: translateY(-2px); + transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ +} +``` + +**Loading delight**: +- Playful loading animations (not just spinners) +- Personality in loading messages (write product-specific ones, not generic AI filler) +- Progress indication with encouraging messages +- Skeleton screens with subtle animations + +**Success animations**: +- Checkmark draw animation +- Confetti burst for major achievements +- Gentle scale + fade for confirmation +- Satisfying sound effects (subtle) + +**Hover surprises**: +- Icons that animate on hover +- Color shifts or glow effects +- Tooltip reveals with personality +- Cursor changes (custom cursors for branded experiences) + +### Personality in Copy + +**Playful error messages**: +``` +"Error 404" +"This page is playing hide and seek. (And winning)" + +"Connection failed" +"Looks like the internet took a coffee break. Want to retry?" +``` + +**Encouraging empty states**: +``` +"No projects" +"Your canvas awaits. Create something amazing." + +"No messages" +"Inbox zero! You're crushing it today." +``` + +**Playful labels & tooltips**: +``` +"Delete" +"Send to void" (for playful brand) + +"Help" +"Rescue me" (tooltip) +``` + +**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. + +### Illustrations & Visual Personality + +**Custom illustrations**: +- Empty state illustrations (not stock icons) +- Error state illustrations (friendly monsters, quirky characters) +- Loading state illustrations (animated characters) +- Success state illustrations (celebrations) + +**Icon personality**: +- Custom icon set matching brand personality +- Animated icons (subtle motion on hover/click) +- Illustrative icons (more detailed than generic) +- Consistent style across all icons + +**Background effects**: +- Subtle particle effects +- Gradient mesh backgrounds +- Geometric patterns +- Parallax depth +- Time-of-day themes (morning vs night) + +### Satisfying Interactions + +**Drag and drop delight**: +- Lift effect on drag (shadow, scale) +- Snap animation when dropped +- Satisfying placement sound +- Undo toast ("Dropped in wrong place? [Undo]") + +**Toggle switches**: +- Smooth slide with spring physics +- Color transition +- Haptic feedback on mobile +- Optional sound effect + +**Progress & achievements**: +- Streak counters with celebratory milestones +- Progress bars that "celebrate" at 100% +- Badge unlocks with animation +- Playful stats ("You're on fire! 5 days in a row") + +**Form interactions**: +- Input fields that animate on focus +- Checkboxes with a satisfying scale pulse when checked +- Success state that celebrates valid input +- Auto-grow textareas + +### Sound Design + +**Subtle audio cues** (when appropriate): +- Notification sounds (distinctive but not annoying) +- Success sounds (satisfying "ding") +- Error sounds (empathetic, not harsh) +- Typing sounds for chat/messaging +- Ambient background audio (very subtle) + +**IMPORTANT**: +- Respect system sound settings +- Provide mute option +- Keep volumes quiet (subtle cues, not alarms) +- Don't play on every interaction (sound fatigue is real) + +### Easter Eggs & Hidden Delights + +**Discovery rewards**: +- Konami code unlocks special theme +- Hidden keyboard shortcuts (Cmd+K for special features) +- Hover reveals on logos or illustrations +- Alt text jokes on images (for screen reader users too!) +- Console messages for developers ("Like what you see? We're hiring!") + +**Seasonal touches**: +- Holiday themes (subtle, tasteful) +- Seasonal color shifts +- Weather-based variations +- Time-based changes (dark at night, light during day) + +**Contextual personality**: +- Different messages based on time of day +- Responses to specific user actions +- Randomized variations (not same every time) +- Progressive reveals with continued use + +### Loading & Waiting States + +**Make waiting engaging**: +- Interesting loading messages that rotate +- Progress bars with personality +- Mini-games during long loads +- Fun facts or tips while waiting +- Countdown with encouraging messages + +``` +Loading messages — write ones specific to your product, not generic AI filler: +- "Crunching your latest numbers..." +- "Syncing with your team's changes..." +- "Preparing your dashboard..." +- "Checking for updates since yesterday..." +``` + +**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. + +### Celebration Moments + +**Success celebrations**: +- Confetti for major milestones +- Animated checkmarks for completions +- Progress bar celebrations at 100% +- "Achievement unlocked" style notifications +- Personalized messages ("You published your 10th article!") + +**Milestone recognition**: +- First-time actions get special treatment +- Streak tracking and celebration +- Progress toward goals +- Anniversary celebrations + +## Implementation Patterns + +**Animation libraries**: +- Framer Motion (React) +- GSAP (universal) +- Lottie (After Effects animations) +- Canvas confetti (party effects) + +**Sound libraries**: +- Howler.js (audio management) +- Use-sound (React hook) + +**Physics libraries**: +- React Spring (spring physics) +- Popmotion (animation primitives) + +**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. + +**NEVER**: +- Delay core functionality for delight +- Force users through delightful moments (make skippable) +- Use delight to hide poor UX +- Overdo it (less is more) +- Ignore accessibility (animate responsibly, provide alternatives) +- Make every interaction delightful (special moments should be special) +- Sacrifice performance for delight +- Be inappropriate for context (read the room) + +## Verify Delight Quality + +Test that delight actually delights: + +- **User reactions**: Do users smile? Share screenshots? +- **Doesn't annoy**: Still pleasant after 100th time? +- **Doesn't block**: Can users opt out or skip? +- **Performant**: No jank, no slowdown +- **Appropriate**: Matches brand and context +- **Accessible**: Works with reduced motion, screen readers + +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.pi/skills/impeccable/reference/distill.md b/.pi/skills/impeccable/reference/distill.md new file mode 100644 index 000000000..4f47dc0b4 --- /dev/null +++ b/.pi/skills/impeccable/reference/distill.md @@ -0,0 +1,111 @@ +Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. + + +--- + +## Assess Current State + +Analyze what makes the design feel complex or cluttered: + +1. **Identify complexity sources**: + - **Too many elements**: Competing buttons, redundant information, visual clutter + - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose + - **Information overload**: Everything visible at once, no progressive disclosure + - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations + - **Confusing hierarchy**: Unclear what matters most + - **Feature creep**: Too many options, actions, or paths forward + +2. **Find the essence**: + - What's the primary user goal? (There should be ONE) + - What's actually necessary vs nice-to-have? + - What can be removed, hidden, or combined? + - What's the 20% that delivers 80% of value? + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. + +## Plan Simplification + +Create a ruthless editing strategy: + +- **Core purpose**: What's the ONE thing this should accomplish? +- **Essential elements**: What's truly necessary to achieve that purpose? +- **Progressive disclosure**: What can be hidden until needed? +- **Consolidation opportunities**: What can be combined or integrated? + +**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. + +## Simplify the Design + +Systematically remove complexity across these dimensions: + +### Information Architecture +- **Reduce scope**: Remove secondary actions, optional features, redundant information +- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) +- **Combine related actions**: Merge similar buttons, consolidate forms, group related content +- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden +- **Remove redundancy**: If it's said elsewhere, don't repeat it here + +### Visual Simplification +- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors +- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights +- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function +- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards +- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead +- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps + +### Layout Simplification +- **Linear flow**: Replace complex grids with simple vertical flow where possible +- **Remove sidebars**: Move secondary content inline or hide it +- **Full-width**: Use available space generously instead of complex multi-column layouts +- **Consistent alignment**: Pick left or center, stick with it +- **Generous white space**: Let content breathe, don't pack everything tight + +### Interaction Simplification +- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) +- **Smart defaults**: Make common choices automatic, only ask when necessary +- **Inline actions**: Replace modal flows with inline editing where possible +- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? +- **Clear CTAs**: ONE obvious next step, not five competing actions + +### Content Simplification +- **Shorter copy**: Cut every sentence in half, then do it again +- **Active voice**: "Save changes" not "Changes will be saved" +- **Remove jargon**: Plain language always wins +- **Scannable structure**: Short paragraphs, bullet points, clear headings +- **Essential information only**: Remove marketing fluff, legalese, hedging +- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once + +### Code Simplification +- **Remove unused code**: Dead CSS, unused components, orphaned files +- **Flatten component trees**: Reduce nesting depth +- **Consolidate styles**: Merge similar styles, use utilities consistently +- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? + +**NEVER**: +- Remove necessary functionality (simplicity ≠ feature-less) +- Sacrifice accessibility for simplicity (clear labels and ARIA still required) +- Make things so simple they're unclear (mystery ≠ minimalism) +- Remove information users need to make decisions +- Eliminate hierarchy completely (some things should stand out) +- Oversimplify complex domains (match complexity to actual task complexity) + +## Verify Simplification + +Ensure simplification improves usability: + +- **Faster task completion**: Can users accomplish goals more quickly? +- **Reduced cognitive load**: Is it easier to understand what to do? +- **Still complete**: Are all necessary features still accessible? +- **Clearer hierarchy**: Is it obvious what matters most? +- **Better performance**: Does simpler design load faster? + +## Document Removed Complexity + +If you removed features or options: +- Document why they were removed +- Consider if they need alternative access points +- Note any user feedback to monitor + +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.pi/skills/impeccable/reference/harden.md b/.pi/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.pi/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.pi/skills/critique/reference/heuristics-scoring.md b/.pi/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .pi/skills/critique/reference/heuristics-scoring.md rename to .pi/skills/impeccable/reference/heuristics-scoring.md diff --git a/.pi/skills/impeccable/reference/layout.md b/.pi/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.pi/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.pi/skills/impeccable/reference/optimize.md b/.pi/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.pi/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.pi/skills/impeccable/reference/overdrive.md b/.pi/skills/impeccable/reference/overdrive.md new file mode 100644 index 000000000..d84a147dc --- /dev/null +++ b/.pi/skills/impeccable/reference/overdrive.md @@ -0,0 +1,130 @@ +Start your response with: + +``` +──────────── ⚡ OVERDRIVE ───────────── +》》》 Entering overdrive mode... +``` + +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. + +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. + +### Propose Before Building + +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: + +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). +3. Only proceed with the direction the user confirms. + +Skipping this step risks building something embarrassing that needs to be thrown away. + +### Iterate with Browser Automation + +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. + +--- + +## Assess What "Extraordinary" Means Here + +The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** + +### For visual/marketing surfaces +Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. + +### For functional UI +Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. + +### For performance-critical UI +The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. + +### For data-heavy interfaces +Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. + +**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. + +## The Toolkit + +Organized by what you're trying to achieve, not by technology name. + +### Make transitions feel cinematic +- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. +- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes +- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. + +### Tie animation to scroll position +- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) + +### Render beyond CSS +- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. +- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. +- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. +- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. + +### Make data feel alive +- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. +- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. +- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. + +### Animate complex properties +- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. +- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. + +### Push performance boundaries +- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. +- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. +- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. + +### Interact with the device +- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. +- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. + +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. + +## Implement with Discipline + +### Progressive enhancement is non-negotiable + +Every technique must degrade gracefully. The experience without the enhancement must still be good. + +```css +@supports (animation-timeline: scroll()) { + .hero { animation-timeline: scroll(); } +} +``` + +```javascript +if ('gpu' in navigator) { /* WebGPU */ } +else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } +/* CSS-only fallback must still look good */ +``` + +### Performance rules + +- Target 60fps. If dropping below 50, simplify. +- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. +- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. +- Pause off-screen rendering. Kill what you can't see. +- Test on real mid-range devices, not just your development machine. + +### Polish is the difference + +The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. + +**NEVER**: +- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion +- Ship effects that cause jank on mid-range devices +- Use bleeding-edge APIs without a functional fallback +- Add sound without explicit user opt-in +- Use technical ambition to mask weak design fundamentals; fix those first with other commands +- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise + +## Verify the Result + +- **The wow test**: Show it to someone who hasn't seen it. Do they react? +- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? +- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? +- **The accessibility test**: Enable reduced motion. Still beautiful? +- **The context test**: Does this make sense for THIS brand and audience? + +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.pi/skills/critique/reference/personas.md b/.pi/skills/impeccable/reference/personas.md similarity index 100% rename from .pi/skills/critique/reference/personas.md rename to .pi/skills/impeccable/reference/personas.md diff --git a/.pi/skills/impeccable/reference/polish.md b/.pi/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.pi/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.pi/skills/impeccable/reference/quieter.md b/.pi/skills/impeccable/reference/quieter.md new file mode 100644 index 000000000..a8ad41809 --- /dev/null +++ b/.pi/skills/impeccable/reference/quieter.md @@ -0,0 +1,92 @@ +Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. + + +--- + +## Assess Current State + +Analyze what makes the design feel too intense: + +1. **Identify intensity sources**: + - **Color saturation**: Overly bright or saturated colors + - **Contrast extremes**: Too much high-contrast juxtaposition + - **Visual weight**: Too many bold, heavy elements competing + - **Animation excess**: Too much motion or overly dramatic effects + - **Complexity**: Too many visual elements, patterns, or decorations + - **Scale**: Everything is large and loud with no hierarchy + +2. **Understand the context**: + - What's the purpose? (Marketing vs tool vs reading experience) + - Who's the audience? (Some contexts need energy) + - What's working? (Don't throw away good ideas) + - What's the core message? (Preserve what matters) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. + +## Plan Refinement + +Create a strategy to reduce intensity while maintaining impact: + +- **Color approach**: Desaturate or shift to more sophisticated tones? +- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? +- **Simplification approach**: What can be removed entirely? +- **Sophistication approach**: How can we signal quality through restraint? + +**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. + +## Refine the Design + +Systematically reduce intensity across these dimensions: + +### Color Refinement +- **Reduce saturation**: Shift from fully saturated to 70-85% saturation +- **Soften palette**: Replace bright colors with muted, sophisticated tones +- **Reduce color variety**: Use fewer colors more thoughtfully +- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) +- **Gentler contrasts**: High contrast only where it matters most +- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness +- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead + +### Visual Weight Reduction +- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate +- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness +- **White space**: Increase breathing room, reduce density +- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely + +### Simplification +- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose +- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes +- **Reduce layering**: Flatten visual hierarchy where possible +- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows + +### Motion Reduction +- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing +- **Remove decorative animations**: Keep functional motion, remove flourishes +- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback +- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic +- **Remove animations entirely** if they're not serving a clear purpose + +### Composition Refinement +- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling +- **Align to grid**: Bring rogue elements back into systematic alignment +- **Even out spacing**: Replace extreme spacing variations with consistent rhythm + +**NEVER**: +- Make everything the same size/weight (hierarchy still matters) +- Remove all color (quiet ≠ grayscale) +- Eliminate all personality (maintain character through refinement) +- Sacrifice usability for aesthetics (functional elements still need clear affordances) +- Make everything small and light (some anchors needed) + +## Verify Quality + +Ensure refinement maintains quality: + +- **Still functional**: Can users still accomplish tasks easily? +- **Still distinctive**: Does it have character, or is it generic now? +- **Better reading**: Is text easier to read for extended periods? +- **Sophistication**: Does it feel more refined and premium? + +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.pi/skills/impeccable/reference/shape.md b/.pi/skills/impeccable/reference/shape.md new file mode 100644 index 000000000..0ae281943 --- /dev/null +++ b/.pi/skills/impeccable/reference/shape.md @@ -0,0 +1,82 @@ +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. + +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. + +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. + +## Philosophy + +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. + +## Phase 1: Discovery Interview + +**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. + +Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. + +### Purpose & Context +- What is this feature for? What problem does it solve? +- Who specifically will use it? (Not "users"; be specific: role, context, frequency) +- What does success look like? How will you know this feature is working? +- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) + +### Content & Data +- What content or data does this feature display or collect? +- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) +- What are the edge cases? (Empty state, error state, first-time use, power user) +- Is any content dynamic? What changes and how often? + +### Design Goals +- What's the single most important thing a user should do or understand here? +- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) +- Are there existing patterns in the product this should be consistent with? +- Are there specific examples (inside or outside the product) that capture what you're going for? + +### Constraints +- Are there technical constraints? (Framework, performance budget, browser support) +- Are there content constraints? (Localization, dynamic text length, user-generated content) +- Mobile/responsive requirements? +- Accessibility requirements beyond WCAG AA? + +### Anti-Goals +- What should this NOT be? What would be a wrong direction? +- What's the biggest risk of getting this wrong? + +## Phase 2: Design Brief + +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. + +### Brief Structure + +**1. Feature Summary** (2-3 sentences) +What this is, who it's for, what it needs to accomplish. + +**2. Primary User Action** +The single most important thing a user should do or understand here. + +**3. Design Direction** +How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. + +**4. Layout Strategy** +High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. + +**5. Key States** +List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. + +**6. Interaction Model** +How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? + +**7. Content Requirements** +What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. + +**8. Recommended References** +Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). + +**9. Open Questions** +Anything unresolved that the implementer should resolve during build. + +--- + +ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. + +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.pi/skills/impeccable/reference/teach.md b/.pi/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..2d9f768f1 --- /dev/null +++ b/.pi/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.pi/skills/impeccable/reference/typeset.md b/.pi/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.pi/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.pi/skills/impeccable/scripts/cleanup-deprecated.mjs b/.pi/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.pi/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.pi/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.pi/skills/impeccable/scripts/command-metadata.json b/.pi/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.pi/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.pi/skills/impeccable/scripts/pin.mjs b/.pi/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.pi/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.rovodev/skills/adapt/SKILL.md b/.rovodev/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.rovodev/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.rovodev/skills/animate/SKILL.md b/.rovodev/skills/animate/SKILL.md deleted file mode 100644 index 89933bfb5..000000000 --- a/.rovodev/skills/animate/SKILL.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. - ---- - -## Assess Animation Opportunities - -Analyze where motion would improve the experience: - -1. **Identify static areas**: - - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) - - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) - - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious - - **Lack of delight**: Functional but joyless interactions - - **Missed guidance**: Opportunities to direct attention or explain behavior - -2. **Understand the context**: - - What's the personality? (Playful vs serious, energetic vs calm) - - What's the performance budget? (Mobile-first? Complex page?) - - Who's the audience? (Motion-sensitive users? Power users who want speed?) - - What matters most? (One hero animation vs many micro-interactions?) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. - -## Plan Animation Strategy - -Create a purposeful animation plan: - -- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) -- **Feedback layer**: Which interactions need acknowledgment? -- **Transition layer**: Which state changes need smoothing? -- **Delight layer**: Where can we surprise and delight? - -**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. - -## Implement Animations - -Add motion systematically across these categories: - -### Entrance Animations -- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations -- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) -- **Content reveals**: Scroll-triggered animations using intersection observer -- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management - -### Micro-interactions -- **Button feedback**: - - Hover: Subtle scale (1.02-1.05), color shift, shadow increase - - Click: Quick scale down then up (0.95 → 1), ripple effect - - Loading: Spinner or pulse state -- **Form interactions**: - - Input focus: Border color transition, slight scale or glow - - Validation: Shake on error, check mark on success, smooth color transitions -- **Toggle switches**: Smooth slide + color transition (200-300ms) -- **Checkboxes/radio**: Check mark animation, ripple effect -- **Like/favorite**: Scale + rotation, particle effects, color transition - -### State Transitions -- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) -- **Expand/collapse**: Height transition with overflow handling, icon rotation -- **Loading states**: Skeleton screen fades, spinner animations, progress bars -- **Success/error**: Color transitions, icon animations, gentle scale pulse -- **Enable/disable**: Opacity transitions, cursor changes - -### Navigation & Flow -- **Page transitions**: Crossfade between routes, shared element transitions -- **Tab switching**: Slide indicator, content fade/slide -- **Carousel/slider**: Smooth transforms, snap points, momentum -- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators - -### Feedback & Guidance -- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights -- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning -- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation -- **Focus flow**: Highlight path through form or workflow - -### Delight Moments -- **Empty states**: Subtle floating animations on illustrations -- **Completed actions**: Confetti, check mark flourish, success celebrations -- **Easter eggs**: Hidden interactions for discovery -- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches - -## Technical Implementation - -Use appropriate techniques for each animation: - -### Timing & Easing - -**Durations by purpose:** -- **100-150ms**: Instant feedback (button press, toggle) -- **200-300ms**: State changes (hover, menu open) -- **300-500ms**: Layout changes (accordion, modal) -- **500-800ms**: Entrance animations (page load) - -**Easing curves (use these, not CSS defaults):** -```css -/* Recommended - natural deceleration */ ---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ ---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ ---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ - -/* AVOID - feel dated and tacky */ -/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ -/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ -``` - -**Exit animations are faster than entrances.** Use ~75% of enter duration. - -### CSS Animations -```css -/* Prefer for simple, declarative animations */ -- transitions for state changes -- @keyframes for complex sequences -- transform + opacity only (GPU-accelerated) -``` - -### JavaScript Animation -```javascript -/* Use for complex, interactive animations */ -- Web Animations API for programmatic control -- Framer Motion for React -- GSAP for complex sequences -``` - -### Performance -- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties -- **will-change**: Add sparingly for known expensive animations -- **Reduce paint**: Minimize repaints, use `contain` where appropriate -- **Monitor FPS**: Ensure 60fps on target devices - -### Accessibility -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**NEVER**: -- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself -- Animate layout properties (width, height, top, left)—use transform instead -- Use durations over 500ms for feedback—it feels laggy -- Animate without purpose—every animation needs a reason -- Ignore `prefers-reduced-motion`—this is an accessibility violation -- Animate everything—animation fatigue makes interfaces feel exhausting -- Block interaction during animations unless intentional - -## Verify Quality - -Test animations thoroughly: - -- **Smooth at 60fps**: No jank on target devices -- **Feels natural**: Easing curves feel organic, not robotic -- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) -- **Reduced motion works**: Animations disabled or simplified appropriately -- **Doesn't block**: Users can interact during/after animations -- **Adds value**: Makes interface clearer or more delightful - -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file diff --git a/.rovodev/skills/audit/SKILL.md b/.rovodev/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.rovodev/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.rovodev/skills/bolder/SKILL.md b/.rovodev/skills/bolder/SKILL.md deleted file mode 100644 index e80f55ed1..000000000 --- a/.rovodev/skills/bolder/SKILL.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too safe or boring: - -1. **Identify weakness sources**: - - **Generic choices**: System fonts, basic colors, standard layouts - - **Timid scale**: Everything is medium-sized with no drama - - **Low contrast**: Everything has similar visual weight - - **Static**: No motion, no energy, no life - - **Predictable**: Standard patterns with no surprises - - **Flat hierarchy**: Nothing stands out or commands attention - -2. **Understand the context**: - - What's the brand personality? (How far can we push?) - - What's the purpose? (Marketing can be bolder than financial dashboards) - - Who's the audience? (What will resonate?) - - What are the constraints? (Brand guidelines, accessibility, performance) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. - -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." - -## Plan Amplification - -Create a strategy to increase impact while maintaining coherence: - -- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) -- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. -- **Risk budget**: How experimental can we be? Push boundaries within constraints. -- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) - -**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. - -## Amplify the Design - -Systematically increase impact across these dimensions: - -### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) -- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) -- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 -- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) - -### Color Intensification -- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) -- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop -- **Dominant color strategy**: Let one bold color own 60% of the design -- **Sharp accents**: High-contrast accent colors that pop -- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette -- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) - -### Spatial Drama -- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings -- **Break the grid**: Let hero elements escape containers and cross boundaries -- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry -- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) -- **Overlap**: Layer elements intentionally for depth - -### Visual Effects -- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) -- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) -- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) -- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) -- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand - -### Motion & Animation -- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays -- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences -- **Micro-interactions**: Satisfying hover effects, click feedback, state changes -- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) - -### Composition Boldness -- **Hero moments**: Create clear focal points with dramatic treatment -- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements -- **Full-bleed elements**: Use full viewport width/height for impact -- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits - -**NEVER**: -- Add effects randomly without purpose (chaos ≠ bold) -- Sacrifice readability for aesthetics (body text must be readable) -- Make everything bold (then nothing is bold - need contrast) -- Ignore accessibility (bold design must still meet WCAG standards) -- Overwhelm with motion (animation fatigue is real) -- Copy trendy aesthetics blindly (bold means distinctive, not derivative) - -## Verify Quality - -Ensure amplification maintains usability and coherence: - -- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. -- **Still functional**: Can users accomplish tasks without distraction? -- **Coherent**: Does everything feel intentional and unified? -- **Memorable**: Will users remember this experience? -- **Performant**: Do all these effects run smoothly? -- **Accessible**: Does it still meet accessibility standards? - -**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." - -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file diff --git a/.rovodev/skills/clarify/SKILL.md b/.rovodev/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.rovodev/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.rovodev/skills/colorize/SKILL.md b/.rovodev/skills/colorize/SKILL.md deleted file mode 100644 index 76075804f..000000000 --- a/.rovodev/skills/colorize/SKILL.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. - ---- - -## Assess Color Opportunity - -Analyze the current state and identify opportunities: - -1. **Understand current state**: - - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? - - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? - - **Context**: What's appropriate for this domain and audience? - - **Brand**: Are there existing brand colors we should use? - -2. **Identify where color adds value**: - - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) - - **Hierarchy**: Drawing attention to important elements - - **Categorization**: Different sections, types, or states - - **Emotional tone**: Warmth, energy, trust, creativity - - **Wayfinding**: Helping users navigate and understand structure - - **Delight**: Moments of visual interest and personality - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. - -## Plan Color Strategy - -Create a purposeful color introduction plan: - -- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) -- **Dominant color**: Which color owns 60% of colored elements? -- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) -- **Application strategy**: Where does each color appear and why? - -**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. - -## Introduce Color Strategically - -Add color systematically across these dimensions: - -### Semantic Color -- **State indicators**: - - Success: Green tones (emerald, forest, mint) - - Error: Red/pink tones (rose, crimson, coral) - - Warning: Orange/amber tones - - Info: Blue tones (sky, ocean, indigo) - - Neutral: Gray/slate for inactive states - -- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) -- **Progress indicators**: Colored bars, rings, or charts showing completion or health - -### Accent Color Application -- **Primary actions**: Color the most important buttons/CTAs -- **Links**: Add color to clickable text (maintain accessibility) -- **Icons**: Colorize key icons for recognition and personality -- **Headers/titles**: Add color to section headers or key labels -- **Hover states**: Introduce color on interaction - -### Background & Surfaces -- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) -- **Colored sections**: Use subtle background colors to separate areas -- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) -- **Cards & surfaces**: Tint cards or surfaces slightly for warmth - -**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. - -### Data Visualization -- **Charts & graphs**: Use color to encode categories or values -- **Heatmaps**: Color intensity shows density or importance -- **Comparison**: Color coding for different datasets or timeframes - -### Borders & Accents -- **Accent borders**: Add colored left/top borders to cards or sections -- **Underlines**: Color underlines for emphasis or active states -- **Dividers**: Subtle colored dividers instead of gray lines -- **Focus rings**: Colored focus indicators matching brand - -### Typography Color -- **Colored headings**: Use brand colors for section headings (maintain contrast) -- **Highlight text**: Color for emphasis or categories -- **Labels & tags**: Small colored labels for metadata or categories - -### Decorative Elements -- **Illustrations**: Add colored illustrations or icons -- **Shapes**: Geometric shapes in brand colors as background elements -- **Gradients**: Colorful gradient overlays or mesh backgrounds -- **Blobs/organic shapes**: Soft colored shapes for visual interest - -## Balance & Refinement - -Ensure color addition improves rather than overwhelms: - -### Maintain Hierarchy -- **Dominant color** (60%): Primary brand color or most used accent -- **Secondary color** (30%): Supporting color for variety -- **Accent color** (10%): High contrast for key moments -- **Neutrals** (remaining): Gray/black/white for structure - -### Accessibility -- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) -- **Don't rely on color alone**: Use icons, labels, or patterns alongside color -- **Test for color blindness**: Verify red/green combinations work for all users - -### Cohesion -- **Consistent palette**: Use colors from defined palette, not arbitrary choices -- **Systematic application**: Same color meanings throughout (green always = success) -- **Temperature consistency**: Warm palette stays warm, cool stays cool - -**NEVER**: -- Use every color in the rainbow (choose 2-4 colors beyond neutrals) -- Apply color randomly without semantic meaning -- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead -- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication -- Use pure black (`#000`) or pure white (`#fff`) for large areas -- Violate WCAG contrast requirements -- Use color as the only indicator (accessibility issue) -- Make everything colorful (defeats the purpose) -- Default to purple-blue gradients (AI slop aesthetic) - -## Verify Color Addition - -Test that colorization improves the experience: - -- **Better hierarchy**: Does color guide attention appropriately? -- **Clearer meaning**: Does color help users understand states/categories? -- **More engaging**: Does the interface feel warmer and more inviting? -- **Still accessible**: Do all color combinations meet WCAG standards? -- **Not overwhelming**: Is color balanced and purposeful? - -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file diff --git a/.rovodev/skills/delight/SKILL.md b/.rovodev/skills/delight/SKILL.md deleted file mode 100644 index fedebff9c..000000000 --- a/.rovodev/skills/delight/SKILL.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). - ---- - -## Assess Delight Opportunities - -Identify where delight would enhance (not distract from) the experience: - -1. **Find natural delight moments**: - - **Success states**: Completed actions (save, send, publish) - - **Empty states**: First-time experiences, onboarding - - **Loading states**: Waiting periods that could be entertaining - - **Achievements**: Milestones, streaks, completions - - **Interactions**: Hover states, clicks, drags - - **Errors**: Softening frustrating moments - - **Easter eggs**: Hidden discoveries for curious users - -2. **Understand the context**: - - What's the brand personality? (Playful? Professional? Quirky? Elegant?) - - Who's the audience? (Tech-savvy? Creative? Corporate?) - - What's the emotional context? (Accomplishment? Exploration? Frustration?) - - What's appropriate? (Banking app ≠ gaming app) - -3. **Define delight strategy**: - - **Subtle sophistication**: Refined micro-interactions (luxury brands) - - **Playful personality**: Whimsical illustrations and copy (consumer apps) - - **Helpful surprises**: Anticipating needs before users ask (productivity tools) - - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. - -## Delight Principles - -Follow these guidelines: - -### Delight Amplifies, Never Blocks -- Delight moments should be quick (< 1 second) -- Never delay core functionality for delight -- Make delight skippable or subtle -- Respect user's time and task focus - -### Surprise and Discovery -- Hide delightful details for users to discover -- Reward exploration and curiosity -- Don't announce every delight moment -- Let users share discoveries with others - -### Appropriate to Context -- Match delight to emotional moment (celebrate success, empathize with errors) -- Respect the user's state (don't be playful during critical errors) -- Match brand personality and audience expectations -- Cultural sensitivity (what's delightful varies by culture) - -### Compound Over Time -- Delight should remain fresh with repeated use -- Vary responses (not same animation every time) -- Reveal deeper layers with continued use -- Build anticipation through patterns - -## Delight Techniques - -Add personality and joy through these methods: - -### Micro-interactions & Animation - -**Button delight**: -```css -/* Satisfying button press */ -.button { - transition: transform 0.1s, box-shadow 0.1s; -} -.button:active { - transform: translateY(2px); - box-shadow: 0 2px 4px rgba(0,0,0,0.2); -} - -/* Ripple effect on click */ -/* Smooth lift on hover */ -.button:hover { - transform: translateY(-2px); - transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ -} -``` - -**Loading delight**: -- Playful loading animations (not just spinners) -- Personality in loading messages (write product-specific ones, not generic AI filler) -- Progress indication with encouraging messages -- Skeleton screens with subtle animations - -**Success animations**: -- Checkmark draw animation -- Confetti burst for major achievements -- Gentle scale + fade for confirmation -- Satisfying sound effects (subtle) - -**Hover surprises**: -- Icons that animate on hover -- Color shifts or glow effects -- Tooltip reveals with personality -- Cursor changes (custom cursors for branded experiences) - -### Personality in Copy - -**Playful error messages**: -``` -"Error 404" -"This page is playing hide and seek. (And winning)" - -"Connection failed" -"Looks like the internet took a coffee break. Want to retry?" -``` - -**Encouraging empty states**: -``` -"No projects" -"Your canvas awaits. Create something amazing." - -"No messages" -"Inbox zero! You're crushing it today." -``` - -**Playful labels & tooltips**: -``` -"Delete" -"Send to void" (for playful brand) - -"Help" -"Rescue me" (tooltip) -``` - -**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. - -### Illustrations & Visual Personality - -**Custom illustrations**: -- Empty state illustrations (not stock icons) -- Error state illustrations (friendly monsters, quirky characters) -- Loading state illustrations (animated characters) -- Success state illustrations (celebrations) - -**Icon personality**: -- Custom icon set matching brand personality -- Animated icons (subtle motion on hover/click) -- Illustrative icons (more detailed than generic) -- Consistent style across all icons - -**Background effects**: -- Subtle particle effects -- Gradient mesh backgrounds -- Geometric patterns -- Parallax depth -- Time-of-day themes (morning vs night) - -### Satisfying Interactions - -**Drag and drop delight**: -- Lift effect on drag (shadow, scale) -- Snap animation when dropped -- Satisfying placement sound -- Undo toast ("Dropped in wrong place? [Undo]") - -**Toggle switches**: -- Smooth slide with spring physics -- Color transition -- Haptic feedback on mobile -- Optional sound effect - -**Progress & achievements**: -- Streak counters with celebratory milestones -- Progress bars that "celebrate" at 100% -- Badge unlocks with animation -- Playful stats ("You're on fire! 5 days in a row") - -**Form interactions**: -- Input fields that animate on focus -- Checkboxes with a satisfying scale pulse when checked -- Success state that celebrates valid input -- Auto-grow textareas - -### Sound Design - -**Subtle audio cues** (when appropriate): -- Notification sounds (distinctive but not annoying) -- Success sounds (satisfying "ding") -- Error sounds (empathetic, not harsh) -- Typing sounds for chat/messaging -- Ambient background audio (very subtle) - -**IMPORTANT**: -- Respect system sound settings -- Provide mute option -- Keep volumes quiet (subtle cues, not alarms) -- Don't play on every interaction (sound fatigue is real) - -### Easter Eggs & Hidden Delights - -**Discovery rewards**: -- Konami code unlocks special theme -- Hidden keyboard shortcuts (Cmd+K for special features) -- Hover reveals on logos or illustrations -- Alt text jokes on images (for screen reader users too!) -- Console messages for developers ("Like what you see? We're hiring!") - -**Seasonal touches**: -- Holiday themes (subtle, tasteful) -- Seasonal color shifts -- Weather-based variations -- Time-based changes (dark at night, light during day) - -**Contextual personality**: -- Different messages based on time of day -- Responses to specific user actions -- Randomized variations (not same every time) -- Progressive reveals with continued use - -### Loading & Waiting States - -**Make waiting engaging**: -- Interesting loading messages that rotate -- Progress bars with personality -- Mini-games during long loads -- Fun facts or tips while waiting -- Countdown with encouraging messages - -``` -Loading messages — write ones specific to your product, not generic AI filler: -- "Crunching your latest numbers..." -- "Syncing with your team's changes..." -- "Preparing your dashboard..." -- "Checking for updates since yesterday..." -``` - -**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. - -### Celebration Moments - -**Success celebrations**: -- Confetti for major milestones -- Animated checkmarks for completions -- Progress bar celebrations at 100% -- "Achievement unlocked" style notifications -- Personalized messages ("You published your 10th article!") - -**Milestone recognition**: -- First-time actions get special treatment -- Streak tracking and celebration -- Progress toward goals -- Anniversary celebrations - -## Implementation Patterns - -**Animation libraries**: -- Framer Motion (React) -- GSAP (universal) -- Lottie (After Effects animations) -- Canvas confetti (party effects) - -**Sound libraries**: -- Howler.js (audio management) -- Use-sound (React hook) - -**Physics libraries**: -- React Spring (spring physics) -- Popmotion (animation primitives) - -**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. - -**NEVER**: -- Delay core functionality for delight -- Force users through delightful moments (make skippable) -- Use delight to hide poor UX -- Overdo it (less is more) -- Ignore accessibility (animate responsibly, provide alternatives) -- Make every interaction delightful (special moments should be special) -- Sacrifice performance for delight -- Be inappropriate for context (read the room) - -## Verify Delight Quality - -Test that delight actually delights: - -- **User reactions**: Do users smile? Share screenshots? -- **Doesn't annoy**: Still pleasant after 100th time? -- **Doesn't block**: Can users opt out or skip? -- **Performant**: No jank, no slowdown -- **Appropriate**: Matches brand and context -- **Accessible**: Works with reduced motion, screen readers - -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file diff --git a/.rovodev/skills/distill/SKILL.md b/.rovodev/skills/distill/SKILL.md deleted file mode 100644 index f3f721c99..000000000 --- a/.rovodev/skills/distill/SKILL.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel complex or cluttered: - -1. **Identify complexity sources**: - - **Too many elements**: Competing buttons, redundant information, visual clutter - - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose - - **Information overload**: Everything visible at once, no progressive disclosure - - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations - - **Confusing hierarchy**: Unclear what matters most - - **Feature creep**: Too many options, actions, or paths forward - -2. **Find the essence**: - - What's the primary user goal? (There should be ONE) - - What's actually necessary vs nice-to-have? - - What can be removed, hidden, or combined? - - What's the 20% that delivers 80% of value? - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. - -## Plan Simplification - -Create a ruthless editing strategy: - -- **Core purpose**: What's the ONE thing this should accomplish? -- **Essential elements**: What's truly necessary to achieve that purpose? -- **Progressive disclosure**: What can be hidden until needed? -- **Consolidation opportunities**: What can be combined or integrated? - -**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. - -## Simplify the Design - -Systematically remove complexity across these dimensions: - -### Information Architecture -- **Reduce scope**: Remove secondary actions, optional features, redundant information -- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) -- **Combine related actions**: Merge similar buttons, consolidate forms, group related content -- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden -- **Remove redundancy**: If it's said elsewhere, don't repeat it here - -### Visual Simplification -- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors -- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights -- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function -- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards -- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead -- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps - -### Layout Simplification -- **Linear flow**: Replace complex grids with simple vertical flow where possible -- **Remove sidebars**: Move secondary content inline or hide it -- **Full-width**: Use available space generously instead of complex multi-column layouts -- **Consistent alignment**: Pick left or center, stick with it -- **Generous white space**: Let content breathe, don't pack everything tight - -### Interaction Simplification -- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) -- **Smart defaults**: Make common choices automatic, only ask when necessary -- **Inline actions**: Replace modal flows with inline editing where possible -- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? -- **Clear CTAs**: ONE obvious next step, not five competing actions - -### Content Simplification -- **Shorter copy**: Cut every sentence in half, then do it again -- **Active voice**: "Save changes" not "Changes will be saved" -- **Remove jargon**: Plain language always wins -- **Scannable structure**: Short paragraphs, bullet points, clear headings -- **Essential information only**: Remove marketing fluff, legalese, hedging -- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once - -### Code Simplification -- **Remove unused code**: Dead CSS, unused components, orphaned files -- **Flatten component trees**: Reduce nesting depth -- **Consolidate styles**: Merge similar styles, use utilities consistently -- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? - -**NEVER**: -- Remove necessary functionality (simplicity ≠ feature-less) -- Sacrifice accessibility for simplicity (clear labels and ARIA still required) -- Make things so simple they're unclear (mystery ≠ minimalism) -- Remove information users need to make decisions -- Eliminate hierarchy completely (some things should stand out) -- Oversimplify complex domains (match complexity to actual task complexity) - -## Verify Simplification - -Ensure simplification improves usability: - -- **Faster task completion**: Can users accomplish goals more quickly? -- **Reduced cognitive load**: Is it easier to understand what to do? -- **Still complete**: Are all necessary features still accessible? -- **Clearer hierarchy**: Is it obvious what matters most? -- **Better performance**: Does simpler design load faster? - -## Document Removed Complexity - -If you removed features or options: -- Document why they were removed -- Consider if they need alternative access points -- Note any user feedback to monitor - -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file diff --git a/.rovodev/skills/harden/SKILL.md b/.rovodev/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.rovodev/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.rovodev/skills/impeccable/SKILL.md b/.rovodev/skills/impeccable/SKILL.md index 6fe09857d..5a380eafa 100644 --- a/.rovodev/skills/impeccable/SKILL.md +++ b/.rovodev/skills/impeccable/SKILL.md @@ -1,16 +1,20 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. +allowed-tools: + - Bash(npx impeccable *) --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +27,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +36,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +272,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +286,96 @@ Remember: Rovo Dev is capable of extraordinary creative work. Don't hold back. S --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .rovodev/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.rovodev/skills/impeccable/reference/adapt.md b/.rovodev/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.rovodev/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.rovodev/skills/impeccable/reference/animate.md b/.rovodev/skills/impeccable/reference/animate.md new file mode 100644 index 000000000..0186ce081 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/animate.md @@ -0,0 +1,166 @@ +> **Additional context needed**: performance constraints. + +Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. + + +--- + +## Assess Animation Opportunities + +Analyze where motion would improve the experience: + +1. **Identify static areas**: + - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) + - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) + - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious + - **Lack of delight**: Functional but joyless interactions + - **Missed guidance**: Opportunities to direct attention or explain behavior + +2. **Understand the context**: + - What's the personality? (Playful vs serious, energetic vs calm) + - What's the performance budget? (Mobile-first? Complex page?) + - Who's the audience? (Motion-sensitive users? Power users who want speed?) + - What matters most? (One hero animation vs many micro-interactions?) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. + +## Plan Animation Strategy + +Create a purposeful animation plan: + +- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) +- **Feedback layer**: Which interactions need acknowledgment? +- **Transition layer**: Which state changes need smoothing? +- **Delight layer**: Where can we surprise and delight? + +**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. + +## Implement Animations + +Add motion systematically across these categories: + +### Entrance Animations +- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations +- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) +- **Content reveals**: Scroll-triggered animations using intersection observer +- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management + +### Micro-interactions +- **Button feedback**: + - Hover: Subtle scale (1.02-1.05), color shift, shadow increase + - Click: Quick scale down then up (0.95 → 1), ripple effect + - Loading: Spinner or pulse state +- **Form interactions**: + - Input focus: Border color transition, slight scale or glow + - Validation: Shake on error, check mark on success, smooth color transitions +- **Toggle switches**: Smooth slide + color transition (200-300ms) +- **Checkboxes/radio**: Check mark animation, ripple effect +- **Like/favorite**: Scale + rotation, particle effects, color transition + +### State Transitions +- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) +- **Expand/collapse**: Height transition with overflow handling, icon rotation +- **Loading states**: Skeleton screen fades, spinner animations, progress bars +- **Success/error**: Color transitions, icon animations, gentle scale pulse +- **Enable/disable**: Opacity transitions, cursor changes + +### Navigation & Flow +- **Page transitions**: Crossfade between routes, shared element transitions +- **Tab switching**: Slide indicator, content fade/slide +- **Carousel/slider**: Smooth transforms, snap points, momentum +- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators + +### Feedback & Guidance +- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights +- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning +- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation +- **Focus flow**: Highlight path through form or workflow + +### Delight Moments +- **Empty states**: Subtle floating animations on illustrations +- **Completed actions**: Confetti, check mark flourish, success celebrations +- **Easter eggs**: Hidden interactions for discovery +- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches + +## Technical Implementation + +Use appropriate techniques for each animation: + +### Timing & Easing + +**Durations by purpose:** +- **100-150ms**: Instant feedback (button press, toggle) +- **200-300ms**: State changes (hover, menu open) +- **300-500ms**: Layout changes (accordion, modal) +- **500-800ms**: Entrance animations (page load) + +**Easing curves (use these, not CSS defaults):** +```css +/* Recommended - natural deceleration */ +--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ +--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ +--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ + +/* AVOID - feel dated and tacky */ +/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ +/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ +``` + +**Exit animations are faster than entrances.** Use ~75% of enter duration. + +### CSS Animations +```css +/* Prefer for simple, declarative animations */ +- transitions for state changes +- @keyframes for complex sequences +- transform + opacity only (GPU-accelerated) +``` + +### JavaScript Animation +```javascript +/* Use for complex, interactive animations */ +- Web Animations API for programmatic control +- Framer Motion for React +- GSAP for complex sequences +``` + +### Performance +- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties +- **will-change**: Add sparingly for known expensive animations +- **Reduce paint**: Minimize repaints, use `contain` where appropriate +- **Monitor FPS**: Ensure 60fps on target devices + +### Accessibility +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**NEVER**: +- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself +- Animate layout properties (width, height, top, left)—use transform instead +- Use durations over 500ms for feedback—it feels laggy +- Animate without purpose—every animation needs a reason +- Ignore `prefers-reduced-motion`—this is an accessibility violation +- Animate everything—animation fatigue makes interfaces feel exhausting +- Block interaction during animations unless intentional + +## Verify Quality + +Test animations thoroughly: + +- **Smooth at 60fps**: No jank on target devices +- **Feels natural**: Easing curves feel organic, not robotic +- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) +- **Reduced motion works**: Animations disabled or simplified appropriately +- **Doesn't block**: Users can interact during/after animations +- **Adds value**: Makes interface clearer or more delightful + +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.rovodev/skills/impeccable/reference/audit.md b/.rovodev/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.rovodev/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.rovodev/skills/impeccable/reference/bolder.md b/.rovodev/skills/impeccable/reference/bolder.md new file mode 100644 index 000000000..cb3481663 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/bolder.md @@ -0,0 +1,106 @@ +Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. + + +--- + +## Assess Current State + +Analyze what makes the design feel too safe or boring: + +1. **Identify weakness sources**: + - **Generic choices**: System fonts, basic colors, standard layouts + - **Timid scale**: Everything is medium-sized with no drama + - **Low contrast**: Everything has similar visual weight + - **Static**: No motion, no energy, no life + - **Predictable**: Standard patterns with no surprises + - **Flat hierarchy**: Nothing stands out or commands attention + +2. **Understand the context**: + - What's the brand personality? (How far can we push?) + - What's the purpose? (Marketing can be bolder than financial dashboards) + - Who's the audience? (What will resonate?) + - What are the constraints? (Brand guidelines, accessibility, performance) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. + +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." + +## Plan Amplification + +Create a strategy to increase impact while maintaining coherence: + +- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) +- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. +- **Risk budget**: How experimental can we be? Push boundaries within constraints. +- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) + +**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. + +## Amplify the Design + +Systematically increase impact across these dimensions: + +### Typography Amplification +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) +- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) +- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 +- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) + +### Color Intensification +- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) +- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop +- **Dominant color strategy**: Let one bold color own 60% of the design +- **Sharp accents**: High-contrast accent colors that pop +- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette +- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) + +### Spatial Drama +- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings +- **Break the grid**: Let hero elements escape containers and cross boundaries +- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry +- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) +- **Overlap**: Layer elements intentionally for depth + +### Visual Effects +- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) +- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) +- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) +- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) +- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand + +### Motion & Animation +- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays +- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences +- **Micro-interactions**: Satisfying hover effects, click feedback, state changes +- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) + +### Composition Boldness +- **Hero moments**: Create clear focal points with dramatic treatment +- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements +- **Full-bleed elements**: Use full viewport width/height for impact +- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits + +**NEVER**: +- Add effects randomly without purpose (chaos ≠ bold) +- Sacrifice readability for aesthetics (body text must be readable) +- Make everything bold (then nothing is bold - need contrast) +- Ignore accessibility (bold design must still meet WCAG standards) +- Overwhelm with motion (animation fatigue is real) +- Copy trendy aesthetics blindly (bold means distinctive, not derivative) + +## Verify Quality + +Ensure amplification maintains usability and coherence: + +- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. +- **Still functional**: Can users accomplish tasks without distraction? +- **Coherent**: Does everything feel intentional and unified? +- **Memorable**: Will users remember this experience? +- **Performant**: Do all these effects run smoothly? +- **Accessible**: Does it still meet accessibility standards? + +**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." + +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.rovodev/skills/impeccable/reference/clarify.md b/.rovodev/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.rovodev/skills/critique/reference/cognitive-load.md b/.rovodev/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .rovodev/skills/critique/reference/cognitive-load.md rename to .rovodev/skills/impeccable/reference/cognitive-load.md diff --git a/.rovodev/skills/impeccable/reference/colorize.md b/.rovodev/skills/impeccable/reference/colorize.md new file mode 100644 index 000000000..a4ce5072e --- /dev/null +++ b/.rovodev/skills/impeccable/reference/colorize.md @@ -0,0 +1,134 @@ +> **Additional context needed**: existing brand colors. + +Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. + + +--- + +## Assess Color Opportunity + +Analyze the current state and identify opportunities: + +1. **Understand current state**: + - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? + - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? + - **Context**: What's appropriate for this domain and audience? + - **Brand**: Are there existing brand colors we should use? + +2. **Identify where color adds value**: + - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) + - **Hierarchy**: Drawing attention to important elements + - **Categorization**: Different sections, types, or states + - **Emotional tone**: Warmth, energy, trust, creativity + - **Wayfinding**: Helping users navigate and understand structure + - **Delight**: Moments of visual interest and personality + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. + +## Plan Color Strategy + +Create a purposeful color introduction plan: + +- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) +- **Dominant color**: Which color owns 60% of colored elements? +- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) +- **Application strategy**: Where does each color appear and why? + +**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. + +## Introduce Color Strategically + +Add color systematically across these dimensions: + +### Semantic Color +- **State indicators**: + - Success: Green tones (emerald, forest, mint) + - Error: Red/pink tones (rose, crimson, coral) + - Warning: Orange/amber tones + - Info: Blue tones (sky, ocean, indigo) + - Neutral: Gray/slate for inactive states + +- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) +- **Progress indicators**: Colored bars, rings, or charts showing completion or health + +### Accent Color Application +- **Primary actions**: Color the most important buttons/CTAs +- **Links**: Add color to clickable text (maintain accessibility) +- **Icons**: Colorize key icons for recognition and personality +- **Headers/titles**: Add color to section headers or key labels +- **Hover states**: Introduce color on interaction + +### Background & Surfaces +- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) +- **Colored sections**: Use subtle background colors to separate areas +- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) +- **Cards & surfaces**: Tint cards or surfaces slightly for warmth + +**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. + +### Data Visualization +- **Charts & graphs**: Use color to encode categories or values +- **Heatmaps**: Color intensity shows density or importance +- **Comparison**: Color coding for different datasets or timeframes + +### Borders & Accents +- **Accent borders**: Add colored left/top borders to cards or sections +- **Underlines**: Color underlines for emphasis or active states +- **Dividers**: Subtle colored dividers instead of gray lines +- **Focus rings**: Colored focus indicators matching brand + +### Typography Color +- **Colored headings**: Use brand colors for section headings (maintain contrast) +- **Highlight text**: Color for emphasis or categories +- **Labels & tags**: Small colored labels for metadata or categories + +### Decorative Elements +- **Illustrations**: Add colored illustrations or icons +- **Shapes**: Geometric shapes in brand colors as background elements +- **Gradients**: Colorful gradient overlays or mesh backgrounds +- **Blobs/organic shapes**: Soft colored shapes for visual interest + +## Balance & Refinement + +Ensure color addition improves rather than overwhelms: + +### Maintain Hierarchy +- **Dominant color** (60%): Primary brand color or most used accent +- **Secondary color** (30%): Supporting color for variety +- **Accent color** (10%): High contrast for key moments +- **Neutrals** (remaining): Gray/black/white for structure + +### Accessibility +- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) +- **Don't rely on color alone**: Use icons, labels, or patterns alongside color +- **Test for color blindness**: Verify red/green combinations work for all users + +### Cohesion +- **Consistent palette**: Use colors from defined palette, not arbitrary choices +- **Systematic application**: Same color meanings throughout (green always = success) +- **Temperature consistency**: Warm palette stays warm, cool stays cool + +**NEVER**: +- Use every color in the rainbow (choose 2-4 colors beyond neutrals) +- Apply color randomly without semantic meaning +- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead +- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication +- Use pure black (`#000`) or pure white (`#fff`) for large areas +- Violate WCAG contrast requirements +- Use color as the only indicator (accessibility issue) +- Make everything colorful (defeats the purpose) +- Default to purple-blue gradients (AI slop aesthetic) + +## Verify Color Addition + +Test that colorization improves the experience: + +- **Better hierarchy**: Does color guide attention appropriately? +- **Clearer meaning**: Does color help users understand states/categories? +- **More engaging**: Does the interface feel warmer and more inviting? +- **Still accessible**: Do all color combinations meet WCAG standards? +- **Not overwhelming**: Is color balanced and purposeful? + +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.rovodev/skills/impeccable/reference/craft.md b/.rovodev/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.rovodev/skills/impeccable/reference/craft.md +++ b/.rovodev/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.rovodev/skills/critique/SKILL.md b/.rovodev/skills/impeccable/reference/critique.md similarity index 84% rename from .rovodev/skills/critique/SKILL.md rename to .rovodev/skills/impeccable/reference/critique.md index 772383bfa..c282a6c80 100644 --- a/.rovodev/skills/critique/SKILL.md +++ b/.rovodev/skills/impeccable/reference/critique.md @@ -1,20 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" -allowed-tools: - - Bash(npx impeccable *) ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -32,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -46,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -96,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -142,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `AGENTS.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -178,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -198,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -211,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.rovodev/skills/impeccable/reference/delight.md b/.rovodev/skills/impeccable/reference/delight.md new file mode 100644 index 000000000..8a781e70e --- /dev/null +++ b/.rovodev/skills/impeccable/reference/delight.md @@ -0,0 +1,295 @@ +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). + +Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. + + +--- + +## Assess Delight Opportunities + +Identify where delight would enhance (not distract from) the experience: + +1. **Find natural delight moments**: + - **Success states**: Completed actions (save, send, publish) + - **Empty states**: First-time experiences, onboarding + - **Loading states**: Waiting periods that could be entertaining + - **Achievements**: Milestones, streaks, completions + - **Interactions**: Hover states, clicks, drags + - **Errors**: Softening frustrating moments + - **Easter eggs**: Hidden discoveries for curious users + +2. **Understand the context**: + - What's the brand personality? (Playful? Professional? Quirky? Elegant?) + - Who's the audience? (Tech-savvy? Creative? Corporate?) + - What's the emotional context? (Accomplishment? Exploration? Frustration?) + - What's appropriate? (Banking app ≠ gaming app) + +3. **Define delight strategy**: + - **Subtle sophistication**: Refined micro-interactions (luxury brands) + - **Playful personality**: Whimsical illustrations and copy (consumer apps) + - **Helpful surprises**: Anticipating needs before users ask (productivity tools) + - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. + +## Delight Principles + +Follow these guidelines: + +### Delight Amplifies, Never Blocks +- Delight moments should be quick (< 1 second) +- Never delay core functionality for delight +- Make delight skippable or subtle +- Respect user's time and task focus + +### Surprise and Discovery +- Hide delightful details for users to discover +- Reward exploration and curiosity +- Don't announce every delight moment +- Let users share discoveries with others + +### Appropriate to Context +- Match delight to emotional moment (celebrate success, empathize with errors) +- Respect the user's state (don't be playful during critical errors) +- Match brand personality and audience expectations +- Cultural sensitivity (what's delightful varies by culture) + +### Compound Over Time +- Delight should remain fresh with repeated use +- Vary responses (not same animation every time) +- Reveal deeper layers with continued use +- Build anticipation through patterns + +## Delight Techniques + +Add personality and joy through these methods: + +### Micro-interactions & Animation + +**Button delight**: +```css +/* Satisfying button press */ +.button { + transition: transform 0.1s, box-shadow 0.1s; +} +.button:active { + transform: translateY(2px); + box-shadow: 0 2px 4px rgba(0,0,0,0.2); +} + +/* Ripple effect on click */ +/* Smooth lift on hover */ +.button:hover { + transform: translateY(-2px); + transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ +} +``` + +**Loading delight**: +- Playful loading animations (not just spinners) +- Personality in loading messages (write product-specific ones, not generic AI filler) +- Progress indication with encouraging messages +- Skeleton screens with subtle animations + +**Success animations**: +- Checkmark draw animation +- Confetti burst for major achievements +- Gentle scale + fade for confirmation +- Satisfying sound effects (subtle) + +**Hover surprises**: +- Icons that animate on hover +- Color shifts or glow effects +- Tooltip reveals with personality +- Cursor changes (custom cursors for branded experiences) + +### Personality in Copy + +**Playful error messages**: +``` +"Error 404" +"This page is playing hide and seek. (And winning)" + +"Connection failed" +"Looks like the internet took a coffee break. Want to retry?" +``` + +**Encouraging empty states**: +``` +"No projects" +"Your canvas awaits. Create something amazing." + +"No messages" +"Inbox zero! You're crushing it today." +``` + +**Playful labels & tooltips**: +``` +"Delete" +"Send to void" (for playful brand) + +"Help" +"Rescue me" (tooltip) +``` + +**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. + +### Illustrations & Visual Personality + +**Custom illustrations**: +- Empty state illustrations (not stock icons) +- Error state illustrations (friendly monsters, quirky characters) +- Loading state illustrations (animated characters) +- Success state illustrations (celebrations) + +**Icon personality**: +- Custom icon set matching brand personality +- Animated icons (subtle motion on hover/click) +- Illustrative icons (more detailed than generic) +- Consistent style across all icons + +**Background effects**: +- Subtle particle effects +- Gradient mesh backgrounds +- Geometric patterns +- Parallax depth +- Time-of-day themes (morning vs night) + +### Satisfying Interactions + +**Drag and drop delight**: +- Lift effect on drag (shadow, scale) +- Snap animation when dropped +- Satisfying placement sound +- Undo toast ("Dropped in wrong place? [Undo]") + +**Toggle switches**: +- Smooth slide with spring physics +- Color transition +- Haptic feedback on mobile +- Optional sound effect + +**Progress & achievements**: +- Streak counters with celebratory milestones +- Progress bars that "celebrate" at 100% +- Badge unlocks with animation +- Playful stats ("You're on fire! 5 days in a row") + +**Form interactions**: +- Input fields that animate on focus +- Checkboxes with a satisfying scale pulse when checked +- Success state that celebrates valid input +- Auto-grow textareas + +### Sound Design + +**Subtle audio cues** (when appropriate): +- Notification sounds (distinctive but not annoying) +- Success sounds (satisfying "ding") +- Error sounds (empathetic, not harsh) +- Typing sounds for chat/messaging +- Ambient background audio (very subtle) + +**IMPORTANT**: +- Respect system sound settings +- Provide mute option +- Keep volumes quiet (subtle cues, not alarms) +- Don't play on every interaction (sound fatigue is real) + +### Easter Eggs & Hidden Delights + +**Discovery rewards**: +- Konami code unlocks special theme +- Hidden keyboard shortcuts (Cmd+K for special features) +- Hover reveals on logos or illustrations +- Alt text jokes on images (for screen reader users too!) +- Console messages for developers ("Like what you see? We're hiring!") + +**Seasonal touches**: +- Holiday themes (subtle, tasteful) +- Seasonal color shifts +- Weather-based variations +- Time-based changes (dark at night, light during day) + +**Contextual personality**: +- Different messages based on time of day +- Responses to specific user actions +- Randomized variations (not same every time) +- Progressive reveals with continued use + +### Loading & Waiting States + +**Make waiting engaging**: +- Interesting loading messages that rotate +- Progress bars with personality +- Mini-games during long loads +- Fun facts or tips while waiting +- Countdown with encouraging messages + +``` +Loading messages — write ones specific to your product, not generic AI filler: +- "Crunching your latest numbers..." +- "Syncing with your team's changes..." +- "Preparing your dashboard..." +- "Checking for updates since yesterday..." +``` + +**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. + +### Celebration Moments + +**Success celebrations**: +- Confetti for major milestones +- Animated checkmarks for completions +- Progress bar celebrations at 100% +- "Achievement unlocked" style notifications +- Personalized messages ("You published your 10th article!") + +**Milestone recognition**: +- First-time actions get special treatment +- Streak tracking and celebration +- Progress toward goals +- Anniversary celebrations + +## Implementation Patterns + +**Animation libraries**: +- Framer Motion (React) +- GSAP (universal) +- Lottie (After Effects animations) +- Canvas confetti (party effects) + +**Sound libraries**: +- Howler.js (audio management) +- Use-sound (React hook) + +**Physics libraries**: +- React Spring (spring physics) +- Popmotion (animation primitives) + +**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. + +**NEVER**: +- Delay core functionality for delight +- Force users through delightful moments (make skippable) +- Use delight to hide poor UX +- Overdo it (less is more) +- Ignore accessibility (animate responsibly, provide alternatives) +- Make every interaction delightful (special moments should be special) +- Sacrifice performance for delight +- Be inappropriate for context (read the room) + +## Verify Delight Quality + +Test that delight actually delights: + +- **User reactions**: Do users smile? Share screenshots? +- **Doesn't annoy**: Still pleasant after 100th time? +- **Doesn't block**: Can users opt out or skip? +- **Performant**: No jank, no slowdown +- **Appropriate**: Matches brand and context +- **Accessible**: Works with reduced motion, screen readers + +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.rovodev/skills/impeccable/reference/distill.md b/.rovodev/skills/impeccable/reference/distill.md new file mode 100644 index 000000000..4f47dc0b4 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/distill.md @@ -0,0 +1,111 @@ +Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. + + +--- + +## Assess Current State + +Analyze what makes the design feel complex or cluttered: + +1. **Identify complexity sources**: + - **Too many elements**: Competing buttons, redundant information, visual clutter + - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose + - **Information overload**: Everything visible at once, no progressive disclosure + - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations + - **Confusing hierarchy**: Unclear what matters most + - **Feature creep**: Too many options, actions, or paths forward + +2. **Find the essence**: + - What's the primary user goal? (There should be ONE) + - What's actually necessary vs nice-to-have? + - What can be removed, hidden, or combined? + - What's the 20% that delivers 80% of value? + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. + +## Plan Simplification + +Create a ruthless editing strategy: + +- **Core purpose**: What's the ONE thing this should accomplish? +- **Essential elements**: What's truly necessary to achieve that purpose? +- **Progressive disclosure**: What can be hidden until needed? +- **Consolidation opportunities**: What can be combined or integrated? + +**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. + +## Simplify the Design + +Systematically remove complexity across these dimensions: + +### Information Architecture +- **Reduce scope**: Remove secondary actions, optional features, redundant information +- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) +- **Combine related actions**: Merge similar buttons, consolidate forms, group related content +- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden +- **Remove redundancy**: If it's said elsewhere, don't repeat it here + +### Visual Simplification +- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors +- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights +- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function +- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards +- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead +- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps + +### Layout Simplification +- **Linear flow**: Replace complex grids with simple vertical flow where possible +- **Remove sidebars**: Move secondary content inline or hide it +- **Full-width**: Use available space generously instead of complex multi-column layouts +- **Consistent alignment**: Pick left or center, stick with it +- **Generous white space**: Let content breathe, don't pack everything tight + +### Interaction Simplification +- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) +- **Smart defaults**: Make common choices automatic, only ask when necessary +- **Inline actions**: Replace modal flows with inline editing where possible +- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? +- **Clear CTAs**: ONE obvious next step, not five competing actions + +### Content Simplification +- **Shorter copy**: Cut every sentence in half, then do it again +- **Active voice**: "Save changes" not "Changes will be saved" +- **Remove jargon**: Plain language always wins +- **Scannable structure**: Short paragraphs, bullet points, clear headings +- **Essential information only**: Remove marketing fluff, legalese, hedging +- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once + +### Code Simplification +- **Remove unused code**: Dead CSS, unused components, orphaned files +- **Flatten component trees**: Reduce nesting depth +- **Consolidate styles**: Merge similar styles, use utilities consistently +- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? + +**NEVER**: +- Remove necessary functionality (simplicity ≠ feature-less) +- Sacrifice accessibility for simplicity (clear labels and ARIA still required) +- Make things so simple they're unclear (mystery ≠ minimalism) +- Remove information users need to make decisions +- Eliminate hierarchy completely (some things should stand out) +- Oversimplify complex domains (match complexity to actual task complexity) + +## Verify Simplification + +Ensure simplification improves usability: + +- **Faster task completion**: Can users accomplish goals more quickly? +- **Reduced cognitive load**: Is it easier to understand what to do? +- **Still complete**: Are all necessary features still accessible? +- **Clearer hierarchy**: Is it obvious what matters most? +- **Better performance**: Does simpler design load faster? + +## Document Removed Complexity + +If you removed features or options: +- Document why they were removed +- Consider if they need alternative access points +- Note any user feedback to monitor + +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.rovodev/skills/impeccable/reference/harden.md b/.rovodev/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.rovodev/skills/critique/reference/heuristics-scoring.md b/.rovodev/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .rovodev/skills/critique/reference/heuristics-scoring.md rename to .rovodev/skills/impeccable/reference/heuristics-scoring.md diff --git a/.rovodev/skills/impeccable/reference/layout.md b/.rovodev/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.rovodev/skills/impeccable/reference/optimize.md b/.rovodev/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.rovodev/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.rovodev/skills/impeccable/reference/overdrive.md b/.rovodev/skills/impeccable/reference/overdrive.md new file mode 100644 index 000000000..d84a147dc --- /dev/null +++ b/.rovodev/skills/impeccable/reference/overdrive.md @@ -0,0 +1,130 @@ +Start your response with: + +``` +──────────── ⚡ OVERDRIVE ───────────── +》》》 Entering overdrive mode... +``` + +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. + +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. + +### Propose Before Building + +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: + +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). +3. Only proceed with the direction the user confirms. + +Skipping this step risks building something embarrassing that needs to be thrown away. + +### Iterate with Browser Automation + +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. + +--- + +## Assess What "Extraordinary" Means Here + +The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** + +### For visual/marketing surfaces +Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. + +### For functional UI +Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. + +### For performance-critical UI +The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. + +### For data-heavy interfaces +Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. + +**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. + +## The Toolkit + +Organized by what you're trying to achieve, not by technology name. + +### Make transitions feel cinematic +- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. +- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes +- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. + +### Tie animation to scroll position +- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) + +### Render beyond CSS +- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. +- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. +- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. +- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. + +### Make data feel alive +- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. +- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. +- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. + +### Animate complex properties +- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. +- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. + +### Push performance boundaries +- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. +- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. +- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. + +### Interact with the device +- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. +- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. + +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. + +## Implement with Discipline + +### Progressive enhancement is non-negotiable + +Every technique must degrade gracefully. The experience without the enhancement must still be good. + +```css +@supports (animation-timeline: scroll()) { + .hero { animation-timeline: scroll(); } +} +``` + +```javascript +if ('gpu' in navigator) { /* WebGPU */ } +else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } +/* CSS-only fallback must still look good */ +``` + +### Performance rules + +- Target 60fps. If dropping below 50, simplify. +- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. +- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. +- Pause off-screen rendering. Kill what you can't see. +- Test on real mid-range devices, not just your development machine. + +### Polish is the difference + +The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. + +**NEVER**: +- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion +- Ship effects that cause jank on mid-range devices +- Use bleeding-edge APIs without a functional fallback +- Add sound without explicit user opt-in +- Use technical ambition to mask weak design fundamentals; fix those first with other commands +- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise + +## Verify the Result + +- **The wow test**: Show it to someone who hasn't seen it. Do they react? +- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? +- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? +- **The accessibility test**: Enable reduced motion. Still beautiful? +- **The context test**: Does this make sense for THIS brand and audience? + +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.rovodev/skills/critique/reference/personas.md b/.rovodev/skills/impeccable/reference/personas.md similarity index 100% rename from .rovodev/skills/critique/reference/personas.md rename to .rovodev/skills/impeccable/reference/personas.md diff --git a/.rovodev/skills/impeccable/reference/polish.md b/.rovodev/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.rovodev/skills/impeccable/reference/quieter.md b/.rovodev/skills/impeccable/reference/quieter.md new file mode 100644 index 000000000..a8ad41809 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/quieter.md @@ -0,0 +1,92 @@ +Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. + + +--- + +## Assess Current State + +Analyze what makes the design feel too intense: + +1. **Identify intensity sources**: + - **Color saturation**: Overly bright or saturated colors + - **Contrast extremes**: Too much high-contrast juxtaposition + - **Visual weight**: Too many bold, heavy elements competing + - **Animation excess**: Too much motion or overly dramatic effects + - **Complexity**: Too many visual elements, patterns, or decorations + - **Scale**: Everything is large and loud with no hierarchy + +2. **Understand the context**: + - What's the purpose? (Marketing vs tool vs reading experience) + - Who's the audience? (Some contexts need energy) + - What's working? (Don't throw away good ideas) + - What's the core message? (Preserve what matters) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. + +## Plan Refinement + +Create a strategy to reduce intensity while maintaining impact: + +- **Color approach**: Desaturate or shift to more sophisticated tones? +- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? +- **Simplification approach**: What can be removed entirely? +- **Sophistication approach**: How can we signal quality through restraint? + +**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. + +## Refine the Design + +Systematically reduce intensity across these dimensions: + +### Color Refinement +- **Reduce saturation**: Shift from fully saturated to 70-85% saturation +- **Soften palette**: Replace bright colors with muted, sophisticated tones +- **Reduce color variety**: Use fewer colors more thoughtfully +- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) +- **Gentler contrasts**: High contrast only where it matters most +- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness +- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead + +### Visual Weight Reduction +- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate +- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness +- **White space**: Increase breathing room, reduce density +- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely + +### Simplification +- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose +- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes +- **Reduce layering**: Flatten visual hierarchy where possible +- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows + +### Motion Reduction +- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing +- **Remove decorative animations**: Keep functional motion, remove flourishes +- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback +- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic +- **Remove animations entirely** if they're not serving a clear purpose + +### Composition Refinement +- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling +- **Align to grid**: Bring rogue elements back into systematic alignment +- **Even out spacing**: Replace extreme spacing variations with consistent rhythm + +**NEVER**: +- Make everything the same size/weight (hierarchy still matters) +- Remove all color (quiet ≠ grayscale) +- Eliminate all personality (maintain character through refinement) +- Sacrifice usability for aesthetics (functional elements still need clear affordances) +- Make everything small and light (some anchors needed) + +## Verify Quality + +Ensure refinement maintains quality: + +- **Still functional**: Can users still accomplish tasks easily? +- **Still distinctive**: Does it have character, or is it generic now? +- **Better reading**: Is text easier to read for extended periods? +- **Sophistication**: Does it feel more refined and premium? + +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.rovodev/skills/impeccable/reference/shape.md b/.rovodev/skills/impeccable/reference/shape.md new file mode 100644 index 000000000..0ae281943 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/shape.md @@ -0,0 +1,82 @@ +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. + +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. + +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. + +## Philosophy + +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. + +## Phase 1: Discovery Interview + +**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. + +Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. + +### Purpose & Context +- What is this feature for? What problem does it solve? +- Who specifically will use it? (Not "users"; be specific: role, context, frequency) +- What does success look like? How will you know this feature is working? +- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) + +### Content & Data +- What content or data does this feature display or collect? +- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) +- What are the edge cases? (Empty state, error state, first-time use, power user) +- Is any content dynamic? What changes and how often? + +### Design Goals +- What's the single most important thing a user should do or understand here? +- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) +- Are there existing patterns in the product this should be consistent with? +- Are there specific examples (inside or outside the product) that capture what you're going for? + +### Constraints +- Are there technical constraints? (Framework, performance budget, browser support) +- Are there content constraints? (Localization, dynamic text length, user-generated content) +- Mobile/responsive requirements? +- Accessibility requirements beyond WCAG AA? + +### Anti-Goals +- What should this NOT be? What would be a wrong direction? +- What's the biggest risk of getting this wrong? + +## Phase 2: Design Brief + +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. + +### Brief Structure + +**1. Feature Summary** (2-3 sentences) +What this is, who it's for, what it needs to accomplish. + +**2. Primary User Action** +The single most important thing a user should do or understand here. + +**3. Design Direction** +How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. + +**4. Layout Strategy** +High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. + +**5. Key States** +List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. + +**6. Interaction Model** +How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? + +**7. Content Requirements** +What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. + +**8. Recommended References** +Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). + +**9. Open Questions** +Anything unresolved that the implementer should resolve during build. + +--- + +ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. + +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.rovodev/skills/impeccable/reference/teach.md b/.rovodev/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..2d9f768f1 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to AGENTS.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.rovodev/skills/impeccable/reference/typeset.md b/.rovodev/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.rovodev/skills/impeccable/scripts/cleanup-deprecated.mjs b/.rovodev/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.rovodev/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.rovodev/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.rovodev/skills/impeccable/scripts/command-metadata.json b/.rovodev/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.rovodev/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.rovodev/skills/impeccable/scripts/pin.mjs b/.rovodev/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.rovodev/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.rovodev/skills/layout/SKILL.md b/.rovodev/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.rovodev/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.rovodev/skills/optimize/SKILL.md b/.rovodev/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.rovodev/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.rovodev/skills/overdrive/SKILL.md b/.rovodev/skills/overdrive/SKILL.md deleted file mode 100644 index 862a4c9c4..000000000 --- a/.rovodev/skills/overdrive/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Start your response with: - -``` -──────────── ⚡ OVERDRIVE ───────────── -》》》 Entering overdrive mode... -``` - -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. - -### Propose Before Building - -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: - -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. -2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). -3. Only proceed with the direction the user confirms. - -Skipping this step risks building something embarrassing that needs to be thrown away. - -### Iterate with Browser Automation - -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. - ---- - -## Assess What "Extraordinary" Means Here - -The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** - -### For visual/marketing surfaces -Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. - -### For functional UI -Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. - -### For performance-critical UI -The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. - -### For data-heavy interfaces -Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. - -**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. - -## The Toolkit - -Organized by what you're trying to achieve, not by technology name. - -### Make transitions feel cinematic -- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. -- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes -- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. - -### Tie animation to scroll position -- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) - -### Render beyond CSS -- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. -- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. -- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. -- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. - -### Make data feel alive -- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. -- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. -- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. - -### Animate complex properties -- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. -- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. - -### Push performance boundaries -- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. -- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. -- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. - -### Interact with the device -- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. -- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. - -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. - -## Implement with Discipline - -### Progressive enhancement is non-negotiable - -Every technique must degrade gracefully. The experience without the enhancement must still be good. - -```css -@supports (animation-timeline: scroll()) { - .hero { animation-timeline: scroll(); } -} -``` - -```javascript -if ('gpu' in navigator) { /* WebGPU */ } -else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } -/* CSS-only fallback must still look good */ -``` - -### Performance rules - -- Target 60fps. If dropping below 50, simplify. -- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. -- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. -- Pause off-screen rendering. Kill what you can't see. -- Test on real mid-range devices, not just your development machine. - -### Polish is the difference - -The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. - -**NEVER**: -- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion -- Ship effects that cause jank on mid-range devices -- Use bleeding-edge APIs without a functional fallback -- Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills -- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise - -## Verify the Result - -- **The wow test**: Show it to someone who hasn't seen it. Do they react? -- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? -- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? -- **The accessibility test**: Enable reduced motion. Still beautiful? -- **The context test**: Does this make sense for THIS brand and audience? - -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file diff --git a/.rovodev/skills/polish/SKILL.md b/.rovodev/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.rovodev/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.rovodev/skills/quieter/SKILL.md b/.rovodev/skills/quieter/SKILL.md deleted file mode 100644 index 373ae6869..000000000 --- a/.rovodev/skills/quieter/SKILL.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too intense: - -1. **Identify intensity sources**: - - **Color saturation**: Overly bright or saturated colors - - **Contrast extremes**: Too much high-contrast juxtaposition - - **Visual weight**: Too many bold, heavy elements competing - - **Animation excess**: Too much motion or overly dramatic effects - - **Complexity**: Too many visual elements, patterns, or decorations - - **Scale**: Everything is large and loud with no hierarchy - -2. **Understand the context**: - - What's the purpose? (Marketing vs tool vs reading experience) - - Who's the audience? (Some contexts need energy) - - What's working? (Don't throw away good ideas) - - What's the core message? (Preserve what matters) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. - -## Plan Refinement - -Create a strategy to reduce intensity while maintaining impact: - -- **Color approach**: Desaturate or shift to more sophisticated tones? -- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? -- **Simplification approach**: What can be removed entirely? -- **Sophistication approach**: How can we signal quality through restraint? - -**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. - -## Refine the Design - -Systematically reduce intensity across these dimensions: - -### Color Refinement -- **Reduce saturation**: Shift from fully saturated to 70-85% saturation -- **Soften palette**: Replace bright colors with muted, sophisticated tones -- **Reduce color variety**: Use fewer colors more thoughtfully -- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) -- **Gentler contrasts**: High contrast only where it matters most -- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness -- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead - -### Visual Weight Reduction -- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate -- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness -- **White space**: Increase breathing room, reduce density -- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely - -### Simplification -- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose -- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes -- **Reduce layering**: Flatten visual hierarchy where possible -- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows - -### Motion Reduction -- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing -- **Remove decorative animations**: Keep functional motion, remove flourishes -- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback -- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic -- **Remove animations entirely** if they're not serving a clear purpose - -### Composition Refinement -- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling -- **Align to grid**: Bring rogue elements back into systematic alignment -- **Even out spacing**: Replace extreme spacing variations with consistent rhythm - -**NEVER**: -- Make everything the same size/weight (hierarchy still matters) -- Remove all color (quiet ≠ grayscale) -- Eliminate all personality (maintain character through refinement) -- Sacrifice usability for aesthetics (functional elements still need clear affordances) -- Make everything small and light (some anchors needed) - -## Verify Quality - -Ensure refinement maintains quality: - -- **Still functional**: Can users still accomplish tasks easily? -- **Still distinctive**: Does it have character, or is it generic now? -- **Better reading**: Is text easier to read for extended periods? -- **Sophistication**: Does it feel more refined and premium? - -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file diff --git a/.rovodev/skills/shape/SKILL.md b/.rovodev/skills/shape/SKILL.md deleted file mode 100644 index 7e83008b5..000000000 --- a/.rovodev/skills/shape/SKILL.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. - -## Philosophy - -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. - -## Phase 1: Discovery Interview - -**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. - -Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. - -### Purpose & Context -- What is this feature for? What problem does it solve? -- Who specifically will use it? (Not "users"; be specific: role, context, frequency) -- What does success look like? How will you know this feature is working? -- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) - -### Content & Data -- What content or data does this feature display or collect? -- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) -- What are the edge cases? (Empty state, error state, first-time use, power user) -- Is any content dynamic? What changes and how often? - -### Design Goals -- What's the single most important thing a user should do or understand here? -- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) -- Are there existing patterns in the product this should be consistent with? -- Are there specific examples (inside or outside the product) that capture what you're going for? - -### Constraints -- Are there technical constraints? (Framework, performance budget, browser support) -- Are there content constraints? (Localization, dynamic text length, user-generated content) -- Mobile/responsive requirements? -- Accessibility requirements beyond WCAG AA? - -### Anti-Goals -- What should this NOT be? What would be a wrong direction? -- What's the biggest risk of getting this wrong? - -## Phase 2: Design Brief - -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. - -### Brief Structure - -**1. Feature Summary** (2-3 sentences) -What this is, who it's for, what it needs to accomplish. - -**2. Primary User Action** -The single most important thing a user should do or understand here. - -**3. Design Direction** -How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. - -**4. Layout Strategy** -High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. - -**5. Key States** -List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. - -**6. Interaction Model** -How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? - -**7. Content Requirements** -What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. - -**8. Recommended References** -Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). - -**9. Open Questions** -Anything unresolved that the implementer should resolve during build. - ---- - -ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. - -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file diff --git a/.rovodev/skills/typeset/SKILL.md b/.rovodev/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.rovodev/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.trae-cn/skills/adapt/SKILL.md b/.trae-cn/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.trae-cn/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.trae-cn/skills/animate/SKILL.md b/.trae-cn/skills/animate/SKILL.md deleted file mode 100644 index 89933bfb5..000000000 --- a/.trae-cn/skills/animate/SKILL.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. - ---- - -## Assess Animation Opportunities - -Analyze where motion would improve the experience: - -1. **Identify static areas**: - - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) - - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) - - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious - - **Lack of delight**: Functional but joyless interactions - - **Missed guidance**: Opportunities to direct attention or explain behavior - -2. **Understand the context**: - - What's the personality? (Playful vs serious, energetic vs calm) - - What's the performance budget? (Mobile-first? Complex page?) - - Who's the audience? (Motion-sensitive users? Power users who want speed?) - - What matters most? (One hero animation vs many micro-interactions?) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. - -## Plan Animation Strategy - -Create a purposeful animation plan: - -- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) -- **Feedback layer**: Which interactions need acknowledgment? -- **Transition layer**: Which state changes need smoothing? -- **Delight layer**: Where can we surprise and delight? - -**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. - -## Implement Animations - -Add motion systematically across these categories: - -### Entrance Animations -- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations -- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) -- **Content reveals**: Scroll-triggered animations using intersection observer -- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management - -### Micro-interactions -- **Button feedback**: - - Hover: Subtle scale (1.02-1.05), color shift, shadow increase - - Click: Quick scale down then up (0.95 → 1), ripple effect - - Loading: Spinner or pulse state -- **Form interactions**: - - Input focus: Border color transition, slight scale or glow - - Validation: Shake on error, check mark on success, smooth color transitions -- **Toggle switches**: Smooth slide + color transition (200-300ms) -- **Checkboxes/radio**: Check mark animation, ripple effect -- **Like/favorite**: Scale + rotation, particle effects, color transition - -### State Transitions -- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) -- **Expand/collapse**: Height transition with overflow handling, icon rotation -- **Loading states**: Skeleton screen fades, spinner animations, progress bars -- **Success/error**: Color transitions, icon animations, gentle scale pulse -- **Enable/disable**: Opacity transitions, cursor changes - -### Navigation & Flow -- **Page transitions**: Crossfade between routes, shared element transitions -- **Tab switching**: Slide indicator, content fade/slide -- **Carousel/slider**: Smooth transforms, snap points, momentum -- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators - -### Feedback & Guidance -- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights -- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning -- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation -- **Focus flow**: Highlight path through form or workflow - -### Delight Moments -- **Empty states**: Subtle floating animations on illustrations -- **Completed actions**: Confetti, check mark flourish, success celebrations -- **Easter eggs**: Hidden interactions for discovery -- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches - -## Technical Implementation - -Use appropriate techniques for each animation: - -### Timing & Easing - -**Durations by purpose:** -- **100-150ms**: Instant feedback (button press, toggle) -- **200-300ms**: State changes (hover, menu open) -- **300-500ms**: Layout changes (accordion, modal) -- **500-800ms**: Entrance animations (page load) - -**Easing curves (use these, not CSS defaults):** -```css -/* Recommended - natural deceleration */ ---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ ---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ ---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ - -/* AVOID - feel dated and tacky */ -/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ -/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ -``` - -**Exit animations are faster than entrances.** Use ~75% of enter duration. - -### CSS Animations -```css -/* Prefer for simple, declarative animations */ -- transitions for state changes -- @keyframes for complex sequences -- transform + opacity only (GPU-accelerated) -``` - -### JavaScript Animation -```javascript -/* Use for complex, interactive animations */ -- Web Animations API for programmatic control -- Framer Motion for React -- GSAP for complex sequences -``` - -### Performance -- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties -- **will-change**: Add sparingly for known expensive animations -- **Reduce paint**: Minimize repaints, use `contain` where appropriate -- **Monitor FPS**: Ensure 60fps on target devices - -### Accessibility -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**NEVER**: -- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself -- Animate layout properties (width, height, top, left)—use transform instead -- Use durations over 500ms for feedback—it feels laggy -- Animate without purpose—every animation needs a reason -- Ignore `prefers-reduced-motion`—this is an accessibility violation -- Animate everything—animation fatigue makes interfaces feel exhausting -- Block interaction during animations unless intentional - -## Verify Quality - -Test animations thoroughly: - -- **Smooth at 60fps**: No jank on target devices -- **Feels natural**: Easing curves feel organic, not robotic -- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) -- **Reduced motion works**: Animations disabled or simplified appropriately -- **Doesn't block**: Users can interact during/after animations -- **Adds value**: Makes interface clearer or more delightful - -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file diff --git a/.trae-cn/skills/audit/SKILL.md b/.trae-cn/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.trae-cn/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.trae-cn/skills/bolder/SKILL.md b/.trae-cn/skills/bolder/SKILL.md deleted file mode 100644 index e80f55ed1..000000000 --- a/.trae-cn/skills/bolder/SKILL.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too safe or boring: - -1. **Identify weakness sources**: - - **Generic choices**: System fonts, basic colors, standard layouts - - **Timid scale**: Everything is medium-sized with no drama - - **Low contrast**: Everything has similar visual weight - - **Static**: No motion, no energy, no life - - **Predictable**: Standard patterns with no surprises - - **Flat hierarchy**: Nothing stands out or commands attention - -2. **Understand the context**: - - What's the brand personality? (How far can we push?) - - What's the purpose? (Marketing can be bolder than financial dashboards) - - Who's the audience? (What will resonate?) - - What are the constraints? (Brand guidelines, accessibility, performance) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. - -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." - -## Plan Amplification - -Create a strategy to increase impact while maintaining coherence: - -- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) -- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. -- **Risk budget**: How experimental can we be? Push boundaries within constraints. -- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) - -**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. - -## Amplify the Design - -Systematically increase impact across these dimensions: - -### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) -- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) -- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 -- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) - -### Color Intensification -- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) -- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop -- **Dominant color strategy**: Let one bold color own 60% of the design -- **Sharp accents**: High-contrast accent colors that pop -- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette -- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) - -### Spatial Drama -- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings -- **Break the grid**: Let hero elements escape containers and cross boundaries -- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry -- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) -- **Overlap**: Layer elements intentionally for depth - -### Visual Effects -- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) -- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) -- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) -- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) -- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand - -### Motion & Animation -- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays -- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences -- **Micro-interactions**: Satisfying hover effects, click feedback, state changes -- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) - -### Composition Boldness -- **Hero moments**: Create clear focal points with dramatic treatment -- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements -- **Full-bleed elements**: Use full viewport width/height for impact -- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits - -**NEVER**: -- Add effects randomly without purpose (chaos ≠ bold) -- Sacrifice readability for aesthetics (body text must be readable) -- Make everything bold (then nothing is bold - need contrast) -- Ignore accessibility (bold design must still meet WCAG standards) -- Overwhelm with motion (animation fatigue is real) -- Copy trendy aesthetics blindly (bold means distinctive, not derivative) - -## Verify Quality - -Ensure amplification maintains usability and coherence: - -- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. -- **Still functional**: Can users accomplish tasks without distraction? -- **Coherent**: Does everything feel intentional and unified? -- **Memorable**: Will users remember this experience? -- **Performant**: Do all these effects run smoothly? -- **Accessible**: Does it still meet accessibility standards? - -**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." - -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file diff --git a/.trae-cn/skills/clarify/SKILL.md b/.trae-cn/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.trae-cn/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.trae-cn/skills/colorize/SKILL.md b/.trae-cn/skills/colorize/SKILL.md deleted file mode 100644 index 76075804f..000000000 --- a/.trae-cn/skills/colorize/SKILL.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. - ---- - -## Assess Color Opportunity - -Analyze the current state and identify opportunities: - -1. **Understand current state**: - - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? - - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? - - **Context**: What's appropriate for this domain and audience? - - **Brand**: Are there existing brand colors we should use? - -2. **Identify where color adds value**: - - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) - - **Hierarchy**: Drawing attention to important elements - - **Categorization**: Different sections, types, or states - - **Emotional tone**: Warmth, energy, trust, creativity - - **Wayfinding**: Helping users navigate and understand structure - - **Delight**: Moments of visual interest and personality - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. - -## Plan Color Strategy - -Create a purposeful color introduction plan: - -- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) -- **Dominant color**: Which color owns 60% of colored elements? -- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) -- **Application strategy**: Where does each color appear and why? - -**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. - -## Introduce Color Strategically - -Add color systematically across these dimensions: - -### Semantic Color -- **State indicators**: - - Success: Green tones (emerald, forest, mint) - - Error: Red/pink tones (rose, crimson, coral) - - Warning: Orange/amber tones - - Info: Blue tones (sky, ocean, indigo) - - Neutral: Gray/slate for inactive states - -- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) -- **Progress indicators**: Colored bars, rings, or charts showing completion or health - -### Accent Color Application -- **Primary actions**: Color the most important buttons/CTAs -- **Links**: Add color to clickable text (maintain accessibility) -- **Icons**: Colorize key icons for recognition and personality -- **Headers/titles**: Add color to section headers or key labels -- **Hover states**: Introduce color on interaction - -### Background & Surfaces -- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) -- **Colored sections**: Use subtle background colors to separate areas -- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) -- **Cards & surfaces**: Tint cards or surfaces slightly for warmth - -**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. - -### Data Visualization -- **Charts & graphs**: Use color to encode categories or values -- **Heatmaps**: Color intensity shows density or importance -- **Comparison**: Color coding for different datasets or timeframes - -### Borders & Accents -- **Accent borders**: Add colored left/top borders to cards or sections -- **Underlines**: Color underlines for emphasis or active states -- **Dividers**: Subtle colored dividers instead of gray lines -- **Focus rings**: Colored focus indicators matching brand - -### Typography Color -- **Colored headings**: Use brand colors for section headings (maintain contrast) -- **Highlight text**: Color for emphasis or categories -- **Labels & tags**: Small colored labels for metadata or categories - -### Decorative Elements -- **Illustrations**: Add colored illustrations or icons -- **Shapes**: Geometric shapes in brand colors as background elements -- **Gradients**: Colorful gradient overlays or mesh backgrounds -- **Blobs/organic shapes**: Soft colored shapes for visual interest - -## Balance & Refinement - -Ensure color addition improves rather than overwhelms: - -### Maintain Hierarchy -- **Dominant color** (60%): Primary brand color or most used accent -- **Secondary color** (30%): Supporting color for variety -- **Accent color** (10%): High contrast for key moments -- **Neutrals** (remaining): Gray/black/white for structure - -### Accessibility -- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) -- **Don't rely on color alone**: Use icons, labels, or patterns alongside color -- **Test for color blindness**: Verify red/green combinations work for all users - -### Cohesion -- **Consistent palette**: Use colors from defined palette, not arbitrary choices -- **Systematic application**: Same color meanings throughout (green always = success) -- **Temperature consistency**: Warm palette stays warm, cool stays cool - -**NEVER**: -- Use every color in the rainbow (choose 2-4 colors beyond neutrals) -- Apply color randomly without semantic meaning -- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead -- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication -- Use pure black (`#000`) or pure white (`#fff`) for large areas -- Violate WCAG contrast requirements -- Use color as the only indicator (accessibility issue) -- Make everything colorful (defeats the purpose) -- Default to purple-blue gradients (AI slop aesthetic) - -## Verify Color Addition - -Test that colorization improves the experience: - -- **Better hierarchy**: Does color guide attention appropriately? -- **Clearer meaning**: Does color help users understand states/categories? -- **More engaging**: Does the interface feel warmer and more inviting? -- **Still accessible**: Do all color combinations meet WCAG standards? -- **Not overwhelming**: Is color balanced and purposeful? - -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file diff --git a/.trae-cn/skills/delight/SKILL.md b/.trae-cn/skills/delight/SKILL.md deleted file mode 100644 index fedebff9c..000000000 --- a/.trae-cn/skills/delight/SKILL.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). - ---- - -## Assess Delight Opportunities - -Identify where delight would enhance (not distract from) the experience: - -1. **Find natural delight moments**: - - **Success states**: Completed actions (save, send, publish) - - **Empty states**: First-time experiences, onboarding - - **Loading states**: Waiting periods that could be entertaining - - **Achievements**: Milestones, streaks, completions - - **Interactions**: Hover states, clicks, drags - - **Errors**: Softening frustrating moments - - **Easter eggs**: Hidden discoveries for curious users - -2. **Understand the context**: - - What's the brand personality? (Playful? Professional? Quirky? Elegant?) - - Who's the audience? (Tech-savvy? Creative? Corporate?) - - What's the emotional context? (Accomplishment? Exploration? Frustration?) - - What's appropriate? (Banking app ≠ gaming app) - -3. **Define delight strategy**: - - **Subtle sophistication**: Refined micro-interactions (luxury brands) - - **Playful personality**: Whimsical illustrations and copy (consumer apps) - - **Helpful surprises**: Anticipating needs before users ask (productivity tools) - - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. - -## Delight Principles - -Follow these guidelines: - -### Delight Amplifies, Never Blocks -- Delight moments should be quick (< 1 second) -- Never delay core functionality for delight -- Make delight skippable or subtle -- Respect user's time and task focus - -### Surprise and Discovery -- Hide delightful details for users to discover -- Reward exploration and curiosity -- Don't announce every delight moment -- Let users share discoveries with others - -### Appropriate to Context -- Match delight to emotional moment (celebrate success, empathize with errors) -- Respect the user's state (don't be playful during critical errors) -- Match brand personality and audience expectations -- Cultural sensitivity (what's delightful varies by culture) - -### Compound Over Time -- Delight should remain fresh with repeated use -- Vary responses (not same animation every time) -- Reveal deeper layers with continued use -- Build anticipation through patterns - -## Delight Techniques - -Add personality and joy through these methods: - -### Micro-interactions & Animation - -**Button delight**: -```css -/* Satisfying button press */ -.button { - transition: transform 0.1s, box-shadow 0.1s; -} -.button:active { - transform: translateY(2px); - box-shadow: 0 2px 4px rgba(0,0,0,0.2); -} - -/* Ripple effect on click */ -/* Smooth lift on hover */ -.button:hover { - transform: translateY(-2px); - transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ -} -``` - -**Loading delight**: -- Playful loading animations (not just spinners) -- Personality in loading messages (write product-specific ones, not generic AI filler) -- Progress indication with encouraging messages -- Skeleton screens with subtle animations - -**Success animations**: -- Checkmark draw animation -- Confetti burst for major achievements -- Gentle scale + fade for confirmation -- Satisfying sound effects (subtle) - -**Hover surprises**: -- Icons that animate on hover -- Color shifts or glow effects -- Tooltip reveals with personality -- Cursor changes (custom cursors for branded experiences) - -### Personality in Copy - -**Playful error messages**: -``` -"Error 404" -"This page is playing hide and seek. (And winning)" - -"Connection failed" -"Looks like the internet took a coffee break. Want to retry?" -``` - -**Encouraging empty states**: -``` -"No projects" -"Your canvas awaits. Create something amazing." - -"No messages" -"Inbox zero! You're crushing it today." -``` - -**Playful labels & tooltips**: -``` -"Delete" -"Send to void" (for playful brand) - -"Help" -"Rescue me" (tooltip) -``` - -**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. - -### Illustrations & Visual Personality - -**Custom illustrations**: -- Empty state illustrations (not stock icons) -- Error state illustrations (friendly monsters, quirky characters) -- Loading state illustrations (animated characters) -- Success state illustrations (celebrations) - -**Icon personality**: -- Custom icon set matching brand personality -- Animated icons (subtle motion on hover/click) -- Illustrative icons (more detailed than generic) -- Consistent style across all icons - -**Background effects**: -- Subtle particle effects -- Gradient mesh backgrounds -- Geometric patterns -- Parallax depth -- Time-of-day themes (morning vs night) - -### Satisfying Interactions - -**Drag and drop delight**: -- Lift effect on drag (shadow, scale) -- Snap animation when dropped -- Satisfying placement sound -- Undo toast ("Dropped in wrong place? [Undo]") - -**Toggle switches**: -- Smooth slide with spring physics -- Color transition -- Haptic feedback on mobile -- Optional sound effect - -**Progress & achievements**: -- Streak counters with celebratory milestones -- Progress bars that "celebrate" at 100% -- Badge unlocks with animation -- Playful stats ("You're on fire! 5 days in a row") - -**Form interactions**: -- Input fields that animate on focus -- Checkboxes with a satisfying scale pulse when checked -- Success state that celebrates valid input -- Auto-grow textareas - -### Sound Design - -**Subtle audio cues** (when appropriate): -- Notification sounds (distinctive but not annoying) -- Success sounds (satisfying "ding") -- Error sounds (empathetic, not harsh) -- Typing sounds for chat/messaging -- Ambient background audio (very subtle) - -**IMPORTANT**: -- Respect system sound settings -- Provide mute option -- Keep volumes quiet (subtle cues, not alarms) -- Don't play on every interaction (sound fatigue is real) - -### Easter Eggs & Hidden Delights - -**Discovery rewards**: -- Konami code unlocks special theme -- Hidden keyboard shortcuts (Cmd+K for special features) -- Hover reveals on logos or illustrations -- Alt text jokes on images (for screen reader users too!) -- Console messages for developers ("Like what you see? We're hiring!") - -**Seasonal touches**: -- Holiday themes (subtle, tasteful) -- Seasonal color shifts -- Weather-based variations -- Time-based changes (dark at night, light during day) - -**Contextual personality**: -- Different messages based on time of day -- Responses to specific user actions -- Randomized variations (not same every time) -- Progressive reveals with continued use - -### Loading & Waiting States - -**Make waiting engaging**: -- Interesting loading messages that rotate -- Progress bars with personality -- Mini-games during long loads -- Fun facts or tips while waiting -- Countdown with encouraging messages - -``` -Loading messages — write ones specific to your product, not generic AI filler: -- "Crunching your latest numbers..." -- "Syncing with your team's changes..." -- "Preparing your dashboard..." -- "Checking for updates since yesterday..." -``` - -**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. - -### Celebration Moments - -**Success celebrations**: -- Confetti for major milestones -- Animated checkmarks for completions -- Progress bar celebrations at 100% -- "Achievement unlocked" style notifications -- Personalized messages ("You published your 10th article!") - -**Milestone recognition**: -- First-time actions get special treatment -- Streak tracking and celebration -- Progress toward goals -- Anniversary celebrations - -## Implementation Patterns - -**Animation libraries**: -- Framer Motion (React) -- GSAP (universal) -- Lottie (After Effects animations) -- Canvas confetti (party effects) - -**Sound libraries**: -- Howler.js (audio management) -- Use-sound (React hook) - -**Physics libraries**: -- React Spring (spring physics) -- Popmotion (animation primitives) - -**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. - -**NEVER**: -- Delay core functionality for delight -- Force users through delightful moments (make skippable) -- Use delight to hide poor UX -- Overdo it (less is more) -- Ignore accessibility (animate responsibly, provide alternatives) -- Make every interaction delightful (special moments should be special) -- Sacrifice performance for delight -- Be inappropriate for context (read the room) - -## Verify Delight Quality - -Test that delight actually delights: - -- **User reactions**: Do users smile? Share screenshots? -- **Doesn't annoy**: Still pleasant after 100th time? -- **Doesn't block**: Can users opt out or skip? -- **Performant**: No jank, no slowdown -- **Appropriate**: Matches brand and context -- **Accessible**: Works with reduced motion, screen readers - -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file diff --git a/.trae-cn/skills/distill/SKILL.md b/.trae-cn/skills/distill/SKILL.md deleted file mode 100644 index f3f721c99..000000000 --- a/.trae-cn/skills/distill/SKILL.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel complex or cluttered: - -1. **Identify complexity sources**: - - **Too many elements**: Competing buttons, redundant information, visual clutter - - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose - - **Information overload**: Everything visible at once, no progressive disclosure - - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations - - **Confusing hierarchy**: Unclear what matters most - - **Feature creep**: Too many options, actions, or paths forward - -2. **Find the essence**: - - What's the primary user goal? (There should be ONE) - - What's actually necessary vs nice-to-have? - - What can be removed, hidden, or combined? - - What's the 20% that delivers 80% of value? - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. - -## Plan Simplification - -Create a ruthless editing strategy: - -- **Core purpose**: What's the ONE thing this should accomplish? -- **Essential elements**: What's truly necessary to achieve that purpose? -- **Progressive disclosure**: What can be hidden until needed? -- **Consolidation opportunities**: What can be combined or integrated? - -**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. - -## Simplify the Design - -Systematically remove complexity across these dimensions: - -### Information Architecture -- **Reduce scope**: Remove secondary actions, optional features, redundant information -- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) -- **Combine related actions**: Merge similar buttons, consolidate forms, group related content -- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden -- **Remove redundancy**: If it's said elsewhere, don't repeat it here - -### Visual Simplification -- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors -- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights -- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function -- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards -- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead -- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps - -### Layout Simplification -- **Linear flow**: Replace complex grids with simple vertical flow where possible -- **Remove sidebars**: Move secondary content inline or hide it -- **Full-width**: Use available space generously instead of complex multi-column layouts -- **Consistent alignment**: Pick left or center, stick with it -- **Generous white space**: Let content breathe, don't pack everything tight - -### Interaction Simplification -- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) -- **Smart defaults**: Make common choices automatic, only ask when necessary -- **Inline actions**: Replace modal flows with inline editing where possible -- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? -- **Clear CTAs**: ONE obvious next step, not five competing actions - -### Content Simplification -- **Shorter copy**: Cut every sentence in half, then do it again -- **Active voice**: "Save changes" not "Changes will be saved" -- **Remove jargon**: Plain language always wins -- **Scannable structure**: Short paragraphs, bullet points, clear headings -- **Essential information only**: Remove marketing fluff, legalese, hedging -- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once - -### Code Simplification -- **Remove unused code**: Dead CSS, unused components, orphaned files -- **Flatten component trees**: Reduce nesting depth -- **Consolidate styles**: Merge similar styles, use utilities consistently -- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? - -**NEVER**: -- Remove necessary functionality (simplicity ≠ feature-less) -- Sacrifice accessibility for simplicity (clear labels and ARIA still required) -- Make things so simple they're unclear (mystery ≠ minimalism) -- Remove information users need to make decisions -- Eliminate hierarchy completely (some things should stand out) -- Oversimplify complex domains (match complexity to actual task complexity) - -## Verify Simplification - -Ensure simplification improves usability: - -- **Faster task completion**: Can users accomplish goals more quickly? -- **Reduced cognitive load**: Is it easier to understand what to do? -- **Still complete**: Are all necessary features still accessible? -- **Clearer hierarchy**: Is it obvious what matters most? -- **Better performance**: Does simpler design load faster? - -## Document Removed Complexity - -If you removed features or options: -- Document why they were removed -- Consider if they need alternative access points -- Note any user feedback to monitor - -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file diff --git a/.trae-cn/skills/harden/SKILL.md b/.trae-cn/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.trae-cn/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.trae-cn/skills/impeccable/SKILL.md b/.trae-cn/skills/impeccable/SKILL.md index ad24d7747..5ef54ec67 100644 --- a/.trae-cn/skills/impeccable/SKILL.md +++ b/.trae-cn/skills/impeccable/SKILL.md @@ -1,16 +1,18 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +25,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +34,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +270,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +284,96 @@ Remember: the model is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .trae-cn/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to RULES.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.trae-cn/skills/impeccable/reference/adapt.md b/.trae-cn/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.trae-cn/skills/impeccable/reference/animate.md b/.trae-cn/skills/impeccable/reference/animate.md new file mode 100644 index 000000000..0186ce081 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/animate.md @@ -0,0 +1,166 @@ +> **Additional context needed**: performance constraints. + +Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. + + +--- + +## Assess Animation Opportunities + +Analyze where motion would improve the experience: + +1. **Identify static areas**: + - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) + - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) + - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious + - **Lack of delight**: Functional but joyless interactions + - **Missed guidance**: Opportunities to direct attention or explain behavior + +2. **Understand the context**: + - What's the personality? (Playful vs serious, energetic vs calm) + - What's the performance budget? (Mobile-first? Complex page?) + - Who's the audience? (Motion-sensitive users? Power users who want speed?) + - What matters most? (One hero animation vs many micro-interactions?) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. + +## Plan Animation Strategy + +Create a purposeful animation plan: + +- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) +- **Feedback layer**: Which interactions need acknowledgment? +- **Transition layer**: Which state changes need smoothing? +- **Delight layer**: Where can we surprise and delight? + +**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. + +## Implement Animations + +Add motion systematically across these categories: + +### Entrance Animations +- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations +- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) +- **Content reveals**: Scroll-triggered animations using intersection observer +- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management + +### Micro-interactions +- **Button feedback**: + - Hover: Subtle scale (1.02-1.05), color shift, shadow increase + - Click: Quick scale down then up (0.95 → 1), ripple effect + - Loading: Spinner or pulse state +- **Form interactions**: + - Input focus: Border color transition, slight scale or glow + - Validation: Shake on error, check mark on success, smooth color transitions +- **Toggle switches**: Smooth slide + color transition (200-300ms) +- **Checkboxes/radio**: Check mark animation, ripple effect +- **Like/favorite**: Scale + rotation, particle effects, color transition + +### State Transitions +- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) +- **Expand/collapse**: Height transition with overflow handling, icon rotation +- **Loading states**: Skeleton screen fades, spinner animations, progress bars +- **Success/error**: Color transitions, icon animations, gentle scale pulse +- **Enable/disable**: Opacity transitions, cursor changes + +### Navigation & Flow +- **Page transitions**: Crossfade between routes, shared element transitions +- **Tab switching**: Slide indicator, content fade/slide +- **Carousel/slider**: Smooth transforms, snap points, momentum +- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators + +### Feedback & Guidance +- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights +- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning +- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation +- **Focus flow**: Highlight path through form or workflow + +### Delight Moments +- **Empty states**: Subtle floating animations on illustrations +- **Completed actions**: Confetti, check mark flourish, success celebrations +- **Easter eggs**: Hidden interactions for discovery +- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches + +## Technical Implementation + +Use appropriate techniques for each animation: + +### Timing & Easing + +**Durations by purpose:** +- **100-150ms**: Instant feedback (button press, toggle) +- **200-300ms**: State changes (hover, menu open) +- **300-500ms**: Layout changes (accordion, modal) +- **500-800ms**: Entrance animations (page load) + +**Easing curves (use these, not CSS defaults):** +```css +/* Recommended - natural deceleration */ +--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ +--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ +--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ + +/* AVOID - feel dated and tacky */ +/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ +/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ +``` + +**Exit animations are faster than entrances.** Use ~75% of enter duration. + +### CSS Animations +```css +/* Prefer for simple, declarative animations */ +- transitions for state changes +- @keyframes for complex sequences +- transform + opacity only (GPU-accelerated) +``` + +### JavaScript Animation +```javascript +/* Use for complex, interactive animations */ +- Web Animations API for programmatic control +- Framer Motion for React +- GSAP for complex sequences +``` + +### Performance +- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties +- **will-change**: Add sparingly for known expensive animations +- **Reduce paint**: Minimize repaints, use `contain` where appropriate +- **Monitor FPS**: Ensure 60fps on target devices + +### Accessibility +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**NEVER**: +- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself +- Animate layout properties (width, height, top, left)—use transform instead +- Use durations over 500ms for feedback—it feels laggy +- Animate without purpose—every animation needs a reason +- Ignore `prefers-reduced-motion`—this is an accessibility violation +- Animate everything—animation fatigue makes interfaces feel exhausting +- Block interaction during animations unless intentional + +## Verify Quality + +Test animations thoroughly: + +- **Smooth at 60fps**: No jank on target devices +- **Feels natural**: Easing curves feel organic, not robotic +- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) +- **Reduced motion works**: Animations disabled or simplified appropriately +- **Doesn't block**: Users can interact during/after animations +- **Adds value**: Makes interface clearer or more delightful + +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.trae-cn/skills/impeccable/reference/audit.md b/.trae-cn/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.trae-cn/skills/impeccable/reference/bolder.md b/.trae-cn/skills/impeccable/reference/bolder.md new file mode 100644 index 000000000..cb3481663 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/bolder.md @@ -0,0 +1,106 @@ +Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. + + +--- + +## Assess Current State + +Analyze what makes the design feel too safe or boring: + +1. **Identify weakness sources**: + - **Generic choices**: System fonts, basic colors, standard layouts + - **Timid scale**: Everything is medium-sized with no drama + - **Low contrast**: Everything has similar visual weight + - **Static**: No motion, no energy, no life + - **Predictable**: Standard patterns with no surprises + - **Flat hierarchy**: Nothing stands out or commands attention + +2. **Understand the context**: + - What's the brand personality? (How far can we push?) + - What's the purpose? (Marketing can be bolder than financial dashboards) + - Who's the audience? (What will resonate?) + - What are the constraints? (Brand guidelines, accessibility, performance) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. + +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." + +## Plan Amplification + +Create a strategy to increase impact while maintaining coherence: + +- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) +- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. +- **Risk budget**: How experimental can we be? Push boundaries within constraints. +- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) + +**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. + +## Amplify the Design + +Systematically increase impact across these dimensions: + +### Typography Amplification +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) +- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) +- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 +- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) + +### Color Intensification +- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) +- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop +- **Dominant color strategy**: Let one bold color own 60% of the design +- **Sharp accents**: High-contrast accent colors that pop +- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette +- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) + +### Spatial Drama +- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings +- **Break the grid**: Let hero elements escape containers and cross boundaries +- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry +- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) +- **Overlap**: Layer elements intentionally for depth + +### Visual Effects +- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) +- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) +- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) +- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) +- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand + +### Motion & Animation +- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays +- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences +- **Micro-interactions**: Satisfying hover effects, click feedback, state changes +- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) + +### Composition Boldness +- **Hero moments**: Create clear focal points with dramatic treatment +- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements +- **Full-bleed elements**: Use full viewport width/height for impact +- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits + +**NEVER**: +- Add effects randomly without purpose (chaos ≠ bold) +- Sacrifice readability for aesthetics (body text must be readable) +- Make everything bold (then nothing is bold - need contrast) +- Ignore accessibility (bold design must still meet WCAG standards) +- Overwhelm with motion (animation fatigue is real) +- Copy trendy aesthetics blindly (bold means distinctive, not derivative) + +## Verify Quality + +Ensure amplification maintains usability and coherence: + +- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. +- **Still functional**: Can users accomplish tasks without distraction? +- **Coherent**: Does everything feel intentional and unified? +- **Memorable**: Will users remember this experience? +- **Performant**: Do all these effects run smoothly? +- **Accessible**: Does it still meet accessibility standards? + +**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." + +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.trae-cn/skills/impeccable/reference/clarify.md b/.trae-cn/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.trae-cn/skills/critique/reference/cognitive-load.md b/.trae-cn/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .trae-cn/skills/critique/reference/cognitive-load.md rename to .trae-cn/skills/impeccable/reference/cognitive-load.md diff --git a/.trae-cn/skills/impeccable/reference/colorize.md b/.trae-cn/skills/impeccable/reference/colorize.md new file mode 100644 index 000000000..a4ce5072e --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/colorize.md @@ -0,0 +1,134 @@ +> **Additional context needed**: existing brand colors. + +Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. + + +--- + +## Assess Color Opportunity + +Analyze the current state and identify opportunities: + +1. **Understand current state**: + - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? + - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? + - **Context**: What's appropriate for this domain and audience? + - **Brand**: Are there existing brand colors we should use? + +2. **Identify where color adds value**: + - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) + - **Hierarchy**: Drawing attention to important elements + - **Categorization**: Different sections, types, or states + - **Emotional tone**: Warmth, energy, trust, creativity + - **Wayfinding**: Helping users navigate and understand structure + - **Delight**: Moments of visual interest and personality + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. + +## Plan Color Strategy + +Create a purposeful color introduction plan: + +- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) +- **Dominant color**: Which color owns 60% of colored elements? +- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) +- **Application strategy**: Where does each color appear and why? + +**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. + +## Introduce Color Strategically + +Add color systematically across these dimensions: + +### Semantic Color +- **State indicators**: + - Success: Green tones (emerald, forest, mint) + - Error: Red/pink tones (rose, crimson, coral) + - Warning: Orange/amber tones + - Info: Blue tones (sky, ocean, indigo) + - Neutral: Gray/slate for inactive states + +- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) +- **Progress indicators**: Colored bars, rings, or charts showing completion or health + +### Accent Color Application +- **Primary actions**: Color the most important buttons/CTAs +- **Links**: Add color to clickable text (maintain accessibility) +- **Icons**: Colorize key icons for recognition and personality +- **Headers/titles**: Add color to section headers or key labels +- **Hover states**: Introduce color on interaction + +### Background & Surfaces +- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) +- **Colored sections**: Use subtle background colors to separate areas +- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) +- **Cards & surfaces**: Tint cards or surfaces slightly for warmth + +**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. + +### Data Visualization +- **Charts & graphs**: Use color to encode categories or values +- **Heatmaps**: Color intensity shows density or importance +- **Comparison**: Color coding for different datasets or timeframes + +### Borders & Accents +- **Accent borders**: Add colored left/top borders to cards or sections +- **Underlines**: Color underlines for emphasis or active states +- **Dividers**: Subtle colored dividers instead of gray lines +- **Focus rings**: Colored focus indicators matching brand + +### Typography Color +- **Colored headings**: Use brand colors for section headings (maintain contrast) +- **Highlight text**: Color for emphasis or categories +- **Labels & tags**: Small colored labels for metadata or categories + +### Decorative Elements +- **Illustrations**: Add colored illustrations or icons +- **Shapes**: Geometric shapes in brand colors as background elements +- **Gradients**: Colorful gradient overlays or mesh backgrounds +- **Blobs/organic shapes**: Soft colored shapes for visual interest + +## Balance & Refinement + +Ensure color addition improves rather than overwhelms: + +### Maintain Hierarchy +- **Dominant color** (60%): Primary brand color or most used accent +- **Secondary color** (30%): Supporting color for variety +- **Accent color** (10%): High contrast for key moments +- **Neutrals** (remaining): Gray/black/white for structure + +### Accessibility +- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) +- **Don't rely on color alone**: Use icons, labels, or patterns alongside color +- **Test for color blindness**: Verify red/green combinations work for all users + +### Cohesion +- **Consistent palette**: Use colors from defined palette, not arbitrary choices +- **Systematic application**: Same color meanings throughout (green always = success) +- **Temperature consistency**: Warm palette stays warm, cool stays cool + +**NEVER**: +- Use every color in the rainbow (choose 2-4 colors beyond neutrals) +- Apply color randomly without semantic meaning +- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead +- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication +- Use pure black (`#000`) or pure white (`#fff`) for large areas +- Violate WCAG contrast requirements +- Use color as the only indicator (accessibility issue) +- Make everything colorful (defeats the purpose) +- Default to purple-blue gradients (AI slop aesthetic) + +## Verify Color Addition + +Test that colorization improves the experience: + +- **Better hierarchy**: Does color guide attention appropriately? +- **Clearer meaning**: Does color help users understand states/categories? +- **More engaging**: Does the interface feel warmer and more inviting? +- **Still accessible**: Do all color combinations meet WCAG standards? +- **Not overwhelming**: Is color balanced and purposeful? + +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.trae-cn/skills/impeccable/reference/craft.md b/.trae-cn/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.trae-cn/skills/impeccable/reference/craft.md +++ b/.trae-cn/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.trae/skills/critique/SKILL.md b/.trae-cn/skills/impeccable/reference/critique.md similarity index 84% rename from .trae/skills/critique/SKILL.md rename to .trae-cn/skills/impeccable/reference/critique.md index e89e7b281..8866153fc 100644 --- a/.trae/skills/critique/SKILL.md +++ b/.trae-cn/skills/impeccable/reference/critique.md @@ -1,18 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -30,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -44,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -94,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -140,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `RULES.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -176,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -196,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -209,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.trae-cn/skills/impeccable/reference/delight.md b/.trae-cn/skills/impeccable/reference/delight.md new file mode 100644 index 000000000..8a781e70e --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/delight.md @@ -0,0 +1,295 @@ +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). + +Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. + + +--- + +## Assess Delight Opportunities + +Identify where delight would enhance (not distract from) the experience: + +1. **Find natural delight moments**: + - **Success states**: Completed actions (save, send, publish) + - **Empty states**: First-time experiences, onboarding + - **Loading states**: Waiting periods that could be entertaining + - **Achievements**: Milestones, streaks, completions + - **Interactions**: Hover states, clicks, drags + - **Errors**: Softening frustrating moments + - **Easter eggs**: Hidden discoveries for curious users + +2. **Understand the context**: + - What's the brand personality? (Playful? Professional? Quirky? Elegant?) + - Who's the audience? (Tech-savvy? Creative? Corporate?) + - What's the emotional context? (Accomplishment? Exploration? Frustration?) + - What's appropriate? (Banking app ≠ gaming app) + +3. **Define delight strategy**: + - **Subtle sophistication**: Refined micro-interactions (luxury brands) + - **Playful personality**: Whimsical illustrations and copy (consumer apps) + - **Helpful surprises**: Anticipating needs before users ask (productivity tools) + - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. + +## Delight Principles + +Follow these guidelines: + +### Delight Amplifies, Never Blocks +- Delight moments should be quick (< 1 second) +- Never delay core functionality for delight +- Make delight skippable or subtle +- Respect user's time and task focus + +### Surprise and Discovery +- Hide delightful details for users to discover +- Reward exploration and curiosity +- Don't announce every delight moment +- Let users share discoveries with others + +### Appropriate to Context +- Match delight to emotional moment (celebrate success, empathize with errors) +- Respect the user's state (don't be playful during critical errors) +- Match brand personality and audience expectations +- Cultural sensitivity (what's delightful varies by culture) + +### Compound Over Time +- Delight should remain fresh with repeated use +- Vary responses (not same animation every time) +- Reveal deeper layers with continued use +- Build anticipation through patterns + +## Delight Techniques + +Add personality and joy through these methods: + +### Micro-interactions & Animation + +**Button delight**: +```css +/* Satisfying button press */ +.button { + transition: transform 0.1s, box-shadow 0.1s; +} +.button:active { + transform: translateY(2px); + box-shadow: 0 2px 4px rgba(0,0,0,0.2); +} + +/* Ripple effect on click */ +/* Smooth lift on hover */ +.button:hover { + transform: translateY(-2px); + transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ +} +``` + +**Loading delight**: +- Playful loading animations (not just spinners) +- Personality in loading messages (write product-specific ones, not generic AI filler) +- Progress indication with encouraging messages +- Skeleton screens with subtle animations + +**Success animations**: +- Checkmark draw animation +- Confetti burst for major achievements +- Gentle scale + fade for confirmation +- Satisfying sound effects (subtle) + +**Hover surprises**: +- Icons that animate on hover +- Color shifts or glow effects +- Tooltip reveals with personality +- Cursor changes (custom cursors for branded experiences) + +### Personality in Copy + +**Playful error messages**: +``` +"Error 404" +"This page is playing hide and seek. (And winning)" + +"Connection failed" +"Looks like the internet took a coffee break. Want to retry?" +``` + +**Encouraging empty states**: +``` +"No projects" +"Your canvas awaits. Create something amazing." + +"No messages" +"Inbox zero! You're crushing it today." +``` + +**Playful labels & tooltips**: +``` +"Delete" +"Send to void" (for playful brand) + +"Help" +"Rescue me" (tooltip) +``` + +**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. + +### Illustrations & Visual Personality + +**Custom illustrations**: +- Empty state illustrations (not stock icons) +- Error state illustrations (friendly monsters, quirky characters) +- Loading state illustrations (animated characters) +- Success state illustrations (celebrations) + +**Icon personality**: +- Custom icon set matching brand personality +- Animated icons (subtle motion on hover/click) +- Illustrative icons (more detailed than generic) +- Consistent style across all icons + +**Background effects**: +- Subtle particle effects +- Gradient mesh backgrounds +- Geometric patterns +- Parallax depth +- Time-of-day themes (morning vs night) + +### Satisfying Interactions + +**Drag and drop delight**: +- Lift effect on drag (shadow, scale) +- Snap animation when dropped +- Satisfying placement sound +- Undo toast ("Dropped in wrong place? [Undo]") + +**Toggle switches**: +- Smooth slide with spring physics +- Color transition +- Haptic feedback on mobile +- Optional sound effect + +**Progress & achievements**: +- Streak counters with celebratory milestones +- Progress bars that "celebrate" at 100% +- Badge unlocks with animation +- Playful stats ("You're on fire! 5 days in a row") + +**Form interactions**: +- Input fields that animate on focus +- Checkboxes with a satisfying scale pulse when checked +- Success state that celebrates valid input +- Auto-grow textareas + +### Sound Design + +**Subtle audio cues** (when appropriate): +- Notification sounds (distinctive but not annoying) +- Success sounds (satisfying "ding") +- Error sounds (empathetic, not harsh) +- Typing sounds for chat/messaging +- Ambient background audio (very subtle) + +**IMPORTANT**: +- Respect system sound settings +- Provide mute option +- Keep volumes quiet (subtle cues, not alarms) +- Don't play on every interaction (sound fatigue is real) + +### Easter Eggs & Hidden Delights + +**Discovery rewards**: +- Konami code unlocks special theme +- Hidden keyboard shortcuts (Cmd+K for special features) +- Hover reveals on logos or illustrations +- Alt text jokes on images (for screen reader users too!) +- Console messages for developers ("Like what you see? We're hiring!") + +**Seasonal touches**: +- Holiday themes (subtle, tasteful) +- Seasonal color shifts +- Weather-based variations +- Time-based changes (dark at night, light during day) + +**Contextual personality**: +- Different messages based on time of day +- Responses to specific user actions +- Randomized variations (not same every time) +- Progressive reveals with continued use + +### Loading & Waiting States + +**Make waiting engaging**: +- Interesting loading messages that rotate +- Progress bars with personality +- Mini-games during long loads +- Fun facts or tips while waiting +- Countdown with encouraging messages + +``` +Loading messages — write ones specific to your product, not generic AI filler: +- "Crunching your latest numbers..." +- "Syncing with your team's changes..." +- "Preparing your dashboard..." +- "Checking for updates since yesterday..." +``` + +**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. + +### Celebration Moments + +**Success celebrations**: +- Confetti for major milestones +- Animated checkmarks for completions +- Progress bar celebrations at 100% +- "Achievement unlocked" style notifications +- Personalized messages ("You published your 10th article!") + +**Milestone recognition**: +- First-time actions get special treatment +- Streak tracking and celebration +- Progress toward goals +- Anniversary celebrations + +## Implementation Patterns + +**Animation libraries**: +- Framer Motion (React) +- GSAP (universal) +- Lottie (After Effects animations) +- Canvas confetti (party effects) + +**Sound libraries**: +- Howler.js (audio management) +- Use-sound (React hook) + +**Physics libraries**: +- React Spring (spring physics) +- Popmotion (animation primitives) + +**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. + +**NEVER**: +- Delay core functionality for delight +- Force users through delightful moments (make skippable) +- Use delight to hide poor UX +- Overdo it (less is more) +- Ignore accessibility (animate responsibly, provide alternatives) +- Make every interaction delightful (special moments should be special) +- Sacrifice performance for delight +- Be inappropriate for context (read the room) + +## Verify Delight Quality + +Test that delight actually delights: + +- **User reactions**: Do users smile? Share screenshots? +- **Doesn't annoy**: Still pleasant after 100th time? +- **Doesn't block**: Can users opt out or skip? +- **Performant**: No jank, no slowdown +- **Appropriate**: Matches brand and context +- **Accessible**: Works with reduced motion, screen readers + +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.trae-cn/skills/impeccable/reference/distill.md b/.trae-cn/skills/impeccable/reference/distill.md new file mode 100644 index 000000000..4f47dc0b4 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/distill.md @@ -0,0 +1,111 @@ +Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. + + +--- + +## Assess Current State + +Analyze what makes the design feel complex or cluttered: + +1. **Identify complexity sources**: + - **Too many elements**: Competing buttons, redundant information, visual clutter + - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose + - **Information overload**: Everything visible at once, no progressive disclosure + - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations + - **Confusing hierarchy**: Unclear what matters most + - **Feature creep**: Too many options, actions, or paths forward + +2. **Find the essence**: + - What's the primary user goal? (There should be ONE) + - What's actually necessary vs nice-to-have? + - What can be removed, hidden, or combined? + - What's the 20% that delivers 80% of value? + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. + +## Plan Simplification + +Create a ruthless editing strategy: + +- **Core purpose**: What's the ONE thing this should accomplish? +- **Essential elements**: What's truly necessary to achieve that purpose? +- **Progressive disclosure**: What can be hidden until needed? +- **Consolidation opportunities**: What can be combined or integrated? + +**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. + +## Simplify the Design + +Systematically remove complexity across these dimensions: + +### Information Architecture +- **Reduce scope**: Remove secondary actions, optional features, redundant information +- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) +- **Combine related actions**: Merge similar buttons, consolidate forms, group related content +- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden +- **Remove redundancy**: If it's said elsewhere, don't repeat it here + +### Visual Simplification +- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors +- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights +- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function +- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards +- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead +- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps + +### Layout Simplification +- **Linear flow**: Replace complex grids with simple vertical flow where possible +- **Remove sidebars**: Move secondary content inline or hide it +- **Full-width**: Use available space generously instead of complex multi-column layouts +- **Consistent alignment**: Pick left or center, stick with it +- **Generous white space**: Let content breathe, don't pack everything tight + +### Interaction Simplification +- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) +- **Smart defaults**: Make common choices automatic, only ask when necessary +- **Inline actions**: Replace modal flows with inline editing where possible +- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? +- **Clear CTAs**: ONE obvious next step, not five competing actions + +### Content Simplification +- **Shorter copy**: Cut every sentence in half, then do it again +- **Active voice**: "Save changes" not "Changes will be saved" +- **Remove jargon**: Plain language always wins +- **Scannable structure**: Short paragraphs, bullet points, clear headings +- **Essential information only**: Remove marketing fluff, legalese, hedging +- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once + +### Code Simplification +- **Remove unused code**: Dead CSS, unused components, orphaned files +- **Flatten component trees**: Reduce nesting depth +- **Consolidate styles**: Merge similar styles, use utilities consistently +- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? + +**NEVER**: +- Remove necessary functionality (simplicity ≠ feature-less) +- Sacrifice accessibility for simplicity (clear labels and ARIA still required) +- Make things so simple they're unclear (mystery ≠ minimalism) +- Remove information users need to make decisions +- Eliminate hierarchy completely (some things should stand out) +- Oversimplify complex domains (match complexity to actual task complexity) + +## Verify Simplification + +Ensure simplification improves usability: + +- **Faster task completion**: Can users accomplish goals more quickly? +- **Reduced cognitive load**: Is it easier to understand what to do? +- **Still complete**: Are all necessary features still accessible? +- **Clearer hierarchy**: Is it obvious what matters most? +- **Better performance**: Does simpler design load faster? + +## Document Removed Complexity + +If you removed features or options: +- Document why they were removed +- Consider if they need alternative access points +- Note any user feedback to monitor + +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.trae-cn/skills/impeccable/reference/harden.md b/.trae-cn/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.trae-cn/skills/critique/reference/heuristics-scoring.md b/.trae-cn/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .trae-cn/skills/critique/reference/heuristics-scoring.md rename to .trae-cn/skills/impeccable/reference/heuristics-scoring.md diff --git a/.trae-cn/skills/impeccable/reference/layout.md b/.trae-cn/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.trae-cn/skills/impeccable/reference/optimize.md b/.trae-cn/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.trae-cn/skills/impeccable/reference/overdrive.md b/.trae-cn/skills/impeccable/reference/overdrive.md new file mode 100644 index 000000000..d84a147dc --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/overdrive.md @@ -0,0 +1,130 @@ +Start your response with: + +``` +──────────── ⚡ OVERDRIVE ───────────── +》》》 Entering overdrive mode... +``` + +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. + +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. + +### Propose Before Building + +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: + +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). +3. Only proceed with the direction the user confirms. + +Skipping this step risks building something embarrassing that needs to be thrown away. + +### Iterate with Browser Automation + +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. + +--- + +## Assess What "Extraordinary" Means Here + +The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** + +### For visual/marketing surfaces +Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. + +### For functional UI +Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. + +### For performance-critical UI +The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. + +### For data-heavy interfaces +Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. + +**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. + +## The Toolkit + +Organized by what you're trying to achieve, not by technology name. + +### Make transitions feel cinematic +- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. +- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes +- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. + +### Tie animation to scroll position +- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) + +### Render beyond CSS +- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. +- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. +- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. +- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. + +### Make data feel alive +- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. +- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. +- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. + +### Animate complex properties +- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. +- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. + +### Push performance boundaries +- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. +- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. +- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. + +### Interact with the device +- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. +- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. + +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. + +## Implement with Discipline + +### Progressive enhancement is non-negotiable + +Every technique must degrade gracefully. The experience without the enhancement must still be good. + +```css +@supports (animation-timeline: scroll()) { + .hero { animation-timeline: scroll(); } +} +``` + +```javascript +if ('gpu' in navigator) { /* WebGPU */ } +else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } +/* CSS-only fallback must still look good */ +``` + +### Performance rules + +- Target 60fps. If dropping below 50, simplify. +- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. +- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. +- Pause off-screen rendering. Kill what you can't see. +- Test on real mid-range devices, not just your development machine. + +### Polish is the difference + +The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. + +**NEVER**: +- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion +- Ship effects that cause jank on mid-range devices +- Use bleeding-edge APIs without a functional fallback +- Add sound without explicit user opt-in +- Use technical ambition to mask weak design fundamentals; fix those first with other commands +- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise + +## Verify the Result + +- **The wow test**: Show it to someone who hasn't seen it. Do they react? +- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? +- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? +- **The accessibility test**: Enable reduced motion. Still beautiful? +- **The context test**: Does this make sense for THIS brand and audience? + +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.trae-cn/skills/critique/reference/personas.md b/.trae-cn/skills/impeccable/reference/personas.md similarity index 100% rename from .trae-cn/skills/critique/reference/personas.md rename to .trae-cn/skills/impeccable/reference/personas.md diff --git a/.trae-cn/skills/impeccable/reference/polish.md b/.trae-cn/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.trae-cn/skills/impeccable/reference/quieter.md b/.trae-cn/skills/impeccable/reference/quieter.md new file mode 100644 index 000000000..a8ad41809 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/quieter.md @@ -0,0 +1,92 @@ +Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. + + +--- + +## Assess Current State + +Analyze what makes the design feel too intense: + +1. **Identify intensity sources**: + - **Color saturation**: Overly bright or saturated colors + - **Contrast extremes**: Too much high-contrast juxtaposition + - **Visual weight**: Too many bold, heavy elements competing + - **Animation excess**: Too much motion or overly dramatic effects + - **Complexity**: Too many visual elements, patterns, or decorations + - **Scale**: Everything is large and loud with no hierarchy + +2. **Understand the context**: + - What's the purpose? (Marketing vs tool vs reading experience) + - Who's the audience? (Some contexts need energy) + - What's working? (Don't throw away good ideas) + - What's the core message? (Preserve what matters) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. + +## Plan Refinement + +Create a strategy to reduce intensity while maintaining impact: + +- **Color approach**: Desaturate or shift to more sophisticated tones? +- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? +- **Simplification approach**: What can be removed entirely? +- **Sophistication approach**: How can we signal quality through restraint? + +**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. + +## Refine the Design + +Systematically reduce intensity across these dimensions: + +### Color Refinement +- **Reduce saturation**: Shift from fully saturated to 70-85% saturation +- **Soften palette**: Replace bright colors with muted, sophisticated tones +- **Reduce color variety**: Use fewer colors more thoughtfully +- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) +- **Gentler contrasts**: High contrast only where it matters most +- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness +- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead + +### Visual Weight Reduction +- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate +- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness +- **White space**: Increase breathing room, reduce density +- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely + +### Simplification +- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose +- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes +- **Reduce layering**: Flatten visual hierarchy where possible +- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows + +### Motion Reduction +- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing +- **Remove decorative animations**: Keep functional motion, remove flourishes +- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback +- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic +- **Remove animations entirely** if they're not serving a clear purpose + +### Composition Refinement +- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling +- **Align to grid**: Bring rogue elements back into systematic alignment +- **Even out spacing**: Replace extreme spacing variations with consistent rhythm + +**NEVER**: +- Make everything the same size/weight (hierarchy still matters) +- Remove all color (quiet ≠ grayscale) +- Eliminate all personality (maintain character through refinement) +- Sacrifice usability for aesthetics (functional elements still need clear affordances) +- Make everything small and light (some anchors needed) + +## Verify Quality + +Ensure refinement maintains quality: + +- **Still functional**: Can users still accomplish tasks easily? +- **Still distinctive**: Does it have character, or is it generic now? +- **Better reading**: Is text easier to read for extended periods? +- **Sophistication**: Does it feel more refined and premium? + +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.trae-cn/skills/impeccable/reference/shape.md b/.trae-cn/skills/impeccable/reference/shape.md new file mode 100644 index 000000000..0ae281943 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/shape.md @@ -0,0 +1,82 @@ +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. + +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. + +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. + +## Philosophy + +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. + +## Phase 1: Discovery Interview + +**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. + +Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. + +### Purpose & Context +- What is this feature for? What problem does it solve? +- Who specifically will use it? (Not "users"; be specific: role, context, frequency) +- What does success look like? How will you know this feature is working? +- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) + +### Content & Data +- What content or data does this feature display or collect? +- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) +- What are the edge cases? (Empty state, error state, first-time use, power user) +- Is any content dynamic? What changes and how often? + +### Design Goals +- What's the single most important thing a user should do or understand here? +- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) +- Are there existing patterns in the product this should be consistent with? +- Are there specific examples (inside or outside the product) that capture what you're going for? + +### Constraints +- Are there technical constraints? (Framework, performance budget, browser support) +- Are there content constraints? (Localization, dynamic text length, user-generated content) +- Mobile/responsive requirements? +- Accessibility requirements beyond WCAG AA? + +### Anti-Goals +- What should this NOT be? What would be a wrong direction? +- What's the biggest risk of getting this wrong? + +## Phase 2: Design Brief + +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. + +### Brief Structure + +**1. Feature Summary** (2-3 sentences) +What this is, who it's for, what it needs to accomplish. + +**2. Primary User Action** +The single most important thing a user should do or understand here. + +**3. Design Direction** +How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. + +**4. Layout Strategy** +High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. + +**5. Key States** +List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. + +**6. Interaction Model** +How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? + +**7. Content Requirements** +What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. + +**8. Recommended References** +Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). + +**9. Open Questions** +Anything unresolved that the implementer should resolve during build. + +--- + +ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. + +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.trae-cn/skills/impeccable/reference/teach.md b/.trae-cn/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..972ca25be --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to RULES.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.trae-cn/skills/impeccable/reference/typeset.md b/.trae-cn/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.trae-cn/skills/impeccable/scripts/cleanup-deprecated.mjs b/.trae-cn/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.trae-cn/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.trae-cn/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.trae-cn/skills/impeccable/scripts/command-metadata.json b/.trae-cn/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.trae-cn/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.trae-cn/skills/impeccable/scripts/pin.mjs b/.trae-cn/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.trae-cn/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.trae-cn/skills/layout/SKILL.md b/.trae-cn/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.trae-cn/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.trae-cn/skills/optimize/SKILL.md b/.trae-cn/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.trae-cn/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.trae-cn/skills/overdrive/SKILL.md b/.trae-cn/skills/overdrive/SKILL.md deleted file mode 100644 index 862a4c9c4..000000000 --- a/.trae-cn/skills/overdrive/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Start your response with: - -``` -──────────── ⚡ OVERDRIVE ───────────── -》》》 Entering overdrive mode... -``` - -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. - -### Propose Before Building - -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: - -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. -2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). -3. Only proceed with the direction the user confirms. - -Skipping this step risks building something embarrassing that needs to be thrown away. - -### Iterate with Browser Automation - -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. - ---- - -## Assess What "Extraordinary" Means Here - -The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** - -### For visual/marketing surfaces -Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. - -### For functional UI -Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. - -### For performance-critical UI -The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. - -### For data-heavy interfaces -Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. - -**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. - -## The Toolkit - -Organized by what you're trying to achieve, not by technology name. - -### Make transitions feel cinematic -- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. -- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes -- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. - -### Tie animation to scroll position -- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) - -### Render beyond CSS -- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. -- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. -- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. -- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. - -### Make data feel alive -- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. -- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. -- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. - -### Animate complex properties -- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. -- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. - -### Push performance boundaries -- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. -- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. -- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. - -### Interact with the device -- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. -- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. - -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. - -## Implement with Discipline - -### Progressive enhancement is non-negotiable - -Every technique must degrade gracefully. The experience without the enhancement must still be good. - -```css -@supports (animation-timeline: scroll()) { - .hero { animation-timeline: scroll(); } -} -``` - -```javascript -if ('gpu' in navigator) { /* WebGPU */ } -else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } -/* CSS-only fallback must still look good */ -``` - -### Performance rules - -- Target 60fps. If dropping below 50, simplify. -- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. -- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. -- Pause off-screen rendering. Kill what you can't see. -- Test on real mid-range devices, not just your development machine. - -### Polish is the difference - -The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. - -**NEVER**: -- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion -- Ship effects that cause jank on mid-range devices -- Use bleeding-edge APIs without a functional fallback -- Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills -- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise - -## Verify the Result - -- **The wow test**: Show it to someone who hasn't seen it. Do they react? -- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? -- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? -- **The accessibility test**: Enable reduced motion. Still beautiful? -- **The context test**: Does this make sense for THIS brand and audience? - -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file diff --git a/.trae-cn/skills/polish/SKILL.md b/.trae-cn/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.trae-cn/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.trae-cn/skills/quieter/SKILL.md b/.trae-cn/skills/quieter/SKILL.md deleted file mode 100644 index 373ae6869..000000000 --- a/.trae-cn/skills/quieter/SKILL.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too intense: - -1. **Identify intensity sources**: - - **Color saturation**: Overly bright or saturated colors - - **Contrast extremes**: Too much high-contrast juxtaposition - - **Visual weight**: Too many bold, heavy elements competing - - **Animation excess**: Too much motion or overly dramatic effects - - **Complexity**: Too many visual elements, patterns, or decorations - - **Scale**: Everything is large and loud with no hierarchy - -2. **Understand the context**: - - What's the purpose? (Marketing vs tool vs reading experience) - - Who's the audience? (Some contexts need energy) - - What's working? (Don't throw away good ideas) - - What's the core message? (Preserve what matters) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. - -## Plan Refinement - -Create a strategy to reduce intensity while maintaining impact: - -- **Color approach**: Desaturate or shift to more sophisticated tones? -- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? -- **Simplification approach**: What can be removed entirely? -- **Sophistication approach**: How can we signal quality through restraint? - -**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. - -## Refine the Design - -Systematically reduce intensity across these dimensions: - -### Color Refinement -- **Reduce saturation**: Shift from fully saturated to 70-85% saturation -- **Soften palette**: Replace bright colors with muted, sophisticated tones -- **Reduce color variety**: Use fewer colors more thoughtfully -- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) -- **Gentler contrasts**: High contrast only where it matters most -- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness -- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead - -### Visual Weight Reduction -- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate -- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness -- **White space**: Increase breathing room, reduce density -- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely - -### Simplification -- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose -- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes -- **Reduce layering**: Flatten visual hierarchy where possible -- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows - -### Motion Reduction -- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing -- **Remove decorative animations**: Keep functional motion, remove flourishes -- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback -- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic -- **Remove animations entirely** if they're not serving a clear purpose - -### Composition Refinement -- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling -- **Align to grid**: Bring rogue elements back into systematic alignment -- **Even out spacing**: Replace extreme spacing variations with consistent rhythm - -**NEVER**: -- Make everything the same size/weight (hierarchy still matters) -- Remove all color (quiet ≠ grayscale) -- Eliminate all personality (maintain character through refinement) -- Sacrifice usability for aesthetics (functional elements still need clear affordances) -- Make everything small and light (some anchors needed) - -## Verify Quality - -Ensure refinement maintains quality: - -- **Still functional**: Can users still accomplish tasks easily? -- **Still distinctive**: Does it have character, or is it generic now? -- **Better reading**: Is text easier to read for extended periods? -- **Sophistication**: Does it feel more refined and premium? - -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file diff --git a/.trae-cn/skills/shape/SKILL.md b/.trae-cn/skills/shape/SKILL.md deleted file mode 100644 index 7e83008b5..000000000 --- a/.trae-cn/skills/shape/SKILL.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. - -## Philosophy - -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. - -## Phase 1: Discovery Interview - -**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. - -Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. - -### Purpose & Context -- What is this feature for? What problem does it solve? -- Who specifically will use it? (Not "users"; be specific: role, context, frequency) -- What does success look like? How will you know this feature is working? -- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) - -### Content & Data -- What content or data does this feature display or collect? -- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) -- What are the edge cases? (Empty state, error state, first-time use, power user) -- Is any content dynamic? What changes and how often? - -### Design Goals -- What's the single most important thing a user should do or understand here? -- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) -- Are there existing patterns in the product this should be consistent with? -- Are there specific examples (inside or outside the product) that capture what you're going for? - -### Constraints -- Are there technical constraints? (Framework, performance budget, browser support) -- Are there content constraints? (Localization, dynamic text length, user-generated content) -- Mobile/responsive requirements? -- Accessibility requirements beyond WCAG AA? - -### Anti-Goals -- What should this NOT be? What would be a wrong direction? -- What's the biggest risk of getting this wrong? - -## Phase 2: Design Brief - -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. - -### Brief Structure - -**1. Feature Summary** (2-3 sentences) -What this is, who it's for, what it needs to accomplish. - -**2. Primary User Action** -The single most important thing a user should do or understand here. - -**3. Design Direction** -How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. - -**4. Layout Strategy** -High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. - -**5. Key States** -List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. - -**6. Interaction Model** -How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? - -**7. Content Requirements** -What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. - -**8. Recommended References** -Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). - -**9. Open Questions** -Anything unresolved that the implementer should resolve during build. - ---- - -ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. - -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file diff --git a/.trae-cn/skills/typeset/SKILL.md b/.trae-cn/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.trae-cn/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/.trae/skills/adapt/SKILL.md b/.trae/skills/adapt/SKILL.md deleted file mode 100644 index 21a424162..000000000 --- a/.trae/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility. -version: 2.1.1 -user-invocable: true -argument-hint: "[target] [context (mobile, tablet, print...)]" ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. \ No newline at end of file diff --git a/.trae/skills/animate/SKILL.md b/.trae/skills/animate/SKILL.md deleted file mode 100644 index 89933bfb5..000000000 --- a/.trae/skills/animate/SKILL.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -name: animate -description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: performance constraints. - ---- - -## Assess Animation Opportunities - -Analyze where motion would improve the experience: - -1. **Identify static areas**: - - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) - - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) - - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious - - **Lack of delight**: Functional but joyless interactions - - **Missed guidance**: Opportunities to direct attention or explain behavior - -2. **Understand the context**: - - What's the personality? (Playful vs serious, energetic vs calm) - - What's the performance budget? (Mobile-first? Complex page?) - - Who's the audience? (Motion-sensitive users? Power users who want speed?) - - What matters most? (One hero animation vs many micro-interactions?) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. - -## Plan Animation Strategy - -Create a purposeful animation plan: - -- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) -- **Feedback layer**: Which interactions need acknowledgment? -- **Transition layer**: Which state changes need smoothing? -- **Delight layer**: Where can we surprise and delight? - -**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. - -## Implement Animations - -Add motion systematically across these categories: - -### Entrance Animations -- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations -- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) -- **Content reveals**: Scroll-triggered animations using intersection observer -- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management - -### Micro-interactions -- **Button feedback**: - - Hover: Subtle scale (1.02-1.05), color shift, shadow increase - - Click: Quick scale down then up (0.95 → 1), ripple effect - - Loading: Spinner or pulse state -- **Form interactions**: - - Input focus: Border color transition, slight scale or glow - - Validation: Shake on error, check mark on success, smooth color transitions -- **Toggle switches**: Smooth slide + color transition (200-300ms) -- **Checkboxes/radio**: Check mark animation, ripple effect -- **Like/favorite**: Scale + rotation, particle effects, color transition - -### State Transitions -- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) -- **Expand/collapse**: Height transition with overflow handling, icon rotation -- **Loading states**: Skeleton screen fades, spinner animations, progress bars -- **Success/error**: Color transitions, icon animations, gentle scale pulse -- **Enable/disable**: Opacity transitions, cursor changes - -### Navigation & Flow -- **Page transitions**: Crossfade between routes, shared element transitions -- **Tab switching**: Slide indicator, content fade/slide -- **Carousel/slider**: Smooth transforms, snap points, momentum -- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators - -### Feedback & Guidance -- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights -- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning -- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation -- **Focus flow**: Highlight path through form or workflow - -### Delight Moments -- **Empty states**: Subtle floating animations on illustrations -- **Completed actions**: Confetti, check mark flourish, success celebrations -- **Easter eggs**: Hidden interactions for discovery -- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches - -## Technical Implementation - -Use appropriate techniques for each animation: - -### Timing & Easing - -**Durations by purpose:** -- **100-150ms**: Instant feedback (button press, toggle) -- **200-300ms**: State changes (hover, menu open) -- **300-500ms**: Layout changes (accordion, modal) -- **500-800ms**: Entrance animations (page load) - -**Easing curves (use these, not CSS defaults):** -```css -/* Recommended - natural deceleration */ ---ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ ---ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ ---ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ - -/* AVOID - feel dated and tacky */ -/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ -/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ -``` - -**Exit animations are faster than entrances.** Use ~75% of enter duration. - -### CSS Animations -```css -/* Prefer for simple, declarative animations */ -- transitions for state changes -- @keyframes for complex sequences -- transform + opacity only (GPU-accelerated) -``` - -### JavaScript Animation -```javascript -/* Use for complex, interactive animations */ -- Web Animations API for programmatic control -- Framer Motion for React -- GSAP for complex sequences -``` - -### Performance -- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties -- **will-change**: Add sparingly for known expensive animations -- **Reduce paint**: Minimize repaints, use `contain` where appropriate -- **Monitor FPS**: Ensure 60fps on target devices - -### Accessibility -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**NEVER**: -- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself -- Animate layout properties (width, height, top, left)—use transform instead -- Use durations over 500ms for feedback—it feels laggy -- Animate without purpose—every animation needs a reason -- Ignore `prefers-reduced-motion`—this is an accessibility violation -- Animate everything—animation fatigue makes interfaces feel exhausting -- Block interaction during animations unless intentional - -## Verify Quality - -Test animations thoroughly: - -- **Smooth at 60fps**: No jank on target devices -- **Feels natural**: Easing curves feel organic, not robotic -- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) -- **Reduced motion works**: Animations disabled or simplified appropriately -- **Doesn't block**: Users can interact during/after animations -- **Adds value**: Makes interface clearer or more delightful - -Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. \ No newline at end of file diff --git a/.trae/skills/audit/SKILL.md b/.trae/skills/audit/SKILL.md deleted file mode 100644 index ea30301c1..000000000 --- a/.trae/skills/audit/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: audit -description: Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. - -This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. - -## Diagnostic Scan - -Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. - -### 1. Accessibility (A11y) - -**Check for**: -- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) -- **Missing ARIA**: Interactive elements without proper roles, labels, or states -- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps -- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons -- **Alt text**: Missing or poor image descriptions -- **Form issues**: Inputs without labels, poor error messaging, missing required indicators - -**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) - -### 2. Performance - -**Check for**: -- **Layout thrashing**: Reading/writing layout properties in loops -- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity -- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change -- **Bundle size**: Unnecessary imports, unused dependencies -- **Render performance**: Unnecessary re-renders, missing memoization - -**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) - -### 3. Theming - -**Check for**: -- **Hard-coded colors**: Colors not using design tokens -- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme -- **Inconsistent tokens**: Using wrong tokens, mixing token types -- **Theme switching issues**: Values that don't update on theme change - -**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) - -### 4. Responsive Design - -**Check for**: -- **Fixed widths**: Hard-coded widths that break on mobile -- **Touch targets**: Interactive elements < 44x44px -- **Horizontal scroll**: Content overflow on narrow viewports -- **Text scaling**: Layouts that break when text size increases -- **Missing breakpoints**: No mobile/tablet variants - -**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) - -### 5. Anti-Patterns (CRITICAL) - -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). - -**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) - -## Generate Report - -### Audit Health Score - -| # | Dimension | Score | Key Finding | -|---|-----------|-------|-------------| -| 1 | Accessibility | ? | [most critical a11y issue or "--"] | -| 2 | Performance | ? | | -| 3 | Responsive Design | ? | | -| 4 | Theming | ? | | -| 5 | Anti-Patterns | ? | | -| **Total** | | **??/20** | **[Rating band]** | - -**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) - -### Anti-Patterns Verdict -**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. - -### Executive Summary -- Audit Health Score: **??/20** ([rating band]) -- Total issues found (count by severity: P0/P1/P2/P3) -- Top 3-5 critical issues -- Recommended next steps - -### Detailed Findings by Severity - -Tag every issue with **P0-P3 severity**: -- **P0 Blocking**: Prevents task completion — fix immediately -- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release -- **P2 Minor**: Annoyance, workaround exists — fix in next pass -- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits - -For each issue, document: -- **[P?] Issue name** -- **Location**: Component, file, line -- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern -- **Impact**: How it affects users -- **WCAG/Standard**: Which standard it violates (if applicable) -- **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) - -### Patterns & Systemic Issues - -Identify recurring problems that indicate systemic gaps rather than one-off mistakes: -- "Hard-coded colors appear in 15+ components, should use design tokens" -- "Touch targets consistently too small (<44px) throughout mobile experience" - -### Positive Findings - -Note what's working well — good practices to maintain and replicate. - -## Recommended Actions - -List recommended commands in priority order (P0 first, then P1, then P2): - -1. **[P?] `/command-name`** — Brief description (specific context from audit findings) -2. **[P?] `/command-name`** — Brief description (specific context) - -**Rules**: Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended. - -After presenting the summary, tell the user: - -> You can ask me to run these one at a time, all at once, or in any order you prefer. -> -> Re-run `/audit` after fixes to see your score improve. - -**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. - -**NEVER**: -- Report issues without explaining impact (why does this matter?) -- Provide generic recommendations (be specific and actionable) -- Skip positive findings (celebrate what works) -- Forget to prioritize (everything can't be P0) -- Report false positives without verification - -Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. \ No newline at end of file diff --git a/.trae/skills/bolder/SKILL.md b/.trae/skills/bolder/SKILL.md deleted file mode 100644 index e80f55ed1..000000000 --- a/.trae/skills/bolder/SKILL.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -name: bolder -description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too safe or boring: - -1. **Identify weakness sources**: - - **Generic choices**: System fonts, basic colors, standard layouts - - **Timid scale**: Everything is medium-sized with no drama - - **Low contrast**: Everything has similar visual weight - - **Static**: No motion, no energy, no life - - **Predictable**: Standard patterns with no surprises - - **Flat hierarchy**: Nothing stands out or commands attention - -2. **Understand the context**: - - What's the brand personality? (How far can we push?) - - What's the purpose? (Marketing can be bolder than financial dashboards) - - Who's the audience? (What will resonate?) - - What are the constraints? (Brand guidelines, accessibility, performance) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. - -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." - -## Plan Amplification - -Create a strategy to increase impact while maintaining coherence: - -- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) -- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. -- **Risk budget**: How experimental can we be? Push boundaries within constraints. -- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) - -**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. - -## Amplify the Design - -Systematically increase impact across these dimensions: - -### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) -- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) -- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 -- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) - -### Color Intensification -- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) -- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop -- **Dominant color strategy**: Let one bold color own 60% of the design -- **Sharp accents**: High-contrast accent colors that pop -- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette -- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) - -### Spatial Drama -- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings -- **Break the grid**: Let hero elements escape containers and cross boundaries -- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry -- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) -- **Overlap**: Layer elements intentionally for depth - -### Visual Effects -- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) -- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) -- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) -- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) -- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand - -### Motion & Animation -- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays -- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences -- **Micro-interactions**: Satisfying hover effects, click feedback, state changes -- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) - -### Composition Boldness -- **Hero moments**: Create clear focal points with dramatic treatment -- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements -- **Full-bleed elements**: Use full viewport width/height for impact -- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits - -**NEVER**: -- Add effects randomly without purpose (chaos ≠ bold) -- Sacrifice readability for aesthetics (body text must be readable) -- Make everything bold (then nothing is bold - need contrast) -- Ignore accessibility (bold design must still meet WCAG standards) -- Overwhelm with motion (animation fatigue is real) -- Copy trendy aesthetics blindly (bold means distinctive, not derivative) - -## Verify Quality - -Ensure amplification maintains usability and coherence: - -- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. -- **Still functional**: Can users accomplish tasks without distraction? -- **Coherent**: Does everything feel intentional and unified? -- **Memorable**: Will users remember this experience? -- **Performant**: Do all these effects run smoothly? -- **Accessible**: Does it still meet accessibility standards? - -**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." - -Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. \ No newline at end of file diff --git a/.trae/skills/clarify/SKILL.md b/.trae/skills/clarify/SKILL.md deleted file mode 100644 index f0013b2cf..000000000 --- a/.trae/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. \ No newline at end of file diff --git a/.trae/skills/colorize/SKILL.md b/.trae/skills/colorize/SKILL.md deleted file mode 100644 index 76075804f..000000000 --- a/.trae/skills/colorize/SKILL.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -name: colorize -description: Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: existing brand colors. - ---- - -## Assess Color Opportunity - -Analyze the current state and identify opportunities: - -1. **Understand current state**: - - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? - - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? - - **Context**: What's appropriate for this domain and audience? - - **Brand**: Are there existing brand colors we should use? - -2. **Identify where color adds value**: - - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) - - **Hierarchy**: Drawing attention to important elements - - **Categorization**: Different sections, types, or states - - **Emotional tone**: Warmth, energy, trust, creativity - - **Wayfinding**: Helping users navigate and understand structure - - **Delight**: Moments of visual interest and personality - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. - -## Plan Color Strategy - -Create a purposeful color introduction plan: - -- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) -- **Dominant color**: Which color owns 60% of colored elements? -- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) -- **Application strategy**: Where does each color appear and why? - -**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. - -## Introduce Color Strategically - -Add color systematically across these dimensions: - -### Semantic Color -- **State indicators**: - - Success: Green tones (emerald, forest, mint) - - Error: Red/pink tones (rose, crimson, coral) - - Warning: Orange/amber tones - - Info: Blue tones (sky, ocean, indigo) - - Neutral: Gray/slate for inactive states - -- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) -- **Progress indicators**: Colored bars, rings, or charts showing completion or health - -### Accent Color Application -- **Primary actions**: Color the most important buttons/CTAs -- **Links**: Add color to clickable text (maintain accessibility) -- **Icons**: Colorize key icons for recognition and personality -- **Headers/titles**: Add color to section headers or key labels -- **Hover states**: Introduce color on interaction - -### Background & Surfaces -- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) -- **Colored sections**: Use subtle background colors to separate areas -- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) -- **Cards & surfaces**: Tint cards or surfaces slightly for warmth - -**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. - -### Data Visualization -- **Charts & graphs**: Use color to encode categories or values -- **Heatmaps**: Color intensity shows density or importance -- **Comparison**: Color coding for different datasets or timeframes - -### Borders & Accents -- **Accent borders**: Add colored left/top borders to cards or sections -- **Underlines**: Color underlines for emphasis or active states -- **Dividers**: Subtle colored dividers instead of gray lines -- **Focus rings**: Colored focus indicators matching brand - -### Typography Color -- **Colored headings**: Use brand colors for section headings (maintain contrast) -- **Highlight text**: Color for emphasis or categories -- **Labels & tags**: Small colored labels for metadata or categories - -### Decorative Elements -- **Illustrations**: Add colored illustrations or icons -- **Shapes**: Geometric shapes in brand colors as background elements -- **Gradients**: Colorful gradient overlays or mesh backgrounds -- **Blobs/organic shapes**: Soft colored shapes for visual interest - -## Balance & Refinement - -Ensure color addition improves rather than overwhelms: - -### Maintain Hierarchy -- **Dominant color** (60%): Primary brand color or most used accent -- **Secondary color** (30%): Supporting color for variety -- **Accent color** (10%): High contrast for key moments -- **Neutrals** (remaining): Gray/black/white for structure - -### Accessibility -- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) -- **Don't rely on color alone**: Use icons, labels, or patterns alongside color -- **Test for color blindness**: Verify red/green combinations work for all users - -### Cohesion -- **Consistent palette**: Use colors from defined palette, not arbitrary choices -- **Systematic application**: Same color meanings throughout (green always = success) -- **Temperature consistency**: Warm palette stays warm, cool stays cool - -**NEVER**: -- Use every color in the rainbow (choose 2-4 colors beyond neutrals) -- Apply color randomly without semantic meaning -- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead -- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication -- Use pure black (`#000`) or pure white (`#fff`) for large areas -- Violate WCAG contrast requirements -- Use color as the only indicator (accessibility issue) -- Make everything colorful (defeats the purpose) -- Default to purple-blue gradients (AI slop aesthetic) - -## Verify Color Addition - -Test that colorization improves the experience: - -- **Better hierarchy**: Does color guide attention appropriately? -- **Clearer meaning**: Does color help users understand states/categories? -- **More engaging**: Does the interface feel warmer and more inviting? -- **Still accessible**: Do all color combinations meet WCAG standards? -- **Not overwhelming**: Is color balanced and purposeful? - -Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. \ No newline at end of file diff --git a/.trae/skills/delight/SKILL.md b/.trae/skills/delight/SKILL.md deleted file mode 100644 index fedebff9c..000000000 --- a/.trae/skills/delight/SKILL.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -name: delight -description: Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). - ---- - -## Assess Delight Opportunities - -Identify where delight would enhance (not distract from) the experience: - -1. **Find natural delight moments**: - - **Success states**: Completed actions (save, send, publish) - - **Empty states**: First-time experiences, onboarding - - **Loading states**: Waiting periods that could be entertaining - - **Achievements**: Milestones, streaks, completions - - **Interactions**: Hover states, clicks, drags - - **Errors**: Softening frustrating moments - - **Easter eggs**: Hidden discoveries for curious users - -2. **Understand the context**: - - What's the brand personality? (Playful? Professional? Quirky? Elegant?) - - Who's the audience? (Tech-savvy? Creative? Corporate?) - - What's the emotional context? (Accomplishment? Exploration? Frustration?) - - What's appropriate? (Banking app ≠ gaming app) - -3. **Define delight strategy**: - - **Subtle sophistication**: Refined micro-interactions (luxury brands) - - **Playful personality**: Whimsical illustrations and copy (consumer apps) - - **Helpful surprises**: Anticipating needs before users ask (productivity tools) - - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. - -## Delight Principles - -Follow these guidelines: - -### Delight Amplifies, Never Blocks -- Delight moments should be quick (< 1 second) -- Never delay core functionality for delight -- Make delight skippable or subtle -- Respect user's time and task focus - -### Surprise and Discovery -- Hide delightful details for users to discover -- Reward exploration and curiosity -- Don't announce every delight moment -- Let users share discoveries with others - -### Appropriate to Context -- Match delight to emotional moment (celebrate success, empathize with errors) -- Respect the user's state (don't be playful during critical errors) -- Match brand personality and audience expectations -- Cultural sensitivity (what's delightful varies by culture) - -### Compound Over Time -- Delight should remain fresh with repeated use -- Vary responses (not same animation every time) -- Reveal deeper layers with continued use -- Build anticipation through patterns - -## Delight Techniques - -Add personality and joy through these methods: - -### Micro-interactions & Animation - -**Button delight**: -```css -/* Satisfying button press */ -.button { - transition: transform 0.1s, box-shadow 0.1s; -} -.button:active { - transform: translateY(2px); - box-shadow: 0 2px 4px rgba(0,0,0,0.2); -} - -/* Ripple effect on click */ -/* Smooth lift on hover */ -.button:hover { - transform: translateY(-2px); - transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ -} -``` - -**Loading delight**: -- Playful loading animations (not just spinners) -- Personality in loading messages (write product-specific ones, not generic AI filler) -- Progress indication with encouraging messages -- Skeleton screens with subtle animations - -**Success animations**: -- Checkmark draw animation -- Confetti burst for major achievements -- Gentle scale + fade for confirmation -- Satisfying sound effects (subtle) - -**Hover surprises**: -- Icons that animate on hover -- Color shifts or glow effects -- Tooltip reveals with personality -- Cursor changes (custom cursors for branded experiences) - -### Personality in Copy - -**Playful error messages**: -``` -"Error 404" -"This page is playing hide and seek. (And winning)" - -"Connection failed" -"Looks like the internet took a coffee break. Want to retry?" -``` - -**Encouraging empty states**: -``` -"No projects" -"Your canvas awaits. Create something amazing." - -"No messages" -"Inbox zero! You're crushing it today." -``` - -**Playful labels & tooltips**: -``` -"Delete" -"Send to void" (for playful brand) - -"Help" -"Rescue me" (tooltip) -``` - -**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. - -### Illustrations & Visual Personality - -**Custom illustrations**: -- Empty state illustrations (not stock icons) -- Error state illustrations (friendly monsters, quirky characters) -- Loading state illustrations (animated characters) -- Success state illustrations (celebrations) - -**Icon personality**: -- Custom icon set matching brand personality -- Animated icons (subtle motion on hover/click) -- Illustrative icons (more detailed than generic) -- Consistent style across all icons - -**Background effects**: -- Subtle particle effects -- Gradient mesh backgrounds -- Geometric patterns -- Parallax depth -- Time-of-day themes (morning vs night) - -### Satisfying Interactions - -**Drag and drop delight**: -- Lift effect on drag (shadow, scale) -- Snap animation when dropped -- Satisfying placement sound -- Undo toast ("Dropped in wrong place? [Undo]") - -**Toggle switches**: -- Smooth slide with spring physics -- Color transition -- Haptic feedback on mobile -- Optional sound effect - -**Progress & achievements**: -- Streak counters with celebratory milestones -- Progress bars that "celebrate" at 100% -- Badge unlocks with animation -- Playful stats ("You're on fire! 5 days in a row") - -**Form interactions**: -- Input fields that animate on focus -- Checkboxes with a satisfying scale pulse when checked -- Success state that celebrates valid input -- Auto-grow textareas - -### Sound Design - -**Subtle audio cues** (when appropriate): -- Notification sounds (distinctive but not annoying) -- Success sounds (satisfying "ding") -- Error sounds (empathetic, not harsh) -- Typing sounds for chat/messaging -- Ambient background audio (very subtle) - -**IMPORTANT**: -- Respect system sound settings -- Provide mute option -- Keep volumes quiet (subtle cues, not alarms) -- Don't play on every interaction (sound fatigue is real) - -### Easter Eggs & Hidden Delights - -**Discovery rewards**: -- Konami code unlocks special theme -- Hidden keyboard shortcuts (Cmd+K for special features) -- Hover reveals on logos or illustrations -- Alt text jokes on images (for screen reader users too!) -- Console messages for developers ("Like what you see? We're hiring!") - -**Seasonal touches**: -- Holiday themes (subtle, tasteful) -- Seasonal color shifts -- Weather-based variations -- Time-based changes (dark at night, light during day) - -**Contextual personality**: -- Different messages based on time of day -- Responses to specific user actions -- Randomized variations (not same every time) -- Progressive reveals with continued use - -### Loading & Waiting States - -**Make waiting engaging**: -- Interesting loading messages that rotate -- Progress bars with personality -- Mini-games during long loads -- Fun facts or tips while waiting -- Countdown with encouraging messages - -``` -Loading messages — write ones specific to your product, not generic AI filler: -- "Crunching your latest numbers..." -- "Syncing with your team's changes..." -- "Preparing your dashboard..." -- "Checking for updates since yesterday..." -``` - -**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. - -### Celebration Moments - -**Success celebrations**: -- Confetti for major milestones -- Animated checkmarks for completions -- Progress bar celebrations at 100% -- "Achievement unlocked" style notifications -- Personalized messages ("You published your 10th article!") - -**Milestone recognition**: -- First-time actions get special treatment -- Streak tracking and celebration -- Progress toward goals -- Anniversary celebrations - -## Implementation Patterns - -**Animation libraries**: -- Framer Motion (React) -- GSAP (universal) -- Lottie (After Effects animations) -- Canvas confetti (party effects) - -**Sound libraries**: -- Howler.js (audio management) -- Use-sound (React hook) - -**Physics libraries**: -- React Spring (spring physics) -- Popmotion (animation primitives) - -**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. - -**NEVER**: -- Delay core functionality for delight -- Force users through delightful moments (make skippable) -- Use delight to hide poor UX -- Overdo it (less is more) -- Ignore accessibility (animate responsibly, provide alternatives) -- Make every interaction delightful (special moments should be special) -- Sacrifice performance for delight -- Be inappropriate for context (read the room) - -## Verify Delight Quality - -Test that delight actually delights: - -- **User reactions**: Do users smile? Share screenshots? -- **Doesn't annoy**: Still pleasant after 100th time? -- **Doesn't block**: Can users opt out or skip? -- **Performant**: No jank, no slowdown -- **Appropriate**: Matches brand and context -- **Accessible**: Works with reduced motion, screen readers - -Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. \ No newline at end of file diff --git a/.trae/skills/distill/SKILL.md b/.trae/skills/distill/SKILL.md deleted file mode 100644 index f3f721c99..000000000 --- a/.trae/skills/distill/SKILL.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -name: distill -description: Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel complex or cluttered: - -1. **Identify complexity sources**: - - **Too many elements**: Competing buttons, redundant information, visual clutter - - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose - - **Information overload**: Everything visible at once, no progressive disclosure - - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations - - **Confusing hierarchy**: Unclear what matters most - - **Feature creep**: Too many options, actions, or paths forward - -2. **Find the essence**: - - What's the primary user goal? (There should be ONE) - - What's actually necessary vs nice-to-have? - - What can be removed, hidden, or combined? - - What's the 20% that delivers 80% of value? - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. - -## Plan Simplification - -Create a ruthless editing strategy: - -- **Core purpose**: What's the ONE thing this should accomplish? -- **Essential elements**: What's truly necessary to achieve that purpose? -- **Progressive disclosure**: What can be hidden until needed? -- **Consolidation opportunities**: What can be combined or integrated? - -**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. - -## Simplify the Design - -Systematically remove complexity across these dimensions: - -### Information Architecture -- **Reduce scope**: Remove secondary actions, optional features, redundant information -- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) -- **Combine related actions**: Merge similar buttons, consolidate forms, group related content -- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden -- **Remove redundancy**: If it's said elsewhere, don't repeat it here - -### Visual Simplification -- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors -- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights -- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function -- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards -- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead -- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps - -### Layout Simplification -- **Linear flow**: Replace complex grids with simple vertical flow where possible -- **Remove sidebars**: Move secondary content inline or hide it -- **Full-width**: Use available space generously instead of complex multi-column layouts -- **Consistent alignment**: Pick left or center, stick with it -- **Generous white space**: Let content breathe, don't pack everything tight - -### Interaction Simplification -- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) -- **Smart defaults**: Make common choices automatic, only ask when necessary -- **Inline actions**: Replace modal flows with inline editing where possible -- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? -- **Clear CTAs**: ONE obvious next step, not five competing actions - -### Content Simplification -- **Shorter copy**: Cut every sentence in half, then do it again -- **Active voice**: "Save changes" not "Changes will be saved" -- **Remove jargon**: Plain language always wins -- **Scannable structure**: Short paragraphs, bullet points, clear headings -- **Essential information only**: Remove marketing fluff, legalese, hedging -- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once - -### Code Simplification -- **Remove unused code**: Dead CSS, unused components, orphaned files -- **Flatten component trees**: Reduce nesting depth -- **Consolidate styles**: Merge similar styles, use utilities consistently -- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? - -**NEVER**: -- Remove necessary functionality (simplicity ≠ feature-less) -- Sacrifice accessibility for simplicity (clear labels and ARIA still required) -- Make things so simple they're unclear (mystery ≠ minimalism) -- Remove information users need to make decisions -- Eliminate hierarchy completely (some things should stand out) -- Oversimplify complex domains (match complexity to actual task complexity) - -## Verify Simplification - -Ensure simplification improves usability: - -- **Faster task completion**: Can users accomplish goals more quickly? -- **Reduced cognitive load**: Is it easier to understand what to do? -- **Still complete**: Are all necessary features still accessible? -- **Clearer hierarchy**: Is it obvious what matters most? -- **Better performance**: Does simpler design load faster? - -## Document Removed Complexity - -If you removed features or options: -- Document why they were removed -- Consider if they need alternative access points -- Note any user feedback to monitor - -Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." \ No newline at end of file diff --git a/.trae/skills/harden/SKILL.md b/.trae/skills/harden/SKILL.md deleted file mode 100644 index 31b996fa8..000000000 --- a/.trae/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

Failed to load data. {error.message}

- -
-)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. \ No newline at end of file diff --git a/.trae/skills/impeccable/SKILL.md b/.trae/skills/impeccable/SKILL.md index 210b9c92f..005f325c3 100644 --- a/.trae/skills/impeccable/SKILL.md +++ b/.trae/skills/impeccable/SKILL.md @@ -1,16 +1,18 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system. +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." version: 2.1.1 user-invocable: true -argument-hint: "[craft|teach|extract]" +argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -23,8 +25,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -34,7 +34,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -270,7 +270,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -284,82 +284,96 @@ Remember: the model is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `/impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `/impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `/impeccable craft [feature]` - Shape, then build a feature end-to-end +> `/impeccable shape [feature]` - Plan UX/UI before writing code +> `/impeccable teach` - Set up design context for this project (one-time) +> `/impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `/impeccable critique [target]` - UX design review with heuristic scoring +> `/impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `/impeccable polish [target]` - Final quality pass before shipping +> `/impeccable bolder [target]` - Amplify safe/bland designs +> `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `/impeccable distill [target]` - Strip to essence, remove complexity +> `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `/impeccable animate [target]` - Add purposeful animations and motion +> `/impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `/impeccable typeset [target]` - Improve typography hierarchy and fonts +> `/impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `/impeccable delight [target]` - Add personality and memorable touches +> `/impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `/impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `/impeccable adapt [target]` - Adapt for different devices and screen sizes +> `/impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) +> `/impeccable unpin ` - Remove a pinned shortcut +> +> Or use `/impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke /impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `/impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `/audit` instead of `/impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node .trae/skills/impeccable/scripts/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to RULES.md. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `/impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. \ No newline at end of file +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). \ No newline at end of file diff --git a/.trae/skills/impeccable/reference/adapt.md b/.trae/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/.trae/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/.trae/skills/impeccable/reference/animate.md b/.trae/skills/impeccable/reference/animate.md new file mode 100644 index 000000000..0186ce081 --- /dev/null +++ b/.trae/skills/impeccable/reference/animate.md @@ -0,0 +1,166 @@ +> **Additional context needed**: performance constraints. + +Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. + + +--- + +## Assess Animation Opportunities + +Analyze where motion would improve the experience: + +1. **Identify static areas**: + - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.) + - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes) + - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious + - **Lack of delight**: Functional but joyless interactions + - **Missed guidance**: Opportunities to direct attention or explain behavior + +2. **Understand the context**: + - What's the personality? (Playful vs serious, energetic vs calm) + - What's the performance budget? (Mobile-first? Complex page?) + - Who's the audience? (Motion-sensitive users? Power users who want speed?) + - What matters most? (One hero animation vs many micro-interactions?) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them. + +## Plan Animation Strategy + +Create a purposeful animation plan: + +- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?) +- **Feedback layer**: Which interactions need acknowledgment? +- **Transition layer**: Which state changes need smoothing? +- **Delight layer**: Where can we surprise and delight? + +**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments. + +## Implement Animations + +Add motion systematically across these categories: + +### Entrance Animations +- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations +- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects) +- **Content reveals**: Scroll-triggered animations using intersection observer +- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management + +### Micro-interactions +- **Button feedback**: + - Hover: Subtle scale (1.02-1.05), color shift, shadow increase + - Click: Quick scale down then up (0.95 → 1), ripple effect + - Loading: Spinner or pulse state +- **Form interactions**: + - Input focus: Border color transition, slight scale or glow + - Validation: Shake on error, check mark on success, smooth color transitions +- **Toggle switches**: Smooth slide + color transition (200-300ms) +- **Checkboxes/radio**: Check mark animation, ripple effect +- **Like/favorite**: Scale + rotation, particle effects, color transition + +### State Transitions +- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms) +- **Expand/collapse**: Height transition with overflow handling, icon rotation +- **Loading states**: Skeleton screen fades, spinner animations, progress bars +- **Success/error**: Color transitions, icon animations, gentle scale pulse +- **Enable/disable**: Opacity transitions, cursor changes + +### Navigation & Flow +- **Page transitions**: Crossfade between routes, shared element transitions +- **Tab switching**: Slide indicator, content fade/slide +- **Carousel/slider**: Smooth transforms, snap points, momentum +- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators + +### Feedback & Guidance +- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights +- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning +- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation +- **Focus flow**: Highlight path through form or workflow + +### Delight Moments +- **Empty states**: Subtle floating animations on illustrations +- **Completed actions**: Confetti, check mark flourish, success celebrations +- **Easter eggs**: Hidden interactions for discovery +- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches + +## Technical Implementation + +Use appropriate techniques for each animation: + +### Timing & Easing + +**Durations by purpose:** +- **100-150ms**: Instant feedback (button press, toggle) +- **200-300ms**: State changes (hover, menu open) +- **300-500ms**: Layout changes (accordion, modal) +- **500-800ms**: Entrance animations (page load) + +**Easing curves (use these, not CSS defaults):** +```css +/* Recommended - natural deceleration */ +--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */ +--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */ +--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */ + +/* AVOID - feel dated and tacky */ +/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */ +/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */ +``` + +**Exit animations are faster than entrances.** Use ~75% of enter duration. + +### CSS Animations +```css +/* Prefer for simple, declarative animations */ +- transitions for state changes +- @keyframes for complex sequences +- transform + opacity only (GPU-accelerated) +``` + +### JavaScript Animation +```javascript +/* Use for complex, interactive animations */ +- Web Animations API for programmatic control +- Framer Motion for React +- GSAP for complex sequences +``` + +### Performance +- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties +- **will-change**: Add sparingly for known expensive animations +- **Reduce paint**: Minimize repaints, use `contain` where appropriate +- **Monitor FPS**: Ensure 60fps on target devices + +### Accessibility +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**NEVER**: +- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself +- Animate layout properties (width, height, top, left)—use transform instead +- Use durations over 500ms for feedback—it feels laggy +- Animate without purpose—every animation needs a reason +- Ignore `prefers-reduced-motion`—this is an accessibility violation +- Animate everything—animation fatigue makes interfaces feel exhausting +- Block interaction during animations unless intentional + +## Verify Quality + +Test animations thoroughly: + +- **Smooth at 60fps**: No jank on target devices +- **Feels natural**: Easing curves feel organic, not robotic +- **Appropriate timing**: Not too fast (jarring) or too slow (laggy) +- **Reduced motion works**: Animations disabled or simplified appropriately +- **Doesn't block**: Users can interact during/after animations +- **Adds value**: Makes interface clearer or more delightful + +Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right. diff --git a/.trae/skills/impeccable/reference/audit.md b/.trae/skills/impeccable/reference/audit.md new file mode 100644 index 000000000..206fafb5c --- /dev/null +++ b/.trae/skills/impeccable/reference/audit.md @@ -0,0 +1,134 @@ +Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. + +This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. + +## Diagnostic Scan + +Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below. + +### 1. Accessibility (A11y) + +**Check for**: +- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA) +- **Missing ARIA**: Interactive elements without proper roles, labels, or states +- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps +- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons +- **Alt text**: Missing or poor image descriptions +- **Form issues**: Inputs without labels, poor error messaging, missing required indicators + +**Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA) + +### 2. Performance + +**Check for**: +- **Layout thrashing**: Reading/writing layout properties in loops +- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity +- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change +- **Bundle size**: Unnecessary imports, unused dependencies +- **Render performance**: Unnecessary re-renders, missing memoization + +**Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized) + +### 3. Theming + +**Check for**: +- **Hard-coded colors**: Colors not using design tokens +- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme +- **Inconsistent tokens**: Using wrong tokens, mixing token types +- **Theme switching issues**: Values that don't update on theme change + +**Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly) + +### 4. Responsive Design + +**Check for**: +- **Fixed widths**: Hard-coded widths that break on mobile +- **Touch targets**: Interactive elements < 44x44px +- **Horizontal scroll**: Content overflow on narrow viewports +- **Text scaling**: Layouts that break when text size increases +- **Missing breakpoints**: No mobile/tablet variants + +**Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets) + +### 5. Anti-Patterns (CRITICAL) + +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). + +**Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) + +## Generate Report + +### Audit Health Score + +| # | Dimension | Score | Key Finding | +|---|-----------|-------|-------------| +| 1 | Accessibility | ? | [most critical a11y issue or "--"] | +| 2 | Performance | ? | | +| 3 | Responsive Design | ? | | +| 4 | Theming | ? | | +| 5 | Anti-Patterns | ? | | +| **Total** | | **??/20** | **[Rating band]** | + +**Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues) + +### Anti-Patterns Verdict +**Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest. + +### Executive Summary +- Audit Health Score: **??/20** ([rating band]) +- Total issues found (count by severity: P0/P1/P2/P3) +- Top 3-5 critical issues +- Recommended next steps + +### Detailed Findings by Severity + +Tag every issue with **P0-P3 severity**: +- **P0 Blocking**: Prevents task completion — fix immediately +- **P1 Major**: Significant difficulty or WCAG AA violation — fix before release +- **P2 Minor**: Annoyance, workaround exists — fix in next pass +- **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits + +For each issue, document: +- **[P?] Issue name** +- **Location**: Component, file, line +- **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern +- **Impact**: How it affects users +- **WCAG/Standard**: Which standard it violates (if applicable) +- **Recommendation**: How to fix it +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) + +### Patterns & Systemic Issues + +Identify recurring problems that indicate systemic gaps rather than one-off mistakes: +- "Hard-coded colors appear in 15+ components, should use design tokens" +- "Touch targets consistently too small (<44px) throughout mobile experience" + +### Positive Findings + +Note what's working well — good practices to maintain and replicate. + +## Recommended Actions + +List recommended commands in priority order (P0 first, then P1, then P2): + +1. **[P?] `/command-name`** — Brief description (specific context from audit findings) +2. **[P?] `/command-name`** — Brief description (specific context) + +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. + +After presenting the summary, tell the user: + +> You can ask me to run these one at a time, all at once, or in any order you prefer. +> +> Re-run `/impeccable audit` after fixes to see your score improve. + +**IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. + +**NEVER**: +- Report issues without explaining impact (why does this matter?) +- Provide generic recommendations (be specific and actionable) +- Skip positive findings (celebrate what works) +- Forget to prioritize (everything can't be P0) +- Report false positives without verification + +Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement. diff --git a/.trae/skills/impeccable/reference/bolder.md b/.trae/skills/impeccable/reference/bolder.md new file mode 100644 index 000000000..cb3481663 --- /dev/null +++ b/.trae/skills/impeccable/reference/bolder.md @@ -0,0 +1,106 @@ +Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. + + +--- + +## Assess Current State + +Analyze what makes the design feel too safe or boring: + +1. **Identify weakness sources**: + - **Generic choices**: System fonts, basic colors, standard layouts + - **Timid scale**: Everything is medium-sized with no drama + - **Low contrast**: Everything has similar visual weight + - **Static**: No motion, no energy, no life + - **Predictable**: Standard patterns with no surprises + - **Flat hierarchy**: Nothing stands out or commands attention + +2. **Understand the context**: + - What's the brand personality? (How far can we push?) + - What's the purpose? (Marketing can be bolder than financial dashboards) + - Who's the audience? (What will resonate?) + - What are the constraints? (Brand guidelines, accessibility, performance) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. + +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." + +## Plan Amplification + +Create a strategy to increase impact while maintaining coherence: + +- **Focal point**: What should be the hero moment? (Pick ONE, make it amazing) +- **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane. +- **Risk budget**: How experimental can we be? Push boundaries within constraints. +- **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast) + +**IMPORTANT**: Bold design must still be usable. Impact without function is just decoration. + +## Amplify the Design + +Systematically increase impact across these dimensions: + +### Typography Amplification +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) +- **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) +- **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 +- **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) + +### Color Intensification +- **Increase saturation**: Shift to more vibrant, energetic colors (but not neon) +- **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop +- **Dominant color strategy**: Let one bold color own 60% of the design +- **Sharp accents**: High-contrast accent colors that pop +- **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette +- **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue) + +### Spatial Drama +- **Extreme scale jumps**: Make important elements 3-5x larger than surroundings +- **Break the grid**: Let hero elements escape containers and cross boundaries +- **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry +- **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px) +- **Overlap**: Layer elements intentionally for depth + +### Visual Effects +- **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles) +- **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue) +- **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop) +- **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side) +- **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand + +### Motion & Animation +- **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays +- **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences +- **Micro-interactions**: Satisfying hover effects, click feedback, state changes +- **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect) + +### Composition Boldness +- **Hero moments**: Create clear focal points with dramatic treatment +- **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements +- **Full-bleed elements**: Use full viewport width/height for impact +- **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits + +**NEVER**: +- Add effects randomly without purpose (chaos ≠ bold) +- Sacrifice readability for aesthetics (body text must be readable) +- Make everything bold (then nothing is bold - need contrast) +- Ignore accessibility (bold design must still meet WCAG standards) +- Overwhelm with motion (animation fatigue is real) +- Copy trendy aesthetics blindly (bold means distinctive, not derivative) + +## Verify Quality + +Ensure amplification maintains usability and coherence: + +- **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over. +- **Still functional**: Can users accomplish tasks without distraction? +- **Coherent**: Does everything feel intentional and unified? +- **Memorable**: Will users remember this experience? +- **Performant**: Do all these effects run smoothly? +- **Accessible**: Does it still meet accessibility standards? + +**The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects." + +Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable. diff --git a/.trae/skills/impeccable/reference/clarify.md b/.trae/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/.trae/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/.trae/skills/critique/reference/cognitive-load.md b/.trae/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from .trae/skills/critique/reference/cognitive-load.md rename to .trae/skills/impeccable/reference/cognitive-load.md diff --git a/.trae/skills/impeccable/reference/colorize.md b/.trae/skills/impeccable/reference/colorize.md new file mode 100644 index 000000000..a4ce5072e --- /dev/null +++ b/.trae/skills/impeccable/reference/colorize.md @@ -0,0 +1,134 @@ +> **Additional context needed**: existing brand colors. + +Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. + + +--- + +## Assess Color Opportunity + +Analyze the current state and identify opportunities: + +1. **Understand current state**: + - **Color absence**: Pure grayscale? Limited neutrals? One timid accent? + - **Missed opportunities**: Where could color add meaning, hierarchy, or delight? + - **Context**: What's appropriate for this domain and audience? + - **Brand**: Are there existing brand colors we should use? + +2. **Identify where color adds value**: + - **Semantic meaning**: Success (green), error (red), warning (yellow/orange), info (blue) + - **Hierarchy**: Drawing attention to important elements + - **Categorization**: Different sections, types, or states + - **Emotional tone**: Warmth, energy, trust, creativity + - **Wayfinding**: Helping users navigate and understand structure + - **Delight**: Moments of visual interest and personality + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose. + +## Plan Color Strategy + +Create a purposeful color introduction plan: + +- **Color palette**: What colors match the brand/context? (Choose 2-4 colors max beyond neutrals) +- **Dominant color**: Which color owns 60% of colored elements? +- **Accent colors**: Which colors provide contrast and highlights? (30% and 10%) +- **Application strategy**: Where does each color appear and why? + +**IMPORTANT**: Color should enhance hierarchy and meaning, not create chaos. Less is more when it matters more. + +## Introduce Color Strategically + +Add color systematically across these dimensions: + +### Semantic Color +- **State indicators**: + - Success: Green tones (emerald, forest, mint) + - Error: Red/pink tones (rose, crimson, coral) + - Warning: Orange/amber tones + - Info: Blue tones (sky, ocean, indigo) + - Neutral: Gray/slate for inactive states + +- **Status badges**: Colored backgrounds or borders for states (active, pending, completed, etc.) +- **Progress indicators**: Colored bars, rings, or charts showing completion or health + +### Accent Color Application +- **Primary actions**: Color the most important buttons/CTAs +- **Links**: Add color to clickable text (maintain accessibility) +- **Icons**: Colorize key icons for recognition and personality +- **Headers/titles**: Add color to section headers or key labels +- **Hover states**: Introduce color on interaction + +### Background & Surfaces +- **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`) +- **Colored sections**: Use subtle background colors to separate areas +- **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue) +- **Cards & surfaces**: Tint cards or surfaces slightly for warmth + +**Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales. + +### Data Visualization +- **Charts & graphs**: Use color to encode categories or values +- **Heatmaps**: Color intensity shows density or importance +- **Comparison**: Color coding for different datasets or timeframes + +### Borders & Accents +- **Accent borders**: Add colored left/top borders to cards or sections +- **Underlines**: Color underlines for emphasis or active states +- **Dividers**: Subtle colored dividers instead of gray lines +- **Focus rings**: Colored focus indicators matching brand + +### Typography Color +- **Colored headings**: Use brand colors for section headings (maintain contrast) +- **Highlight text**: Color for emphasis or categories +- **Labels & tags**: Small colored labels for metadata or categories + +### Decorative Elements +- **Illustrations**: Add colored illustrations or icons +- **Shapes**: Geometric shapes in brand colors as background elements +- **Gradients**: Colorful gradient overlays or mesh backgrounds +- **Blobs/organic shapes**: Soft colored shapes for visual interest + +## Balance & Refinement + +Ensure color addition improves rather than overwhelms: + +### Maintain Hierarchy +- **Dominant color** (60%): Primary brand color or most used accent +- **Secondary color** (30%): Supporting color for variety +- **Accent color** (10%): High contrast for key moments +- **Neutrals** (remaining): Gray/black/white for structure + +### Accessibility +- **Contrast ratios**: Ensure WCAG compliance (4.5:1 for text, 3:1 for UI components) +- **Don't rely on color alone**: Use icons, labels, or patterns alongside color +- **Test for color blindness**: Verify red/green combinations work for all users + +### Cohesion +- **Consistent palette**: Use colors from defined palette, not arbitrary choices +- **Systematic application**: Same color meanings throughout (green always = success) +- **Temperature consistency**: Warm palette stays warm, cool stays cool + +**NEVER**: +- Use every color in the rainbow (choose 2-4 colors beyond neutrals) +- Apply color randomly without semantic meaning +- Put gray text on colored backgrounds—it looks washed out; use a darker shade of the background color or transparency instead +- Use pure gray for neutrals—add subtle color tint (warm or cool) for sophistication +- Use pure black (`#000`) or pure white (`#fff`) for large areas +- Violate WCAG contrast requirements +- Use color as the only indicator (accessibility issue) +- Make everything colorful (defeats the purpose) +- Default to purple-blue gradients (AI slop aesthetic) + +## Verify Color Addition + +Test that colorization improves the experience: + +- **Better hierarchy**: Does color guide attention appropriately? +- **Clearer meaning**: Does color help users understand states/categories? +- **More engaging**: Does the interface feel warmer and more inviting? +- **Still accessible**: Do all color combinations meet WCAG standards? +- **Not overwhelming**: Is color balanced and purposeful? + +Remember: Color is emotional and powerful. Use it to create warmth, guide attention, communicate meaning, and express personality. But restraint and strategy matter more than saturation and variety. Be colorful, but be intentional. diff --git a/.trae/skills/impeccable/reference/craft.md b/.trae/skills/impeccable/reference/craft.md index 8cddbc9db..b038cf96d 100644 --- a/.trae/skills/impeccable/reference/craft.md +++ b/.trae/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run /shape, passing along whatever feature description the user provided. +Run /impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run /shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run /impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/.trae-cn/skills/critique/SKILL.md b/.trae/skills/impeccable/reference/critique.md similarity index 84% rename from .trae-cn/skills/critique/SKILL.md rename to .trae/skills/impeccable/reference/critique.md index e89e7b281..8866153fc 100644 --- a/.trae-cn/skills/critique/SKILL.md +++ b/.trae/skills/impeccable/reference/critique.md @@ -1,18 +1,6 @@ ---- -name: critique -description: Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component. -version: 2.1.1 -user-invocable: true -argument-hint: "[area (feature, page, component...)]" ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -30,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -44,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -94,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -140,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `RULES.md` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -176,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. ask the user directly to clarify what you cannot infer. These answers will shape the action plan. @@ -196,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -209,17 +197,17 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /animate, /quieter, /shape, /optimize, /adapt, /clarify, /layout, /distill, /delight, /audit, /harden, /polish, /bolder, /typeset, /critique, /colorize, /overdrive +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `/polish` as the final step if any fixes were recommended +- End with `/impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `/critique` after fixes to see your score improve. \ No newline at end of file +> Re-run `/impeccable critique` after fixes to see your score improve. diff --git a/.trae/skills/impeccable/reference/delight.md b/.trae/skills/impeccable/reference/delight.md new file mode 100644 index 000000000..8a781e70e --- /dev/null +++ b/.trae/skills/impeccable/reference/delight.md @@ -0,0 +1,295 @@ +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). + +Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. + + +--- + +## Assess Delight Opportunities + +Identify where delight would enhance (not distract from) the experience: + +1. **Find natural delight moments**: + - **Success states**: Completed actions (save, send, publish) + - **Empty states**: First-time experiences, onboarding + - **Loading states**: Waiting periods that could be entertaining + - **Achievements**: Milestones, streaks, completions + - **Interactions**: Hover states, clicks, drags + - **Errors**: Softening frustrating moments + - **Easter eggs**: Hidden discoveries for curious users + +2. **Understand the context**: + - What's the brand personality? (Playful? Professional? Quirky? Elegant?) + - Who's the audience? (Tech-savvy? Creative? Corporate?) + - What's the emotional context? (Accomplishment? Exploration? Frustration?) + - What's appropriate? (Banking app ≠ gaming app) + +3. **Define delight strategy**: + - **Subtle sophistication**: Refined micro-interactions (luxury brands) + - **Playful personality**: Whimsical illustrations and copy (consumer apps) + - **Helpful surprises**: Anticipating needs before users ask (productivity tools) + - **Sensory richness**: Satisfying sounds, smooth animations (creative tools) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far. + +## Delight Principles + +Follow these guidelines: + +### Delight Amplifies, Never Blocks +- Delight moments should be quick (< 1 second) +- Never delay core functionality for delight +- Make delight skippable or subtle +- Respect user's time and task focus + +### Surprise and Discovery +- Hide delightful details for users to discover +- Reward exploration and curiosity +- Don't announce every delight moment +- Let users share discoveries with others + +### Appropriate to Context +- Match delight to emotional moment (celebrate success, empathize with errors) +- Respect the user's state (don't be playful during critical errors) +- Match brand personality and audience expectations +- Cultural sensitivity (what's delightful varies by culture) + +### Compound Over Time +- Delight should remain fresh with repeated use +- Vary responses (not same animation every time) +- Reveal deeper layers with continued use +- Build anticipation through patterns + +## Delight Techniques + +Add personality and joy through these methods: + +### Micro-interactions & Animation + +**Button delight**: +```css +/* Satisfying button press */ +.button { + transition: transform 0.1s, box-shadow 0.1s; +} +.button:active { + transform: translateY(2px); + box-shadow: 0 2px 4px rgba(0,0,0,0.2); +} + +/* Ripple effect on click */ +/* Smooth lift on hover */ +.button:hover { + transform: translateY(-2px); + transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */ +} +``` + +**Loading delight**: +- Playful loading animations (not just spinners) +- Personality in loading messages (write product-specific ones, not generic AI filler) +- Progress indication with encouraging messages +- Skeleton screens with subtle animations + +**Success animations**: +- Checkmark draw animation +- Confetti burst for major achievements +- Gentle scale + fade for confirmation +- Satisfying sound effects (subtle) + +**Hover surprises**: +- Icons that animate on hover +- Color shifts or glow effects +- Tooltip reveals with personality +- Cursor changes (custom cursors for branded experiences) + +### Personality in Copy + +**Playful error messages**: +``` +"Error 404" +"This page is playing hide and seek. (And winning)" + +"Connection failed" +"Looks like the internet took a coffee break. Want to retry?" +``` + +**Encouraging empty states**: +``` +"No projects" +"Your canvas awaits. Create something amazing." + +"No messages" +"Inbox zero! You're crushing it today." +``` + +**Playful labels & tooltips**: +``` +"Delete" +"Send to void" (for playful brand) + +"Help" +"Rescue me" (tooltip) +``` + +**IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm. + +### Illustrations & Visual Personality + +**Custom illustrations**: +- Empty state illustrations (not stock icons) +- Error state illustrations (friendly monsters, quirky characters) +- Loading state illustrations (animated characters) +- Success state illustrations (celebrations) + +**Icon personality**: +- Custom icon set matching brand personality +- Animated icons (subtle motion on hover/click) +- Illustrative icons (more detailed than generic) +- Consistent style across all icons + +**Background effects**: +- Subtle particle effects +- Gradient mesh backgrounds +- Geometric patterns +- Parallax depth +- Time-of-day themes (morning vs night) + +### Satisfying Interactions + +**Drag and drop delight**: +- Lift effect on drag (shadow, scale) +- Snap animation when dropped +- Satisfying placement sound +- Undo toast ("Dropped in wrong place? [Undo]") + +**Toggle switches**: +- Smooth slide with spring physics +- Color transition +- Haptic feedback on mobile +- Optional sound effect + +**Progress & achievements**: +- Streak counters with celebratory milestones +- Progress bars that "celebrate" at 100% +- Badge unlocks with animation +- Playful stats ("You're on fire! 5 days in a row") + +**Form interactions**: +- Input fields that animate on focus +- Checkboxes with a satisfying scale pulse when checked +- Success state that celebrates valid input +- Auto-grow textareas + +### Sound Design + +**Subtle audio cues** (when appropriate): +- Notification sounds (distinctive but not annoying) +- Success sounds (satisfying "ding") +- Error sounds (empathetic, not harsh) +- Typing sounds for chat/messaging +- Ambient background audio (very subtle) + +**IMPORTANT**: +- Respect system sound settings +- Provide mute option +- Keep volumes quiet (subtle cues, not alarms) +- Don't play on every interaction (sound fatigue is real) + +### Easter Eggs & Hidden Delights + +**Discovery rewards**: +- Konami code unlocks special theme +- Hidden keyboard shortcuts (Cmd+K for special features) +- Hover reveals on logos or illustrations +- Alt text jokes on images (for screen reader users too!) +- Console messages for developers ("Like what you see? We're hiring!") + +**Seasonal touches**: +- Holiday themes (subtle, tasteful) +- Seasonal color shifts +- Weather-based variations +- Time-based changes (dark at night, light during day) + +**Contextual personality**: +- Different messages based on time of day +- Responses to specific user actions +- Randomized variations (not same every time) +- Progressive reveals with continued use + +### Loading & Waiting States + +**Make waiting engaging**: +- Interesting loading messages that rotate +- Progress bars with personality +- Mini-games during long loads +- Fun facts or tips while waiting +- Countdown with encouraging messages + +``` +Loading messages — write ones specific to your product, not generic AI filler: +- "Crunching your latest numbers..." +- "Syncing with your team's changes..." +- "Preparing your dashboard..." +- "Checking for updates since yesterday..." +``` + +**WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does. + +### Celebration Moments + +**Success celebrations**: +- Confetti for major milestones +- Animated checkmarks for completions +- Progress bar celebrations at 100% +- "Achievement unlocked" style notifications +- Personalized messages ("You published your 10th article!") + +**Milestone recognition**: +- First-time actions get special treatment +- Streak tracking and celebration +- Progress toward goals +- Anniversary celebrations + +## Implementation Patterns + +**Animation libraries**: +- Framer Motion (React) +- GSAP (universal) +- Lottie (After Effects animations) +- Canvas confetti (party effects) + +**Sound libraries**: +- Howler.js (audio management) +- Use-sound (React hook) + +**Physics libraries**: +- React Spring (spring physics) +- Popmotion (animation primitives) + +**IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features. + +**NEVER**: +- Delay core functionality for delight +- Force users through delightful moments (make skippable) +- Use delight to hide poor UX +- Overdo it (less is more) +- Ignore accessibility (animate responsibly, provide alternatives) +- Make every interaction delightful (special moments should be special) +- Sacrifice performance for delight +- Be inappropriate for context (read the room) + +## Verify Delight Quality + +Test that delight actually delights: + +- **User reactions**: Do users smile? Share screenshots? +- **Doesn't annoy**: Still pleasant after 100th time? +- **Doesn't block**: Can users opt out or skip? +- **Performant**: No jank, no slowdown +- **Appropriate**: Matches brand and context +- **Accessible**: Works with reduced motion, screen readers + +Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct. diff --git a/.trae/skills/impeccable/reference/distill.md b/.trae/skills/impeccable/reference/distill.md new file mode 100644 index 000000000..4f47dc0b4 --- /dev/null +++ b/.trae/skills/impeccable/reference/distill.md @@ -0,0 +1,111 @@ +Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. + + +--- + +## Assess Current State + +Analyze what makes the design feel complex or cluttered: + +1. **Identify complexity sources**: + - **Too many elements**: Competing buttons, redundant information, visual clutter + - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose + - **Information overload**: Everything visible at once, no progressive disclosure + - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations + - **Confusing hierarchy**: Unclear what matters most + - **Feature creep**: Too many options, actions, or paths forward + +2. **Find the essence**: + - What's the primary user goal? (There should be ONE) + - What's actually necessary vs nice-to-have? + - What can be removed, hidden, or combined? + - What's the 20% that delivers 80% of value? + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence. + +## Plan Simplification + +Create a ruthless editing strategy: + +- **Core purpose**: What's the ONE thing this should accomplish? +- **Essential elements**: What's truly necessary to achieve that purpose? +- **Progressive disclosure**: What can be hidden until needed? +- **Consolidation opportunities**: What can be combined or integrated? + +**IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless. + +## Simplify the Design + +Systematically remove complexity across these dimensions: + +### Information Architecture +- **Reduce scope**: Remove secondary actions, optional features, redundant information +- **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows) +- **Combine related actions**: Merge similar buttons, consolidate forms, group related content +- **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden +- **Remove redundancy**: If it's said elsewhere, don't repeat it here + +### Visual Simplification +- **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors +- **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights +- **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function +- **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards +- **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead +- **Consistent spacing**: Use one spacing scale, remove arbitrary gaps + +### Layout Simplification +- **Linear flow**: Replace complex grids with simple vertical flow where possible +- **Remove sidebars**: Move secondary content inline or hide it +- **Full-width**: Use available space generously instead of complex multi-column layouts +- **Consistent alignment**: Pick left or center, stick with it +- **Generous white space**: Let content breathe, don't pack everything tight + +### Interaction Simplification +- **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real) +- **Smart defaults**: Make common choices automatic, only ask when necessary +- **Inline actions**: Replace modal flows with inline editing where possible +- **Remove steps**: Can signup be one step instead of three? Can checkout be simplified? +- **Clear CTAs**: ONE obvious next step, not five competing actions + +### Content Simplification +- **Shorter copy**: Cut every sentence in half, then do it again +- **Active voice**: "Save changes" not "Changes will be saved" +- **Remove jargon**: Plain language always wins +- **Scannable structure**: Short paragraphs, bullet points, clear headings +- **Essential information only**: Remove marketing fluff, legalese, hedging +- **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once + +### Code Simplification +- **Remove unused code**: Dead CSS, unused components, orphaned files +- **Flatten component trees**: Reduce nesting depth +- **Consolidate styles**: Merge similar styles, use utilities consistently +- **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases? + +**NEVER**: +- Remove necessary functionality (simplicity ≠ feature-less) +- Sacrifice accessibility for simplicity (clear labels and ARIA still required) +- Make things so simple they're unclear (mystery ≠ minimalism) +- Remove information users need to make decisions +- Eliminate hierarchy completely (some things should stand out) +- Oversimplify complex domains (match complexity to actual task complexity) + +## Verify Simplification + +Ensure simplification improves usability: + +- **Faster task completion**: Can users accomplish goals more quickly? +- **Reduced cognitive load**: Is it easier to understand what to do? +- **Still complete**: Are all necessary features still accessible? +- **Clearer hierarchy**: Is it obvious what matters most? +- **Better performance**: Does simpler design load faster? + +## Document Removed Complexity + +If you removed features or options: +- Document why they were removed +- Consider if they need alternative access points +- Note any user feedback to monitor + +Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." diff --git a/.trae/skills/impeccable/reference/harden.md b/.trae/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/.trae/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

Failed to load data. {error.message}

+ +
+)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/.trae/skills/critique/reference/heuristics-scoring.md b/.trae/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from .trae/skills/critique/reference/heuristics-scoring.md rename to .trae/skills/impeccable/reference/heuristics-scoring.md diff --git a/.trae/skills/impeccable/reference/layout.md b/.trae/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/.trae/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/.trae/skills/impeccable/reference/optimize.md b/.trae/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/.trae/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/.trae/skills/impeccable/reference/overdrive.md b/.trae/skills/impeccable/reference/overdrive.md new file mode 100644 index 000000000..d84a147dc --- /dev/null +++ b/.trae/skills/impeccable/reference/overdrive.md @@ -0,0 +1,130 @@ +Start your response with: + +``` +──────────── ⚡ OVERDRIVE ───────────── +》》》 Entering overdrive mode... +``` + +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. + +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. + +### Propose Before Building + +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: + +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). +3. Only proceed with the direction the user confirms. + +Skipping this step risks building something embarrassing that needs to be thrown away. + +### Iterate with Browser Automation + +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. + +--- + +## Assess What "Extraordinary" Means Here + +The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** + +### For visual/marketing surfaces +Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. + +### For functional UI +Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. + +### For performance-critical UI +The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. + +### For data-heavy interfaces +Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. + +**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. + +## The Toolkit + +Organized by what you're trying to achieve, not by technology name. + +### Make transitions feel cinematic +- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. +- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes +- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. + +### Tie animation to scroll position +- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) + +### Render beyond CSS +- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. +- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. +- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. +- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. + +### Make data feel alive +- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. +- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. +- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. + +### Animate complex properties +- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. +- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. + +### Push performance boundaries +- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. +- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. +- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. + +### Interact with the device +- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. +- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. + +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. + +## Implement with Discipline + +### Progressive enhancement is non-negotiable + +Every technique must degrade gracefully. The experience without the enhancement must still be good. + +```css +@supports (animation-timeline: scroll()) { + .hero { animation-timeline: scroll(); } +} +``` + +```javascript +if ('gpu' in navigator) { /* WebGPU */ } +else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } +/* CSS-only fallback must still look good */ +``` + +### Performance rules + +- Target 60fps. If dropping below 50, simplify. +- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. +- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. +- Pause off-screen rendering. Kill what you can't see. +- Test on real mid-range devices, not just your development machine. + +### Polish is the difference + +The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. + +**NEVER**: +- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion +- Ship effects that cause jank on mid-range devices +- Use bleeding-edge APIs without a functional fallback +- Add sound without explicit user opt-in +- Use technical ambition to mask weak design fundamentals; fix those first with other commands +- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise + +## Verify the Result + +- **The wow test**: Show it to someone who hasn't seen it. Do they react? +- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? +- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? +- **The accessibility test**: Enable reduced motion. Still beautiful? +- **The context test**: Does this make sense for THIS brand and audience? + +Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. diff --git a/.trae/skills/critique/reference/personas.md b/.trae/skills/impeccable/reference/personas.md similarity index 100% rename from .trae/skills/critique/reference/personas.md rename to .trae/skills/impeccable/reference/personas.md diff --git a/.trae/skills/impeccable/reference/polish.md b/.trae/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/.trae/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/.trae/skills/impeccable/reference/quieter.md b/.trae/skills/impeccable/reference/quieter.md new file mode 100644 index 000000000..a8ad41809 --- /dev/null +++ b/.trae/skills/impeccable/reference/quieter.md @@ -0,0 +1,92 @@ +Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. + + +--- + +## Assess Current State + +Analyze what makes the design feel too intense: + +1. **Identify intensity sources**: + - **Color saturation**: Overly bright or saturated colors + - **Contrast extremes**: Too much high-contrast juxtaposition + - **Visual weight**: Too many bold, heavy elements competing + - **Animation excess**: Too much motion or overly dramatic effects + - **Complexity**: Too many visual elements, patterns, or decorations + - **Scale**: Everything is large and loud with no hierarchy + +2. **Understand the context**: + - What's the purpose? (Marketing vs tool vs reading experience) + - Who's the audience? (Some contexts need energy) + - What's working? (Don't throw away good ideas) + - What's the core message? (Preserve what matters) + +If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. + +**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. + +## Plan Refinement + +Create a strategy to reduce intensity while maintaining impact: + +- **Color approach**: Desaturate or shift to more sophisticated tones? +- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? +- **Simplification approach**: What can be removed entirely? +- **Sophistication approach**: How can we signal quality through restraint? + +**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. + +## Refine the Design + +Systematically reduce intensity across these dimensions: + +### Color Refinement +- **Reduce saturation**: Shift from fully saturated to 70-85% saturation +- **Soften palette**: Replace bright colors with muted, sophisticated tones +- **Reduce color variety**: Use fewer colors more thoughtfully +- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) +- **Gentler contrasts**: High contrast only where it matters most +- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness +- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead + +### Visual Weight Reduction +- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate +- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness +- **White space**: Increase breathing room, reduce density +- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely + +### Simplification +- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose +- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes +- **Reduce layering**: Flatten visual hierarchy where possible +- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows + +### Motion Reduction +- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing +- **Remove decorative animations**: Keep functional motion, remove flourishes +- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback +- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic +- **Remove animations entirely** if they're not serving a clear purpose + +### Composition Refinement +- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling +- **Align to grid**: Bring rogue elements back into systematic alignment +- **Even out spacing**: Replace extreme spacing variations with consistent rhythm + +**NEVER**: +- Make everything the same size/weight (hierarchy still matters) +- Remove all color (quiet ≠ grayscale) +- Eliminate all personality (maintain character through refinement) +- Sacrifice usability for aesthetics (functional elements still need clear affordances) +- Make everything small and light (some anchors needed) + +## Verify Quality + +Ensure refinement maintains quality: + +- **Still functional**: Can users still accomplish tasks easily? +- **Still distinctive**: Does it have character, or is it generic now? +- **Better reading**: Is text easier to read for extended periods? +- **Sophistication**: Does it feel more refined and premium? + +Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. diff --git a/.trae/skills/impeccable/reference/shape.md b/.trae/skills/impeccable/reference/shape.md new file mode 100644 index 000000000..0ae281943 --- /dev/null +++ b/.trae/skills/impeccable/reference/shape.md @@ -0,0 +1,82 @@ +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. + +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. + +**Output**: A design brief that can be handed off to /impeccable craft, or directly to /impeccable for freeform implementation. + +## Philosophy + +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. + +## Phase 1: Discovery Interview + +**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. + +Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. + +### Purpose & Context +- What is this feature for? What problem does it solve? +- Who specifically will use it? (Not "users"; be specific: role, context, frequency) +- What does success look like? How will you know this feature is working? +- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) + +### Content & Data +- What content or data does this feature display or collect? +- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) +- What are the edge cases? (Empty state, error state, first-time use, power user) +- Is any content dynamic? What changes and how often? + +### Design Goals +- What's the single most important thing a user should do or understand here? +- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) +- Are there existing patterns in the product this should be consistent with? +- Are there specific examples (inside or outside the product) that capture what you're going for? + +### Constraints +- Are there technical constraints? (Framework, performance budget, browser support) +- Are there content constraints? (Localization, dynamic text length, user-generated content) +- Mobile/responsive requirements? +- Accessibility requirements beyond WCAG AA? + +### Anti-Goals +- What should this NOT be? What would be a wrong direction? +- What's the biggest risk of getting this wrong? + +## Phase 2: Design Brief + +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. + +### Brief Structure + +**1. Feature Summary** (2-3 sentences) +What this is, who it's for, what it needs to accomplish. + +**2. Primary User Action** +The single most important thing a user should do or understand here. + +**3. Design Direction** +How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. + +**4. Layout Strategy** +High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. + +**5. Key States** +List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. + +**6. Interaction Model** +How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? + +**7. Content Requirements** +What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. + +**8. Recommended References** +Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). + +**9. Open Questions** +Anything unresolved that the implementer should resolve during build. + +--- + +ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. + +Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this command internally.) diff --git a/.trae/skills/impeccable/reference/teach.md b/.trae/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..972ca25be --- /dev/null +++ b/.trae/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +ask the user directly to clarify what you cannot infer. Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then ask the user directly to clarify what you cannot infer. whether they'd also like the Design Context appended to RULES.md. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/.trae/skills/impeccable/reference/typeset.md b/.trae/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/.trae/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/.trae/skills/impeccable/scripts/cleanup-deprecated.mjs b/.trae/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/.trae/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/.trae/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/.trae/skills/impeccable/scripts/command-metadata.json b/.trae/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/.trae/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/.trae/skills/impeccable/scripts/pin.mjs b/.trae/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/.trae/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/.trae/skills/layout/SKILL.md b/.trae/skills/layout/SKILL.md deleted file mode 100644 index 6e532e38a..000000000 --- a/.trae/skills/layout/SKILL.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: layout -description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. \ No newline at end of file diff --git a/.trae/skills/optimize/SKILL.md b/.trae/skills/optimize/SKILL.md deleted file mode 100644 index d562cc53d..000000000 --- a/.trae/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. \ No newline at end of file diff --git a/.trae/skills/overdrive/SKILL.md b/.trae/skills/overdrive/SKILL.md deleted file mode 100644 index 862a4c9c4..000000000 --- a/.trae/skills/overdrive/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: overdrive -description: Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Start your response with: - -``` -──────────── ⚡ OVERDRIVE ───────────── -》》》 Entering overdrive mode... -``` - -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. - -### Propose Before Building - -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: - -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. -2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). -3. Only proceed with the direction the user confirms. - -Skipping this step risks building something embarrassing that needs to be thrown away. - -### Iterate with Browser Automation - -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. - ---- - -## Assess What "Extraordinary" Means Here - -The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?** - -### For visual/marketing surfaces -Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor. - -### For functional UI -Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics. - -### For performance-critical UI -The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates. - -### For data-heavy interfaces -Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally. - -**The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around. - -## The Toolkit - -Organized by what you're trying to achieve, not by technology name. - -### Make transitions feel cinematic -- **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations. -- **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes -- **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver. - -### Tie animation to scroll position -- **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback) - -### Render beyond CSS -- **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express. -- **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2. -- **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas. -- **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable. - -### Make data feel alive -- **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones. -- **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers. -- **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts. - -### Animate complex properties -- **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate. -- **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography. - -### Push performance boundaries -- **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank. -- **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background. -- **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs. - -### Interact with the device -- **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. -- **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. - -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. - -## Implement with Discipline - -### Progressive enhancement is non-negotiable - -Every technique must degrade gracefully. The experience without the enhancement must still be good. - -```css -@supports (animation-timeline: scroll()) { - .hero { animation-timeline: scroll(); } -} -``` - -```javascript -if ('gpu' in navigator) { /* WebGPU */ } -else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ } -/* CSS-only fallback must still look good */ -``` - -### Performance rules - -- Target 60fps. If dropping below 50, simplify. -- Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative. -- Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport. -- Pause off-screen rendering. Kill what you can't see. -- Test on real mid-range devices, not just your development machine. - -### Polish is the difference - -The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable. - -**NEVER**: -- Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion -- Ship effects that cause jank on mid-range devices -- Use bleeding-edge APIs without a functional fallback -- Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills -- Layer multiple competing extraordinary moments — focus creates impact, excess creates noise - -## Verify the Result - -- **The wow test**: Show it to someone who hasn't seen it. Do they react? -- **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice? -- **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth? -- **The accessibility test**: Enable reduced motion. Still beautiful? -- **The context test**: Does this make sense for THIS brand and audience? - -Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do. \ No newline at end of file diff --git a/.trae/skills/polish/SKILL.md b/.trae/skills/polish/SKILL.md deleted file mode 100644 index 360b367f1..000000000 --- a/.trae/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. \ No newline at end of file diff --git a/.trae/skills/quieter/SKILL.md b/.trae/skills/quieter/SKILL.md deleted file mode 100644 index 373ae6869..000000000 --- a/.trae/skills/quieter/SKILL.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -name: quieter -description: Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current State - -Analyze what makes the design feel too intense: - -1. **Identify intensity sources**: - - **Color saturation**: Overly bright or saturated colors - - **Contrast extremes**: Too much high-contrast juxtaposition - - **Visual weight**: Too many bold, heavy elements competing - - **Animation excess**: Too much motion or overly dramatic effects - - **Complexity**: Too many visual elements, patterns, or decorations - - **Scale**: Everything is large and loud with no hierarchy - -2. **Understand the context**: - - What's the purpose? (Marketing vs tool vs reading experience) - - Who's the audience? (Some contexts need energy) - - What's working? (Don't throw away good ideas) - - What's the core message? (Preserve what matters) - -If any of these are unclear from the codebase, ask the user directly to clarify what you cannot infer. - -**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness. - -## Plan Refinement - -Create a strategy to reduce intensity while maintaining impact: - -- **Color approach**: Desaturate or shift to more sophisticated tones? -- **Hierarchy approach**: Which elements should stay bold (very few), which should recede? -- **Simplification approach**: What can be removed entirely? -- **Sophistication approach**: How can we signal quality through restraint? - -**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision. - -## Refine the Design - -Systematically reduce intensity across these dimensions: - -### Color Refinement -- **Reduce saturation**: Shift from fully saturated to 70-85% saturation -- **Soften palette**: Replace bright colors with muted, sophisticated tones -- **Reduce color variety**: Use fewer colors more thoughtfully -- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule) -- **Gentler contrasts**: High contrast only where it matters most -- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness -- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead - -### Visual Weight Reduction -- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate -- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness -- **White space**: Increase breathing room, reduce density -- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely - -### Simplification -- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose -- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes -- **Reduce layering**: Flatten visual hierarchy where possible -- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows - -### Motion Reduction -- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing -- **Remove decorative animations**: Keep functional motion, remove flourishes -- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback -- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic -- **Remove animations entirely** if they're not serving a clear purpose - -### Composition Refinement -- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling -- **Align to grid**: Bring rogue elements back into systematic alignment -- **Even out spacing**: Replace extreme spacing variations with consistent rhythm - -**NEVER**: -- Make everything the same size/weight (hierarchy still matters) -- Remove all color (quiet ≠ grayscale) -- Eliminate all personality (maintain character through refinement) -- Sacrifice usability for aesthetics (functional elements still need clear affordances) -- Make everything small and light (some anchors needed) - -## Verify Quality - -Ensure refinement maintains quality: - -- **Still functional**: Can users still accomplish tasks easily? -- **Still distinctive**: Does it have character, or is it generic now? -- **Better reading**: Is text easier to read for extended periods? -- **Sophistication**: Does it feel more refined and premium? - -Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality. \ No newline at end of file diff --git a/.trae/skills/shape/SKILL.md b/.trae/skills/shape/SKILL.md deleted file mode 100644 index 7e83008b5..000000000 --- a/.trae/skills/shape/SKILL.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -name: shape -description: Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written. -version: 2.1.1 -user-invocable: true -argument-hint: "[feature to shape]" ---- - -## MANDATORY PREPARATION - -Invoke /impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run /impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to /impeccable craft, /impeccable, or any other implementation skill. - -## Philosophy - -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. - -## Phase 1: Discovery Interview - -**Do NOT write any code or make any design decisions during this phase.** Your only job is to understand the feature deeply enough to make excellent design decisions later. - -Ask these questions in conversation, adapting based on answers. Don't dump them all at once; have a natural dialogue. ask the user directly to clarify what you cannot infer. - -### Purpose & Context -- What is this feature for? What problem does it solve? -- Who specifically will use it? (Not "users"; be specific: role, context, frequency) -- What does success look like? How will you know this feature is working? -- What's the user's state of mind when they reach this feature? (Rushed? Exploring? Anxious? Focused?) - -### Content & Data -- What content or data does this feature display or collect? -- What are the realistic ranges? (Minimum, typical, maximum, e.g., 0 items, 5 items, 500 items) -- What are the edge cases? (Empty state, error state, first-time use, power user) -- Is any content dynamic? What changes and how often? - -### Design Goals -- What's the single most important thing a user should do or understand here? -- What should this feel like? (Fast/efficient? Calm/trustworthy? Fun/playful? Premium/refined?) -- Are there existing patterns in the product this should be consistent with? -- Are there specific examples (inside or outside the product) that capture what you're going for? - -### Constraints -- Are there technical constraints? (Framework, performance budget, browser support) -- Are there content constraints? (Localization, dynamic text length, user-generated content) -- Mobile/responsive requirements? -- Accessibility requirements beyond WCAG AA? - -### Anti-Goals -- What should this NOT be? What would be a wrong direction? -- What's the biggest risk of getting this wrong? - -## Phase 2: Design Brief - -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. - -### Brief Structure - -**1. Feature Summary** (2-3 sentences) -What this is, who it's for, what it needs to accomplish. - -**2. Primary User Action** -The single most important thing a user should do or understand here. - -**3. Design Direction** -How this should feel. What aesthetic approach fits. Reference the project's design context from `.impeccable.md` and explain how this feature should express it. - -**4. Layout Strategy** -High-level spatial approach: what gets emphasis, what's secondary, how information flows. Describe the visual hierarchy and rhythm, not specific CSS. - -**5. Key States** -List every state the feature needs: default, empty, loading, error, success, edge cases. For each, note what the user needs to see and feel. - -**6. Interaction Model** -How users interact with this feature. What happens on click, hover, scroll? What feedback do they get? What's the flow from entry to completion? - -**7. Content Requirements** -What copy, labels, empty state messages, error messages, and microcopy are needed. Note any dynamic content and its realistic ranges. - -**8. Recommended References** -Based on the brief, list which impeccable reference files would be most valuable during implementation (e.g., spatial-design.md for complex layouts, motion-design.md for animated features, interaction-design.md for form-heavy features). - -**9. Open Questions** -Anything unresolved that the implementer should resolve during build. - ---- - -ask the user directly to clarify what you cannot infer. Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. - -Once confirmed, the brief is complete. The user can now hand it to /impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use /impeccable craft instead, which runs this skill internally.) \ No newline at end of file diff --git a/.trae/skills/typeset/SKILL.md b/.trae/skills/typeset/SKILL.md deleted file mode 100644 index 166d4b741..000000000 --- a/.trae/skills/typeset/SKILL.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -name: typeset -description: Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography. -version: 2.1.1 -user-invocable: true -argument-hint: "[target]" ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke /impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 54a0d2c35..6252f0cb8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Impeccable -The vocabulary you didn't know you needed. 1 skill, 18 commands, and curated anti-patterns for impeccable style. Works with Cursor, Claude Code, Gemini CLI, and Codex CLI. +The vocabulary you didn't know you needed. 1 skill, 20 commands, and curated anti-patterns for impeccable style. Works with Cursor, Claude Code, Gemini CLI, and Codex CLI. ## Repository Purpose diff --git a/CLAUDE.md b/CLAUDE.md index e95cff647..87349124c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -92,20 +92,26 @@ There are three independently versioned components. Only bump the one(s) that ac - Update for user-facing changes only, not internal build/tooling details - Use the most prominent version that changed (e.g. skills version for skill consolidation) -## Adding New Skills +## Adding New Sub-commands -When adding a new user-invocable skill, update the command count in **all** of these locations: +All commands are accessed through `/impeccable`. To add a new one: -- `public/index.html` → meta descriptions, hero box, section lead -- `public/cheatsheet.html` → meta description, subtitle, `commandCategories`, `commandRelationships` -- `public/js/data.js` → `commandProcessSteps`, `commandCategories`, `commandRelationships` -- `public/js/components/framework-viz.js` → `commandSymbols`, `commandNumbers` -- `public/js/demos/commands/` → new demo file + import in `index.js` -- `README.md` → intro, command count, commands table -- `NOTICE.md` → steering commands count -- `AGENTS.md` → intro command count -- `.claude-plugin/plugin.json` → description -- `.claude-plugin/marketplace.json` → metadata description + plugin description +1. Create `source/skills/impeccable/reference/.md` with the command's instructions +2. Add a row to the **Sub-command reference table** in `source/skills/impeccable/SKILL.md` +3. Add an entry to the **Command menu** section in the same file +4. Add the command name to `IMPECCABLE_SUB_COMMANDS` in `scripts/lib/utils.js` +5. Add it to `VALID_COMMANDS` in `source/skills/impeccable/scripts/pin.mjs` +6. Add its metadata to `source/skills/impeccable/scripts/command-metadata.json` + +The build system counts commands from the router table automatically. Update the command count in **all** of these locations: + +- `public/index.html` -- meta descriptions, hero box, section lead +- `public/cheatsheet.html` -- meta description, subtitle +- `README.md` -- intro, command count, commands table +- `NOTICE.md` -- command count +- `AGENTS.md` -- intro command count +- `.claude-plugin/plugin.json` -- description +- `.claude-plugin/marketplace.json` -- metadata description + plugin description ## Evals Framework (private, gitignored) diff --git a/NOTICE.md b/NOTICE.md index 04be4620b..2843ee71b 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -13,5 +13,5 @@ The `impeccable` skill in this project builds on Anthropic's original frontend-d This project extends the original with: - 7 domain-specific reference files (typography, color-and-contrast, spatial-design, motion-design, interaction-design, responsive-design, ux-writing) -- 18 steering commands +- 20 commands - Expanded patterns and anti-patterns diff --git a/README.md b/README.md index fdbe50d19..629065501 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Impeccable -The vocabulary you didn't know you needed. 1 skill, 18 commands, and curated anti-patterns for impeccable frontend design. +The vocabulary you didn't know you needed. 1 skill, 20 commands, and curated anti-patterns for impeccable frontend design. > **Quick start:** Visit [impeccable.style](https://impeccable.style) to download ready-to-use bundles. @@ -12,7 +12,7 @@ Every LLM learned from the same generic templates. Without guidance, you get the Impeccable fights that bias with: - **An expanded skill** with 7 domain-specific reference files ([view source](source/skills/impeccable/)) -- **18 steering commands** to audit, review, polish, distill, animate, and more +- **20 commands** to audit, review, polish, distill, animate, and more - **Curated anti-patterns** that explicitly tell the AI what NOT to do ## What's Included @@ -31,65 +31,47 @@ A comprehensive design skill with 7 domain-specific references ([view skill](sou | [responsive-design](source/skills/impeccable/reference/responsive-design.md) | Mobile-first, fluid design, container queries | | [ux-writing](source/skills/impeccable/reference/ux-writing.md) | Button labels, error messages, empty states | -### 18 Commands +### 20 Commands + +All commands are accessed through `/impeccable`: | Command | What it does | |---------|--------------| -| `/impeccable teach` | One-time setup: gather design context, save to config | | `/impeccable craft` | Full shape-then-build flow with visual iteration | +| `/impeccable teach` | One-time setup: gather design context, save to config | | `/impeccable extract` | Pull reusable components and tokens into the design system | -| `/audit` | Run technical quality checks (a11y, performance, responsive) | -| `/critique` | UX design review: hierarchy, clarity, emotional resonance | -| `/polish` | Final pass, design system alignment, and shipping readiness | -| `/distill` | Strip to essence | -| `/clarify` | Improve unclear UX copy | -| `/optimize` | Performance improvements | -| `/harden` | Error handling, onboarding, i18n, edge cases | -| `/animate` | Add purposeful motion | -| `/colorize` | Introduce strategic color | -| `/bolder` | Amplify boring designs | -| `/quieter` | Tone down overly bold designs | -| `/delight` | Add moments of joy | -| `/adapt` | Adapt for different devices | -| `/typeset` | Fix font choices, hierarchy, sizing | -| `/layout` | Fix layout, spacing, visual rhythm | -| `/overdrive` | Add technically extraordinary effects | +| `/impeccable shape` | Plan UX/UI before writing code | +| `/impeccable critique` | UX design review: hierarchy, clarity, emotional resonance | +| `/impeccable audit` | Run technical quality checks (a11y, performance, responsive) | +| `/impeccable polish` | Final pass, design system alignment, and shipping readiness | +| `/impeccable bolder` | Amplify boring designs | +| `/impeccable quieter` | Tone down overly bold designs | +| `/impeccable distill` | Strip to essence | +| `/impeccable harden` | Error handling, onboarding, i18n, edge cases | +| `/impeccable animate` | Add purposeful motion | +| `/impeccable colorize` | Introduce strategic color | +| `/impeccable typeset` | Fix font choices, hierarchy, sizing | +| `/impeccable layout` | Fix layout, spacing, visual rhythm | +| `/impeccable delight` | Add moments of joy | +| `/impeccable overdrive` | Add technically extraordinary effects | +| `/impeccable clarify` | Improve unclear UX copy | +| `/impeccable adapt` | Adapt for different devices | +| `/impeccable optimize` | Performance improvements | + +Use `/impeccable pin ` to create standalone shortcuts (e.g., `pin audit` creates `/audit`). #### Usage Examples -**`/audit`** - Run quality checks, get a report (no edits) ``` -/audit blog # Audit blog hub + post pages -/audit dashboard # Check dashboard components -/audit checkout flow # Focus on checkout UX +/impeccable audit blog # Audit blog hub + post pages +/impeccable critique landing # UX design review +/impeccable polish settings # Final pass before shipping +/impeccable harden checkout # Add error handling + edge cases ``` -*When to use:* Before making changes, to understand what needs fixing. -**`/normalize`** - Align with design system +Or use `/impeccable` directly with a description: ``` -/normalize blog # Apply design tokens, fix spacing -/normalize buttons # Standardize button styles -``` -*When to use:* After audit, to fix inconsistencies. - -**`/critique`** - UX design review -``` -/critique landing page # Review landing page UX -/critique onboarding # Check onboarding flow -``` -*When to use:* When you want design feedback, not technical fixes. - -**`/polish`** - Final pass before shipping -``` -/polish feature modal # Clean up modal before release -/polish settings page # Final review of settings UI -``` -*When to use:* Last step before deploying to production. - -**Combining commands:** -``` -/audit /normalize /polish blog # Full workflow: audit → fix → polish -/critique /harden checkout # UX review + add error handling +/impeccable redo this hero section ``` ### Anti-Patterns diff --git a/content/site/anti-patterns-catalog.js b/content/site/anti-patterns-catalog.js index cae6dd9c7..b16fecf28 100644 --- a/content/site/anti-patterns-catalog.js +++ b/content/site/anti-patterns-catalog.js @@ -75,7 +75,7 @@ export const LAYER_LABELS = { export const LAYER_DESCRIPTIONS = { cli: 'Deterministic. Runs from `npx impeccable detect` on files, no browser required.', browser: 'Deterministic, but needs real browser layout. Runs via the browser extension or Puppeteer, not the plain CLI.', - llm: 'Not caught by any deterministic detector. Flagged by /critique during its LLM design review.', + llm: 'Not caught by any deterministic detector. Flagged by /impeccable critique during its LLM design review.', }; // ─── Visual examples ───────────────────────────────────────────────── diff --git a/content/site/partials/header.html b/content/site/partials/header.html index f52c00a8d..87fdc4193 100644 --- a/content/site/partials/header.html +++ b/content/site/partials/header.html @@ -7,7 +7,7 @@
diff --git a/content/site/skills/adapt.md b/content/site/skills/adapt.md index 71786e04e..a6b4996bf 100644 --- a/content/site/skills/adapt.md +++ b/content/site/skills/adapt.md @@ -4,7 +4,7 @@ tagline: "Make designs work across screens, devices, and contexts without amputa ## When to use it -`/adapt` is for taking a design built for one context and making it work in another. Mobile from desktop, tablet from mobile, print from web, embedded from standalone, email from dashboard. Reach for it when the source design is solid but falls apart at other breakpoints, on touch, or in a different container. +`/impeccable adapt` is for taking a design built for one context and making it work in another. Mobile from desktop, tablet from mobile, print from web, embedded from standalone, email from dashboard. Reach for it when the source design is solid but falls apart at other breakpoints, on touch, or in a different container. Not for building responsive from scratch. For that, start with `/impeccable` and shape the layout responsive-first. Adapt is for the "we never thought about mobile" backfill. @@ -22,7 +22,7 @@ The non-negotiable rule: adapt, do not amputate. Critical functionality cannot d ## Try it ``` -/adapt the settings page for mobile +/impeccable adapt the settings page for mobile ``` Expected changes: @@ -37,4 +37,4 @@ Expected changes: - **Amputating features.** If the mobile version hides things the desktop version can do, that is a regression, not an adaptation. Fight for the feature. - **Treating mobile as "smaller desktop".** Mobile is a different context: thumbs, interruption, short sessions. Adapt to the context, not to the viewport width. -- **Skipping `/harden` afterward.** Responsive layouts reveal edge cases. Run hardening after adapt to catch the ones that only show up at 320px. +- **Skipping `/impeccable harden` afterward.** Responsive layouts reveal edge cases. Run hardening after adapt to catch the ones that only show up at 320px. diff --git a/content/site/skills/animate.md b/content/site/skills/animate.md index 6781a8675..0cea287b8 100644 --- a/content/site/skills/animate.md +++ b/content/site/skills/animate.md @@ -4,7 +4,7 @@ tagline: "Purposeful motion that conveys state, not decoration." ## When to use it -`/animate` is for interfaces that feel lifeless, where state changes are instant and jarring, where loading just pops in, where the user never quite trusts that their click registered. Use it to add the small motions that communicate what is happening: entrances, exits, feedback, transitions between states. +`/impeccable animate` is for interfaces that feel lifeless, where state changes are instant and jarring, where loading just pops in, where the user never quite trusts that their click registered. Use it to add the small motions that communicate what is happening: entrances, exits, feedback, transitions between states. Do not use it to add bounces or elastic springs for the sake of energy. That is decoration, and this skill will not give it to you. @@ -25,7 +25,7 @@ The skill animates `transform` and `opacity` only. If you find yourself animatin ## Try it ``` -/animate the sign-up flow +/impeccable animate the sign-up flow ``` Typical additions: diff --git a/content/site/skills/audit.md b/content/site/skills/audit.md index b1e340636..9d7b68ba9 100644 --- a/content/site/skills/audit.md +++ b/content/site/skills/audit.md @@ -4,7 +4,7 @@ tagline: "Five-dimension technical quality check with P0 to P3 severity." ## When to use it -`/audit` is the technical counterpart to `/critique`. Where `/critique` asks "does this feel right", `/audit` asks "does this hold up". It runs accessibility, performance, theming, responsive design, and anti-pattern checks against the implementation, scores each dimension 0 to 4, and produces a plan with P0 to P3 severity ratings. +`/impeccable audit` is the technical counterpart to `/impeccable critique`. Where `/impeccable critique` asks "does this feel right", `/impeccable audit` asks "does this hold up". It runs accessibility, performance, theming, responsive design, and anti-pattern checks against the implementation, scores each dimension 0 to 4, and produces a plan with P0 to P3 severity ratings. Use it before shipping, during a quality sprint, or whenever a tech lead says "we should really look at accessibility". @@ -20,12 +20,12 @@ The skill scans your code across five dimensions: Each dimension gets a 0 to 4 score. Each finding gets a severity: P0 blocks the release, P1 should fix this sprint, P2 is next cycle, P3 is polish. You get back a single document you can paste into a ticket tracker. -Audit does not fix anything. It documents. Route the findings to `/polish`, `/harden`, or `/optimize` depending on the category. +Audit does not fix anything. It documents. Route the findings to `/impeccable polish`, `/impeccable harden`, or `/impeccable optimize` depending on the category. ## Try it ``` -/audit the checkout flow +/impeccable audit the checkout flow ``` Expected output: @@ -41,10 +41,10 @@ Performance: 3/4 (good) ... ``` -Hand the P0s to `/harden`, the theming and typography P1s to `/typeset` and `/polish`, the rest to `/polish`. +Hand the P0s to `/impeccable harden`, the theming and typography P1s to `/impeccable typeset` and `/impeccable polish`, the rest to `/impeccable polish`. ## Pitfalls -- **Confusing it with `/critique`.** Audit is implementation quality. Critique is design quality. Run both for a full picture. +- **Confusing it with `/impeccable critique`.** Audit is implementation quality. Critique is design quality. Run both for a full picture. - **Fixing P3s before P0s.** The severity scale exists for a reason. Start at the top. - **Skipping the dimensions you think are fine.** Theming and responsive are the ones most people assume are fine until they are not. diff --git a/content/site/skills/bolder.md b/content/site/skills/bolder.md index f636e03d8..cfaf5dd4f 100644 --- a/content/site/skills/bolder.md +++ b/content/site/skills/bolder.md @@ -4,7 +4,7 @@ tagline: "Push safe designs toward impact without sliding into chaos." ## When to use it -Reach for `/bolder` when the interface looks like every other interface. Generic sans, medium weights, soft shadows, modest accent color, reasonable spacing, forgettable. The design is not wrong, it is just safe. Use bolder when a project can handle presence and the current state is not bringing any. +Reach for `/impeccable bolder` when the interface looks like every other interface. Generic sans, medium weights, soft shadows, modest accent color, reasonable spacing, forgettable. The design is not wrong, it is just safe. Use bolder when a project can handle presence and the current state is not bringing any. Do not use it on dashboards people stare at for hours. Boldness earns its place on marketing pages, hero moments, and content features. Not in operator tools. @@ -22,7 +22,7 @@ The skill does not add more. It amplifies what is already there. If the design h ## Try it ``` -/bolder the landing page hero +/impeccable bolder the landing page hero ``` Expected changes: @@ -35,6 +35,6 @@ Expected changes: ## Pitfalls -- **Running it on the wrong page.** Product dashboards, settings, and forms should not be bold. They should be legible. Use `/layout` or `/polish` instead. -- **Confusing bold with loud.** Bold means committed and confident. Loud means shouting. Bolder is the former. If the result feels aggressive, follow up with `/quieter`. -- **Pairing it with `/delight` in the same pass.** Delight works best against a stable visual baseline. Bold first, stabilize, then delight. +- **Running it on the wrong page.** Product dashboards, settings, and forms should not be bold. They should be legible. Use `/impeccable layout` or `/impeccable polish` instead. +- **Confusing bold with loud.** Bold means committed and confident. Loud means shouting. Bolder is the former. If the result feels aggressive, follow up with `/impeccable quieter`. +- **Pairing it with `/impeccable delight` in the same pass.** Delight works best against a stable visual baseline. Bold first, stabilize, then delight. diff --git a/content/site/skills/clarify.md b/content/site/skills/clarify.md index 78593f650..47d7f3298 100644 --- a/content/site/skills/clarify.md +++ b/content/site/skills/clarify.md @@ -4,7 +4,7 @@ tagline: "Rewrite confusing UX copy so interfaces explain themselves." ## When to use it -`/clarify` is for interface text that makes people stop and think. Confusing labels, ambiguous button copy, error messages that blame the user, tooltips that repeat the label, empty states that say nothing useful. Use it when the problem is not the layout or the color, it is the words. +`/impeccable clarify` is for interface text that makes people stop and think. Confusing labels, ambiguous button copy, error messages that blame the user, tooltips that repeat the label, empty states that say nothing useful. Use it when the problem is not the layout or the color, it is the words. Good triggers: "users do not understand this field", "the error message is not helpful", "I cannot write good button copy", "this tooltip is a waste". @@ -24,7 +24,7 @@ The skill uses the audience and mental state from `.impeccable.md` to tune voice ## Try it ``` -/clarify the billing form +/impeccable clarify the billing form ``` Before and after, typical: @@ -37,6 +37,6 @@ Before and after, typical: ## Pitfalls -- **Writing cleverer, not clearer.** Clarify is not for voice upgrades. If the copy is already clear, do not reach for this skill. Use `/delight` instead when you want personality. +- **Writing cleverer, not clearer.** Clarify is not for voice upgrades. If the copy is already clear, do not reach for this skill. Use `/impeccable delight` instead when you want personality. - **Skipping the audience question.** Clarify needs to know who is reading. If `.impeccable.md` does not specify audience technical level, the rewrites will be generic. - **Running clarify on marketing copy.** Clarify is for functional UX text: labels, errors, instructions. Marketing copy needs a different set of moves and a human writer. diff --git a/content/site/skills/colorize.md b/content/site/skills/colorize.md index 9617abbd4..9dbb52598 100644 --- a/content/site/skills/colorize.md +++ b/content/site/skills/colorize.md @@ -4,7 +4,7 @@ tagline: "Add strategic color to monochrome interfaces without going garish." ## When to use it -`/colorize` is the counterweight to "everything is gray". Dashboards that read as a beige wall, forms with no accent, content pages that could be any SaaS product. Reach for it when the interface is functional but emotionally flat, and you want warmth without tipping into the AI color palette (purple-to-pink, cyan neon, dark mode glow). +`/impeccable colorize` is the counterweight to "everything is gray". Dashboards that read as a beige wall, forms with no accent, content pages that could be any SaaS product. Reach for it when the interface is functional but emotionally flat, and you want warmth without tipping into the AI color palette (purple-to-pink, cyan neon, dark mode glow). ## How it works @@ -20,7 +20,7 @@ Importantly, it uses OKLCH rather than HSL so that equal lightness steps look eq ## Try it ``` -/colorize the dashboard +/impeccable colorize the dashboard ``` Expected diff: @@ -34,5 +34,5 @@ Expected diff: ## Pitfalls - **Running it without a brand hue.** Colorize needs a starting point. If `.impeccable.md` does not specify one, it will ask. Do not let it pick from the AI color palette defaults. -- **Expecting it to fix the AI color palette problem.** If your design already has purple gradients and cyan neon, you need `/quieter` first, then colorize can rebuild. -- **Using it on already-colorful interfaces.** That is a `/quieter` job. Colorize adds, it does not subtract. +- **Expecting it to fix the AI color palette problem.** If your design already has purple gradients and cyan neon, you need `/impeccable quieter` first, then colorize can rebuild. +- **Using it on already-colorful interfaces.** That is a `/impeccable quieter` job. Colorize adds, it does not subtract. diff --git a/content/site/skills/craft.md b/content/site/skills/craft.md new file mode 100644 index 000000000..cec545ca6 --- /dev/null +++ b/content/site/skills/craft.md @@ -0,0 +1,42 @@ +--- +tagline: "Shape the design, then build it, all in one flow." +--- + +## When to use it + +`/impeccable craft` is the end-to-end build command. Give it a feature description and it runs the whole pipeline: structured discovery, reference loading, implementation, visual iteration. Use it when you are starting a new feature from zero and want the whole workflow in one invocation. + +Reach for it when: + +- **You are building a new feature and want the full flow.** You do not want to manage the steps yourself. +- **You know what you are building but not how it should look.** The discovery phase forces the design thinking before implementation locks it in. +- **You want visual iteration by default.** `craft` checks the result in a browser and refines until the polish is high, instead of shipping the first working version. + +If you only want the thinking without the code, use `/impeccable shape` standalone. If you already have a clear vision and just want to build, call `/impeccable` directly with your feature description. `craft` sits in between: structured, complete, opinionated. + +## How it works + +`craft` runs four phases in order: + +1. **Shape the design.** Runs `/impeccable shape` internally: a short discovery conversation about purpose, users, content, constraints, and goals. The output is a design brief you can read and push back on. +2. **Load references.** Based on the brief, pulls in the right reference files (spatial, typography, motion, color, interaction, responsive, UX writing) so the model has the relevant principles loaded before it starts coding. +3. **Build.** Implements the feature in a deliberate order: structure first, then spacing and hierarchy, then type and color, then states, then motion, then responsive. Every decision traces back to the brief. +4. **Visual iteration.** Opens the result in a browser, checks it against the brief and the anti-pattern catalog, and refines until it matches the intent. This step is critical. The first working version is never the shipped version. + +The discovery phase is non-skippable and that is the point. Most AI-generated UIs fail because nobody asked what the user was trying to accomplish before the model started writing JSX. `craft` inverts that. + +## Try it + +``` +/impeccable craft a pricing page for a developer tool +``` + +Expect a 5 to 10 question discovery interview first. Questions about your audience, the product's personality, the emotional tone you want, anti-references, and constraints. Then a design brief. Then implementation, with the browser checked at each stage. Expect multiple iteration rounds in the visual polish phase. + +The whole run is longer than a typical command because it includes the thinking, the building, and the refining. That is the trade: more upfront structure, less cleanup afterwards. + +## Pitfalls + +- **Using it for small changes.** `craft` is for new features, not touch-ups. For existing code, reach for `/impeccable polish`, `/impeccable critique`, or a specific refinement command instead. +- **Rushing the discovery phase.** The interview feels slow compared to "just start coding". It is not. Answering the questions carefully produces a sharper brief, which produces a sharper build, which produces fewer rewrites. +- **Skipping the visual iteration.** The phase exists for a reason. The gap between "technically works" and "feels right" is closed with visual polish, not code review. Let it run. diff --git a/content/site/skills/critique.md b/content/site/skills/critique.md index 49a0a395e..4381803b5 100644 --- a/content/site/skills/critique.md +++ b/content/site/skills/critique.md @@ -4,13 +4,13 @@ tagline: "A design review with scoring, persona tests, and automated detection." ## When to use it -Reach for `/critique` when you want an honest second opinion on something you already built. Not "does it work" but "is it any good". The skill scores your interface against Nielsen's 10 heuristics, runs cognitive load checks, tests through persona lenses, and cross-references an automated detector for 25 concrete anti-patterns. +Reach for `/impeccable critique` when you want an honest second opinion on something you already built. Not "does it work" but "is it any good". The skill scores your interface against Nielsen's 10 heuristics, runs cognitive load checks, tests through persona lenses, and cross-references an automated detector for 25 concrete anti-patterns. Use it when a page is functionally done and you want to know if it reads as intentional or as AI slop. ## How it works -`/critique` runs two independent assessments in parallel so they do not bias each other. +`/impeccable critique` runs two independent assessments in parallel so they do not bias each other. The first is an **LLM design review**: the model reads your source, visually inspects the live page if browser automation is available, and walks the impeccable skill's full DO/DON'T catalog. It scores Nielsen's heuristics, counts cognitive load failures, traces the emotional journey through the flow, and flags AI slop. @@ -23,7 +23,7 @@ The two reports merge into one prioritized list: what is working, the three to f Point it at a page: ``` -/critique the homepage hero +/impeccable critique the homepage hero ``` You get back a scored report. Typical shape: @@ -34,7 +34,7 @@ You get back a scored report. Typical shape: - **Priority issues**: three to five items, each with what, why, and fix - **Questions to answer**: the ones the interface itself cannot decide for you -From there, pair with `/polish` or `/distill` to act on the fixes. +From there, pair with `/impeccable polish` or `/impeccable distill` to act on the fixes. ## Pitfalls diff --git a/content/site/skills/delight.md b/content/site/skills/delight.md index fbd9e805a..8d7d913c4 100644 --- a/content/site/skills/delight.md +++ b/content/site/skills/delight.md @@ -4,7 +4,7 @@ tagline: "Small moments of personality that turn functional into memorable." ## When to use it -`/delight` is for interfaces that work but do not feel like anything. Use it when the core experience is solid and you want to add the small human touches that make people remember it: a considered empty state, a loading message with a point of view, a success animation that feels earned, a microcopy moment that makes someone smile. +`/impeccable delight` is for interfaces that work but do not feel like anything. Use it when the core experience is solid and you want to add the small human touches that make people remember it: a considered empty state, a loading message with a point of view, a success animation that feels earned, a microcopy moment that makes someone smile. It is a finishing skill. Never the first thing you run on a new build. @@ -25,7 +25,7 @@ The rule is: every delight moment must still work perfectly if you delete the de ## Try it ``` -/delight the first-run experience +/impeccable delight the first-run experience ``` Expected additions: diff --git a/content/site/skills/distill.md b/content/site/skills/distill.md index d8a112f15..d6d53096e 100644 --- a/content/site/skills/distill.md +++ b/content/site/skills/distill.md @@ -4,9 +4,9 @@ tagline: "Ruthless subtraction. Strip designs to their essence." ## When to use it -`/distill` removes what should not be there. Competing buttons, redundant information, decorative borders, three fonts where one works, six navigation items where three belong. Use it when an interface feels cluttered, busy, or like it is trying to do too much at once. +`/impeccable distill` removes what should not be there. Competing buttons, redundant information, decorative borders, three fonts where one works, six navigation items where three belong. Use it when an interface feels cluttered, busy, or like it is trying to do too much at once. -Reach for it after `/critique` flags "cognitive load" or "visual noise", or any time a page has grown by accretion and no one has done the editing. +Reach for it after `/impeccable critique` flags "cognitive load" or "visual noise", or any time a page has grown by accretion and no one has done the editing. ## How it works @@ -22,7 +22,7 @@ The principle: simplicity is not about fewer features. It is about fewer obstacl ## Try it ``` -/distill this dashboard +/impeccable distill this dashboard ``` Before: four card styles, three button variants, two header treatments, a sidebar with 14 items grouped into 5 sections. @@ -41,4 +41,4 @@ Fewer things. Each one clearer. - **Confusing distill with delete.** Distill removes obstacles. It does not remove features users need. If a user relies on something daily, find a way to keep it quietly, not a way to cut it. - **Running it too early.** If the feature is still growing, distilling it now means distilling the same thing again next week. Wait until the shape is stable. -- **Expecting it to replace hierarchy work.** Sometimes the right fix is not removing things, it is arranging them. Reach for `/layout` when the problem is layout, not quantity. +- **Expecting it to replace hierarchy work.** Sometimes the right fix is not removing things, it is arranging them. Reach for `/impeccable layout` when the problem is layout, not quantity. diff --git a/content/site/skills/extract.md b/content/site/skills/extract.md index 963ad985f..e8325a3a8 100644 --- a/content/site/skills/extract.md +++ b/content/site/skills/extract.md @@ -4,7 +4,7 @@ tagline: "Pull reusable components, tokens, and patterns into the design system. ## When to use it -`/extract` is for the moment your codebase has accidentally become a design system. Repeated button styles in 12 places. Three variants of the same card. Hex colors scattered throughout. Hand-rolled spacing that accidentally matches a scale. Reach for it when you want to consolidate this drift into reusable primitives. +`/impeccable extract` is for the moment your codebase has accidentally become a design system. Repeated button styles in 12 places. Three variants of the same card. Hex colors scattered throughout. Hand-rolled spacing that accidentally matches a scale. Reach for it when you want to consolidate this drift into reusable primitives. Use it after a product has shipped enough features to reveal the patterns. Premature extraction creates abstractions that do not match reality. @@ -23,7 +23,7 @@ The skill is cautious. It only extracts things used three or more times, with th ## Try it ``` -/extract the button styles +/impeccable extract the button styles ``` Expected output: diff --git a/content/site/skills/harden.md b/content/site/skills/harden.md index d2c498a0d..8b80e2bd0 100644 --- a/content/site/skills/harden.md +++ b/content/site/skills/harden.md @@ -4,7 +4,7 @@ tagline: "Make interfaces production-ready. Edge cases, onboarding, i18n, error ## When to use it -`/harden` is for the day your interface meets reality. Real user data is messy: names that are 60 characters long, product titles in German, prices in the billions, empty lists, 500 errors, offline modes, right-to-left text. Designs that only work with perfect data are not production-ready. +`/impeccable harden` is for the day your interface meets reality. Real user data is messy: names that are 60 characters long, product titles in German, prices in the billions, empty lists, 500 errors, offline modes, right-to-left text. Designs that only work with perfect data are not production-ready. Reach for it before launch, before opening to a new market, or any time a bug report starts with "our user had a really long name and". @@ -25,7 +25,7 @@ For each dimension it identifies the failure mode, then applies the concrete fix Start with one page and one dimension: ``` -/harden the user profile page for long names +/impeccable harden the user profile page for long names ``` Expected output: @@ -40,6 +40,6 @@ Run it per-page, not all at once. The first run is the biggest; subsequent runs ## Pitfalls -- **Waiting for a bug report.** Harden is preventative. If you find yourself fixing the same class of bug twice, run `/harden` across the feature. +- **Waiting for a bug report.** Harden is preventative. If you find yourself fixing the same class of bug twice, run `/impeccable harden` across the feature. - **Treating error and empty states as an afterthought.** Most hardening work is error and empty state UI. Budget time for it, not just a `catch` block. - **Skipping i18n because "we are English-only for now".** i18n-safe layouts are still better layouts. Flexible containers, proper text wrapping, generous line-height. None of that hurts English. diff --git a/content/site/skills/impeccable.md b/content/site/skills/impeccable.md index c151883e2..94e97cbae 100644 --- a/content/site/skills/impeccable.md +++ b/content/site/skills/impeccable.md @@ -1,51 +1,39 @@ --- -tagline: "The design intelligence behind every other skill." +tagline: "The design intelligence behind every command." --- ## When to use it -`/impeccable` is the foundation. It teaches your AI harness how to design, period. Every other command in this pack leans on it for design principles, anti-patterns, typography, color, and layout guidance. +`/impeccable` is the home command. Call it directly when you want freeform design work with the full guidebook loaded, without having to pick a specialized command. It is the fallback you reach for when none of the 20 specialists (`audit`, `polish`, `critique`, and the rest) map cleanly onto what you're trying to do. -Call `/impeccable` directly when you want freeform design with the full guidebook loaded. Or use one of the two sub-modes: +Reach for `/impeccable` directly when: -### /impeccable craft {#craft} +- **You're not sure which command fits.** Describe what you want in plain English and let the skill pick the right approach. +- **The work spans multiple disciplines.** "Redo this hero section" touches layout, type, color, and motion. One command can't own that. +- **You want the full design intelligence without constraints.** Every reference file loaded, every anti-pattern checked, no pre-set workflow. -The full shape-then-build flow. It starts by running `/shape` internally (a structured discovery interview about purpose, audience, and goals), then moves into implementation with visual iteration, checking the result in the browser until the polish is high. Best for brand-new features where you want to think before you build, without managing the steps yourself. - -### /impeccable teach {#teach} - -One-time project setup. Runs a short discovery interview about your brand, audience, and aesthetic direction, then writes a `.impeccable.md` file that every future skill call reads automatically. Run this once per project before doing any design work. - -### /impeccable extract {#extract} - -Pull reusable components, design tokens, and patterns out of your code and into the design system. Finds repeated UI patterns (buttons in 12 places, three card variants, scattered hex colors), extracts them into shared primitives, and migrates all callers. Best used after a product has shipped enough features to reveal the patterns -- premature extraction creates abstractions that do not match reality. +For more structured flows, reach for the specialized commands in the sidebar. `/impeccable craft` runs the full shape-then-build pipeline, `/impeccable shape` produces a design brief before any code is written, and the evaluation and refinement commands (`audit`, `critique`, `polish`, `typeset`, etc.) each own a specific slice of the work. ## How it works Most AI-generated UIs fail the same way: generic fonts, purple gradients, card grids on card grids, glassmorphism everywhere. `/impeccable` gives your AI a strong point of view. It loads an opinionated design handbook plus a long list of anti-patterns, then pushes the model to commit to a specific aesthetic direction before writing a single line of code. -The skill has a **Context Gathering Protocol** built in. It will not design anything until it knows who uses the product, what they're trying to do, and how the interface should feel. If no context exists yet, it asks you to run `/impeccable teach` first. This is deliberate: design without context produces slop, and slop is the whole problem this pack exists to solve. +The skill has a **Context Gathering Protocol** built in. It will not design anything until it knows who uses the product, what they're trying to do, and how the interface should feel. On first use in a project, it runs the `teach` flow automatically: a short interview about your brand, audience, and aesthetic direction, saved to `.impeccable.md` so every future command reads it without asking again. ## Try it -From a clean project, run once: - ``` -/impeccable teach +/impeccable redo this hero section ``` -Answer the discovery questions. The skill writes a `.impeccable.md` file with your brand, audience, and aesthetic direction. Every future skill call reads it automatically. - -Then build something: - ``` /impeccable build me a pricing page for a developer tool ``` -You should get a page that commits to one clear aesthetic direction, uses non-default fonts, avoids the AI color palette, and has a real point of view. +Both prompts are vague on purpose. `/impeccable` will pick a strong aesthetic direction, commit to non-default fonts, avoid the AI color palette, and make the kind of specific choices that a designer would make. No command name to pick first, no step-by-step workflow to follow. ## Pitfalls -- **Skipping `/impeccable teach`.** Without a `.impeccable.md` file, the skill has to ask you context questions mid-flight. Faster to set it up once. - **Treating it like a style guide.** It is an opinionated design partner, not a linter. The defaults exist to raise the floor, not to overrule your judgment. If you have a real reason to push back (brand guideline, accessibility constraint, user research that says otherwise), push back and explain why. The skill will work with you. What produces worse output is ignoring the opinion without a reason. -- **Expecting it to fix existing code.** For that, reach for `/polish`, `/distill`, or `/critique` instead. `/impeccable` is for creation. +- **Expecting it to fix existing code.** `/impeccable` is for creation. For refinement, reach for `/impeccable polish`, `/impeccable distill`, or `/impeccable critique` instead. +- **Running it before `teach` has had a chance to save context.** On a fresh project it will interview you mid-flight, which is fine but slower. Running `/impeccable teach` explicitly as your very first command is a tiny bit smoother. diff --git a/content/site/skills/layout.md b/content/site/skills/layout.md index 8af09fa28..317f5ea39 100644 --- a/content/site/skills/layout.md +++ b/content/site/skills/layout.md @@ -4,7 +4,7 @@ tagline: "Fix layout, spacing, and visual rhythm." ## When to use it -`/layout` is for pages where nothing is technically wrong but nothing is breathing either. Equal padding everywhere, monotonous card grids, content that runs edge to edge, hierarchy that relies on size alone. Reach for it when a layout "feels off" and you cannot articulate why. +`/impeccable layout` is for pages where nothing is technically wrong but nothing is breathing either. Equal padding everywhere, monotonous card grids, content that runs edge to edge, hierarchy that relies on size alone. Reach for it when a layout "feels off" and you cannot articulate why. Good triggers: "everything feels crowded", "it reads like a wall", "I do not know where to look first". @@ -23,7 +23,7 @@ Fixes usually involve rebuilding the spacing scale, introducing asymmetry, colla ## Try it ``` -/layout the settings page +/impeccable layout the settings page ``` Typical changes: @@ -36,6 +36,6 @@ Typical changes: ## Pitfalls -- **Confusing arrange with distill.** If the problem is too many things, run `/distill` first. Layout is for arranging what is already the right set. +- **Confusing arrange with distill.** If the problem is too many things, run `/impeccable distill` first. Layout is for arranging what is already the right set. - **Expecting it to rescue a broken grid.** If the page has no grid at all, arrange will build one. Just know that the diff is going to be larger than you expect. - **Ignoring the hierarchy verdict.** If arrange says "nothing is primary", no amount of spacing work fixes that. You need a content decision, not a layout tweak. diff --git a/content/site/skills/optimize.md b/content/site/skills/optimize.md index 15b49905e..545d596c1 100644 --- a/content/site/skills/optimize.md +++ b/content/site/skills/optimize.md @@ -4,7 +4,7 @@ tagline: "Diagnose and fix UI performance from LCP to bundle size." ## When to use it -`/optimize` is for interfaces that feel slow. First paint takes forever, scrolling janks, images pop in late, interactions feel laggy, the bundle ships 800KB of JavaScript. Use it when the Web Vitals are bad or when users are complaining that things are sluggish. +`/impeccable optimize` is for interfaces that feel slow. First paint takes forever, scrolling janks, images pop in late, interactions feel laggy, the bundle ships 800KB of JavaScript. Use it when the Web Vitals are bad or when users are complaining that things are sluggish. Do not use it as premature optimization. If LCP is 1.1s and INP is 80ms, stop. The design work matters more. @@ -23,7 +23,7 @@ The skill measures before and after. Every fix gets quantified. If a change does ## Try it ``` -/optimize the homepage +/impeccable optimize the homepage ``` Expected shape: @@ -51,6 +51,6 @@ Bundle: 340KB → 180KB ## Pitfalls -- **Optimizing before measuring.** Without baseline metrics, you cannot tell what helped. Run `/optimize` with specific Web Vitals numbers, not vibes. +- **Optimizing before measuring.** Without baseline metrics, you cannot tell what helped. Run `/impeccable optimize` with specific Web Vitals numbers, not vibes. - **Chasing tiny wins.** A 20ms improvement in INP that takes a week is rarely worth it. Optimize has diminishing returns; know when to stop. - **Forgetting to re-measure after every change.** The build could have made things worse in a way the skill did not predict. Verify. diff --git a/content/site/skills/overdrive.md b/content/site/skills/overdrive.md index b01135358..61a2a26e8 100644 --- a/content/site/skills/overdrive.md +++ b/content/site/skills/overdrive.md @@ -4,7 +4,7 @@ tagline: "Push an interface past conventional limits. Shaders, physics, 60fps, c ## When to use it -`/overdrive` is for the moments where you want to impress. A hero that uses WebGL. A table that handles a million rows. A dialog that morphs out of its trigger element. A form that validates in real-time with streaming feedback. A page transition that feels cinematic. Use it when the project budget allows for technical ambition and the outcome needs to feel extraordinary. +`/impeccable overdrive` is for the moments where you want to impress. A hero that uses WebGL. A table that handles a million rows. A dialog that morphs out of its trigger element. A form that validates in real-time with streaming feedback. A page transition that feels cinematic. Use it when the project budget allows for technical ambition and the outcome needs to feel extraordinary. Do not use it on operator tools, dashboards, or anything where reliability beats spectacle. Overdrive burns complexity for effect, and that trade-off is only worth it on moments that matter. @@ -17,7 +17,7 @@ Overdrive output is announced with `──── ⚡ OVERDRIVE ────` so ## Try it ``` -/overdrive the landing hero +/impeccable overdrive the landing hero ``` One concrete run might replace a static hero with a WebGL shader background driven by mouse position, a display headline that reveals with a mask on scroll using the Scroll Timeline API, and a View Transition on the CTA that morphs into the next page. Plus a reduced-motion fallback that swaps all of it for a clean static composition. diff --git a/content/site/skills/polish.md b/content/site/skills/polish.md index 048957757..9c7a5f0e4 100644 --- a/content/site/skills/polish.md +++ b/content/site/skills/polish.md @@ -4,7 +4,7 @@ tagline: "The meticulous final pass between good and great." ## When to use it -`/polish` is the last thing you run before shipping. It hunts down the small details that separate a shipped feature from a polished one: half-pixel misalignments, inconsistent spacing, forgotten focus states, loading transitions that flash, copy that drifts in tone. It also aligns the feature with your design system -- replacing hard-coded values with tokens, swapping custom components for shared ones, and fixing any drift from established patterns. +`/impeccable polish` is the last thing you run before shipping. It hunts down the small details that separate a shipped feature from a polished one: half-pixel misalignments, inconsistent spacing, forgotten focus states, loading transitions that flash, copy that drifts in tone. It also aligns the feature with your design system, replacing hard-coded values with tokens, swapping custom components for shared ones, and fixing any drift from established patterns. Reach for it when the feature is functionally complete, nothing is broken, and something still feels off. Also reach for it when a feature has drifted from the design system and needs to be pulled back in line. @@ -24,7 +24,7 @@ The skill is explicit about one thing: polish is the last step, not the first. I ## Try it ``` -/polish the pricing page +/impeccable polish the pricing page ``` A healthy run looks like: @@ -41,6 +41,6 @@ Five small fixes, no rewrites. That is the shape of a good polish pass. ## Pitfalls -- **Polishing work that is not done.** If there are TODOs in the code, you are not ready. Run `/polish` on finished features only. -- **Treating polish as redesign.** Polish refines what exists. If you find yourself rearchitecting a layout, you needed `/critique` or `/layout` instead. -- **Running `/polish` without `/audit` first.** Polish catches feel-based issues. Audit catches measurable ones. Use both. +- **Polishing work that is not done.** If there are TODOs in the code, you are not ready. Run `/impeccable polish` on finished features only. +- **Treating polish as redesign.** Polish refines what exists. If you find yourself rearchitecting a layout, you needed `/impeccable critique` or `/impeccable layout` instead. +- **Running `/impeccable polish` without `/impeccable audit` first.** Polish catches feel-based issues. Audit catches measurable ones. Use both. diff --git a/content/site/skills/quieter.md b/content/site/skills/quieter.md index fedaa4d7c..e589df5c6 100644 --- a/content/site/skills/quieter.md +++ b/content/site/skills/quieter.md @@ -4,9 +4,9 @@ tagline: "Tone down designs that are shouting without losing their intent." ## When to use it -`/quieter` is the counterweight to `/bolder`. Reach for it when an interface is visually aggressive, overstimulating, or trying to do too many things at full volume. Neon on dark, gradient text everywhere, 6 accent colors, everything animated, 20px shadows. Use quieter when the design needs to breathe and you want refinement without losing the point of view. +`/impeccable quieter` is the counterweight to `/impeccable bolder`. Reach for it when an interface is visually aggressive, overstimulating, or trying to do too many things at full volume. Neon on dark, gradient text everywhere, 6 accent colors, everything animated, 20px shadows. Use quieter when the design needs to breathe and you want refinement without losing the point of view. -Also useful after `/bolder` goes a little too far. +Also useful after `/impeccable bolder` goes a little too far. ## How it works @@ -22,7 +22,7 @@ The skill preserves the design's intent. If the original had a point of view, th ## Try it ``` -/quieter the pricing page +/impeccable quieter the pricing page ``` Typical diff: @@ -37,4 +37,4 @@ Typical diff: - **Over-applying.** Quieter can strip personality if you run it on something that was already measured. Use it when the design is too loud, not when it is correctly assertive. - **Confusing quieter with distill.** Quieter reduces intensity. Distill removes elements. They are different moves. -- **Running it in response to a critique that says "too busy".** Busy usually means too many things, not too loud. Try `/distill` first. +- **Running it in response to a critique that says "too busy".** Busy usually means too many things, not too loud. Try `/impeccable distill` first. diff --git a/content/site/skills/shape.md b/content/site/skills/shape.md index e4a687d76..b593e30f5 100644 --- a/content/site/skills/shape.md +++ b/content/site/skills/shape.md @@ -4,13 +4,13 @@ tagline: "Think before you build. Produce a design brief through discovery, not ## When to use it -`/shape` is where a feature starts. Before anyone writes code, before anyone argues about the hero treatment, before anyone picks a font. Use it to force a discovery conversation about purpose, users, content, and constraints, then capture the answers as a design brief the implementation skills can lean on. +`/impeccable shape` is where a feature starts. Before anyone writes code, before anyone argues about the hero treatment, before anyone picks a font. Use it to force a discovery conversation about purpose, users, content, and constraints, then capture the answers as a design brief the implementation skills can lean on. Reach for it whenever a feature is about to start, a ticket is vague, or you catch yourself writing JSX to figure out what the product should be. ## How it works -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. The model jumps to "here is a card grid" without asking "what is the user trying to accomplish". `/shape` inverts that order. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. The model jumps to "here is a card grid" without asking "what is the user trying to accomplish". `/impeccable shape` inverts that order. The skill runs a structured discovery interview in conversation. It will not write code during this phase. The questions cover: @@ -21,17 +21,17 @@ The skill runs a structured discovery interview in conversation. It will not wri You answer naturally. The skill asks follow-ups, not a form. At the end it produces a design brief: a structured artifact you can hand to `/impeccable` or any other implementation skill. -Note: if you want the full flow -- discovery interview, then straight into building -- use `/impeccable craft` instead. It runs `/shape` internally, then continues into implementation with visual iteration. `/shape` standalone is for when you want just the brief, so you can take it to whatever implementation approach you prefer. +Note: if you want the full flow (discovery interview, then straight into building), use `/impeccable craft` instead. It runs `/impeccable shape` internally, then continues into implementation with visual iteration. `/impeccable shape` standalone is for when you want just the brief, so you can take it to whatever implementation approach you prefer. ## Try it ``` -/shape a daily digest email preferences page +/impeccable shape a daily digest email preferences page ``` Expect a 5 to 10 question conversation. The skill asks things like "who is the person opening this, and are they already committed or still curious" and "what happens when the user has unsubscribed from everything, do we hide the feature or show something". You answer, and a brief materializes. -From there you can hand the brief to `/impeccable`, `/polish`, or any other skill. Or just use it as a reference while you build by hand. +From there you can hand the brief to `/impeccable`, `/impeccable polish`, or any other skill. Or just use it as a reference while you build by hand. ## Pitfalls diff --git a/content/site/skills/teach.md b/content/site/skills/teach.md new file mode 100644 index 000000000..698fd7894 --- /dev/null +++ b/content/site/skills/teach.md @@ -0,0 +1,3 @@ +--- +tagline: "Teach Impeccable who your product is for, once per project." +--- diff --git a/content/site/skills/typeset.md b/content/site/skills/typeset.md index feb656821..0bfc1aad8 100644 --- a/content/site/skills/typeset.md +++ b/content/site/skills/typeset.md @@ -4,7 +4,7 @@ tagline: "Fix typography that feels generic, inconsistent, or accidental." ## When to use it -Reach for `/typeset` when the text on a page looks like default typography instead of designed typography. Muddy hierarchy, three sizes that look the same, body copy at 14px, a display font that is actually just Inter bold, headlines with no kerning attention. +Reach for `/impeccable typeset` when the text on a page looks like default typography instead of designed typography. Muddy hierarchy, three sizes that look the same, body copy at 14px, a display font that is actually just Inter bold, headlines with no kerning attention. Common triggers: "hierarchy feels flat", "readability is off", "fonts look generic". @@ -23,7 +23,7 @@ It then fixes what it finds: picks distinctive typefaces, builds a modular scale ## Try it ``` -/typeset the article layout +/impeccable typeset the article layout ``` Expected diff: @@ -38,5 +38,5 @@ Expected diff: ## Pitfalls - **Asking for a new font without context.** Typeset will pick based on the `.impeccable.md` brand voice. If you have not run `/impeccable teach`, the suggestion will be generic. -- **Reaching for typeset when the issue is layout.** If paragraphs are fine but the page feels cramped, you want `/layout`. +- **Reaching for typeset when the issue is layout.** If paragraphs are fine but the page feels cramped, you want `/impeccable layout`. - **Expecting fluid clamp scales on app UIs.** Typeset uses fixed rem scales for app interfaces. Fluid typography is for marketing and content pages where line length varies dramatically. diff --git a/content/site/tutorials/critique-with-overlay.md b/content/site/tutorials/critique-with-overlay.md index 5ba0a1b98..e370d14ca 100644 --- a/content/site/tutorials/critique-with-overlay.md +++ b/content/site/tutorials/critique-with-overlay.md @@ -1,6 +1,6 @@ --- title: Critique with the visual overlay -tagline: "Use /critique plus the browser overlay to review a live page with ground truth." +tagline: "Use /impeccable critique plus the browser overlay to review a live page with ground truth." order: 2 description: "Run a full design critique that combines LLM assessment, the automated detector, and a live browser overlay so you can see exactly which elements trigger which anti-patterns on the page you're looking at." --- @@ -17,12 +17,12 @@ Total time: about ten minutes. - A harness with browser automation available (Claude Code with the Chrome extension, or similar). - A page you want to critique, either local (`localhost:3000/pricing`) or deployed. -## Step 1. Run /critique +## Step 1. Run /impeccable critique From your harness, run: ``` -/critique the pricing page at localhost:3000/pricing +/impeccable critique the pricing page at localhost:3000/pricing ``` The skill kicks off two independent assessments in parallel. They run in separate sub-agents so one does not bias the other. @@ -58,14 +58,14 @@ Every outlined element has a floating label naming the rule that fired. Hover an You have three ways to open it: 1. **[Chrome extension](https://chromewebstore.google.com/detail/impeccable/bdkgmiklpdmaojlpflclinlofgjfpabf)**: one-click activation on any page. Click the Impeccable icon in the toolbar and every anti-pattern gets highlighted instantly. -2. **Inside `/critique`**: the skill opens a browser tab labeled `[Human]` with the detector active during the browser portion of the assessment. You do not need to do anything extra. +2. **Inside `/impeccable critique`**: the skill opens a browser tab labeled `[Human]` with the detector active during the browser portion of the assessment. You do not need to do anything extra. 3. **Standalone CLI**: `npx impeccable live` starts a local server that serves the detector script. You inject it into any page by adding a ` - - - - - Impeccable Command Cheatsheet - - - - - - - - - - - - -
-

Impeccable Commands

-

Quick reference for all 18 design commands

-
- -
-

Loading commands...

-
- - - - - - diff --git a/public/css/main.css b/public/css/main.css index 0cacbeca6..d2c15a660 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -1666,6 +1666,11 @@ code { margin: 0 0 var(--spacing-xs) 0; } +.mobile-cmd-namespace { + color: var(--color-ash); + font-weight: 400; +} + .mobile-cmd-desc { font-size: 0.875rem; color: var(--color-charcoal); @@ -2741,7 +2746,7 @@ code { /* Row 1: full-width primary install card with internal 2-column split */ .install-row-primary { display: grid; - grid-template-columns: 1.1fr 0.9fr; + grid-template-columns: 1fr 1fr; gap: var(--spacing-xl); align-items: start; margin: 0 0 var(--spacing-xl); @@ -2751,19 +2756,221 @@ code { min-width: 0; } -.install-primary-main { +.install-primary-main, +.install-primary-howto { display: flex; flex-direction: column; min-width: 0; } +.install-primary-howto { + padding-left: var(--spacing-xl); + border-left: 1px solid var(--color-mist); +} + +/* The "Use it" side uses the hero body copy size so both columns feel balanced + in typographic weight, not just pixel width. */ +.install-primary-howto .install-path-desc { + font-size: 0.9375rem; + line-height: 1.6; + color: var(--color-ink); + max-width: 48ch; +} + +.install-primary-howto .install-path-desc em { + font-family: var(--font-display); + font-style: italic; + font-weight: 500; + color: var(--color-accent); +} + .install-primary-alts { display: flex; flex-direction: column; gap: var(--spacing-lg); min-width: 0; - padding-left: var(--spacing-xl); - border-left: 1px solid var(--color-mist); +} + +/* Collapsible "other install methods" under the main install card. */ +.install-alts-collapse { + margin-top: var(--spacing-md); + border-top: 1px solid var(--color-mist); + padding-top: var(--spacing-md); +} + +.install-alts-collapse[open] { + padding-bottom: var(--spacing-sm); +} + +.install-alts-summary { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--spacing-sm); + cursor: pointer; + list-style: none; + padding: 0.25rem 0; + user-select: none; +} + +.install-alts-summary::-webkit-details-marker { + display: none; +} + +.install-alts-summary-label { + font-family: var(--font-body); + font-size: 0.6875rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.08em; + color: var(--color-ash); +} + +.install-alts-chevron { + color: var(--color-ash); + transition: transform 0.2s ease; + flex-shrink: 0; +} + +.install-alts-collapse[open] .install-alts-chevron { + transform: rotate(180deg); +} + +.install-alts-collapse[open] .install-primary-alts { + margin-top: var(--spacing-md); +} + +/* Editorial "How to use" step list on the right side of the install row. + Uses display-font numerals as prominent visual anchors, generous vertical + rhythm, and body text at the same scale as the hero copy for hierarchy + parity with the rest of the page. */ +.install-howto-steps { + list-style: none; + counter-reset: howto-step; + padding: 0; + margin: var(--spacing-lg) 0 0; + display: flex; + flex-direction: column; + gap: var(--spacing-lg); +} + +.install-howto-steps > li { + counter-increment: howto-step; + position: relative; + padding-left: 3rem; + min-height: 2.5rem; +} + +.install-howto-steps > li::before { + content: counter(howto-step, decimal-leading-zero); + position: absolute; + left: 0; + top: -0.1em; + font-family: var(--font-display); + font-size: 1.75rem; + font-weight: 400; + font-style: italic; + color: var(--color-accent); + line-height: 1; + letter-spacing: -0.02em; +} + +.install-howto-step-label { + font-family: var(--font-body); + font-size: 1rem; + font-weight: 600; + color: var(--color-ink); + margin-bottom: 0.35rem; + line-height: 1.3; + letter-spacing: -0.005em; +} + +.install-howto-steps > li p { + margin: 0; + font-size: 0.9375rem; + color: var(--color-ink); + line-height: 1.6; +} + +.install-howto-steps code { + font-family: var(--font-mono); + font-size: 0.8125rem; + font-weight: 500; + color: var(--color-ink); + background: var(--color-accent-dim); + padding: 1px 6px; + border-radius: 3px; + white-space: nowrap; +} + +.install-howto-steps .install-path-slash { + color: var(--color-accent); +} + +.install-howto-footer { + display: flex; + flex-wrap: wrap; + gap: var(--spacing-lg); + margin-top: var(--spacing-xl); + padding-top: var(--spacing-lg); + border-top: 1px solid var(--color-mist); +} + +.install-howto-link { + font-family: var(--font-body); + font-size: 0.875rem; + font-weight: 500; + color: var(--color-accent); + text-decoration: none; + display: inline-flex; + align-items: baseline; + gap: 0.35em; + transition: gap 0.2s var(--ease-out-quart, ease); +} + +.install-howto-link:hover { + gap: 0.6em; +} + +.install-howto-link span { + display: inline-block; + transition: transform 0.2s var(--ease-out-quart, ease); +} + +.install-howto-link:hover span { + transform: translateX(2px); +} + +/* Two-tool grid inside the "Anti-pattern tools" step. */ +.install-tool-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: var(--spacing-lg); + margin-top: var(--spacing-md); +} + +.install-tool { + display: flex; + flex-direction: column; + gap: var(--spacing-sm); + min-width: 0; +} + +.install-tool-label { + font-family: var(--font-body); + font-size: 0.9375rem; + font-weight: 600; + color: var(--color-ink); + display: flex; + align-items: center; + gap: 0.4rem; +} + +.install-tool-desc { + margin: 0; + font-size: 0.8125rem; + color: var(--color-charcoal); + line-height: 1.55; } .install-alts-label { @@ -3025,6 +3232,7 @@ code { color: var(--color-accent); } + .install-path-subcommands { display: flex; flex-direction: column; @@ -3311,13 +3519,17 @@ a.install-updated-ref:hover { max-width: calc(100vw - var(--spacing-md) * 2); } - .install-primary-alts { + .install-primary-howto { padding-left: 0; padding-top: var(--spacing-lg); border-left: none; border-top: 1px solid var(--color-mist); } + .install-tool-grid { + grid-template-columns: 1fr; + } + .install-path-primary { margin-bottom: var(--spacing-sm); padding: var(--spacing-md); diff --git a/public/css/sub-pages.css b/public/css/sub-pages.css index 716b13307..c4be084bd 100644 --- a/public/css/sub-pages.css +++ b/public/css/sub-pages.css @@ -486,138 +486,283 @@ main#main { padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(4rem, 8vw, 6rem); } -.skills-overview-content { - max-width: 720px; +/* ============================================ + DOCS OVERVIEW — /skills page + ============================================ */ + +.docs-overview { + max-width: 920px; } -.skills-overview-header { - margin-bottom: clamp(2.5rem, 5vw, 4rem); +.docs-overview-header { + margin-bottom: clamp(2rem, 4vw, 3rem); } -.skills-overview-header .sub-page-lede a { - color: var(--color-ink); - text-decoration: underline; - text-decoration-thickness: 1px; - text-decoration-color: var(--color-accent); - text-underline-offset: 4px; - font-family: var(--font-mono); - font-weight: 500; -} - -.skills-overview-howto { - padding: var(--spacing-lg) var(--spacing-lg); - background: var(--color-cream); - border: 1px solid var(--color-mist); - border-radius: 10px; - margin-bottom: clamp(2.5rem, 5vw, 4rem); -} - -.skills-overview-howto-title { - font-family: var(--font-display); - font-size: 1.25rem; - font-style: italic; - font-weight: 500; - color: var(--color-ink); - margin-bottom: var(--spacing-sm); -} - -.skills-overview-howto p { - font-size: 0.9375rem; - line-height: 1.7; - color: var(--color-charcoal); +.docs-overview-header .sub-page-lede { max-width: 60ch; } -.skills-overview-howto a { - color: var(--color-ink); - font-family: var(--font-mono); - font-size: 0.875em; - font-weight: 500; - text-decoration: none; - border-bottom: 1px solid var(--color-accent); - transition: color var(--duration-fast) var(--ease-out); +/* Home command hero — the /impeccable root card that sits above the + category sections. It gets special treatment because it's the entry + point, not just another command in a category. */ +.docs-home-card { + display: grid; + grid-template-columns: 1.1fr 1fr; + gap: clamp(1.5rem, 3vw, 2.5rem); + padding: clamp(1.5rem, 3vw, 2rem); + background: #ffffff; + border: 1px solid var(--color-mist); + border-radius: 12px; + margin-bottom: clamp(2.5rem, 5vw, 3.5rem); } -.skills-overview-howto a:hover { +.docs-home-card-identity { + min-width: 0; +} + +.docs-home-card-eyebrow { + display: inline-block; + font-family: var(--font-body); + font-size: 0.6875rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.12em; color: var(--color-accent); + margin-bottom: var(--spacing-sm); } -.skills-overview-categories { +.docs-home-card-title { + font-family: var(--font-display); + font-size: clamp(2rem, 4vw, 2.75rem); + font-weight: 500; + font-style: italic; + color: var(--color-ink); + letter-spacing: -0.02em; + line-height: 1; + margin: 0 0 var(--spacing-sm) 0; +} + +.docs-home-card-tagline { + font-family: var(--font-body); + font-size: 1rem; + font-weight: 500; + color: var(--color-ink); + line-height: 1.5; + margin: 0 0 var(--spacing-md) 0; + max-width: 32ch; +} + +.docs-home-card-desc { + font-size: 0.9375rem; + line-height: 1.6; + color: var(--color-ink); + max-width: 36ch; + margin: 0; +} + +.docs-home-card-desc code { + font-family: var(--font-mono); + font-size: 0.8125rem; + font-weight: 500; + color: var(--color-ink); + background: var(--color-accent-dim); + padding: 1px 6px; + border-radius: 3px; +} + +.docs-home-card-modes { + list-style: none; + padding: 0; + margin: 0; display: flex; flex-direction: column; - gap: clamp(2rem, 4vw, 3rem); + gap: var(--spacing-md); } -.skills-overview-category { - padding-bottom: clamp(2rem, 4vw, 2.5rem); - border-bottom: 1px solid var(--color-mist); +.docs-home-card-modes a { + display: block; + text-decoration: none; + transition: padding var(--duration-fast) var(--ease-out, ease); } -.skills-overview-category:last-child { - border-bottom: none; +.docs-home-card-modes a:hover { + padding-left: 6px; } -.skills-overview-category-meta { +.docs-home-mode-label { + display: block; + font-family: var(--font-mono); + font-size: 0.875rem; + font-weight: 600; + color: var(--color-ink); + margin-bottom: 2px; +} + +.docs-home-mode-slash { + color: var(--color-accent); + font-weight: 400; +} + +.docs-home-mode-hint { + display: block; + font-family: var(--font-body); + font-size: 0.8125rem; + color: var(--color-charcoal); + line-height: 1.4; +} + +/* Category sections with rich command cards */ +.docs-categories { + display: flex; + flex-direction: column; + gap: clamp(2.5rem, 5vw, 3.5rem); +} + +.docs-category-header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--spacing-md); - margin-bottom: 6px; + margin-bottom: var(--spacing-md); + padding-bottom: var(--spacing-sm); + border-bottom: 1px solid var(--color-mist); } -.skills-overview-category-title { +.docs-category-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; font-style: italic; color: var(--color-ink); letter-spacing: -0.01em; + line-height: 1.1; + margin: 0 0 4px 0; } -.skills-overview-category-count { +.docs-category-desc { + font-size: 0.875rem; + line-height: 1.5; + color: var(--color-charcoal); + max-width: 58ch; + margin: 0; +} + +.docs-category-count { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-ash); + white-space: nowrap; + flex-shrink: 0; } -.skills-overview-category-desc { - font-size: 0.9375rem; - line-height: 1.7; - color: var(--color-charcoal); - max-width: 58ch; - margin-bottom: var(--spacing-md); -} - -.skills-overview-chips { +/* Dense two-column rows for each command: name on the left, description + + relationship on the right. Mirrors the original cheatsheet density. */ +.docs-category-rows { display: flex; - flex-wrap: wrap; - gap: 8px; + flex-direction: column; } -.skills-overview-chip { - display: inline-flex; - align-items: center; - padding: 6px 12px; +.command-row { + display: grid; + grid-template-columns: minmax(11rem, 13rem) 1fr; + gap: var(--spacing-lg); + padding: var(--spacing-md) 0; + border-bottom: 1px solid var(--color-mist); + align-items: baseline; +} + +.command-row:last-child { + border-bottom: none; +} + +.command-row-name { font-family: var(--font-mono); - font-size: 0.8125rem; - font-weight: 500; + font-size: 0.875rem; + font-weight: 600; color: var(--color-ink); - background: var(--color-paper); - border: 1px solid var(--color-mist); - border-radius: 99px; - text-decoration: none; - transition: border-color var(--duration-fast) var(--ease-out), - color var(--duration-fast) var(--ease-out), - background var(--duration-fast) var(--ease-out); + line-height: 1.4; + min-width: 0; } -.skills-overview-chip:hover { +.command-row-name a { + color: inherit; + text-decoration: none; + border-bottom: 1px solid transparent; + transition: border-color var(--duration-fast) var(--ease-out, ease); +} + +.command-row-name a:hover { + border-bottom-color: var(--color-accent); +} + +.command-row-namespace { + color: var(--color-ash); + font-weight: 400; +} + +.command-row-beta { + display: inline-block; + font-family: var(--font-mono); + font-size: 0.5625rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-accent); + border: 1px solid var(--color-accent); + border-radius: 3px; + padding: 1px 5px; + vertical-align: 1px; + margin-left: 4px; +} + +.command-row-info { + min-width: 0; +} + +.command-row-desc { + font-family: var(--font-body); + font-size: 0.875rem; + line-height: 1.55; + color: var(--color-ink); + margin: 0; +} + +.command-row-rel { + font-family: var(--font-body); + font-size: 0.75rem; + line-height: 1.5; + color: var(--color-ash); + margin-top: 4px; +} + +.command-row-rel a { + font-family: var(--font-mono); + font-size: 0.75rem; + color: var(--color-charcoal); + text-decoration: none; + border-bottom: 1px solid var(--color-mist); + transition: color var(--duration-fast) var(--ease-out, ease), + border-color var(--duration-fast) var(--ease-out, ease); +} + +.command-row-rel a:hover { color: var(--color-accent); border-color: var(--color-accent); - background: var(--color-cream); +} + +/* Narrow viewport: stack name above info */ +@media (max-width: 820px) { + .docs-home-card { + grid-template-columns: 1fr; + } + + .command-row { + grid-template-columns: 1fr; + gap: 4px; + } } /* ============================================ @@ -1686,6 +1831,24 @@ main#main { font-weight: 300; } +/* Sub-commands: show "/impeccable" as a smaller label above the command name + so it stacks and the command name stays at full display size. */ +.skill-detail-title-namespace { + display: block; + font-family: var(--font-body); + font-size: 0.9375rem; + font-weight: 500; + color: var(--color-ash); + letter-spacing: 0.04em; + margin-bottom: 0.4em; + line-height: 1; +} + +.skill-detail-title-namespace .skill-detail-title-slash { + color: var(--color-accent); + font-weight: 400; +} + .skill-detail-tagline { font-family: var(--font-body); font-size: clamp(1rem, 1.4vw, 1.125rem); diff --git a/public/css/workflow.css b/public/css/workflow.css index 8dfa984dd..e0321b625 100644 --- a/public/css/workflow.css +++ b/public/css/workflow.css @@ -181,6 +181,24 @@ font-weight: 300; } +/* Sub-commands: stack the /impeccable namespace as a smaller label above the + command name so the command name stays at full display size and never + clips (e.g., "overdrive" is long). */ +.spread-command-name .spread-namespace { + display: block; + font-family: var(--font-body); + font-size: 0.875rem; + font-weight: 500; + color: var(--color-ash); + letter-spacing: 0.04em; + margin-bottom: 0.4em; +} + +.spread-command-name .spread-namespace .spread-slash { + color: var(--spread-accent); + font-weight: 400; +} + .spread-command-name .beta-badge { font-family: var(--font-body); font-size: 0.55rem; diff --git a/public/index.html b/public/index.html index bc9012563..387083c39 100644 --- a/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@ Impeccable: The missing upgrade to Anthropic's impeccable skill - + @@ -21,7 +21,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -57,7 +57,7 @@
@@ -88,15 +88,15 @@

Impeccable

Design fluency for AI harnesses

-

Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 18 commands to steer the result.

-

Impeccable teaches your AI real design and gives you 18 commands to steer the result.

+

Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 20 commands to steer the result.

+

Impeccable teaches your AI real design and gives you 20 commands to steer the result.

What's included
- Enhanced impeccable skill + anti-patterns + Impeccable agent skill with 20 design commands · - 18 design commands: /polish, /audit, /typeset, /overdrive... + Optional CLI + Chrome extension
@@ -117,7 +117,7 @@
- + @@ -203,7 +203,7 @@

The Language

-

18 commands form a shared vocabulary between you and your AI. Each one encodes a specific design discipline, so you can steer with precision.

+

20 commands form a shared vocabulary between you and your AI. Each one encodes a specific design discipline, so you can steer with precision.

@@ -213,7 +213,7 @@
-

Pick any command to see it in action. View cheatsheet →

+

Pick any command to see it in action. Full command reference →

Three ways to use it -

The Chrome extension on any site, embedded in /critique during an AI design review, or standalone via npx impeccable live.

+

The Chrome extension on any site, embedded in /impeccable critique during an AI design review, or standalone via npx impeccable live.

Impeccable Chrome extension panel listing detected anti-patterns @@ -327,11 +327,12 @@

Get Started

- +
+
-

1Install the skills Recommended

-

18 commands that steer your AI toward better design, in real time. The full Impeccable experience.

+

1Install the skill Recommended

+

One agent skill that teaches your AI to design, with 20 commands bundled inside.

@@ -358,90 +359,115 @@
-
- Then run /impeccable teach to set up your project's design context. -
+ +
+ + Other install methods + + +
+
+ Claude Code plugin +
+ $ + /plugin marketplace add pbakaus/impeccable + +
+ Then open /plugin in Claude Code +
+ +
+ Manual download all 11 providers + +
+
+
- -
- Other install methods + + - +
- +
-

2Add the CLI Beta

+

3Add the anti-pattern tools Optional

-

Scan any file, directory, or live URL for anti-patterns from the terminal. Catches gradient text, AI color palettes, nested cards, low contrast, and 20+ more rules across HTML, CSS, JSX/TSX, Vue, and Svelte. Use it in CI pipelines, pre-commit hooks, or one-off audits to keep AI slop out of production.

+

Two ways to catch AI slop outside the skill: a CLI for the terminal and a Chrome extension for any webpage. Both catch gradient text, AI color palettes, nested cards, low contrast, and 20+ more rules.

-
-
- $ - npm i -g impeccable - +
+
+
CLI Beta
+

Scan files, directories, or live URLs from the terminal. Drop into CI pipelines, pre-commit hooks, or one-off audits.

+
+
+ $ + npm i -g impeccable + +
+ Or use npx impeccable detect src/ without installing. +
+ +
+ +
+
Chrome extension
+

Click the toolbar icon on any page and every anti-pattern lights up right where it lives. Works on localhost, staging, production, or anyone else's site.

+
- Or use npx impeccable detect src/ directly without installing.
- - -
-
- - -
- -

3Browser extension

- -
-
-

Click the toolbar icon on any page and every anti-pattern lights up right where it lives: gradient text, purple palettes, nested cards, tiny body text, and the rest. Works on your localhost, staging, production, or anyone else's site. Great for spot-checking competitors, reviewing PRs visually, or just browsing the web with a sharper eye.

-
@@ -515,7 +541,7 @@
  • Chrome DevTools extension. One-click detection on any page: yours, staging, production, or someone else's. Reads live computed styles, surfaces findings in an interactive panel, and highlights elements on the page. In Chrome Web Store review.
  • /critique got teeth. Persona sub-agents review in parallel, score against Nielsen's heuristics, run the detector automatically, and open a live browser overlay so you can walk each finding in place.
  • New ways to create with Impeccable. /shape runs a structured discovery interview about purpose, audience, and goals, then produces a design brief before any code is written. /impeccable craft chains that brief straight into the full implementation flow so you ship a designed feature instead of a reflex card grid.
  • -
  • New docs site. Top-level Docs, Anti-Patterns, and Visual Mode sections. 18 per-skill pages with before/after demos and the canonical SKILL.md inline, two tutorials, and 38 rule cards with inline visual examples.
  • +
  • New docs site. Top-level Docs, Anti-Patterns, and Visual Mode sections. 18 per-skill pages with before/after demos and the canonical SKILL.md inline, two tutorials, and 38 rule cards with inline visual examples.
  • New harness: Rovo Dev. 11 supported AI tools total.
  • @@ -649,7 +675,7 @@
    Commands or skills aren't appearing. What do I do?
    -

    For commands: Type / in your AI harness and look for commands like /audit, /polish, etc. If they don't appear, double-check the files are in the correct location.

    +

    For commands: Type /impeccable in your AI harness and look for commands like /impeccable audit, /impeccable polish, etc. If they don't appear, double-check the files are in the correct location.

    For skills: Skills are applied automatically when relevant. To verify, explicitly mention "use the impeccable skill" in your prompt. This forces the AI to acknowledge and apply it.

    Tool-specific setup:

      @@ -706,10 +732,10 @@
    @@ -612,7 +674,7 @@ ${sectionsHtml} export async function generateSubPages(rootDir) { const data = await buildSubPageData(rootDir); const outDirs = { - skills: path.join(rootDir, 'public/skills'), + docs: path.join(rootDir, 'public/docs'), antiPatterns: path.join(rootDir, 'public/anti-patterns'), tutorials: path.join(rootDir, 'public/tutorials'), visualMode: path.join(rootDir, 'public/visual-mode'), @@ -626,39 +688,41 @@ export async function generateSubPages(rootDir) { const generated = []; - // Skills index: docs-browser layout with unified sidebar. + // Docs index: the full command reference with rich cards. { const sidebar = renderDocsSidebar(data.skillsByCategory, data.tutorials, null); - const main = renderSkillsOverviewMain(data.skillsByCategory); + const main = renderSkillsOverviewMain(data.skillsByCategory, data.skills); const html = renderPage({ - title: 'Skills | Impeccable', + title: 'Docs | Impeccable', description: - '18 commands that teach your AI harness how to design. Browse by category: create, evaluate, refine, simplify, harden.', + '20 commands that teach your AI harness how to design. Browse by category: create, evaluate, refine, simplify, harden.', bodyHtml: wrapInDocsLayout(sidebar, main), activeNav: 'docs', - canonicalPath: '/skills', + canonicalPath: '/docs', bodyClass: 'sub-page skills-layout-page', }); - const out = path.join(outDirs.skills, 'index.html'); + const out = path.join(outDirs.docs, 'index.html'); fs.writeFileSync(out, html, 'utf-8'); generated.push(out); } - // Skills detail pages: same docs-browser shell as the overview. + // Per-command detail pages: same docs-browser shell as the overview. for (const skill of data.skills) { const sidebar = renderDocsSidebar(data.skillsByCategory, data.tutorials, { kind: 'skill', id: skill.id }); const main = renderSkillDetail(skill, data.knownSkillIds); - const title = `/${skill.id} | Impeccable`; + const title = skill.isSubCommand + ? `/impeccable ${skill.id} | Impeccable` + : `/${skill.id} | Impeccable`; const description = skill.editorial?.frontmatter?.tagline || skill.description; const html = renderPage({ title, description, bodyHtml: wrapInDocsLayout(sidebar, main), activeNav: 'docs', - canonicalPath: `/skills/${skill.id}`, + canonicalPath: `/docs/${skill.id}`, bodyClass: 'sub-page skills-layout-page', }); - const out = path.join(outDirs.skills, `${skill.id}.html`); + const out = path.join(outDirs.docs, `${skill.id}.html`); fs.writeFileSync(out, html, 'utf-8'); generated.push(out); } @@ -703,7 +767,7 @@ export async function generateSubPages(rootDir) { const html = renderPage({ title: 'Visual Mode | Impeccable', description: - 'See every anti-pattern flagged directly on the page. Live detection overlay from Impeccable, available via /critique, npx impeccable live, or the upcoming Chrome extension.', + 'See every anti-pattern flagged directly on the page. Live detection overlay from Impeccable, available via /impeccable critique, npx impeccable live, or the upcoming Chrome extension.', bodyHtml: renderVisualModeMain(), activeNav: 'visual-mode', canonicalPath: '/visual-mode', diff --git a/scripts/build.js b/scripts/build.js index 4668d3cd4..6636eec54 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -27,13 +27,23 @@ import { generateSubPages } from './build-sub-pages.js'; * Also validates that key HTML files reference the correct numbers. */ function generateCounts(rootDir, skills, buildDir) { - // Count active (non-deprecated) user-invocable commands - const activeCommands = skills.filter(s => { - if (!s.userInvocable) return false; - const content = fs.readFileSync(s.filePath, 'utf-8'); - return !content.includes('DEPRECATED'); - }); - const commandCount = activeCommands.length; + // Count active commands. After the v3.0 consolidation, commands are sub-commands + // of /impeccable. Count them from the command router table in SKILL.md. + const impeccableSkill = skills.find(s => s.name === 'impeccable'); + let commandCount; + if (impeccableSkill) { + // Count lines in the router table that have a | `command` | pattern + const routerMatches = impeccableSkill.body.match(/^\| `\w+` \|/gm); + commandCount = routerMatches ? routerMatches.length : 0; + } else { + // Fallback: count user-invocable skills + const activeCommands = skills.filter(s => { + if (!s.userInvocable) return false; + const content = fs.readFileSync(s.filePath, 'utf-8'); + return !content.includes('DEPRECATED'); + }); + commandCount = activeCommands.length; + } // Count detection rules from impeccable package const detectPkgPath = path.join(rootDir, 'src/detect-antipatterns.mjs'); @@ -56,7 +66,6 @@ function generateCounts(rootDir, skills, buildDir) { // Validate counts in key files const filesToCheck = [ 'public/index.html', - 'public/cheatsheet.html', 'README.md', 'NOTICE.md', 'AGENTS.md', @@ -73,7 +82,7 @@ function generateCounts(rootDir, skills, buildDir) { // Check for stale command counts (look for "N commands" or "N skills" patterns) // Strip changelog list content to avoid flagging historical counts const strippedContent = content.replace(/
      [\s\S]*?<\/ul>/g, ''); - const countPattern = /\b(\d+)\s+(design\s+)?(commands|skills|steering commands)/gi; + const countPattern = /\b(\d+)\s+(design\s+)?(commands|sub-commands|skills|steering commands)/gi; for (const match of strippedContent.matchAll(countPattern)) { const num = parseInt(match[1]); // Allow 1 (for "1 skill") and the correct count @@ -174,7 +183,6 @@ function validateNoEmDashes(rootDir) { const targets = [ 'content/site', 'public/index.html', - 'public/cheatsheet.html', 'public/privacy.html', 'scripts/build-sub-pages.js', 'scripts/lib/sub-pages-data.js', @@ -228,7 +236,6 @@ function validateNoEmDashes(rootDir) { function validateSiteHeader(rootDir) { const pages = [ 'public/index.html', - 'public/cheatsheet.html', 'public/privacy.html', ]; const marker = ''; @@ -281,7 +288,6 @@ const DIST_DIR = path.join(ROOT_DIR, 'dist'); async function buildStaticSite(extraEntrypoints = []) { const entrypoints = [ path.join(ROOT_DIR, 'public', 'index.html'), - path.join(ROOT_DIR, 'public', 'cheatsheet.html'), path.join(ROOT_DIR, 'public', 'privacy.html'), ...extraEntrypoints, ]; @@ -328,7 +334,7 @@ async function buildStaticSite(extraEntrypoints = []) { const cssFiles = result.outputs.filter(o => o.path.endsWith('.css')); // When entrypoints span multiple depths under public/ (e.g. public/index.html - // + public/skills/polish.html), Bun's HTML loader preserves the full public/ + // + public/docs/polish.html), Bun's HTML loader preserves the full public/ // prefix in the output tree. Flatten build/public/* up to build/*. const nestedPublic = path.join(outdir, 'public'); if (fs.existsSync(nestedPublic)) { @@ -435,8 +441,49 @@ function generateApiData(buildDir, skills, patterns) { })); fs.writeFileSync(path.join(apiDir, 'skills.json'), JSON.stringify(skillsData)); - // commands.json (user-invocable skills only) - const commandsData = skillsData.filter(s => s.userInvocable); + // commands.json - after v3.0 consolidation, commands are sub-commands of + // /impeccable. Load them from command-metadata.json and include the root + // impeccable skill itself so UI surfaces like the cheatsheet can list them. + // Each entry also picks up a short `tagline` from its editorial file + // (content/site/skills/.md) when one exists. Taglines are used by UI + // surfaces that need a human-friendly one-liner, while `description` stays + // optimized for auto-trigger keyword matching in the AI harness. + const readTagline = (id) => { + const editorialPath = path.join(ROOT_DIR, 'content/site/skills', `${id}.md`); + if (!fs.existsSync(editorialPath)) return null; + const raw = fs.readFileSync(editorialPath, 'utf-8'); + const match = raw.match(/^---\n([\s\S]*?)\n---/); + if (!match) return null; + const taglineMatch = match[1].match(/tagline:\s*"([^"]+)"/); + return taglineMatch ? taglineMatch[1] : null; + }; + + const metadataPath = path.join(ROOT_DIR, 'source/skills/impeccable/scripts/command-metadata.json'); + if (!fs.existsSync(metadataPath)) { + throw new Error(`command-metadata.json is missing at ${metadataPath}. This file is required to generate the commands API.`); + } + const impeccable = skills.find(s => s.name === 'impeccable'); + if (!impeccable) { + throw new Error('impeccable skill not found in source/skills/. The build system expects a single impeccable skill.'); + } + + const metadata = JSON.parse(fs.readFileSync(metadataPath, 'utf-8')); + const commandsData = [ + { + id: 'impeccable', + name: 'impeccable', + description: impeccable.description, + tagline: readTagline('impeccable'), + userInvocable: true, + }, + ...Object.entries(metadata).map(([id, meta]) => ({ + id, + name: id, + description: meta.description, + tagline: readTagline(id), + userInvocable: true, + })), + ]; fs.writeFileSync(path.join(apiDir, 'commands.json'), JSON.stringify(commandsData)); // patterns.json @@ -454,7 +501,8 @@ function generateApiData(buildDir, skills, patterns) { ); } - console.log(`✓ Generated static API data (${skillsData.length} skills, ${commandsData.length} commands)`); + const skillWord = skillsData.length === 1 ? 'skill' : 'skills'; + console.log(`✓ Generated static API data (${skillsData.length} ${skillWord}, ${commandsData.length} commands)`); } /** @@ -523,12 +571,16 @@ function generateCFConfig(buildDir) { `; fs.writeFileSync(path.join(buildDir, '_headers'), headers); - // _redirects: rewrite JSON API routes to static files (200 = rewrite, not redirect) + // _redirects: rewrite JSON API routes to static files (200 = rewrite, not redirect). + // Also permanent redirects for legacy URLs: /skills -> /docs, /cheatsheet -> /docs. const redirects = `/api/skills /_data/api/skills.json 200 /api/commands /_data/api/commands.json 200 /api/patterns /_data/api/patterns.json 200 /api/command-source/:id /_data/api/command-source/:id.json 200 /gallery /visual-mode#try-it-live 301 +/cheatsheet /docs 301 +/skills /docs 301 +/skills/:id /docs/:id 301 `; fs.writeFileSync(path.join(buildDir, '_redirects'), redirects); @@ -630,6 +682,10 @@ async function build() { const deprecatedLocalSkills = [ 'frontend-design', 'teach-impeccable', 'arrange', 'normalize', 'onboard', 'extract', + // v3.0 consolidation: standalone skills -> /impeccable sub-commands + 'adapt', 'animate', 'audit', 'bolder', 'clarify', 'colorize', + 'critique', 'delight', 'distill', 'harden', 'layout', 'optimize', + 'overdrive', 'polish', 'quieter', 'shape', 'typeset', ]; for (const { configDir } of syncConfigs) { for (const name of deprecatedLocalSkills) { diff --git a/scripts/lib/render-markdown.js b/scripts/lib/render-markdown.js index 41a4116ad..068b9f286 100644 --- a/scripts/lib/render-markdown.js +++ b/scripts/lib/render-markdown.js @@ -82,7 +82,7 @@ export function createRenderer({ knownSkillIds = new Set(), currentSkillId = nul * * - `http(s)://…` → unchanged, external * - `reference/foo.md` → `#reference-foo` on current skill page - * - `/skill-id` (known) → `/skills/skill-id` + * - `/skill-id` (known) → `/docs/skill-id` * - `#anchor` → unchanged (in-page anchor) * - anything else → unchanged (will be caught by build warnings later) * @@ -112,12 +112,12 @@ function resolveHref(href, { knownSkillIds, currentSkillId }) { // /skill-id mentioned in prose (e.g. "run /polish") const slashMatch = href.match(/^\/([a-z0-9-]+)$/i); if (slashMatch && knownSkillIds.has(slashMatch[1])) { - return { href: `/skills/${slashMatch[1]}`, external: false }; + return { href: `/docs/${slashMatch[1]}`, external: false }; } - // [text](other-skill) → /skills/other-skill + // [text](other-skill) → /docs/other-skill if (/^[a-z0-9-]+$/i.test(href) && knownSkillIds.has(href)) { - return { href: `/skills/${href}`, external: false }; + return { href: `/docs/${href}`, external: false }; } // Unknown — pass through. Generator can warn separately. diff --git a/scripts/lib/sub-pages-data.js b/scripts/lib/sub-pages-data.js index 61246f932..7523de8dd 100644 --- a/scripts/lib/sub-pages-data.js +++ b/scripts/lib/sub-pages-data.js @@ -13,7 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { pathToFileURL } from 'node:url'; -import { readSourceFiles, parseFrontmatter } from './utils.js'; +import { readSourceFiles, parseFrontmatter, replacePlaceholders } from './utils.js'; import { DETECTION_LAYERS, VISUAL_EXAMPLES, @@ -37,7 +37,6 @@ const EXCLUDED_SKILLS = new Set([ 'arrange', // renamed to layout 'normalize', // merged into /polish 'onboard', // merged into /harden - 'extract', // merged into /impeccable extract ]); /** @@ -48,6 +47,7 @@ const EXCLUDED_SKILLS = new Set([ const SKILL_CATEGORIES = { // CREATE - build something new impeccable: 'create', + craft: 'create', shape: 'create', // EVALUATE - review and assess critique: 'evaluate', @@ -69,9 +69,12 @@ const SKILL_CATEGORIES = { polish: 'harden', optimize: 'harden', harden: 'harden', + // SYSTEM - setup and tooling + teach: 'system', + extract: 'system', }; -export const CATEGORY_ORDER = ['create', 'evaluate', 'refine', 'simplify', 'harden']; +export const CATEGORY_ORDER = ['create', 'evaluate', 'refine', 'simplify', 'harden', 'system']; export const CATEGORY_LABELS = { create: 'Create', @@ -91,6 +94,43 @@ export const CATEGORY_DESCRIPTIONS = { system: 'Setup and tooling. Design system work, extraction, organization.', }; +/** + * How commands relate to each other. Mirrors public/js/data.js so the server + * can render the docs overview without loading the client bundle. + * + * - leadsTo: commands that typically follow this one (used for evaluators) + * - pairs: the inverse counterpart (bolder <-> quieter) + * - combinesWith: commands that work well alongside this one + */ +export const COMMAND_RELATIONSHIPS = { + // Create + craft: { combinesWith: ['shape'] }, + shape: { combinesWith: ['craft'] }, + // Evaluate (these are the "diagnostics" that lead to fixes) + audit: { leadsTo: ['harden', 'optimize', 'adapt', 'clarify'] }, + critique: { leadsTo: ['polish', 'distill', 'bolder', 'quieter', 'typeset', 'layout'] }, + // Refine + typeset: { combinesWith: ['bolder', 'polish'] }, + layout: { combinesWith: ['distill', 'adapt'] }, + colorize: { combinesWith: ['bolder', 'delight'] }, + animate: { combinesWith: ['delight'] }, + delight: { combinesWith: ['bolder', 'animate'] }, + bolder: { pairs: 'quieter' }, + quieter: { pairs: 'bolder' }, + overdrive: { combinesWith: ['animate', 'delight'] }, + // Simplify + distill: { combinesWith: ['quieter', 'polish'] }, + clarify: { combinesWith: ['polish', 'adapt'] }, + adapt: { combinesWith: ['polish', 'clarify'] }, + // Harden + polish: {}, + optimize: {}, + harden: { combinesWith: ['optimize'] }, + // System + teach: {}, + extract: {}, +}; + /** * Parse the ANTIPATTERNS array out of src/detect-antipatterns.mjs. * Mirrors the trick in scripts/build.js validateAntipatternRules() so we @@ -168,28 +208,76 @@ export async function buildSubPageData(rootDir) { const contentDir = path.join(rootDir, 'content/site'); const commandDemos = await loadCommandDemos(rootDir); - // Filter to user-invocable, non-deprecated skills. - const skills = rawSkills - .filter((s) => s.userInvocable && !EXCLUDED_SKILLS.has(s.name)) - .map((s) => { - const category = SKILL_CATEGORIES[s.name]; - const editorial = readEditorialWrapper(contentDir, 'skills', s.name); - const demo = commandDemos[s.name] || null; - return { - id: s.name, - name: s.name, - description: s.description, - argumentHint: s.argumentHint, - category, - body: s.body, - references: s.references, - editorial, // may be null - demo, // may be null (e.g. /shape has no demo) - }; - }) - .sort((a, b) => a.name.localeCompare(b.name)); + // After the v3.0 consolidation there's only one source skill (impeccable). + // Its reference/ directory holds one file per command (audit.md, polish.md, ...). + // We synthesize a virtual skill entry for each sub-command so the sub-page + // generators can keep rendering per-command pages, index cards, etc. + const impeccableSkill = rawSkills.find((s) => s.name === 'impeccable'); + const metadataPath = path.join(rootDir, 'source/skills/impeccable/scripts/command-metadata.json'); + let commandMetadata = {}; + if (fs.existsSync(metadataPath)) { + commandMetadata = JSON.parse(fs.readFileSync(metadataPath, 'utf-8')); + } - // Validate the category map covers every user-invocable skill. + // Reference files and skill bodies use {{command_prefix}} placeholders that + // are normally replaced by the provider transformer at build time. For web + // rendering, resolve them here using the claude-code provider as the canonical + // form ("/" prefix). The list of all command names includes the root skill + // plus all sub-commands from metadata so cross-references render correctly. + const allCommandNames = ['impeccable', ...Object.keys(commandMetadata)]; + const resolvePlaceholders = (content) => + replacePlaceholders(content, 'claude-code', [], allCommandNames); + + const skills = []; + + // 1. The root impeccable skill itself. + if (impeccableSkill && !EXCLUDED_SKILLS.has(impeccableSkill.name)) { + const editorial = readEditorialWrapper(contentDir, 'skills', 'impeccable'); + const demo = commandDemos['impeccable'] || null; + skills.push({ + id: 'impeccable', + name: 'impeccable', + description: impeccableSkill.description, + argumentHint: impeccableSkill.argumentHint, + category: SKILL_CATEGORIES['impeccable'], + body: resolvePlaceholders(impeccableSkill.body), + references: (impeccableSkill.references || []).map((r) => ({ + ...r, + content: resolvePlaceholders(r.content), + })), + editorial, + demo, + isSubCommand: false, + }); + } + + // 2. One virtual entry per sub-command, body sourced from its reference file. + if (impeccableSkill) { + for (const [cmdId, meta] of Object.entries(commandMetadata)) { + if (EXCLUDED_SKILLS.has(cmdId)) continue; + const refFile = impeccableSkill.references?.find((r) => r.name === cmdId); + if (!refFile) continue; // no reference file = no page + + const editorial = readEditorialWrapper(contentDir, 'skills', cmdId); + const demo = commandDemos[cmdId] || null; + skills.push({ + id: cmdId, + name: cmdId, + description: meta.description, + argumentHint: meta.argumentHint, + category: SKILL_CATEGORIES[cmdId], + body: resolvePlaceholders(refFile.content), + references: [], // sub-commands don't have their own references + editorial, + demo, + isSubCommand: true, + }); + } + } + + skills.sort((a, b) => a.name.localeCompare(b.name)); + + // Validate the category map covers every skill entry. const missing = skills.filter((s) => !s.category).map((s) => s.id); if (missing.length > 0) { throw new Error( diff --git a/scripts/lib/transformers/factory.js b/scripts/lib/transformers/factory.js index 3b33064c7..5e13a4a4d 100644 --- a/scripts/lib/transformers/factory.js +++ b/scripts/lib/transformers/factory.js @@ -123,10 +123,10 @@ export function createTransformer(config) { } } - const userInvocableCount = skills.filter((s) => s.userInvocable).length; + const skillWord = skills.length === 1 ? 'skill' : 'skills'; const refInfo = refCount > 0 ? ` (${refCount} reference files)` : ''; const scriptInfo = scriptCount > 0 ? ` (${scriptCount} script files)` : ''; const prefixInfo = prefix ? ` [${prefix}prefixed]` : ''; - console.log(`✓ ${displayName}${prefixInfo}: ${skills.length} skills (${userInvocableCount} user-invocable)${refInfo}${scriptInfo}`); + console.log(`✓ ${displayName}${prefixInfo}: ${skills.length} ${skillWord}${refInfo}${scriptInfo}`); }; } diff --git a/scripts/lib/transformers/index.js b/scripts/lib/transformers/index.js index 2d7ab7a16..cf3ddc5b1 100644 --- a/scripts/lib/transformers/index.js +++ b/scripts/lib/transformers/index.js @@ -1,6 +1,9 @@ import { createTransformer } from './factory.js'; import { PROVIDERS } from './providers.js'; +// Named exports exist primarily as stable spy targets for the test suite +// (build.test.js uses spyOn(transformers, 'transformCursor') etc.). build.js +// itself uses createTransformer + PROVIDERS directly, not these. export const transformCursor = createTransformer(PROVIDERS.cursor); export const transformClaudeCode = createTransformer(PROVIDERS['claude-code']); export const transformGemini = createTransformer(PROVIDERS.gemini); diff --git a/scripts/lib/transformers/shared.js b/scripts/lib/transformers/shared.js deleted file mode 100644 index 6cea40521..000000000 --- a/scripts/lib/transformers/shared.js +++ /dev/null @@ -1,81 +0,0 @@ -import path from 'path'; -import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders, prefixSkillReferences } from '../utils.js'; - -/** - * Shared transformer logic for all providers. - * - * @param {Object} config - Provider-specific configuration - * @param {string} config.provider - Provider key for placeholders (e.g., 'claude-code') - * @param {string} config.displayName - Display name for logging (e.g., 'Claude Code') - * @param {string} config.configDir - Dot-directory name (e.g., '.claude') - * @param {Function} config.buildFrontmatter - (skill, skillName) => frontmatter object - * @param {Function} [config.transformBody] - Optional (body, skill) => transformed body - * @param {Array} skills - All skills - * @param {string} distDir - Distribution output directory - * @param {Object} options - Optional settings (prefix, outputSuffix) - */ -export function transformProvider(config, skills, distDir, options = {}) { - const { provider, displayName, configDir, buildFrontmatter, transformBody } = config; - const { prefix = '', outputSuffix = '' } = options; - const providerDir = path.join(distDir, `${provider}${outputSuffix}`); - const skillsDir = path.join(providerDir, `${configDir}/skills`); - - cleanDir(providerDir); - ensureDir(skillsDir); - - const allSkillNames = skills.map(s => s.name); - const commandNames = skills.filter(s => s.userInvokable).map(s => `${prefix}${s.name}`); - let refCount = 0; - let scriptCount = 0; - - for (const skill of skills) { - const skillName = `${prefix}${skill.name}`; - const skillDir = path.join(skillsDir, skillName); - - const frontmatterObj = buildFrontmatter(skill, skillName); - const frontmatter = generateYamlFrontmatter(frontmatterObj); - - let skillBody = replacePlaceholders(skill.body, provider, commandNames); - - // Replace {{scripts_path}} with provider-aware path to skill's scripts directory - const scriptsPath = provider === 'claude-code' - ? '${CLAUDE_PLUGIN_ROOT}/scripts' - : `${configDir}/skills/${skillName}/scripts`; - skillBody = skillBody.replace(/\{\{scripts_path\}\}/g, scriptsPath); - - if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames); - if (transformBody) skillBody = transformBody(skillBody, skill); - - const content = `${frontmatter}\n\n${skillBody}`; - writeFile(path.join(skillDir, 'SKILL.md'), content); - - // Copy reference files if they exist - if (skill.references && skill.references.length > 0) { - const refDir = path.join(skillDir, 'reference'); - ensureDir(refDir); - for (const ref of skill.references) { - writeFile( - path.join(refDir, `${ref.name}.md`), - replacePlaceholders(ref.content, provider) - ); - refCount++; - } - } - - // Copy script files if they exist - if (skill.scripts && skill.scripts.length > 0) { - const scriptsOutDir = path.join(skillDir, 'scripts'); - ensureDir(scriptsOutDir); - for (const script of skill.scripts) { - writeFile(path.join(scriptsOutDir, script.name), script.content); - scriptCount++; - } - } - } - - const userInvokableCount = skills.filter(s => s.userInvokable).length; - const refInfo = refCount > 0 ? ` (${refCount} reference files)` : ''; - const scriptInfo = scriptCount > 0 ? ` (${scriptCount} script files)` : ''; - const prefixInfo = prefix ? ` [${prefix}prefixed]` : ''; - console.log(`✓ ${displayName}${prefixInfo}: ${skills.length} skills (${userInvokableCount} user-invokable)${refInfo}${scriptInfo}`); -} diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 3f672e826..9ed835a30 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -426,13 +426,33 @@ const EXCLUDED_FROM_SUGGESTIONS = new Set([ 'frontend-design', 'i-frontend-design', // deprecated shim ]); +// Sub-commands of /impeccable that should appear in {{available_commands}}. +// These are the commands that audit/critique/etc. reference when suggesting next steps. +const IMPECCABLE_SUB_COMMANDS = [ + 'adapt', 'animate', 'audit', 'bolder', 'clarify', 'colorize', + 'critique', 'delight', 'distill', 'harden', 'layout', 'optimize', + 'overdrive', 'polish', 'quieter', 'shape', 'typeset', +]; + export function replacePlaceholders(content, provider, commandNames = [], allSkillNames = []) { const placeholders = PROVIDER_PLACEHOLDERS[provider] || PROVIDER_PLACEHOLDERS['cursor']; const cmdPrefix = placeholders.command_prefix || '/'; - const commandList = commandNames - .filter(n => !EXCLUDED_FROM_SUGGESTIONS.has(n)) - .map(n => `${cmdPrefix}${n}`) - .join(', '); + + // Build the available_commands list. + // After the v3.0 consolidation, commands are sub-commands of /impeccable. + // If there's only one user-invocable skill (impeccable), generate sub-command references. + // Otherwise fall back to listing skill names (backwards compat for forks). + const nonExcluded = commandNames.filter(n => !EXCLUDED_FROM_SUGGESTIONS.has(n)); + let commandList; + if (nonExcluded.length === 0) { + // Single-skill architecture: list sub-commands as /impeccable + commandList = IMPECCABLE_SUB_COMMANDS + .map(n => `${cmdPrefix}impeccable ${n}`) + .join(', '); + } else { + // Multi-skill architecture (backwards compat) + commandList = nonExcluded.map(n => `${cmdPrefix}${n}`).join(', '); + } let result = content .replace(/\{\{model\}\}/g, placeholders.model) diff --git a/server/index.js b/server/index.js index c9acdcdbb..0e0327167 100644 --- a/server/index.js +++ b/server/index.js @@ -2,8 +2,6 @@ import { serve, file } from "bun"; import path from "node:path"; import { fileURLToPath } from "node:url"; import homepage from "../public/index.html"; -import cheatsheet from "../public/cheatsheet.html"; -import gallery from "../public/gallery.html"; import privacy from "../public/privacy.html"; import { getSkills, @@ -42,15 +40,19 @@ const server = serve({ routes: { "/": homepage, - "/cheatsheet": cheatsheet, - "/gallery": gallery, "/privacy": privacy, + // Legacy URL redirects (kept stable for external links and existing users). + "/cheatsheet": Response.redirect("/docs", 301), + "/gallery": Response.redirect("/visual-mode#try-it-live", 301), + "/skills": Response.redirect("/docs", 301), + "/skills/:id": (req) => Response.redirect(`/docs/${req.params.id}`, 301), + // Generated sub-pages — served directly from the pre-generated files - "/skills": () => serveGenerated(path.join(ROOT_DIR, "public/skills/index.html")), - "/skills/:id": (req) => { + "/docs": () => serveGenerated(path.join(ROOT_DIR, "public/docs/index.html")), + "/docs/:id": (req) => { const id = req.params.id.replace(/[^a-z0-9-]/gi, ""); - return serveGenerated(path.join(ROOT_DIR, `public/skills/${id}.html`)); + return serveGenerated(path.join(ROOT_DIR, `public/docs/${id}.html`)); }, "/anti-patterns": () => serveGenerated(path.join(ROOT_DIR, "public/anti-patterns/index.html")), "/visual-mode": () => serveGenerated(path.join(ROOT_DIR, "public/visual-mode/index.html")), diff --git a/server/lib/api-handlers.js b/server/lib/api-handlers.js index c27ab428d..1714c25a1 100644 --- a/server/lib/api-handlers.js +++ b/server/lib/api-handlers.js @@ -47,10 +47,68 @@ export async function getSkills() { return skills; } -// Read commands (user-invocable skills) +// Read a short tagline for a command from its editorial file +// (content/site/skills/.md). Returns null if the file or tagline is +// missing. Taglines are used by UI surfaces that need a human-friendly +// one-liner; `description` stays optimized for auto-trigger matching. +async function readCommandTagline(id) { + const editorialPath = join(PROJECT_ROOT, "content/site/skills", `${id}.md`); + if (!existsSync(editorialPath)) return null; + try { + const raw = await readFileContent(editorialPath); + const match = raw.match(/^---\n([\s\S]*?)\n---/); + if (!match) return null; + const taglineMatch = match[1].match(/tagline:\s*"([^"]+)"/); + return taglineMatch ? taglineMatch[1] : null; + } catch { + return null; + } +} + +// Read commands. After the v3.0 consolidation, commands are sub-commands of +// /impeccable. Read them from command-metadata.json and include the root +// impeccable skill itself so UI surfaces (cheatsheet, magazine spread) can +// list them. export async function getCommands() { const allSkills = await getSkills(); - return allSkills.filter(s => s.userInvocable); + const metadataPath = join(PROJECT_ROOT, "source/skills/impeccable/scripts/command-metadata.json"); + + const commands = []; + const impeccable = allSkills.find(s => s.name === "impeccable"); + if (impeccable) { + commands.push({ + id: "impeccable", + name: "impeccable", + description: impeccable.description, + tagline: await readCommandTagline("impeccable"), + userInvocable: true, + }); + } + + if (existsSync(metadataPath)) { + try { + const raw = await readFileContent(metadataPath); + const metadata = JSON.parse(raw); + for (const [id, meta] of Object.entries(metadata)) { + commands.push({ + id, + name: id, + description: meta.description, + tagline: await readCommandTagline(id), + userInvocable: true, + }); + } + } catch (error) { + console.error("Error reading command metadata:", error); + } + } + + // Fallback: return just user-invocable skills if no metadata + if (commands.length === 0) { + return allSkills.filter(s => s.userInvocable); + } + + return commands; } // Get command/skill source content diff --git a/skills-lock.json b/skills-lock.json index 9eef3ff1e..f5f7b0666 100644 --- a/skills-lock.json +++ b/skills-lock.json @@ -11,11 +11,6 @@ "sourceType": "github", "computedHash": "b00cb71343fa7e987489ad330e3dd3e504ff893b9ddd2b30cacea93691b78e46" }, - "arrange": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "698fb952e9ef0d2551a5c3421ef61e084934420e0d8371a02efb4f76f21049e8" - }, "audit": { "source": "pbakaus/impeccable", "sourceType": "github", @@ -51,31 +46,11 @@ "sourceType": "github", "computedHash": "ce6fbd844488a326208c1302c73b2865fa4fb20e447b6a06c038315444d6e0c5" }, - "extract": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "1bbe30b5be73a86971f6bccb37daae84aaafceaa6d23429d6a3a0442378ac4ec" - }, - "frontend-design": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "9ebe6c652743fcde8d2ae773f34b6f548dcc8b2e75a3a30936adcd8b95dd2d16" - }, "harden": { "source": "pbakaus/impeccable", "sourceType": "github", "computedHash": "f8ce420b3c78b90707704122264da76514c793ac0e12fb9540ace68d257c231c" }, - "normalize": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "281b7f9e590e252a6aec3f5f83c5ca548c91e8bccb3fd6eee4cc7d5be0becb4d" - }, - "onboard": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "1cbedf70f906150b1b8bb70b61393eaf67e2e1311e1b5e43bde3e47411bcaa2b" - }, "optimize": { "source": "pbakaus/impeccable", "sourceType": "github", @@ -96,11 +71,6 @@ "sourceType": "github", "computedHash": "6066e73875e4770e624641355cc04662ce75d2b1d1a3673e24dcbd0ec8936297" }, - "teach-impeccable": { - "source": "pbakaus/impeccable", - "sourceType": "github", - "computedHash": "b3b5541bb9b0a260af793c7d79c2db4a436c2cd9384be34a4024c7f28af72e62" - }, "typeset": { "source": "pbakaus/impeccable", "sourceType": "github", diff --git a/source/skills/adapt/SKILL.md b/source/skills/adapt/SKILL.md deleted file mode 100644 index 1f1a0d1a9..000000000 --- a/source/skills/adapt/SKILL.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -name: adapt -description: "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility." -argument-hint: "[target] [context (mobile, tablet, print...)]" -user-invocable: true ---- - -Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: target platforms/devices and usage contexts. - ---- - -## Assess Adaptation Challenge - -Understand what needs adaptation and why: - -1. **Identify the source context**: - - What was it designed for originally? (Desktop web? Mobile app?) - - What assumptions were made? (Large screen? Mouse input? Fast connection?) - - What works well in current context? - -2. **Understand target context**: - - **Device**: Mobile, tablet, desktop, TV, watch, print? - - **Input method**: Touch, mouse, keyboard, voice, gamepad? - - **Screen constraints**: Size, resolution, orientation? - - **Connection**: Fast wifi, slow 3G, offline? - - **Usage context**: On-the-go vs desk, quick glance vs focused reading? - - **User expectations**: What do users expect on this platform? - -3. **Identify adaptation challenges**: - - What won't fit? (Content, navigation, features) - - What won't work? (Hover states on touch, tiny touch targets) - - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) - -**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. - -## Plan Adaptation Strategy - -Create context-appropriate strategy: - -### Mobile Adaptation (Desktop → Mobile) - -**Layout Strategy**: -- Single column instead of multi-column -- Vertical stacking instead of side-by-side -- Full-width components instead of fixed widths -- Bottom navigation instead of top/side navigation - -**Interaction Strategy**: -- Touch targets 44x44px minimum (not hover-dependent) -- Swipe gestures where appropriate (lists, carousels) -- Bottom sheets instead of dropdowns -- Thumbs-first design (controls within thumb reach) -- Larger tap areas with more spacing - -**Content Strategy**: -- Progressive disclosure (don't show everything at once) -- Prioritize primary content (secondary content in tabs/accordions) -- Shorter text (more concise) -- Larger text (16px minimum) - -**Navigation Strategy**: -- Hamburger menu or bottom navigation -- Reduce navigation complexity -- Sticky headers for context -- Back button in navigation flow - -### Tablet Adaptation (Hybrid Approach) - -**Layout Strategy**: -- Two-column layouts (not single or three-column) -- Side panels for secondary content -- Master-detail views (list + detail) -- Adaptive based on orientation (portrait vs landscape) - -**Interaction Strategy**: -- Support both touch and pointer -- Touch targets 44x44px but allow denser layouts than phone -- Side navigation drawers -- Multi-column forms where appropriate - -### Desktop Adaptation (Mobile → Desktop) - -**Layout Strategy**: -- Multi-column layouts (use horizontal space) -- Side navigation always visible -- Multiple information panels simultaneously -- Fixed widths with max-width constraints (don't stretch to 4K) - -**Interaction Strategy**: -- Hover states for additional information -- Keyboard shortcuts -- Right-click context menus -- Drag and drop where helpful -- Multi-select with Shift/Cmd - -**Content Strategy**: -- Show more information upfront (less progressive disclosure) -- Data tables with many columns -- Richer visualizations -- More detailed descriptions - -### Print Adaptation (Screen → Print) - -**Layout Strategy**: -- Page breaks at logical points -- Remove navigation, footer, interactive elements -- Black and white (or limited color) -- Proper margins for binding - -**Content Strategy**: -- Expand shortened content (show full URLs, hidden sections) -- Add page numbers, headers, footers -- Include metadata (print date, page title) -- Convert charts to print-friendly versions - -### Email Adaptation (Web → Email) - -**Layout Strategy**: -- Narrow width (600px max) -- Single column only -- Inline CSS (no external stylesheets) -- Table-based layouts (for email client compatibility) - -**Interaction Strategy**: -- Large, obvious CTAs (buttons not text links) -- No hover states (not reliable) -- Deep links to web app for complex interactions - -## Implement Adaptations - -Apply changes systematically: - -### Responsive Breakpoints - -Choose appropriate breakpoints: -- Mobile: 320px-767px -- Tablet: 768px-1023px -- Desktop: 1024px+ -- Or content-driven breakpoints (where design breaks) - -### Layout Adaptation Techniques - -- **CSS Grid/Flexbox**: Reflow layouts automatically -- **Container Queries**: Adapt based on container, not viewport -- **`clamp()`**: Fluid sizing between min and max -- **Media queries**: Different styles for different contexts -- **Display properties**: Show/hide elements per context - -### Touch Adaptation - -- Increase touch target sizes (44x44px minimum) -- Add more spacing between interactive elements -- Remove hover-dependent interactions -- Add touch feedback (ripples, highlights) -- Consider thumb zones (easier to reach bottom than top) - -### Content Adaptation - -- Use `display: none` sparingly (still downloads) -- Progressive enhancement (core content first, enhancements on larger screens) -- Lazy loading for off-screen content -- Responsive images (`srcset`, `picture` element) - -### Navigation Adaptation - -- Transform complex nav to hamburger/drawer on mobile -- Bottom nav bar for mobile apps -- Persistent side navigation on desktop -- Breadcrumbs on smaller screens for context - -**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. - -**NEVER**: -- Hide core functionality on mobile (if it matters, make it work) -- Assume desktop = powerful device (consider accessibility, older machines) -- Use different information architecture across contexts (confusing) -- Break user expectations for platform (mobile users expect mobile patterns) -- Forget landscape orientation on mobile/tablet -- Use generic breakpoints blindly (use content-driven breakpoints) -- Ignore touch on desktop (many desktop devices have touch) - -## Verify Adaptations - -Test thoroughly across contexts: - -- **Real devices**: Test on actual phones, tablets, desktops -- **Different orientations**: Portrait and landscape -- **Different browsers**: Safari, Chrome, Firefox, Edge -- **Different OS**: iOS, Android, Windows, macOS -- **Different input methods**: Touch, mouse, keyboard -- **Edge cases**: Very small screens (320px), very large screens (4K) -- **Slow connections**: Test on throttled network - -Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. - diff --git a/source/skills/clarify/SKILL.md b/source/skills/clarify/SKILL.md deleted file mode 100644 index 514a6a143..000000000 --- a/source/skills/clarify/SKILL.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -name: clarify -description: "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing." -argument-hint: "[target]" -user-invocable: true ---- - -Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: audience technical level and users' mental state in context. - ---- - -## Assess Current Copy - -Identify what makes the text unclear or ineffective: - -1. **Find clarity problems**: - - **Jargon**: Technical terms users won't understand - - **Ambiguity**: Multiple interpretations possible - - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" - - **Length**: Too wordy or too terse - - **Assumptions**: Assuming user knowledge they don't have - - **Missing context**: Users don't know what to do or why - - **Tone mismatch**: Too formal, too casual, or inappropriate for situation - -2. **Understand the context**: - - Who's the audience? (Technical? General? First-time users?) - - What's the user's mental state? (Stressed during error? Confident during success?) - - What's the action? (What do we want users to do?) - - What's the constraint? (Character limits? Space limitations?) - -**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. - -## Plan Copy Improvements - -Create a strategy for clearer communication: - -- **Primary message**: What's the ONE thing users need to know? -- **Action needed**: What should users do next (if anything)? -- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) -- **Constraints**: Length limits, brand voice, localization considerations - -**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. - -## Improve Copy Systematically - -Refine text across these common areas: - -### Error Messages -**Bad**: "Error 403: Forbidden" -**Good**: "You don't have permission to view this page. Contact your admin for access." - -**Bad**: "Invalid input" -**Good**: "Email addresses need an @ symbol. Try: name@example.com" - -**Principles**: -- Explain what went wrong in plain language -- Suggest how to fix it -- Don't blame the user -- Include examples when helpful -- Link to help/support if applicable - -### Form Labels & Instructions -**Bad**: "DOB (MM/DD/YYYY)" -**Good**: "Date of birth" (with placeholder showing format) - -**Bad**: "Enter value here" -**Good**: "Your email address" or "Company name" - -**Principles**: -- Use clear, specific labels (not generic placeholders) -- Show format expectations with examples -- Explain why you're asking (when not obvious) -- Put instructions before the field, not after -- Keep required field indicators clear - -### Button & CTA Text -**Bad**: "Click here" | "Submit" | "OK" -**Good**: "Create account" | "Save changes" | "Got it, thanks" - -**Principles**: -- Describe the action specifically -- Use active voice (verb + noun) -- Match user's mental model -- Be specific ("Save" is better than "OK") - -### Help Text & Tooltips -**Bad**: "This is the username field" -**Good**: "Choose a username. You can change this later in Settings." - -**Principles**: -- Add value (don't just repeat the label) -- Answer the implicit question ("What is this?" or "Why do you need this?") -- Keep it brief but complete -- Link to detailed docs if needed - -### Empty States -**Bad**: "No items" -**Good**: "No projects yet. Create your first project to get started." - -**Principles**: -- Explain why it's empty (if not obvious) -- Show next action clearly -- Make it welcoming, not dead-end - -### Success Messages -**Bad**: "Success" -**Good**: "Settings saved! Your changes will take effect immediately." - -**Principles**: -- Confirm what happened -- Explain what happens next (if relevant) -- Be brief but complete -- Match the user's emotional moment (celebrate big wins) - -### Loading States -**Bad**: "Loading..." (for 30+ seconds) -**Good**: "Analyzing your data... this usually takes 30-60 seconds" - -**Principles**: -- Set expectations (how long?) -- Explain what's happening (when it's not obvious) -- Show progress when possible -- Offer escape hatch if appropriate ("Cancel") - -### Confirmation Dialogs -**Bad**: "Are you sure?" -**Good**: "Delete 'Project Alpha'? This can't be undone." - -**Principles**: -- State the specific action -- Explain consequences (especially for destructive actions) -- Use clear button labels ("Delete project" not "Yes") -- Don't overuse confirmations (only for risky actions) - -### Navigation & Wayfinding -**Bad**: Generic labels like "Items" | "Things" | "Stuff" -**Good**: Specific labels like "Your projects" | "Team members" | "Settings" - -**Principles**: -- Be specific and descriptive -- Use language users understand (not internal jargon) -- Make hierarchy clear -- Consider information scent (breadcrumbs, current location) - -## Apply Clarity Principles - -Every piece of copy should follow these rules: - -1. **Be specific**: "Enter email" not "Enter value" -2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) -3. **Be active**: "Save changes" not "Changes will be saved" -4. **Be human**: "Oops, something went wrong" not "System error encountered" -5. **Be helpful**: Tell users what to do, not just what happened -6. **Be consistent**: Use same terms throughout (don't vary for variety) - -**NEVER**: -- Use jargon without explanation -- Blame users ("You made an error" → "This field is required") -- Be vague ("Something went wrong" without explanation) -- Use passive voice unnecessarily -- Write overly long explanations (be concise) -- Use humor for errors (be empathetic instead) -- Assume technical knowledge -- Vary terminology (pick one term and stick with it) -- Repeat information (headers restating intros, redundant explanations) -- Use placeholders as the only labels (they disappear when users type) - -## Verify Improvements - -Test that copy improvements work: - -- **Comprehension**: Can users understand without context? -- **Actionability**: Do users know what to do next? -- **Brevity**: Is it as short as possible while remaining clear? -- **Consistency**: Does it match terminology elsewhere? -- **Tone**: Is it appropriate for the situation? - -Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. - diff --git a/source/skills/harden/SKILL.md b/source/skills/harden/SKILL.md deleted file mode 100644 index 5aafb5f4e..000000000 --- a/source/skills/harden/SKILL.md +++ /dev/null @@ -1,389 +0,0 @@ ---- -name: harden -description: "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues." -argument-hint: "[target]" -user-invocable: true ---- - -Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. - -## Assess Hardening Needs - -Identify weaknesses and edge cases: - -1. **Test with extreme inputs**: - - Very long text (names, descriptions, titles) - - Very short text (empty, single character) - - Special characters (emoji, RTL text, accents) - - Large numbers (millions, billions) - - Many items (1000+ list items, 50+ options) - - No data (empty states) - -2. **Test error scenarios**: - - Network failures (offline, slow, timeout) - - API errors (400, 401, 403, 404, 500) - - Validation errors - - Permission errors - - Rate limiting - - Concurrent operations - -3. **Test internationalization**: - - Long translations (German is often 30% longer than English) - - RTL languages (Arabic, Hebrew) - - Character sets (Chinese, Japanese, Korean, emoji) - - Date/time formats - - Number formats (1,000 vs 1.000) - - Currency symbols - -**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. - -## Hardening Dimensions - -Systematically improve resilience: - -### Text Overflow & Wrapping - -**Long text handling**: -```css -/* Single line with ellipsis */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* Multi-line with clamp */ -.line-clamp { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Allow wrapping */ -.wrap { - word-wrap: break-word; - overflow-wrap: break-word; - hyphens: auto; -} -``` - -**Flex/Grid overflow**: -```css -/* Prevent flex items from overflowing */ -.flex-item { - min-width: 0; /* Allow shrinking below content size */ - overflow: hidden; -} - -/* Prevent grid items from overflowing */ -.grid-item { - min-width: 0; - min-height: 0; -} -``` - -**Responsive text sizing**: -- Use `clamp()` for fluid typography -- Set minimum readable sizes (14px on mobile) -- Test text scaling (zoom to 200%) -- Ensure containers expand with text - -### Internationalization (i18n) - -**Text expansion**: -- Add 30-40% space budget for translations -- Use flexbox/grid that adapts to content -- Test with longest language (usually German) -- Avoid fixed widths on text containers - -```jsx -// ❌ Bad: Assumes short English text - - -// ✅ Good: Adapts to content - -``` - -**RTL (Right-to-Left) support**: -```css -/* Use logical properties */ -margin-inline-start: 1rem; /* Not margin-left */ -padding-inline: 1rem; /* Not padding-left/right */ -border-inline-end: 1px solid; /* Not border-right */ - -/* Or use dir attribute */ -[dir="rtl"] .arrow { transform: scaleX(-1); } -``` - -**Character set support**: -- Use UTF-8 encoding everywhere -- Test with Chinese/Japanese/Korean (CJK) characters -- Test with emoji (they can be 2-4 bytes) -- Handle different scripts (Latin, Cyrillic, Arabic, etc.) - -**Date/Time formatting**: -```javascript -// ✅ Use Intl API for proper formatting -new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 -new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 - -new Intl.NumberFormat('en-US', { - style: 'currency', - currency: 'USD' -}).format(1234.56); // $1,234.56 -``` - -**Pluralization**: -```javascript -// ❌ Bad: Assumes English pluralization -`${count} item${count !== 1 ? 's' : ''}` - -// ✅ Good: Use proper i18n library -t('items', { count }) // Handles complex plural rules -``` - -### Error Handling - -**Network errors**: -- Show clear error messages -- Provide retry button -- Explain what happened -- Offer offline mode (if applicable) -- Handle timeout scenarios - -```jsx -// Error states with recovery -{error && ( - -

      Failed to load data. {error.message}

      - -
      -)} -``` - -**Form validation errors**: -- Inline errors near fields -- Clear, specific messages -- Suggest corrections -- Don't block submission unnecessarily -- Preserve user input on error - -**API errors**: -- Handle each status code appropriately - - 400: Show validation errors - - 401: Redirect to login - - 403: Show permission error - - 404: Show not found state - - 429: Show rate limit message - - 500: Show generic error, offer support - -**Graceful degradation**: -- Core functionality works without JavaScript -- Images have alt text -- Progressive enhancement -- Fallbacks for unsupported features - -### Edge Cases & Boundary Conditions - -**Empty states**: -- No items in list -- No search results -- No notifications -- No data to display -- Provide clear next action - -**Loading states**: -- Initial load -- Pagination load -- Refresh -- Show what's loading ("Loading your projects...") -- Time estimates for long operations - -**Large datasets**: -- Pagination or virtual scrolling -- Search/filter capabilities -- Performance optimization -- Don't load all 10,000 items at once - -**Concurrent operations**: -- Prevent double-submission (disable button while loading) -- Handle race conditions -- Optimistic updates with rollback -- Conflict resolution - -**Permission states**: -- No permission to view -- No permission to edit -- Read-only mode -- Clear explanation of why - -**Browser compatibility**: -- Polyfills for modern features -- Fallbacks for unsupported CSS -- Feature detection (not browser detection) -- Test in target browsers - -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - -### Input Validation & Sanitization - -**Client-side validation**: -- Required fields -- Format validation (email, phone, URL) -- Length limits -- Pattern matching -- Custom validation rules - -**Server-side validation** (always): -- Never trust client-side only -- Validate and sanitize all inputs -- Protect against injection attacks -- Rate limiting - -**Constraint handling**: -```html - - - - Letters and numbers only, up to 100 characters - -``` - -### Accessibility Resilience - -**Keyboard navigation**: -- All functionality accessible via keyboard -- Logical tab order -- Focus management in modals -- Skip links for long content - -**Screen reader support**: -- Proper ARIA labels -- Announce dynamic changes (live regions) -- Descriptive alt text -- Semantic HTML - -**Motion sensitivity**: -```css -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } -} -``` - -**High contrast mode**: -- Test in Windows high contrast mode -- Don't rely only on color -- Provide alternative visual cues - -### Performance Resilience - -**Slow connections**: -- Progressive image loading -- Skeleton screens -- Optimistic UI updates -- Offline support (service workers) - -**Memory leaks**: -- Clean up event listeners -- Cancel subscriptions -- Clear timers/intervals -- Abort pending requests on unmount - -**Throttling & Debouncing**: -```javascript -// Debounce search input -const debouncedSearch = debounce(handleSearch, 300); - -// Throttle scroll handler -const throttledScroll = throttle(handleScroll, 100); -``` - -## Testing Strategies - -**Manual testing**: -- Test with extreme data (very long, very short, empty) -- Test in different languages -- Test offline -- Test slow connection (throttle to 3G) -- Test with screen reader -- Test keyboard-only navigation -- Test on old browsers - -**Automated testing**: -- Unit tests for edge cases -- Integration tests for error scenarios -- E2E tests for critical paths -- Visual regression tests -- Accessibility tests (axe, WAVE) - -**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. - -**NEVER**: -- Assume perfect input (validate everything) -- Ignore internationalization (design for global) -- Leave error messages generic ("Error occurred") -- Forget offline scenarios -- Trust client-side validation alone -- Use fixed widths for text -- Assume English-length text -- Block entire interface when one component errors - -## Verify Hardening - -Test thoroughly with edge cases: - -- **Long text**: Try names with 100+ characters -- **Emoji**: Use emoji in all text fields -- **RTL**: Test with Arabic or Hebrew -- **CJK**: Test with Chinese/Japanese/Korean -- **Network issues**: Disable internet, throttle connection -- **Large datasets**: Test with 1000+ items -- **Concurrent actions**: Click submit 10 times rapidly -- **Errors**: Force API errors, test all error states -- **Empty**: Remove all data, test empty states - -Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. - diff --git a/source/skills/impeccable/SKILL.md b/source/skills/impeccable/SKILL.md index 62595c806..2bd1bad97 100644 --- a/source/skills/impeccable/SKILL.md +++ b/source/skills/impeccable/SKILL.md @@ -1,15 +1,19 @@ --- name: impeccable -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. Call with 'craft' for shape-then-build, 'teach' for design context setup, or 'extract' to pull reusable components and tokens into the design system." -argument-hint: "[craft|teach|extract]" +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +argument-hint: "[command] [target]" user-invocable: true +allowed-tools: + - Bash(npx impeccable *) license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- +This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. + BEFORE doing any design work, run this one-time maintenance step. Tell the user: -> **Impeccable was updated.** A few skills were renamed or merged in this version (e.g. `/arrange` is now `/layout`, `/normalize` was folded into `/polish`). I'll clean up the old skill files so they don't clutter your project. This only runs once after an update. +> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. Then run: @@ -22,8 +26,6 @@ If the script removed files, briefly confirm what was cleaned up. If it found no After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. -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. @@ -33,7 +35,7 @@ Design skills produce generic output without project context. You MUST have conf - **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. +Individual sub-commands may require additional context. Check the commands' 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. @@ -269,7 +271,7 @@ Make interactions feel fast. Use optimistic UI: update immediately, sync later. 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. +Review the DON'T guidelines above. They are the fingerprints of AI-generated work. --- @@ -283,82 +285,96 @@ Remember: {{model}} is capable of extraordinary creative work. Don't hold back. --- -## Craft Mode +## Command Router -If this skill is invoked with the argument "craft" (e.g., `{{command_prefix}}impeccable craft [feature description]`), follow the [craft flow](reference/craft.md). Pass any additional arguments as the feature description. +This skill supports sub-commands. Parse the first word of the argument string to determine routing. + +### Routing rules + +1. **No argument at all** (user typed just `{{command_prefix}}impeccable`): Display the command menu below, then ask the user what they'd like to do. +2. **First word matches a sub-command**: Route to that command's reference file. Everything after the sub-command name is the target. +3. **First word does NOT match any sub-command**: This is a general design invocation. Follow the Design Direction and Implementation Principles above, using the full argument string as context. + +### Command menu (display when invoked with no argument) + +> **Available commands:** +> +> **Build & Plan** +> `{{command_prefix}}impeccable craft [feature]` - Shape, then build a feature end-to-end +> `{{command_prefix}}impeccable shape [feature]` - Plan UX/UI before writing code +> `{{command_prefix}}impeccable teach` - Set up design context for this project (one-time) +> `{{command_prefix}}impeccable extract [target]` - Pull reusable tokens and components into design system +> +> **Evaluate** +> `{{command_prefix}}impeccable critique [target]` - UX design review with heuristic scoring +> `{{command_prefix}}impeccable audit [target]` - Technical quality checks (a11y, perf, responsive) +> +> **Refine** +> `{{command_prefix}}impeccable polish [target]` - Final quality pass before shipping +> `{{command_prefix}}impeccable bolder [target]` - Amplify safe/bland designs +> `{{command_prefix}}impeccable quieter [target]` - Tone down aggressive/overstimulating designs +> `{{command_prefix}}impeccable distill [target]` - Strip to essence, remove complexity +> `{{command_prefix}}impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> +> **Enhance** +> `{{command_prefix}}impeccable animate [target]` - Add purposeful animations and motion +> `{{command_prefix}}impeccable colorize [target]` - Add strategic color to monochromatic UIs +> `{{command_prefix}}impeccable typeset [target]` - Improve typography hierarchy and fonts +> `{{command_prefix}}impeccable layout [target]` - Fix spacing, rhythm, and visual hierarchy +> `{{command_prefix}}impeccable delight [target]` - Add personality and memorable touches +> `{{command_prefix}}impeccable overdrive [target]` - Push past conventional limits +> +> **Fix** +> `{{command_prefix}}impeccable clarify [target]` - Improve UX copy, labels, and error messages +> `{{command_prefix}}impeccable adapt [target]` - Adapt for different devices and screen sizes +> `{{command_prefix}}impeccable optimize [target]` - Diagnose and fix UI performance +> +> **Manage** +> `{{command_prefix}}impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates {{command_prefix}}audit) +> `{{command_prefix}}impeccable unpin ` - Remove a pinned shortcut +> +> Or use `{{command_prefix}}impeccable [description]` directly to apply design principles to any task. + +### Sub-command reference table + +When a sub-command is matched, load the linked reference and follow its instructions. The design principles, guidelines, and Context Gathering Protocol from this skill are already loaded. Do NOT re-invoke {{command_prefix}}impeccable. + +| Command | Reference | Summary | +|---------|-----------|---------| +| `craft` | [craft](reference/craft.md) | Full shape-then-build flow with visual iteration | +| `teach` | [teach](reference/teach.md) | One-time setup: gather design context for the project | +| `extract` | [extract](reference/extract.md) | Pull reusable tokens and components into design system | +| `shape` | [shape](reference/shape.md) | Plan UX and UI before writing code (produces a design brief) | +| `critique` | [critique](reference/critique.md) | UX design review with heuristic scoring and persona testing | +| `audit` | [audit](reference/audit.md) | Technical quality checks across a11y, perf, theming, responsive, anti-patterns | +| `polish` | [polish](reference/polish.md) | Final quality pass: alignment, spacing, consistency, micro-details | +| `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | +| `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | +| `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | +| `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | +| `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | +| `layout` | [layout](reference/layout.md) | Improve layout, spacing, and visual rhythm | +| `delight` | [delight](reference/delight.md) | Add personality, joy, and memorable touches | +| `overdrive` | [overdrive](reference/overdrive.md) | Push interfaces past conventional limits | +| `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | +| `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | +| `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | --- -## Teach Mode +## Pin / Unpin -If this skill is invoked with the argument "teach" (e.g., `{{command_prefix}}impeccable teach`), skip all design work above and instead run the teach flow below. This is a one-time setup that gathers design context for the project. +If this skill is invoked with `pin ` or `unpin `: -### Step 1: Explore the Codebase +**pin** creates a lightweight standalone skill so you can invoke the command directly (e.g., `{{command_prefix}}audit` instead of `{{command_prefix}}impeccable audit`). -Before asking questions, thoroughly scan the project to discover what you can: +**unpin** removes a previously pinned shortcut. -- **README and docs**: Project purpose, target audience, any stated goals -- **Package.json / config files**: Tech stack, dependencies, existing design libraries -- **Existing components**: Current design patterns, spacing, typography in use -- **Brand assets**: Logos, favicons, color values already defined -- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales -- **Any style guides or brand documentation** - -Note what you've learned and what remains unclear. - -### Step 2: Ask UX-Focused Questions - -{{ask_instruction}} Focus only on what you couldn't infer from the codebase: - -#### Users & Purpose -- Who uses this? What's their context when using it? -- What job are they trying to get done? -- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) - -#### Brand & Personality -- How would you describe the brand personality in 3 words? -- Any reference sites or apps that capture the right feel? What specifically about them? -- What should this explicitly NOT look like? Any anti-references? - -#### Aesthetic Preferences -- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) -- Light mode, dark mode, or both? -- Any colors that must be used or avoided? - -#### Accessibility & Inclusion -- Specific accessibility requirements? (WCAG level, known user needs) -- Considerations for reduced motion, color blindness, or other accommodations? - -Skip questions where the answer is already clear from the codebase exploration. - -### Step 3: Write Design Context - -Synthesize your findings and the user's answers into a `## Design Context` section: - -```markdown -## Design Context - -### Users -[Who they are, their context, the job to be done] - -### Brand Personality -[Voice, tone, 3-word personality, emotional goals] - -### Aesthetic Direction -[Visual tone, references, anti-references, theme] - -### Design Principles -[3-5 principles derived from the conversation that should guide all design decisions] +Run: +```bash +node {{scripts_path}}/pin.mjs ``` -Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. - -Then {{ask_instruction}} whether they'd also like the Design Context appended to {{config_file}}. If yes, append or update the section there as well. - -Confirm completion and summarize the key design principles that will now guide all future work. - ---- - -## Extract Mode - -If this skill is invoked with the argument "extract" (e.g., `{{command_prefix}}impeccable extract [target]`), follow the [extract flow](reference/extract.md). Pass any additional arguments as the extraction target. +Report what the script did. If it succeeded, confirm the new shortcut is available (for pin) or removed (for unpin). diff --git a/source/skills/impeccable/reference/adapt.md b/source/skills/impeccable/reference/adapt.md new file mode 100644 index 000000000..249653d4c --- /dev/null +++ b/source/skills/impeccable/reference/adapt.md @@ -0,0 +1,190 @@ +> **Additional context needed**: target platforms/devices and usage contexts. + +Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases. + + +--- + +## Assess Adaptation Challenge + +Understand what needs adaptation and why: + +1. **Identify the source context**: + - What was it designed for originally? (Desktop web? Mobile app?) + - What assumptions were made? (Large screen? Mouse input? Fast connection?) + - What works well in current context? + +2. **Understand target context**: + - **Device**: Mobile, tablet, desktop, TV, watch, print? + - **Input method**: Touch, mouse, keyboard, voice, gamepad? + - **Screen constraints**: Size, resolution, orientation? + - **Connection**: Fast wifi, slow 3G, offline? + - **Usage context**: On-the-go vs desk, quick glance vs focused reading? + - **User expectations**: What do users expect on this platform? + +3. **Identify adaptation challenges**: + - What won't fit? (Content, navigation, features) + - What won't work? (Hover states on touch, tiny touch targets) + - What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop) + +**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context. + +## Plan Adaptation Strategy + +Create context-appropriate strategy: + +### Mobile Adaptation (Desktop → Mobile) + +**Layout Strategy**: +- Single column instead of multi-column +- Vertical stacking instead of side-by-side +- Full-width components instead of fixed widths +- Bottom navigation instead of top/side navigation + +**Interaction Strategy**: +- Touch targets 44x44px minimum (not hover-dependent) +- Swipe gestures where appropriate (lists, carousels) +- Bottom sheets instead of dropdowns +- Thumbs-first design (controls within thumb reach) +- Larger tap areas with more spacing + +**Content Strategy**: +- Progressive disclosure (don't show everything at once) +- Prioritize primary content (secondary content in tabs/accordions) +- Shorter text (more concise) +- Larger text (16px minimum) + +**Navigation Strategy**: +- Hamburger menu or bottom navigation +- Reduce navigation complexity +- Sticky headers for context +- Back button in navigation flow + +### Tablet Adaptation (Hybrid Approach) + +**Layout Strategy**: +- Two-column layouts (not single or three-column) +- Side panels for secondary content +- Master-detail views (list + detail) +- Adaptive based on orientation (portrait vs landscape) + +**Interaction Strategy**: +- Support both touch and pointer +- Touch targets 44x44px but allow denser layouts than phone +- Side navigation drawers +- Multi-column forms where appropriate + +### Desktop Adaptation (Mobile → Desktop) + +**Layout Strategy**: +- Multi-column layouts (use horizontal space) +- Side navigation always visible +- Multiple information panels simultaneously +- Fixed widths with max-width constraints (don't stretch to 4K) + +**Interaction Strategy**: +- Hover states for additional information +- Keyboard shortcuts +- Right-click context menus +- Drag and drop where helpful +- Multi-select with Shift/Cmd + +**Content Strategy**: +- Show more information upfront (less progressive disclosure) +- Data tables with many columns +- Richer visualizations +- More detailed descriptions + +### Print Adaptation (Screen → Print) + +**Layout Strategy**: +- Page breaks at logical points +- Remove navigation, footer, interactive elements +- Black and white (or limited color) +- Proper margins for binding + +**Content Strategy**: +- Expand shortened content (show full URLs, hidden sections) +- Add page numbers, headers, footers +- Include metadata (print date, page title) +- Convert charts to print-friendly versions + +### Email Adaptation (Web → Email) + +**Layout Strategy**: +- Narrow width (600px max) +- Single column only +- Inline CSS (no external stylesheets) +- Table-based layouts (for email client compatibility) + +**Interaction Strategy**: +- Large, obvious CTAs (buttons not text links) +- No hover states (not reliable) +- Deep links to web app for complex interactions + +## Implement Adaptations + +Apply changes systematically: + +### Responsive Breakpoints + +Choose appropriate breakpoints: +- Mobile: 320px-767px +- Tablet: 768px-1023px +- Desktop: 1024px+ +- Or content-driven breakpoints (where design breaks) + +### Layout Adaptation Techniques + +- **CSS Grid/Flexbox**: Reflow layouts automatically +- **Container Queries**: Adapt based on container, not viewport +- **`clamp()`**: Fluid sizing between min and max +- **Media queries**: Different styles for different contexts +- **Display properties**: Show/hide elements per context + +### Touch Adaptation + +- Increase touch target sizes (44x44px minimum) +- Add more spacing between interactive elements +- Remove hover-dependent interactions +- Add touch feedback (ripples, highlights) +- Consider thumb zones (easier to reach bottom than top) + +### Content Adaptation + +- Use `display: none` sparingly (still downloads) +- Progressive enhancement (core content first, enhancements on larger screens) +- Lazy loading for off-screen content +- Responsive images (`srcset`, `picture` element) + +### Navigation Adaptation + +- Transform complex nav to hamburger/drawer on mobile +- Bottom nav bar for mobile apps +- Persistent side navigation on desktop +- Breadcrumbs on smaller screens for context + +**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect. + +**NEVER**: +- Hide core functionality on mobile (if it matters, make it work) +- Assume desktop = powerful device (consider accessibility, older machines) +- Use different information architecture across contexts (confusing) +- Break user expectations for platform (mobile users expect mobile patterns) +- Forget landscape orientation on mobile/tablet +- Use generic breakpoints blindly (use content-driven breakpoints) +- Ignore touch on desktop (many desktop devices have touch) + +## Verify Adaptations + +Test thoroughly across contexts: + +- **Real devices**: Test on actual phones, tablets, desktops +- **Different orientations**: Portrait and landscape +- **Different browsers**: Safari, Chrome, Firefox, Edge +- **Different OS**: iOS, Android, Windows, macOS +- **Different input methods**: Touch, mouse, keyboard +- **Edge cases**: Very small screens (320px), very large screens (4K) +- **Slow connections**: Test on throttled network + +Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly. diff --git a/source/skills/animate/SKILL.md b/source/skills/impeccable/reference/animate.md similarity index 91% rename from source/skills/animate/SKILL.md rename to source/skills/impeccable/reference/animate.md index c5be7d04a..688ccc358 100644 --- a/source/skills/animate/SKILL.md +++ b/source/skills/impeccable/reference/animate.md @@ -1,15 +1,7 @@ ---- -name: animate -description: "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive." -argument-hint: "[target]" -user-invocable: true ---- +> **Additional context needed**: performance constraints. Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: performance constraints. --- diff --git a/source/skills/audit/SKILL.md b/source/skills/impeccable/reference/audit.md similarity index 85% rename from source/skills/audit/SKILL.md rename to source/skills/impeccable/reference/audit.md index bb9121888..7c3e2cf68 100644 --- a/source/skills/audit/SKILL.md +++ b/source/skills/impeccable/reference/audit.md @@ -1,16 +1,3 @@ ---- -name: audit -description: "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review." -argument-hint: "[area (feature, page, component...)]" -user-invocable: true ---- - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. - ---- - Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address. This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation. @@ -65,7 +52,7 @@ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the ### 5. Anti-Patterns (CRITICAL) -Check against ALL the **DON'T** guidelines in the impeccable skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). +Check against ALL the **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy). **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design) @@ -127,13 +114,13 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `{{command_prefix}}command-name`** — Brief description (specific context from audit findings) 2. **[P?] `{{command_prefix}}command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: {{available_commands}}. Map findings to the most appropriate command. End with `{{command_prefix}}polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: {{available_commands}}. Map findings to the most appropriate command. End with `{{command_prefix}}impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `{{command_prefix}}audit` after fixes to see your score improve. +> Re-run `{{command_prefix}}impeccable audit` after fixes to see your score improve. **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters. diff --git a/source/skills/bolder/SKILL.md b/source/skills/impeccable/reference/bolder.md similarity index 87% rename from source/skills/bolder/SKILL.md rename to source/skills/impeccable/reference/bolder.md index 07b1cfc99..992ae4235 100644 --- a/source/skills/bolder/SKILL.md +++ b/source/skills/impeccable/reference/bolder.md @@ -1,15 +1,5 @@ ---- -name: bolder -description: "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character." -argument-hint: "[target]" -user-invocable: true ---- - Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. --- @@ -35,7 +25,7 @@ If any of these are unclear from the codebase, {{ask_instruction}} **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos. -**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the impeccable skill before proceeding. Bold means distinctive, not "more effects." +**WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold. They're generic. Review ALL the DON'T guidelines from the parent impeccable skill (already loaded in this context) before proceeding. Bold means distinctive, not "more effects." ## Plan Amplification @@ -53,7 +43,7 @@ Create a strategy to increase impact while maintaining coherence: Systematically increase impact across these dimensions: ### Typography Amplification -- **Replace generic fonts**: Swap system fonts for distinctive choices (see impeccable skill for inspiration) +- **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration) - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x) - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400 - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default) diff --git a/source/skills/impeccable/reference/clarify.md b/source/skills/impeccable/reference/clarify.md new file mode 100644 index 000000000..dc116e745 --- /dev/null +++ b/source/skills/impeccable/reference/clarify.md @@ -0,0 +1,174 @@ +> **Additional context needed**: audience technical level and users' mental state in context. + +Identify and improve unclear, confusing, or poorly written interface text to make the product easier to understand and use. + + +--- + +## Assess Current Copy + +Identify what makes the text unclear or ineffective: + +1. **Find clarity problems**: + - **Jargon**: Technical terms users won't understand + - **Ambiguity**: Multiple interpretations possible + - **Passive voice**: "Your file has been uploaded" vs "We uploaded your file" + - **Length**: Too wordy or too terse + - **Assumptions**: Assuming user knowledge they don't have + - **Missing context**: Users don't know what to do or why + - **Tone mismatch**: Too formal, too casual, or inappropriate for situation + +2. **Understand the context**: + - Who's the audience? (Technical? General? First-time users?) + - What's the user's mental state? (Stressed during error? Confident during success?) + - What's the action? (What do we want users to do?) + - What's the constraint? (Character limits? Space limitations?) + +**CRITICAL**: Clear copy helps users succeed. Unclear copy creates frustration, errors, and support tickets. + +## Plan Copy Improvements + +Create a strategy for clearer communication: + +- **Primary message**: What's the ONE thing users need to know? +- **Action needed**: What should users do next (if anything)? +- **Tone**: How should this feel? (Helpful? Apologetic? Encouraging?) +- **Constraints**: Length limits, brand voice, localization considerations + +**IMPORTANT**: Good UX writing is invisible. Users should understand immediately without noticing the words. + +## Improve Copy Systematically + +Refine text across these common areas: + +### Error Messages +**Bad**: "Error 403: Forbidden" +**Good**: "You don't have permission to view this page. Contact your admin for access." + +**Bad**: "Invalid input" +**Good**: "Email addresses need an @ symbol. Try: name@example.com" + +**Principles**: +- Explain what went wrong in plain language +- Suggest how to fix it +- Don't blame the user +- Include examples when helpful +- Link to help/support if applicable + +### Form Labels & Instructions +**Bad**: "DOB (MM/DD/YYYY)" +**Good**: "Date of birth" (with placeholder showing format) + +**Bad**: "Enter value here" +**Good**: "Your email address" or "Company name" + +**Principles**: +- Use clear, specific labels (not generic placeholders) +- Show format expectations with examples +- Explain why you're asking (when not obvious) +- Put instructions before the field, not after +- Keep required field indicators clear + +### Button & CTA Text +**Bad**: "Click here" | "Submit" | "OK" +**Good**: "Create account" | "Save changes" | "Got it, thanks" + +**Principles**: +- Describe the action specifically +- Use active voice (verb + noun) +- Match user's mental model +- Be specific ("Save" is better than "OK") + +### Help Text & Tooltips +**Bad**: "This is the username field" +**Good**: "Choose a username. You can change this later in Settings." + +**Principles**: +- Add value (don't just repeat the label) +- Answer the implicit question ("What is this?" or "Why do you need this?") +- Keep it brief but complete +- Link to detailed docs if needed + +### Empty States +**Bad**: "No items" +**Good**: "No projects yet. Create your first project to get started." + +**Principles**: +- Explain why it's empty (if not obvious) +- Show next action clearly +- Make it welcoming, not dead-end + +### Success Messages +**Bad**: "Success" +**Good**: "Settings saved! Your changes will take effect immediately." + +**Principles**: +- Confirm what happened +- Explain what happens next (if relevant) +- Be brief but complete +- Match the user's emotional moment (celebrate big wins) + +### Loading States +**Bad**: "Loading..." (for 30+ seconds) +**Good**: "Analyzing your data... this usually takes 30-60 seconds" + +**Principles**: +- Set expectations (how long?) +- Explain what's happening (when it's not obvious) +- Show progress when possible +- Offer escape hatch if appropriate ("Cancel") + +### Confirmation Dialogs +**Bad**: "Are you sure?" +**Good**: "Delete 'Project Alpha'? This can't be undone." + +**Principles**: +- State the specific action +- Explain consequences (especially for destructive actions) +- Use clear button labels ("Delete project" not "Yes") +- Don't overuse confirmations (only for risky actions) + +### Navigation & Wayfinding +**Bad**: Generic labels like "Items" | "Things" | "Stuff" +**Good**: Specific labels like "Your projects" | "Team members" | "Settings" + +**Principles**: +- Be specific and descriptive +- Use language users understand (not internal jargon) +- Make hierarchy clear +- Consider information scent (breadcrumbs, current location) + +## Apply Clarity Principles + +Every piece of copy should follow these rules: + +1. **Be specific**: "Enter email" not "Enter value" +2. **Be concise**: Cut unnecessary words (but don't sacrifice clarity) +3. **Be active**: "Save changes" not "Changes will be saved" +4. **Be human**: "Oops, something went wrong" not "System error encountered" +5. **Be helpful**: Tell users what to do, not just what happened +6. **Be consistent**: Use same terms throughout (don't vary for variety) + +**NEVER**: +- Use jargon without explanation +- Blame users ("You made an error" → "This field is required") +- Be vague ("Something went wrong" without explanation) +- Use passive voice unnecessarily +- Write overly long explanations (be concise) +- Use humor for errors (be empathetic instead) +- Assume technical knowledge +- Vary terminology (pick one term and stick with it) +- Repeat information (headers restating intros, redundant explanations) +- Use placeholders as the only labels (they disappear when users type) + +## Verify Improvements + +Test that copy improvements work: + +- **Comprehension**: Can users understand without context? +- **Actionability**: Do users know what to do next? +- **Brevity**: Is it as short as possible while remaining clear? +- **Consistency**: Does it match terminology elsewhere? +- **Tone**: Is it appropriate for the situation? + +Remember: You're a clarity expert with excellent communication skills. Write like you're explaining to a smart friend who's unfamiliar with the product. Be clear, be helpful, be human. diff --git a/source/skills/critique/reference/cognitive-load.md b/source/skills/impeccable/reference/cognitive-load.md similarity index 100% rename from source/skills/critique/reference/cognitive-load.md rename to source/skills/impeccable/reference/cognitive-load.md diff --git a/source/skills/colorize/SKILL.md b/source/skills/impeccable/reference/colorize.md similarity index 90% rename from source/skills/colorize/SKILL.md rename to source/skills/impeccable/reference/colorize.md index 067713958..363d2aae2 100644 --- a/source/skills/colorize/SKILL.md +++ b/source/skills/impeccable/reference/colorize.md @@ -1,15 +1,7 @@ ---- -name: colorize -description: "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette." -argument-hint: "[target]" -user-invocable: true ---- +> **Additional context needed**: existing brand colors. Strategically introduce color to designs that are too monochromatic, gray, or lacking in visual warmth and personality. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: existing brand colors. --- diff --git a/source/skills/impeccable/reference/craft.md b/source/skills/impeccable/reference/craft.md index 2bc10df79..4374144f4 100644 --- a/source/skills/impeccable/reference/craft.md +++ b/source/skills/impeccable/reference/craft.md @@ -4,11 +4,11 @@ Build a feature with impeccable UX and UI quality through a structured process: ## Step 1: Shape the Design -Run {{command_prefix}}shape, passing along whatever feature description the user provided. +Run {{command_prefix}}impeccable shape, passing along whatever feature description the user provided. Wait for the design brief to be fully confirmed before proceeding. The brief is your blueprint, and every implementation decision should trace back to it. -If the user has already run {{command_prefix}}shape and has a confirmed design brief, skip this step and use the existing brief. +If the user has already run {{command_prefix}}impeccable shape and has a confirmed design brief, skip this step and use the existing brief. ## Step 2: Load References diff --git a/source/skills/critique/SKILL.md b/source/skills/impeccable/reference/critique.md similarity index 86% rename from source/skills/critique/SKILL.md rename to source/skills/impeccable/reference/critique.md index de859a69e..7e9136baa 100644 --- a/source/skills/critique/SKILL.md +++ b/source/skills/impeccable/reference/critique.md @@ -1,19 +1,6 @@ ---- -name: critique -description: "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component." -argument-hint: "[area (feature, page, component...)]" -user-invocable: true -allowed-tools: - - Bash(npx impeccable *) ---- +> **Additional context needed**: what the interface is trying to accomplish. -## STEPS - -### Step 1: Preparation - -Invoke {{command_prefix}}impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: what the interface is trying to accomplish. - -### Step 2: Gather Assessments +### Gather Assessments Launch two independent assessments. **Neither must see the other's output** to avoid bias. @@ -31,11 +18,11 @@ document.title = '[LLM] ' + document.title; ``` Think like a design director. Evaluate: -**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines in the impeccable skill. Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? +**AI Slop Detection (CRITICAL)**: Does this look like every other AI-generated interface? Review against ALL **DON'T** guidelines from the parent impeccable skill (already loaded in this context). Check for AI color palette, gradient text, dark glows, glassmorphism, hero metric layouts, identical card grids, generic fonts, and all other tells. **The test**: If someone said "AI made this," would you believe them immediately? **Holistic Design Review**: visual hierarchy (eye flow, primary action clarity), information architecture (structure, grouping, cognitive load), emotional resonance (does it match brand and audience?), discoverability (are interactive elements obvious?), composition (balance, whitespace, rhythm), typography (hierarchy, readability, font choices), color (purposeful use, cohesion, accessibility), states & edge cases (empty, loading, error, success), microcopy (clarity, tone, helpfulness). -**Cognitive Load** (consult [cognitive-load](reference/cognitive-load.md)): +**Cognitive Load** (consult [cognitive-load](cognitive-load.md)): - Run the 8-item cognitive load checklist. Report failure count: 0-1 = low (good), 2-3 = moderate, 4+ = critical. - Count visible options at each decision point. If >4, flag it. - Check for progressive disclosure: is complexity revealed only when needed? @@ -45,7 +32,7 @@ Think like a design director. Evaluate: - **Peak-end rule**: Is the most intense moment positive? Does the experience end well? - **Emotional valleys**: Check for anxiety spikes at high-stakes moments (payment, delete, commit). Are there design interventions (progress indicators, reassurance copy, undo options)? -**Nielsen's Heuristics** (consult [heuristics-scoring](reference/heuristics-scoring.md)): +**Nielsen's Heuristics** (consult [heuristics-scoring](heuristics-scoring.md)): Score each of the 10 heuristics 0-4. This scoring will be presented in the report. Return structured findings covering: AI slop verdict, heuristic scores, cognitive load assessment, what's working (2-3 items), priority issues (3-5 with what/why/fix), minor observations, and provocative questions. @@ -95,14 +82,14 @@ For multi-view targets, inject on 3-5 representative pages. If injection fails, Return: CLI findings (JSON), browser console findings (if applicable), and any false positives noted. -### Step 3: Generate Combined Critique Report +### Generate Combined Critique Report Synthesize both assessments into a single report. Do NOT simply concatenate. Weave the findings together, noting where the LLM review and detector agree, where the detector caught issues the LLM missed, and where detector findings are false positives. Structure your feedback as a design director would: #### Design Health Score -> *Consult [heuristics-scoring](reference/heuristics-scoring.md)* +> *Consult [heuristics-scoring](heuristics-scoring.md)* Present the Nielsen's 10 heuristics scores as a table: @@ -141,14 +128,14 @@ Highlight 2-3 things done well. Be specific about why they work. #### Priority Issues The 3-5 most impactful design problems, ordered by importance. -For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](reference/heuristics-scoring.md) for severity definitions): +For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuristics-scoring.md) for severity definitions): - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) - **Suggested command**: Which command could address this (from: {{available_commands}}) #### Persona Red Flags -> *Consult [personas](reference/personas.md)* +> *Consult [personas](personas.md)* Auto-select 2-3 personas most relevant to this interface type (use the selection table in the reference). If `{{config_file}}` contains a `## Design Context` section from `impeccable teach`, also generate 1-2 project-specific personas from the audience/brand info. @@ -177,7 +164,7 @@ Provocative questions that might unlock better solutions: - Prioritize ruthlessly. If everything is important, nothing is. - Don't soften criticism. Developers need honest feedback to ship great design. -### Step 4: Ask the User +### Ask the User **After presenting findings**, use targeted questions based on what was actually found. {{ask_instruction}} These answers will shape the action plan. @@ -197,7 +184,7 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Offer concrete options, not open-ended prompts. - If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. -### Step 5: Recommended Actions +### Recommended Actions **After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. @@ -217,10 +204,10 @@ List recommended commands in priority order, based on the user's answers: - Skip commands that would address zero issues - If the user chose a limited scope, only include items within that scope - If the user marked areas as off-limits, exclude commands that would touch those areas -- End with `{{command_prefix}}polish` as the final step if any fixes were recommended +- End with `{{command_prefix}}impeccable polish` as the final step if any fixes were recommended After presenting the summary, tell the user: > You can ask me to run these one at a time, all at once, or in any order you prefer. > -> Re-run `{{command_prefix}}critique` after fixes to see your score improve. +> Re-run `{{command_prefix}}impeccable critique` after fixes to see your score improve. diff --git a/source/skills/delight/SKILL.md b/source/skills/impeccable/reference/delight.md similarity index 92% rename from source/skills/delight/SKILL.md rename to source/skills/impeccable/reference/delight.md index fd74d41eb..c3df1420e 100644 --- a/source/skills/delight/SKILL.md +++ b/source/skills/impeccable/reference/delight.md @@ -1,15 +1,7 @@ ---- -name: delight -description: "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable." -argument-hint: "[target]" -user-invocable: true ---- +> **Additional context needed**: what's appropriate for the domain (playful vs professional vs quirky vs elegant). Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant). --- diff --git a/source/skills/distill/SKILL.md b/source/skills/impeccable/reference/distill.md similarity index 90% rename from source/skills/distill/SKILL.md rename to source/skills/impeccable/reference/distill.md index eee17b88c..c66418318 100644 --- a/source/skills/distill/SKILL.md +++ b/source/skills/impeccable/reference/distill.md @@ -1,15 +1,5 @@ ---- -name: distill -description: "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused." -argument-hint: "[target]" -user-invocable: true ---- - Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. --- diff --git a/source/skills/impeccable/reference/harden.md b/source/skills/impeccable/reference/harden.md new file mode 100644 index 000000000..af8b8a703 --- /dev/null +++ b/source/skills/impeccable/reference/harden.md @@ -0,0 +1,381 @@ +Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs. + +## Assess Hardening Needs + +Identify weaknesses and edge cases: + +1. **Test with extreme inputs**: + - Very long text (names, descriptions, titles) + - Very short text (empty, single character) + - Special characters (emoji, RTL text, accents) + - Large numbers (millions, billions) + - Many items (1000+ list items, 50+ options) + - No data (empty states) + +2. **Test error scenarios**: + - Network failures (offline, slow, timeout) + - API errors (400, 401, 403, 404, 500) + - Validation errors + - Permission errors + - Rate limiting + - Concurrent operations + +3. **Test internationalization**: + - Long translations (German is often 30% longer than English) + - RTL languages (Arabic, Hebrew) + - Character sets (Chinese, Japanese, Korean, emoji) + - Date/time formats + - Number formats (1,000 vs 1.000) + - Currency symbols + +**CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality. + +## Hardening Dimensions + +Systematically improve resilience: + +### Text Overflow & Wrapping + +**Long text handling**: +```css +/* Single line with ellipsis */ +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Multi-line with clamp */ +.line-clamp { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Allow wrapping */ +.wrap { + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; +} +``` + +**Flex/Grid overflow**: +```css +/* Prevent flex items from overflowing */ +.flex-item { + min-width: 0; /* Allow shrinking below content size */ + overflow: hidden; +} + +/* Prevent grid items from overflowing */ +.grid-item { + min-width: 0; + min-height: 0; +} +``` + +**Responsive text sizing**: +- Use `clamp()` for fluid typography +- Set minimum readable sizes (14px on mobile) +- Test text scaling (zoom to 200%) +- Ensure containers expand with text + +### Internationalization (i18n) + +**Text expansion**: +- Add 30-40% space budget for translations +- Use flexbox/grid that adapts to content +- Test with longest language (usually German) +- Avoid fixed widths on text containers + +```jsx +// ❌ Bad: Assumes short English text + + +// ✅ Good: Adapts to content + +``` + +**RTL (Right-to-Left) support**: +```css +/* Use logical properties */ +margin-inline-start: 1rem; /* Not margin-left */ +padding-inline: 1rem; /* Not padding-left/right */ +border-inline-end: 1px solid; /* Not border-right */ + +/* Or use dir attribute */ +[dir="rtl"] .arrow { transform: scaleX(-1); } +``` + +**Character set support**: +- Use UTF-8 encoding everywhere +- Test with Chinese/Japanese/Korean (CJK) characters +- Test with emoji (they can be 2-4 bytes) +- Handle different scripts (Latin, Cyrillic, Arabic, etc.) + +**Date/Time formatting**: +```javascript +// ✅ Use Intl API for proper formatting +new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024 +new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024 + +new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'USD' +}).format(1234.56); // $1,234.56 +``` + +**Pluralization**: +```javascript +// ❌ Bad: Assumes English pluralization +`${count} item${count !== 1 ? 's' : ''}` + +// ✅ Good: Use proper i18n library +t('items', { count }) // Handles complex plural rules +``` + +### Error Handling + +**Network errors**: +- Show clear error messages +- Provide retry button +- Explain what happened +- Offer offline mode (if applicable) +- Handle timeout scenarios + +```jsx +// Error states with recovery +{error && ( + +

      Failed to load data. {error.message}

      + +
      +)} +``` + +**Form validation errors**: +- Inline errors near fields +- Clear, specific messages +- Suggest corrections +- Don't block submission unnecessarily +- Preserve user input on error + +**API errors**: +- Handle each status code appropriately + - 400: Show validation errors + - 401: Redirect to login + - 403: Show permission error + - 404: Show not found state + - 429: Show rate limit message + - 500: Show generic error, offer support + +**Graceful degradation**: +- Core functionality works without JavaScript +- Images have alt text +- Progressive enhancement +- Fallbacks for unsupported features + +### Edge Cases & Boundary Conditions + +**Empty states**: +- No items in list +- No search results +- No notifications +- No data to display +- Provide clear next action + +**Loading states**: +- Initial load +- Pagination load +- Refresh +- Show what's loading ("Loading your projects...") +- Time estimates for long operations + +**Large datasets**: +- Pagination or virtual scrolling +- Search/filter capabilities +- Performance optimization +- Don't load all 10,000 items at once + +**Concurrent operations**: +- Prevent double-submission (disable button while loading) +- Handle race conditions +- Optimistic updates with rollback +- Conflict resolution + +**Permission states**: +- No permission to view +- No permission to edit +- Read-only mode +- Clear explanation of why + +**Browser compatibility**: +- Polyfills for modern features +- Fallbacks for unsupported CSS +- Feature detection (not browser detection) +- Test in target browsers + +### Onboarding & First-Run Experience + +Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: + +**Empty states**: Every zero-data screen needs: +- What will appear here (description or illustration) +- Why it matters to the user +- Clear CTA to create the first item or start from a template +- Visual interest (not just blank space with "No items yet") + +Empty state types to handle: +- **First use**: emphasize value, provide templates +- **User cleared**: light touch, easy to recreate +- **No results**: suggest a different query, offer to clear filters +- **No permissions**: explain why, how to get access + +**First-run experience**: Get users to their "aha moment" as quickly as possible. +- Show, don't tell -- working examples over descriptions +- Progressive disclosure -- teach one thing at a time, not everything upfront +- Make onboarding optional -- let experienced users skip +- Provide smart defaults so required setup is minimal + +**Feature discovery**: Teach features when users need them, not upfront. +- Contextual tooltips at point of use (brief, dismissable, one-time) +- Badges or indicators on new or unused features +- Celebrate activation events quietly (a toast, not a modal) + +**NEVER**: +- Force long onboarding before users can touch the product +- Show the same tooltip repeatedly (track and respect dismissals) +- Block the entire UI during a guided tour +- Create separate tutorial modes disconnected from the real product +- Design empty states that just say "No items" with no next action + +### Input Validation & Sanitization + +**Client-side validation**: +- Required fields +- Format validation (email, phone, URL) +- Length limits +- Pattern matching +- Custom validation rules + +**Server-side validation** (always): +- Never trust client-side only +- Validate and sanitize all inputs +- Protect against injection attacks +- Rate limiting + +**Constraint handling**: +```html + + + + Letters and numbers only, up to 100 characters + +``` + +### Accessibility Resilience + +**Keyboard navigation**: +- All functionality accessible via keyboard +- Logical tab order +- Focus management in modals +- Skip links for long content + +**Screen reader support**: +- Proper ARIA labels +- Announce dynamic changes (live regions) +- Descriptive alt text +- Semantic HTML + +**Motion sensitivity**: +```css +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +``` + +**High contrast mode**: +- Test in Windows high contrast mode +- Don't rely only on color +- Provide alternative visual cues + +### Performance Resilience + +**Slow connections**: +- Progressive image loading +- Skeleton screens +- Optimistic UI updates +- Offline support (service workers) + +**Memory leaks**: +- Clean up event listeners +- Cancel subscriptions +- Clear timers/intervals +- Abort pending requests on unmount + +**Throttling & Debouncing**: +```javascript +// Debounce search input +const debouncedSearch = debounce(handleSearch, 300); + +// Throttle scroll handler +const throttledScroll = throttle(handleScroll, 100); +``` + +## Testing Strategies + +**Manual testing**: +- Test with extreme data (very long, very short, empty) +- Test in different languages +- Test offline +- Test slow connection (throttle to 3G) +- Test with screen reader +- Test keyboard-only navigation +- Test on old browsers + +**Automated testing**: +- Unit tests for edge cases +- Integration tests for error scenarios +- E2E tests for critical paths +- Visual regression tests +- Accessibility tests (axe, WAVE) + +**IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined. + +**NEVER**: +- Assume perfect input (validate everything) +- Ignore internationalization (design for global) +- Leave error messages generic ("Error occurred") +- Forget offline scenarios +- Trust client-side validation alone +- Use fixed widths for text +- Assume English-length text +- Block entire interface when one component errors + +## Verify Hardening + +Test thoroughly with edge cases: + +- **Long text**: Try names with 100+ characters +- **Emoji**: Use emoji in all text fields +- **RTL**: Test with Arabic or Hebrew +- **CJK**: Test with Chinese/Japanese/Korean +- **Network issues**: Disable internet, throttle connection +- **Large datasets**: Test with 1000+ items +- **Concurrent actions**: Click submit 10 times rapidly +- **Errors**: Force API errors, test all error states +- **Empty**: Remove all data, test empty states + +Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component. diff --git a/source/skills/critique/reference/heuristics-scoring.md b/source/skills/impeccable/reference/heuristics-scoring.md similarity index 100% rename from source/skills/critique/reference/heuristics-scoring.md rename to source/skills/impeccable/reference/heuristics-scoring.md diff --git a/source/skills/impeccable/reference/layout.md b/source/skills/impeccable/reference/layout.md new file mode 100644 index 000000000..cd6b778e7 --- /dev/null +++ b/source/skills/impeccable/reference/layout.md @@ -0,0 +1,114 @@ +Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. + + +--- + +## Assess Current Layout + +Analyze what's weak about the current spatial design: + +1. **Spacing**: + - Is spacing consistent or arbitrary? (Random padding/margin values) + - Is all spacing the same? (Equal padding everywhere = no rhythm) + - Are related elements grouped tightly, with generous space between groups? + +2. **Visual hierarchy**: + - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? + - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) + - Does whitespace guide the eye to what matters? + +3. **Grid & structure**: + - Is there a clear underlying structure, or does the layout feel random? + - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) + - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) + +4. **Rhythm & variety**: + - Does the layout have visual rhythm? (Alternating tight/generous spacing) + - Is every section structured the same way? (Monotonous repetition) + - Are there intentional moments of surprise or emphasis? + +5. **Density**: + - Is the layout too cramped? (Not enough breathing room) + - Is the layout too sparse? (Excessive whitespace without purpose) + - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) + +**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. + +## Plan Layout Improvements + +Consult the [spatial design reference](spatial-design.md) for detailed guidance on grids, rhythm, and container queries. + +Create a systematic plan: + +- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. +- **Hierarchy strategy**: How will space communicate importance? +- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. +- **Rhythm**: Where should spacing be tight vs generous? + +## Improve Layout Systematically + +### Establish a Spacing System + +- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. +- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` +- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks +- Apply `clamp()` for fluid spacing that breathes on larger screens + +### Create Visual Rhythm + +- **Tight grouping** for related elements (8-12px between siblings) +- **Generous separation** between distinct sections (48-96px) +- **Varied spacing** within sections — not every row needs the same gap +- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense + +### Choose the Right Layout Tool + +- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. +- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. +- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. +- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. +- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. + +### Break Card Grid Monotony + +- Don't default to card grids for everything — spacing and alignment create visual grouping naturally +- Use cards only when content is truly distinct and actionable — never nest cards inside cards +- Vary card sizes, span columns, or mix cards with non-card content to break repetition + +### Strengthen Visual Hierarchy + +- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. +- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). +- Create clear content groupings through proximity and separation. + +### Manage Depth & Elevation + +- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) +- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle +- Use elevation to reinforce hierarchy, not as decoration + +### Optical Adjustments + +- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. + +**NEVER**: +- Use arbitrary spacing values outside your scale +- Make all spacing equal — variety creates hierarchy +- Wrap everything in cards — not everything needs a container +- Nest cards inside cards — use spacing and dividers for hierarchy within +- Use identical card grids everywhere (icon + heading + text, repeated) +- Center everything — left-aligned with asymmetry feels more designed +- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. +- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job +- Use arbitrary z-index values (999, 9999) — build a semantic scale + +## Verify Layout Improvements + +- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? +- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? +- **Hierarchy**: Is the most important content obvious within 2 seconds? +- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? +- **Consistency**: Is the spacing system applied uniformly? +- **Responsiveness**: Does the layout adapt gracefully across screen sizes? + +Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/source/skills/impeccable/reference/optimize.md b/source/skills/impeccable/reference/optimize.md new file mode 100644 index 000000000..4abf575ec --- /dev/null +++ b/source/skills/impeccable/reference/optimize.md @@ -0,0 +1,258 @@ +Identify and fix performance issues to create faster, smoother user experiences. + +## Assess Performance Issues + +Understand current performance and identify problems: + +1. **Measure current state**: + - **Core Web Vitals**: LCP, FID/INP, CLS scores + - **Load time**: Time to interactive, first contentful paint + - **Bundle size**: JavaScript, CSS, image sizes + - **Runtime performance**: Frame rate, memory usage, CPU usage + - **Network**: Request count, payload sizes, waterfall + +2. **Identify bottlenecks**: + - What's slow? (Initial load? Interactions? Animations?) + - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) + - How bad is it? (Perceivable? Annoying? Blocking?) + - Who's affected? (All users? Mobile only? Slow connections?) + +**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. + +## Optimization Strategy + +Create systematic improvement plan: + +### Loading Performance + +**Optimize Images**: +- Use modern formats (WebP, AVIF) +- Proper sizing (don't load 3000px image for 300px display) +- Lazy loading for below-fold images +- Responsive images (`srcset`, `picture` element) +- Compress images (80-85% quality is usually imperceptible) +- Use CDN for faster delivery + +```html +Hero image +``` + +**Reduce JavaScript Bundle**: +- Code splitting (route-based, component-based) +- Tree shaking (remove unused code) +- Remove unused dependencies +- Lazy load non-critical code +- Use dynamic imports for large components + +```javascript +// Lazy load heavy component +const HeavyChart = lazy(() => import('./HeavyChart')); +``` + +**Optimize CSS**: +- Remove unused CSS +- Critical CSS inline, rest async +- Minimize CSS files +- Use CSS containment for independent regions + +**Optimize Fonts**: +- Use `font-display: swap` or `optional` +- Subset fonts (only characters you need) +- Preload critical fonts +- Use system fonts when appropriate +- Limit font weights loaded + +```css +@font-face { + font-family: 'CustomFont'; + src: url('/fonts/custom.woff2') format('woff2'); + font-display: swap; /* Show fallback immediately */ + unicode-range: U+0020-007F; /* Basic Latin only */ +} +``` + +**Optimize Loading Strategy**: +- Critical resources first (async/defer non-critical) +- Preload critical assets +- Prefetch likely next pages +- Service worker for offline/caching +- HTTP/2 or HTTP/3 for multiplexing + +### Rendering Performance + +**Avoid Layout Thrashing**: +```javascript +// ❌ Bad: Alternating reads and writes (causes reflows) +elements.forEach(el => { + const height = el.offsetHeight; // Read (forces layout) + el.style.height = height * 2; // Write +}); + +// ✅ Good: Batch reads, then batch writes +const heights = elements.map(el => el.offsetHeight); // All reads +elements.forEach((el, i) => { + el.style.height = heights[i] * 2; // All writes +}); +``` + +**Optimize Rendering**: +- Use CSS `contain` property for independent regions +- Minimize DOM depth (flatter is faster) +- Reduce DOM size (fewer elements) +- Use `content-visibility: auto` for long lists +- Virtual scrolling for very long lists (react-window, react-virtualized) + +**Reduce Paint & Composite**: +- Use `transform` and `opacity` for animations (GPU-accelerated) +- Avoid animating layout properties (width, height, top, left) +- Use `will-change` sparingly for known expensive operations +- Minimize paint areas (smaller is faster) + +### Animation Performance + +**GPU Acceleration**: +```css +/* ✅ GPU-accelerated (fast) */ +.animated { + transform: translateX(100px); + opacity: 0.5; +} + +/* ❌ CPU-bound (slow) */ +.animated { + left: 100px; + width: 300px; +} +``` + +**Smooth 60fps**: +- Target 16ms per frame (60fps) +- Use `requestAnimationFrame` for JS animations +- Debounce/throttle scroll handlers +- Use CSS animations when possible +- Avoid long-running JavaScript during animations + +**Intersection Observer**: +```javascript +// Efficiently detect when elements enter viewport +const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + // Element is visible, lazy load or animate + } + }); +}); +``` + +### React/Framework Optimization + +**React-specific**: +- Use `memo()` for expensive components +- `useMemo()` and `useCallback()` for expensive computations +- Virtualize long lists +- Code split routes +- Avoid inline function creation in render +- Use React DevTools Profiler + +**Framework-agnostic**: +- Minimize re-renders +- Debounce expensive operations +- Memoize computed values +- Lazy load routes and components + +### Network Optimization + +**Reduce Requests**: +- Combine small files +- Use SVG sprites for icons +- Inline small critical assets +- Remove unused third-party scripts + +**Optimize APIs**: +- Use pagination (don't load everything) +- GraphQL to request only needed fields +- Response compression (gzip, brotli) +- HTTP caching headers +- CDN for static assets + +**Optimize for Slow Connections**: +- Adaptive loading based on connection (navigator.connection) +- Optimistic UI updates +- Request prioritization +- Progressive enhancement + +## Core Web Vitals Optimization + +### Largest Contentful Paint (LCP < 2.5s) +- Optimize hero images +- Inline critical CSS +- Preload key resources +- Use CDN +- Server-side rendering + +### First Input Delay (FID < 100ms) / INP (< 200ms) +- Break up long tasks +- Defer non-critical JavaScript +- Use web workers for heavy computation +- Reduce JavaScript execution time + +### Cumulative Layout Shift (CLS < 0.1) +- Set dimensions on images and videos +- Don't inject content above existing content +- Use `aspect-ratio` CSS property +- Reserve space for ads/embeds +- Avoid animations that cause layout shifts + +```css +/* Reserve space for image */ +.image-container { + aspect-ratio: 16 / 9; +} +``` + +## Performance Monitoring + +**Tools to use**: +- Chrome DevTools (Lighthouse, Performance panel) +- WebPageTest +- Core Web Vitals (Chrome UX Report) +- Bundle analyzers (webpack-bundle-analyzer) +- Performance monitoring (Sentry, DataDog, New Relic) + +**Key metrics**: +- LCP, FID/INP, CLS (Core Web Vitals) +- Time to Interactive (TTI) +- First Contentful Paint (FCP) +- Total Blocking Time (TBT) +- Bundle size +- Request count + +**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. + +**NEVER**: +- Optimize without measuring (premature optimization) +- Sacrifice accessibility for performance +- Break functionality while optimizing +- Use `will-change` everywhere (creates new layers, uses memory) +- Lazy load above-fold content +- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) +- Forget about mobile performance (often slower devices, slower connections) + +## Verify Improvements + +Test that optimizations worked: + +- **Before/after metrics**: Compare Lighthouse scores +- **Real user monitoring**: Track improvements for real users +- **Different devices**: Test on low-end Android, not just flagship iPhone +- **Slow connections**: Throttle to 3G, test experience +- **No regressions**: Ensure functionality still works +- **User perception**: Does it *feel* faster? + +Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. diff --git a/source/skills/overdrive/SKILL.md b/source/skills/impeccable/reference/overdrive.md similarity index 77% rename from source/skills/overdrive/SKILL.md rename to source/skills/impeccable/reference/overdrive.md index 93d44c757..15d76818d 100644 --- a/source/skills/overdrive/SKILL.md +++ b/source/skills/impeccable/reference/overdrive.md @@ -1,10 +1,3 @@ ---- -name: overdrive -description: "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary." -argument-hint: "[target]" -user-invocable: true ---- - Start your response with: ``` @@ -12,19 +5,15 @@ Start your response with: 》》》 Entering overdrive mode... ``` -Push an interface past conventional limits. This isn't just about visual effects — it's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. +Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. - -**EXTRA IMPORTANT FOR THIS SKILL**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. +**EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate. ### Propose Before Building -This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: +This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST: -1. **Think through 2-3 different directions** — consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. +1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like. 2. **{{ask_instruction}}** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity). 3. Only proceed with the direction the user confirms. @@ -32,7 +21,7 @@ Skipping this step risks building something embarrassing that needs to be thrown ### Iterate with Browser Automation -Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right — check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. +Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone. --- @@ -90,7 +79,7 @@ Organized by what you're trying to achieve, not by technology name. - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start. - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission. -**NOTE**: This skill is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. +**NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary. ## Implement with Discipline @@ -127,7 +116,7 @@ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the - Ship effects that cause jank on mid-range devices - Use bleeding-edge APIs without a functional fallback - Add sound without explicit user opt-in -- Use technical ambition to mask weak design fundamentals — fix those first with other skills +- Use technical ambition to mask weak design fundamentals; fix those first with other commands - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise ## Verify the Result diff --git a/source/skills/critique/reference/personas.md b/source/skills/impeccable/reference/personas.md similarity index 100% rename from source/skills/critique/reference/personas.md rename to source/skills/impeccable/reference/personas.md diff --git a/source/skills/impeccable/reference/polish.md b/source/skills/impeccable/reference/polish.md new file mode 100644 index 000000000..597c68847 --- /dev/null +++ b/source/skills/impeccable/reference/polish.md @@ -0,0 +1,212 @@ +> **Additional context needed**: quality bar (MVP vs flagship). + +Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. + +## Design System Discovery + +Before polishing, understand the system you are polishing toward: + +1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. +2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? +3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. + +If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. + +## Pre-Polish Assessment + +Understand the current state and goals: + +1. **Review completeness**: + - Is it functionally complete? + - Are there known issues to preserve (mark with TODOs)? + - What's the quality bar? (MVP vs flagship feature?) + - When does it ship? (How much time for polish?) + +2. **Identify polish areas**: + - Visual inconsistencies + - Spacing and alignment issues + - Interaction state gaps + - Copy inconsistencies + - Edge cases and error states + - Loading and transition smoothness + +**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. + +## Polish Systematically + +Work through these dimensions methodically: + +### Visual Alignment & Spacing + +- **Pixel-perfect alignment**: Everything lines up to grid +- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) +- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) +- **Responsive consistency**: Spacing and alignment work at all breakpoints +- **Grid adherence**: Elements snap to baseline grid + +**Check**: +- Enable grid overlay and verify alignment +- Check spacing with browser inspector +- Test at multiple viewport sizes +- Look for elements that "feel" off + +### Typography Refinement + +- **Hierarchy consistency**: Same elements use same sizes/weights throughout +- **Line length**: 45-75 characters for body text +- **Line height**: Appropriate for font size and context +- **Widows & orphans**: No single words on last line +- **Hyphenation**: Appropriate for language and column width +- **Kerning**: Adjust letter spacing where needed (especially headlines) +- **Font loading**: No FOUT/FOIT flashes + +### Color & Contrast + +- **Contrast ratios**: All text meets WCAG standards +- **Consistent token usage**: No hard-coded colors, all use design tokens +- **Theme consistency**: Works in all theme variants +- **Color meaning**: Same colors mean same things throughout +- **Accessible focus**: Focus indicators visible with sufficient contrast +- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) +- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency + +### Interaction States + +Every interactive element needs all states: + +- **Default**: Resting state +- **Hover**: Subtle feedback (color, scale, shadow) +- **Focus**: Keyboard focus indicator (never remove without replacement) +- **Active**: Click/tap feedback +- **Disabled**: Clearly non-interactive +- **Loading**: Async action feedback +- **Error**: Validation or error state +- **Success**: Successful completion + +**Missing states create confusion and broken experiences**. + +### Micro-interactions & Transitions + +- **Smooth transitions**: All state changes animated appropriately (150-300ms) +- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. +- **No jank**: 60fps animations, only animate transform and opacity +- **Appropriate motion**: Motion serves purpose, not decoration +- **Reduced motion**: Respects `prefers-reduced-motion` + +### Content & Copy + +- **Consistent terminology**: Same things called same names throughout +- **Consistent capitalization**: Title Case vs Sentence case applied consistently +- **Grammar & spelling**: No typos +- **Appropriate length**: Not too wordy, not too terse +- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) + +### Icons & Images + +- **Consistent style**: All icons from same family or matching style +- **Appropriate sizing**: Icons sized consistently for context +- **Proper alignment**: Icons align with adjacent text optically +- **Alt text**: All images have descriptive alt text +- **Loading states**: Images don't cause layout shift, proper aspect ratios +- **Retina support**: 2x assets for high-DPI screens + +### Forms & Inputs + +- **Label consistency**: All inputs properly labeled +- **Required indicators**: Clear and consistent +- **Error messages**: Helpful and consistent +- **Tab order**: Logical keyboard navigation +- **Auto-focus**: Appropriate (don't overuse) +- **Validation timing**: Consistent (on blur vs on submit) + +### Edge Cases & Error States + +- **Loading states**: All async actions have loading feedback +- **Empty states**: Helpful empty states, not just blank space +- **Error states**: Clear error messages with recovery paths +- **Success states**: Confirmation of successful actions +- **Long content**: Handles very long names, descriptions, etc. +- **No content**: Handles missing data gracefully +- **Offline**: Appropriate offline handling (if applicable) + +### Responsiveness + +- **All breakpoints**: Test mobile, tablet, desktop +- **Touch targets**: 44x44px minimum on touch devices +- **Readable text**: No text smaller than 14px on mobile +- **No horizontal scroll**: Content fits viewport +- **Appropriate reflow**: Content adapts logically + +### Performance + +- **Fast initial load**: Optimize critical path +- **No layout shift**: Elements don't jump after load (CLS) +- **Smooth interactions**: No lag or jank +- **Optimized images**: Appropriate formats and sizes +- **Lazy loading**: Off-screen content loads lazily + +### Code Quality + +- **Remove console logs**: No debug logging in production +- **Remove commented code**: Clean up dead code +- **Remove unused imports**: Clean up unused dependencies +- **Consistent naming**: Variables and functions follow conventions +- **Type safety**: No TypeScript `any` or ignored errors +- **Accessibility**: Proper ARIA labels and semantic HTML + +## Polish Checklist + +Go through systematically: + +- [ ] Visual alignment perfect at all breakpoints +- [ ] Spacing uses design tokens consistently +- [ ] Typography hierarchy consistent +- [ ] All interactive states implemented +- [ ] All transitions smooth (60fps) +- [ ] Copy is consistent and polished +- [ ] Icons are consistent and properly sized +- [ ] All forms properly labeled and validated +- [ ] Error states are helpful +- [ ] Loading states are clear +- [ ] Empty states are welcoming +- [ ] Touch targets are 44x44px minimum +- [ ] Contrast ratios meet WCAG AA +- [ ] Keyboard navigation works +- [ ] Focus indicators visible +- [ ] No console errors or warnings +- [ ] No layout shift on load +- [ ] Works in all supported browsers +- [ ] Respects reduced motion preference +- [ ] Code is clean (no TODOs, console.logs, commented code) + +**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. + +**NEVER**: +- Polish before it's functionally complete +- Spend hours on polish if it ships in 30 minutes (triage) +- Introduce bugs while polishing (test thoroughly) +- Ignore systematic issues (if spacing is off everywhere, fix the system) +- Perfect one thing while leaving others rough (consistent quality level) +- Create new one-off components when design system equivalents exist +- Hard-code values that should use design tokens + +## Final Verification + +Before marking as done: + +- **Use it yourself**: Actually interact with the feature +- **Test on real devices**: Not just browser DevTools +- **Ask someone else to review**: Fresh eyes catch things +- **Compare to design**: Match intended design +- **Check all states**: Don't just test happy path + +## Clean Up + +After polishing, ensure code quality: + +- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. +- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. +- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. +- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. + +Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. diff --git a/source/skills/quieter/SKILL.md b/source/skills/impeccable/reference/quieter.md similarity index 88% rename from source/skills/quieter/SKILL.md rename to source/skills/impeccable/reference/quieter.md index 3985b772a..507a9eac4 100644 --- a/source/skills/quieter/SKILL.md +++ b/source/skills/impeccable/reference/quieter.md @@ -1,15 +1,5 @@ ---- -name: quieter -description: "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic." -argument-hint: "[target]" -user-invocable: true ---- - Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness. -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. --- diff --git a/source/skills/shape/SKILL.md b/source/skills/impeccable/reference/shape.md similarity index 77% rename from source/skills/shape/SKILL.md rename to source/skills/impeccable/reference/shape.md index cb62822b7..eea66ccfa 100644 --- a/source/skills/shape/SKILL.md +++ b/source/skills/impeccable/reference/shape.md @@ -1,25 +1,12 @@ ---- -name: shape -description: "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written." -argument-hint: "[feature to shape]" -user-invocable: true ---- +Shape the UX and UI for a feature before any code is written. This command produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. -## MANDATORY PREPARATION +**Scope**: Design planning only. This command does NOT write code. It produces the thinking that makes code good. -Invoke {{command_prefix}}impeccable, which contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding. If no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. - ---- - -Shape the UX and UI for a feature before any code is written. This skill produces a **design brief**: a structured artifact that guides implementation through discovery, not guesswork. - -**Scope**: Design planning only. This skill does NOT write code. It produces the thinking that makes code good. - -**Output**: A design brief that can be handed off to {{command_prefix}}impeccable craft, {{command_prefix}}impeccable, or any other implementation skill. +**Output**: A design brief that can be handed off to {{command_prefix}}impeccable craft, or directly to {{command_prefix}}impeccable for freeform implementation. ## Philosophy -Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This skill inverts that: understand deeply first, so implementation is precise. +Most AI-generated UIs fail not because of bad code, but because of skipped thinking. They jump to "here's a card grid" without asking "what is the user trying to accomplish?" This command inverts that: understand deeply first, so implementation is precise. ## Phase 1: Discovery Interview @@ -57,7 +44,7 @@ Ask these questions in conversation, adapting based on answers. Don't dump them ## Phase 2: Design Brief -After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this skill complete. +After the interview, synthesize everything into a structured design brief. Present it to the user for confirmation before considering this command complete. ### Brief Structure @@ -92,4 +79,4 @@ Anything unresolved that the implementer should resolve during build. {{ask_instruction}} Get explicit confirmation of the brief before finishing. If the user disagrees with any part, revisit the relevant discovery questions. -Once confirmed, the brief is complete. The user can now hand it to {{command_prefix}}impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use {{command_prefix}}impeccable craft instead, which runs this skill internally.) +Once confirmed, the brief is complete. The user can now hand it to {{command_prefix}}impeccable, or use it to guide any other implementation approach. (If the user wants the full discovery-then-build flow in one step, they should use {{command_prefix}}impeccable craft instead, which runs this command internally.) diff --git a/source/skills/impeccable/reference/teach.md b/source/skills/impeccable/reference/teach.md new file mode 100644 index 000000000..b56a55e19 --- /dev/null +++ b/source/skills/impeccable/reference/teach.md @@ -0,0 +1,67 @@ +# Teach Flow + +One-time setup that gathers design context for a project. Design without context produces generic output, so every other command reads this file before doing any work. + +## Step 1: Explore the Codebase + +Before asking questions, thoroughly scan the project to discover what you can: + +- **README and docs**: Project purpose, target audience, any stated goals +- **Package.json / config files**: Tech stack, dependencies, existing design libraries +- **Existing components**: Current design patterns, spacing, typography in use +- **Brand assets**: Logos, favicons, color values already defined +- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales +- **Any style guides or brand documentation** + +Note what you've learned and what remains unclear. + +## Step 2: Ask UX-Focused Questions + +{{ask_instruction}} Focus only on what you couldn't infer from the codebase: + +### Users & Purpose +- Who uses this? What's their context when using it? +- What job are they trying to get done? +- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.) + +### Brand & Personality +- How would you describe the brand personality in 3 words? +- Any reference sites or apps that capture the right feel? What specifically about them? +- What should this explicitly NOT look like? Any anti-references? + +### Aesthetic Preferences +- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.) +- Light mode, dark mode, or both? +- Any colors that must be used or avoided? + +### Accessibility & Inclusion +- Specific accessibility requirements? (WCAG level, known user needs) +- Considerations for reduced motion, color blindness, or other accommodations? + +Skip questions where the answer is already clear from the codebase exploration. + +## Step 3: Write Design Context + +Synthesize your findings and the user's answers into a `## Design Context` section: + +```markdown +## Design Context + +### Users +[Who they are, their context, the job to be done] + +### Brand Personality +[Voice, tone, 3-word personality, emotional goals] + +### Aesthetic Direction +[Visual tone, references, anti-references, theme] + +### Design Principles +[3-5 principles derived from the conversation that should guide all design decisions] +``` + +Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place. + +Then {{ask_instruction}} whether they'd also like the Design Context appended to {{config_file}}. If yes, append or update the section there as well. + +Confirm completion and summarize the key design principles that will now guide all future work. diff --git a/source/skills/impeccable/reference/typeset.md b/source/skills/impeccable/reference/typeset.md new file mode 100644 index 000000000..2e49ab6c0 --- /dev/null +++ b/source/skills/impeccable/reference/typeset.md @@ -0,0 +1,105 @@ +Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. + + +--- + +## Assess Current Typography + +Analyze what's weak or generic about the current type: + +1. **Font choices**: + - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) + - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) + - Are there too many font families? (More than 2-3 is almost always a mess) + +2. **Hierarchy**: + - Can you tell headings from body from captions at a glance? + - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) + - Are weight contrasts strong enough? (Medium vs Regular is barely visible) + +3. **Sizing & scale**: + - Is there a consistent type scale, or are sizes arbitrary? + - Does body text meet minimum readability? (16px+) + - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) + +4. **Readability**: + - Are line lengths comfortable? (45-75 characters ideal) + - Is line-height appropriate for the font and context? + - Is there enough contrast between text and background? + +5. **Consistency**: + - Are the same elements styled the same way throughout? + - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) + - Is letter-spacing intentional or default everywhere? + +**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. + +## Plan Typography Improvements + +Consult the [typography reference](typography.md) for detailed guidance on scales, pairing, and loading strategies. + +Create a systematic plan: + +- **Font selection**: Do fonts need replacing? What fits the brand/context? +- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy +- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) +- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements + +## Improve Typography Systematically + +### Font Selection + +If fonts need replacing: +- Choose fonts that reflect the brand personality +- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights +- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) + +### Establish Hierarchy + +Build a clear type scale: +- **5 sizes cover most needs**: caption, secondary, body, subheading, heading +- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) +- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone +- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need +- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed + +### Fix Readability + +- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) +- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) +- Increase line-height slightly for light-on-dark text +- Ensure body text is at least 16px / 1rem + +### Refine Details + +- Use `tabular-nums` for data tables and numbers that should align +- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text +- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) +- Set `font-kerning: normal` and consider OpenType features where appropriate + +### Weight Consistency + +- Define clear roles for each weight and stick to them +- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) +- Load only the weights you actually use (each weight adds to page load) + +**NEVER**: +- Use more than 2-3 font families +- Pick sizes arbitrarily — commit to a scale +- Set body text below 16px +- Use decorative/display fonts for body text +- Disable browser zoom (`user-scalable=no`) +- Use `px` for font sizes — use `rem` to respect user settings +- Default to Inter/Roboto/Open Sans when personality matters +- Pair fonts that are similar but not identical (two geometric sans-serifs) + +## Verify Typography Improvements + +- **Hierarchy**: Can you identify heading vs body vs caption instantly? +- **Readability**: Is body text comfortable to read in long passages? +- **Consistency**: Are same-role elements styled identically throughout? +- **Personality**: Does the typography reflect the brand? +- **Performance**: Are web fonts loading efficiently without layout shift? +- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? + +Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/source/skills/impeccable/scripts/cleanup-deprecated.mjs b/source/skills/impeccable/scripts/cleanup-deprecated.mjs index 5b8a2177c..0194aa8fc 100644 --- a/source/skills/impeccable/scripts/cleanup-deprecated.mjs +++ b/source/skills/impeccable/scripts/cleanup-deprecated.mjs @@ -21,14 +21,34 @@ import { existsSync, readFileSync, writeFileSync, rmSync, readdirSync, statSync, lstatSync, unlinkSync } from 'node:fs'; import { join, resolve } from 'node:path'; -// Skills that were renamed, merged, or folded in v2.0 and v2.1. +// Skills that were renamed, merged, or folded in v2.0, v2.1, and v3.0. const DEPRECATED_NAMES = [ - 'frontend-design', // renamed to impeccable (v2.0) - 'teach-impeccable', // folded into /impeccable teach (v2.0) - 'arrange', // renamed to layout (v2.1) - 'normalize', // merged into polish (v2.1) - 'onboard', // merged into harden (v2.1) - 'extract', // merged into /impeccable extract (v2.1) + // v2.0 renames + 'frontend-design', // renamed to impeccable + 'teach-impeccable', // folded into /impeccable teach + // v2.1 merges + 'arrange', // renamed to layout + 'normalize', // merged into polish + 'onboard', // merged into harden + 'extract', // merged into /impeccable extract + // v3.0 consolidation: all standalone skills -> /impeccable sub-commands + 'adapt', + 'animate', + 'audit', + 'bolder', + 'clarify', + 'colorize', + 'critique', + 'delight', + 'distill', + 'harden', + 'layout', + 'optimize', + 'overdrive', + 'polish', + 'quieter', + 'shape', + 'typeset', ]; // All known harness directories that may contain a skills/ subfolder. diff --git a/source/skills/impeccable/scripts/command-metadata.json b/source/skills/impeccable/scripts/command-metadata.json new file mode 100644 index 000000000..38806f3f5 --- /dev/null +++ b/source/skills/impeccable/scripts/command-metadata.json @@ -0,0 +1,82 @@ +{ + "craft": { + "description": "Full shape-then-build flow with visual iteration. Plans the UX with /impeccable shape, loads the right reference files, then builds and iterates visually until the result is delightful. Use when building a new feature end-to-end.", + "argumentHint": "[feature description]" + }, + "teach": { + "description": "One-time setup that gathers design context for a project. Runs a short discovery interview and writes the answers to .impeccable.md. Every other command reads this file before doing work. Use once per project.", + "argumentHint": "" + }, + "extract": { + "description": "Pull reusable patterns, components, and design tokens into the design system. Identifies repeated patterns and consolidates them. Use when you have drift across the codebase and want to bring things back to a consistent system.", + "argumentHint": "[target]" + }, + "adapt": { + "description": "Adapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility.", + "argumentHint": "[target] [context (mobile, tablet, print...)]" + }, + "animate": { + "description": "Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.", + "argumentHint": "[target]" + }, + "audit": { + "description": "Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.", + "argumentHint": "[area (feature, page, component...)]" + }, + "bolder": { + "description": "Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability. Use when the user says the design looks bland, generic, too safe, lacks personality, or wants more visual impact and character.", + "argumentHint": "[target]" + }, + "clarify": { + "description": "Improve unclear UX copy, error messages, microcopy, labels, and instructions to make interfaces easier to understand. Use when the user mentions confusing text, unclear labels, bad error messages, hard-to-follow instructions, or wanting better UX writing.", + "argumentHint": "[target]" + }, + "colorize": { + "description": "Add strategic color to features that are too monochromatic or lack visual interest, making interfaces more engaging and expressive. Use when the user mentions the design looking gray, dull, lacking warmth, needing more color, or wanting a more vibrant or expressive palette.", + "argumentHint": "[target]" + }, + "critique": { + "description": "Evaluate design from a UX perspective, assessing visual hierarchy, information architecture, emotional resonance, cognitive load, and overall quality with quantitative scoring, persona-based testing, automated anti-pattern detection, and actionable feedback. Use when the user asks to review, critique, evaluate, or give feedback on a design or component.", + "argumentHint": "[area (feature, page, component...)]" + }, + "delight": { + "description": "Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.", + "argumentHint": "[target]" + }, + "distill": { + "description": "Strip designs to their essence by removing unnecessary complexity. Great design is simple, powerful, and clean. Use when the user asks to simplify, declutter, reduce noise, remove elements, or make a UI cleaner and more focused.", + "argumentHint": "[target]" + }, + "harden": { + "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "layout": { + "description": "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.", + "argumentHint": "[target]" + }, + "optimize": { + "description": "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience.", + "argumentHint": "[target]" + }, + "overdrive": { + "description": "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary.", + "argumentHint": "[target]" + }, + "polish": { + "description": "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great.", + "argumentHint": "[target]" + }, + "quieter": { + "description": "Tones down visually aggressive or overstimulating designs, reducing intensity while preserving quality. Use when the user mentions too bold, too loud, overwhelming, aggressive, garish, or wants a calmer, more refined aesthetic.", + "argumentHint": "[target]" + }, + "shape": { + "description": "Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.", + "argumentHint": "[feature to shape]" + }, + "typeset": { + "description": "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography.", + "argumentHint": "[target]" + } +} diff --git a/source/skills/impeccable/scripts/pin.mjs b/source/skills/impeccable/scripts/pin.mjs new file mode 100644 index 000000000..2abfc6050 --- /dev/null +++ b/source/skills/impeccable/scripts/pin.mjs @@ -0,0 +1,214 @@ +#!/usr/bin/env node +/** + * Pin/unpin sub-commands as standalone skill shortcuts. + * + * Usage: + * node /pin.mjs pin + * node /pin.mjs unpin + * + * `pin audit` creates a lightweight /audit skill that redirects to /impeccable audit. + * `unpin audit` removes that shortcut. + * + * The script discovers harness directories (.claude/skills, .cursor/skills, etc.) + * in the project root and creates/removes the pin in all of them. + */ + +import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, readdirSync } from 'node:fs'; +import { join, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// All known harness directories +const HARNESS_DIRS = [ + '.claude', '.cursor', '.gemini', '.codex', '.agents', + '.trae', '.trae-cn', '.pi', '.opencode', '.kiro', '.rovodev', +]; + +// Valid sub-command names +const VALID_COMMANDS = [ + 'craft', 'teach', 'extract', 'shape', + 'critique', 'audit', + 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', + 'clarify', 'adapt', 'optimize', +]; + +// Marker to identify pinned skills (so unpin doesn't delete user skills) +const PIN_MARKER = ''; + +/** + * Walk up from startDir to find a project root. + */ +function findProjectRoot(startDir = process.cwd()) { + let dir = resolve(startDir); + while (dir !== '/') { + if ( + existsSync(join(dir, 'package.json')) || + existsSync(join(dir, '.git')) || + existsSync(join(dir, 'skills-lock.json')) + ) { + return dir; + } + const parent = resolve(dir, '..'); + if (parent === dir) break; + dir = parent; + } + return resolve(startDir); +} + +/** + * Find harness skill directories that have an impeccable skill installed. + */ +function findHarnessDirs(projectRoot) { + const dirs = []; + for (const harness of HARNESS_DIRS) { + const skillsDir = join(projectRoot, harness, 'skills'); + // Only pin in harness dirs that already have impeccable installed + const impeccableDir = join(skillsDir, 'impeccable'); + if (existsSync(impeccableDir) || existsSync(join(skillsDir, 'i-impeccable'))) { + dirs.push(skillsDir); + } + } + return dirs; +} + +/** + * Load command metadata (descriptions for pinned skills). + */ +function loadCommandMetadata() { + const metadataPath = join(__dirname, 'command-metadata.json'); + if (existsSync(metadataPath)) { + return JSON.parse(readFileSync(metadataPath, 'utf-8')); + } + return {}; +} + +/** + * Generate a pinned skill's SKILL.md content. + */ +function generatePinnedSkill(command, metadata) { + const desc = metadata[command]?.description || `Shortcut for /impeccable ${command}.`; + const hint = metadata[command]?.argumentHint || '[target]'; + + return `--- +name: ${command} +description: "${desc}" +argument-hint: "${hint}" +user-invocable: true +--- + +${PIN_MARKER} + +This is a pinned shortcut for \`{{command_prefix}}impeccable ${command}\`. + +Invoke {{command_prefix}}impeccable ${command}, passing along any arguments provided here, and follow its instructions. +`; +} + +/** + * Pin a command: create shortcut skill in all harness dirs. + */ +function pin(command, projectRoot) { + const metadata = loadCommandMetadata(); + const harnessDirs = findHarnessDirs(projectRoot); + + if (harnessDirs.length === 0) { + console.log('No harness directories with impeccable installed found.'); + return false; + } + + const content = generatePinnedSkill(command, metadata); + let created = 0; + + for (const skillsDir of harnessDirs) { + // Check if skill already exists (and isn't a pin) + const skillDir = join(skillsDir, command); + if (existsSync(skillDir)) { + const existingMd = join(skillDir, 'SKILL.md'); + if (existsSync(existingMd)) { + const existing = readFileSync(existingMd, 'utf-8'); + if (!existing.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (non-pinned skill already exists)`); + continue; + } + } + } + + mkdirSync(skillDir, { recursive: true }); + writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8'); + console.log(` + ${skillDir}`); + created++; + } + + if (created > 0) { + console.log(`\nPinned '${command}' as a standalone shortcut in ${created} location(s).`); + console.log(`You can now use /${command} directly.`); + } + + return created > 0; +} + +/** + * Unpin a command: remove shortcut skill from all harness dirs. + */ +function unpin(command, projectRoot) { + const harnessDirs = findHarnessDirs(projectRoot); + let removed = 0; + + for (const skillsDir of harnessDirs) { + const skillDir = join(skillsDir, command); + if (!existsSync(skillDir)) continue; + + const skillMd = join(skillDir, 'SKILL.md'); + if (!existsSync(skillMd)) continue; + + // Safety: only remove if it's a pinned skill + const content = readFileSync(skillMd, 'utf-8'); + if (!content.includes(PIN_MARKER)) { + console.log(` SKIP: ${skillDir} (not a pinned skill)`); + continue; + } + + rmSync(skillDir, { recursive: true, force: true }); + console.log(` - ${skillDir}`); + removed++; + } + + if (removed > 0) { + console.log(`\nUnpinned '${command}' from ${removed} location(s).`); + console.log(`Use /impeccable ${command} to access it.`); + } else { + console.log(`No pinned '${command}' shortcut found.`); + } + + return removed > 0; +} + +// --- CLI --- +const [,, action, command] = process.argv; + +if (!action || !command) { + console.log('Usage: node pin.mjs '); + console.log(`\nAvailable commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +if (action !== 'pin' && action !== 'unpin') { + console.error(`Unknown action: ${action}. Use 'pin' or 'unpin'.`); + process.exit(1); +} + +if (!VALID_COMMANDS.includes(command)) { + console.error(`Unknown command: ${command}`); + console.error(`Available commands: ${VALID_COMMANDS.join(', ')}`); + process.exit(1); +} + +const root = findProjectRoot(); + +if (action === 'pin') { + pin(command, root); +} else { + unpin(command, root); +} diff --git a/source/skills/layout/SKILL.md b/source/skills/layout/SKILL.md deleted file mode 100644 index 747fb66be..000000000 --- a/source/skills/layout/SKILL.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -name: layout -description: "Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition." -argument-hint: "[target]" -user-invocable: true ---- - -Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions. - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. - ---- - -## Assess Current Layout - -Analyze what's weak about the current spatial design: - -1. **Spacing**: - - Is spacing consistent or arbitrary? (Random padding/margin values) - - Is all spacing the same? (Equal padding everywhere = no rhythm) - - Are related elements grouped tightly, with generous space between groups? - -2. **Visual hierarchy**: - - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings? - - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?) - - Does whitespace guide the eye to what matters? - -3. **Grid & structure**: - - Is there a clear underlying structure, or does the layout feel random? - - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly) - - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule) - -4. **Rhythm & variety**: - - Does the layout have visual rhythm? (Alternating tight/generous spacing) - - Is every section structured the same way? (Monotonous repetition) - - Are there intentional moments of surprise or emphasis? - -5. **Density**: - - Is the layout too cramped? (Not enough breathing room) - - Is the layout too sparse? (Excessive whitespace without purpose) - - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air) - -**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention. - -## Plan Layout Improvements - -Consult the [spatial design reference](reference/spatial-design.md) from the impeccable skill for detailed guidance on grids, rhythm, and container queries. - -Create a systematic plan: - -- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency. -- **Hierarchy strategy**: How will space communicate importance? -- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts. -- **Rhythm**: Where should spacing be tight vs generous? - -## Improve Layout Systematically - -### Establish a Spacing System - -- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers. -- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8` -- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks -- Apply `clamp()` for fluid spacing that breathes on larger screens - -### Create Visual Rhythm - -- **Tight grouping** for related elements (8-12px between siblings) -- **Generous separation** between distinct sections (48-96px) -- **Varied spacing** within sections — not every row needs the same gap -- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense - -### Choose the Right Layout Tool - -- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks. -- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control. -- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible. -- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. -- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints. - -### Break Card Grid Monotony - -- Don't default to card grids for everything — spacing and alignment create visual grouping naturally -- Use cards only when content is truly distinct and actionable — never nest cards inside cards -- Vary card sizes, span columns, or mix cards with non-card content to break repetition - -### Strengthen Visual Hierarchy - -- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient. -- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation). -- Create clear content groupings through proximity and separation. - -### Manage Depth & Elevation - -- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip) -- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle -- Use elevation to reinforce hierarchy, not as decoration - -### Optical Adjustments - -- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively. - -**NEVER**: -- Use arbitrary spacing values outside your scale -- Make all spacing equal — variety creates hierarchy -- Wrap everything in cards — not everything needs a container -- Nest cards inside cards — use spacing and dividers for hierarchy within -- Use identical card grids everywhere (icon + heading + text, repeated) -- Center everything — left-aligned with asymmetry feels more designed -- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers. -- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job -- Use arbitrary z-index values (999, 9999) — build a semantic scale - -## Verify Layout Improvements - -- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision? -- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing? -- **Hierarchy**: Is the most important content obvious within 2 seconds? -- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful? -- **Consistency**: Is the spacing system applied uniformly? -- **Responsiveness**: Does the layout adapt gracefully across screen sizes? - -Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional. diff --git a/source/skills/optimize/SKILL.md b/source/skills/optimize/SKILL.md deleted file mode 100644 index ad3a40552..000000000 --- a/source/skills/optimize/SKILL.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -name: optimize -description: "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience." -argument-hint: "[target]" -user-invocable: true ---- - -Identify and fix performance issues to create faster, smoother user experiences. - -## Assess Performance Issues - -Understand current performance and identify problems: - -1. **Measure current state**: - - **Core Web Vitals**: LCP, FID/INP, CLS scores - - **Load time**: Time to interactive, first contentful paint - - **Bundle size**: JavaScript, CSS, image sizes - - **Runtime performance**: Frame rate, memory usage, CPU usage - - **Network**: Request count, payload sizes, waterfall - -2. **Identify bottlenecks**: - - What's slow? (Initial load? Interactions? Animations?) - - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?) - - How bad is it? (Perceivable? Annoying? Blocking?) - - Who's affected? (All users? Mobile only? Slow connections?) - -**CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters. - -## Optimization Strategy - -Create systematic improvement plan: - -### Loading Performance - -**Optimize Images**: -- Use modern formats (WebP, AVIF) -- Proper sizing (don't load 3000px image for 300px display) -- Lazy loading for below-fold images -- Responsive images (`srcset`, `picture` element) -- Compress images (80-85% quality is usually imperceptible) -- Use CDN for faster delivery - -```html -Hero image -``` - -**Reduce JavaScript Bundle**: -- Code splitting (route-based, component-based) -- Tree shaking (remove unused code) -- Remove unused dependencies -- Lazy load non-critical code -- Use dynamic imports for large components - -```javascript -// Lazy load heavy component -const HeavyChart = lazy(() => import('./HeavyChart')); -``` - -**Optimize CSS**: -- Remove unused CSS -- Critical CSS inline, rest async -- Minimize CSS files -- Use CSS containment for independent regions - -**Optimize Fonts**: -- Use `font-display: swap` or `optional` -- Subset fonts (only characters you need) -- Preload critical fonts -- Use system fonts when appropriate -- Limit font weights loaded - -```css -@font-face { - font-family: 'CustomFont'; - src: url('/fonts/custom.woff2') format('woff2'); - font-display: swap; /* Show fallback immediately */ - unicode-range: U+0020-007F; /* Basic Latin only */ -} -``` - -**Optimize Loading Strategy**: -- Critical resources first (async/defer non-critical) -- Preload critical assets -- Prefetch likely next pages -- Service worker for offline/caching -- HTTP/2 or HTTP/3 for multiplexing - -### Rendering Performance - -**Avoid Layout Thrashing**: -```javascript -// ❌ Bad: Alternating reads and writes (causes reflows) -elements.forEach(el => { - const height = el.offsetHeight; // Read (forces layout) - el.style.height = height * 2; // Write -}); - -// ✅ Good: Batch reads, then batch writes -const heights = elements.map(el => el.offsetHeight); // All reads -elements.forEach((el, i) => { - el.style.height = heights[i] * 2; // All writes -}); -``` - -**Optimize Rendering**: -- Use CSS `contain` property for independent regions -- Minimize DOM depth (flatter is faster) -- Reduce DOM size (fewer elements) -- Use `content-visibility: auto` for long lists -- Virtual scrolling for very long lists (react-window, react-virtualized) - -**Reduce Paint & Composite**: -- Use `transform` and `opacity` for animations (GPU-accelerated) -- Avoid animating layout properties (width, height, top, left) -- Use `will-change` sparingly for known expensive operations -- Minimize paint areas (smaller is faster) - -### Animation Performance - -**GPU Acceleration**: -```css -/* ✅ GPU-accelerated (fast) */ -.animated { - transform: translateX(100px); - opacity: 0.5; -} - -/* ❌ CPU-bound (slow) */ -.animated { - left: 100px; - width: 300px; -} -``` - -**Smooth 60fps**: -- Target 16ms per frame (60fps) -- Use `requestAnimationFrame` for JS animations -- Debounce/throttle scroll handlers -- Use CSS animations when possible -- Avoid long-running JavaScript during animations - -**Intersection Observer**: -```javascript -// Efficiently detect when elements enter viewport -const observer = new IntersectionObserver((entries) => { - entries.forEach(entry => { - if (entry.isIntersecting) { - // Element is visible, lazy load or animate - } - }); -}); -``` - -### React/Framework Optimization - -**React-specific**: -- Use `memo()` for expensive components -- `useMemo()` and `useCallback()` for expensive computations -- Virtualize long lists -- Code split routes -- Avoid inline function creation in render -- Use React DevTools Profiler - -**Framework-agnostic**: -- Minimize re-renders -- Debounce expensive operations -- Memoize computed values -- Lazy load routes and components - -### Network Optimization - -**Reduce Requests**: -- Combine small files -- Use SVG sprites for icons -- Inline small critical assets -- Remove unused third-party scripts - -**Optimize APIs**: -- Use pagination (don't load everything) -- GraphQL to request only needed fields -- Response compression (gzip, brotli) -- HTTP caching headers -- CDN for static assets - -**Optimize for Slow Connections**: -- Adaptive loading based on connection (navigator.connection) -- Optimistic UI updates -- Request prioritization -- Progressive enhancement - -## Core Web Vitals Optimization - -### Largest Contentful Paint (LCP < 2.5s) -- Optimize hero images -- Inline critical CSS -- Preload key resources -- Use CDN -- Server-side rendering - -### First Input Delay (FID < 100ms) / INP (< 200ms) -- Break up long tasks -- Defer non-critical JavaScript -- Use web workers for heavy computation -- Reduce JavaScript execution time - -### Cumulative Layout Shift (CLS < 0.1) -- Set dimensions on images and videos -- Don't inject content above existing content -- Use `aspect-ratio` CSS property -- Reserve space for ads/embeds -- Avoid animations that cause layout shifts - -```css -/* Reserve space for image */ -.image-container { - aspect-ratio: 16 / 9; -} -``` - -## Performance Monitoring - -**Tools to use**: -- Chrome DevTools (Lighthouse, Performance panel) -- WebPageTest -- Core Web Vitals (Chrome UX Report) -- Bundle analyzers (webpack-bundle-analyzer) -- Performance monitoring (Sentry, DataDog, New Relic) - -**Key metrics**: -- LCP, FID/INP, CLS (Core Web Vitals) -- Time to Interactive (TTI) -- First Contentful Paint (FCP) -- Total Blocking Time (TBT) -- Bundle size -- Request count - -**IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative. - -**NEVER**: -- Optimize without measuring (premature optimization) -- Sacrifice accessibility for performance -- Break functionality while optimizing -- Use `will-change` everywhere (creates new layers, uses memory) -- Lazy load above-fold content -- Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first) -- Forget about mobile performance (often slower devices, slower connections) - -## Verify Improvements - -Test that optimizations worked: - -- **Before/after metrics**: Compare Lighthouse scores -- **Real user monitoring**: Track improvements for real users -- **Different devices**: Test on low-end Android, not just flagship iPhone -- **Slow connections**: Throttle to 3G, test experience -- **No regressions**: Ensure functionality still works -- **User perception**: Does it *feel* faster? - -Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance. - diff --git a/source/skills/polish/SKILL.md b/source/skills/polish/SKILL.md deleted file mode 100644 index 0cd35a7a5..000000000 --- a/source/skills/polish/SKILL.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -name: polish -description: "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great." -argument-hint: "[target]" -user-invocable: true ---- - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. Additionally gather: quality bar (MVP vs flagship). - ---- - -Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished. - -## Design System Discovery - -Before polishing, understand the system you are polishing toward: - -1. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API. -2. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established? -3. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale. - -If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase. - -## Pre-Polish Assessment - -Understand the current state and goals: - -1. **Review completeness**: - - Is it functionally complete? - - Are there known issues to preserve (mark with TODOs)? - - What's the quality bar? (MVP vs flagship feature?) - - When does it ship? (How much time for polish?) - -2. **Identify polish areas**: - - Visual inconsistencies - - Spacing and alignment issues - - Interaction state gaps - - Copy inconsistencies - - Edge cases and error states - - Loading and transition smoothness - -**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete. - -## Polish Systematically - -Work through these dimensions methodically: - -### Visual Alignment & Spacing - -- **Pixel-perfect alignment**: Everything lines up to grid -- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps) -- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering) -- **Responsive consistency**: Spacing and alignment work at all breakpoints -- **Grid adherence**: Elements snap to baseline grid - -**Check**: -- Enable grid overlay and verify alignment -- Check spacing with browser inspector -- Test at multiple viewport sizes -- Look for elements that "feel" off - -### Typography Refinement - -- **Hierarchy consistency**: Same elements use same sizes/weights throughout -- **Line length**: 45-75 characters for body text -- **Line height**: Appropriate for font size and context -- **Widows & orphans**: No single words on last line -- **Hyphenation**: Appropriate for language and column width -- **Kerning**: Adjust letter spacing where needed (especially headlines) -- **Font loading**: No FOUT/FOIT flashes - -### Color & Contrast - -- **Contrast ratios**: All text meets WCAG standards -- **Consistent token usage**: No hard-coded colors, all use design tokens -- **Theme consistency**: Works in all theme variants -- **Color meaning**: Same colors mean same things throughout -- **Accessible focus**: Focus indicators visible with sufficient contrast -- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma) -- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency - -### Interaction States - -Every interactive element needs all states: - -- **Default**: Resting state -- **Hover**: Subtle feedback (color, scale, shadow) -- **Focus**: Keyboard focus indicator (never remove without replacement) -- **Active**: Click/tap feedback -- **Disabled**: Clearly non-interactive -- **Loading**: Async action feedback -- **Error**: Validation or error state -- **Success**: Successful completion - -**Missing states create confusion and broken experiences**. - -### Micro-interactions & Transitions - -- **Smooth transitions**: All state changes animated appropriately (150-300ms) -- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated. -- **No jank**: 60fps animations, only animate transform and opacity -- **Appropriate motion**: Motion serves purpose, not decoration -- **Reduced motion**: Respects `prefers-reduced-motion` - -### Content & Copy - -- **Consistent terminology**: Same things called same names throughout -- **Consistent capitalization**: Title Case vs Sentence case applied consistently -- **Grammar & spelling**: No typos -- **Appropriate length**: Not too wordy, not too terse -- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them) - -### Icons & Images - -- **Consistent style**: All icons from same family or matching style -- **Appropriate sizing**: Icons sized consistently for context -- **Proper alignment**: Icons align with adjacent text optically -- **Alt text**: All images have descriptive alt text -- **Loading states**: Images don't cause layout shift, proper aspect ratios -- **Retina support**: 2x assets for high-DPI screens - -### Forms & Inputs - -- **Label consistency**: All inputs properly labeled -- **Required indicators**: Clear and consistent -- **Error messages**: Helpful and consistent -- **Tab order**: Logical keyboard navigation -- **Auto-focus**: Appropriate (don't overuse) -- **Validation timing**: Consistent (on blur vs on submit) - -### Edge Cases & Error States - -- **Loading states**: All async actions have loading feedback -- **Empty states**: Helpful empty states, not just blank space -- **Error states**: Clear error messages with recovery paths -- **Success states**: Confirmation of successful actions -- **Long content**: Handles very long names, descriptions, etc. -- **No content**: Handles missing data gracefully -- **Offline**: Appropriate offline handling (if applicable) - -### Responsiveness - -- **All breakpoints**: Test mobile, tablet, desktop -- **Touch targets**: 44x44px minimum on touch devices -- **Readable text**: No text smaller than 14px on mobile -- **No horizontal scroll**: Content fits viewport -- **Appropriate reflow**: Content adapts logically - -### Performance - -- **Fast initial load**: Optimize critical path -- **No layout shift**: Elements don't jump after load (CLS) -- **Smooth interactions**: No lag or jank -- **Optimized images**: Appropriate formats and sizes -- **Lazy loading**: Off-screen content loads lazily - -### Code Quality - -- **Remove console logs**: No debug logging in production -- **Remove commented code**: Clean up dead code -- **Remove unused imports**: Clean up unused dependencies -- **Consistent naming**: Variables and functions follow conventions -- **Type safety**: No TypeScript `any` or ignored errors -- **Accessibility**: Proper ARIA labels and semantic HTML - -## Polish Checklist - -Go through systematically: - -- [ ] Visual alignment perfect at all breakpoints -- [ ] Spacing uses design tokens consistently -- [ ] Typography hierarchy consistent -- [ ] All interactive states implemented -- [ ] All transitions smooth (60fps) -- [ ] Copy is consistent and polished -- [ ] Icons are consistent and properly sized -- [ ] All forms properly labeled and validated -- [ ] Error states are helpful -- [ ] Loading states are clear -- [ ] Empty states are welcoming -- [ ] Touch targets are 44x44px minimum -- [ ] Contrast ratios meet WCAG AA -- [ ] Keyboard navigation works -- [ ] Focus indicators visible -- [ ] No console errors or warnings -- [ ] No layout shift on load -- [ ] Works in all supported browsers -- [ ] Respects reduced motion preference -- [ ] Code is clean (no TODOs, console.logs, commented code) - -**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up. - -**NEVER**: -- Polish before it's functionally complete -- Spend hours on polish if it ships in 30 minutes (triage) -- Introduce bugs while polishing (test thoroughly) -- Ignore systematic issues (if spacing is off everywhere, fix the system) -- Perfect one thing while leaving others rough (consistent quality level) -- Create new one-off components when design system equivalents exist -- Hard-code values that should use design tokens - -## Final Verification - -Before marking as done: - -- **Use it yourself**: Actually interact with the feature -- **Test on real devices**: Not just browser DevTools -- **Ask someone else to review**: Fresh eyes catch things -- **Compare to design**: Match intended design -- **Check all states**: Don't just test happy path - -## Clean Up - -After polishing, ensure code quality: - -- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version. -- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish. -- **Consolidate tokens**: If you introduced new values, check whether they should be tokens. -- **Verify DRYness**: Look for duplication introduced during polishing and consolidate. - -Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter. - diff --git a/source/skills/typeset/SKILL.md b/source/skills/typeset/SKILL.md deleted file mode 100644 index c76f77406..000000000 --- a/source/skills/typeset/SKILL.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -name: typeset -description: "Improves typography by fixing font choices, hierarchy, sizing, weight, and readability so text feels intentional. Use when the user mentions fonts, type, readability, text hierarchy, sizing looks off, or wants more polished, intentional typography." -argument-hint: "[target]" -user-invocable: true ---- - -Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type. - -## MANDATORY PREPARATION - -Invoke {{command_prefix}}impeccable — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run {{command_prefix}}impeccable teach first. - ---- - -## Assess Current Typography - -Analyze what's weak or generic about the current type: - -1. **Font choices**: - - Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults) - - Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface) - - Are there too many font families? (More than 2-3 is almost always a mess) - -2. **Hierarchy**: - - Can you tell headings from body from captions at a glance? - - Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy) - - Are weight contrasts strong enough? (Medium vs Regular is barely visible) - -3. **Sizing & scale**: - - Is there a consistent type scale, or are sizes arbitrary? - - Does body text meet minimum readability? (16px+) - - Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings) - -4. **Readability**: - - Are line lengths comfortable? (45-75 characters ideal) - - Is line-height appropriate for the font and context? - - Is there enough contrast between text and background? - -5. **Consistency**: - - Are the same elements styled the same way throughout? - - Are font weights used consistently? (Not bold in one section, semibold in another for the same role) - - Is letter-spacing intentional or default everywhere? - -**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting. - -## Plan Typography Improvements - -Consult the [typography reference](reference/typography.md) from the impeccable skill for detailed guidance on scales, pairing, and loading strategies. - -Create a systematic plan: - -- **Font selection**: Do fonts need replacing? What fits the brand/context? -- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy -- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits) -- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements - -## Improve Typography Systematically - -### Font Selection - -If fonts need replacing: -- Choose fonts that reflect the brand personality -- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights -- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks) - -### Establish Hierarchy - -Build a clear type scale: -- **5 sizes cover most needs**: caption, secondary, body, subheading, heading -- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5) -- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone -- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need -- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed - -### Fix Readability - -- Set `max-width` on text containers using `ch` units (`max-width: 65ch`) -- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7) -- Increase line-height slightly for light-on-dark text -- Ensure body text is at least 16px / 1rem - -### Refine Details - -- Use `tabular-nums` for data tables and numbers that should align -- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text -- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`) -- Set `font-kerning: normal` and consider OpenType features where appropriate - -### Weight Consistency - -- Define clear roles for each weight and stick to them -- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty) -- Load only the weights you actually use (each weight adds to page load) - -**NEVER**: -- Use more than 2-3 font families -- Pick sizes arbitrarily — commit to a scale -- Set body text below 16px -- Use decorative/display fonts for body text -- Disable browser zoom (`user-scalable=no`) -- Use `px` for font sizes — use `rem` to respect user settings -- Default to Inter/Roboto/Open Sans when personality matters -- Pair fonts that are similar but not identical (two geometric sans-serifs) - -## Verify Typography Improvements - -- **Hierarchy**: Can you identify heading vs body vs caption instantly? -- **Readability**: Is body text comfortable to read in long passages? -- **Consistency**: Are same-role elements styled identically throughout? -- **Personality**: Does the typography reflect the brand? -- **Performance**: Are web fonts loading efficiently without layout shift? -- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%? - -Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make. diff --git a/tests/cleanup-deprecated.test.mjs b/tests/cleanup-deprecated.test.mjs index 7dead6b3a..2a1fad6f9 100644 --- a/tests/cleanup-deprecated.test.mjs +++ b/tests/cleanup-deprecated.test.mjs @@ -77,7 +77,7 @@ describe('cleanup-deprecated', () => { assert.ok(names.includes('i-arrange')); assert.ok(names.includes('frontend-design')); assert.ok(names.includes('i-frontend-design')); - assert.equal(names.length, 12); // 6 deprecated * 2 + assert.equal(names.length, 46); // 23 deprecated * 2 }); }); @@ -128,11 +128,11 @@ describe('cleanup-deprecated', () => { }); it('leaves non-deprecated skills alone', () => { - writeSkill(tmp, '.claude', 'polish', 'Invoke /impeccable first.'); + writeSkill(tmp, '.claude', 'my-custom-skill', 'Invoke /impeccable first.'); writeSkill(tmp, '.claude', 'arrange', 'Invoke /impeccable first.'); const deleted = removeDeprecatedSkills(tmp); assert.equal(deleted.length, 1); // only arrange - assert.equal(existsSync(join(tmp, '.claude', 'skills', 'polish')), true); + assert.equal(existsSync(join(tmp, '.claude', 'skills', 'my-custom-skill')), true); }); it('handles symlinks to deprecated skills', () => { @@ -152,7 +152,7 @@ describe('cleanup-deprecated', () => { version: 1, skills: { arrange: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'abc' }, - polish: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'def' }, + impeccable: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'def' }, 'resolve-reviews': { source: 'pbakaus/agent-reviews', sourceType: 'github', computedHash: 'ghi' }, }, }; @@ -161,7 +161,7 @@ describe('cleanup-deprecated', () => { assert.deepEqual(removed, ['arrange']); const updated = JSON.parse(readFileSync(join(tmp, 'skills-lock.json'), 'utf-8')); assert.equal(updated.skills.arrange, undefined); - assert.ok(updated.skills.polish); // not deprecated + assert.ok(updated.skills.impeccable); // not deprecated assert.ok(updated.skills['resolve-reviews']); // different source }); @@ -209,7 +209,7 @@ describe('cleanup-deprecated', () => { skills: { arrange: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'a' }, extract: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'b' }, - polish: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'c' }, + impeccable: { source: 'pbakaus/impeccable', sourceType: 'github', computedHash: 'c' }, }, }; writeFileSync(join(tmp, 'skills-lock.json'), JSON.stringify(lock), 'utf-8'); @@ -221,13 +221,13 @@ describe('cleanup-deprecated', () => { assert.equal(existsSync(join(tmp, '.agents', 'skills', 'arrange')), false); const updated = JSON.parse(readFileSync(join(tmp, 'skills-lock.json'), 'utf-8')); - assert.ok(updated.skills.polish); + assert.ok(updated.skills.impeccable); // not deprecated assert.equal(updated.skills.arrange, undefined); assert.equal(updated.skills.extract, undefined); }); it('is a no-op when nothing needs cleaning', () => { - writeSkill(tmp, '.claude', 'polish', 'Invoke /impeccable.'); + writeSkill(tmp, '.claude', 'my-custom-skill', 'Invoke /impeccable.'); const result = cleanup(tmp); assert.equal(result.deletedPaths.length, 0); assert.equal(result.removedLockEntries.length, 0); From 2233d82f3aeb368a97775a0c98369106c1b90aa9 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 10 Apr 2026 20:28:07 -0700 Subject: [PATCH 003/125] Bump skills to 3.0, remove prefixed bundle, redesign install section - Bump skills plugin version 2.1.1 -> 3.0.0 (plugin.json, marketplace.json, harness SKILL.md files). CLI and Chrome extension unchanged. - Remove prefixed universal zip bundle and all related code: factory.js prefix/outputSuffix options, zip.js variant pass, utils.js prefixSkillReferences, the "universal-prefixed" entry in download-providers.js, and the matching test suite in utils.test.js. - Redesign Get Started step 1 "Install the skill and CLI": two terminal rows (npx skills + npm i -g impeccable) with paired notes, drop the Recommended badge. - Collapse "Other install methods" back into a
      element so the primary install path is the first thing users see. - Simplify step 3 to "Add the Chrome extension": remove the CLI tool block (now in step 1), use standard .btn .btn-primary for the CTA so it matches other primary buttons (square corners, accent slide-up hover), and lay out the preview screenshot next to the button instead of stacked so the screenshot no longer dominates vertical space. - CLAUDE.md: rewrite with v3.0 architecture, the "no em dash also means no --" rule, the harness-dirs-are-tracked gotcha, the named-export test-spy warning, and the evals inline-skill.ts sync note. - AGENTS.md, DEVELOP.md: drop prefixed variant references. Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/SKILL.md | 2 +- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .claude/skills/impeccable/SKILL.md | 2 +- .codex/skills/impeccable/SKILL.md | 2 +- .cursor/skills/impeccable/SKILL.md | 2 +- .gemini/skills/impeccable/SKILL.md | 2 +- .kiro/skills/impeccable/SKILL.md | 2 +- .opencode/skills/impeccable/SKILL.md | 2 +- .pi/skills/impeccable/SKILL.md | 2 +- .rovodev/skills/impeccable/SKILL.md | 2 +- .trae-cn/skills/impeccable/SKILL.md | 2 +- .trae/skills/impeccable/SKILL.md | 2 +- AGENTS.md | 256 ++------------------------- CLAUDE.md | 125 ++++++++++--- DEVELOP.md | 3 +- lib/download-providers.js | 1 - public/app.js | 4 +- public/css/main.css | 125 +++++++++---- public/index.html | 179 ++++++++++--------- scripts/build.js | 42 ++--- scripts/lib/transformers/factory.js | 15 +- scripts/lib/utils.js | 42 +---- scripts/lib/zip.js | 1 - tests/lib/utils.test.js | 58 +----- 25 files changed, 345 insertions(+), 532 deletions(-) diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index 14acacac2..3763c7471 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 7fcd222d2..15754b175 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -12,7 +12,7 @@ { "name": "impeccable", "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", - "version": "2.1.1", + "version": "3.0.0", "author": { "name": "Paul Bakaus", "email": "paul@paulbakaus.com" diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 25dce892c..a42ac27a3 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "impeccable", "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", - "version": "2.1.1", + "version": "3.0.0", "author": { "name": "Paul Bakaus", "email": "paul@paulbakaus.com" diff --git a/.claude/skills/impeccable/SKILL.md b/.claude/skills/impeccable/SKILL.md index 5c0676008..182c33604 100644 --- a/.claude/skills/impeccable/SKILL.md +++ b/.claude/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/.codex/skills/impeccable/SKILL.md b/.codex/skills/impeccable/SKILL.md index b96bef77e..f49846747 100644 --- a/.codex/skills/impeccable/SKILL.md +++ b/.codex/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- diff --git a/.cursor/skills/impeccable/SKILL.md b/.cursor/skills/impeccable/SKILL.md index 79ed6debb..f3baccb6a 100644 --- a/.cursor/skills/impeccable/SKILL.md +++ b/.cursor/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- diff --git a/.gemini/skills/impeccable/SKILL.md b/.gemini/skills/impeccable/SKILL.md index 49b489705..ed6950695 100644 --- a/.gemini/skills/impeccable/SKILL.md +++ b/.gemini/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 --- This skill guides creation and editing/iteration of distinctive, production-grade frontend interfaces. Implement real working code with exceptional attention to aesthetic details and creative choices. diff --git a/.kiro/skills/impeccable/SKILL.md b/.kiro/skills/impeccable/SKILL.md index 80efc2f9a..e06824c74 100644 --- a/.kiro/skills/impeccable/SKILL.md +++ b/.kiro/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- diff --git a/.opencode/skills/impeccable/SKILL.md b/.opencode/skills/impeccable/SKILL.md index 219cb7402..6d274ae73 100644 --- a/.opencode/skills/impeccable/SKILL.md +++ b/.opencode/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/.pi/skills/impeccable/SKILL.md b/.pi/skills/impeccable/SKILL.md index ea2f01ccd..be8ec284a 100644 --- a/.pi/skills/impeccable/SKILL.md +++ b/.pi/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. allowed-tools: - Bash(npx impeccable *) diff --git a/.rovodev/skills/impeccable/SKILL.md b/.rovodev/skills/impeccable/SKILL.md index 5a380eafa..b42e08bfb 100644 --- a/.rovodev/skills/impeccable/SKILL.md +++ b/.rovodev/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/.trae-cn/skills/impeccable/SKILL.md b/.trae-cn/skills/impeccable/SKILL.md index 5ef54ec67..177238ebb 100644 --- a/.trae-cn/skills/impeccable/SKILL.md +++ b/.trae-cn/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/.trae/skills/impeccable/SKILL.md b/.trae/skills/impeccable/SKILL.md index 005f325c3..d97a8e5ce 100644 --- a/.trae/skills/impeccable/SKILL.md +++ b/.trae/skills/impeccable/SKILL.md @@ -1,7 +1,7 @@ --- name: impeccable description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." -version: 2.1.1 +version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. diff --git a/AGENTS.md b/AGENTS.md index 6252f0cb8..954bc3df1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,250 +1,32 @@ -# Impeccable +# Repository Guidelines -The vocabulary you didn't know you needed. 1 skill, 20 commands, and curated anti-patterns for impeccable style. Works with Cursor, Claude Code, Gemini CLI, and Codex CLI. +## Project Structure & Module Organization -## Repository Purpose +`source/` is the source of truth. Author skills in `source/skills/impeccable/` and keep provider output in `dist/` generated, not hand-edited. Build logic lives in `scripts/`, with provider configs in `scripts/lib/transformers/`. Runtime detection code ships from `src/`. The website lives in `public/`, local API/dev serving lives in `server/`, and regression coverage lives in `tests/` with fixtures under `tests/fixtures/`. -Maintain a **single source of truth** for design-focused skills and commands, then automatically transform them into provider-specific formats. Each provider has different capabilities (frontmatter, arguments, modular files), so we use a build system to generate appropriate outputs. +## Build, Test, and Development Commands -## Architecture: Option A (Feature-Rich Source) +- `bun run dev` - start the local Bun server. +- `bun run build` - regenerate `dist/`, derived site assets, and validation output. +- `bun run rebuild` - clean and rebuild everything from scratch. +- `bun test tests/build.test.js` - run a focused Bun test. +- `bun run test` - run the full Bun + Node test suite. +- `bun run build:browser` / `bun run build:extension` - rebuild browser-specific bundles. -We use a **feature-rich source format** that gets transformed for each provider: +Run `bun run build` after changing anything in `source/`, transformer code, or user-facing counts. -- **Source files** (`source/`): Full metadata with YAML frontmatter, args, descriptions -- **Build system** (`scripts/`): Transforms source → provider-specific formats -- **Distribution** (`dist/`): Committed output files for 4 providers +## Coding Style & Naming Conventions -### Why Option A? +Use ESM, semicolons, and the existing two-space indentation style in JS, HTML, and CSS. Prefer small, single-purpose modules over large abstractions. Keep filenames descriptive and lowercase with hyphens where needed; skill entrypoints stay as `SKILL.md`, helper scripts use `.js` or `.mjs`. In source frontmatter, use clear kebab-case names and concise descriptions. There is no dedicated formatter or linter configured here, so match surrounding code closely. -Cursor doesn't support frontmatter or arguments (lowest common denominator). Instead of limiting all providers, we: -1. Author with full metadata in source files -2. Generate full-featured versions for providers that support it (Claude Code, Gemini, Codex) -3. Generate downgraded versions for Cursor (strip frontmatter, rely on appending) +## Testing Guidelines -## Repository Structure +Tests use Bun’s test runner plus Node’s built-in `--test`. Name tests `*.test.js` or `*.test.mjs` and place new fixtures near the behavior they cover, usually under `tests/fixtures/`. Prefer targeted test runs while iterating, then finish with `bun run test`. If you change generated outputs or provider transforms, verify both source parsing and at least one affected provider path in `dist/`. -``` -impeccable/ -├── source/ # EDIT THESE! Single source of truth -│ ├── commands/ # Command definitions with frontmatter -│ │ └── normalize.md -│ └── skills/ # Skill definitions with frontmatter -│ └── impeccable/ -├── dist/ # Generated outputs (committed for users) -│ ├── cursor/ # Commands + Agent Skills -│ │ └── .cursor/ -│ │ ├── commands/*.md -│ │ └── skills/*/SKILL.md -│ ├── claude-code/ # Full featured -│ │ └── .claude/ -│ │ ├── commands/*.md -│ │ └── skills/*/SKILL.md -│ ├── gemini/ # TOML commands + modular skills -│ │ ├── .gemini/ -│ │ │ └── commands/*.toml -│ │ ├── GEMINI.md -│ │ └── GEMINI.*.md -│ └── codex/ # Custom prompts + Agent Skills -│ └── .codex/ -│ ├── prompts/*.md -│ └── skills/*/SKILL.md -├── api/ # Vercel Functions (production) -│ ├── skills.js # GET /api/skills -│ ├── commands.js # GET /api/commands -│ └── download/ -│ ├── [type]/[provider]/[id].js # Individual downloads -│ └── bundle/[provider].js # Bundle downloads -├── public/ # Website for impeccable.style -│ ├── index.html # Main page -│ ├── css/ # Modular CSS (9 files) -│ │ ├── main.css # Entry point with imports -│ │ ├── tokens.css # Design system -│ │ └── ... # Component styles -│ └── app.js # Vanilla JS -├── server/ # Bun server (local dev only) -│ ├── index.js # Serves website + API routes -│ └── lib/ -│ └── api-handlers.js # Shared API logic (used by both server & functions) -├── scripts/ # Build system (Bun) -│ ├── build.js # Main orchestrator -│ ├── lib/ -│ │ ├── utils.js # Shared utilities -│ │ ├── zip.js # ZIP generation -│ │ └── transformers/ # Provider-specific transformers -│ │ ├── cursor.js -│ │ ├── claude-code.js -│ │ ├── gemini.js -│ │ └── codex.js -├── README.md # End user documentation -├── DEVELOP.md # Contributor documentation -└── package.json # Bun scripts -``` +## Commit & Pull Request Guidelines -## Website (impeccable.style) +Recent history favors short, imperative subjects such as `Fix: ...`, `Add ...`, `Improve ...`, or `Bump ...`. Keep commits focused and explain the user-facing impact when it is not obvious. PRs should summarize what changed, list validation performed, and call out regenerated artifacts like `dist/` or `build/`. Include screenshots for visible `public/` changes and mention affected providers when transform behavior changes. -**Tech Stack:** -- Vanilla JavaScript (no frameworks) -- Modern CSS with Bun's bundler (nesting, OKLCH colors, @import) -- **Local Development**: Bun server with native routes (`server/index.js`) -- **Production**: Vercel Functions with Bun runtime (`/api` directory) -- Deployed on Vercel with Bun runtime - -**Dual Setup:** -- `/api` directory contains individual Vercel Functions for production -- `/server` directory contains monolithic Bun server for local development -- `/server/lib/api-handlers.js` contains shared logic used by both -- Zero duplication: API functions and dev server import the same handlers - -**Design:** -- Editorial precision aesthetic -- Cormorant Garamond (display) + Instrument Sans (body) -- OKLCH color space for vibrant, perceptually uniform colors -- Editorial sidebar layout (title left, content right) -- Modular CSS architecture (9 files) - -**API Endpoints** (Vercel Functions): -- `/` - Homepage (static HTML) -- `/api/skills` - JSON list of all skills -- `/api/commands` - JSON list of all commands -- `/api/download/[type]/[provider]/[id]` - Individual file download -- `/api/download/bundle/[provider]` - ZIP bundle download - -## Source File Format - -### Commands (`source/commands/*.md`) - -```yaml ---- -name: command-name -description: Clear description of what this command does -args: - - name: argname - description: Argument description - required: false ---- - -Command prompt here. Use {{argname}} placeholders for arguments. -``` - -### Skills (`source/skills/*.md`) - -```yaml ---- -name: skill-name -description: Clear description of what this skill provides -license: License info (optional) ---- - -Skill instructions for the LLM here. -``` - -## Build System - -Uses **Bun** for fast builds. Modular architecture: - -- **`utils.js`**: Shared functions (parseFrontmatter, readSourceFiles, writeFile, etc.) -- **Transformer pattern**: Each provider has one focused file -- **Registry**: `transformers/index.js` exports all transformers -- **Main script**: `build.js` orchestrates everything (~50 lines) - -Run: `bun run build` - -## Provider Transformations - -### 1. Cursor (Agent Skills Standard) -- **Commands**: Body only → `dist/cursor/.cursor/commands/*.md` (no frontmatter support) -- **Skills**: Agent Skills standard → `dist/cursor/.cursor/skills/{name}/SKILL.md` - - Full YAML frontmatter with name/description - - Reference files in skill subdirectories -- **Installation**: Extract ZIP into your project root, creates `.cursor/` folder -- **Note**: Agent Skills require Cursor nightly channel - -### 2. Claude Code (Full Featured) -- **Commands**: Full YAML frontmatter → `dist/claude-code/.claude/commands/*.md` -- **Skills**: Full YAML frontmatter → `dist/claude-code/.claude/skills/{name}/SKILL.md` -- **Preserves**: All metadata, all args -- **Format**: Matches [Anthropic Skills spec](https://github.com/anthropics/skills) -- **Installation**: Extract ZIP into your project root, creates `.claude/` folder - -### 3. Gemini CLI (Full Featured) -- **Commands**: TOML format → `dist/gemini/.gemini/commands/*.toml` - - Uses `description` and `prompt` keys - - Transforms `{{argname}}` → `{{args}}` (Gemini uses single args string) -- **Skills**: Modular with imports → `dist/gemini/GEMINI.{name}.md` (root level) - - Main `GEMINI.md` uses `@./GEMINI.{name}.md` import syntax - - Gemini automatically loads imported files -- **Installation**: Extract ZIP into your project root, creates `.gemini/` folder + skill files - -### 4. Codex CLI (Full Featured) -- **Commands**: Custom prompt format → `dist/codex/.codex/prompts/*.md` - - Uses `description` and `argument-hint` in frontmatter - - Transforms `{{argname}}` → `$ARGNAME` (uppercase variables) - - Invoked as `/prompts:` -- **Skills**: Agent Skills standard → `dist/codex/.codex/skills/{name}/SKILL.md` - - Same SKILL.md format as Claude Code with YAML frontmatter - - Reference files in skill subdirectories -- **Installation**: Extract ZIP into your project root, creates `.codex/` folder - -## Key Design Decisions - -### Why commit dist/? -End users can copy files directly without needing build tools. - -### Why separate transformers? -- Each provider ~30-85 lines, easy to understand -- Can modify one without affecting others -- Easy to add new providers - -### Why Bun? -- Much faster than Node.js (2-4x) -- All-in-one toolkit (runtime + package manager) -- Zero config, TypeScript native -- Node.js compatible (works with existing code) - -### Why modular skills for Gemini/Codex? -- Better context management (load only what's needed) -- Cleaner file organization -- Gemini: Uses native `@file.md` import feature -- Codex: Uses routing pattern with AGENTS.md guide - -### Why vanilla JS for website? -- No build complexity -- Bun handles everything natively -- Modern features (ES6+, CSS nesting, OKLCH colors) -- Fast, lean, maintainable - -## Adding New Content - -1. **Create source file** in `source/commands/` or `source/skills/` -2. **Add frontmatter** with name, description, args (for commands) or license (for skills) -3. **Write body** with instructions/prompt -4. **Build**: `bun run build` -5. **Test** with your provider -6. **Commit** both source and dist files - -## Important Notes - -- **Source is truth**: Always edit `source/`, never edit `dist/` directly -- **Test across providers**: Changes affect 4 different outputs -- **Argument handling**: Write prompts that work with both placeholders and appending -- **Cursor limitations**: No frontmatter/args, so design for graceful degradation - -## Documentation - -- **README.md**: End user guide (installation, usage, quick dev setup) -- **DEVELOP.md**: Contributor guide (architecture, build system, adding content) -- **This file (AGENTS.md)**: Context for AI assistants and new developers - -## Provider Documentation Links - -- [Agent Skills Specification](https://agentskills.io/specification) - Open standard -- [Cursor Commands](https://cursor.com/docs/agent/chat/commands) -- [Cursor Rules](https://cursor.com/docs/context/rules) -- [Cursor Skills](https://cursor.com/docs/context/skills) -- [Claude Code Slash Commands](https://code.claude.com/docs/en/slash-commands) -- [Anthropic Skills](https://github.com/anthropics/skills) -- [Gemini CLI Custom Commands](https://cloud.google.com/blog/topics/developers-practitioners/gemini-cli-custom-slash-commands) -- [Gemini CLI GEMINI.md](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/gemini-md.md) -- [Codex CLI Slash Commands](https://developers.openai.com/codex/guides/slash-commands) -- [Codex CLI Skills](https://developers.openai.com/codex/skills/) +## Contributor Notes +Do not edit generated provider files directly unless you are intentionally patching generated output as part of a build-system change. Prefer fixing the root source in `source/`, `scripts/`, or `src/`, then regenerate artifacts. diff --git a/CLAUDE.md b/CLAUDE.md index 87349124c..c89f6ed1a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,17 +1,39 @@ # Project Instructions for Claude +## Architecture (v3.0+) + +There is **one** user-invocable skill, `impeccable`, with **20 commands** underneath it. Users type `/impeccable polish`, `/impeccable audit`, etc. The skill is defined in `source/skills/impeccable/`: + +- `SKILL.md` — frontmatter (with the auto-trigger-optimized description and the `allowed-tools` list), shared design principles, and the **Command Router** section that dispatches sub-commands via argument matching. +- `reference/` — one `.md` per command (`audit.md`, `polish.md`, `critique.md`, etc.) plus the domain reference files (`typography.md`, `color-and-contrast.md`, etc.). When a sub-command is matched, the router loads its reference file. +- `scripts/command-metadata.json` — single source of truth for each command's description, argument hint, and (eventually) category. Both the build and `pin.mjs` read from this. +- `scripts/pin.mjs` — creates/removes lightweight redirect shims so users can have `/audit` as a standalone shortcut that delegates to `/impeccable audit`. +- `scripts/cleanup-deprecated.mjs` — runs once after an update to remove leftover files from renamed/merged commands. + +**Do not add standalone skills** unless there's a strong reason. The consolidation was deliberate: the `/` menu pollution problem is real and gets worse as users install more plugins. + ## CSS -Plain hand-written CSS, no Tailwind, no build step. Bun's HTML loader resolves -`` and inlines `@import` chains automatically for both -`bun run dev` and `bun run build`. +Plain hand-written CSS, no Tailwind, no build step. Bun's HTML loader resolves `` and inlines `@import` chains automatically for both `bun run dev` and `bun run build`. The CSS architecture: -- `public/css/main.css` - Main entry point, imports the partials and defines tokens/reset -- `public/css/workflow.css` - Commands section, glass terminal, case studies styles -- `public/css/gallery.css`, `skill-demos.css`, `problem-section.css` - section partials +- `public/css/main.css` — Main entry point, imports the partials and defines tokens/reset +- `public/css/workflow.css` — Commands section, glass terminal, magazine spread styles +- `public/css/sub-pages.css` — `/docs`, `/anti-patterns`, `/tutorials`, detail pages +- `public/css/tokens.css` — OKLCH color tokens (ink, charcoal, ash, mist, cream, accent) -Edit any of these directly and reload — no rebuild needed. +Edit any of these directly and reload. No rebuild needed for CSS changes. + +## Color token rule + +- **`--color-ink`** (10% lightness) is for body copy. Use it even for small text. +- **`--color-charcoal`** (25% lightness) reads as washed-out gray in small text. Only use for headings or larger body copy at ≥16px. +- **`--color-ash`** (55%) is for secondary labels, captions, relationship meta lines. +- **Never use pure black or pure white.** Use the tinted tokens. + +## No em dashes, no `--` either + +CLAUDE.md feedback from multiple sessions: "no em dashes in project copy" does NOT mean "replace with `--`". It means **use actual punctuation**: commas, colons, semicolons, periods, parentheses. The `--` substitution makes the problem worse. The build validator (`validateNoEmDashes` in `scripts/build.js`) catches real em dashes but not the `--` double-hyphen habit, so you have to catch yourself. ## Development Server @@ -20,6 +42,10 @@ bun run dev # Bun dev server at http://localhost:3000 bun run preview # Build + Cloudflare Pages local preview ``` +The dev server (in `server/index.js`) runs `generateSubPages` at module load, so editing source files in `content/site/skills/`, `source/skills/impeccable/`, or the sub-page generator requires a **server restart** (not just a browser reload) to see the change. CSS hot-reloads fine without a restart. + +**Legacy URL redirects** live in `server/index.js` and must stay in sync with `scripts/build.js` `_redirects` generation. Current redirects: `/skills` → `/docs`, `/skills/:id` → `/docs/:id`, `/cheatsheet` → `/docs`, `/gallery` → `/visual-mode#try-it-live`. + ## Deployment Hosted on Cloudflare Pages. Static assets served from `build/`, API routes handled via `_redirects` rewrites (JSON) and Pages Functions (downloads). @@ -30,7 +56,7 @@ bun run deploy # Build + deploy to Cloudflare Pages ## Build System -The build system compiles skills and commands from `source/` to provider-specific formats in `dist/`: +The build system compiles the impeccable skill from `source/` to provider-specific formats in `dist/`: ```bash bun run build # Build all providers @@ -38,9 +64,22 @@ bun run rebuild # Clean and rebuild ``` Source files use placeholders that get replaced per-provider: -- `{{model}}` - Model name (Claude, Gemini, GPT, etc.) -- `{{config_file}}` - Config file name (CLAUDE.md, .cursorrules, etc.) -- `{{ask_instruction}}` - How to ask user questions +- `{{model}}` — Model name (Claude, Gemini, GPT, etc.) +- `{{config_file}}` — Config file name (CLAUDE.md, .cursorrules, etc.) +- `{{ask_instruction}}` — How to ask user questions +- `{{command_prefix}}` — `/` or `$` depending on provider +- `{{available_commands}}` — auto-populated list of commands (from `IMPECCABLE_SUB_COMMANDS` in `scripts/lib/utils.js`) +- `{{scripts_path}}` — provider-aware path to the skill's scripts directory + +### Harness output directories are tracked + +`.claude/skills/`, `.cursor/skills/`, `.agents/skills/`, and the other 8 harness directories are **intentionally committed to the repo**. `npx skills` reads them directly from this repo at install time, and they enable clean submodule use. Do not gitignore them. Run `bun run build` to refresh them after editing `source/skills/`. + +Local state files inside harness directories (e.g. `.claude/scheduled_tasks.lock`, `.claude/settings.local.json`) ARE gitignored. + +### Generated sub-pages are gitignored + +`public/docs/`, `public/anti-patterns/`, `public/tutorials/`, `public/visual-mode/` are generated by `scripts/build-sub-pages.js` on dev server startup and during `bun run build`. They're gitignored because the production site (Cloudflare Pages) runs its own build and nobody consumes them directly from git. ## Testing @@ -48,7 +87,9 @@ Source files use placeholders that get replaced per-provider: bun run test # Run all tests ``` -Unit tests (build, detector logic) run via `bun test`. Fixture tests (jsdom-based HTML detection) run via `node --test` because bun is too slow with jsdom. The `test` script handles this split automatically. +Unit tests (build orchestration, detector logic) run via `bun test`. Fixture tests (jsdom-based HTML detection) run via `node --test` because bun is too slow with jsdom. The `test` script handles this split automatically. + +**Important:** `tests/build.test.js` uses `spyOn(transformers, 'transformCursor')` with the named exports from `scripts/lib/transformers/index.js`. Those named exports (`transformCursor`, `transformClaudeCode`, etc.) are kept specifically for test spying, even though `build.js` itself uses `createTransformer + PROVIDERS` directly. **Do not delete them as "dead code"** — I made that mistake once and broke 8 tests. ## CLI @@ -81,37 +122,57 @@ There are three independently versioned components. Only bump the one(s) that ac **Skills** (Claude Code plugin / skill definitions): - `.claude-plugin/plugin.json` → `version` - `.claude-plugin/marketplace.json` → `plugins[0].version` -- Bump when: skill content changes (`source/skills/`, skill count changes, etc.) +- Bump when: skill content changes (`source/skills/`, reference files, command metadata, etc.) **Chrome extension**: - `extension/manifest.json` → `version` - Bump when: extension code changes (`extension/`) **Website changelog** (`public/index.html`): -- Hero version link text + new changelog entry +- Hero version link text + new changelog entry in the changelog section - Update for user-facing changes only, not internal build/tooling details -- Use the most prominent version that changed (e.g. skills version for skill consolidation) +- Use the most prominent version that changed (skills version is usually the right one) -## Adding New Sub-commands +## Adding New Commands -All commands are accessed through `/impeccable`. To add a new one: +All commands live under `/impeccable`. To add a new one: -1. Create `source/skills/impeccable/reference/.md` with the command's instructions +1. Create `source/skills/impeccable/reference/.md` with the command's instructions (this is what the LLM loads when the command is invoked) 2. Add a row to the **Sub-command reference table** in `source/skills/impeccable/SKILL.md` 3. Add an entry to the **Command menu** section in the same file 4. Add the command name to `IMPECCABLE_SUB_COMMANDS` in `scripts/lib/utils.js` 5. Add it to `VALID_COMMANDS` in `source/skills/impeccable/scripts/pin.mjs` -6. Add its metadata to `source/skills/impeccable/scripts/command-metadata.json` +6. Add its metadata (description + argumentHint) to `source/skills/impeccable/scripts/command-metadata.json` +7. Add its category to `SKILL_CATEGORIES` in `scripts/lib/sub-pages-data.js` +8. Add its relationships (leadsTo / pairs / combinesWith) to `COMMAND_RELATIONSHIPS` in the same file +9. Add the same category entry to `public/js/data.js` `commandCategories` and `commandProcessSteps` (for the homepage carousel) +10. Add symbol + number to `commandSymbols` and `commandNumbers` in `public/js/components/framework-viz.js` (periodic table) +11. Optional: write an editorial wrapper at `content/site/skills/.md` with a short `tagline` and expanded body (When to use it / How it works / Try it / Pitfalls) -The build system counts commands from the router table automatically. Update the command count in **all** of these locations: +The build system counts commands from the router table automatically. Update the command count in **all** of these locations when the total changes: -- `public/index.html` -- meta descriptions, hero box, section lead -- `public/cheatsheet.html` -- meta description, subtitle -- `README.md` -- intro, command count, commands table -- `NOTICE.md` -- command count -- `AGENTS.md` -- intro command count -- `.claude-plugin/plugin.json` -- description -- `.claude-plugin/marketplace.json` -- metadata description + plugin description +- `public/index.html` — meta descriptions, hero box, section lead +- `public/cheatsheet.html` does not exist anymore; `/cheatsheet` redirects to `/docs` +- `README.md` — intro, command count, commands table +- `NOTICE.md` — command count +- `AGENTS.md` — intro command count +- `.claude-plugin/plugin.json` — description +- `.claude-plugin/marketplace.json` — metadata description + plugin description + +The build validator (`generateCounts` in `scripts/build.js`) checks these files for stale numeric counts and fails the build if any disagree with the router table. + +## Adding editorial content for existing commands + +Editorial files live at `content/site/skills/.md` and have a `tagline` frontmatter plus a body with the standard four sections: + +- **When to use it** — the specific scenarios this command owns +- **How it works** — the internal process, phases, or approach +- **Try it** — one or two concrete examples with expected output +- **Pitfalls** — real failure modes, with alternatives to reach for instead + +The tagline is used by UI surfaces (magazine spread, docs cards) that need a short human-friendly label. The long description in `command-metadata.json` stays optimized for auto-trigger keyword matching in the AI harness. + +Every command should have an editorial file eventually, but the build does not require one: commands without editorials fall back to the frontmatter description. ## Evals Framework (private, gitignored) @@ -119,6 +180,16 @@ There is a controlled eval framework at `evals/` that measures whether the `/imp **If you're picking up eval work in a new session, read `evals/AGENT.md` first.** It captures everything we've learned: model choices, sample size policy, lessons learned, common workflows, and gotchas. Don't try to reinvent the workflow from scratch — there's significant prior context. +### After structural skill changes, update `evals/runner/inline-skill.ts` + +The eval harness inlines `SKILL.md` into the system prompt for the "skill-on" condition, stripping sections that are irrelevant to an API-driven craft run. The stripped sections list (`sectionsToStrip` in `inline-skill.ts`) needs to stay in sync with `SKILL.md`'s top-level `##` headings. As of v3.0, it strips: + +- `## Context Gathering Protocol` — references a `.impeccable.md` file that doesn't exist in the test harness +- `## Command Router` — sub-command dispatch is meaningless for a single API call +- `## Pin / Unpin` — harness tooling, not design instruction + +If you add or rename a top-level section in `SKILL.md`, check whether `inline-skill.ts` needs updating. A stale strip list either leaves noise in the prompt or accidentally strips useful content. + ### Quick orientation - **Primary baseline model**: `gpt-5.4` with `--reasoning-effort medium`. Frontier intelligence at ~5-10× lower cost than high reasoning. **Do NOT use `--reasoning-effort high`** unless you specifically need it — reasoning tokens count against `max_completion_tokens` and burn ~$1-2/file with no quality benefit for our use case. diff --git a/DEVELOP.md b/DEVELOP.md index 96627c70c..ba594cf06 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -68,7 +68,7 @@ source/ -> dist/ skills/{name}/SKILL.md {provider}/{configDir}/skills/{name}/SKILL.md ``` -Each provider gets its own output directory. Two variants are generated per provider: unprefixed and prefixed (with `i-` prefix for skill names). +Each provider gets its own output directory. ## Build System Details @@ -130,7 +130,6 @@ scripts/ - `readSourceFiles()`: Reads all skill directories from `source/skills/` - `replacePlaceholders()`: Substitutes `{{model}}`, `{{config_file}}`, etc. per provider - `generateYamlFrontmatter()`: Serializes objects to YAML frontmatter (auto-quotes values starting with `[` or `{`) -- `prefixSkillReferences()`: Replaces `/skillname` with `/i-skillname` for prefixed variants ## Best Practices diff --git a/lib/download-providers.js b/lib/download-providers.js index b7f6917cd..cca47b27a 100644 --- a/lib/download-providers.js +++ b/lib/download-providers.js @@ -15,7 +15,6 @@ export const FILE_DOWNLOAD_PROVIDERS = Object.freeze( export const BUNDLE_DOWNLOAD_PROVIDERS = Object.freeze([ 'universal', - 'universal-prefixed', ]); export const DOWNLOAD_PROVIDERS = Object.freeze([ diff --git a/public/app.js b/public/app.js index 280189f5b..1b54a7054 100644 --- a/public/app.js +++ b/public/app.js @@ -170,8 +170,8 @@ function renderPatternsWithTabs(patterns, antipatterns) { // ============================================ // Handle bundle download clicks via event delegation. -// Each download button carries the full bundle name in data-bundle (e.g. -// "universal" or "universal-prefixed") so the handler is just a redirect. +// Each download button carries the full bundle name in data-bundle +// (currently just "universal") so the handler is just a redirect. document.addEventListener("click", (e) => { const bundleBtn = e.target.closest("[data-bundle]"); if (bundleBtn) { diff --git a/public/css/main.css b/public/css/main.css index d2c15a660..43dfa0fc0 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2785,59 +2785,46 @@ code { } .install-primary-alts { - display: flex; - flex-direction: column; - gap: var(--spacing-lg); min-width: 0; } -/* Collapsible "other install methods" under the main install card. */ -.install-alts-collapse { - margin-top: var(--spacing-md); - border-top: 1px solid var(--color-mist); +/* "Other install methods" is a collapsed
      panel that sits + directly under the main install card. The alternatives are worth + keeping discoverable but don't need to be visible by default. */ +.install-primary-main > .install-primary-alts { + margin-top: var(--spacing-lg); padding-top: var(--spacing-md); + border-top: 1px solid var(--color-mist); } -.install-alts-collapse[open] { - padding-bottom: var(--spacing-sm); +.install-primary-alts[open] > .install-alts-summary > .install-alts-arrow { + transform: rotate(90deg); } .install-alts-summary { display: flex; align-items: center; - justify-content: space-between; - gap: var(--spacing-sm); - cursor: pointer; + gap: var(--spacing-xs); list-style: none; - padding: 0.25rem 0; - user-select: none; + cursor: pointer; + padding: 2px 0; } .install-alts-summary::-webkit-details-marker { display: none; } -.install-alts-summary-label { - font-family: var(--font-body); - font-size: 0.6875rem; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.08em; +.install-alts-arrow { color: var(--color-ash); + transition: transform var(--duration-fast) var(--ease-out, ease); } -.install-alts-chevron { - color: var(--color-ash); - transition: transform 0.2s ease; - flex-shrink: 0; +.install-primary-alts[open] > .install-alts-summary { + margin-bottom: var(--spacing-md); } -.install-alts-collapse[open] .install-alts-chevron { - transform: rotate(180deg); -} - -.install-alts-collapse[open] .install-primary-alts { - margin-top: var(--spacing-md); +.install-primary-alts[open] > .install-alt-method + .install-alt-method { + margin-top: var(--spacing-lg); } /* Editorial "How to use" step list on the right side of the install row. @@ -2956,6 +2943,42 @@ code { min-width: 0; } +/* Solo install-tool (no grid wrapper) — used when step 3 is Chrome-only. + The preview screenshot sits to the left of the CTA button so neither + dominates vertical space. Collapses to a stack on narrow screens. */ +.install-tool--solo { + flex-direction: row; + align-items: center; + gap: var(--spacing-lg); + margin-top: var(--spacing-md); + width: 100%; +} + +.install-tool--solo .install-tool-preview { + flex: 0 1 260px; + min-width: 0; + margin-top: 0; +} + +.install-tool--solo .install-tool-cta { + flex: 1 1 auto; + margin-top: 0; + width: auto; + white-space: nowrap; +} + +@media (max-width: 640px) { + .install-tool--solo { + flex-direction: column; + align-items: stretch; + } + + .install-tool--solo .install-tool-preview, + .install-tool--solo .install-tool-cta { + flex: 1 1 auto; + } +} + .install-tool-label { font-family: var(--font-body); font-size: 0.9375rem; @@ -2969,10 +2992,50 @@ code { .install-tool-desc { margin: 0; font-size: 0.8125rem; - color: var(--color-charcoal); + color: var(--color-ink); line-height: 1.55; } +/* Chrome extension screenshot preview inside the install-tool column */ +.install-tool-preview { + display: block; + margin-top: var(--spacing-sm); + border: 1px solid var(--color-mist); + border-radius: 8px; + overflow: hidden; + text-decoration: none; + background: var(--color-paper); + transition: border-color var(--duration-fast) var(--ease-out, ease), + transform var(--duration-fast) var(--ease-out, ease); +} + +.install-tool-preview:hover { + border-color: var(--color-accent); + transform: translateY(-1px); +} + +.install-tool-preview img { + display: block; + width: 100%; + height: auto; +} + +.install-tool-preview-caption { + display: block; + padding: 0.4rem 0.75rem; + font-family: var(--font-body); + font-size: 0.75rem; + color: var(--color-ash); + border-top: 1px solid var(--color-mist); +} + +/* "Install from Chrome Web Store" uses the standard .btn .btn-primary + styles; this modifier only adds layout (full width + top spacing). */ +.install-tool-cta { + margin-top: var(--spacing-sm); + width: 100%; +} + .install-alts-label { display: block; font-family: var(--font-mono); diff --git a/public/index.html b/public/index.html index 387083c39..867da43d8 100644 --- a/public/index.html +++ b/public/index.html @@ -117,7 +117,7 @@
    - +
    @@ -329,10 +329,10 @@
    - +
    -

    1Install the skill Recommended

    -

    One agent skill that teaches your AI to design, with 20 commands bundled inside.

    +

    1Install the skill and CLI

    +

    One agent skill that teaches your AI to design, with 20 commands bundled inside. Plus the CLI that powers visual mode and scans files outside the skill.

    @@ -355,51 +355,54 @@
    Works with Cursor, Claude Code, Gemini CLI, Codex CLI, and more.
    +
    +
    + $ + npm i -g impeccable + +
    + Recommended for visual mode and anti-pattern scans. +
    -
    +
    - Other install methods - + Other install methods + -
    -
    - Claude Code plugin -
    - $ - /plugin marketplace add pbakaus/impeccable - -
    - Then open /plugin in Claude Code -
    -
    - Manual download all 11 providers - +
    + Claude Code plugin +
    + $ + /plugin marketplace add pbakaus/impeccable +
    + Then open /plugin in Claude Code +
    + +
    + Manual download all 11 providers +
    @@ -433,40 +436,23 @@
    - +
    -

    3Add the anti-pattern tools Optional

    +

    3Add the Chrome extension Optional

    -

    Two ways to catch AI slop outside the skill: a CLI for the terminal and a Chrome extension for any webpage. Both catch gradient text, AI color palettes, nested cards, low contrast, and 20+ more rules.

    +

    Click the toolbar icon on any page and every anti-pattern lights up right where it lives. Catches gradient text, AI color palettes, nested cards, low contrast, and 20+ more rules. Works on localhost, staging, production, or anyone else's site.

    -
    -
    -
    CLI Beta
    -

    Scan files, directories, or live URLs from the terminal. Drop into CI pipelines, pre-commit hooks, or one-off audits.

    -
    -
    - $ - npm i -g impeccable - -
    - Or use npx impeccable detect src/ without installing. -
    - -
    - -
    -
    Chrome extension
    -

    Click the toolbar icon on any page and every anti-pattern lights up right where it lives. Works on localhost, staging, production, or anyone else's site.

    - -
    +
    @@ -519,36 +505,49 @@
    - v2.1 - April 9, 2026 + v3.0 + April 10, 2026
      -
    • Streamlined from 21 to 18 commands. Removed overlap and confusion: /arrange renamed to /layout, /normalize merged into /polish (design system alignment is now part of the final pass), /onboard merged into /harden (empty states and first-run experiences are part of production readiness), and /extract became /impeccable extract (a sub-mode alongside craft and teach). Every remaining command has a clearly distinct job.
    • -
    • Automatic cleanup of deprecated skills. On first load after updating, the skill detects and removes leftover files from renamed or merged commands. No manual cleanup needed.
    • -
    -
    - -
    -
    - v2.0 - April 8, 2026 -
    -
      -
    • Renamed frontend-design to impeccable. The core skill now shares its name with the project, and the teach subcommand moved from /teach-impeccable to /impeccable teach. One skill, one namespace.
    • -
    • Data-driven skill rewrite. The core skill was rebuilt against an internal eval framework that runs the same brief through frontier models with and without the skill loaded, then measures how much the output collapses into monoculture. The result: dramatically more font and color diversity, sharper overall design quality, and much stronger Codex support. The biggest unlock was an anti-attractor procedure that forces the model to enumerate and reject its reflex defaults before picking. Validated on gpt-5.4 and Qwen 3.6 Plus across 15 niches.
    • -
    • Anti-pattern detection engine. 25 deterministic rules across typography, color, layout, motion, and quality. Handles oklch, oklab, lch, and lab color formats, CSS variables inside border shorthands, gradient-backed text, and emoji-only nodes.
    • -
    • CLI: npx impeccable detect. Scans HTML, CSS, JSX/TSX, Vue, Svelte, and CSS-in-JS. Framework detection, multi-file import tracking, Puppeteer-backed live URL scanning, CI-ready JSON output, and a --fast regex mode for huge codebases.
    • -
    • Chrome DevTools extension. One-click detection on any page: yours, staging, production, or someone else's. Reads live computed styles, surfaces findings in an interactive panel, and highlights elements on the page. In Chrome Web Store review.
    • -
    • /critique got teeth. Persona sub-agents review in parallel, score against Nielsen's heuristics, run the detector automatically, and open a live browser overlay so you can walk each finding in place.
    • -
    • New ways to create with Impeccable. /shape runs a structured discovery interview about purpose, audience, and goals, then produces a design brief before any code is written. /impeccable craft chains that brief straight into the full implementation flow so you ship a designed feature instead of a reflex card grid.
    • -
    • New docs site. Top-level Docs, Anti-Patterns, and Visual Mode sections. 18 per-skill pages with before/after demos and the canonical SKILL.md inline, two tutorials, and 38 rule cards with inline visual examples.
    • -
    • New harness: Rovo Dev. 11 supported AI tools total.
    • +
    • 18 skills became 1 skill with 20 commands. Every command now lives under /impeccable: /impeccable audit, /impeccable polish, /impeccable critique, and the rest. One entry in your / menu instead of 18, a shared design vocabulary between you and your AI, and far less namespace pollution as the plugin ecosystem grows. The autocomplete shows the full list the moment you type /impeccable.
    • +
    • Pin your favorites back as shortcuts. Run /impeccable pin audit and /audit becomes a standalone command again, without reversing the consolidation. Under the hood it writes a lightweight redirect skill that delegates to /impeccable audit, so updates to the parent skill flow through automatically. /impeccable unpin audit removes it.
    • +
    • Rewritten docs site. New /docs home with a featured home command card, dense cheatsheet-style command rows by category, and per-command detail pages. The standalone /cheatsheet was merged into /docs. URL renamed from /skills to /docs with permanent redirects so existing links keep working. The homepage install section was rebuilt 50/50 with a proper "how to use" panel explaining the mixture-of-experts model in plain language.
    • +
    • Teach runs automatically on first use. You no longer have to run /impeccable teach before anything else. Invoke any command in a fresh project and the Context Gathering Protocol kicks off the discovery interview mid-flight, then saves .impeccable.md so every future command reads it silently.
    View older releases
    +
    +
    + v2.1 + April 9, 2026 +
    +
      +
    • Streamlined from 21 to 18 commands. Removed overlap and confusion: /arrange renamed to /layout, /normalize merged into /polish (design system alignment is now part of the final pass), /onboard merged into /harden (empty states and first-run experiences are part of production readiness), and /extract became /impeccable extract (a sub-mode alongside craft and teach). Every remaining command has a clearly distinct job.
    • +
    • Automatic cleanup of deprecated skills. On first load after updating, the skill detects and removes leftover files from renamed or merged commands. No manual cleanup needed.
    • +
    +
    + +
    +
    + v2.0 + April 8, 2026 +
    +
      +
    • Renamed frontend-design to impeccable. The core skill now shares its name with the project, and the teach subcommand moved from /teach-impeccable to /impeccable teach. One skill, one namespace.
    • +
    • Data-driven skill rewrite. The core skill was rebuilt against an internal eval framework that runs the same brief through frontier models with and without the skill loaded, then measures how much the output collapses into monoculture. The result: dramatically more font and color diversity, sharper overall design quality, and much stronger Codex support. The biggest unlock was an anti-attractor procedure that forces the model to enumerate and reject its reflex defaults before picking. Validated on gpt-5.4 and Qwen 3.6 Plus across 15 niches.
    • +
    • Anti-pattern detection engine. 25 deterministic rules across typography, color, layout, motion, and quality. Handles oklch, oklab, lch, and lab color formats, CSS variables inside border shorthands, gradient-backed text, and emoji-only nodes.
    • +
    • CLI: npx impeccable detect. Scans HTML, CSS, JSX/TSX, Vue, Svelte, and CSS-in-JS. Framework detection, multi-file import tracking, Puppeteer-backed live URL scanning, CI-ready JSON output, and a --fast regex mode for huge codebases.
    • +
    • Chrome DevTools extension. One-click detection on any page: yours, staging, production, or someone else's. Reads live computed styles, surfaces findings in an interactive panel, and highlights elements on the page. In Chrome Web Store review.
    • +
    • /critique got teeth. Persona sub-agents review in parallel, score against Nielsen's heuristics, run the detector automatically, and open a live browser overlay so you can walk each finding in place.
    • +
    • New ways to create with Impeccable. /shape runs a structured discovery interview about purpose, audience, and goals, then produces a design brief before any code is written. /impeccable craft chains that brief straight into the full implementation flow so you ship a designed feature instead of a reflex card grid.
    • +
    • New docs site. Top-level Docs, Anti-Patterns, and Visual Mode sections. 18 per-skill pages with before/after demos and the canonical SKILL.md inline, two tutorials, and 38 rule cards with inline visual examples.
    • +
    • New harness: Rovo Dev. 11 supported AI tools total.
    • +
    +
    +
    v1.6.0 diff --git a/scripts/build.js b/scripts/build.js index 6636eec54..345f03f58 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -377,8 +377,8 @@ async function buildStaticSite(extraEntrypoints = []) { /** * Assemble universal directory from all provider outputs */ -function assembleUniversal(distDir, suffix = '') { - const universalDir = path.join(distDir, `universal${suffix}`); +function assembleUniversal(distDir) { + const universalDir = path.join(distDir, 'universal'); // Clean and recreate if (fs.existsSync(universalDir)) { @@ -388,7 +388,7 @@ function assembleUniversal(distDir, suffix = '') { const providerConfigs = Object.values(PROVIDERS); for (const { provider, configDir } of providerConfigs) { - const src = path.join(distDir, `${provider}${suffix}`, configDir); + const src = path.join(distDir, provider, configDir); const dest = path.join(universalDir, configDir); if (fs.existsSync(src)) { copyDirSync(src, dest); @@ -397,30 +397,28 @@ function assembleUniversal(distDir, suffix = '') { // Add a visible README so macOS users don't see an empty folder // (all provider dirs are dotfiles, hidden by default in Finder) - const prefixNote = suffix ? '\nSkills in this bundle are prefixed with i- (e.g. /i-audit) to avoid conflicts.\n' : ''; fs.writeFileSync(path.join(universalDir, 'README.txt'), -`Impeccable — Design fluency for AI harnesses +`Impeccable. Design fluency for AI harnesses. https://impeccable.style -${prefixNote} + This folder contains skills for all supported tools: - .cursor/ → Cursor - .claude/ → Claude Code - .gemini/ → Gemini CLI - .codex/ → Codex CLI - .agents/ → VS Code Copilot, Antigravity - .kiro/ → Kiro - .opencode/ → OpenCode - .pi/ → Pi - .trae-cn/ → Trae China - .trae/ → Trae International + .cursor/ -> Cursor + .claude/ -> Claude Code + .gemini/ -> Gemini CLI + .codex/ -> Codex CLI + .agents/ -> VS Code Copilot, Antigravity + .kiro/ -> Kiro + .opencode/ -> OpenCode + .pi/ -> Pi + .trae-cn/ -> Trae China + .trae/ -> Trae International To install, copy the relevant folder(s) into your project root. -These are hidden folders (dotfiles) — press Cmd+Shift+. in Finder to see them. +These are hidden folders (dotfiles). Press Cmd+Shift+. in Finder to see them. `); - const label = suffix ? ' (prefixed)' : ''; - console.log(`✓ Assembled universal${label} directory (${providerConfigs.length} providers)`); + console.log(`✓ Assembled universal directory (${providerConfigs.length} providers)`); } /** @@ -644,16 +642,14 @@ async function build() { const pluginJson = JSON.parse(fs.readFileSync(path.join(ROOT_DIR, '.claude-plugin/plugin.json'), 'utf-8')); const skillsVersion = pluginJson.version; - // Transform for each provider (unprefixed + prefixed) + // Transform for each provider for (const config of Object.values(PROVIDERS)) { const transform = createTransformer(config); transform(skills, DIST_DIR, { skillsVersion }); - transform(skills, DIST_DIR, { prefix: 'i-', outputSuffix: '-prefixed', skillsVersion }); } - // Assemble universal directory (unprefixed and prefixed) + // Assemble universal directory assembleUniversal(DIST_DIR); - assembleUniversal(DIST_DIR, '-prefixed'); // Create ZIP bundles (individual + universal) await createAllZips(DIST_DIR); diff --git a/scripts/lib/transformers/factory.js b/scripts/lib/transformers/factory.js index 5e13a4a4d..eeb1036a6 100644 --- a/scripts/lib/transformers/factory.js +++ b/scripts/lib/transformers/factory.js @@ -1,5 +1,5 @@ import path from 'path'; -import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders, prefixSkillReferences, PROVIDER_PLACEHOLDERS } from '../utils.js'; +import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders } from '../utils.js'; /** * Map from frontmatter field name to extraction spec. @@ -54,8 +54,8 @@ export function createTransformer(config) { .filter(Boolean); return function transform(skills, distDir, options = {}) { - const { prefix = '', outputSuffix = '', skillsVersion = '' } = options; - const providerDir = path.join(distDir, `${provider}${outputSuffix}`); + const { skillsVersion = '' } = options; + const providerDir = path.join(distDir, provider); const skillsDir = path.join(providerDir, `${configDir}/skills`); cleanDir(providerDir); @@ -64,13 +64,13 @@ export function createTransformer(config) { const allSkillNames = skills.map((s) => s.name); const commandNames = skills .filter((s) => s.userInvocable) - .map((s) => `${prefix}${s.name}`); + .map((s) => s.name); let refCount = 0; let scriptCount = 0; for (const skill of skills) { - const skillName = `${prefix}${skill.name}`; + const skillName = skill.name; const skillDir = path.join(skillsDir, skillName); // Build frontmatter @@ -89,13 +89,11 @@ export function createTransformer(config) { const frontmatter = generateYamlFrontmatter(frontmatterObj); // Build body - const cmdPrefix = (PROVIDER_PLACEHOLDERS[placeholderKey] || {}).command_prefix || '/'; let skillBody = replacePlaceholders(skill.body, placeholderKey, commandNames, allSkillNames); // Replace {{scripts_path}} with provider-aware path to skill's scripts directory const scriptsPath = `${configDir}/skills/${skillName}/scripts`; skillBody = skillBody.replace(/\{\{scripts_path\}\}/g, scriptsPath); - if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames, cmdPrefix); if (bodyTransform) skillBody = bodyTransform(skillBody, skill); const content = `${frontmatter}\n\n${skillBody}`; @@ -126,7 +124,6 @@ export function createTransformer(config) { const skillWord = skills.length === 1 ? 'skill' : 'skills'; const refInfo = refCount > 0 ? ` (${refCount} reference files)` : ''; const scriptInfo = scriptCount > 0 ? ` (${scriptCount} script files)` : ''; - const prefixInfo = prefix ? ` [${prefix}prefixed]` : ''; - console.log(`✓ ${displayName}${prefixInfo}: ${skills.length} ${skillWord}${refInfo}${scriptInfo}`); + console.log(`✓ ${displayName}: ${skills.length} ${skillWord}${refInfo}${scriptInfo}`); }; } diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 9ed835a30..1965a1f27 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -380,50 +380,14 @@ export const PROVIDER_PLACEHOLDERS = { /** * Replace all {{placeholder}} tokens with provider-specific values */ -/** - * Prefix skill cross-references in body text. - * Replaces patterns like `/skillname` and `the skillname skill` with prefixed versions. - * - * @param {string} content - The skill body text - * @param {string} prefix - The prefix to add (e.g., 'i-') - * @param {string[]} skillNames - Array of all skill names - * @param {string} commandPrefix - The command invocation prefix (e.g., '/' or '$') - */ -export function prefixSkillReferences(content, prefix, skillNames, commandPrefix = '/') { - if (!prefix || !skillNames || skillNames.length === 0) return content; - - let result = content; - // Sort by length descending to avoid partial matches (e.g. 'teach-impeccable' before 'teach') - const sorted = [...skillNames].sort((a, b) => b.length - a.length); - - for (const name of sorted) { - const prefixed = `${prefix}${name}`; - - // Replace command invocations (e.g., `/skillname` or `$skillname`) with prefixed versions - const escapedPrefix = escapeRegex(commandPrefix); - result = result.replace( - new RegExp(`${escapedPrefix}(?=${escapeRegex(name)}(?:[^a-zA-Z0-9_-]|$))`, 'g'), - `${commandPrefix}${prefix}` - ); - - // Replace `the skillname skill` references - result = result.replace( - new RegExp(`(the) ${escapeRegex(name)} skill`, 'gi'), - (_, article) => `${article} ${prefixed} skill` - ); - } - - return result; -} - function escapeRegex(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } const EXCLUDED_FROM_SUGGESTIONS = new Set([ - 'impeccable', 'i-impeccable', // foundational skill, not a steering command - 'teach-impeccable', 'i-teach-impeccable', // deprecated shim - 'frontend-design', 'i-frontend-design', // deprecated shim + 'impeccable', // foundational skill, not a steering command + 'teach-impeccable', // deprecated shim + 'frontend-design', // deprecated shim ]); // Sub-commands of /impeccable that should appear in {{available_commands}}. diff --git a/scripts/lib/zip.js b/scripts/lib/zip.js index 35a834272..6f563112f 100644 --- a/scripts/lib/zip.js +++ b/scripts/lib/zip.js @@ -58,5 +58,4 @@ export async function createAllZips(distDir) { console.log('\n📦 Creating ZIP bundles...'); await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal'); - await createProviderZip(path.join(distDir, 'universal-prefixed'), distDir, 'universal-prefixed'); } diff --git a/tests/lib/utils.test.js b/tests/lib/utils.test.js index 7a0664005..38bfe9f0c 100644 --- a/tests/lib/utils.test.js +++ b/tests/lib/utils.test.js @@ -10,8 +10,7 @@ import { writeFile, generateYamlFrontmatter, readPatterns, - replacePlaceholders, - prefixSkillReferences + replacePlaceholders } from '../../scripts/lib/utils.js'; // Temporary test directory @@ -687,58 +686,3 @@ describe('replacePlaceholders', () => { }); }); -describe('prefixSkillReferences', () => { - test('should prefix /skillname command references', () => { - const result = prefixSkillReferences('Run /audit to check.', 'i-', ['audit', 'polish']); - expect(result).toBe('Run /i-audit to check.'); - }); - - test('should prefix "the skillname skill" references', () => { - const result = prefixSkillReferences('Use the audit skill for checks.', 'i-', ['audit', 'polish']); - expect(result).toBe('Use the i-audit skill for checks.'); - }); - - test('should prefix multiple different references', () => { - const result = prefixSkillReferences('Run /audit then /polish. The audit skill is great.', 'i-', ['audit', 'polish']); - expect(result).toContain('/i-audit'); - expect(result).toContain('/i-polish'); - expect(result).toContain('The i-audit skill'); - }); - - test('should not partially match longer skill names', () => { - const result = prefixSkillReferences('Run /teach-impeccable command.', 'i-', ['teach', 'teach-impeccable']); - expect(result).toBe('Run /i-teach-impeccable command.'); - }); - - test('should handle case-insensitive "the X skill" matching', () => { - const result = prefixSkillReferences('The audit skill is useful.', 'i-', ['audit']); - expect(result).toBe('The i-audit skill is useful.'); - }); - - test('should return content unchanged with empty prefix', () => { - const result = prefixSkillReferences('Run /audit.', '', ['audit']); - expect(result).toBe('Run /audit.'); - }); - - test('should return content unchanged with empty skill names', () => { - const result = prefixSkillReferences('Run /audit.', 'i-', []); - expect(result).toBe('Run /audit.'); - }); - - test('should not match /skillname inside longer words', () => { - const result = prefixSkillReferences('The /auditing process.', 'i-', ['audit']); - // 'auditing' starts with 'audit' but has trailing letters — should NOT match - expect(result).toBe('The /auditing process.'); - }); - - test('should match /skillname at end of string', () => { - const result = prefixSkillReferences('Run /audit', 'i-', ['audit']); - expect(result).toBe('Run /i-audit'); - }); - - test('should match /skillname before punctuation', () => { - const result = prefixSkillReferences('Try /audit, /polish.', 'i-', ['audit', 'polish']); - expect(result).toContain('/i-audit,'); - expect(result).toContain('/i-polish.'); - }); -}); From 9341feeac14ceda92fb5f729dd135aca8e9fcda6 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sat, 11 Apr 2026 17:26:45 -0700 Subject: [PATCH 004/125] Ignore package-lock.json (project uses bun.lock) npm subprocesses can regenerate a stray package-lock.json (last time this happened, it was reverted in 3ca60a8). Add it to .gitignore so it stops showing up as untracked. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index c9ddacd18..9e7425369 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ # Dependencies node_modules/ +# npm lockfile (project uses bun.lock; npm may regenerate this as a side +# effect of npm subprocesses, but it should not be tracked) +package-lock.json + # Generated files dist/ build/ From 2c10cfb6648b6c53ccafd3a19bc4d9e10b9a36ba Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sat, 11 Apr 2026 17:29:03 -0700 Subject: [PATCH 005/125] Trim v3.0 changelog to user-facing changes only Remove "Rewritten docs site" (internal site polish, not a shipped feature) and "Teach runs automatically on first use" (not new; that behavior already existed pre-3.0). What's left is the consolidation and the pin mechanism, which are the two user-facing changes in 3.0. Co-Authored-By: Claude Opus 4.6 (1M context) --- public/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/public/index.html b/public/index.html index 867da43d8..7e0fb3a4f 100644 --- a/public/index.html +++ b/public/index.html @@ -511,8 +511,6 @@
    • 18 skills became 1 skill with 20 commands. Every command now lives under /impeccable: /impeccable audit, /impeccable polish, /impeccable critique, and the rest. One entry in your / menu instead of 18, a shared design vocabulary between you and your AI, and far less namespace pollution as the plugin ecosystem grows. The autocomplete shows the full list the moment you type /impeccable.
    • Pin your favorites back as shortcuts. Run /impeccable pin audit and /audit becomes a standalone command again, without reversing the consolidation. Under the hood it writes a lightweight redirect skill that delegates to /impeccable audit, so updates to the parent skill flow through automatically. /impeccable unpin audit removes it.
    • -
    • Rewritten docs site. New /docs home with a featured home command card, dense cheatsheet-style command rows by category, and per-command detail pages. The standalone /cheatsheet was merged into /docs. URL renamed from /skills to /docs with permanent redirects so existing links keep working. The homepage install section was rebuilt 50/50 with a proper "how to use" panel explaining the mixture-of-experts model in plain language.
    • -
    • Teach runs automatically on first use. You no longer have to run /impeccable teach before anything else. Invoke any command in a fresh project and the Context Gathering Protocol kicks off the discovery interview mid-flight, then saves .impeccable.md so every future command reads it silently.
    From e58cbc432f5e5233d61ecfcd09c2e3588e4e0455 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sat, 11 Apr 2026 19:21:45 -0700 Subject: [PATCH 006/125] Split /onboard back out as its own command (21 commands total) Pre-3.0, onboard was folded into /harden when we were trying to reduce namespace pollution. In the single-skill model that tradeoff is gone, so the weakest of the old merges is the first to undo. Harden and onboard live in different mental modes. Harden is defensive (edge cases, i18n, overflow, errors). Onboard is activation (first-run flows, empty states as CTAs, progressive disclosure). A user thinking "design the onboarding flow" was never going to type /impeccable harden. Changes: - New reference file at source/skills/impeccable/reference/onboard.md, restored from the pre-merge version in git history rather than the condensed 33-line summary that was in harden.md. - Removed the "Onboarding & First-Run Experience" section from source/skills/impeccable/reference/harden.md. - Updated harden description/editorial/process-steps to drop onboarding keywords; split commandProcessSteps so harden stays focused on production resilience and onboard gets its own phases. - Registered onboard in: SKILL.md description + command menu + router table, command-metadata.json, IMPECCABLE_SUB_COMMANDS, pin.mjs VALID_COMMANDS, SKILL_CATEGORIES, COMMAND_RELATIONSHIPS, data.js commandCategories + commandProcessSteps + commandRelationships, framework-viz commandSymbols + commandNumbers. - Reused the existing content/site/skills/onboard.md editorial wrapper (it was orphaned by the merge but never deleted), updating it to use /impeccable onboard. - Bumped all user-facing count references 20 -> 21: public/index.html, CLAUDE.md, README.md, NOTICE.md, plugin.json, marketplace.json, sitemap.xml, build-sub-pages.js. - Harness dir audit.md and critique.md changes are the {{available_commands}} placeholder expanding to include onboard. Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/SKILL.md | 6 +- .agents/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .agents/skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .agents/skills/impeccable/scripts/pin.mjs | 2 +- .claude-plugin/marketplace.json | 4 +- .claude-plugin/plugin.json | 2 +- .claude/skills/impeccable/SKILL.md | 6 +- .claude/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .claude/skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .claude/skills/impeccable/scripts/pin.mjs | 2 +- .codex/skills/impeccable/SKILL.md | 6 +- .codex/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .codex/skills/impeccable/reference/harden.md | 34 --- .codex/skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .codex/skills/impeccable/scripts/pin.mjs | 2 +- .cursor/skills/impeccable/SKILL.md | 6 +- .cursor/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .cursor/skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .cursor/skills/impeccable/scripts/pin.mjs | 2 +- .gemini/skills/impeccable/SKILL.md | 6 +- .gemini/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .gemini/skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .gemini/skills/impeccable/scripts/pin.mjs | 2 +- .kiro/skills/impeccable/SKILL.md | 6 +- .kiro/skills/impeccable/reference/audit.md | 4 +- .kiro/skills/impeccable/reference/critique.md | 4 +- .kiro/skills/impeccable/reference/harden.md | 34 --- .kiro/skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .kiro/skills/impeccable/scripts/pin.mjs | 2 +- .opencode/skills/impeccable/SKILL.md | 6 +- .../skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .../skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .opencode/skills/impeccable/scripts/pin.mjs | 2 +- .pi/skills/impeccable/SKILL.md | 6 +- .pi/skills/impeccable/reference/audit.md | 4 +- .pi/skills/impeccable/reference/critique.md | 4 +- .pi/skills/impeccable/reference/harden.md | 34 --- .pi/skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .pi/skills/impeccable/scripts/pin.mjs | 2 +- .rovodev/skills/impeccable/SKILL.md | 6 +- .rovodev/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .../skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .rovodev/skills/impeccable/scripts/pin.mjs | 2 +- .trae-cn/skills/impeccable/SKILL.md | 6 +- .trae-cn/skills/impeccable/reference/audit.md | 4 +- .../skills/impeccable/reference/critique.md | 4 +- .../skills/impeccable/reference/harden.md | 34 --- .../skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .trae-cn/skills/impeccable/scripts/pin.mjs | 2 +- .trae/skills/impeccable/SKILL.md | 6 +- .trae/skills/impeccable/reference/audit.md | 4 +- .trae/skills/impeccable/reference/critique.md | 4 +- .trae/skills/impeccable/reference/harden.md | 34 --- .trae/skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- .trae/skills/impeccable/scripts/pin.mjs | 2 +- CLAUDE.md | 2 +- NOTICE.md | 2 +- README.md | 9 +- content/site/skills/harden.md | 15 +- content/site/skills/onboard.md | 10 +- public/index.html | 22 +- public/js/components/framework-viz.js | 5 +- public/js/data.js | 7 +- public/js/generated/counts.js | 2 +- public/sitemap.xml | 7 +- scripts/build-sub-pages.js | 2 +- scripts/lib/sub-pages-data.js | 3 +- scripts/lib/utils.js | 4 +- source/skills/impeccable/SKILL.md | 6 +- source/skills/impeccable/reference/harden.md | 34 --- source/skills/impeccable/reference/onboard.md | 234 ++++++++++++++++++ .../impeccable/scripts/command-metadata.json | 6 +- source/skills/impeccable/scripts/pin.mjs | 2 +- 97 files changed, 3023 insertions(+), 545 deletions(-) create mode 100644 .agents/skills/impeccable/reference/onboard.md create mode 100644 .claude/skills/impeccable/reference/onboard.md create mode 100644 .codex/skills/impeccable/reference/onboard.md create mode 100644 .cursor/skills/impeccable/reference/onboard.md create mode 100644 .gemini/skills/impeccable/reference/onboard.md create mode 100644 .kiro/skills/impeccable/reference/onboard.md create mode 100644 .opencode/skills/impeccable/reference/onboard.md create mode 100644 .pi/skills/impeccable/reference/onboard.md create mode 100644 .rovodev/skills/impeccable/reference/onboard.md create mode 100644 .trae-cn/skills/impeccable/reference/onboard.md create mode 100644 .trae/skills/impeccable/reference/onboard.md create mode 100644 source/skills/impeccable/reference/onboard.md diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index 3763c7471..eb0ba0589 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -314,6 +314,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -350,7 +351,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.agents/skills/impeccable/reference/audit.md b/.agents/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.agents/skills/impeccable/reference/audit.md +++ b/.agents/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.agents/skills/impeccable/reference/critique.md b/.agents/skills/impeccable/reference/critique.md index c6a867d50..16280db0c 100644 --- a/.agents/skills/impeccable/reference/critique.md +++ b/.agents/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.agents/skills/impeccable/reference/harden.md b/.agents/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.agents/skills/impeccable/reference/harden.md +++ b/.agents/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.agents/skills/impeccable/reference/onboard.md b/.agents/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.agents/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.agents/skills/impeccable/scripts/command-metadata.json b/.agents/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.agents/skills/impeccable/scripts/command-metadata.json +++ b/.agents/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.agents/skills/impeccable/scripts/pin.mjs b/.agents/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.agents/skills/impeccable/scripts/pin.mjs +++ b/.agents/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 15754b175..9070e688e 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -2,7 +2,7 @@ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json", "name": "impeccable", "metadata": { - "description": "Design fluency for AI harnesses. 1 skill, 20 commands, and curated anti-patterns for impeccable frontend design." + "description": "Design fluency for AI harnesses. 1 skill, 21 commands, and curated anti-patterns for impeccable frontend design." }, "owner": { "name": "Paul Bakaus", @@ -11,7 +11,7 @@ "plugins": [ { "name": "impeccable", - "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", + "description": "Design fluency for frontend development. 1 skill with 21 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", "version": "3.0.0", "author": { "name": "Paul Bakaus", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index a42ac27a3..60c051727 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "impeccable", - "description": "Design fluency for frontend development. 1 skill with 20 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", + "description": "Design fluency for frontend development. 1 skill with 21 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.", "version": "3.0.0", "author": { "name": "Paul Bakaus", diff --git a/.claude/skills/impeccable/SKILL.md b/.claude/skills/impeccable/SKILL.md index 182c33604..cab244324 100644 --- a/.claude/skills/impeccable/SKILL.md +++ b/.claude/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -316,6 +316,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -352,7 +353,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.claude/skills/impeccable/reference/audit.md b/.claude/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.claude/skills/impeccable/reference/audit.md +++ b/.claude/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.claude/skills/impeccable/reference/critique.md b/.claude/skills/impeccable/reference/critique.md index e0d63443f..1da3f7efb 100644 --- a/.claude/skills/impeccable/reference/critique.md +++ b/.claude/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.claude/skills/impeccable/reference/harden.md b/.claude/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.claude/skills/impeccable/reference/harden.md +++ b/.claude/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.claude/skills/impeccable/reference/onboard.md b/.claude/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.claude/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.claude/skills/impeccable/scripts/command-metadata.json b/.claude/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.claude/skills/impeccable/scripts/command-metadata.json +++ b/.claude/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.claude/skills/impeccable/scripts/pin.mjs b/.claude/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.claude/skills/impeccable/scripts/pin.mjs +++ b/.claude/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.codex/skills/impeccable/SKILL.md b/.codex/skills/impeccable/SKILL.md index f49846747..e2e0c0b48 100644 --- a/.codex/skills/impeccable/SKILL.md +++ b/.codex/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 argument-hint: "[command] [target]" license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. @@ -313,6 +313,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `$impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `$impeccable distill [target]` - Strip to essence, remove complexity > `$impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `$impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `$impeccable animate [target]` - Add purposeful animations and motion @@ -349,7 +350,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.codex/skills/impeccable/reference/audit.md b/.codex/skills/impeccable/reference/audit.md index a86b3be95..ab5552ecd 100644 --- a/.codex/skills/impeccable/reference/audit.md +++ b/.codex/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) +- **Suggested command**: Which command to use (prefer: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `$command-name`** — Brief description (specific context from audit findings) 2. **[P?] `$command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset. Map findings to the most appropriate command. End with `$impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset. Map findings to the most appropriate command. End with `$impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.codex/skills/impeccable/reference/critique.md b/.codex/skills/impeccable/reference/critique.md index 41ec68c4d..cc0944eca 100644 --- a/.codex/skills/impeccable/reference/critique.md +++ b/.codex/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) +- **Suggested command**: Which command could address this (from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset +- Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.codex/skills/impeccable/reference/harden.md b/.codex/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.codex/skills/impeccable/reference/harden.md +++ b/.codex/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.codex/skills/impeccable/reference/onboard.md b/.codex/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.codex/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.codex/skills/impeccable/scripts/command-metadata.json b/.codex/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.codex/skills/impeccable/scripts/command-metadata.json +++ b/.codex/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.codex/skills/impeccable/scripts/pin.mjs b/.codex/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.codex/skills/impeccable/scripts/pin.mjs +++ b/.codex/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.cursor/skills/impeccable/SKILL.md b/.cursor/skills/impeccable/SKILL.md index f3baccb6a..1647b7b40 100644 --- a/.cursor/skills/impeccable/SKILL.md +++ b/.cursor/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- @@ -312,6 +312,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -348,7 +349,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.cursor/skills/impeccable/reference/audit.md b/.cursor/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.cursor/skills/impeccable/reference/audit.md +++ b/.cursor/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.cursor/skills/impeccable/reference/critique.md b/.cursor/skills/impeccable/reference/critique.md index 8a8ebeb35..4684cb5c0 100644 --- a/.cursor/skills/impeccable/reference/critique.md +++ b/.cursor/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.cursor/skills/impeccable/reference/harden.md b/.cursor/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.cursor/skills/impeccable/reference/harden.md +++ b/.cursor/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.cursor/skills/impeccable/reference/onboard.md b/.cursor/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.cursor/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.cursor/skills/impeccable/scripts/command-metadata.json b/.cursor/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.cursor/skills/impeccable/scripts/command-metadata.json +++ b/.cursor/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.cursor/skills/impeccable/scripts/pin.mjs b/.cursor/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.cursor/skills/impeccable/scripts/pin.mjs +++ b/.cursor/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.gemini/skills/impeccable/SKILL.md b/.gemini/skills/impeccable/SKILL.md index ed6950695..56b306632 100644 --- a/.gemini/skills/impeccable/SKILL.md +++ b/.gemini/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 --- @@ -311,6 +311,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -347,7 +348,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.gemini/skills/impeccable/reference/audit.md b/.gemini/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.gemini/skills/impeccable/reference/audit.md +++ b/.gemini/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.gemini/skills/impeccable/reference/critique.md b/.gemini/skills/impeccable/reference/critique.md index aa3c4a64a..f0f30e36c 100644 --- a/.gemini/skills/impeccable/reference/critique.md +++ b/.gemini/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.gemini/skills/impeccable/reference/harden.md b/.gemini/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.gemini/skills/impeccable/reference/harden.md +++ b/.gemini/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.gemini/skills/impeccable/reference/onboard.md b/.gemini/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.gemini/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.gemini/skills/impeccable/scripts/command-metadata.json b/.gemini/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.gemini/skills/impeccable/scripts/command-metadata.json +++ b/.gemini/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.gemini/skills/impeccable/scripts/pin.mjs b/.gemini/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.gemini/skills/impeccable/scripts/pin.mjs +++ b/.gemini/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.kiro/skills/impeccable/SKILL.md b/.kiro/skills/impeccable/SKILL.md index e06824c74..ea9899a5a 100644 --- a/.kiro/skills/impeccable/SKILL.md +++ b/.kiro/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. --- @@ -312,6 +312,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -348,7 +349,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.kiro/skills/impeccable/reference/audit.md b/.kiro/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.kiro/skills/impeccable/reference/audit.md +++ b/.kiro/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.kiro/skills/impeccable/reference/critique.md b/.kiro/skills/impeccable/reference/critique.md index 2d9f41a65..f0e1374b5 100644 --- a/.kiro/skills/impeccable/reference/critique.md +++ b/.kiro/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.kiro/skills/impeccable/reference/harden.md b/.kiro/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.kiro/skills/impeccable/reference/harden.md +++ b/.kiro/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.kiro/skills/impeccable/reference/onboard.md b/.kiro/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.kiro/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.kiro/skills/impeccable/scripts/command-metadata.json b/.kiro/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.kiro/skills/impeccable/scripts/command-metadata.json +++ b/.kiro/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.kiro/skills/impeccable/scripts/pin.mjs b/.kiro/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.kiro/skills/impeccable/scripts/pin.mjs +++ b/.kiro/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.opencode/skills/impeccable/SKILL.md b/.opencode/skills/impeccable/SKILL.md index 6d274ae73..05deef881 100644 --- a/.opencode/skills/impeccable/SKILL.md +++ b/.opencode/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -316,6 +316,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -352,7 +353,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.opencode/skills/impeccable/reference/audit.md b/.opencode/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.opencode/skills/impeccable/reference/audit.md +++ b/.opencode/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.opencode/skills/impeccable/reference/critique.md b/.opencode/skills/impeccable/reference/critique.md index ea2c4d7a7..b6d5084d0 100644 --- a/.opencode/skills/impeccable/reference/critique.md +++ b/.opencode/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.opencode/skills/impeccable/reference/harden.md b/.opencode/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.opencode/skills/impeccable/reference/harden.md +++ b/.opencode/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.opencode/skills/impeccable/reference/onboard.md b/.opencode/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.opencode/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.opencode/skills/impeccable/scripts/command-metadata.json b/.opencode/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.opencode/skills/impeccable/scripts/command-metadata.json +++ b/.opencode/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.opencode/skills/impeccable/scripts/pin.mjs b/.opencode/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.opencode/skills/impeccable/scripts/pin.mjs +++ b/.opencode/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.pi/skills/impeccable/SKILL.md b/.pi/skills/impeccable/SKILL.md index be8ec284a..02bf22f9c 100644 --- a/.pi/skills/impeccable/SKILL.md +++ b/.pi/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution. allowed-tools: @@ -314,6 +314,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -350,7 +351,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.pi/skills/impeccable/reference/audit.md b/.pi/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.pi/skills/impeccable/reference/audit.md +++ b/.pi/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.pi/skills/impeccable/reference/critique.md b/.pi/skills/impeccable/reference/critique.md index c282a6c80..f59217dea 100644 --- a/.pi/skills/impeccable/reference/critique.md +++ b/.pi/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.pi/skills/impeccable/reference/harden.md b/.pi/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.pi/skills/impeccable/reference/harden.md +++ b/.pi/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.pi/skills/impeccable/reference/onboard.md b/.pi/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.pi/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.pi/skills/impeccable/scripts/command-metadata.json b/.pi/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.pi/skills/impeccable/scripts/command-metadata.json +++ b/.pi/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.pi/skills/impeccable/scripts/pin.mjs b/.pi/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.pi/skills/impeccable/scripts/pin.mjs +++ b/.pi/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.rovodev/skills/impeccable/SKILL.md b/.rovodev/skills/impeccable/SKILL.md index b42e08bfb..6f33c72a5 100644 --- a/.rovodev/skills/impeccable/SKILL.md +++ b/.rovodev/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -316,6 +316,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -352,7 +353,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.rovodev/skills/impeccable/reference/audit.md b/.rovodev/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.rovodev/skills/impeccable/reference/audit.md +++ b/.rovodev/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.rovodev/skills/impeccable/reference/critique.md b/.rovodev/skills/impeccable/reference/critique.md index c282a6c80..f59217dea 100644 --- a/.rovodev/skills/impeccable/reference/critique.md +++ b/.rovodev/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.rovodev/skills/impeccable/reference/harden.md b/.rovodev/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.rovodev/skills/impeccable/reference/harden.md +++ b/.rovodev/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.rovodev/skills/impeccable/reference/onboard.md b/.rovodev/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.rovodev/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.rovodev/skills/impeccable/scripts/command-metadata.json b/.rovodev/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.rovodev/skills/impeccable/scripts/command-metadata.json +++ b/.rovodev/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.rovodev/skills/impeccable/scripts/pin.mjs b/.rovodev/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.rovodev/skills/impeccable/scripts/pin.mjs +++ b/.rovodev/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.trae-cn/skills/impeccable/SKILL.md b/.trae-cn/skills/impeccable/SKILL.md index 177238ebb..7eb04cc1a 100644 --- a/.trae-cn/skills/impeccable/SKILL.md +++ b/.trae-cn/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -314,6 +314,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -350,7 +351,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.trae-cn/skills/impeccable/reference/audit.md b/.trae-cn/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.trae-cn/skills/impeccable/reference/audit.md +++ b/.trae-cn/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.trae-cn/skills/impeccable/reference/critique.md b/.trae-cn/skills/impeccable/reference/critique.md index 8866153fc..2ced96a7c 100644 --- a/.trae-cn/skills/impeccable/reference/critique.md +++ b/.trae-cn/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.trae-cn/skills/impeccable/reference/harden.md b/.trae-cn/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.trae-cn/skills/impeccable/reference/harden.md +++ b/.trae-cn/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.trae-cn/skills/impeccable/reference/onboard.md b/.trae-cn/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.trae-cn/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.trae-cn/skills/impeccable/scripts/command-metadata.json b/.trae-cn/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.trae-cn/skills/impeccable/scripts/command-metadata.json +++ b/.trae-cn/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.trae-cn/skills/impeccable/scripts/pin.mjs b/.trae-cn/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.trae-cn/skills/impeccable/scripts/pin.mjs +++ b/.trae-cn/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/.trae/skills/impeccable/SKILL.md b/.trae/skills/impeccable/SKILL.md index d97a8e5ce..94637bd53 100644 --- a/.trae/skills/impeccable/SKILL.md +++ b/.trae/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -314,6 +314,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `/impeccable distill [target]` - Strip to essence, remove complexity > `/impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `/impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `/impeccable animate [target]` - Add purposeful animations and motion @@ -350,7 +351,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/.trae/skills/impeccable/reference/audit.md b/.trae/skills/impeccable/reference/audit.md index 206fafb5c..bbba2401b 100644 --- a/.trae/skills/impeccable/reference/audit.md +++ b/.trae/skills/impeccable/reference/audit.md @@ -95,7 +95,7 @@ For each issue, document: - **Impact**: How it affects users - **WCAG/Standard**: Which standard it violates (if applicable) - **Recommendation**: How to fix it -- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) ### Patterns & Systemic Issues @@ -114,7 +114,7 @@ List recommended commands in priority order (P0 first, then P1, then P2): 1. **[P?] `/command-name`** — Brief description (specific context from audit findings) 2. **[P?] `/command-name`** — Brief description (specific context) -**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. +**Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended. After presenting the summary, tell the user: diff --git a/.trae/skills/impeccable/reference/critique.md b/.trae/skills/impeccable/reference/critique.md index 8866153fc..2ced96a7c 100644 --- a/.trae/skills/impeccable/reference/critique.md +++ b/.trae/skills/impeccable/reference/critique.md @@ -132,7 +132,7 @@ For each issue, tag with **P0-P3 severity** (consult [heuristics-scoring](heuris - **[P?] What**: Name the problem clearly - **Why it matters**: How this hurts users or undermines goals - **Fix**: What to do about it (be concrete) -- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) +- **Suggested command**: Which command could address this (from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset) #### Persona Red Flags > *Consult [personas](personas.md)* @@ -197,7 +197,7 @@ List recommended commands in priority order, based on the user's answers: ... **Rules for recommendations**: -- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset +- Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset - Order by the user's stated priorities first, then by impact - Each item's description should carry enough context that the command knows what to focus on - Map each Priority Issue to the appropriate command diff --git a/.trae/skills/impeccable/reference/harden.md b/.trae/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/.trae/skills/impeccable/reference/harden.md +++ b/.trae/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/.trae/skills/impeccable/reference/onboard.md b/.trae/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/.trae/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/.trae/skills/impeccable/scripts/command-metadata.json b/.trae/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/.trae/skills/impeccable/scripts/command-metadata.json +++ b/.trae/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/.trae/skills/impeccable/scripts/pin.mjs b/.trae/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/.trae/skills/impeccable/scripts/pin.mjs +++ b/.trae/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; diff --git a/CLAUDE.md b/CLAUDE.md index c89f6ed1a..db3cb1c25 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ ## Architecture (v3.0+) -There is **one** user-invocable skill, `impeccable`, with **20 commands** underneath it. Users type `/impeccable polish`, `/impeccable audit`, etc. The skill is defined in `source/skills/impeccable/`: +There is **one** user-invocable skill, `impeccable`, with **21 commands** underneath it. Users type `/impeccable polish`, `/impeccable audit`, etc. The skill is defined in `source/skills/impeccable/`: - `SKILL.md` — frontmatter (with the auto-trigger-optimized description and the `allowed-tools` list), shared design principles, and the **Command Router** section that dispatches sub-commands via argument matching. - `reference/` — one `.md` per command (`audit.md`, `polish.md`, `critique.md`, etc.) plus the domain reference files (`typography.md`, `color-and-contrast.md`, etc.). When a sub-command is matched, the router loads its reference file. diff --git a/NOTICE.md b/NOTICE.md index 2843ee71b..89731692d 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -13,5 +13,5 @@ The `impeccable` skill in this project builds on Anthropic's original frontend-d This project extends the original with: - 7 domain-specific reference files (typography, color-and-contrast, spatial-design, motion-design, interaction-design, responsive-design, ux-writing) -- 20 commands +- 21 commands - Expanded patterns and anti-patterns diff --git a/README.md b/README.md index 629065501..5296332e0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Impeccable -The vocabulary you didn't know you needed. 1 skill, 20 commands, and curated anti-patterns for impeccable frontend design. +The vocabulary you didn't know you needed. 1 skill, 21 commands, and curated anti-patterns for impeccable frontend design. > **Quick start:** Visit [impeccable.style](https://impeccable.style) to download ready-to-use bundles. @@ -12,7 +12,7 @@ Every LLM learned from the same generic templates. Without guidance, you get the Impeccable fights that bias with: - **An expanded skill** with 7 domain-specific reference files ([view source](source/skills/impeccable/)) -- **20 commands** to audit, review, polish, distill, animate, and more +- **21 commands** to audit, review, polish, distill, animate, and more - **Curated anti-patterns** that explicitly tell the AI what NOT to do ## What's Included @@ -31,7 +31,7 @@ A comprehensive design skill with 7 domain-specific references ([view skill](sou | [responsive-design](source/skills/impeccable/reference/responsive-design.md) | Mobile-first, fluid design, container queries | | [ux-writing](source/skills/impeccable/reference/ux-writing.md) | Button labels, error messages, empty states | -### 20 Commands +### 21 Commands All commands are accessed through `/impeccable`: @@ -47,7 +47,8 @@ All commands are accessed through `/impeccable`: | `/impeccable bolder` | Amplify boring designs | | `/impeccable quieter` | Tone down overly bold designs | | `/impeccable distill` | Strip to essence | -| `/impeccable harden` | Error handling, onboarding, i18n, edge cases | +| `/impeccable harden` | Error handling, i18n, text overflow, edge cases | +| `/impeccable onboard` | First-run flows, empty states, activation paths | | `/impeccable animate` | Add purposeful motion | | `/impeccable colorize` | Introduce strategic color | | `/impeccable typeset` | Fix font choices, hierarchy, sizing | diff --git a/content/site/skills/harden.md b/content/site/skills/harden.md index 8b80e2bd0..139c96fd6 100644 --- a/content/site/skills/harden.md +++ b/content/site/skills/harden.md @@ -1,24 +1,23 @@ --- -tagline: "Make interfaces production-ready. Edge cases, onboarding, i18n, error states, overflow." +tagline: "Make interfaces production-ready. Edge cases, i18n, error states, overflow." --- ## When to use it -`/impeccable harden` is for the day your interface meets reality. Real user data is messy: names that are 60 characters long, product titles in German, prices in the billions, empty lists, 500 errors, offline modes, right-to-left text. Designs that only work with perfect data are not production-ready. +`/impeccable harden` is for the day your interface meets reality. Real user data is messy: names that are 60 characters long, product titles in German, prices in the billions, 500 errors, offline modes, right-to-left text. Designs that only work with perfect data are not production-ready. -Reach for it before launch, before opening to a new market, or any time a bug report starts with "our user had a really long name and". +Reach for it before launch, before opening to a new market, or any time a bug report starts with "our user had a really long name and". For first-run flows, empty-state activation, and onboarding design, reach for `/impeccable onboard` instead. ## How it works -The skill works through five dimensions of real-world resilience: +The skill works through four dimensions of real-world resilience: -1. **Text and data extremes**. Long text, short text, special characters, emoji, RTL, numbers in the billions, 1000-item lists, zero-data empty states. +1. **Text and data extremes**. Long text, short text, special characters, emoji, RTL, numbers in the billions, 1000-item lists. 2. **Error scenarios**. Network failures, API 4xx/5xx, validation errors, permission errors, rate limits, concurrent operations. 3. **Internationalization**. Long translations (German is often 30% longer than English), RTL languages, date and number formats, currency symbols, character sets. -4. **Onboarding and empty states**. First-run experiences, empty state design, progressive disclosure, feature discovery. Making the feature work for someone who has never seen it before. -5. **Device and context**. Touch targets, offline behavior, slow connections, low-power mode. +4. **Device and context**. Touch targets, offline behavior, slow connections, low-power mode. -For each dimension it identifies the failure mode, then applies the concrete fix: overflow handling, proper empty states, informative error UI, i18n-safe layouts, pluralization, sensible fallbacks. +For each dimension it identifies the failure mode, then applies the concrete fix: overflow handling, informative error UI, i18n-safe layouts, pluralization, sensible fallbacks. ## Try it diff --git a/content/site/skills/onboard.md b/content/site/skills/onboard.md index d081bdf9a..dd4e2c9ca 100644 --- a/content/site/skills/onboard.md +++ b/content/site/skills/onboard.md @@ -4,11 +4,11 @@ tagline: "Design first-run experiences, empty states, and paths to value." ## When to use it -`/onboard` is for the moments that decide whether a new user sticks around: the first screen, the empty state, the setup flow, the product tour, the "what do I do now" gap. Reach for it when activation is weak, when new users drop off before reaching value, or when your product has empty states that say "no items yet" and stop there. +`/impeccable onboard` is for the moments that decide whether a new user sticks around: the first screen, the empty state, the setup flow, the product tour, the "what do I do now" gap. Reach for it when activation is weak, when new users drop off before reaching value, or when your product has empty states that say "no items yet" and stop there. ## How it works -The skill starts from one question: what is the aha moment, and how fast can a new user get there. Every design decision points at that moment. +The command starts from one question: what is the aha moment, and how fast can a new user get there. Every design decision points at that moment. It works across the surfaces that shape first impressions: @@ -18,12 +18,12 @@ It works across the surfaces that shape first impressions: 4. **Progressive disclosure**: advanced features stay out of the way until they are earned. 5. **Activation events**: the moment a user first experiences the core value is instrumented and celebrated, quietly. -The skill resists two common failure modes: over-tutorialized onboarding where users click through a carousel before they can touch anything, and zero-onboarding where users are dropped into an empty app and expected to figure it out. +The command resists two common failure modes: over-tutorialized onboarding where users click through a carousel before they can touch anything, and zero-onboarding where users are dropped into an empty app and expected to figure it out. ## Try it ``` -/onboard the editor +/impeccable onboard the editor ``` Typical output: @@ -36,5 +36,5 @@ Typical output: ## Pitfalls - **Adding a product tour as the default answer.** Most products do not need a tour. They need a better first screen. Tours are a crutch. -- **Designing onboarding without defining the aha moment.** If you cannot say in one sentence what the user should feel in the first 60 seconds, go back to `/shape` first. +- **Designing onboarding without defining the aha moment.** If you cannot say in one sentence what the user should feel in the first 60 seconds, go back to `/impeccable shape` first. - **Running onboard on a broken flow.** Fix the flow first. Onboarding cannot rescue a product where the core action is broken. diff --git a/public/index.html b/public/index.html index 7e0fb3a4f..41ac9bf99 100644 --- a/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@ Impeccable: The missing upgrade to Anthropic's impeccable skill - + @@ -21,7 +21,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -88,13 +88,13 @@

    Impeccable

    Design fluency for AI harnesses

    -

    Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 20 commands to steer the result.

    -

    Impeccable teaches your AI real design and gives you 20 commands to steer the result.

    +

    Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 21 commands to steer the result.

    +

    Impeccable teaches your AI real design and gives you 21 commands to steer the result.

    What's included
    - Impeccable agent skill with 20 design commands + Impeccable agent skill with 21 design commands · Optional CLI + Chrome extension
    @@ -117,7 +117,7 @@
    - +
    @@ -203,7 +203,7 @@

    The Language

    -

    20 commands form a shared vocabulary between you and your AI. Each one encodes a specific design discipline, so you can steer with precision.

    +

    21 commands form a shared vocabulary between you and your AI. Each one encodes a specific design discipline, so you can steer with precision.

    @@ -332,7 +332,7 @@

    1Install the skill and CLI

    -

    One agent skill that teaches your AI to design, with 20 commands bundled inside. Plus the CLI that powers visual mode and scans files outside the skill.

    +

    One agent skill that teaches your AI to design, with 21 commands bundled inside. Plus the CLI that powers visual mode and scans files outside the skill.

    @@ -410,7 +410,7 @@

    2Use it

    -

    Impeccable gives you a shared design vocabulary with your AI. 20 commands (polish, audit, critique, typeset, and more) that each encode a specific design discipline, so you can steer with precision.

    +

    Impeccable gives you a shared design vocabulary with your AI. 21 commands (polish, audit, critique, typeset, and more) that each encode a specific design discipline, so you can steer with precision.

    1. @@ -509,7 +509,7 @@ April 10, 2026
      -
    • 18 skills became 1 skill with 20 commands. Every command now lives under /impeccable: /impeccable audit, /impeccable polish, /impeccable critique, and the rest. One entry in your / menu instead of 18, a shared design vocabulary between you and your AI, and far less namespace pollution as the plugin ecosystem grows. The autocomplete shows the full list the moment you type /impeccable.
    • +
    • 18 skills became 1 skill with 21 commands. Every command now lives under /impeccable: /impeccable audit, /impeccable polish, /impeccable critique, and the rest. One entry in your / menu instead of 18, a shared design vocabulary between you and your AI, and far less namespace pollution as the plugin ecosystem grows. The autocomplete shows the full list the moment you type /impeccable.
    • Pin your favorites back as shortcuts. Run /impeccable pin audit and /audit becomes a standalone command again, without reversing the consolidation. Under the hood it writes a lightweight redirect skill that delegates to /impeccable audit, so updates to the parent skill flow through automatically. /impeccable unpin audit removes it.
    diff --git a/public/js/components/framework-viz.js b/public/js/components/framework-viz.js index d74881b96..204311e89 100644 --- a/public/js/components/framework-viz.js +++ b/public/js/components/framework-viz.js @@ -44,6 +44,7 @@ const commandSymbols = { 'polish': 'Po', 'optimize': 'Op', 'harden': 'Ha', + 'onboard': 'On', 'teach': 'Te', 'extract': 'Ex' }; @@ -54,8 +55,8 @@ const commandNumbers = { 'typeset': 6, 'layout': 7, 'colorize': 8, 'animate': 9, 'delight': 10, 'bolder': 11, 'quieter': 12, 'overdrive': 13, 'distill': 14, 'clarify': 15, 'adapt': 16, - 'polish': 17, 'optimize': 18, 'harden': 19, - 'teach': 20, 'extract': 21 + 'polish': 17, 'optimize': 18, 'harden': 19, 'onboard': 20, + 'teach': 21, 'extract': 22 }; // After the v3.0 consolidation, all commands except the root "impeccable" are diff --git a/public/js/data.js b/public/js/data.js index 4861eb896..88b808d73 100644 --- a/public/js/data.js +++ b/public/js/data.js @@ -71,7 +71,8 @@ export const commandProcessSteps = { 'adapt': ['Analyze', 'Adjust', 'Optimize'], 'polish': ['Discover', 'Review', 'Refine', 'Verify'], 'optimize': ['Profile', 'Identify', 'Improve', 'Measure'], - 'harden': ['Test', 'Handle', 'Onboard', 'Validate'], + 'harden': ['Assess', 'Implement', 'Test', 'Verify'], + 'onboard': ['Identify', 'Design', 'Guide', 'Measure'], 'teach': ['Explore', 'Interview', 'Synthesize', 'Save'], 'extract': ['Identify', 'Abstract', 'Migrate', 'Document'] }; @@ -101,6 +102,7 @@ export const commandCategories = { 'polish': 'harden', 'optimize': 'harden', 'harden': 'harden', + 'onboard': 'harden', // SYSTEM - setup and tooling 'teach': 'system', 'extract': 'system' @@ -134,7 +136,8 @@ export const commandRelationships = { 'adapt': { combinesWith: ['polish', 'clarify'], flow: 'Simplify: Adapt for different contexts' }, 'polish': { flow: 'Harden: Final pass and design system alignment' }, 'optimize': { flow: 'Harden: Performance improvements' }, - 'harden': { combinesWith: ['optimize'], flow: 'Harden: Edge cases, onboarding, and error handling' }, + 'harden': { combinesWith: ['optimize'], flow: 'Harden: Edge cases, error handling, and i18n' }, + 'onboard': { combinesWith: ['clarify', 'delight'], flow: 'Harden: First-run experiences and empty states' }, 'teach': { flow: 'System: One-time project design context setup' }, 'extract': { flow: 'System: Extract design system components and tokens' } }; diff --git a/public/js/generated/counts.js b/public/js/generated/counts.js index 6a9333419..420bdc2f0 100644 --- a/public/js/generated/counts.js +++ b/public/js/generated/counts.js @@ -1,3 +1,3 @@ // GENERATED by build.js — do not edit -export const COMMAND_COUNT = 20; +export const COMMAND_COUNT = 21; export const DETECTION_COUNT = 25; diff --git a/public/sitemap.xml b/public/sitemap.xml index b78f423ef..164eb40c3 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -40,8 +40,8 @@ 0.9 - - https://impeccable.style/docs/impeccable2026-04-100.9 + + https://impeccable.style/docs/impeccable2026-04-110.9 https://impeccable.style/docs/craft2026-04-100.8 https://impeccable.style/docs/teach2026-04-100.8 https://impeccable.style/docs/extract2026-04-100.8 @@ -52,7 +52,8 @@ https://impeccable.style/docs/bolder2026-04-100.8 https://impeccable.style/docs/quieter2026-04-100.8 https://impeccable.style/docs/distill2026-04-100.8 - https://impeccable.style/docs/harden2026-04-100.8 + https://impeccable.style/docs/harden2026-04-110.8 + https://impeccable.style/docs/onboard2026-04-110.8 https://impeccable.style/docs/animate2026-04-100.8 https://impeccable.style/docs/colorize2026-04-100.8 https://impeccable.style/docs/typeset2026-04-100.8 diff --git a/scripts/build-sub-pages.js b/scripts/build-sub-pages.js index 621509328..b48c0adf1 100644 --- a/scripts/build-sub-pages.js +++ b/scripts/build-sub-pages.js @@ -695,7 +695,7 @@ export async function generateSubPages(rootDir) { const html = renderPage({ title: 'Docs | Impeccable', description: - '20 commands that teach your AI harness how to design. Browse by category: create, evaluate, refine, simplify, harden.', + '21 commands that teach your AI harness how to design. Browse by category: create, evaluate, refine, simplify, harden.', bodyHtml: wrapInDocsLayout(sidebar, main), activeNav: 'docs', canonicalPath: '/docs', diff --git a/scripts/lib/sub-pages-data.js b/scripts/lib/sub-pages-data.js index 7523de8dd..964b26399 100644 --- a/scripts/lib/sub-pages-data.js +++ b/scripts/lib/sub-pages-data.js @@ -36,7 +36,6 @@ const EXCLUDED_SKILLS = new Set([ 'teach-impeccable', // deprecated, folded into /impeccable teach 'arrange', // renamed to layout 'normalize', // merged into /polish - 'onboard', // merged into /harden ]); /** @@ -69,6 +68,7 @@ const SKILL_CATEGORIES = { polish: 'harden', optimize: 'harden', harden: 'harden', + onboard: 'harden', // SYSTEM - setup and tooling teach: 'system', extract: 'system', @@ -126,6 +126,7 @@ export const COMMAND_RELATIONSHIPS = { polish: {}, optimize: {}, harden: { combinesWith: ['optimize'] }, + onboard: { combinesWith: ['clarify', 'delight'] }, // System teach: {}, extract: {}, diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 1965a1f27..62234bfe1 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -394,8 +394,8 @@ const EXCLUDED_FROM_SUGGESTIONS = new Set([ // These are the commands that audit/critique/etc. reference when suggesting next steps. const IMPECCABLE_SUB_COMMANDS = [ 'adapt', 'animate', 'audit', 'bolder', 'clarify', 'colorize', - 'critique', 'delight', 'distill', 'harden', 'layout', 'optimize', - 'overdrive', 'polish', 'quieter', 'shape', 'typeset', + 'critique', 'delight', 'distill', 'harden', 'layout', 'onboard', + 'optimize', 'overdrive', 'polish', 'quieter', 'shape', 'typeset', ]; export function replacePlaceholders(content, provider, commandNames = [], allSkillNames = []) { diff --git a/source/skills/impeccable/SKILL.md b/source/skills/impeccable/SKILL.md index 2bd1bad97..fac01b414 100644 --- a/source/skills/impeccable/SKILL.md +++ b/source/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors/empty states, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." argument-hint: "[command] [target]" user-invocable: true allowed-tools: @@ -315,6 +315,7 @@ This skill supports sub-commands. Parse the first word of the argument string to > `{{command_prefix}}impeccable quieter [target]` - Tone down aggressive/overstimulating designs > `{{command_prefix}}impeccable distill [target]` - Strip to essence, remove complexity > `{{command_prefix}}impeccable harden [target]` - Production-ready: errors, i18n, edge cases +> `{{command_prefix}}impeccable onboard [target]` - Design first-run flows, empty states, activation > > **Enhance** > `{{command_prefix}}impeccable animate [target]` - Add purposeful animations and motion @@ -351,7 +352,8 @@ When a sub-command is matched, load the linked reference and follow its instruct | `bolder` | [bolder](reference/bolder.md) | Amplify safe or boring designs for more visual impact | | `quieter` | [quieter](reference/quieter.md) | Tone down visually aggressive or overstimulating designs | | `distill` | [distill](reference/distill.md) | Strip designs to their essence, remove unnecessary complexity | -| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, edge cases, onboarding | +| `harden` | [harden](reference/harden.md) | Production-ready: error handling, i18n, text overflow, edge cases | +| `onboard` | [onboard](reference/onboard.md) | Design onboarding flows, first-run experiences, and empty states that guide users to value | | `animate` | [animate](reference/animate.md) | Add purposeful animations and micro-interactions | | `colorize` | [colorize](reference/colorize.md) | Add strategic color to monochromatic interfaces | | `typeset` | [typeset](reference/typeset.md) | Improve typography: fonts, hierarchy, sizing, readability | diff --git a/source/skills/impeccable/reference/harden.md b/source/skills/impeccable/reference/harden.md index af8b8a703..a27c669a0 100644 --- a/source/skills/impeccable/reference/harden.md +++ b/source/skills/impeccable/reference/harden.md @@ -217,40 +217,6 @@ t('items', { count }) // Handles complex plural rules - Feature detection (not browser detection) - Test in target browsers -### Onboarding & First-Run Experience - -Production-ready features work for first-time users, not just power users. Design the paths that get new users to value: - -**Empty states**: Every zero-data screen needs: -- What will appear here (description or illustration) -- Why it matters to the user -- Clear CTA to create the first item or start from a template -- Visual interest (not just blank space with "No items yet") - -Empty state types to handle: -- **First use**: emphasize value, provide templates -- **User cleared**: light touch, easy to recreate -- **No results**: suggest a different query, offer to clear filters -- **No permissions**: explain why, how to get access - -**First-run experience**: Get users to their "aha moment" as quickly as possible. -- Show, don't tell -- working examples over descriptions -- Progressive disclosure -- teach one thing at a time, not everything upfront -- Make onboarding optional -- let experienced users skip -- Provide smart defaults so required setup is minimal - -**Feature discovery**: Teach features when users need them, not upfront. -- Contextual tooltips at point of use (brief, dismissable, one-time) -- Badges or indicators on new or unused features -- Celebrate activation events quietly (a toast, not a modal) - -**NEVER**: -- Force long onboarding before users can touch the product -- Show the same tooltip repeatedly (track and respect dismissals) -- Block the entire UI during a guided tour -- Create separate tutorial modes disconnected from the real product -- Design empty states that just say "No items" with no next action - ### Input Validation & Sanitization **Client-side validation**: diff --git a/source/skills/impeccable/reference/onboard.md b/source/skills/impeccable/reference/onboard.md new file mode 100644 index 000000000..257c7d0f0 --- /dev/null +++ b/source/skills/impeccable/reference/onboard.md @@ -0,0 +1,234 @@ +> **Additional context needed**: the "aha moment" you want users to reach, and users' experience level. + +Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly. + +## Assess Onboarding Needs + +Understand what users need to learn and why: + +1. **Identify the challenge**: + - What are users trying to accomplish? + - What's confusing or unclear about current experience? + - Where do users get stuck or drop off? + - What's the "aha moment" we want users to reach? + +2. **Understand the users**: + - What's their experience level? (Beginners, power users, mixed?) + - What's their motivation? (Excited and exploring? Required by work?) + - What's their time commitment? (5 minutes? 30 minutes?) + - What alternatives do they know? (Coming from competitor? New to category?) + +3. **Define success**: + - What's the minimum users need to learn to be successful? + - What's the key action we want them to take? (First project? First invite?) + - How do we know onboarding worked? (Completion rate? Time to value?) + +**CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible. + +## Onboarding Principles + +Follow these core principles: + +### Show, Don't Tell +- Demonstrate with working examples, not just descriptions +- Provide real functionality in onboarding, not separate tutorial mode +- Use progressive disclosure, teach one thing at a time + +### Make It Optional (When Possible) +- Let experienced users skip onboarding +- Don't block access to product +- Provide "Skip" or "I'll explore on my own" options + +### Time to Value +- Get users to their "aha moment" ASAP +- Front-load most important concepts +- Teach 20% that delivers 80% of value +- Save advanced features for contextual discovery + +### Context Over Ceremony +- Teach features when users need them, not upfront +- Empty states are onboarding opportunities +- Tooltips and hints at point of use + +### Respect User Intelligence +- Don't patronize or over-explain +- Be concise and clear +- Assume users can figure out standard patterns + +## Design Onboarding Experiences + +Create appropriate onboarding for the context: + +### Initial Product Onboarding + +**Welcome Screen**: +- Clear value proposition (what is this product?) +- What users will learn/accomplish +- Time estimate (honest about commitment) +- Option to skip (for experienced users) + +**Account Setup**: +- Minimal required information (collect more later) +- Explain why you're asking for each piece of information +- Smart defaults where possible +- Social login when appropriate + +**Core Concept Introduction**: +- Introduce 1-3 core concepts (not everything) +- Use simple language and examples +- Interactive when possible (do, don't just read) +- Progress indication (step 1 of 3) + +**First Success**: +- Guide users to accomplish something real +- Pre-populated examples or templates +- Celebrate completion (but don't overdo it) +- Clear next steps + +### Feature Discovery & Adoption + +**Empty States**: +Instead of blank space, show: +- What will appear here (description + screenshot/illustration) +- Why it's valuable +- Clear CTA to create first item +- Example or template option + +Example: +``` +No projects yet +Projects help you organize your work and collaborate with your team. +[Create your first project] or [Start from template] +``` + +**Contextual Tooltips**: +- Appear at relevant moment (first time user sees feature) +- Point directly at relevant UI element +- Brief explanation + benefit +- Dismissable (with "Don't show again" option) +- Optional "Learn more" link + +**Feature Announcements**: +- Highlight new features when they're released +- Show what's new and why it matters +- Let users try immediately +- Dismissable + +**Progressive Onboarding**: +- Teach features when users encounter them +- Badges or indicators on new/unused features +- Unlock complexity gradually (don't show all options immediately) + +### Guided Tours & Walkthroughs + +**When to use**: +- Complex interfaces with many features +- Significant changes to existing product +- Industry-specific tools needing domain knowledge + +**How to design**: +- Spotlight specific UI elements (dim rest of page) +- Keep steps short (3-7 steps max per tour) +- Allow users to click through tour freely +- Include "Skip tour" option +- Make replayable (help menu) + +**Best practices**: +- Interactive over passive (let users click real buttons) +- Focus on workflow, not features ("Create a project" not "This is the project button") +- Provide sample data so actions work + +### Interactive Tutorials + +**When to use**: +- Users need hands-on practice +- Concepts are complex or unfamiliar +- High stakes (better to practice in safe environment) + +**How to design**: +- Sandbox environment with sample data +- Clear objectives ("Create a chart showing sales by region") +- Step-by-step guidance +- Validation (confirm they did it right) +- Graduation moment (you're ready!) + +### Documentation & Help + +**In-product help**: +- Contextual help links throughout interface +- Keyboard shortcut reference +- Search-able help center +- Video tutorials for complex workflows + +**Help patterns**: +- `?` icon near complex features +- "Learn more" links in tooltips +- Keyboard shortcut hints (`⌘K` shown on search box) + +## Empty State Design + +Every empty state needs: + +### What Will Be Here +"Your recent projects will appear here" + +### Why It Matters +"Projects help you organize your work and collaborate with your team" + +### How to Get Started +[Create project] or [Import from template] + +### Visual Interest +Illustration or icon (not just text on blank page) + +### Contextual Help +"Need help getting started? [Watch 2-min tutorial]" + +**Empty state types**: +- **First use**: Never used this feature (emphasize value, provide template) +- **User cleared**: Intentionally deleted everything (light touch, easy to recreate) +- **No results**: Search or filter returned nothing (suggest different query, clear filters) +- **No permissions**: Can't access (explain why, how to get access) +- **Error state**: Failed to load (explain what happened, retry option) + +## Implementation Patterns + +### Technical approaches: + +**Tooltip libraries**: Tippy.js, Popper.js +**Tour libraries**: Intro.js, Shepherd.js, React Joyride +**Modal patterns**: Focus trap, backdrop, ESC to close +**Progress tracking**: LocalStorage for "seen" states +**Analytics**: Track completion, drop-off points + +**Storage patterns**: +```javascript +// Track which onboarding steps user has seen +localStorage.setItem('onboarding-completed', 'true'); +localStorage.setItem('feature-tooltip-seen-reports', 'true'); +``` + +**IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals. + +**NEVER**: +- Force users through long onboarding before they can use product +- Patronize users with obvious explanations +- Show same tooltip repeatedly (respect dismissals) +- Block all UI during tour (let users explore) +- Create separate tutorial mode disconnected from real product +- Overwhelm with information upfront (progressive disclosure!) +- Hide "Skip" or make it hard to find +- Forget about returning users (don't show initial onboarding again) + +## Verify Onboarding Quality + +Test with real users: + +- **Time to completion**: Can users complete onboarding quickly? +- **Comprehension**: Do users understand after completing? +- **Action**: Do users take desired next step? +- **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable) +- **Completion rate**: Are users completing? (If low, simplify) +- **Time to value**: How long until users get first value? + +Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence. diff --git a/source/skills/impeccable/scripts/command-metadata.json b/source/skills/impeccable/scripts/command-metadata.json index 38806f3f5..687db0bdb 100644 --- a/source/skills/impeccable/scripts/command-metadata.json +++ b/source/skills/impeccable/scripts/command-metadata.json @@ -48,7 +48,11 @@ "argumentHint": "[target]" }, "harden": { - "description": "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues.", + "description": "Make interfaces production-ready: error handling, i18n, text overflow, edge case management, and resilience under real-world data. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.", + "argumentHint": "[target]" + }, + "onboard": { + "description": "Design onboarding flows, first-run experiences, and empty states that guide new users to value. Covers welcome screens, account setup, progressive disclosure, contextual tooltips, feature announcements, and activation moments. Use when the user mentions onboarding, first-time users, empty states, activation, getting started, new user flows, or the aha moment.", "argumentHint": "[target]" }, "layout": { diff --git a/source/skills/impeccable/scripts/pin.mjs b/source/skills/impeccable/scripts/pin.mjs index 2abfc6050..28dedb882 100644 --- a/source/skills/impeccable/scripts/pin.mjs +++ b/source/skills/impeccable/scripts/pin.mjs @@ -29,7 +29,7 @@ const HARNESS_DIRS = [ const VALID_COMMANDS = [ 'craft', 'teach', 'extract', 'shape', 'critique', 'audit', - 'polish', 'bolder', 'quieter', 'distill', 'harden', + 'polish', 'bolder', 'quieter', 'distill', 'harden', 'onboard', 'animate', 'colorize', 'typeset', 'layout', 'delight', 'overdrive', 'clarify', 'adapt', 'optimize', ]; From bb94dadda07a0d2859e12b06d02444898f4913f5 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sun, 12 Apr 2026 17:13:53 -0700 Subject: [PATCH 007/125] Add live variant mode: element picker, action panel, poll/reply bridge (22 commands) New feature: /impeccable live starts an interactive visual iteration server. Users select elements in the browser, pick a design action (bolder, quieter, etc.), and the agent generates HTML+CSS variants written directly to source. The dev server's HMR hot-swaps them in, and MutationObserver progressively reveals each variant in a cycler UI as it arrives. Architecture: - src/live/server.mjs: HTTP + WebSocket server with session token auth, long-poll /poll endpoint for the agent, WebSocket for the browser - src/live/poll.mjs: CLI client (npx impeccable poll / poll --reply) - src/live/browser.js: element picker with keyboard nav (arrows=siblings, shift+arrows=parent/child), action panel (12 commands, freeform input, variant count), variant cycler with progressive reveal via MutationObserver - src/live/protocol.mjs: shared message types and event validation - source/skills/impeccable/reference/live.md: agent loop instructions (inject script, poll loop, generate variants, accept/discard, cleanup) CLI changes: - bin/cli.js: added "poll" top-level command - src/detect-antipatterns.mjs: liveCli() now delegates to src/live/server.mjs - package.json: added ws dependency Registered /impeccable live as command #22 across all standard locations. Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/SKILL.md | 6 +- .agents/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .agents/skills/impeccable/scripts/pin.mjs | 2 +- .claude-plugin/marketplace.json | 4 +- .claude-plugin/plugin.json | 2 +- .claude/skills/impeccable/SKILL.md | 6 +- .claude/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .claude/skills/impeccable/scripts/pin.mjs | 2 +- .codex/skills/impeccable/SKILL.md | 6 +- .codex/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .codex/skills/impeccable/scripts/pin.mjs | 2 +- .cursor/skills/impeccable/SKILL.md | 6 +- .cursor/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .cursor/skills/impeccable/scripts/pin.mjs | 2 +- .gemini/skills/impeccable/SKILL.md | 6 +- .gemini/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .gemini/skills/impeccable/scripts/pin.mjs | 2 +- .kiro/skills/impeccable/SKILL.md | 6 +- .kiro/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .kiro/skills/impeccable/scripts/pin.mjs | 2 +- .opencode/skills/impeccable/SKILL.md | 6 +- .opencode/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .opencode/skills/impeccable/scripts/pin.mjs | 2 +- .pi/skills/impeccable/SKILL.md | 6 +- .pi/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .pi/skills/impeccable/scripts/pin.mjs | 2 +- .rovodev/skills/impeccable/SKILL.md | 6 +- .rovodev/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .rovodev/skills/impeccable/scripts/pin.mjs | 2 +- .trae-cn/skills/impeccable/SKILL.md | 6 +- .trae-cn/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .trae-cn/skills/impeccable/scripts/pin.mjs | 2 +- .trae/skills/impeccable/SKILL.md | 6 +- .trae/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + .trae/skills/impeccable/scripts/pin.mjs | 2 +- CLAUDE.md | 2 +- NOTICE.md | 2 +- README.md | 7 +- bin/cli.js | 8 +- package.json | 3 +- public/index.html | 22 +- public/js/components/framework-viz.js | 5 +- public/js/data.js | 9 +- public/js/generated/counts.js | 2 +- public/sitemap.xml | 3 +- scripts/build-sub-pages.js | 2 +- scripts/lib/sub-pages-data.js | 2 + source/skills/impeccable/SKILL.md | 6 +- source/skills/impeccable/reference/live.md | 198 ++++ .../impeccable/scripts/command-metadata.json | 4 + source/skills/impeccable/scripts/pin.mjs | 2 +- src/detect-antipatterns.mjs | 113 +-- src/live/browser.js | 931 ++++++++++++++++++ src/live/poll.mjs | 119 +++ src/live/protocol.mjs | 79 ++ src/live/server.mjs | 465 +++++++++ 67 files changed, 4136 insertions(+), 164 deletions(-) create mode 100644 .agents/skills/impeccable/reference/live.md create mode 100644 .claude/skills/impeccable/reference/live.md create mode 100644 .codex/skills/impeccable/reference/live.md create mode 100644 .cursor/skills/impeccable/reference/live.md create mode 100644 .gemini/skills/impeccable/reference/live.md create mode 100644 .kiro/skills/impeccable/reference/live.md create mode 100644 .opencode/skills/impeccable/reference/live.md create mode 100644 .pi/skills/impeccable/reference/live.md create mode 100644 .rovodev/skills/impeccable/reference/live.md create mode 100644 .trae-cn/skills/impeccable/reference/live.md create mode 100644 .trae/skills/impeccable/reference/live.md create mode 100644 source/skills/impeccable/reference/live.md create mode 100644 src/live/browser.js create mode 100644 src/live/poll.mjs create mode 100644 src/live/protocol.mjs create mode 100644 src/live/server.mjs diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index eb0ba0589..b9e85282a 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -1,6 +1,6 @@ --- name: impeccable -description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, or push boundaries with shaders/physics/scroll effects. Commands: craft, teach, extract, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." +description: "Design fluency for frontend interfaces. Build distinctive, production-grade web components, pages, artifacts, posters, and applications with high design quality. Also handles: critique/review/evaluate designs, audit accessibility/performance/responsive, polish finishing touches, improve typography/fonts/readability, fix layout/spacing/hierarchy, add animation/transitions/motion, adapt for mobile/tablet/responsive, simplify/declutter/distill, amplify bland/generic/safe designs, tone down loud/overwhelming designs, add color to gray/monochromatic interfaces, improve UX copy/labels/error messages, harden for production with edge cases/i18n/errors, design onboarding/first-run/empty states/activation flows, optimize slow/laggy performance, plan UX before coding, extract design tokens, push boundaries with shaders/physics/scroll effects, or visually iterate on elements in the browser with live variant mode. Commands: craft, teach, extract, live, pin, audit, critique, polish, shape, adapt, animate, bolder, quieter, colorize, clarify, delight, distill, harden, onboard, layout, optimize, overdrive, typeset." version: 3.0.0 user-invocable: true argument-hint: "[command] [target]" @@ -329,6 +329,9 @@ This skill supports sub-commands. Parse the first word of the argument string to > `/impeccable adapt [target]` - Adapt for different devices and screen sizes > `/impeccable optimize [target]` - Diagnose and fix UI performance > +> **Iterate** +> `/impeccable live` - Visual variant mode: pick elements in the browser, generate alternatives +> > **Manage** > `/impeccable pin ` - Create a standalone shortcut (e.g., pin audit creates /audit) > `/impeccable unpin ` - Remove a pinned shortcut @@ -362,6 +365,7 @@ When a sub-command is matched, load the linked reference and follow its instruct | `clarify` | [clarify](reference/clarify.md) | Improve UX copy, labels, error messages, and microcopy | | `adapt` | [adapt](reference/adapt.md) | Adapt designs across screen sizes, devices, and platforms | | `optimize` | [optimize](reference/optimize.md) | Diagnose and fix UI performance issues | +| `live` | [live](reference/live.md) | Interactive visual variant mode: pick elements, generate alternatives in the browser | --- diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md new file mode 100644 index 000000000..30b5076ca --- /dev/null +++ b/.agents/skills/impeccable/reference/live.md @@ -0,0 +1,198 @@ +Launch interactive live variant mode: select elements in the browser, pick a design action, and get AI-generated HTML+CSS variants hot-swapped via the dev server's HMR. + +## Prerequisites + +- A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser +- The impeccable CLI installed (`npm i -g impeccable`) + +## Start the Server + +1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. +2. Start the live variant server: + ```bash + npx impeccable live & + ``` +3. Note the **port** and **token** printed to stdout. + +## Inject the Browser Script + +Find the project's main HTML entry point. This varies by framework: + +| Framework | Typical file | +|-----------|-------------| +| Plain HTML | `index.html` | +| Vite / React | `index.html` (project root) | +| Next.js (App Router) | `app/layout.tsx` (add a ` + +``` + +**JSX / TSX (React, Next.js):** +```jsx +{/* impeccable-live-start */} + +{/* impeccable-live-end */} +``` + +Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. + +If browser automation tools are available, also navigate to the page so the user can see it. + +## Enter the Poll Loop + +Run a blocking poll loop. On each iteration, wait for a browser event and respond: + +``` +LOOP: + Run: npx impeccable poll + Read the JSON output. Dispatch based on the "type" field: + + TYPE "generate": + → See "Handle Generate" below + + TYPE "accept": + → See "Handle Accept" below + + TYPE "discard": + → See "Handle Discard" below + + TYPE "exit": + → Break the loop + + TYPE "timeout": + → Continue (re-poll) + +END LOOP +``` + +## Handle Generate + +The event contains: `{id, action, freeformPrompt, count, element}`. + +### Step 1: Find the source file + +Use `element.tagName`, `element.id`, `element.classes`, `element.textContent`, and `element.outerHTML` to locate the element in the project source. Search for matching markup across the codebase. + +### Step 2: Create the variant wrapper + +Wrap the original element in a variant container. Use the comment syntax appropriate for the framework: + +**HTML / Vue / Svelte:** +```html + +
    +
    + +
    +
    + +``` + +**JSX / TSX:** +```jsx +{/* impeccable-variants-start SESSION_ID */} +
    +
    + {/* move the original element here */} +
    +
    +{/* impeccable-variants-end SESSION_ID */} +``` + +Replace SESSION_ID with `event.id` and COUNT with `event.count`. + +`display: contents` makes the wrapper layout-transparent, preserving the original element's relationship with its parent (flex/grid child, etc.). + +### Step 3: Generate variants one by one + +For each variant (1 through COUNT): + +1. **Load the design command's reference file.** If `event.action` is "bolder", load `reference/bolder.md`. If "impeccable" (the default), use the main design principles from this skill without loading a sub-command reference. + +2. **Generate a complete replacement** for the original element. Each variant is a full HTML+CSS rewrite, not a patch. Consider the element's context (computed styles, parent structure, CSS custom properties from `event.element`). + +3. **Diversify across variants.** Each variant should take a distinctly different approach. For "bolder", one might focus on type weight, another on color saturation, another on spatial scale, another on structural change. Do NOT generate 4 variations on the same idea. + +4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. + +5. **Write the variant** into the wrapper in the source file: + ```html +
    + +
    + ``` + The first variant should NOT have `style="display: none"` (it should be visible by default). + +6. **Write scoped CSS** if the variant needs styles beyond inline: + ```css + /* impeccable-variants-css-start SESSION_ID */ + @scope ([data-impeccable-variant="N"]) { + :scope { /* styles for the variant root */ } + .child-class { /* styles for children */ } + } + /* impeccable-variants-css-end SESSION_ID */ + ``` + Place the CSS in a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit.
    ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing
    of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.agents/skills/impeccable/scripts/live-poll.mjs b/.agents/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.agents/skills/impeccable/scripts/live-poll.mjs +++ b/.agents/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.agents/skills/impeccable/scripts/live-server.mjs b/.agents/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.agents/skills/impeccable/scripts/live-server.mjs +++ b/.agents/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.claude/skills/impeccable/reference/live.md b/.claude/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.claude/skills/impeccable/reference/live.md +++ b/.claude/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit.
    ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing
    of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.claude/skills/impeccable/scripts/live-poll.mjs b/.claude/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.claude/skills/impeccable/scripts/live-poll.mjs +++ b/.claude/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.claude/skills/impeccable/scripts/live-server.mjs b/.claude/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.claude/skills/impeccable/scripts/live-server.mjs +++ b/.claude/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.cursor/skills/impeccable/reference/live.md b/.cursor/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.cursor/skills/impeccable/reference/live.md +++ b/.cursor/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.cursor/skills/impeccable/scripts/live-poll.mjs b/.cursor/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.cursor/skills/impeccable/scripts/live-poll.mjs +++ b/.cursor/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.cursor/skills/impeccable/scripts/live-server.mjs b/.cursor/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.cursor/skills/impeccable/scripts/live-server.mjs +++ b/.cursor/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.gemini/skills/impeccable/reference/live.md b/.gemini/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.gemini/skills/impeccable/reference/live.md +++ b/.gemini/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.gemini/skills/impeccable/scripts/live-poll.mjs b/.gemini/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.gemini/skills/impeccable/scripts/live-poll.mjs +++ b/.gemini/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.gemini/skills/impeccable/scripts/live-server.mjs b/.gemini/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.gemini/skills/impeccable/scripts/live-server.mjs +++ b/.gemini/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.github/skills/impeccable/reference/live.md b/.github/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.github/skills/impeccable/reference/live.md +++ b/.github/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.github/skills/impeccable/scripts/live-poll.mjs b/.github/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.github/skills/impeccable/scripts/live-poll.mjs +++ b/.github/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.github/skills/impeccable/scripts/live-server.mjs b/.github/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.github/skills/impeccable/scripts/live-server.mjs +++ b/.github/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.kiro/skills/impeccable/reference/live.md b/.kiro/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.kiro/skills/impeccable/reference/live.md +++ b/.kiro/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.kiro/skills/impeccable/scripts/live-poll.mjs b/.kiro/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.kiro/skills/impeccable/scripts/live-poll.mjs +++ b/.kiro/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.kiro/skills/impeccable/scripts/live-server.mjs b/.kiro/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.kiro/skills/impeccable/scripts/live-server.mjs +++ b/.kiro/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.opencode/skills/impeccable/reference/live.md b/.opencode/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.opencode/skills/impeccable/reference/live.md +++ b/.opencode/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.opencode/skills/impeccable/scripts/live-poll.mjs b/.opencode/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.opencode/skills/impeccable/scripts/live-poll.mjs +++ b/.opencode/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.opencode/skills/impeccable/scripts/live-server.mjs b/.opencode/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.opencode/skills/impeccable/scripts/live-server.mjs +++ b/.opencode/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.pi/skills/impeccable/reference/live.md b/.pi/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.pi/skills/impeccable/reference/live.md +++ b/.pi/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.pi/skills/impeccable/scripts/live-poll.mjs b/.pi/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.pi/skills/impeccable/scripts/live-poll.mjs +++ b/.pi/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.pi/skills/impeccable/scripts/live-server.mjs b/.pi/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.pi/skills/impeccable/scripts/live-server.mjs +++ b/.pi/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.rovodev/skills/impeccable/reference/live.md b/.rovodev/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.rovodev/skills/impeccable/reference/live.md +++ b/.rovodev/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.rovodev/skills/impeccable/scripts/live-poll.mjs b/.rovodev/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.rovodev/skills/impeccable/scripts/live-poll.mjs +++ b/.rovodev/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.rovodev/skills/impeccable/scripts/live-server.mjs b/.rovodev/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.rovodev/skills/impeccable/scripts/live-server.mjs +++ b/.rovodev/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.trae-cn/skills/impeccable/reference/live.md b/.trae-cn/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.trae-cn/skills/impeccable/reference/live.md +++ b/.trae-cn/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.trae-cn/skills/impeccable/scripts/live-poll.mjs b/.trae-cn/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.trae-cn/skills/impeccable/scripts/live-poll.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.trae-cn/skills/impeccable/scripts/live-server.mjs b/.trae-cn/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.trae-cn/skills/impeccable/scripts/live-server.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/.trae/skills/impeccable/reference/live.md b/.trae/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/.trae/skills/impeccable/reference/live.md +++ b/.trae/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit. ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/.trae/skills/impeccable/scripts/live-poll.mjs b/.trae/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/.trae/skills/impeccable/scripts/live-poll.mjs +++ b/.trae/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/.trae/skills/impeccable/scripts/live-server.mjs b/.trae/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/.trae/skills/impeccable/scripts/live-server.mjs +++ b/.trae/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); diff --git a/public/index.html b/public/index.html index d6232e573..b8ee0f9c6 100644 --- a/public/index.html +++ b/public/index.html @@ -40,6 +40,7 @@ + @@ -85,40 +86,40 @@
    -

    Impeccable

    -

    Design fluency for AI harnesses

    +

    Impeccable

    +

    Design fluency for AI harnesses

    -

    Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 22 commands to steer the result.

    -

    Impeccable teaches your AI real design and gives you 22 commands to steer the result.

    +

    Great design prompts require design vocabulary. Most people don't have it. Impeccable teaches your AI deep design knowledge and gives you 22 commands to steer the result.

    +

    Impeccable teaches your AI real design and gives you 22 commands to steer the result.

    -
    - What's included -
    - Impeccable agent skill with 22 design commands - · - Optional CLI + Chrome extension -
    -
    +
    + What's included +
    + Impeccable agent skill with 22 design commands + · + Optional CLI + Chrome extension +
    +
    -
    - Get Started -
    - Works with -
    - Cursor - Claude Code - Gemini CLI - Codex CLI - VS Code Copilot - Antigravity - Kiro - OpenCode - Pi -
    -
    -
    - -
    +
    + Get Started +
    + Works with +
    + Cursor + Claude Code + Gemini CLI + Codex CLI + VS Code Copilot + Antigravity + Kiro + OpenCode + Pi +
    +
    +
    + +
    @@ -206,7 +207,7 @@

    22 commands form a shared vocabulary between you and your AI. Each one encodes a specific design discipline, so you can steer with precision.

    - +
    @@ -755,5 +756,6 @@ + diff --git a/source/skills/impeccable/reference/live.md b/source/skills/impeccable/reference/live.md index 049404911..a6a449cbe 100644 --- a/source/skills/impeccable/reference/live.md +++ b/source/skills/impeccable/reference/live.md @@ -7,13 +7,11 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Start the Server 1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server and read its connection info: +2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: ```bash - node {{scripts_path}}/live-server.mjs & - sleep 2 - cat .impeccable-live.json + node {{scripts_path}}/live-server.mjs --background ``` - The JSON contains `port` and `token`. Use the port for the script tag below. + The output JSON contains `port` and `token`. Use the port for the script tag below. ## Inject the Browser Script @@ -108,10 +106,14 @@ If `wrap` fails, fall back to manual grep + edit. 4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. -5. **Write all variants in a single file edit** at the insert line reported by `wrap`. Use the comment syntax from the `wrap` output: +5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a `
    @@ -123,17 +125,9 @@ If `wrap` fails, fall back to manual grep + edit.
    ``` -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. +The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `'); + replacement.push(indent + commentSyntax.open + ' impeccable-carbonize-end ' + id + ' ' + commentSyntax.close); + } + + replacement.push(...restored); + + const newLines = [ + ...lines.slice(0, block.start), + ...replacement, + ...lines.slice(block.end + 1), + ]; + fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8'); + + return { carbonize: needsCarbonize }; +} + +// --------------------------------------------------------------------------- +// Parsing helpers +// --------------------------------------------------------------------------- + +/** + * Find the start/end marker lines for a session. + * Returns { start, end } (0-indexed line numbers) or null. + */ +function findMarkerBlock(id, lines) { + let start = -1; + let end = -1; + const startPattern = 'impeccable-variants-start ' + id; + const endPattern = 'impeccable-variants-end ' + id; + + for (let i = 0; i < lines.length; i++) { + if (start === -1 && lines[i].includes(startPattern)) start = i; + if (lines[i].includes(endPattern)) { end = i; break; } + } + + return (start !== -1 && end !== -1) ? { start, end } : null; +} + +/** + * Extract the original element content from within the variant wrapper. + * Returns an array of lines (still indented as stored in the wrapper). + */ +function extractOriginal(lines, block) { + let inOriginal = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { + inOriginal = true; + depth = 1; + continue; // skip the opening
    + } + + if (inOriginal) { + // Count div opens/closes to find the matching
    + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // this is the closing of the original wrapper + content.push(line); + } + } + + return content; +} + +/** + * Extract a specific variant's inner content (stripping the wrapper div). + * Returns an array of lines, or null if not found. + */ +function extractVariant(lines, block, variantNum) { + let inVariant = false; + let depth = 0; + const content = []; + + for (let i = block.start; i <= block.end; i++) { + const line = lines[i]; + + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { + inVariant = true; + depth = 1; + continue; // skip the opening
    + } + + if (inVariant) { + const opens = (line.match(/]/g) || []).length; + const closes = (line.match(/<\/div\s*>/g) || []).length; + depth += opens - closes; + + if (depth <= 0) break; // closing
    of the variant wrapper + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * Extract the colocated ')) break; + content.push(line); + } + } + + return content.length > 0 ? content : null; +} + +/** + * De-indent content that was indented by live-wrap.mjs. + * The wrap script adds `indent + ' '` (4 extra spaces) to each line. + * We restore to just `indent` level. + */ +function deindentContent(contentLines, baseIndent) { + // Find the minimum indentation in the content to determine how much was added + let minIndent = Infinity; + for (const line of contentLines) { + if (line.trim() === '') continue; + const leadingSpaces = line.match(/^(\s*)/)[1].length; + minIndent = Math.min(minIndent, leadingSpaces); + } + if (minIndent === Infinity) minIndent = 0; + + // Strip the extra indentation and re-add base indent + return contentLines.map(line => { + if (line.trim() === '') return ''; + return baseIndent + line.slice(minIndent); + }); +} + +function detectCommentSyntax(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (ext === '.jsx' || ext === '.tsx') { + return { open: '{/*', close: '*/}' }; + } + return { open: '' }; +} + +// --------------------------------------------------------------------------- +// File search (find the file containing session markers) +// --------------------------------------------------------------------------- + +function findSessionFile(id, cwd) { + const marker = 'impeccable-variants-start ' + id; + const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; + const seen = new Set(); + + for (const dir of searchDirs) { + const absDir = path.join(cwd, dir); + if (!fs.existsSync(absDir)) continue; + const result = searchDir(absDir, marker, seen, 0); + if (result) { + const content = fs.readFileSync(result, 'utf-8'); + return { file: result, content, lines: content.split('\n') }; + } + } + return null; +} + +function searchDir(dir, query, seen, depth) { + if (depth > 5) return null; + let realDir; + try { realDir = fs.realpathSync(dir); } catch { return null; } + if (seen.has(realDir)) return null; + seen.add(realDir); + + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return null; } + + for (const entry of entries) { + if (!entry.isFile()) continue; + if (!EXTENSIONS.includes(path.extname(entry.name).toLowerCase())) continue; + const filePath = path.join(dir, entry.name); + try { + const content = fs.readFileSync(filePath, 'utf-8'); + if (content.includes(query)) return filePath; + } catch { /* skip */ } + } + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + if (['node_modules', '.git', 'dist', 'build'].includes(entry.name)) continue; + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + if (result) return result; + } + + return null; +} + +// --------------------------------------------------------------------------- +// Utilities +// --------------------------------------------------------------------------- + +function argVal(args, flag) { + const idx = args.indexOf(flag); + return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : null; +} + +// Auto-execute when run directly +const _running = process.argv[1]; +if (_running?.endsWith('live-accept.mjs') || _running?.endsWith('live-accept.mjs/')) { + acceptCli(); +} + +export { findMarkerBlock, extractOriginal, extractVariant, extractCss, deindentContent, detectCommentSyntax }; diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 6297eccfc..75bb26d94 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -894,29 +894,16 @@ if (state === 'IDLE') state = 'PICKING'; break; case 'done': - if (state === 'SAVING') { - state = 'CONFIRMED'; - updateBarContent('confirmed'); - setTimeout(() => { - hideBar(); - hideHighlight(); - stopScrollTracking(); - if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } - clearSession(); - selectedElement = null; - currentSessionId = null; - selectedAction = 'impeccable'; - state = 'PICKING'; - }, 1800); - return; - } + // Generate completion: handle no-HMR fallback if (arrivedVariants === 0 && expectedVariants > 0 && msg.file) { console.log('[impeccable] No HMR detected. Fetching variants from source file...'); injectVariantsFromSource(msg.file, currentSessionId); return; } - state = 'CYCLING'; - updateBarContent('cycling'); + if (state === 'GENERATING') { + state = 'CYCLING'; + updateBarContent('cycling'); + } break; case 'error': console.error('[impeccable] Error:', msg.message); @@ -1074,16 +1061,37 @@ if (!currentSessionId || arrivedVariants === 0) return; sendEvent({ type: 'accept', id: currentSessionId, variantId: String(visibleVariant) }); markSessionHandled(); - state = 'SAVING'; - updateBarContent('saving'); - // Don't cleanup yet — wait for the "done" WS message to show confirmation + + // Instantly commit the accepted variant in the DOM (fire-and-forget) + var wrapper = document.querySelector('[data-impeccable-variants="' + currentSessionId + '"]'); + if (wrapper) { + var accepted = wrapper.querySelector('[data-impeccable-variant="' + visibleVariant + '"]'); + if (accepted && accepted.firstElementChild) { + var parent = wrapper.parentElement; + if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + } + } + + state = 'CONFIRMED'; + updateBarContent('confirmed'); + setTimeout(function() { + hideBar(); + hideHighlight(); + stopScrollTracking(); + if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } + clearSession(); + selectedElement = null; + currentSessionId = null; + selectedAction = 'impeccable'; + state = 'PICKING'; + }, 1800); } function handleDiscard() { if (!currentSessionId) return; sendEvent({ type: 'discard', id: currentSessionId }); markSessionHandled(); - // Discard dismisses immediately (no "Applying" state, the agent just cleans up) + // Instant DOM restore + fire-and-forget (script handles file cleanup) cleanup(); } diff --git a/source/skills/impeccable/scripts/live-poll.mjs b/source/skills/impeccable/scripts/live-poll.mjs index f868f1e43..b176d9f05 100644 --- a/source/skills/impeccable/scripts/live-poll.mjs +++ b/source/skills/impeccable/scripts/live-poll.mjs @@ -8,9 +8,11 @@ * npx impeccable poll --reply error "msg" # Reply with error */ +import { execSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; +import { fileURLToPath } from 'node:url'; const LIVE_PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); @@ -110,6 +112,25 @@ Options: } const event = await res.json(); + + // Auto-handle accept/discard via deterministic script + if (event.type === 'accept' || event.type === 'discard') { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const acceptScript = path.join(__dirname, 'live-accept.mjs'); + const scriptArgs = event.type === 'discard' + ? ['--id', event.id, '--discard'] + : ['--id', event.id, '--variant', event.variantId]; + try { + const out = execSync( + `node "${acceptScript}" ${scriptArgs.join(' ')}`, + { encoding: 'utf-8', cwd: process.cwd(), timeout: 30_000 } + ); + event._acceptResult = JSON.parse(out.trim()); + } catch (err) { + event._acceptResult = { handled: false, error: err.message }; + } + } + // Print the event as JSON — the agent reads this from stdout console.log(JSON.stringify(event)); } catch (err) { diff --git a/source/skills/impeccable/scripts/live-server.mjs b/source/skills/impeccable/scripts/live-server.mjs index 998651d85..9fc581257 100644 --- a/source/skills/impeccable/scripts/live-server.mjs +++ b/source/skills/impeccable/scripts/live-server.mjs @@ -14,6 +14,7 @@ import http from 'node:http'; import { randomUUID } from 'node:crypto'; +import { spawn } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -364,10 +365,11 @@ if (args.includes('--help') || args.includes('-h')) { Start the live variant mode server (zero dependencies). Commands: - (default) Start the server + (default) Start the server (foreground) stop Stop a running server Options: + --background Start detached, print connection JSON to stdout, then exit --port=PORT Use a specific port (default: auto-detect starting at 8400) --help Show this help @@ -390,6 +392,35 @@ if (args.includes('stop')) { process.exit(0); } +// --background: spawn a detached child server, wait for it to be ready, +// print the connection JSON, then exit. This keeps the startup command +// simple (no shell backgrounding or chained commands). +if (args.includes('--background')) { + const childArgs = args.filter(a => a !== '--background'); + const child = spawn(process.execPath, [fileURLToPath(import.meta.url), ...childArgs], { + detached: true, + stdio: 'ignore', + cwd: process.cwd(), + }); + child.unref(); + + // Poll for the PID file (the child writes it once the HTTP server is listening). + const deadline = Date.now() + 10_000; + while (Date.now() < deadline) { + try { + const info = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); + if (info.pid !== process.pid) { + // Output JSON so the agent can read port + token from stdout. + console.log(JSON.stringify(info)); + process.exit(0); + } + } catch { /* not ready yet */ } + await new Promise(r => setTimeout(r, 200)); + } + console.error('Timed out waiting for live server to start.'); + process.exit(1); +} + // Check for existing session try { const existing = JSON.parse(fs.readFileSync(LIVE_PID_FILE, 'utf-8')); From 5fee3148be291e244608e881413056d078fc0584 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 13 Apr 2026 16:14:51 -0700 Subject: [PATCH 027/125] Fix section-nav using wrong positions for nested sections The changelog and FAQ sections are inside a positioned .changelog-faq-row wrapper, so their offsetTop was 0 (relative to parent) instead of their actual document position. This broke current-section detection and caused both pills to appear permanently active. Use getBoundingClientRect() instead, which returns correct absolute positions regardless of nesting. Co-Authored-By: Claude Opus 4.6 (1M context) --- public/js/components/section-nav.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/public/js/components/section-nav.js b/public/js/components/section-nav.js index e34039387..0c182f6ff 100644 --- a/public/js/components/section-nav.js +++ b/public/js/components/section-nav.js @@ -17,10 +17,16 @@ export function initSectionNav() { let ticking = false; + // Returns the element's top position relative to the document, + // which works even when the element is inside a positioned parent. + function docTop(el) { + return el.getBoundingClientRect().top + window.scrollY; + } + function updateNav() { const scrollY = window.scrollY; const heroBottom = hero.offsetTop + hero.offsetHeight - 100; - const footerTop = footer ? footer.offsetTop : Infinity; + const footerTop = footer ? docTop(footer) : Infinity; const viewportBottom = scrollY + window.innerHeight; // Show nav after hero, hide when footer is visible @@ -36,7 +42,7 @@ export function initSectionNav() { for (let i = sectionIds.length - 1; i >= 0; i--) { const section = document.getElementById(sectionIds[i]); - if (section && section.offsetTop <= viewportMiddle) { + if (section && docTop(section) <= viewportMiddle) { currentSection = sectionIds[i]; break; } @@ -47,10 +53,10 @@ export function initSectionNav() { const activeSections = new Set(); if (currentSection) { const currentEl = document.getElementById(currentSection); - const currentTop = currentEl?.offsetTop ?? 0; + const currentTop = currentEl ? docTop(currentEl) : 0; sectionIds.forEach(id => { const el = document.getElementById(id); - if (el && Math.abs(el.offsetTop - currentTop) < 4) { + if (el && Math.abs(docTop(el) - currentTop) < 4) { activeSections.add(id); } }); From f397b9f1230996d6fece5cfa6daddb3995c680cf Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 13 Apr 2026 16:31:03 -0700 Subject: [PATCH 028/125] Fix keyboard nav and click-to-deselect in live mode picker - Arrow keys now pass through to element picker when the freeform input is empty, instead of being swallowed by stopPropagation - Arrow nav works in both PICKING and CONFIGURING states, so you can change your element selection while the config bar is open - Clicking outside the selected element and bar returns to PICKING mode, matching the expected deselect behavior Co-Authored-By: Claude Opus 4.6 (1M context) --- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .pi/skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- .../skills/impeccable/scripts/live-browser.js | 38 ++++++++++++++----- 12 files changed, 348 insertions(+), 108 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 75bb26d94..59e92d239 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -342,9 +342,11 @@ input.style.background = 'transparent'; }); input.addEventListener('keydown', (e) => { - e.stopPropagation(); // Don't trigger element picker keyboard nav - if (e.key === 'Enter') { e.preventDefault(); handleGo(); } - if (e.key === 'Escape') { e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; } + if (e.key === 'Enter') { e.stopPropagation(); e.preventDefault(); handleGo(); return; } + if (e.key === 'Escape') { e.stopPropagation(); e.preventDefault(); input.blur(); hideBar(); state = 'PICKING'; return; } + // Let arrow keys pass through to the element picker when the input is empty + if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !input.value) return; + e.stopPropagation(); }); row.appendChild(input); @@ -970,6 +972,15 @@ if (pickerEl?.style.display !== 'none' && !own(e.target)) { hideActionPicker(); } + // In CONFIGURING: click outside the bar and selected element returns to PICKING + if (state === 'CONFIGURING' && !own(e.target) && selectedElement && !selectedElement.contains(e.target)) { + hideBar(); + stopScrollTracking(); + state = 'PICKING'; + hoveredElement = null; + hideHighlight(); + return; + } if (state !== 'PICKING' || !pickActive) return; if (own(e.target)) return; if (!hoveredElement || !pickable(hoveredElement)) return; @@ -992,19 +1003,21 @@ if (state === 'PICKING') { hideHighlight(); state = 'IDLE'; return; } } - if (state === 'PICKING' && hoveredElement) { + // Arrow/Enter nav works in PICKING (hover) and CONFIGURING (selected, input empty) + var navEl = (state === 'PICKING') ? hoveredElement : (state === 'CONFIGURING') ? selectedElement : null; + if (navEl && (e.key === 'ArrowUp' || e.key === 'ArrowDown' || (e.key === 'Enter' && state === 'PICKING'))) { let next = null; if (e.key === 'ArrowDown' && !e.shiftKey) { - next = hoveredElement.nextElementSibling; + next = navEl.nextElementSibling; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'ArrowUp' && !e.shiftKey) { - next = hoveredElement.previousElementSibling; + next = navEl.previousElementSibling; while (next && !pickable(next)) next = next.previousElementSibling; } else if (e.key === 'ArrowUp' && e.shiftKey) { - next = hoveredElement.parentElement; + next = navEl.parentElement; if (next && !pickable(next)) next = null; } else if (e.key === 'ArrowDown' && e.shiftKey) { - next = hoveredElement.firstElementChild; + next = navEl.firstElementChild; while (next && !pickable(next)) next = next.nextElementSibling; } else if (e.key === 'Enter') { e.preventDefault(); @@ -1017,7 +1030,14 @@ } if (next) { e.preventDefault(); - hoveredElement = next; + if (state === 'PICKING') { + hoveredElement = next; + } else { + // CONFIGURING: re-select the new element and refresh the bar + selectedElement = next; + showBar('configure'); + startScrollTracking(); + } showHighlight(next); next.scrollIntoView({ block: 'nearest', behavior: 'smooth' }); } From 8030bc226a849811a31846b5a14abd6f0437092a Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 13 Apr 2026 16:44:26 -0700 Subject: [PATCH 029/125] Add live-inject.mjs: per-project config for instant script tag management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First live run: agent auto-detects framework and writes a small config.json (file, insertBefore/insertAfter anchor, comment syntax). Every subsequent run: live-inject.mjs handles insert/remove deterministically, no LLM needed. The config lives at {scripts_path}/config.json and is gitignored — it's a per-project cache that wipes on skill update and regenerates on next use. - New live-inject.mjs: --port (insert), --remove, --check modes - Idempotent insert: re-running with a different port replaces cleanly - Reference doc: one-time detection step, then instant insert/remove Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .claude/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .cursor/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .gemini/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .github/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .gitignore | 4 + .kiro/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .opencode/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .pi/skills/impeccable/reference/live.md | 64 ++++--- .pi/skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .rovodev/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .trae-cn/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ .trae/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ public/index.html | 1 - source/skills/impeccable/reference/live.md | 64 ++++--- .../skills/impeccable/scripts/live-inject.mjs | 174 ++++++++++++++++++ 26 files changed, 2584 insertions(+), 277 deletions(-) create mode 100644 .agents/skills/impeccable/scripts/live-inject.mjs create mode 100644 .claude/skills/impeccable/scripts/live-inject.mjs create mode 100644 .cursor/skills/impeccable/scripts/live-inject.mjs create mode 100644 .gemini/skills/impeccable/scripts/live-inject.mjs create mode 100644 .github/skills/impeccable/scripts/live-inject.mjs create mode 100644 .kiro/skills/impeccable/scripts/live-inject.mjs create mode 100644 .opencode/skills/impeccable/scripts/live-inject.mjs create mode 100644 .pi/skills/impeccable/scripts/live-inject.mjs create mode 100644 .rovodev/skills/impeccable/scripts/live-inject.mjs create mode 100644 .trae-cn/skills/impeccable/scripts/live-inject.mjs create mode 100644 .trae/skills/impeccable/scripts/live-inject.mjs create mode 100644 source/skills/impeccable/scripts/live-inject.mjs diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.agents/skills/impeccable/reference/live.md +++ b/.agents/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.agents/skills/impeccable/scripts/live-inject.mjs b/.agents/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.agents/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.claude/skills/impeccable/reference/live.md b/.claude/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.claude/skills/impeccable/reference/live.md +++ b/.claude/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.claude/skills/impeccable/scripts/live-inject.mjs b/.claude/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.claude/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.cursor/skills/impeccable/reference/live.md b/.cursor/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.cursor/skills/impeccable/reference/live.md +++ b/.cursor/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.cursor/skills/impeccable/scripts/live-inject.mjs b/.cursor/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.cursor/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.gemini/skills/impeccable/reference/live.md b/.gemini/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.gemini/skills/impeccable/reference/live.md +++ b/.gemini/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.gemini/skills/impeccable/scripts/live-inject.mjs b/.gemini/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.gemini/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.github/skills/impeccable/reference/live.md b/.github/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.github/skills/impeccable/reference/live.md +++ b/.github/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.github/skills/impeccable/scripts/live-inject.mjs b/.github/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.github/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.gitignore b/.gitignore index 1923ca3ca..631650cc6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,10 @@ Thumbs.db # Live mode session file (created by live-server.mjs, cleaned up on stop) .impeccable-live.json +# Per-project live mode injection config (generated once per project by the +# skill; wiped on skill update, regenerated on next live run) +**/skills/impeccable/scripts/config.json + # Extension build artifacts extension/detector/ diff --git a/.kiro/skills/impeccable/reference/live.md b/.kiro/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.kiro/skills/impeccable/reference/live.md +++ b/.kiro/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.kiro/skills/impeccable/scripts/live-inject.mjs b/.kiro/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.kiro/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.opencode/skills/impeccable/reference/live.md b/.opencode/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.opencode/skills/impeccable/reference/live.md +++ b/.opencode/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.opencode/skills/impeccable/scripts/live-inject.mjs b/.opencode/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.opencode/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.pi/skills/impeccable/reference/live.md b/.pi/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.pi/skills/impeccable/reference/live.md +++ b/.pi/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.pi/skills/impeccable/scripts/live-inject.mjs b/.pi/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.pi/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.rovodev/skills/impeccable/reference/live.md b/.rovodev/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.rovodev/skills/impeccable/reference/live.md +++ b/.rovodev/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.rovodev/skills/impeccable/scripts/live-inject.mjs b/.rovodev/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.rovodev/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.trae-cn/skills/impeccable/reference/live.md b/.trae-cn/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.trae-cn/skills/impeccable/reference/live.md +++ b/.trae-cn/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.trae-cn/skills/impeccable/scripts/live-inject.mjs b/.trae-cn/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.trae-cn/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/.trae/skills/impeccable/reference/live.md b/.trae/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/.trae/skills/impeccable/reference/live.md +++ b/.trae/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/.trae/skills/impeccable/scripts/live-inject.mjs b/.trae/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/.trae/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; diff --git a/public/index.html b/public/index.html index b8ee0f9c6..68bac36f0 100644 --- a/public/index.html +++ b/public/index.html @@ -756,6 +756,5 @@ - diff --git a/source/skills/impeccable/reference/live.md b/source/skills/impeccable/reference/live.md index a6a449cbe..f3b785fc7 100644 --- a/source/skills/impeccable/reference/live.md +++ b/source/skills/impeccable/reference/live.md @@ -15,34 +15,48 @@ Launch interactive live variant mode: select elements in the browser, pick a des ## Inject the Browser Script -Find the project's main HTML entry point. This varies by framework: +The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). -| Framework | Typical file | -|-----------|-------------| -| Plain HTML | `index.html` | -| Vite / React | `index.html` (project root) | -| Next.js (App Router) | `app/layout.tsx` (add a ` - +```bash +node {{scripts_path}}/live-inject.mjs --check ``` -**JSX / TSX (React, Next.js):** -```jsx -{/* impeccable-live-start */} - -{/* impeccable-live-end */} +If the output says `{"ok": true, ...}`, skip to Step 2. + +If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: + +| Framework | `file` | `insertBefore` | `commentSyntax` | +|-----------|--------|----------------|-----------------| +| Plain HTML | `index.html` | `` | `html` | +| Vite / React | `index.html` | `` | `html` | +| Next.js (App Router) | `app/layout.tsx` | `` | `jsx` | +| Next.js (Pages) | `pages/_document.tsx` | `` | `jsx` | +| Nuxt | `app.vue` | `` | `html` | +| Svelte / SvelteKit | `src/app.html` | `` | `html` | +| Astro | the root layout `.astro` file | `` | `html` | +| Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | + +Write the config to the path reported by `--check`. Example for this project: + +```json +{ + "file": "public/index.html", + "insertBefore": "", + "commentSyntax": "html" +} ``` -Place it before the closing `` or at the end of the layout component. Save the file. The dev server will reload and the element picker will activate. +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). + +### Step 2: Insert the live tag + +```bash +node {{scripts_path}}/live-inject.mjs --port PORT +``` + +Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. If browser automation tools are available, also navigate to the page so the user can see it. @@ -177,7 +191,11 @@ If the poll is still running as a background task, kill it and proceed directly When the loop ends: -1. **Remove the injected script tag** from the source file. Delete everything between `` and `` (inclusive). Use the appropriate comment syntax for the framework. +1. **Remove the injected script tag**: + ```bash + node {{scripts_path}}/live-inject.mjs --remove + ``` + (The config.json stays so future `live-inject.mjs --port PORT` calls are instant.) 2. **Remove any leftover variant wrappers** (search for `impeccable-variants-start` markers and clean up). 3. **Remove any leftover carbonize blocks** (search for `impeccable-carbonize-start` markers and clean up). 4. **Stop the server**: diff --git a/source/skills/impeccable/scripts/live-inject.mjs b/source/skills/impeccable/scripts/live-inject.mjs new file mode 100644 index 000000000..d61c17925 --- /dev/null +++ b/source/skills/impeccable/scripts/live-inject.mjs @@ -0,0 +1,174 @@ +/** + * CLI helper: insert/remove the live variant mode script tag in the project's + * main HTML entry point. + * + * On first live run, the agent generates `config.json` in this script's + * directory with the project's insertion target (framework-specific). On + * every subsequent run, this script handles insert/remove deterministically + * with zero LLM involvement. + * + * Usage: + * node live-inject.mjs --port PORT # Insert the live script tag + * node live-inject.mjs --remove # Remove the live script tag + * node live-inject.mjs --check # Check whether config.json exists + */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const CONFIG_PATH = path.join(__dirname, 'config.json'); +const MARKER_OPEN_TEXT = 'impeccable-live-start'; +const MARKER_CLOSE_TEXT = 'impeccable-live-end'; + +export async function injectCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live-inject.mjs [options] + +Insert or remove the live mode script tag in the project's HTML entry point. +Reads configuration from config.json (in this same directory). + +Modes: + --port PORT Insert script tag pointing at http://localhost:PORT/live.js + --remove Remove the script tag (if present) + --check Print whether config.json exists and its content + +Output (JSON): + { ok, file, inserted|removed, config? }`); + process.exit(0); + } + + if (args.includes('--check')) { + if (!fs.existsSync(CONFIG_PATH)) { + console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(0); + } + try { + const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + } + return; + } + + // Load config + if (!fs.existsSync(CONFIG_PATH)) { + console.error(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); + process.exit(1); + } + const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); + validateConfig(config); + + const absFile = path.resolve(process.cwd(), config.file); + if (!fs.existsSync(absFile)) { + console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); + process.exit(1); + } + + const content = fs.readFileSync(absFile, 'utf-8'); + + if (args.includes('--remove')) { + const updated = removeTag(content, config.commentSyntax); + if (updated === content) { + console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); + return; + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + return; + } + + // Insert mode — need --port + const portIdx = args.indexOf('--port'); + const port = portIdx !== -1 ? parseInt(args[portIdx + 1], 10) : NaN; + if (!Number.isFinite(port)) { + console.error(JSON.stringify({ ok: false, error: 'missing_port' })); + process.exit(1); + } + + // Already inserted? Replace to refresh the port. + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) { + console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); + process.exit(1); + } + fs.writeFileSync(absFile, updated, 'utf-8'); + console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); +} + +// --------------------------------------------------------------------------- +// Core operations +// --------------------------------------------------------------------------- + +function validateConfig(cfg) { + if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); + if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { + throw new Error('config.insertBefore or config.insertAfter (string) required'); + } + if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { + throw new Error("config.commentSyntax must be 'html' or 'jsx'"); + } +} + +function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ''; } + +function buildTagBlock(syntax, port) { + const open = commentOpen(syntax); + const close = commentClose(syntax); + return ( + open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + '\n' + + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' + ); +} + +function insertTag(content, config, port) { + const block = buildTagBlock(config.commentSyntax, port); + if (config.insertBefore) { + const idx = content.indexOf(config.insertBefore); + if (idx === -1) return content; + return content.slice(0, idx) + block + content.slice(idx); + } + // insertAfter + const idx = content.indexOf(config.insertAfter); + if (idx === -1) return content; + const after = idx + config.insertAfter.length; + // Preserve a single trailing newline if the anchor didn't end with one + const prefix = content[after] === '\n' ? content.slice(0, after + 1) : content.slice(0, after) + '\n'; + return prefix + block + content.slice(prefix.length); +} + +/** + * Remove the live script block. Matches either HTML or JSX comment markers + * regardless of config (so stale tags from a wrong config can still be cleaned). + */ +function removeTag(content, _syntax) { + // Two patterns: HTML comment markers or JSX comment markers, with any content between. + const patterns = [ + /\n?[\s\S]*?\n?/, + /\n?\{\/\*\s*impeccable-live-start\s*\*\/\}[\s\S]*?\{\/\*\s*impeccable-live-end\s*\*\/\}\n?/, + ]; + for (const pat of patterns) { + const next = content.replace(pat, '\n'); + if (next !== content) return next; + } + return content; +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live-inject.mjs') || _running?.endsWith('live-inject.mjs/')) { + injectCli(); +} + +export { insertTag, removeTag, validateConfig, buildTagBlock }; From 996c9af78c6a3f46aef28ad5ddfd80ef48fdc287 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 13 Apr 2026 16:56:20 -0700 Subject: [PATCH 030/125] Add live.mjs combined entry point for fast startup Previously, starting live mode required ~5-6 sequential bash calls: read .impeccable.md, start server, check config, read reference, inject tag, verify. The new live.mjs does all of this in a single command (~340ms cold, ~90ms when reusing a running server) and returns everything the agent needs in one JSON blob. Workflow is now: 1. node live.mjs # start + inject + load context (1 bash call) 2. navigate browser # optional MCP call 3. node live-poll.mjs # enter poll loop Reference doc collapsed to a single "Start Live Mode" section with the one-command path plus a first-time config creation fallback. Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/reference/live.md | 51 +++---- .agents/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .claude/skills/impeccable/reference/live.md | 51 +++---- .claude/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .cursor/skills/impeccable/reference/live.md | 51 +++---- .cursor/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .gemini/skills/impeccable/reference/live.md | 51 +++---- .gemini/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .github/skills/impeccable/reference/live.md | 51 +++---- .github/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .kiro/skills/impeccable/reference/live.md | 51 +++---- .kiro/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .opencode/skills/impeccable/reference/live.md | 51 +++---- .opencode/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .pi/skills/impeccable/reference/live.md | 51 +++---- .pi/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .rovodev/skills/impeccable/reference/live.md | 51 +++---- .rovodev/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .trae-cn/skills/impeccable/reference/live.md | 51 +++---- .trae-cn/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ .trae/skills/impeccable/reference/live.md | 51 +++---- .trae/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ source/skills/impeccable/reference/live.md | 51 +++---- source/skills/impeccable/scripts/live.mjs | 143 ++++++++++++++++++ 24 files changed, 1992 insertions(+), 336 deletions(-) create mode 100644 .agents/skills/impeccable/scripts/live.mjs create mode 100644 .claude/skills/impeccable/scripts/live.mjs create mode 100644 .cursor/skills/impeccable/scripts/live.mjs create mode 100644 .gemini/skills/impeccable/scripts/live.mjs create mode 100644 .github/skills/impeccable/scripts/live.mjs create mode 100644 .kiro/skills/impeccable/scripts/live.mjs create mode 100644 .opencode/skills/impeccable/scripts/live.mjs create mode 100644 .pi/skills/impeccable/scripts/live.mjs create mode 100644 .rovodev/skills/impeccable/scripts/live.mjs create mode 100644 .trae-cn/skills/impeccable/scripts/live.mjs create mode 100644 .trae/skills/impeccable/scripts/live.mjs create mode 100644 source/skills/impeccable/scripts/live.mjs diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.agents/skills/impeccable/reference/live.md +++ b/.agents/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.agents/skills/impeccable/scripts/live.mjs b/.agents/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.agents/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.claude/skills/impeccable/reference/live.md b/.claude/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.claude/skills/impeccable/reference/live.md +++ b/.claude/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.claude/skills/impeccable/scripts/live.mjs b/.claude/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.claude/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.cursor/skills/impeccable/reference/live.md b/.cursor/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.cursor/skills/impeccable/reference/live.md +++ b/.cursor/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.cursor/skills/impeccable/scripts/live.mjs b/.cursor/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.cursor/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.gemini/skills/impeccable/reference/live.md b/.gemini/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.gemini/skills/impeccable/reference/live.md +++ b/.gemini/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.gemini/skills/impeccable/scripts/live.mjs b/.gemini/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.gemini/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.github/skills/impeccable/reference/live.md b/.github/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.github/skills/impeccable/reference/live.md +++ b/.github/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.github/skills/impeccable/scripts/live.mjs b/.github/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.github/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.kiro/skills/impeccable/reference/live.md b/.kiro/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.kiro/skills/impeccable/reference/live.md +++ b/.kiro/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.kiro/skills/impeccable/scripts/live.mjs b/.kiro/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.kiro/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.opencode/skills/impeccable/reference/live.md b/.opencode/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.opencode/skills/impeccable/reference/live.md +++ b/.opencode/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.opencode/skills/impeccable/scripts/live.mjs b/.opencode/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.opencode/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.pi/skills/impeccable/reference/live.md b/.pi/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.pi/skills/impeccable/reference/live.md +++ b/.pi/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.pi/skills/impeccable/scripts/live.mjs b/.pi/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.pi/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.rovodev/skills/impeccable/reference/live.md b/.rovodev/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.rovodev/skills/impeccable/reference/live.md +++ b/.rovodev/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.rovodev/skills/impeccable/scripts/live.mjs b/.rovodev/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.rovodev/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.trae-cn/skills/impeccable/reference/live.md b/.trae-cn/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.trae-cn/skills/impeccable/reference/live.md +++ b/.trae-cn/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.trae-cn/skills/impeccable/scripts/live.mjs b/.trae-cn/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.trae-cn/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/.trae/skills/impeccable/reference/live.md b/.trae/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/.trae/skills/impeccable/reference/live.md +++ b/.trae/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/.trae/skills/impeccable/scripts/live.mjs b/.trae/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/.trae/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} diff --git a/source/skills/impeccable/reference/live.md b/source/skills/impeccable/reference/live.md index f3b785fc7..3f4ad029f 100644 --- a/source/skills/impeccable/reference/live.md +++ b/source/skills/impeccable/reference/live.md @@ -4,28 +4,33 @@ Launch interactive live variant mode: select elements in the browser, pick a des - A running development server with hot module replacement (Vite, Next.js, Bun, etc.), OR a static HTML file open in the browser -## Start the Server +## Start Live Mode (one command) -1. Read `.impeccable.md` if it exists. Keep the design context in mind for variant generation. -2. Start the live variant server in the background. The `--background` flag spawns a detached server process, waits for it to be ready, prints the connection JSON to stdout, and exits: - ```bash - node {{scripts_path}}/live-server.mjs --background - ``` - The output JSON contains `port` and `token`. Use the port for the script tag below. - -## Inject the Browser Script - -The `live-inject.mjs` script handles insertion deterministically. It reads `config.json` from its own directory (one-time per-project setup). - -### Step 1: Ensure config.json exists +The `live.mjs` entry point does everything in a single call: checks config, starts (or reuses) the server, injects the script tag, loads `.impeccable.md` context. ```bash -node {{scripts_path}}/live-inject.mjs --check +node {{scripts_path}}/live.mjs ``` -If the output says `{"ok": true, ...}`, skip to Step 2. +### Happy path -If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, you need to create the config **once**. Look at the project structure and package.json to determine: +Output JSON: +```json +{ + "ok": true, + "serverPort": 8400, + "serverToken": "...", + "pageFile": "public/index.html", + "hasContext": true, + "context": "...full .impeccable.md contents..." +} +``` + +Keep the `context` in mind for variant generation. If browser automation tools are available, navigate to the page so the user can see it. Then proceed directly to the poll loop — no other setup steps needed. + +### First-time setup (config missing) + +If `live.mjs` outputs `{"ok": false, "error": "config_missing", "configPath": "..."}`, this project has never used live mode before. Create the config at the reported path based on the project's framework: | Framework | `file` | `insertBefore` | `commentSyntax` | |-----------|--------|----------------|-----------------| @@ -38,7 +43,7 @@ If the output says `{"ok": false, "error": "config_missing", "path": "..."}`, yo | Astro | the root layout `.astro` file | `` | `html` | | Static site with a non-root HTML file | e.g. `public/index.html` | `` | `html` | -Write the config to the path reported by `--check`. Example for this project: +Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line. Example: ```json { @@ -48,17 +53,7 @@ Write the config to the path reported by `--check`. Example for this project: } ``` -Use `insertAfter` instead of `insertBefore` if the anchor should be matched **after** a specific line (e.g. just after the main app script). - -### Step 2: Insert the live tag - -```bash -node {{scripts_path}}/live-inject.mjs --port PORT -``` - -Use the `port` from the live-server startup output. The script writes the tag idempotently: if a stale tag is present, it's replaced with one pointing at the new port. Save is automatic. - -If browser automation tools are available, also navigate to the page so the user can see it. +Then re-run `node {{scripts_path}}/live.mjs` to proceed. ## Enter the Poll Loop diff --git a/source/skills/impeccable/scripts/live.mjs b/source/skills/impeccable/scripts/live.mjs new file mode 100644 index 000000000..93f05456e --- /dev/null +++ b/source/skills/impeccable/scripts/live.mjs @@ -0,0 +1,143 @@ +/** + * CLI entry point: prepare everything needed to enter the live variant poll loop. + * + * Does (all in one command): + * 1. Check config.json (returns config_missing if first-ever run) + * 2. Start the live server in the background (or reuse a running one) + * 3. Inject the browser script tag into the project's entry file + * 4. Read .impeccable.md for design context (if present) + * 5. Print a single JSON blob with everything the agent needs + * + * After this, the agent's only remaining steps are: + * - Navigate the browser to the page (optional, if browser automation is available) + * - Enter the poll loop: `node live-poll.mjs` + * + * Usage: + * node live.mjs # Prepare everything, print JSON, exit + * node live.mjs --help + */ + +import { execSync } from 'node:child_process'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PID_FILE = path.join(process.cwd(), '.impeccable-live.json'); +const CONTEXT_FILE = path.join(process.cwd(), '.impeccable.md'); + +async function liveCli() { + const args = process.argv.slice(2); + + if (args.includes('--help') || args.includes('-h')) { + console.log(`Usage: node live.mjs + +Prepare everything for live variant mode in a single command: + - Checks scripts/config.json (required, created once per project) + - Starts (or reuses) the live server in the background + - Injects the browser script tag + - Reads .impeccable.md for design context + +On success, prints a JSON blob with: + { ok, serverPort, serverToken, pageFile, hasContext, context } + +On config_missing, prints: + { ok: false, error: "config_missing", configPath, hint } + +The agent should then: + 1. If config_missing, create the config and re-run this script + 2. Optionally navigate the browser to the page + 3. Enter the poll loop: node live-poll.mjs`); + process.exit(0); + } + + // 1. Check config (fail fast if missing — no point starting anything else) + const checkOut = runScript('live-inject.mjs', ['--check']); + const checkResult = safeParse(checkOut); + if (!checkResult || !checkResult.ok) { + console.log(JSON.stringify(checkResult || { ok: false, error: 'check_failed', raw: checkOut })); + process.exit(0); + } + + // 2. Start server (or reuse existing) + const serverInfo = ensureServerRunning(); + if (!serverInfo) { + console.log(JSON.stringify({ ok: false, error: 'server_start_failed' })); + process.exit(1); + } + + // 3. Inject the script tag at the current port + const injectOut = runScript('live-inject.mjs', ['--port', String(serverInfo.port)]); + const injectResult = safeParse(injectOut); + if (!injectResult || !injectResult.ok) { + console.log(JSON.stringify({ + ok: false, + error: 'inject_failed', + detail: injectResult || injectOut, + serverPort: serverInfo.port, + })); + process.exit(1); + } + + // 4. Load design context if available + let context = null; + try { context = fs.readFileSync(CONTEXT_FILE, 'utf-8'); } catch { /* optional */ } + + // 5. Emit everything the agent needs + console.log(JSON.stringify({ + ok: true, + serverPort: serverInfo.port, + serverToken: serverInfo.token, + pageFile: checkResult.config.file, + hasContext: !!context, + context, + }, null, 2)); +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +function runScript(name, args) { + const scriptPath = path.join(__dirname, name); + const cmd = `node "${scriptPath}" ${args.map(a => `"${a}"`).join(' ')}`; + try { + return execSync(cmd, { encoding: 'utf-8', cwd: process.cwd(), timeout: 15_000 }); + } catch (err) { + // execSync throws on non-zero exit; return stdout if any + return err.stdout || err.message || ''; + } +} + +function safeParse(out) { + try { return JSON.parse(String(out).trim()); } catch { return null; } +} + +/** + * Return { pid, port, token } for the running live server, starting one if needed. + */ +function ensureServerRunning() { + // Try to reuse an existing server + try { + const existing = JSON.parse(fs.readFileSync(PID_FILE, 'utf-8')); + if (existing && existing.pid) { + try { + process.kill(existing.pid, 0); // throws if dead + return existing; + } catch { /* stale PID file — the server script will clean it up */ } + } + } catch { /* no PID file */ } + + // Start a new server + const out = runScript('live-server.mjs', ['--background']); + return safeParse(out); +} + +// --------------------------------------------------------------------------- +// Auto-execute +// --------------------------------------------------------------------------- + +const _running = process.argv[1]; +if (_running?.endsWith('live.mjs') || _running?.endsWith('live.mjs/')) { + liveCli(); +} From 7386b3033f22c8dde373efe80996e500452571c7 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 13 Apr 2026 17:07:23 -0700 Subject: [PATCH 031/125] Force variant diversity and mandatory reference loading in live mode Two failure modes observed: 1. Claude generates N near-identical variants (small shade/size tweaks) instead of meaningfully different design directions 2. When a sub-command like /bolder is chosen in the picker, Claude skips loading reference/bolder.md and generates generic variants Fixes: - "Load reference file" is now a MANDATORY Step 2a, separate and non-negotiable, called out as a critical failure to skip - Added Step 2b "Plan 3+ distinctly different directions" with 7 structural axes variants must differ on (hierarchy, layout topology, typography system, color strategy, density, tone, decomposition) - Added action-specific diversity rules (bolder = different dimensions, animate = different motion vocabulary, colorize = different hues, etc.) - Freeform prompt guidance: honor the prompt direction but explore meaningfully different interpretations, not three near-copies Co-Authored-By: Claude Opus 4.6 (1M context) --- .agents/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .claude/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .cursor/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .gemini/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .github/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .kiro/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .opencode/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .pi/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .rovodev/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .trae-cn/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- .trae/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- source/skills/impeccable/reference/live.md | 41 ++++++++++++++++--- 12 files changed, 420 insertions(+), 72 deletions(-) diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md index 3f4ad029f..6d69bdd13 100644 --- a/.agents/skills/impeccable/reference/live.md +++ b/.agents/skills/impeccable/reference/live.md @@ -105,17 +105,46 @@ The command outputs JSON with the file path and the insert line: If `wrap` fails, fall back to manual grep + edit. -### Step 2: Generate all variants and write them in a SINGLE edit +### Step 2a: MANDATORY — Load the action's reference file -1. **Load the design command's reference file.** If `event.action` is "bolder", load `reference/bolder.md`. If "impeccable" (the default), use the main design principles from this skill without loading a sub-command reference. +**This step is non-negotiable.** Before generating anything, you MUST load the reference file for `event.action`: -2. **Generate ALL variants at once.** For each variant, create a complete HTML replacement of the original element. Consider the element's context (computed styles, parent structure, CSS custom properties from `event.element`). +- `event.action` is "impeccable" (default, no sub-command chosen): use the main design principles from `SKILL.md` (already loaded). Do NOT load a sub-command reference. +- `event.action` is any other value (e.g. "bolder", "quieter", "distill", "polish", "typeset", "colorize", "layout", "adapt", "animate", "delight", "overdrive"): use Read to load `reference/.md` right now. Do not proceed until it's in context. -3. **Diversify across variants.** Each variant should take a distinctly different approach. For "bolder", one might focus on type weight, another on color saturation, another on spatial scale, another on structural change. Do NOT generate N variations on the same idea. +Skipping this step is a critical failure. The sub-commands exist precisely because the generic "impeccable" prompt produces generic variants. Each action encodes a specific design discipline — ignoring the reference file means ignoring what the user asked for. -4. **If a freeform prompt was provided** (`event.freeformPrompt`), use it as additional guidance for all variants. +### Step 2b: Plan 3+ distinctly different directions BEFORE writing any code -5. **Write CSS + HTML together in a SINGLE edit** at the insert line reported by `wrap`. Colocate any scoped CSS inside the variant wrapper as a ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the ` +
    + +
    +
    + +
    +
    + +
    +``` + +The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the ` -
    - -
    -
    - -
    -
    - -
    -``` - -The first variant should NOT have `style="display: none"` (it should be visible by default). All others should. If variants only use inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `
    - +
    - +
    - +
    ``` +**Each variant div contains exactly one top-level element — the full replacement for the original.** Use the same tag as the original (e.g. `
    ` if the user picked a `
    `). Loose siblings (heading + paragraph + div as direct children of the variant div) break the outline tracking and the accept flow, which both assume one child. + The first variant has no `display: none` (visible by default). All others do. If variants use only inline styles and no scoped CSS, omit the `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.agents/skills/impeccable/scripts/live-inject.mjs b/.agents/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.agents/skills/impeccable/scripts/live-inject.mjs +++ b/.agents/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.agents/skills/impeccable/scripts/live-server.mjs b/.agents/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.agents/skills/impeccable/scripts/live-server.mjs +++ b/.agents/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.agents/skills/impeccable/scripts/live-wrap.mjs b/.agents/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.agents/skills/impeccable/scripts/live-wrap.mjs +++ b/.agents/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.agents/skills/impeccable/scripts/live.mjs b/.agents/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.agents/skills/impeccable/scripts/live.mjs +++ b/.agents/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.claude/skills/impeccable/reference/live.md b/.claude/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.claude/skills/impeccable/reference/live.md +++ b/.claude/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.claude/skills/impeccable/scripts/live-inject.mjs b/.claude/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.claude/skills/impeccable/scripts/live-inject.mjs +++ b/.claude/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.claude/skills/impeccable/scripts/live-server.mjs b/.claude/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.claude/skills/impeccable/scripts/live-server.mjs +++ b/.claude/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.claude/skills/impeccable/scripts/live-wrap.mjs b/.claude/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.claude/skills/impeccable/scripts/live-wrap.mjs +++ b/.claude/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.claude/skills/impeccable/scripts/live.mjs b/.claude/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.claude/skills/impeccable/scripts/live.mjs +++ b/.claude/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.cursor/skills/impeccable/reference/live.md b/.cursor/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.cursor/skills/impeccable/reference/live.md +++ b/.cursor/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.cursor/skills/impeccable/scripts/live-inject.mjs b/.cursor/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.cursor/skills/impeccable/scripts/live-inject.mjs +++ b/.cursor/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.cursor/skills/impeccable/scripts/live-server.mjs b/.cursor/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.cursor/skills/impeccable/scripts/live-server.mjs +++ b/.cursor/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.cursor/skills/impeccable/scripts/live-wrap.mjs b/.cursor/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.cursor/skills/impeccable/scripts/live-wrap.mjs +++ b/.cursor/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.cursor/skills/impeccable/scripts/live.mjs b/.cursor/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.cursor/skills/impeccable/scripts/live.mjs +++ b/.cursor/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.gemini/skills/impeccable/reference/live.md b/.gemini/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.gemini/skills/impeccable/reference/live.md +++ b/.gemini/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.gemini/skills/impeccable/scripts/live-inject.mjs b/.gemini/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.gemini/skills/impeccable/scripts/live-inject.mjs +++ b/.gemini/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.gemini/skills/impeccable/scripts/live-server.mjs b/.gemini/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.gemini/skills/impeccable/scripts/live-server.mjs +++ b/.gemini/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.gemini/skills/impeccable/scripts/live-wrap.mjs b/.gemini/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.gemini/skills/impeccable/scripts/live-wrap.mjs +++ b/.gemini/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.gemini/skills/impeccable/scripts/live.mjs b/.gemini/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.gemini/skills/impeccable/scripts/live.mjs +++ b/.gemini/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.github/skills/impeccable/reference/live.md b/.github/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.github/skills/impeccable/reference/live.md +++ b/.github/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.github/skills/impeccable/scripts/live-inject.mjs b/.github/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.github/skills/impeccable/scripts/live-inject.mjs +++ b/.github/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.github/skills/impeccable/scripts/live-server.mjs b/.github/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.github/skills/impeccable/scripts/live-server.mjs +++ b/.github/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.github/skills/impeccable/scripts/live-wrap.mjs b/.github/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.github/skills/impeccable/scripts/live-wrap.mjs +++ b/.github/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.github/skills/impeccable/scripts/live.mjs b/.github/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.github/skills/impeccable/scripts/live.mjs +++ b/.github/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.kiro/skills/impeccable/reference/live.md b/.kiro/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.kiro/skills/impeccable/reference/live.md +++ b/.kiro/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.kiro/skills/impeccable/scripts/live-inject.mjs b/.kiro/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.kiro/skills/impeccable/scripts/live-inject.mjs +++ b/.kiro/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.kiro/skills/impeccable/scripts/live-server.mjs b/.kiro/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.kiro/skills/impeccable/scripts/live-server.mjs +++ b/.kiro/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.kiro/skills/impeccable/scripts/live-wrap.mjs b/.kiro/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.kiro/skills/impeccable/scripts/live-wrap.mjs +++ b/.kiro/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.kiro/skills/impeccable/scripts/live.mjs b/.kiro/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.kiro/skills/impeccable/scripts/live.mjs +++ b/.kiro/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.opencode/skills/impeccable/reference/live.md b/.opencode/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.opencode/skills/impeccable/reference/live.md +++ b/.opencode/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.opencode/skills/impeccable/scripts/live-inject.mjs b/.opencode/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.opencode/skills/impeccable/scripts/live-inject.mjs +++ b/.opencode/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.opencode/skills/impeccable/scripts/live-server.mjs b/.opencode/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.opencode/skills/impeccable/scripts/live-server.mjs +++ b/.opencode/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.opencode/skills/impeccable/scripts/live-wrap.mjs b/.opencode/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.opencode/skills/impeccable/scripts/live-wrap.mjs +++ b/.opencode/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.opencode/skills/impeccable/scripts/live.mjs b/.opencode/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.opencode/skills/impeccable/scripts/live.mjs +++ b/.opencode/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.pi/skills/impeccable/reference/live.md b/.pi/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.pi/skills/impeccable/reference/live.md +++ b/.pi/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.pi/skills/impeccable/scripts/live-inject.mjs b/.pi/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.pi/skills/impeccable/scripts/live-inject.mjs +++ b/.pi/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.pi/skills/impeccable/scripts/live-server.mjs b/.pi/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.pi/skills/impeccable/scripts/live-server.mjs +++ b/.pi/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.pi/skills/impeccable/scripts/live-wrap.mjs b/.pi/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.pi/skills/impeccable/scripts/live-wrap.mjs +++ b/.pi/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.pi/skills/impeccable/scripts/live.mjs b/.pi/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.pi/skills/impeccable/scripts/live.mjs +++ b/.pi/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.rovodev/skills/impeccable/reference/live.md b/.rovodev/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.rovodev/skills/impeccable/reference/live.md +++ b/.rovodev/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.rovodev/skills/impeccable/scripts/live-inject.mjs b/.rovodev/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.rovodev/skills/impeccable/scripts/live-inject.mjs +++ b/.rovodev/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.rovodev/skills/impeccable/scripts/live-server.mjs b/.rovodev/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.rovodev/skills/impeccable/scripts/live-server.mjs +++ b/.rovodev/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.rovodev/skills/impeccable/scripts/live-wrap.mjs b/.rovodev/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.rovodev/skills/impeccable/scripts/live-wrap.mjs +++ b/.rovodev/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.rovodev/skills/impeccable/scripts/live.mjs b/.rovodev/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.rovodev/skills/impeccable/scripts/live.mjs +++ b/.rovodev/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.trae-cn/skills/impeccable/reference/live.md b/.trae-cn/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.trae-cn/skills/impeccable/reference/live.md +++ b/.trae-cn/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.trae-cn/skills/impeccable/scripts/live-inject.mjs b/.trae-cn/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.trae-cn/skills/impeccable/scripts/live-inject.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.trae-cn/skills/impeccable/scripts/live-server.mjs b/.trae-cn/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.trae-cn/skills/impeccable/scripts/live-server.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.trae-cn/skills/impeccable/scripts/live-wrap.mjs b/.trae-cn/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.trae-cn/skills/impeccable/scripts/live-wrap.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.trae-cn/skills/impeccable/scripts/live.mjs b/.trae-cn/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.trae-cn/skills/impeccable/scripts/live.mjs +++ b/.trae-cn/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/.trae/skills/impeccable/reference/live.md b/.trae/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/.trae/skills/impeccable/reference/live.md +++ b/.trae/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/.trae/skills/impeccable/scripts/live-inject.mjs b/.trae/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/.trae/skills/impeccable/scripts/live-inject.mjs +++ b/.trae/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/.trae/skills/impeccable/scripts/live-server.mjs b/.trae/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/.trae/skills/impeccable/scripts/live-server.mjs +++ b/.trae/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/.trae/skills/impeccable/scripts/live-wrap.mjs b/.trae/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/.trae/skills/impeccable/scripts/live-wrap.mjs +++ b/.trae/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.trae/skills/impeccable/scripts/live.mjs b/.trae/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/.trae/skills/impeccable/scripts/live.mjs +++ b/.trae/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, diff --git a/source/skills/impeccable/reference/live.md b/source/skills/impeccable/reference/live.md index 53bd64f54..60dcbda04 100644 --- a/source/skills/impeccable/reference/live.md +++ b/source/skills/impeccable/reference/live.md @@ -28,11 +28,11 @@ Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodi node {{scripts_path}}/live.mjs ``` -Output JSON: `{ ok, serverPort, serverToken, pageFile, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. +Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath, migrated }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation — **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** If `migrated: true`, the loader auto-renamed legacy `.impeccable.md` to `PRODUCT.md`; mention this once and suggest `/impeccable document` for the matching DESIGN.md. -`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves the HTML entry (`pageFile` / Vite / Next / Bun / tunnel / LAN hostname). +`serverPort` and `serverToken` belong to the small **Impeccable live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname). -If output is `{ ok: false, error: "config_missing", configPath }`, this project hasn't used live mode. See **First-time setup** at the bottom. +If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom. ## Poll loop @@ -44,6 +44,7 @@ LOOP: "generate" → Handle Generate; reply done; LOOP "accept" → Handle Accept; LOOP "discard" → Handle Discard; LOOP + "prefetch" → Handle Prefetch; LOOP "timeout" → LOOP "exit" → break → Cleanup ``` @@ -73,9 +74,23 @@ Reading annotations precisely: node {{scripts_path}}/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" ``` -Pass `event.element.id`, `event.element.classes` joined with commas, and `event.element.tagName`. The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. +Flag mapping — keep them separate, don't collapse into `--query`: -Output: `{ file, insertLine, commentSyntax }`. If `wrap` fails, fall back to manual grep + edit. +- `--element-id` ← `event.element.id` +- `--classes` ← `event.element.classes` joined with commas +- `--tag` ← `event.element.tagName` + +The helper searches ID first, then classes, then tag + class combo. If `event.pageUrl` implies the file (e.g. `/` is usually `index.html`), pass `--file PATH` to skip the search. `--query` is a fallback for raw text search only — do not use it for normal element lookups. + +Output on success: `{ file, insertLine, commentSyntax }`. + +**Fallback errors.** Wrap only writes into files it judges to be source (tracked by git, not marked GENERATED, not listed in config's `generatedFiles`). If it can't land on a source file, it errors without writing — accepting a variant into a generated file is silent data loss. Three shapes: + +- `{ error: "file_is_generated", file, hint }` — user-supplied `--file` points at a generated file. +- `{ error: "element_not_in_source", generatedMatch, hint }` — element exists only in a generated file (the next build would wipe any edits). +- `{ error: "element_not_found", hint }` — element isn't in any project file; likely runtime-injected (JS component, data-driven render). + +All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference @@ -173,24 +188,78 @@ node {{scripts_path}}/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH Then run `live-poll.mjs` again immediately. +## Handle fallback + +When wrap returns `fallback: "agent-driven"`, the deterministic flow doesn't apply. Pick up here. + +The goal is the same: give the user three variants to choose from AND persist the accepted one in a place the next build won't wipe. The difference is that you have to pick the right source file yourself. + +### Step 1: Identify where the element actually lives + +Use the error payload: + +- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"` — the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element. +- `element_not_found` — the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it. +- `file_is_generated` with `file: "..."` — user pointed at a generated file explicitly. Same resolution as `element_not_in_source`. + +Read the candidate source until you're confident where a change to the element would belong. If the change is purely visual, that source might be a shared stylesheet, not the template. + +### Step 2: Show three variants in the DOM for preview + +The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something: + +1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces — `
    `. +2. Insert your three variant divs inside it, same shape as the deterministic path. +3. Signal done with `--reply EVENT_ID done --file `. The browser's no-HMR fallback will fetch and inject. + +This served-file edit is **temporary** — next regen wipes it, and that's fine. The real work happens on accept. + +### Step 3: On accept, write to true source + +When the accept event arrives (`_acceptResult.handled` will usually be `false` here because accept also refuses to persist into generated files — see Handle accept for the carbonize branch), extract the accepted variant's content and write it into the source you identified in Step 1: + +- Structural change → edit the template / component source. +- Visual-only change → add or update rules in the appropriate stylesheet; remove the inline `')) inStyle = false; + continue; + } + if (!inOriginal && line.includes('data-impeccable-variant="original"')) { inOriginal = true; depth = 1; @@ -200,15 +237,24 @@ function extractOriginal(lines, block) { /** * Extract a specific variant's inner content (stripping the wrapper div). * Returns an array of lines, or null if not found. + * + * Skip ')) inStyle = false; + continue; + } + if (!inVariant && line.includes('data-impeccable-variant="' + variantNum + '"')) { inVariant = true; depth = 1; diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 19a234da2..5e13effda 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -732,13 +732,26 @@ const r = selectedElement.getBoundingClientRect(); const barH = barEl.offsetHeight || 44; const barW = barEl.offsetWidth || 380; - let top = r.bottom + 8; + const GLOBAL_BAR_RESERVE = 64; // global bar height + bottom margin + breathing room + const GAP = 8; + + // Prefer below the element; fall back to above; if neither fits (element + // taller than viewport), pin to a stable viewport anchor so the bar + // doesn't teleport between top and bottom as the user scrolls. + let top; + const belowTop = r.bottom + GAP; + const aboveTop = r.top - barH - GAP; + if (belowTop + barH + GAP <= window.innerHeight - GLOBAL_BAR_RESERVE) { + top = belowTop; + } else if (aboveTop >= GAP) { + top = aboveTop; + } else { + top = window.innerHeight - barH - GLOBAL_BAR_RESERVE; + } + let left = r.left + (r.width - barW) / 2; - // Keep in viewport - if (top + barH + 8 > window.innerHeight) top = r.top - barH - 8; - if (top < 8) top = 8; - if (left < 8) left = 8; - if (left + barW > window.innerWidth - 8) left = window.innerWidth - barW - 8; + if (left < GAP) left = GAP; + if (left + barW > window.innerWidth - GAP) left = window.innerWidth - barW - GAP; Object.assign(barEl.style, { top: top + 'px', left: left + 'px' }); } @@ -1251,6 +1264,7 @@ selectedElement = pickVariantContent(wrapper, 1) || wrapper.parentElement; state = 'CYCLING'; + hideShaderOverlay(); updateBarContent('cycling'); saveSession(); console.log('[impeccable] Injected ' + arrivedVariants + ' variants from source file.'); @@ -1514,6 +1528,28 @@ showAnnotOverlay(selectedElement); showBar('configure'); startScrollTracking(); + maybePrefetchPage(); + } + + // Fire a lightweight prefetch event the first time the user selects an + // element on a given route. The agent uses this to Read the underlying file + // into context before Go is hit, shaving the read off the critical path. + // Dedupe per session by pathname — clicking around on the same page doesn't + // re-fire. + // + // DISABLED: quick-Go workflows pay an extra harness round trip because + // prefetch + generate arrive as two events instead of one. Re-enable with + // a browser-side debounce (~800–1000ms, cancelled on Go) if we want to + // resurrect this. Server validator and skill dispatch remain in place so + // flipping this flag is the only change needed. + const PREFETCH_ENABLED = false; + const prefetchedPaths = new Set(); + function maybePrefetchPage() { + if (!PREFETCH_ENABLED) return; + const path = location.pathname; + if (prefetchedPaths.has(path)) return; + prefetchedPaths.add(path); + sendEvent({ type: 'prefetch', pageUrl: path }); } function handleKeyDown(e) { diff --git a/source/skills/impeccable/scripts/live-inject.mjs b/source/skills/impeccable/scripts/live-inject.mjs index d61c17925..3762c9f00 100644 --- a/source/skills/impeccable/scripts/live-inject.mjs +++ b/source/skills/impeccable/scripts/live-inject.mjs @@ -46,12 +46,20 @@ Output (JSON): console.log(JSON.stringify({ ok: false, error: 'config_missing', path: CONFIG_PATH })); process.exit(0); } + let cfg; try { - const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); - console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); + cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); } catch (err) { - console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message })); + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; } + try { + validateConfig(cfg); + } catch (err) { + console.log(JSON.stringify({ ok: false, error: 'config_invalid', message: err.message, path: CONFIG_PATH })); + return; + } + console.log(JSON.stringify({ ok: true, config: cfg, path: CONFIG_PATH })); return; } @@ -63,22 +71,17 @@ Output (JSON): const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8')); validateConfig(config); - const absFile = path.resolve(process.cwd(), config.file); - if (!fs.existsSync(absFile)) { - console.error(JSON.stringify({ ok: false, error: 'file_not_found', file: config.file })); - process.exit(1); - } - - const content = fs.readFileSync(absFile, 'utf-8'); - if (args.includes('--remove')) { - const updated = removeTag(content, config.commentSyntax); - if (updated === content) { - console.log(JSON.stringify({ ok: true, file: config.file, removed: false, note: 'no tag present' })); - return; - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, removed: true })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const updated = removeTag(content, config.commentSyntax); + if (updated === content) return { file: relFile, removed: false, note: 'no tag present' }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, removed: true }; + }); + console.log(JSON.stringify({ ok: true, results })); return; } @@ -90,15 +93,19 @@ Output (JSON): process.exit(1); } - // Already inserted? Replace to refresh the port. - const withoutOld = removeTag(content, config.commentSyntax); - const updated = insertTag(withoutOld, config, port); - if (updated === withoutOld) { - console.error(JSON.stringify({ ok: false, error: 'insertion_point_not_found', anchor: config.insertBefore })); - process.exit(1); - } - fs.writeFileSync(absFile, updated, 'utf-8'); - console.log(JSON.stringify({ ok: true, file: config.file, inserted: true, port })); + const results = config.files.map((relFile) => { + const absFile = path.resolve(process.cwd(), relFile); + if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' }; + const content = fs.readFileSync(absFile, 'utf-8'); + const withoutOld = removeTag(content, config.commentSyntax); + const updated = insertTag(withoutOld, config, port); + if (updated === withoutOld) return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter }; + fs.writeFileSync(absFile, updated, 'utf-8'); + return { file: relFile, inserted: true }; + }); + const anyInserted = results.some((r) => r.inserted); + console.log(JSON.stringify({ ok: anyInserted, port, results })); + if (!anyInserted) process.exit(1); } // --------------------------------------------------------------------------- @@ -107,7 +114,12 @@ Output (JSON): function validateConfig(cfg) { if (!cfg || typeof cfg !== 'object') throw new Error('config.json must be an object'); - if (typeof cfg.file !== 'string') throw new Error('config.file (string) required'); + if (!Array.isArray(cfg.files) || cfg.files.length === 0) { + throw new Error('config.files (non-empty string array) required'); + } + if (!cfg.files.every((f) => typeof f === 'string' && f.length > 0)) { + throw new Error('config.files must contain only non-empty strings'); + } if (typeof cfg.insertBefore !== 'string' && typeof cfg.insertAfter !== 'string') { throw new Error('config.insertBefore or config.insertAfter (string) required'); } @@ -131,12 +143,16 @@ function buildTagBlock(syntax, port) { function insertTag(content, config, port) { const block = buildTagBlock(config.commentSyntax, port); + // insertBefore: match the LAST occurrence. Anchors like `` naturally + // belong at the end, and the same literal can appear earlier in code blocks + // within rendered documentation pages. if (config.insertBefore) { - const idx = content.indexOf(config.insertBefore); + const idx = content.lastIndexOf(config.insertBefore); if (idx === -1) return content; return content.slice(0, idx) + block + content.slice(idx); } - // insertAfter + // insertAfter: match the FIRST occurrence — typical anchors like `` or + // `` open near the top of the document. const idx = content.indexOf(config.insertAfter); if (idx === -1) return content; const after = idx + config.insertAfter.length; diff --git a/source/skills/impeccable/scripts/live-server.mjs b/source/skills/impeccable/scripts/live-server.mjs index 97163b255..15349ae6d 100644 --- a/source/skills/impeccable/scripts/live-server.mjs +++ b/source/skills/impeccable/scripts/live-server.mjs @@ -151,6 +151,9 @@ function validateEvent(msg) { return msg.id ? null : 'discard: missing id'; case 'exit': return null; + case 'prefetch': + if (!msg.pageUrl || typeof msg.pageUrl !== 'string') return 'prefetch: missing pageUrl'; + return null; default: return 'Unknown event type: ' + msg.type; } diff --git a/source/skills/impeccable/scripts/live-wrap.mjs b/source/skills/impeccable/scripts/live-wrap.mjs index f8255e39b..cbd5d76b1 100644 --- a/source/skills/impeccable/scripts/live-wrap.mjs +++ b/source/skills/impeccable/scripts/live-wrap.mjs @@ -13,6 +13,7 @@ import fs from 'node:fs'; import path from 'node:path'; +import { isGeneratedFile } from './is-generated.mjs'; const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro']; @@ -62,19 +63,52 @@ The agent should insert variant HTML at insertLine.`); // Build search queries in priority order (most specific first) const queries = buildSearchQueries(elementId, classes, tag, query); - // Find the source file + const genOpts = { cwd: process.cwd() }; + + // Find the source file. Generated files are excluded from auto-search so we + // don't silently write variants into a file the next build will wipe. let targetFile = filePath; let matchedQuery = null; if (!targetFile) { for (const q of queries) { - targetFile = findFileWithQuery(q, process.cwd()); + targetFile = findFileWithQuery(q, process.cwd(), genOpts); if (targetFile) { matchedQuery = q; break; } } if (!targetFile) { - console.error(JSON.stringify({ error: 'Could not find element in project files. Searched for: ' + queries.join(', ') })); + // Nothing in source. Did the element show up in a generated file? That + // tells the agent "fall back to the agent-driven flow" vs "element just + // doesn't exist in this project." + let generatedHit = null; + for (const q of queries) { + generatedHit = findFileWithQuery(q, process.cwd(), { ...genOpts, includeGenerated: true }); + if (generatedHit) break; + } + if (generatedHit) { + console.error(JSON.stringify({ + error: 'element_not_in_source', + fallback: 'agent-driven', + generatedMatch: path.relative(process.cwd(), generatedHit), + hint: 'Element found only in a generated file. See "Handle fallback" in live.md.', + })); + } else { + console.error(JSON.stringify({ + error: 'element_not_found', + fallback: 'agent-driven', + hint: 'Element not found in any project file. It may be runtime-injected (JS component, etc.). See "Handle fallback" in live.md.', + })); + } process.exit(1); } } else { + if (isGeneratedFile(targetFile, genOpts)) { + console.error(JSON.stringify({ + error: 'file_is_generated', + fallback: 'agent-driven', + file: path.relative(process.cwd(), path.resolve(process.cwd(), targetFile)), + hint: 'Explicit --file points at a generated file. Writing here gets wiped by the next build. See "Handle fallback" in live.md.', + })); + process.exit(1); + } matchedQuery = queries[0]; } @@ -195,20 +229,20 @@ function detectCommentSyntax(filePath) { * Search project files for the query string (class name, ID, etc.) * Returns the first matching file path, or null. */ -function findFileWithQuery(query, cwd) { +function findFileWithQuery(query, cwd, genOpts = {}) { const searchDirs = ['src', 'app', 'pages', 'components', 'public', 'views', 'templates', '.']; const seen = new Set(); for (const dir of searchDirs) { const absDir = path.join(cwd, dir); if (!fs.existsSync(absDir)) continue; - const result = searchDir(absDir, query, seen, 0); + const result = searchDir(absDir, query, seen, 0, genOpts); if (result) return result; } return null; } -function searchDir(dir, query, seen, depth) { +function searchDir(dir, query, seen, depth, genOpts) { if (depth > 5) return null; // don't go too deep const realDir = fs.realpathSync(dir); if (seen.has(realDir)) return null; @@ -225,6 +259,7 @@ function searchDir(dir, query, seen, depth) { if (!EXTENSIONS.includes(ext)) continue; const filePath = path.join(dir, entry.name); + if (!genOpts.includeGenerated && isGeneratedFile(filePath, genOpts)) continue; try { const content = fs.readFileSync(filePath, 'utf-8'); if (content.includes(query)) return filePath; @@ -235,7 +270,7 @@ function searchDir(dir, query, seen, depth) { for (const entry of entries) { if (!entry.isDirectory()) continue; if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; - const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1); + const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/source/skills/impeccable/scripts/live.mjs b/source/skills/impeccable/scripts/live.mjs index 062b35ae8..aefacfba3 100644 --- a/source/skills/impeccable/scripts/live.mjs +++ b/source/skills/impeccable/scripts/live.mjs @@ -87,7 +87,7 @@ The agent should then: ok: true, serverPort: serverInfo.port, serverToken: serverInfo.token, - pageFile: checkResult.config.file, + pageFiles: checkResult.config.files, hasProduct: ctx.hasProduct, product: ctx.product, productPath: ctx.productPath, From c9c152f0f0fd5ea52a79a6caa4aded878d02df69 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 21 Apr 2026 22:42:28 -0700 Subject: [PATCH 053/125] test(live): framework fixture matrix for inject / wrap / is-generated Five representative project shapes under tests/framework-fixtures/ that stage into fresh tmp git repos and drive the live scripts against each: - vite-react: tracked index.html shell + src/App.jsx - nextjs-app: app/layout.tsx as JSX inject target - astro: src/layouts/Layout.astro - sveltekit: src/app.html shell + src/routes/+page.svelte - multipage-with-generator: src/ tracked, dist/ gitignored (our own repo's shape); exercises the is-generated guard and element_not_in_source fallback Each fixture declares its config, expected source/generated paths, and wrap cases in fixture.json. The harness copies into tmpdir, applies gitignore, commits, then asserts: - inject --port lands the script tag at the correct anchor across all configured files - inject --remove strips it cleanly - is-generated classifies source vs generated paths correctly - wrap routes to the expected source file or emits the expected fallback error Plumbing + bug caught while building out the matrix: - IMPECCABLE_LIVE_CONFIG env var so tests can point live-inject at a fixture-specific config.json without clobbering the harness copy. Backwards-compatible. - live-wrap.mjs no longer hardcodes dist/build in its directory skip list. Only node_modules and .git remain universal skips; the isGeneratedFile check is now the sole guard for generated paths. This lets the includeGenerated second pass find elements in dist/ and report generatedMatch, which is what the multipage-with-generator fixture needs to exercise. Wired into bun run test. 25 tests, 5 suites. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .kiro/skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .pi/skills/impeccable/scripts/live-inject.mjs | 2 +- .pi/skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .trae/skills/impeccable/scripts/live-wrap.mjs | 7 +- package.json | 2 +- .../skills/impeccable/scripts/live-inject.mjs | 2 +- .../skills/impeccable/scripts/live-wrap.mjs | 7 +- tests/framework-fixtures.test.mjs | 177 ++++++++++++++++++ tests/framework-fixtures/README.md | 43 +++++ .../astro/files/src/layouts/Layout.astro | 14 ++ .../astro/files/src/pages/index.astro | 13 ++ tests/framework-fixtures/astro/fixture.json | 17 ++ tests/framework-fixtures/astro/gitignore.txt | 3 + .../files/src/template.js | 8 + .../multipage-with-generator/fixture.json | 17 ++ .../multipage-with-generator/gitignore.txt | 2 + .../nextjs-app/files/app/layout.tsx | 9 + .../nextjs-app/files/app/page.tsx | 12 ++ .../nextjs-app/fixture.json | 17 ++ .../nextjs-app/gitignore.txt | 3 + .../sveltekit/files/src/app.html | 11 ++ .../sveltekit/files/src/routes/+page.svelte | 8 + .../framework-fixtures/sveltekit/fixture.json | 17 ++ .../sveltekit/gitignore.txt | 3 + .../vite-react/files/index.html | 11 ++ .../vite-react/files/src/App.jsx | 12 ++ .../vite-react/fixture.json | 17 ++ .../vite-react/gitignore.txt | 3 + 46 files changed, 490 insertions(+), 37 deletions(-) create mode 100644 tests/framework-fixtures.test.mjs create mode 100644 tests/framework-fixtures/README.md create mode 100644 tests/framework-fixtures/astro/files/src/layouts/Layout.astro create mode 100644 tests/framework-fixtures/astro/files/src/pages/index.astro create mode 100644 tests/framework-fixtures/astro/fixture.json create mode 100644 tests/framework-fixtures/astro/gitignore.txt create mode 100644 tests/framework-fixtures/multipage-with-generator/files/src/template.js create mode 100644 tests/framework-fixtures/multipage-with-generator/fixture.json create mode 100644 tests/framework-fixtures/multipage-with-generator/gitignore.txt create mode 100644 tests/framework-fixtures/nextjs-app/files/app/layout.tsx create mode 100644 tests/framework-fixtures/nextjs-app/files/app/page.tsx create mode 100644 tests/framework-fixtures/nextjs-app/fixture.json create mode 100644 tests/framework-fixtures/nextjs-app/gitignore.txt create mode 100644 tests/framework-fixtures/sveltekit/files/src/app.html create mode 100644 tests/framework-fixtures/sveltekit/files/src/routes/+page.svelte create mode 100644 tests/framework-fixtures/sveltekit/fixture.json create mode 100644 tests/framework-fixtures/sveltekit/gitignore.txt create mode 100644 tests/framework-fixtures/vite-react/files/index.html create mode 100644 tests/framework-fixtures/vite-react/files/src/App.jsx create mode 100644 tests/framework-fixtures/vite-react/fixture.json create mode 100644 tests/framework-fixtures/vite-react/gitignore.txt diff --git a/.agents/skills/impeccable/scripts/live-inject.mjs b/.agents/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.agents/skills/impeccable/scripts/live-inject.mjs +++ b/.agents/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.agents/skills/impeccable/scripts/live-wrap.mjs b/.agents/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.agents/skills/impeccable/scripts/live-wrap.mjs +++ b/.agents/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.claude/skills/impeccable/scripts/live-inject.mjs b/.claude/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.claude/skills/impeccable/scripts/live-inject.mjs +++ b/.claude/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.claude/skills/impeccable/scripts/live-wrap.mjs b/.claude/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.claude/skills/impeccable/scripts/live-wrap.mjs +++ b/.claude/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.cursor/skills/impeccable/scripts/live-inject.mjs b/.cursor/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.cursor/skills/impeccable/scripts/live-inject.mjs +++ b/.cursor/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.cursor/skills/impeccable/scripts/live-wrap.mjs b/.cursor/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.cursor/skills/impeccable/scripts/live-wrap.mjs +++ b/.cursor/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.gemini/skills/impeccable/scripts/live-inject.mjs b/.gemini/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.gemini/skills/impeccable/scripts/live-inject.mjs +++ b/.gemini/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.gemini/skills/impeccable/scripts/live-wrap.mjs b/.gemini/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.gemini/skills/impeccable/scripts/live-wrap.mjs +++ b/.gemini/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.github/skills/impeccable/scripts/live-inject.mjs b/.github/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.github/skills/impeccable/scripts/live-inject.mjs +++ b/.github/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.github/skills/impeccable/scripts/live-wrap.mjs b/.github/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.github/skills/impeccable/scripts/live-wrap.mjs +++ b/.github/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.kiro/skills/impeccable/scripts/live-inject.mjs b/.kiro/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.kiro/skills/impeccable/scripts/live-inject.mjs +++ b/.kiro/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.kiro/skills/impeccable/scripts/live-wrap.mjs b/.kiro/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.kiro/skills/impeccable/scripts/live-wrap.mjs +++ b/.kiro/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.opencode/skills/impeccable/scripts/live-inject.mjs b/.opencode/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.opencode/skills/impeccable/scripts/live-inject.mjs +++ b/.opencode/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.opencode/skills/impeccable/scripts/live-wrap.mjs b/.opencode/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.opencode/skills/impeccable/scripts/live-wrap.mjs +++ b/.opencode/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.pi/skills/impeccable/scripts/live-inject.mjs b/.pi/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.pi/skills/impeccable/scripts/live-inject.mjs +++ b/.pi/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.pi/skills/impeccable/scripts/live-wrap.mjs b/.pi/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.pi/skills/impeccable/scripts/live-wrap.mjs +++ b/.pi/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.rovodev/skills/impeccable/scripts/live-inject.mjs b/.rovodev/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.rovodev/skills/impeccable/scripts/live-inject.mjs +++ b/.rovodev/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.rovodev/skills/impeccable/scripts/live-wrap.mjs b/.rovodev/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.rovodev/skills/impeccable/scripts/live-wrap.mjs +++ b/.rovodev/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.trae-cn/skills/impeccable/scripts/live-inject.mjs b/.trae-cn/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.trae-cn/skills/impeccable/scripts/live-inject.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.trae-cn/skills/impeccable/scripts/live-wrap.mjs b/.trae-cn/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.trae-cn/skills/impeccable/scripts/live-wrap.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/.trae/skills/impeccable/scripts/live-inject.mjs b/.trae/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/.trae/skills/impeccable/scripts/live-inject.mjs +++ b/.trae/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/.trae/skills/impeccable/scripts/live-wrap.mjs b/.trae/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/.trae/skills/impeccable/scripts/live-wrap.mjs +++ b/.trae/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/package.json b/package.json index d7ae791cd..647f69d7f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dev": "bun run server/index.js", "preview": "bun run build && wrangler pages dev", "deploy": "bun run build && wrangler pages deploy build/", - "test": "bun test tests/build.test.js tests/detect-antipatterns.test.js && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-server.test.mjs", + "test": "bun test tests/build.test.js tests/detect-antipatterns.test.js && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-server.test.mjs && node --test tests/framework-fixtures.test.mjs", "prepack": "cp README.md README.repo.md && cp README.npm.md README.md", "postpack": "cp README.repo.md README.md && rm README.repo.md", "screenshot": "bun run scripts/screenshot-antipatterns.js", diff --git a/source/skills/impeccable/scripts/live-inject.mjs b/source/skills/impeccable/scripts/live-inject.mjs index 3762c9f00..03d054ae6 100644 --- a/source/skills/impeccable/scripts/live-inject.mjs +++ b/source/skills/impeccable/scripts/live-inject.mjs @@ -18,7 +18,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const CONFIG_PATH = path.join(__dirname, 'config.json'); +const CONFIG_PATH = process.env.IMPECCABLE_LIVE_CONFIG || path.join(__dirname, 'config.json'); const MARKER_OPEN_TEXT = 'impeccable-live-start'; const MARKER_CLOSE_TEXT = 'impeccable-live-end'; diff --git a/source/skills/impeccable/scripts/live-wrap.mjs b/source/skills/impeccable/scripts/live-wrap.mjs index cbd5d76b1..965f6a160 100644 --- a/source/skills/impeccable/scripts/live-wrap.mjs +++ b/source/skills/impeccable/scripts/live-wrap.mjs @@ -266,10 +266,13 @@ function searchDir(dir, query, seen, depth, genOpts) { } catch { /* skip unreadable files */ } } - // Then recurse into directories + // Then recurse into directories. Always skip node_modules and .git (never + // project content). dist/build/out are left to the isGeneratedFile guard so + // the includeGenerated second-pass can still find the element there and + // report `generatedMatch`. for (const entry of entries) { if (!entry.isDirectory()) continue; - if (entry.name === 'node_modules' || entry.name === '.git' || entry.name === 'dist' || entry.name === 'build') continue; + if (entry.name === 'node_modules' || entry.name === '.git') continue; const result = searchDir(path.join(dir, entry.name), query, seen, depth + 1, genOpts); if (result) return result; } diff --git a/tests/framework-fixtures.test.mjs b/tests/framework-fixtures.test.mjs new file mode 100644 index 000000000..c8dfc054b --- /dev/null +++ b/tests/framework-fixtures.test.mjs @@ -0,0 +1,177 @@ +/** + * Drives live-mode scripts against representative framework project shapes. + * + * Each fixture under tests/framework-fixtures/ is a small project tree with a + * fixture.json that declares the inject config + expected is-generated and + * wrap outcomes. The harness copies the fixture into a tmp git repo, applies + * the fixture's gitignore, and runs the live scripts against it. + * + * Run with: node --test tests/framework-fixtures.test.mjs + */ + +import { describe, it } from 'node:test'; +import assert from 'node:assert/strict'; +import { execFileSync } from 'node:child_process'; +import { cpSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { isGeneratedFile } from '../source/skills/impeccable/scripts/is-generated.mjs'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const SCRIPTS_DIR = join(__dirname, '..', 'source', 'skills', 'impeccable', 'scripts'); +const FIXTURES_DIR = join(__dirname, 'framework-fixtures'); + +function listFixtures() { + return readdirSync(FIXTURES_DIR, { withFileTypes: true }) + .filter((e) => e.isDirectory()) + .map((e) => e.name); +} + +/** + * Stage a fixture into a fresh tmp git repo. Returns the tmp path + loaded + * fixture.json. Caller is responsible for cleanup. + */ +function stageFixture(name) { + const fixtureRoot = join(FIXTURES_DIR, name); + const fixture = JSON.parse(readFileSync(join(fixtureRoot, 'fixture.json'), 'utf-8')); + const gitignore = readFileSync(join(fixtureRoot, 'gitignore.txt'), 'utf-8'); + + const tmp = mkdtempSync(join(tmpdir(), 'impeccable-fixture-')); + cpSync(join(fixtureRoot, 'files'), tmp, { recursive: true }); + writeFileSync(join(tmp, '.gitignore'), gitignore); + writeFileSync(join(tmp, 'impeccable-live.config.json'), JSON.stringify(fixture.config)); + + execFileSync('git', ['init', '-q'], { cwd: tmp }); + execFileSync('git', ['config', 'user.email', 'test@example.com'], { cwd: tmp }); + execFileSync('git', ['config', 'user.name', 'Fixture'], { cwd: tmp }); + execFileSync('git', ['add', '-A'], { cwd: tmp }); + execFileSync('git', ['commit', '-qm', 'fixture'], { cwd: tmp }); + + return { tmp, fixture }; +} + +function runScript(script, args, opts = {}) { + try { + return execFileSync('node', [join(SCRIPTS_DIR, script), ...args], { + encoding: 'utf-8', + cwd: opts.cwd, + env: { ...process.env, ...(opts.env || {}) }, + }); + } catch (err) { + return { error: err.stdout?.toString() || '' , stderr: err.stderr?.toString() || '' }; + } +} + +// --------------------------------------------------------------------------- +// Tests +// --------------------------------------------------------------------------- + +for (const name of listFixtures()) { + describe(`fixture · ${name}`, () => { + it('loads fixture.json and has expected tree', () => { + const { tmp, fixture } = stageFixture(name); + try { + assert.ok(fixture.name, 'fixture has a name'); + assert.ok(Array.isArray(fixture.config.files) && fixture.config.files.length > 0); + rmSync(tmp, { recursive: true, force: true }); + } catch (err) { + rmSync(tmp, { recursive: true, force: true }); + throw err; + } + }); + + it('is-generated classifies files correctly', () => { + const { tmp, fixture } = stageFixture(name); + try { + for (const rel of fixture.sourceFiles || []) { + assert.equal( + isGeneratedFile(rel, { cwd: tmp }), + false, + `${rel} should classify as source` + ); + } + for (const rel of fixture.generatedFiles || []) { + assert.equal( + isGeneratedFile(rel, { cwd: tmp }), + true, + `${rel} should classify as generated` + ); + } + } finally { + rmSync(tmp, { recursive: true, force: true }); + } + }); + + it('live-inject --port adds the script tag to every config file', () => { + const { tmp } = stageFixture(name); + try { + const configPath = join(tmp, 'impeccable-live.config.json'); + const out = runScript('live-inject.mjs', ['--port', '9999'], { + cwd: tmp, + env: { IMPECCABLE_LIVE_CONFIG: configPath }, + }); + const result = JSON.parse(typeof out === 'string' ? out : out.error); + assert.equal(result.ok, true, 'inject succeeded'); + for (const r of result.results) { + assert.ok(r.inserted, `${r.file} got the tag (result: ${JSON.stringify(r)})`); + const body = readFileSync(join(tmp, r.file), 'utf-8'); + assert.match(body, /impeccable-live-start/); + assert.match(body, /localhost:9999\/live\.js/); + } + } finally { + rmSync(tmp, { recursive: true, force: true }); + } + }); + + it('live-inject --remove strips the script tag cleanly', () => { + const { tmp } = stageFixture(name); + try { + const configPath = join(tmp, 'impeccable-live.config.json'); + runScript('live-inject.mjs', ['--port', '9999'], { + cwd: tmp, + env: { IMPECCABLE_LIVE_CONFIG: configPath }, + }); + const out = runScript('live-inject.mjs', ['--remove'], { + cwd: tmp, + env: { IMPECCABLE_LIVE_CONFIG: configPath }, + }); + const result = JSON.parse(typeof out === 'string' ? out : out.error); + assert.equal(result.ok, true, 'remove succeeded'); + for (const r of result.results) { + const body = readFileSync(join(tmp, r.file), 'utf-8'); + assert.doesNotMatch(body, /impeccable-live-start/); + assert.doesNotMatch(body, /live\.js/); + } + } finally { + rmSync(tmp, { recursive: true, force: true }); + } + }); + + it('live-wrap routes to the expected source (or emits the expected fallback)', () => { + const { tmp, fixture } = stageFixture(name); + try { + for (const [i, wc] of (fixture.wrapCases || []).entries()) { + const flags = []; + if (wc.args.elementId) flags.push('--element-id', wc.args.elementId); + if (wc.args.classes) flags.push('--classes', wc.args.classes); + if (wc.args.tag) flags.push('--tag', wc.args.tag); + flags.push('--id', `wraptest${i}`, '--count', '3'); + + const out = runScript('live-wrap.mjs', flags, { cwd: tmp }); + const payload = typeof out === 'string' ? out : (out.error || out.stderr); + const parsed = JSON.parse(payload.trim().split('\n').pop()); + + if (wc.expectsError) { + assert.equal(parsed.error, wc.expectsError, `wrap case "${wc.name}": expected error ${wc.expectsError}, got ${JSON.stringify(parsed)}`); + } else { + assert.equal(parsed.file, wc.expectedFile, `wrap case "${wc.name}": landed in ${parsed.file}, expected ${wc.expectedFile}`); + } + } + } finally { + rmSync(tmp, { recursive: true, force: true }); + } + }); + }); +} diff --git a/tests/framework-fixtures/README.md b/tests/framework-fixtures/README.md new file mode 100644 index 000000000..f29164a06 --- /dev/null +++ b/tests/framework-fixtures/README.md @@ -0,0 +1,43 @@ +# Framework fixtures + +Representative project shapes for exercising live mode against different framework conventions. Each fixture is a small directory tree that the test harness copies into a temp git repo, then drives `live-inject.mjs`, `live-wrap.mjs`, `live-accept.mjs`, and `is-generated.mjs` against. + +## Layout + +``` +/ + files/ project tree the test copies into tmp + gitignore.txt becomes .gitignore in tmp (so we can commit the real files here) + fixture.json config + expected results the test consumes +``` + +`fixture.json` schema: + +```json +{ + "name": "human-readable label", + "config": { ...contents for live-inject.mjs config.json ... }, + "sourceFiles": ["paths that is-generated should classify as source (false)"], + "generatedFiles": ["paths that is-generated should classify as generated (true)"], + "wrapCases": [ + { + "name": "description", + "args": { "classes": "...", "tag": "...", "elementId": "..." }, + "expectedFile": "where wrap should land (relative to fixture root)", + "expectsError": "optional error code, e.g. element_not_in_source" + } + ] +} +``` + +## Current fixtures + +| Fixture | Shape | +|---|---| +| `vite-react/` | Tracked `index.html` shell + `src/App.jsx`. Inject into the shell. | +| `nextjs-app/` | `app/layout.tsx` as JSX inject target (commentSyntax `jsx`). | +| `astro/` | `src/layouts/Layout.astro` as inject target. HTML comments. | +| `sveltekit/` | `src/app.html` shell + `src/routes/+page.svelte`. | +| `multipage-with-generator/` | `src/` tracked, `dist/` gitignored. Exercises the is-generated guard and `element_not_in_source` fallback. | + +Add new fixtures by cloning a directory, swapping files, and updating `fixture.json`. diff --git a/tests/framework-fixtures/astro/files/src/layouts/Layout.astro b/tests/framework-fixtures/astro/files/src/layouts/Layout.astro new file mode 100644 index 000000000..3253ff876 --- /dev/null +++ b/tests/framework-fixtures/astro/files/src/layouts/Layout.astro @@ -0,0 +1,14 @@ +--- +export interface Props { title: string } +const { title } = Astro.props; +--- + + + + + {title} + + + + + diff --git a/tests/framework-fixtures/astro/files/src/pages/index.astro b/tests/framework-fixtures/astro/files/src/pages/index.astro new file mode 100644 index 000000000..18c0ddd32 --- /dev/null +++ b/tests/framework-fixtures/astro/files/src/pages/index.astro @@ -0,0 +1,13 @@ +--- +import Layout from '../layouts/Layout.astro'; +--- + +
    +

    Astro Fixture

    +

    Minimal Astro tree for live-mode tests.

    +
    +
    One
    +
    Two
    +
    +
    +
    diff --git a/tests/framework-fixtures/astro/fixture.json b/tests/framework-fixtures/astro/fixture.json new file mode 100644 index 000000000..9ee263f70 --- /dev/null +++ b/tests/framework-fixtures/astro/fixture.json @@ -0,0 +1,17 @@ +{ + "name": "Astro", + "config": { + "files": ["src/layouts/Layout.astro"], + "insertBefore": "", + "commentSyntax": "html" + }, + "sourceFiles": ["src/layouts/Layout.astro", "src/pages/index.astro"], + "generatedFiles": [], + "wrapCases": [ + { + "name": "wraps hero title in page source", + "args": { "classes": "hero-title", "tag": "h1" }, + "expectedFile": "src/pages/index.astro" + } + ] +} diff --git a/tests/framework-fixtures/astro/gitignore.txt b/tests/framework-fixtures/astro/gitignore.txt new file mode 100644 index 000000000..ddce69b68 --- /dev/null +++ b/tests/framework-fixtures/astro/gitignore.txt @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.astro/ diff --git a/tests/framework-fixtures/multipage-with-generator/files/src/template.js b/tests/framework-fixtures/multipage-with-generator/files/src/template.js new file mode 100644 index 000000000..2e9f66b56 --- /dev/null +++ b/tests/framework-fixtures/multipage-with-generator/files/src/template.js @@ -0,0 +1,8 @@ +// Pretend generator: reads source content, writes HTML into dist/. +// Not executed by the test — it only exists so the fixture has a "source" +// that the agent could reason about when picking where to write variants. +export function render(title, body) { + return ` +${title} +${body}`; +} diff --git a/tests/framework-fixtures/multipage-with-generator/fixture.json b/tests/framework-fixtures/multipage-with-generator/fixture.json new file mode 100644 index 000000000..a031b0496 --- /dev/null +++ b/tests/framework-fixtures/multipage-with-generator/fixture.json @@ -0,0 +1,17 @@ +{ + "name": "Multi-page static with generator", + "config": { + "files": ["dist/index.html", "dist/docs/one.html"], + "insertBefore": "", + "commentSyntax": "html" + }, + "sourceFiles": ["src/template.js"], + "generatedFiles": ["dist/index.html", "dist/docs/one.html"], + "wrapCases": [ + { + "name": "refuses to wrap inside a generated dist page", + "args": { "classes": "hero-title", "tag": "h1" }, + "expectsError": "element_not_in_source" + } + ] +} diff --git a/tests/framework-fixtures/multipage-with-generator/gitignore.txt b/tests/framework-fixtures/multipage-with-generator/gitignore.txt new file mode 100644 index 000000000..b94707787 --- /dev/null +++ b/tests/framework-fixtures/multipage-with-generator/gitignore.txt @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/tests/framework-fixtures/nextjs-app/files/app/layout.tsx b/tests/framework-fixtures/nextjs-app/files/app/layout.tsx new file mode 100644 index 000000000..8c02b1b4f --- /dev/null +++ b/tests/framework-fixtures/nextjs-app/files/app/layout.tsx @@ -0,0 +1,9 @@ +export const metadata = { title: 'Next Fixture' }; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + {children} + + ); +} diff --git a/tests/framework-fixtures/nextjs-app/files/app/page.tsx b/tests/framework-fixtures/nextjs-app/files/app/page.tsx new file mode 100644 index 000000000..6604e62df --- /dev/null +++ b/tests/framework-fixtures/nextjs-app/files/app/page.tsx @@ -0,0 +1,12 @@ +export default function Page() { + return ( +
    +

    Next Fixture

    +

    Minimal App Router tree for live-mode tests.

    +
    +
    One
    +
    Two
    +
    +
    + ); +} diff --git a/tests/framework-fixtures/nextjs-app/fixture.json b/tests/framework-fixtures/nextjs-app/fixture.json new file mode 100644 index 000000000..c48d85fab --- /dev/null +++ b/tests/framework-fixtures/nextjs-app/fixture.json @@ -0,0 +1,17 @@ +{ + "name": "Next.js (App Router)", + "config": { + "files": ["app/layout.tsx"], + "insertBefore": "", + "commentSyntax": "jsx" + }, + "sourceFiles": ["app/layout.tsx", "app/page.tsx"], + "generatedFiles": [], + "wrapCases": [ + { + "name": "wraps hero title in source TSX", + "args": { "classes": "hero-title", "tag": "h1" }, + "expectedFile": "app/page.tsx" + } + ] +} diff --git a/tests/framework-fixtures/nextjs-app/gitignore.txt b/tests/framework-fixtures/nextjs-app/gitignore.txt new file mode 100644 index 000000000..7c8ed2342 --- /dev/null +++ b/tests/framework-fixtures/nextjs-app/gitignore.txt @@ -0,0 +1,3 @@ +node_modules/ +.next/ +out/ diff --git a/tests/framework-fixtures/sveltekit/files/src/app.html b/tests/framework-fixtures/sveltekit/files/src/app.html new file mode 100644 index 000000000..86314eb6e --- /dev/null +++ b/tests/framework-fixtures/sveltekit/files/src/app.html @@ -0,0 +1,11 @@ + + + + + SvelteKit Fixture + %sveltekit.head% + + +
    %sveltekit.body%
    + + diff --git a/tests/framework-fixtures/sveltekit/files/src/routes/+page.svelte b/tests/framework-fixtures/sveltekit/files/src/routes/+page.svelte new file mode 100644 index 000000000..71c48e933 --- /dev/null +++ b/tests/framework-fixtures/sveltekit/files/src/routes/+page.svelte @@ -0,0 +1,8 @@ +
    +

    SvelteKit Fixture

    +

    Minimal SvelteKit route for live-mode tests.

    +
    +
    One
    +
    Two
    +
    +
    diff --git a/tests/framework-fixtures/sveltekit/fixture.json b/tests/framework-fixtures/sveltekit/fixture.json new file mode 100644 index 000000000..8e25e59d4 --- /dev/null +++ b/tests/framework-fixtures/sveltekit/fixture.json @@ -0,0 +1,17 @@ +{ + "name": "SvelteKit", + "config": { + "files": ["src/app.html"], + "insertBefore": "", + "commentSyntax": "html" + }, + "sourceFiles": ["src/app.html", "src/routes/+page.svelte"], + "generatedFiles": [], + "wrapCases": [ + { + "name": "wraps hero title in route source", + "args": { "classes": "hero-title", "tag": "h1" }, + "expectedFile": "src/routes/+page.svelte" + } + ] +} diff --git a/tests/framework-fixtures/sveltekit/gitignore.txt b/tests/framework-fixtures/sveltekit/gitignore.txt new file mode 100644 index 000000000..31fda85b7 --- /dev/null +++ b/tests/framework-fixtures/sveltekit/gitignore.txt @@ -0,0 +1,3 @@ +node_modules/ +.svelte-kit/ +build/ diff --git a/tests/framework-fixtures/vite-react/files/index.html b/tests/framework-fixtures/vite-react/files/index.html new file mode 100644 index 000000000..5ede06283 --- /dev/null +++ b/tests/framework-fixtures/vite-react/files/index.html @@ -0,0 +1,11 @@ + + + + + Vite React Fixture + + +
    + + + diff --git a/tests/framework-fixtures/vite-react/files/src/App.jsx b/tests/framework-fixtures/vite-react/files/src/App.jsx new file mode 100644 index 000000000..46e2a9d79 --- /dev/null +++ b/tests/framework-fixtures/vite-react/files/src/App.jsx @@ -0,0 +1,12 @@ +export default function App() { + return ( +
    +

    Vite Fixture

    +

    Minimal React tree for live-mode tests.

    +
    +
    One
    +
    Two
    +
    +
    + ); +} diff --git a/tests/framework-fixtures/vite-react/fixture.json b/tests/framework-fixtures/vite-react/fixture.json new file mode 100644 index 000000000..2b03c4268 --- /dev/null +++ b/tests/framework-fixtures/vite-react/fixture.json @@ -0,0 +1,17 @@ +{ + "name": "Vite + React", + "config": { + "files": ["index.html"], + "insertBefore": "", + "commentSyntax": "html" + }, + "sourceFiles": ["index.html", "src/App.jsx"], + "generatedFiles": [], + "wrapCases": [ + { + "name": "wraps hero title in source JSX", + "args": { "classes": "hero-title", "tag": "h1" }, + "expectedFile": "src/App.jsx" + } + ] +} diff --git a/tests/framework-fixtures/vite-react/gitignore.txt b/tests/framework-fixtures/vite-react/gitignore.txt new file mode 100644 index 000000000..3ff38cc06 --- /dev/null +++ b/tests/framework-fixtures/vite-react/gitignore.txt @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.vite/ From 444f88129506d4b121aa42191794714c43322bb6 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 21 Apr 2026 22:43:35 -0700 Subject: [PATCH 054/125] fix(test): un-ignore fixture dist/ trees so they actually track MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Top-level .gitignore excludes dist/ broadly, which silently dropped the multipage-with-generator fixture's files/dist/*.html from the previous commit. The fixture tests need those files on disk to copy into the tmp repo and assert is-generated behavior — without them, the test suite fails on a fresh clone. Added a negation pattern that re-includes tests/framework-fixtures/**/dist/ paths. The real dist/ output directories elsewhere in the repo remain ignored. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 5 +++++ .../multipage-with-generator/files/dist/docs/one.html | 8 ++++++++ .../multipage-with-generator/files/dist/index.html | 8 ++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/framework-fixtures/multipage-with-generator/files/dist/docs/one.html create mode 100644 tests/framework-fixtures/multipage-with-generator/files/dist/index.html diff --git a/.gitignore b/.gitignore index 9dc8a9d27..59a14bf60 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,11 @@ package-lock.json dist/ build/ +# Test fixtures simulate "generated dist" trees; keep them tracked so tests +# can copy them into tmp git repos and assert is-generated behavior. +!tests/framework-fixtures/**/dist/ +!tests/framework-fixtures/**/dist/** + # Build artifacts *.log diff --git a/tests/framework-fixtures/multipage-with-generator/files/dist/docs/one.html b/tests/framework-fixtures/multipage-with-generator/files/dist/docs/one.html new file mode 100644 index 000000000..95549168e --- /dev/null +++ b/tests/framework-fixtures/multipage-with-generator/files/dist/docs/one.html @@ -0,0 +1,8 @@ + +Docs · One + +
    +

    Docs One

    +

    Generated docs page.

    +
    + diff --git a/tests/framework-fixtures/multipage-with-generator/files/dist/index.html b/tests/framework-fixtures/multipage-with-generator/files/dist/index.html new file mode 100644 index 000000000..a7b10c3dd --- /dev/null +++ b/tests/framework-fixtures/multipage-with-generator/files/dist/index.html @@ -0,0 +1,8 @@ + +Home + +
    +

    Home

    +

    Generated homepage.

    +
    + From d5480caee3d2b4a0e95abbd5796d82bdd05eb19c Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 21 Apr 2026 23:41:11 -0700 Subject: [PATCH 055/125] feat(live): CSP detection + consent-gated patch flow at first-time setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Real-world tests (EAC Next turborepo) confirmed that CSP is the common blocker for live mode. Adds setup-time detection with a one-time user consent flow — the patch becomes a permanent, dev-guarded entry in the user's own config, not a transient add/remove. ## Changes - New detect-csp.mjs helper: grep-based classifier returning { shape, signals }. Shape is one of: - "shared-helper" (monorepo CSP helper with additional*Src arrays) - "inline-headers" (literal CSP string in headers()) - "middleware" (response.headers.set in middleware.ts; detect-only v1) - "meta-tag" (; detect-only v1) - null (no CSP) Max depth 6, skips node_modules / build / cache dirs, 64KB per file. - cspChecked boolean on config.json. First-run setup runs detection; subsequent runs skip. Users re-trigger by deleting the flag. Validator accepts it. - Skill live.md gains: - CSP detection step in first-time setup (gated by cspChecked) - Consent-prompt template (so every agent phrases it the same way) - Shape 1 patch template: append `...__impeccableLiveDev` to additionalScriptSrc/additionalConnectSrc in the app's config - Shape 2 patch template: two-point edit — declare a dev-only variable, interpolate into script-src and connect-src in the CSP literal string - Troubleshooting note for "said no but now live doesn't work" ## Fixtures - nextjs-turborepo/: Turborepo shape (shared CSP helper with additionalScriptSrc options). Sanitized from a real monorepo so the patch mechanics get tested against realistic layering. Includes expected-after-patch.ts for human/agent review. - nextjs-inline-csp/: app-level next.config.js with a literal CSP string. Includes expected-after-patch.js showing the Shape 2 edit. ## Tests Framework-fixture harness extended with a detect-csp shape-classification assertion per fixture. 42 tests across 7 fixtures pass. Clean fixtures (vite-react, nextjs-app, astro, sveltekit, multipage-with-generator) correctly return shape: null. ## Deliberately not doing - No patches[] array, no marker-based rollback, no add/remove lifecycle. The patch is a permanent dev-guarded config line — the same kind of edit a user would make themselves. - No base URL rewriting or proxy mechanism. Script tag still points at localhost:8400; CSP permits it once patched. No browser-side changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- .agents/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .claude/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .cursor/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .gemini/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .github/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .kiro/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .opencode/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .pi/skills/impeccable/reference/live.md | 78 ++++- .pi/skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .pi/skills/impeccable/scripts/live-inject.mjs | 3 + .rovodev/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .trae-cn/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + .trae/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + source/skills/impeccable/reference/live.md | 78 ++++- .../skills/impeccable/scripts/detect-csp.mjs | 167 ++++++++++ .../skills/impeccable/scripts/live-inject.mjs | 3 + tests/framework-fixtures.test.mjs | 16 + tests/framework-fixtures/README.md | 12 +- .../nextjs-inline-csp/expected-after-patch.js | 33 ++ .../nextjs-inline-csp/files/app/layout.tsx | 19 ++ .../nextjs-inline-csp/files/next.config.js | 23 ++ .../nextjs-inline-csp/fixture.json | 21 ++ .../nextjs-inline-csp/gitignore.txt | 3 + .../nextjs-turborepo/expected-after-patch.ts | 48 +++ .../files/apps/web/app/layout.tsx | 19 ++ .../files/apps/web/next.config.ts | 39 +++ .../packages/shared/src/next-config/index.ts | 287 ++++++++++++++++++ .../packages/shared/src/security/origins.ts | 82 +++++ .../nextjs-turborepo/fixture.json | 32 ++ .../nextjs-turborepo/gitignore.txt | 4 + 50 files changed, 3601 insertions(+), 13 deletions(-) create mode 100644 .agents/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .claude/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .cursor/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .gemini/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .github/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .kiro/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .opencode/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .pi/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .rovodev/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .trae-cn/skills/impeccable/scripts/detect-csp.mjs create mode 100644 .trae/skills/impeccable/scripts/detect-csp.mjs create mode 100644 source/skills/impeccable/scripts/detect-csp.mjs create mode 100644 tests/framework-fixtures/nextjs-inline-csp/expected-after-patch.js create mode 100644 tests/framework-fixtures/nextjs-inline-csp/files/app/layout.tsx create mode 100644 tests/framework-fixtures/nextjs-inline-csp/files/next.config.js create mode 100644 tests/framework-fixtures/nextjs-inline-csp/fixture.json create mode 100644 tests/framework-fixtures/nextjs-inline-csp/gitignore.txt create mode 100644 tests/framework-fixtures/nextjs-turborepo/expected-after-patch.ts create mode 100644 tests/framework-fixtures/nextjs-turborepo/files/apps/web/app/layout.tsx create mode 100644 tests/framework-fixtures/nextjs-turborepo/files/apps/web/next.config.ts create mode 100644 tests/framework-fixtures/nextjs-turborepo/files/packages/shared/src/next-config/index.ts create mode 100644 tests/framework-fixtures/nextjs-turborepo/files/packages/shared/src/security/origins.ts create mode 100644 tests/framework-fixtures/nextjs-turborepo/fixture.json create mode 100644 tests/framework-fixtures/nextjs-turborepo/gitignore.txt diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md index 968b7ef5f..c2359bd8b 100644 --- a/.agents/skills/impeccable/reference/live.md +++ b/.agents/skills/impeccable/reference/live.md @@ -291,10 +291,13 @@ Schema: { "files": ["", "", ...], "insertBefore": "", - "commentSyntax": "html" + "commentSyntax": "html", + "cspChecked": true } ``` +`cspChecked` tracks whether the CSP detection step below has already run. Absent on first setup; set to `true` after CSP is checked (whether patched, declined, or not needed). + `files` is the inject target — **the HTML files the browser actually loads**, not necessarily source. Tracked or generated doesn't matter here; wrap has its own generated-file guard and routes accepts through the fallback flow. | Framework | `files` | `insertBefore` | `commentSyntax` | @@ -311,4 +314,77 @@ Pick an anchor that exists in every file (`` almost always works). Use `i For multi-page sites whose pages are *rebuilt* by a generator (Astro, static-site generators, custom scripts like `build-sub-pages.js`), the inject survives only until the next regeneration. Re-run `live.mjs` after each build. Accept is unaffected — it writes to true source via the fallback flow. +### CSP detection (first-time only) + +If `config.cspChecked === true`, skip this entire section. You already asked this user once; the answer sticks. + +Otherwise, run the detection helper: + +```bash +node {{scripts_path}}/detect-csp.mjs +``` + +Output: `{ shape, signals }` where `shape` is one of `shared-helper`, `inline-headers`, `middleware`, `meta-tag`, or `null`. + +- **`null`** — no CSP; skip to writing `config.json` with `cspChecked: true`. +- **`shared-helper`** — monorepo with a CSP builder that accepts `additionalScriptSrc` / `additionalConnectSrc` arrays. Auto-patchable. See *Shape 1* below. +- **`inline-headers`** — CSP built as a literal string inside `next.config.*` (or equivalent) `headers()`. Auto-patchable. See *Shape 2* below. +- **`middleware`** or **`meta-tag`** — rarer. Detected but not auto-patched in v1. Show the user the detected files and ask them to add `http://localhost:8400` to `script-src` and `connect-src` manually, then mark `cspChecked: true` and proceed. + +#### Consent prompt template + +Use this phrasing so the experience is consistent across agents: + +> **CSP patch needed.** I detected a Content Security Policy in your project that blocks `http://localhost:8400` — the live picker won't load without an allowance. Here's the change I'd make: +> +> ```diff +> [file: ] +> [exact diff, 2–5 lines] +> ``` +> +> It's guarded by `NODE_ENV === "development"` so the extra entry only appears in dev and never reaches production. You can remove it any time by reverting this file. Apply? [y/n] + +On "no": skip the patch, mention live won't work until the user adds the allowance manually, still write `cspChecked: true` (the question's been asked). + +On "yes": apply the Shape-specific patch below, then write `cspChecked: true`. + +#### Shape 1 — shared helper with `additional*Src` arrays + +The app config calls something like `createBaseNextConfig({ additionalScriptSrc: [...], additionalConnectSrc: [...] })`. Patch the *app's* config (not the shared helper) so the monorepo root stays clean. Add near the top of the app's `next.config.ts`: + +```ts +// Dev-only allowance so impeccable live mode can load. Guarded by NODE_ENV. +const __impeccableLiveDev = + process.env.NODE_ENV === "development" ? ["http://localhost:8400"] : []; +``` + +Append `...__impeccableLiveDev` to both `additionalScriptSrc` and `additionalConnectSrc` array options. + +Idempotency: if `__impeccableLiveDev` already exists in the file, the patch is already applied; skip asking and just mark `cspChecked: true`. + +See `tests/framework-fixtures/nextjs-turborepo/expected-after-patch.ts` for the full desired output. + +#### Shape 2 — inline CSP string in `headers()` + +A literal CSP string inside a `headers()` function or return value. Two-point patch: declare a dev-only variable near the top, interpolate it into the CSP string at the `script-src` and `connect-src` segments. + +```ts +const __impeccableLiveDev = + process.env.NODE_ENV === "development" ? " http://localhost:8400" : ""; +``` + +Then, inside the CSP value string: +- `script-src 'self' 'unsafe-inline'` → `script-src 'self' 'unsafe-inline'${__impeccableLiveDev}` +- `connect-src 'self'` → `connect-src 'self'${__impeccableLiveDev}` + +(Leading space on the dev string so it concatenates cleanly into the existing value.) + +Read the current file, locate the exact CSP string, quote the two directive edits in the consent prompt, write after confirmation. + +See `tests/framework-fixtures/nextjs-inline-csp/expected-after-patch.js` for the full desired output. + +### Troubleshooting + +If a user says "no" to the CSP patch at setup time and later complains that live doesn't work: their dev CSP blocks `http://localhost:8400`. Fix: delete `cspChecked` from `config.json` and re-run `live.mjs` — setup will ask again. + Then re-run `live.mjs`. diff --git a/.agents/skills/impeccable/scripts/detect-csp.mjs b/.agents/skills/impeccable/scripts/detect-csp.mjs new file mode 100644 index 000000000..7f7fa3354 --- /dev/null +++ b/.agents/skills/impeccable/scripts/detect-csp.mjs @@ -0,0 +1,167 @@ +/** + * Scan a project tree for Content-Security-Policy signals and classify the + * shape so the agent knows which patch template to propose. + * + * Used at first-time `live.mjs` setup. Mechanical (grep-based) — no network, + * no dev server, no JS evaluation. The classification drives a user-facing + * consent prompt; the agent does the actual patch writing. + * + * Shape taxonomy: + * - "shared-helper": monorepo with a `createBaseNextConfig`-style helper + * that accepts `additionalScriptSrc`/`additionalConnectSrc` + * arrays. Patch the app's config to append a dev-only + * localhost entry to those arrays. + * - "inline-headers": Content-Security-Policy built inline in a Next/Nuxt/ + * SvelteKit config's headers() function with a literal + * value string. Patch the CSP string in place. + * - "middleware": CSP set in middleware.{ts,js}. Detected but not + * auto-patched in v1. + * - "meta-tag": in layout + * files. Detected but not auto-patched in v1. + * - null: no CSP signals found; no patch needed. + */ + +import fs from 'node:fs'; +import path from 'node:path'; + +const SKIP_DIRS = new Set([ + 'node_modules', + '.git', + '.next', + '.turbo', + '.svelte-kit', + '.nuxt', + '.astro', + 'dist', + 'build', + 'out', + '.vercel', +]); + +const SCAN_EXTS = new Set(['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.tsx', '.jsx']); +const LAYOUT_EXTS = new Set(['.tsx', '.jsx', '.astro', '.vue', '.svelte', '.html']); +const MAX_DEPTH = 6; +const MAX_READ_BYTES = 64 * 1024; + +const SHARED_HELPER_SIGNALS = [ + /\bbuildCSPConfig\b/, + /\bbuildSecurityHeaders\b/, + /\badditionalScriptSrc\b/, + /\badditionalConnectSrc\b/, + /\bcreateBaseNextConfig\b/, +]; + +const INLINE_HEADER_SIGNALS = [ + /["']Content-Security-Policy["']/i, + /\bscript-src\b/, + /\bconnect-src\b/, +]; + +const MIDDLEWARE_HINT = /headers\.set\(\s*["']Content-Security-Policy["']/i; +const META_TAG_HINT = /http-equiv\s*=\s*["']Content-Security-Policy["']/i; + +/** + * @param {string} cwd Project root. + * @returns {{ shape: string|null, signals: string[] }} + */ +export function detectCsp(cwd = process.cwd()) { + const hits = { sharedHelper: [], inlineHeader: [], middleware: [], metaTag: [] }; + + walk(cwd, cwd, 0, (absPath, relPath, body) => { + const ext = path.extname(absPath); + const base = path.basename(absPath).toLowerCase(); + + // Shared helper: package exports, config factory + if (SCAN_EXTS.has(ext)) { + const matched = SHARED_HELPER_SIGNALS.some((re) => re.test(body)); + const looksShared = /packages\/[^/]+\/src\/.*(config|next-config|security)/.test(relPath); + if (matched && looksShared) { + hits.sharedHelper.push(relPath); + } + } + + // Inline headers: Next/Nuxt/SvelteKit/Astro/Vite config files + if (SCAN_EXTS.has(ext) && /(^|\/)(next|nuxt|vite|astro|svelte)\.config\./.test(relPath)) { + const allInlineMatch = INLINE_HEADER_SIGNALS.every((re) => re.test(body)); + if (allInlineMatch) { + hits.inlineHeader.push(relPath); + } + } + + // Middleware CSP: middleware.{ts,js} at project root or app/ + if ((base === 'middleware.ts' || base === 'middleware.js' || base === 'middleware.mjs') && + MIDDLEWARE_HINT.test(body)) { + hits.middleware.push(relPath); + } + + // Meta tag CSP: layouts / HTML files + if (LAYOUT_EXTS.has(ext) && META_TAG_HINT.test(body)) { + hits.metaTag.push(relPath); + } + }); + + // Classification priority: shared-helper > inline-headers > middleware > meta-tag. + // A monorepo with a shared helper is always that shape, even if an individual + // app file also happens to contain a CSP literal. + if (hits.sharedHelper.length > 0) { + return { + shape: 'shared-helper', + signals: hits.sharedHelper, + }; + } + if (hits.inlineHeader.length > 0) { + return { + shape: 'inline-headers', + signals: hits.inlineHeader, + }; + } + if (hits.middleware.length > 0) { + return { + shape: 'middleware', + signals: hits.middleware, + }; + } + if (hits.metaTag.length > 0) { + return { + shape: 'meta-tag', + signals: hits.metaTag, + }; + } + return { shape: null, signals: [] }; +} + +function walk(root, dir, depth, visit) { + if (depth > MAX_DEPTH) return; + let entries; + try { entries = fs.readdirSync(dir, { withFileTypes: true }); } + catch { return; } + + for (const entry of entries) { + const abs = path.join(dir, entry.name); + if (entry.isDirectory()) { + if (SKIP_DIRS.has(entry.name)) continue; + walk(root, abs, depth + 1, visit); + continue; + } + if (!entry.isFile()) continue; + const ext = path.extname(entry.name); + if (!SCAN_EXTS.has(ext) && !LAYOUT_EXTS.has(ext)) continue; + let body; + try { + const fd = fs.openSync(abs, 'r'); + try { + const buf = Buffer.alloc(MAX_READ_BYTES); + const n = fs.readSync(fd, buf, 0, MAX_READ_BYTES, 0); + body = buf.slice(0, n).toString('utf-8'); + } finally { fs.closeSync(fd); } + } catch { continue; } + visit(abs, path.relative(root, abs), body); + } +} + +// CLI mode +const _running = process.argv[1]; +if (_running?.endsWith('detect-csp.mjs') || _running?.endsWith('detect-csp.mjs/')) { + const result = detectCsp(process.cwd()); + console.log(JSON.stringify(result, null, 2)); +} diff --git a/.agents/skills/impeccable/scripts/live-inject.mjs b/.agents/skills/impeccable/scripts/live-inject.mjs index 03d054ae6..0a08e0a7f 100644 --- a/.agents/skills/impeccable/scripts/live-inject.mjs +++ b/.agents/skills/impeccable/scripts/live-inject.mjs @@ -126,6 +126,9 @@ function validateConfig(cfg) { if (cfg.commentSyntax !== 'html' && cfg.commentSyntax !== 'jsx') { throw new Error("config.commentSyntax must be 'html' or 'jsx'"); } + if (cfg.cspChecked !== undefined && typeof cfg.cspChecked !== 'boolean') { + throw new Error("config.cspChecked, if present, must be a boolean"); + } } function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : ' +
    +
    +

    original text

    +
    + block should also be treated as a + // single skipped unit; the line has both open and close tags. + it('finds the accepted variant after a single-line block', () => { + const html = ` + +
    +

    original

    + +

    variant one

    +

    variant two

    +

    variant three

    +
    + +`; + writeFileSync(join(tmp, 'page.html'), html); + + const result = runAccept(tmp, ['--id', 'ONELINE', '--variant', '3']); + assert.equal(result.handled, true, `accept should succeed: ${JSON.stringify(result)}`); + + const after = readFileSync(join(tmp, 'page.html'), 'utf-8'); + assert.ok(after.includes('data-impeccable-variant="3"'), 'accepted wrapper for variant 3 present'); + assert.ok(after.includes('variant three'), 'variant 3 content kept'); + assert.ok(!after.includes('variant two'), 'other variant content dropped'); + }); + + // Baseline: the standard multi-line case must keep working. + it('finds the accepted variant after a multi-line block (regression baseline)', () => { + const html = ` + +
    +

    original

    + +

    variant one

    +

    variant two

    +
    + +`; + writeFileSync(join(tmp, 'page.html'), html); + + const result = runAccept(tmp, ['--id', 'MULTI', '--variant', '1']); + assert.equal(result.handled, true, `accept should succeed: ${JSON.stringify(result)}`); + + const after = readFileSync(join(tmp, 'page.html'), 'utf-8'); + assert.ok(after.includes('data-impeccable-variant="1"'), 'accepted wrapper for variant 1 present'); + assert.ok(after.includes('variant one'), 'variant 1 content kept'); + }); + + // Discard must restore the original element after a self-closing +
    +
    +

    Work with me.

    + /// +

    Built by Renaissance Geek · Rollouts · Integrations · Training · Say hello

    +
    +
    +
    +
    +

    Work with me.

    +

    Rollouts, integrations, and training for teams that take AI-generated design seriously.

    +

    Impeccable is built by Renaissance Geek. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    +
    +
    +
    +
    + Work + with + me. +
    +
    + Consulting · Renaissance Geek +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    +
    +
    +
    diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index dff4aa616..4eea9a860 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -1364,19 +1364,39 @@ scrollLockRaf = requestAnimationFrame(correct); }; - scrollLockObserver = new MutationObserver(schedule); + // Filter to mutations that touch our session's wrapper. Watching the + // whole body means shader animations, HMR indicators, tooltips, and + // every other DOM change elsewhere on the page fires corrections — + // which fight the user on scroll. + scrollLockObserver = new MutationObserver((mutations) => { + for (const m of mutations) { + if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { + schedule(); + return; + } + for (const n of m.addedNodes) { + if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { + schedule(); + return; + } + } + } + }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: update the target - // top to wherever the element is now, so we don't fight the user. + // Treat explicit user scroll intent as a re-anchor: cancel any pending + // correction, then update the target top to the element's new position + // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); + window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); window.addEventListener('keydown', (e) => { if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); From 1e533e535aa2f980413a9eb57c1608cd04a48d21 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:20:51 -0700 Subject: [PATCH 072/125] fix(live): disable browser overflow-anchor during session, always correct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two things were wrong. First, I capped large corrections — which was backwards: a huge delta is exactly when we most need to restore (it means the browser's own scroll anchoring drifted, which is what makes the page 'jump to Get Started' when Bun's HMR destroys and re-inserts our target). Remove the cap so any delta is corrected. Second, the browser's built-in scroll anchoring was competing with us: when Bun destroys our target element, the browser picks the nearest surviving element (like a CTA anchor in another section) as its new scroll anchor and scrolls to keep THAT stable. Disable overflow-anchor on html and body for the duration of the session so we own scroll entirely; restore the original values on stopScrollLock. Kept the user-scroll grace window (400ms): wheel / touch / arrow keys re-anchor and suppress corrections, so momentum scrolls don't get fought. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .pi/skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- .../skills/impeccable/scripts/live-browser.js | 38 ++- public/index.html | 264 +++++++++++------- .../skills/impeccable/scripts/live-browser.js | 38 ++- 13 files changed, 578 insertions(+), 142 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; diff --git a/public/index.html b/public/index.html index bcddf0b88..9f88cfe71 100644 --- a/public/index.html +++ b/public/index.html @@ -719,8 +719,9 @@
    - -
    + + +
    @@ -729,143 +730,171 @@
    -
    -

    Work with me.

    - /// -

    Built by Renaissance Geek · Rollouts · Integrations · Training · Say hello

    +
    + Transmission · 001 + Consulting +
    +

    Work with me.

    +
      +
    • 01Enterprise rollouts
    • +
    • 02Custom integrations
    • +
    • 03Team training for designers and developers
    • +
    +

    Impeccable is built by Renaissance Geek. If you're a frontier lab, design tool company, or enterprise team, let's talk.

    -

    Work with me.

    -

    Rollouts, integrations, and training for teams that take AI-generated design seriously.

    -

    Impeccable is built by Renaissance Geek. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    RG
    +
    + Consulting · Renaissance Geek +

    Work with me on the design side of AI.

    +

    I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    -
    - Work - with - me. -
    -
    - Consulting · Renaissance Geek -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +

    Work with me

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    + Consulting + Renaissance Geek · v3.0
    - + +
    diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 4eea9a860..c3b293fe7 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -1349,15 +1349,45 @@ try { history.scrollRestoration = 'manual'; } catch {} + // Disable browser scroll anchoring on root elements during the session. + // When Bun's HMR destroys our target element and re-inserts it, the + // browser picks a different anchor nearby (often the wrong one — Get + // Started, say) and scrolls the page to keep THAT stable. We want to + // own scroll ourselves, so turn it off while we're active. + const prevHtmlAnchor = document.documentElement.style.overflowAnchor; + const prevBodyAnchor = document.body.style.overflowAnchor; + document.documentElement.style.overflowAnchor = 'none'; + document.body.style.overflowAnchor = 'none'; + + // Grace window after any user-scroll intent: suppress corrections so + // momentum scrolls can't be yanked back by a mutation firing mid-scroll. + let lastUserScrollAt = 0; + const USER_SCROLL_GRACE_MS = 400; + const correct = () => { scrollLockRaf = null; if (scrollLockTargetTop == null) return; const el = resolveScrollLockTarget(sessionId); if (!el) return; - const delta = el.getBoundingClientRect().top - scrollLockTargetTop; - if (Math.abs(delta) > 0.5) { - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { + // User just scrolled — just re-anchor and let them be. + scrollLockTargetTop = el.getBoundingClientRect().top; + return; } + const currentTop = el.getBoundingClientRect().top; + const delta = currentTop - scrollLockTargetTop; + if (Math.abs(delta) < 0.5) return; + // Always correct, even for huge deltas — a huge delta typically + // means the browser's anchor drifted (common with Bun's HMR + // wholesale-replace) and is exactly when we most need to restore. + window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); + }; + + // Restore overflow-anchor on stop. Stash the restorer on the abort + // controller so stopScrollLock picks it up. + const restoreAnchor = () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; }; const schedule = () => { if (scrollLockRaf != null) return; @@ -1388,8 +1418,10 @@ // correction, then update the target top to the element's new position // so we don't drag them back on the next mutation. scrollLockAbort = new AbortController(); + scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { + lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const el = resolveScrollLockTarget(sessionId); if (el) scrollLockTargetTop = el.getBoundingClientRect().top; From 565381a3e77970f2bafde820c2626e1a20335b15 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:25:40 -0700 Subject: [PATCH 073/125] fix(live): pin window.scrollY instead of element viewport top MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Element-based scroll tracking broke every time: Bun's HMR destroys the target element, the browser's scroll anchoring picks a different nearby element (e.g. the #downloads CTA) as its new anchor, and the page jumps to wherever that surviving element is. My element-based correction then computes against a replaced DOM node with stale / wrong geometry. The primitive the user actually cares about is window.scrollY — they want the page to stay where it is, regardless of which element survives the patch. Pin scrollY directly: capture it at session start, restore it on every mutation inside the wrapper, re-anchor on user scroll, store it in saveSession for reload-resume. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .pi/skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ .../skills/impeccable/scripts/live-browser.js | 121 +++------ public/index.html | 241 +----------------- .../skills/impeccable/scripts/live-browser.js | 121 +++------ 13 files changed, 437 insertions(+), 1256 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/public/index.html b/public/index.html index 9f88cfe71..0a4460c20 100644 --- a/public/index.html +++ b/public/index.html @@ -720,245 +720,14 @@ - -
    - -
    -
    -

    Work with me

    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    -
    -
    - - -
    -
    -
    - Transmission · 001 - Consulting -
    -

    Work with me.

    -
      -
    • 01Enterprise rollouts
    • -
    • 02Custom integrations
    • -
    • 03Team training for designers and developers
    • -
    -

    Impeccable is built by Renaissance Geek. If you're a frontier lab, design tool company, or enterprise team, let's talk.

    -
    -
    -
    -
    -
    RG
    -
    - Consulting · Renaissance Geek -

    Work with me on the design side of AI.

    -

    I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    -
    -
    -
    -
    -
    -

    Work with me

    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    -
    - Consulting - Renaissance Geek · v3.0 -
    -
    -
    +
    +

    Work with me

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    - + + diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index c3b293fe7..4e090f978 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -91,11 +91,11 @@ let selectedAction = 'impeccable'; let selectedCount = 3; - // Scroll lock — holds the selected element at a fixed viewport-top while - // the session is active, so HMR DOM patches and variant swaps don't drift - // the page. See startScrollLock / stopScrollLock below. + // Scroll lock — holds window.scrollY at a fixed value while the session is + // active, so HMR DOM patches and variant swaps can't drift the page. See + // startScrollLock / stopScrollLock below. let scrollLockObserver = null; - let scrollLockTargetTop = null; + let scrollLockTargetY = null; let scrollLockRaf = null; let scrollLockAbort = null; @@ -1320,84 +1320,44 @@ return variantDiv; } - // Resolve the element whose top we want to lock: the currently-visible - // variant's content (falling back to the original), identified by - // sessionId so we survive DOM swaps that invalidate `selectedElement`. - function resolveScrollLockTarget(sessionId) { - const wrapper = sessionId - ? document.querySelector('[data-impeccable-variants="' + sessionId + '"]') - : null; - if (wrapper) { - const idx = visibleVariant > 0 ? visibleVariant : 'original'; - const el = pickVariantContent(wrapper, idx); - if (el) return el; - } - return selectedElement?.isConnected ? selectedElement : null; - } - - // Hold the resolved target at a fixed viewport-top across DOM mutations - // (HMR patches, variant inserts, variant cycle swaps). If the caller - // passes `initialTargetTop`, use it (e.g. on resume after full reload); - // otherwise capture the current target's top. - function startScrollLock(sessionId, initialTargetTop) { + // Hold window.scrollY at a fixed value across DOM mutations inside the + // session's wrapper (HMR patches, variant inserts, cycle swaps). The key + // insight: we don't care where the selected element ends up, we just + // don't want the page to jump. scrollY is a primitive that survives any + // DOM destruction; element-viewport-top is fragile when the element + // itself gets replaced. + function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); - const initial = resolveScrollLockTarget(sessionId); - if (!initial) return; - scrollLockTargetTop = typeof initialTargetTop === 'number' && isFinite(initialTargetTop) - ? initialTargetTop - : initial.getBoundingClientRect().top; + scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) + ? initialTargetY + : window.scrollY; try { history.scrollRestoration = 'manual'; } catch {} - // Disable browser scroll anchoring on root elements during the session. - // When Bun's HMR destroys our target element and re-inserts it, the - // browser picks a different anchor nearby (often the wrong one — Get - // Started, say) and scrolls the page to keep THAT stable. We want to - // own scroll ourselves, so turn it off while we're active. + // Disable the browser's own scroll anchoring during the session. Bun's + // HMR destroys and re-inserts our target element, at which point the + // browser picks a different anchor elsewhere on the page (e.g. the + // nearest #downloads CTA) and scrolls to keep THAT stable. We own + // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - // Grace window after any user-scroll intent: suppress corrections so - // momentum scrolls can't be yanked back by a mutation firing mid-scroll. - let lastUserScrollAt = 0; - const USER_SCROLL_GRACE_MS = 400; - const correct = () => { scrollLockRaf = null; - if (scrollLockTargetTop == null) return; - const el = resolveScrollLockTarget(sessionId); - if (!el) return; - if (performance.now() - lastUserScrollAt < USER_SCROLL_GRACE_MS) { - // User just scrolled — just re-anchor and let them be. - scrollLockTargetTop = el.getBoundingClientRect().top; - return; - } - const currentTop = el.getBoundingClientRect().top; - const delta = currentTop - scrollLockTargetTop; - if (Math.abs(delta) < 0.5) return; - // Always correct, even for huge deltas — a huge delta typically - // means the browser's anchor drifted (common with Bun's HMR - // wholesale-replace) and is exactly when we most need to restore. - window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); - }; - - // Restore overflow-anchor on stop. Stash the restorer on the abort - // controller so stopScrollLock picks it up. - const restoreAnchor = () => { - document.documentElement.style.overflowAnchor = prevHtmlAnchor; - document.body.style.overflowAnchor = prevBodyAnchor; + if (scrollLockTargetY == null) return; + if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }; const schedule = () => { if (scrollLockRaf != null) return; scrollLockRaf = requestAnimationFrame(correct); }; - // Filter to mutations that touch our session's wrapper. Watching the - // whole body means shader animations, HMR indicators, tooltips, and - // every other DOM change elsewhere on the page fires corrections — - // which fight the user on scroll. + // Filter to mutations that touch our session's wrapper. Unrelated + // mutations (shader animations, HMR indicators, tooltips) shouldn't + // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { @@ -1414,17 +1374,16 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // Treat explicit user scroll intent as a re-anchor: cancel any pending - // correction, then update the target top to the element's new position - // so we don't drag them back on the next mutation. + // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); - scrollLockAbort.signal.addEventListener('abort', restoreAnchor, { once: true }); + scrollLockAbort.signal.addEventListener('abort', () => { + document.documentElement.style.overflowAnchor = prevHtmlAnchor; + document.body.style.overflowAnchor = prevBodyAnchor; + }, { once: true }); const sig = { signal: scrollLockAbort.signal }; const reanchor = () => { - lastUserScrollAt = performance.now(); if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } - const el = resolveScrollLockTarget(sessionId); - if (el) scrollLockTargetTop = el.getBoundingClientRect().top; + scrollLockTargetY = window.scrollY; }; window.addEventListener('wheel', reanchor, { passive: true, ...sig }); window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); @@ -1433,15 +1392,16 @@ if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); }, sig); + // Initial apply — primarily useful on resume after a true reload, + // where the browser may have landed us somewhere wrong. schedule(); - if (document.fonts?.ready) document.fonts.ready.then(schedule).catch(() => {}); } function stopScrollLock() { if (scrollLockObserver) { scrollLockObserver.disconnect(); scrollLockObserver = null; } if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } - scrollLockTargetTop = null; + scrollLockTargetY = null; } // --------------------------------------------------------------------------- @@ -2270,15 +2230,6 @@ void main() { function saveSession() { if (!currentSessionId) return; - // Capture the selected element's current viewport-relative top so we - // can restore the same framing after a reload, even if layout shifts. - let scrollAnchor = null; - try { - if (selectedElement && selectedElement.isConnected) { - const r = selectedElement.getBoundingClientRect(); - if (r.width > 0 && r.height > 0) scrollAnchor = { viewportTop: r.top }; - } - } catch {} try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2288,7 +2239,7 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollAnchor, + scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2445,7 +2396,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollAnchor?.viewportTop); + startScrollLock(currentSessionId, saved?.scrollY); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so From a6aa98c616f2f65733a61a4c18ec2e512b850771 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:28:48 -0700 Subject: [PATCH 074/125] chore(live): add diagnostic logging to scroll lock Log target-Y at Go, every mutation that triggers a correction (with the mutation type + added nodes), every correct-or-noop (with from/to/delta), every reanchor, and every external scroll event >5px. Lets us see which step is actually moving the page during wrap / variant insert. --- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .pi/skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- public/index.html | 165 +++++++++++++++++- .../skills/impeccable/scripts/live-browser.js | 65 ++++--- 13 files changed, 606 insertions(+), 339 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); diff --git a/public/index.html b/public/index.html index 0a4460c20..01750db32 100644 --- a/public/index.html +++ b/public/index.html @@ -722,10 +722,169 @@ -
    -

    Work with me

    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    + +
    + +
    +
    +

    Work with me

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    +
    +
    + + +
    +
    + Consulting +

    Work with me on enterprise rollouts, custom integrations, and training. By Renaissance Geek.

    +
    +
    +
    +
    +

    Work with me.

    +

    Impeccable is built by Renaissance Geek. Rollouts, integrations, and training for teams raising the bar on AI-generated design.

    +
    +
    +
    +
    +
    + Studio · Renaissance Geek +

    Work with me.

    +

    Frontier labs, design tool companies, enterprise teams.

    +
    +
    + Impeccable is built by Renaissance Geek. I work with teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're raising the bar on AI-generated design, let's talk. +
    +
    +
    + diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 4e090f978..844159228 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -1321,52 +1321,50 @@ } // Hold window.scrollY at a fixed value across DOM mutations inside the - // session's wrapper (HMR patches, variant inserts, cycle swaps). The key - // insight: we don't care where the selected element ends up, we just - // don't want the page to jump. scrollY is a primitive that survives any - // DOM destruction; element-viewport-top is fragile when the element - // itself gets replaced. + // session's wrapper (HMR patches, variant inserts, cycle swaps). function startScrollLock(sessionId, initialTargetY) { stopScrollLock(); scrollLockTargetY = typeof initialTargetY === 'number' && isFinite(initialTargetY) ? initialTargetY : window.scrollY; + console.log('[impeccable.scroll] startScrollLock', { sessionId, scrollY: window.scrollY, targetY: scrollLockTargetY, initialOverride: initialTargetY }); try { history.scrollRestoration = 'manual'; } catch {} - // Disable the browser's own scroll anchoring during the session. Bun's - // HMR destroys and re-inserts our target element, at which point the - // browser picks a different anchor elsewhere on the page (e.g. the - // nearest #downloads CTA) and scrolls to keep THAT stable. We own - // scroll ourselves while active. const prevHtmlAnchor = document.documentElement.style.overflowAnchor; const prevBodyAnchor = document.body.style.overflowAnchor; document.documentElement.style.overflowAnchor = 'none'; document.body.style.overflowAnchor = 'none'; - const correct = () => { + const correct = (why) => { scrollLockRaf = null; if (scrollLockTargetY == null) return; - if (Math.abs(window.scrollY - scrollLockTargetY) < 0.5) return; + const before = window.scrollY; + const delta = before - scrollLockTargetY; + if (Math.abs(delta) < 0.5) { + console.log('[impeccable.scroll] correct noop', { why, scrollY: before, targetY: scrollLockTargetY }); + return; + } window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] corrected', { why, from: before, to: scrollLockTargetY, delta, nowAt: window.scrollY }); }; - const schedule = () => { + const schedule = (why) => { if (scrollLockRaf != null) return; - scrollLockRaf = requestAnimationFrame(correct); + scrollLockRaf = requestAnimationFrame(() => correct(why)); }; - // Filter to mutations that touch our session's wrapper. Unrelated - // mutations (shader animations, HMR indicators, tooltips) shouldn't - // trigger corrections and fight the user. scrollLockObserver = new MutationObserver((mutations) => { for (const m of mutations) { if (m.target?.closest?.('[data-impeccable-variants="' + sessionId + '"]')) { - schedule(); + const childAdds = Array.from(m.addedNodes).map(n => n.nodeType === 1 ? (n.tagName + (n.dataset?.impeccableVariant ? ('[variant=' + n.dataset.impeccableVariant + ']') : '')) : n.nodeType).join(','); + console.log('[impeccable.scroll] mutation inside wrapper', { type: m.type, target: m.target?.tagName, adds: childAdds, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('mutation-in-wrapper'); return; } for (const n of m.addedNodes) { if (n.nodeType === 1 && (n.matches?.('[data-impeccable-variants="' + sessionId + '"]') || n.querySelector?.('[data-impeccable-variants="' + sessionId + '"]'))) { - schedule(); + console.log('[impeccable.scroll] wrapper node added', { tag: n.tagName, scrollYBefore: window.scrollY, targetY: scrollLockTargetY }); + schedule('wrapper-added'); return; } } @@ -1374,27 +1372,37 @@ }); scrollLockObserver.observe(document.body, { childList: true, subtree: true }); - // User scroll intent updates the target — we never fight the user. scrollLockAbort = new AbortController(); scrollLockAbort.signal.addEventListener('abort', () => { document.documentElement.style.overflowAnchor = prevHtmlAnchor; document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; - const reanchor = () => { + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } + const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', reanchor, { passive: true, ...sig }); - window.addEventListener('touchstart', reanchor, { passive: true, ...sig }); - window.addEventListener('touchmove', reanchor, { passive: true, ...sig }); + window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor(); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); }, sig); - // Initial apply — primarily useful on resume after a true reload, - // where the browser may have landed us somewhere wrong. - schedule(); + // Also track raw scroll events for diagnostic — shows whether Bun or + // some other mechanism is programmatically scrolling. + let lastLoggedScrollY = window.scrollY; + window.addEventListener('scroll', () => { + const now = window.scrollY; + if (Math.abs(now - lastLoggedScrollY) > 5) { + console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); + lastLoggedScrollY = now; + } + }, { passive: true, ...sig }); + + schedule('initial'); } function stopScrollLock() { @@ -1767,6 +1775,7 @@ saveSession(); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); + console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); startScrollLock(currentSessionId); captureAndEmit(elForCapture, basePayload, snapshot, captureRect); From 868d8c4126f8c869b6817bce8193304a097b5e3f Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:35:00 -0700 Subject: [PATCH 075/125] fix(live): separate scroll-key, pre-empt browser, snap on every scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three concrete bugs from the diagnostic logs: 1. saveSession was writing scrollY alongside state, so every call during resumeSession clobbered the Go-time value with whatever the browser had left us at (typically 0). Move scrollY to its own localStorage key, touched only at Go and on user-scroll reanchor. 2. history.scrollRestoration='manual' was being set inside init() at DOMContentLoaded — by then the browser has already started animating its restore, especially with scroll-behavior: smooth on html. Apply it at script parse time, and apply the saved scrollY immediately there too, before the browser's animation starts. 3. Corrections only fired on MutationObserver. A programmatic smooth scroll (browser restore animation, or another script calling scrollIntoView) produces zero DOM mutations — so we never caught it walking scrollY from 0 up to 4800+ in the recorded session. Snap back on every scroll event, gated by a 250ms user-gesture window so we don't fight real user scrolls. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .pi/skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- public/index.html | 157 +++++++++--------- .../skills/impeccable/scripts/live-browser.js | 79 ++++++++- 13 files changed, 919 insertions(+), 186 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so diff --git a/public/index.html b/public/index.html index 01750db32..724bc0b59 100644 --- a/public/index.html +++ b/public/index.html @@ -722,8 +722,9 @@ - -
    + + +
    @@ -732,66 +733,78 @@
    -
    - Consulting -

    Work with me on enterprise rollouts, custom integrations, and training. By Renaissance Geek.

    + Consulting · Renaissance Geek +

    Work with me.

    +

    Rollouts, integrations, and training for enterprise teams, frontier labs, and design tool companies. By Renaissance Geek.

    -

    Work with me.

    -

    Impeccable is built by Renaissance Geek. Rollouts, integrations, and training for teams raising the bar on AI-generated design.

    + § +
    +

    Work with me.

    +

    Impeccable is built by Renaissance Geek. Enterprise rollouts, custom integrations, and training for designers and developers.

    +
    -
    - Studio · Renaissance Geek -

    Work with me.

    -

    Frontier labs, design tool companies, enterprise teams.

    -
    -
    - Impeccable is built by Renaissance Geek. I work with teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're raising the bar on AI-generated design, let's talk. +
    + & +

    Work with me.

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training.

    - + + diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 844159228..dcd3dedee 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -99,6 +99,40 @@ let scrollLockRaf = null; let scrollLockAbort = null; + // Dedicated key for scroll position — SEPARATE from LS_KEY so that + // saveSession's state updates don't clobber a carefully-captured scrollY. + // (Previously: saveSession wrote scrollY alongside state, so every call + // during resume overwrote the pre-reload value with whatever the browser + // had landed on, typically 0.) + const SCROLL_KEY_SUFFIX = '-scroll'; + function writeScrollY(y) { + try { localStorage.setItem(LS_KEY + SCROLL_KEY_SUFFIX, String(y)); } catch {} + } + function readScrollY() { + try { + const raw = localStorage.getItem(LS_KEY + SCROLL_KEY_SUFFIX); + if (raw == null) return null; + const n = parseFloat(raw); + return isFinite(n) ? n : null; + } catch { return null; } + } + function clearScrollY() { + try { localStorage.removeItem(LS_KEY + SCROLL_KEY_SUFFIX); } catch {} + } + + // Pre-empt the browser: apply manual scroll restoration and jump to the + // saved scrollY at script-parse time (before DOMContentLoaded). If we + // wait until init(), the browser has already begun animating its own + // restore — especially bad when `scroll-behavior: smooth` is set on html. + try { + history.scrollRestoration = 'manual'; + const savedY = readScrollY(); + if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + } + } catch {} + // UI refs let highlightEl = null; let tooltipEl = null; @@ -1378,21 +1412,35 @@ document.body.style.overflowAnchor = prevBodyAnchor; }, { once: true }); const sig = { signal: scrollLockAbort.signal }; + // Track whether the most recent scroll came from a user gesture. We + // gate user-scroll re-anchoring on this flag so programmatic smooth + // scrolls (browser reload-restore, scrollIntoView from other scripts) + // don't accidentally update our target. + let userGestureAt = 0; + const USER_GESTURE_WINDOW_MS = 250; + const reanchor = (why) => { if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } const prevTarget = scrollLockTargetY; scrollLockTargetY = window.scrollY; + writeScrollY(scrollLockTargetY); console.log('[impeccable.scroll] reanchor', { why, prevTarget, newTarget: scrollLockTargetY }); }; - window.addEventListener('wheel', () => reanchor('wheel'), { passive: true, ...sig }); - window.addEventListener('touchstart', () => reanchor('touchstart'), { passive: true, ...sig }); - window.addEventListener('touchmove', () => reanchor('touchmove'), { passive: true, ...sig }); + const markGesture = (why) => { + userGestureAt = performance.now(); + reanchor(why); + }; + window.addEventListener('wheel', () => markGesture('wheel'), { passive: true, ...sig }); + window.addEventListener('touchstart', () => markGesture('touchstart'), { passive: true, ...sig }); + window.addEventListener('touchmove', () => markGesture('touchmove'), { passive: true, ...sig }); window.addEventListener('keydown', (e) => { - if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) reanchor('key:' + e.key); + if (['PageDown', 'PageUp', ' ', 'End', 'Home', 'ArrowDown', 'ArrowUp'].includes(e.key)) markGesture('key:' + e.key); }, sig); - // Also track raw scroll events for diagnostic — shows whether Bun or - // some other mechanism is programmatically scrolling. + // Correct on EVERY scroll event: whether it's the browser's + // post-reload animated restore or some other script calling + // scrollIntoView, we want to snap back immediately. Only skip if a + // user gesture fired in the last 250ms. let lastLoggedScrollY = window.scrollY; window.addEventListener('scroll', () => { const now = window.scrollY; @@ -1400,9 +1448,19 @@ console.log('[impeccable.scroll] scroll event', { from: lastLoggedScrollY, to: now, targetY: scrollLockTargetY }); lastLoggedScrollY = now; } + if (scrollLockTargetY == null) return; + if (performance.now() - userGestureAt < USER_GESTURE_WINDOW_MS) return; + if (Math.abs(now - scrollLockTargetY) < 0.5) return; + console.log('[impeccable.scroll] scroll-event snap', { from: now, to: scrollLockTargetY }); + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); }, { passive: true, ...sig }); - schedule('initial'); + // Apply target synchronously, not via rAF — racing the browser's + // restore or a smooth-scroll animation means we want to win now. + if (Math.abs(window.scrollY - scrollLockTargetY) > 0.5) { + window.scrollTo({ top: scrollLockTargetY, left: window.scrollX, behavior: 'instant' }); + console.log('[impeccable.scroll] startScrollLock initial apply', { to: scrollLockTargetY }); + } } function stopScrollLock() { @@ -1410,6 +1468,7 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; + clearScrollY(); } // --------------------------------------------------------------------------- @@ -1773,6 +1832,7 @@ state = 'GENERATING'; showBar('generating'); saveSession(); + writeScrollY(window.scrollY); if (variantObserver) variantObserver.disconnect(); variantObserver = startVariantObserver(currentSessionId); console.log('[impeccable.scroll] Go pressed', { scrollY: window.scrollY, sessionId: currentSessionId }); @@ -2239,6 +2299,8 @@ void main() { function saveSession() { if (!currentSessionId) return; + // NOTE: scrollY is stored under a separate key (writeScrollY). Storing + // it here would overwrite the Go-time value every time state changes. try { localStorage.setItem(LS_KEY, JSON.stringify({ id: currentSessionId, @@ -2248,7 +2310,6 @@ void main() { expected: expectedVariants, arrived: arrivedVariants, visible: visibleVariant, - scrollY: window.scrollY, })); } catch { /* quota exceeded or private mode */ } } @@ -2405,7 +2466,7 @@ void main() { // Hold the target at its saved viewport top through any subsequent // HMR patches, variant inserts, or cycle swaps. - startScrollLock(currentSessionId, saved?.scrollY); + startScrollLock(currentSessionId, readScrollY()); // If we reloaded mid-generation (Bun's HTML HMR destroys the shader // canvas), re-capture the original's content and restart the shader so From 5e04a9f25a04490de6dce8aa6db2f9bd9630a6cb Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:41:15 -0700 Subject: [PATCH 076/125] fix(live): don't clear scroll key inside stopScrollLock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit startScrollLock calls stopScrollLock at the top as a reset. I had clearScrollY() inside stopScrollLock, so every Go sequence was: writeScrollY(6749.5) → startScrollLock → stopScrollLock → clearScrollY — the persisted value was wiped right after being written, so resume after reload read null and locked to 0. Move clearScrollY to the three genuine session-end sites (hideBar error path, confirmed/accept, cleanup/discard). stopScrollLock no longer touches persistent storage. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .pi/skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- .../skills/impeccable/scripts/live-browser.js | 7 +- public/index.html | 84 ++++++++----------- .../skills/impeccable/scripts/live-browser.js | 7 +- 13 files changed, 108 insertions(+), 60 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; diff --git a/public/index.html b/public/index.html index 724bc0b59..e159aac80 100644 --- a/public/index.html +++ b/public/index.html @@ -723,8 +723,9 @@ - -
    + + +
    @@ -733,15 +734,14 @@
    -
    - Consulting · Renaissance Geek + Renaissance Geek · Consulting

    Work with me.

    -

    Rollouts, integrations, and training for enterprise teams, frontier labs, and design tool companies. By Renaissance Geek.

    +

    Enterprise rollouts, custom integrations, and training for designers and developers. Get in touch.

    - § +

    Work with me.

    -

    Impeccable is built by Renaissance Geek. Enterprise rollouts, custom integrations, and training for designers and developers.

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on rollouts, integrations, and training.

    -
    - & -

    Work with me.

    -
    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training.

    +

    Work
    with me.

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers.

    - + + diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index dcd3dedee..71ec5ab75 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -1468,7 +1468,9 @@ if (scrollLockRaf != null) { cancelAnimationFrame(scrollLockRaf); scrollLockRaf = null; } if (scrollLockAbort) { scrollLockAbort.abort(); scrollLockAbort = null; } scrollLockTargetY = null; - clearScrollY(); + // NOTE: do NOT clear the persistent scroll key here. startScrollLock + // calls us as a reset, and clearing the key would nuke the Go-time + // scrollY that the next resume needs to read. } // --------------------------------------------------------------------------- @@ -1647,6 +1649,7 @@ stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2261,6 +2264,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; @@ -2376,6 +2380,7 @@ void main() { stopScrollTracking(); if (variantObserver) { variantObserver.disconnect(); variantObserver = null; } stopScrollLock(); + clearScrollY(); clearSession(); selectedElement = null; currentSessionId = null; From fb78ec4553c3ded04c3b01a7b69bd0ab8a5d3b74 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:45:39 -0700 Subject: [PATCH 077/125] fix(live): inject inline pre-restore script so scrollY wins vs browser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit external live.js is fetched, so by the time it runs the browser has already queued its reload-scroll animation and history.scrollRestoration ='manual' has no effect. Inject a tiny inline synchronous '; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.claude/skills/impeccable/scripts/live-inject.mjs b/.claude/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.claude/skills/impeccable/scripts/live-inject.mjs +++ b/.claude/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.cursor/skills/impeccable/scripts/live-inject.mjs b/.cursor/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.cursor/skills/impeccable/scripts/live-inject.mjs +++ b/.cursor/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.gemini/skills/impeccable/scripts/live-inject.mjs b/.gemini/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.gemini/skills/impeccable/scripts/live-inject.mjs +++ b/.gemini/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.github/skills/impeccable/scripts/live-inject.mjs b/.github/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.github/skills/impeccable/scripts/live-inject.mjs +++ b/.github/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.kiro/skills/impeccable/scripts/live-inject.mjs b/.kiro/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.kiro/skills/impeccable/scripts/live-inject.mjs +++ b/.kiro/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.opencode/skills/impeccable/scripts/live-inject.mjs b/.opencode/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.opencode/skills/impeccable/scripts/live-inject.mjs +++ b/.opencode/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.pi/skills/impeccable/scripts/live-inject.mjs b/.pi/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.pi/skills/impeccable/scripts/live-inject.mjs +++ b/.pi/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.rovodev/skills/impeccable/scripts/live-inject.mjs b/.rovodev/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.rovodev/skills/impeccable/scripts/live-inject.mjs +++ b/.rovodev/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.trae-cn/skills/impeccable/scripts/live-inject.mjs b/.trae-cn/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.trae-cn/skills/impeccable/scripts/live-inject.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/.trae/skills/impeccable/scripts/live-inject.mjs b/.trae/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/.trae/skills/impeccable/scripts/live-inject.mjs +++ b/.trae/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); diff --git a/public/index.html b/public/index.html index e159aac80..6c638efcc 100644 --- a/public/index.html +++ b/public/index.html @@ -724,8 +724,9 @@ - -
    + + +
    @@ -734,118 +735,27 @@
    -
    @@ -860,18 +770,19 @@

    Work with me.

    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on rollouts, integrations, and training.

    +

    Impeccable is built by Renaissance Geek. Rollouts, integrations, training.

    Work
    with me.

    -

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers.

    +

    Impeccable is built by Renaissance Geek. Large-scale rollouts, custom integrations, and training for teams raising the bar on AI-generated design.

    - + + @@ -921,6 +832,7 @@ + diff --git a/public/privacy.html b/public/privacy.html index 4139e711e..2bb9a7e2b 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -78,6 +78,7 @@

    Questions about this policy? Open an issue on GitHub or reach out to @pbakaus.

    + diff --git a/source/skills/impeccable/scripts/live-inject.mjs b/source/skills/impeccable/scripts/live-inject.mjs index 9bbc345ac..daf44cde8 100644 --- a/source/skills/impeccable/scripts/live-inject.mjs +++ b/source/skills/impeccable/scripts/live-inject.mjs @@ -137,8 +137,18 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); + // Inline pre-restore: runs before the external live.js is fetched. Sets + // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // during HTML parse, beating the browser's animated reload-restore. + // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). + const preRestore = + ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + + preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); From f0f2935547b0689a61eaf8029b2186f0d3bc3f89 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:48:13 -0700 Subject: [PATCH 078/125] fix(live): retry inline scroll-restore on fonts.ready and load scrollTo(y) clamps to the current document.scrollHeight, which is several hundred pixels short of the final value until async-loaded fonts swap in (Cormorant Garamond italic grew consulting-section layout by ~585px in the logs). The initial synchronous scroll was clamping to ~6165 even though the Go-time target was 6749.5. Retry on document.fonts.ready and on the window load event, both of which fire once the document reaches its final height. Co-Authored-By: Claude Opus 4.7 (1M context) --- .agents/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .claude/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .cursor/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .gemini/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .github/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .kiro/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .../skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .pi/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .rovodev/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .trae-cn/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- .trae/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- public/index.html | 14 ++++++++------ public/privacy.html | 2 +- source/skills/impeccable/scripts/live-inject.mjs | 13 +++++++++++-- 14 files changed, 141 insertions(+), 31 deletions(-) diff --git a/.agents/skills/impeccable/scripts/live-inject.mjs b/.agents/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.agents/skills/impeccable/scripts/live-inject.mjs +++ b/.agents/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.claude/skills/impeccable/scripts/live-inject.mjs b/.claude/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.claude/skills/impeccable/scripts/live-inject.mjs +++ b/.claude/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.cursor/skills/impeccable/scripts/live-inject.mjs b/.cursor/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.cursor/skills/impeccable/scripts/live-inject.mjs +++ b/.cursor/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.gemini/skills/impeccable/scripts/live-inject.mjs b/.gemini/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.gemini/skills/impeccable/scripts/live-inject.mjs +++ b/.gemini/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.github/skills/impeccable/scripts/live-inject.mjs b/.github/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.github/skills/impeccable/scripts/live-inject.mjs +++ b/.github/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.kiro/skills/impeccable/scripts/live-inject.mjs b/.kiro/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.kiro/skills/impeccable/scripts/live-inject.mjs +++ b/.kiro/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.opencode/skills/impeccable/scripts/live-inject.mjs b/.opencode/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.opencode/skills/impeccable/scripts/live-inject.mjs +++ b/.opencode/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.pi/skills/impeccable/scripts/live-inject.mjs b/.pi/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.pi/skills/impeccable/scripts/live-inject.mjs +++ b/.pi/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.rovodev/skills/impeccable/scripts/live-inject.mjs b/.rovodev/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.rovodev/skills/impeccable/scripts/live-inject.mjs +++ b/.rovodev/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.trae-cn/skills/impeccable/scripts/live-inject.mjs b/.trae-cn/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.trae-cn/skills/impeccable/scripts/live-inject.mjs +++ b/.trae-cn/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/.trae/skills/impeccable/scripts/live-inject.mjs b/.trae/skills/impeccable/scripts/live-inject.mjs index daf44cde8..37a16f1ea 100644 --- a/.trae/skills/impeccable/scripts/live-inject.mjs +++ b/.trae/skills/impeccable/scripts/live-inject.mjs @@ -138,14 +138,23 @@ function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY *synchronously* + // scrollRestoration='manual' and jumps to the saved scrollY synchronously // during HTML parse, beating the browser's animated reload-restore. + // + // Retries on fonts.ready and load are essential: scrollTo(y) clamps to + // the document's current scrollHeight, which is often hundreds of + // pixels short of the final value until async-loaded fonts swap in. // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). const preRestore = ''; + 'if(!isFinite(y))return;' + + 'var apply=function(){if(Math.abs(window.scrollY-y)>0.5)window.scrollTo(0,y);};' + + 'apply();' + + 'if(document.fonts&&document.fonts.ready)document.fonts.ready.then(apply);' + + 'window.addEventListener("load",apply,{once:true});' + + '}catch(e){}})();'; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + preRestore + '\n' + diff --git a/public/index.html b/public/index.html index 6c638efcc..06423fd5f 100644 --- a/public/index.html +++ b/public/index.html @@ -725,8 +725,9 @@ - -
    + + +
    @@ -735,7 +736,7 @@
    - -
    -
    - Renaissance Geek · Consulting -

    Work with me.

    -

    Enterprise rollouts, custom integrations, and training for designers and developers. Get in touch.

    -
    -
    -
    -
    - -
    -

    Work with me.

    -

    Impeccable is built by Renaissance Geek. Rollouts, integrations, training.

    -
    -
    -
    -
    -
    -

    Work
    with me.

    -

    Impeccable is built by Renaissance Geek. Large-scale rollouts, custom integrations, and training for teams raising the bar on AI-generated design.

    -
    -
    + + +
    +

    Work with me

    +

    Impeccable is built by Renaissance Geek. I work with enterprise teams on large-scale rollouts, custom integrations, and training for designers and developers. If you're a frontier lab, design tool company, or enterprise looking to raise the bar on AI-generated design, let's talk.

    - + + @@ -834,7 +785,6 @@ - diff --git a/public/privacy.html b/public/privacy.html index 817b152e4..4139e711e 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -78,7 +78,6 @@

    Questions about this policy? Open an issue on GitHub or reach out to @pbakaus.

    - diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 71ec5ab75..109d0d58e 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -121,15 +121,23 @@ } // Pre-empt the browser: apply manual scroll restoration and jump to the - // saved scrollY at script-parse time (before DOMContentLoaded). If we - // wait until init(), the browser has already begun animating its own - // restore — especially bad when `scroll-behavior: smooth` is set on html. + // saved scrollY at script-parse time. Retries on fonts.ready and load + // are essential: scrollTo(y) clamps to the current document.scrollHeight, + // which is often hundreds of pixels short of the final value until + // async-loaded fonts swap in and reflow. try { history.scrollRestoration = 'manual'; const savedY = readScrollY(); - if (savedY != null && Math.abs(window.scrollY - savedY) > 0.5) { - console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); - window.scrollTo({ top: savedY, left: 0, behavior: 'instant' }); + if (savedY != null) { + const apply = () => { + if (Math.abs(window.scrollY - savedY) > 0.5) { + console.log('[impeccable.scroll] early restore', { from: window.scrollY, to: savedY }); + window.scrollTo(0, savedY); + } + }; + apply(); + if (document.fonts?.ready) document.fonts.ready.then(apply).catch(() => {}); + window.addEventListener('load', apply, { once: true }); } } catch {} diff --git a/source/skills/impeccable/scripts/live-inject.mjs b/source/skills/impeccable/scripts/live-inject.mjs index 37a16f1ea..9bbc345ac 100644 --- a/source/skills/impeccable/scripts/live-inject.mjs +++ b/source/skills/impeccable/scripts/live-inject.mjs @@ -137,27 +137,8 @@ function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; } function buildTagBlock(syntax, port) { const open = commentOpen(syntax); const close = commentClose(syntax); - // Inline pre-restore: runs before the external live.js is fetched. Sets - // scrollRestoration='manual' and jumps to the saved scrollY synchronously - // during HTML parse, beating the browser's animated reload-restore. - // - // Retries on fonts.ready and load are essential: scrollTo(y) clamps to - // the document's current scrollHeight, which is often hundreds of - // pixels short of the final value until async-loaded fonts swap in. - // Hardcoded key matches live-browser.js: PREFIX ('impeccable-live') + - // LS_KEY suffix ('-session') + SCROLL_KEY_SUFFIX ('-scroll'). - const preRestore = - ''; return ( open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' + - preRestore + '\n' + '\n' + open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n' ); From 7e473e48d0092f3d50d22c0b2eed16f77171347f Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 10:57:24 -0700 Subject: [PATCH 080/125] fix(site): instant hash restore, retry on fonts.ready + load, drop smooth-scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three related site scroll bugs: 1. initAnchorScroll and initHashTracking both called scrollTo with `behavior: 'auto'`, which defers to CSS `scroll-behavior`. Because sub-pages.css set `html { scroll-behavior: smooth }`, every anchor jump and reload-hash-restore animated — despite a code comment explicitly stating "Instant anchor scroll — no smooth scrolling". Switch to `behavior: 'instant'` so the JS wins. 2. The reload-hash restore used a fixed `setTimeout(100)` to compute target position. At 100ms, async Google Fonts (Cormorant Garamond italic) has not swapped in, so `getBoundingClientRect().top` is computed against fallback metrics and mislanded by hundreds of pixels. Retry on `document.fonts.ready` and on window `load`. 3. Remove `scroll-behavior: smooth` from sub-pages.css entirely — it was silently fighting the JS and made long-page anchor clicks feel sluggish. --- public/css/sub-pages.css | 5 ++--- public/js/utils/scroll.js | 28 ++++++++++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/public/css/sub-pages.css b/public/css/sub-pages.css index c4be084bd..cde466469 100644 --- a/public/css/sub-pages.css +++ b/public/css/sub-pages.css @@ -37,9 +37,8 @@ BASE ============================================ */ -html { - scroll-behavior: smooth; -} +/* No smooth scroll — long editorial pages feel slow on anchor jumps, and + a secretly-smooth CSS rule also overrides JS `behavior: 'auto'` calls. */ body { font-family: var(--font-body); diff --git a/public/js/utils/scroll.js b/public/js/utils/scroll.js index ebe48b5a3..2e149e86f 100644 --- a/public/js/utils/scroll.js +++ b/public/js/utils/scroll.js @@ -1,14 +1,15 @@ -// Instant anchor scroll - no smooth scrolling for better UX on long pages +// Instant anchor scroll - no smooth scrolling for better UX on long pages. +// `behavior: 'instant'` explicitly overrides any CSS `scroll-behavior: smooth` +// from a stylesheet we don't own; `behavior: 'auto'` would defer to CSS. export function initAnchorScroll() { document.querySelectorAll('a[href^="#"]').forEach((anchor) => { anchor.addEventListener("click", (e) => { e.preventDefault(); const target = document.querySelector(anchor.getAttribute("href")); if (target) { - // Instant jump with small offset for visual breathing room const offset = 40; const targetPosition = target.getBoundingClientRect().top + window.scrollY - offset; - window.scrollTo({ top: targetPosition, behavior: 'auto' }); + window.scrollTo({ top: targetPosition, behavior: 'instant' }); } }); }); @@ -75,22 +76,29 @@ export function initHashTracking() { } }, { passive: true }); - // Handle initial hash on page load - instant jump + // Handle initial hash on page load — instant jump, retried on + // fonts.ready and window `load`. A fixed setTimeout is unreliable + // because async-loaded display fonts reflow the page by hundreds of + // pixels when they swap in; computing target position before that + // lands the user several sections above the right spot. if (window.location.hash) { const hash = window.location.hash.slice(1); const target = document.getElementById(hash); if (target) { currentHash = hash; - setTimeout(() => { + let clicked = false; + const jump = () => { const offset = 40; const targetPosition = target.getBoundingClientRect().top + window.scrollY - offset; - window.scrollTo({ top: targetPosition, behavior: 'auto' }); - - // If it's a command deep link, activate it - if (hash.startsWith('cmd-') && target.classList.contains('manual-entry')) { + window.scrollTo({ top: targetPosition, behavior: 'instant' }); + if (!clicked && hash.startsWith('cmd-') && target.classList.contains('manual-entry')) { target.click(); + clicked = true; } - }, 100); + }; + jump(); + if (document.fonts?.ready) document.fonts.ready.then(jump).catch(() => {}); + window.addEventListener('load', jump, { once: true }); } } else { // No hash — don't set one on initial load From 549f92577c0d551e60e1713487ff8974d6e6a335 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 11:28:19 -0700 Subject: [PATCH 081/125] feat(site): v3.0 changelog expansion, pin FAQ, stale-ref cleanup - v3.0 changelog now covers 6 items (was 2): Live Mode, PRODUCT.md, DESIGN.md (with Google Stitch spec compliance), brand/product registers, plus the existing consolidation + pin/unpin. - New FAQ entry answering "how do I get /critique back" via pinning. - Added Pin commands back as shortcuts section to /docs/impeccable editorial so it's findable outside the FAQ. - Reduced changelog item font size (0.9375rem) to match length. - Swept user-facing copy: .impeccable.md -> PRODUCT.md, removed three stale npx impeccable live references (the CLI subcommand no longer exists; live is /impeccable live inside the skill). - Historical v1.5.0 changelog entry preserved as-is (period-accurate). --- content/site/skills/clarify.md | 4 +-- content/site/skills/colorize.md | 2 +- content/site/skills/delight.md | 4 +-- content/site/skills/impeccable.md | 21 +++++++++++++- content/site/skills/typeset.md | 2 +- .../site/tutorials/critique-with-overlay.md | 5 ++-- content/site/tutorials/getting-started.md | 8 +++--- public/css/workflow.css | 5 ++-- public/index.html | 28 +++++++++++++++---- public/js/demo-renderer.js | 2 +- public/privacy.html | 3 -- 11 files changed, 58 insertions(+), 26 deletions(-) diff --git a/content/site/skills/clarify.md b/content/site/skills/clarify.md index 47d7f3298..276c6a805 100644 --- a/content/site/skills/clarify.md +++ b/content/site/skills/clarify.md @@ -19,7 +19,7 @@ The skill rewrites text across the surfaces where most UX copy problems live: 5. **Tooltips and helper text**: add information the label cannot carry, never restate it. 6. **Confirmation dialogs**: name the consequences, not the action. -The skill uses the audience and mental state from `.impeccable.md` to tune voice. Technical audience gets precise language. Consumer audience gets plain speech. Rushed users get short text. Anxious users (payment, delete) get reassurance. +The skill uses the audience and mental state from `PRODUCT.md` to tune voice. Technical audience gets precise language. Consumer audience gets plain speech. Rushed users get short text. Anxious users (payment, delete) get reassurance. ## Try it @@ -38,5 +38,5 @@ Before and after, typical: ## Pitfalls - **Writing cleverer, not clearer.** Clarify is not for voice upgrades. If the copy is already clear, do not reach for this skill. Use `/impeccable delight` instead when you want personality. -- **Skipping the audience question.** Clarify needs to know who is reading. If `.impeccable.md` does not specify audience technical level, the rewrites will be generic. +- **Skipping the audience question.** Clarify needs to know who is reading. If `PRODUCT.md` does not specify audience technical level, the rewrites will be generic. - **Running clarify on marketing copy.** Clarify is for functional UX text: labels, errors, instructions. Marketing copy needs a different set of moves and a human writer. diff --git a/content/site/skills/colorize.md b/content/site/skills/colorize.md index 9dbb52598..0cfdf57c1 100644 --- a/content/site/skills/colorize.md +++ b/content/site/skills/colorize.md @@ -33,6 +33,6 @@ Expected diff: ## Pitfalls -- **Running it without a brand hue.** Colorize needs a starting point. If `.impeccable.md` does not specify one, it will ask. Do not let it pick from the AI color palette defaults. +- **Running it without a brand hue.** Colorize needs a starting point. If `PRODUCT.md` does not specify one, it will ask. Do not let it pick from the AI color palette defaults. - **Expecting it to fix the AI color palette problem.** If your design already has purple gradients and cyan neon, you need `/impeccable quieter` first, then colorize can rebuild. - **Using it on already-colorful interfaces.** That is a `/impeccable quieter` job. Colorize adds, it does not subtract. diff --git a/content/site/skills/delight.md b/content/site/skills/delight.md index 8d7d913c4..ba982ea1e 100644 --- a/content/site/skills/delight.md +++ b/content/site/skills/delight.md @@ -18,7 +18,7 @@ The skill hunts for delight opportunities in the places most designers skip: 4. **Microcopy**: button labels, tooltips, error messages, placeholder text. Tiny copy with taste. 5. **Easter eggs and secondary states**: things users discover that reward paying attention. -The skill reads the brand tone from `.impeccable.md`. A serious analytics tool gets serious delight (dry, precise, a little clever). A playful consumer app gets more overt personality. It does not force humor where humor is wrong for the audience. +The skill reads the brand tone from `PRODUCT.md`. A serious analytics tool gets serious delight (dry, precise, a little clever). A playful consumer app gets more overt personality. It does not force humor where humor is wrong for the audience. The rule is: every delight moment must still work perfectly if you delete the delight. Nothing depends on the smile. @@ -37,6 +37,6 @@ Expected additions: ## Pitfalls -- **Forcing humor.** Not every brand is playful. If the brand voice in `.impeccable.md` is "clinical and precise", delight adds clever restraint, not jokes. +- **Forcing humor.** Not every brand is playful. If the brand voice in `PRODUCT.md` is "clinical and precise", delight adds clever restraint, not jokes. - **Over-decorating.** One moment of delight is memorable. Twenty becomes noise. The skill is conservative on purpose. - **Running delight before polish.** Polish fixes what is wrong. Delight adds what is missing. In that order. diff --git a/content/site/skills/impeccable.md b/content/site/skills/impeccable.md index 94e97cbae..d8f3474a8 100644 --- a/content/site/skills/impeccable.md +++ b/content/site/skills/impeccable.md @@ -18,7 +18,7 @@ For more structured flows, reach for the specialized commands in the sidebar. `/ Most AI-generated UIs fail the same way: generic fonts, purple gradients, card grids on card grids, glassmorphism everywhere. `/impeccable` gives your AI a strong point of view. It loads an opinionated design handbook plus a long list of anti-patterns, then pushes the model to commit to a specific aesthetic direction before writing a single line of code. -The skill has a **Context Gathering Protocol** built in. It will not design anything until it knows who uses the product, what they're trying to do, and how the interface should feel. On first use in a project, it runs the `teach` flow automatically: a short interview about your brand, audience, and aesthetic direction, saved to `.impeccable.md` so every future command reads it without asking again. +The skill has a **Context Gathering Protocol** built in. It will not design anything until it knows who uses the product, what they're trying to do, and how the interface should feel. On first use in a project, it runs the `teach` flow automatically: a short interview about your brand, audience, and aesthetic direction, saved to `PRODUCT.md` so every future command reads it without asking again. ## Try it @@ -32,6 +32,25 @@ The skill has a **Context Gathering Protocol** built in. It will not design anyt Both prompts are vague on purpose. `/impeccable` will pick a strong aesthetic direction, commit to non-default fonts, avoid the AI color palette, and make the kind of specific choices that a designer would make. No command name to pick first, no step-by-step workflow to follow. +## Pin commands back as shortcuts + +v3.0 consolidated 18 standalone skills into a single `/impeccable` with sub-commands. If you miss the short form of a specific command, pin it back: + +``` +/impeccable pin critique +``` + +From now on, `/critique` invokes `/impeccable critique` directly. It writes a lightweight redirect skill that delegates to the parent, so updates to the skill flow through without re-pinning. + +Useful pins to try: + +- `/impeccable pin polish` for final-pass work +- `/impeccable pin audit` for deterministic a11y/perf checks +- `/impeccable pin live` for the browser iteration flow +- `/impeccable pin critique` for design review + +To remove: `/impeccable unpin critique`. Pins live as directories prefixed with `i-` in your harness skills folder (`.claude/skills/i-critique/`, `.cursor/skills/i-critique/`, etc.), so you can also delete them manually. + ## Pitfalls - **Treating it like a style guide.** It is an opinionated design partner, not a linter. The defaults exist to raise the floor, not to overrule your judgment. If you have a real reason to push back (brand guideline, accessibility constraint, user research that says otherwise), push back and explain why. The skill will work with you. What produces worse output is ignoring the opinion without a reason. diff --git a/content/site/skills/typeset.md b/content/site/skills/typeset.md index 0bfc1aad8..8c31a0864 100644 --- a/content/site/skills/typeset.md +++ b/content/site/skills/typeset.md @@ -37,6 +37,6 @@ Expected diff: ## Pitfalls -- **Asking for a new font without context.** Typeset will pick based on the `.impeccable.md` brand voice. If you have not run `/impeccable teach`, the suggestion will be generic. +- **Asking for a new font without context.** Typeset will pick based on the `PRODUCT.md` brand voice. If you have not run `/impeccable teach`, the suggestion will be generic. - **Reaching for typeset when the issue is layout.** If paragraphs are fine but the page feels cramped, you want `/impeccable layout`. - **Expecting fluid clamp scales on app UIs.** Typeset uses fixed rem scales for app interfaces. Fluid typography is for marketing and content pages where line length varies dramatically. diff --git a/content/site/tutorials/critique-with-overlay.md b/content/site/tutorials/critique-with-overlay.md index e370d14ca..7bb71304f 100644 --- a/content/site/tutorials/critique-with-overlay.md +++ b/content/site/tutorials/critique-with-overlay.md @@ -29,7 +29,7 @@ The skill kicks off two independent assessments in parallel. They run in separat ### What the LLM assessment does -The first assessment reads your source code and, if browser automation is available, opens the live page in a new tab. It walks the full impeccable skill DO/DON'T catalog and scores the page against Nielsen's 10 heuristics, the 8-item cognitive load checklist, and the brand fit from your `.impeccable.md`. +The first assessment reads your source code and, if browser automation is available, opens the live page in a new tab. It walks the full impeccable skill DO/DON'T catalog and scores the page against Nielsen's 10 heuristics, the 8-item cognitive load checklist, and the brand fit from your `PRODUCT.md`. It labels the tab it opens with `[LLM]` in the title so you can tell which one is which. @@ -55,11 +55,10 @@ Impeccable ships with a visual mode that highlights every detected anti-pattern Every outlined element has a floating label naming the rule that fired. Hover an outline to see the full finding. This is exactly what you will see on your own page. -You have three ways to open it: +You have two ways to open it: 1. **[Chrome extension](https://chromewebstore.google.com/detail/impeccable/bdkgmiklpdmaojlpflclinlofgjfpabf)**: one-click activation on any page. Click the Impeccable icon in the toolbar and every anti-pattern gets highlighted instantly. 2. **Inside `/impeccable critique`**: the skill opens a browser tab labeled `[Human]` with the detector active during the browser portion of the assessment. You do not need to do anything extra. -3. **Standalone CLI**: `npx impeccable live` starts a local server that serves the detector script. You inject it into any page by adding a ` - - - diff --git a/public/js/demo-renderer.js b/public/js/demo-renderer.js index 8d6121489..bd7061118 100644 --- a/public/js/demo-renderer.js +++ b/public/js/demo-renderer.js @@ -124,7 +124,7 @@ export function renderCommandDemo(commandId) {
    3. Save
    - Writes a .impeccable.md file with users, brand, aesthetic direction, and design principles. Every future command reads it automatically. + Writes a PRODUCT.md file with users, brand, aesthetic direction, and design principles. Every future command reads it automatically.
    Run once per project. Then forget it exists.
    diff --git a/public/privacy.html b/public/privacy.html index 4139e711e..3a41097f0 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -77,8 +77,5 @@

    Contact

    Questions about this policy? Open an issue on GitHub or reach out to @pbakaus.

    - - - From d03dca1209a41940324d61bb6751b679a0c796a8 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 11:52:40 -0700 Subject: [PATCH 082/125] fix(site): restore Antidote section with curated anti-pattern list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DO/DONT extractor in readPatterns stopped finding anything after the skill went human-authored (new SKILL.md uses plain bullets, one-word section headings, no DO:/DON'T: prefixes). Replace the extractor with a hand-curated category list: six categories, three or four DOs and DON'Ts each. Editorial tone, tight, deliberately a teaser — the full catalog still lives on /anti-patterns. The legacy SKILL.md parser is retained in the file as _legacyReadPatterns in case we want to revive it later with a different format. Small CSS fix: .faq-question was display:flex with justify-content: space-between, so inline in a summary got treated as its own flex item and pushed apart. Switched to relative+absolute positioning so the + icon sits in the right margin and text flows naturally. Changelog font size reduced to 0.9375rem for the expanded v3.0 entry. New FAQ entry on pinning standalone commands back. Pin section added to /docs/impeccable editorial. --- public/css/workflow.css | 12 ++--- scripts/lib/utils.js | 97 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 6 deletions(-) diff --git a/public/css/workflow.css b/public/css/workflow.css index 55da43f0f..cbdf3c5cf 100644 --- a/public/css/workflow.css +++ b/public/css/workflow.css @@ -1247,12 +1247,10 @@ font-size: 1.125rem; font-weight: 500; color: var(--color-ink); - padding: var(--spacing-md) 0; + padding: var(--spacing-md) calc(var(--spacing-md) + 1.5rem) var(--spacing-md) 0; cursor: pointer; list-style: none; - display: flex; - align-items: center; - justify-content: space-between; + position: relative; transition: color 0.2s ease; } @@ -1267,10 +1265,14 @@ font-weight: 300; color: var(--color-accent); transition: transform 0.3s var(--ease-out); + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); } .faq-item[open] .faq-question::after { - transform: rotate(45deg); + transform: translateY(-50%) rotate(45deg); } .faq-question:hover { diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 9f1c1d764..9c060894a 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -226,7 +226,102 @@ export function writeFile(filePath, content) { * * Returns { patterns: [...], antipatterns: [...] } */ -export function readPatterns(rootDir, relativePath = 'source/skills/impeccable/SKILL.md') { +// Curated short-list for the homepage Antidote section. Intentionally +// hand-written (not auto-extracted) so the copy stays tight and +// editorial. The long-form catalog lives on /anti-patterns — this is +// the teaser. +const CURATED_CATEGORIES = [ + { + name: 'Typography', + do: [ + 'Pair a distinctive display face with a restrained body face; vary across projects.', + 'Use a ≥1.25 scale ratio between hierarchy steps. Flat scales read as bland.', + 'Cap body line length at 65–75ch. Wider is fatiguing.', + ], + dont: [ + 'Inter, Roboto, Plex, Fraunces, or any other reflex default. Look further.', + 'Monospace as lazy shorthand for "technical."', + 'Long passages in uppercase. Reserve all-caps for short labels.', + ], + }, + { + name: 'Color & Contrast', + do: [ + 'Use OKLCH. Reduce chroma near lightness extremes.', + 'Tint neutrals toward the brand hue. Chroma 0.005–0.01 is enough.', + 'Pick a color strategy before picking colors (Restrained, Committed, Full, Drenched).', + ], + dont: [ + 'Pure #000 or #fff. Always tint.', + 'Dark mode + purple-to-cyan gradients. The AI tell.', + 'Gradient text via background-clip. Use weight or size for emphasis.', + ], + }, + { + name: 'Layout & Space', + do: [ + 'Vary spacing for rhythm. Tight groupings, generous separations.', + 'Use the simplest tool: Flexbox for 1D, Grid for 2D, plain flow often enough.', + 'Let whitespace carry hierarchy before reaching for color or scale.', + ], + dont: [ + 'Wrap everything in cards. Nested cards are always wrong.', + 'Identical card grids of icon + heading + text, repeated endlessly.', + 'The hero-metric template: big number, small label, supporting stats, gradient accent.', + ], + }, + { + name: 'Visual Details', + do: [ + 'Commit to an aesthetic direction and execute it with precision.', + 'Use ornament only where it earns its place.', + ], + dont: [ + 'Side-stripe borders (border-left/-right > 1px). The dashboard tell.', + 'Glassmorphism everywhere. Rare and purposeful or nothing.', + 'Rounded rectangles with generic drop shadows. "Could be any AI output."', + ], + }, + { + name: 'Motion', + do: [ + 'Use transform and opacity. Animate the composited properties only.', + 'Ease out with exponential curves (quart / quint / expo).', + 'Respect prefers-reduced-motion on every transition.', + ], + dont: [ + 'Animate layout (width, height, padding, margin).', + 'Bounce or elastic easing. Feels dated and tacky.', + 'Decorative motion for its own sake. Motion should signal state.', + ], + }, + { + name: 'Interaction', + do: [ + 'Use optimistic UI: update immediately, sync later.', + 'Design empty states that teach the interface, not just say "nothing here."', + 'Progressive disclosure: start simple, reveal sophistication on demand.', + ], + dont: [ + 'Make every button primary. Hierarchy matters.', + 'Default to a modal. Exhaust inline alternatives first.', + 'Repeat information the user can already see.', + ], + }, +]; + +export function readPatterns(_rootDir, _relativePath) { + // Hand-curated list — see CURATED_CATEGORIES above. The homepage + // Antidote teaser uses this; the full catalog lives on /anti-patterns. + return { + patterns: CURATED_CATEGORIES.map((c) => ({ name: c.name, items: c.do })), + antipatterns: CURATED_CATEGORIES.map((c) => ({ name: c.name, items: c.dont })), + }; +} + +// Previous SKILL.md parser retained below but disabled; kept as a +// reference for how prefix-style extraction used to work. +function _legacyReadPatterns(rootDir, relativePath = 'source/skills/impeccable/SKILL.md') { const skillPath = path.join(rootDir, relativePath); if (!fs.existsSync(skillPath)) { From e631074a65801bd407bdd68b4ad3ef2e12c78762 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 11:59:02 -0700 Subject: [PATCH 083/125] feat(site): Why Impeccable section with tabbed feature loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New section 04 with a vertical tab list on the left and a panel on the right. Seven items covering the actual differentiators: 1. Intentional design — PRODUCT.md + DESIGN.md + shape as the opposite of one-shot-mock tools. 2. Brand and product, both — the register split, called out against frontend-design-style single-mode skills. 3. Production codebases — reads your design system, daily-driver. 4. Where you code — IDE-native, no canvas, no handoff. 5. DESIGN.md — Google Stitch spec-compliant, interoperable. 6. CI/CD-ready — CLI + JSON output for PR gates. 7. Chrome extension — 25 checks, one click, any page. Section numbers bumped: Visual 04→05, Install 05→06, Changelog 06→07, FAQ 07→08. Sticky nav updated to match. Arrow-key tab navigation, aria-selected, hidden attr on inactive panels, subtle fade on switch, respects prefers-reduced-motion. Vertical layout on desktop, stacked on mobile. --- public/app.js | 35 +++++++ public/css/workflow.css | 207 ++++++++++++++++++++++++++++++++++++++++ public/index.html | 88 +++++++++++++++-- 3 files changed, 320 insertions(+), 10 deletions(-) diff --git a/public/app.js b/public/app.js index 1b54a7054..397fdc563 100644 --- a/public/app.js +++ b/public/app.js @@ -214,11 +214,46 @@ function init() { initFrameworkViz(); initFoundationGrid(); initSectionNav(); + initWhyTabs(); loadContent(); document.body.classList.add("loaded"); } +function initWhyTabs() { + const container = document.querySelector('.why-layout'); + if (!container) return; + const tabs = Array.from(container.querySelectorAll('.why-tab')); + const panels = Array.from(container.querySelectorAll('.why-panel')); + if (!tabs.length || !panels.length) return; + + const activate = (index) => { + tabs.forEach((tab, i) => { + const on = i === index; + tab.classList.toggle('is-active', on); + tab.setAttribute('aria-selected', on ? 'true' : 'false'); + }); + panels.forEach((panel, i) => { + const on = i === index; + panel.classList.toggle('is-active', on); + if (on) panel.removeAttribute('hidden'); + else panel.setAttribute('hidden', ''); + }); + }; + + tabs.forEach((tab, index) => { + tab.addEventListener('click', () => activate(index)); + tab.addEventListener('keydown', (e) => { + if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp') return; + e.preventDefault(); + const dir = e.key === 'ArrowDown' ? 1 : -1; + const next = (index + dir + tabs.length) % tabs.length; + tabs[next].focus(); + activate(next); + }); + }); +} + if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", init); } else { diff --git a/public/css/workflow.css b/public/css/workflow.css index cbdf3c5cf..7101f8814 100644 --- a/public/css/workflow.css +++ b/public/css/workflow.css @@ -1366,3 +1366,210 @@ transform: translateY(0); } } + +/* ============================================ + WHY IMPECCABLE — tabbed feature loop + ============================================ */ + +.why-section { + padding: var(--spacing-3xl) 0; + max-width: var(--width-max); + margin: 0 auto; + padding-left: var(--spacing-xl); + padding-right: var(--spacing-xl); +} + +.why-content .section-lead { + max-width: 42ch; + margin-bottom: var(--spacing-2xl); +} + +.why-layout { + display: grid; + grid-template-columns: minmax(280px, 360px) 1fr; + gap: var(--spacing-2xl); + align-items: start; +} + +.why-tabs { + list-style: none; + padding: 0; + margin: 0; + display: flex; + flex-direction: column; + gap: 0; + border-top: 1px solid var(--color-mist); +} + +.why-tabs li { + border-bottom: 1px solid var(--color-mist); +} + +.why-tab { + display: grid; + grid-template-columns: 40px 1fr; + gap: var(--spacing-sm); + align-items: baseline; + width: 100%; + padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 0; + background: transparent; + border: 0; + border-left: 2px solid transparent; + padding-left: var(--spacing-sm); + cursor: pointer; + text-align: left; + font-family: var(--font-body); + color: var(--color-ash); + transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out); +} + +.why-tab-num { + font-family: var(--font-mono); + font-size: 0.6875rem; + letter-spacing: 0.18em; + color: var(--color-ash); + transition: color 180ms var(--ease-out); +} + +.why-tab-label { + font-family: var(--font-display); + font-size: 1.125rem; + font-weight: 400; + line-height: 1.2; +} + +.why-tab:hover { + color: var(--color-ink); +} + +.why-tab:hover .why-tab-num { + color: var(--color-charcoal); +} + +.why-tab.is-active { + color: var(--color-ink); + border-left-color: var(--color-accent); +} + +.why-tab.is-active .why-tab-num { + color: var(--color-accent); +} + +.why-tab:focus-visible { + outline: 2px solid var(--color-accent); + outline-offset: 2px; +} + +.why-panels { + position: relative; + min-height: 280px; + padding-left: var(--spacing-md); +} + +.why-panel { + display: none; + max-width: 60ch; + animation: whyFadeIn 260ms var(--ease-out); +} + +.why-panel.is-active { + display: block; +} + +.why-panel-title { + font-family: var(--font-display); + font-style: italic; + font-weight: 400; + font-size: clamp(1.75rem, 3vw, 2.5rem); + line-height: 1.1; + color: var(--color-ink); + margin: 0 0 var(--spacing-md); + letter-spacing: -0.01em; +} + +.why-panel-body { + font-family: var(--font-body); + font-size: 1.0625rem; + line-height: 1.65; + color: var(--color-charcoal); + margin: 0 0 var(--spacing-md); +} + +.why-panel-body em { + font-style: italic; + color: var(--color-ink); + font-weight: 500; +} + +.why-panel-body a { + color: var(--color-ink); + text-decoration: underline; + text-underline-offset: 3px; + text-decoration-color: var(--color-accent); +} + +.why-panel-body a:hover { + color: var(--color-accent); +} + +.why-panel-body code { + font-family: var(--font-mono); + font-size: 0.875em; + background: var(--color-mist); + padding: 2px 6px; + border-radius: 3px; + color: var(--color-ink); +} + +.why-panel-meta { + font-family: var(--font-mono); + font-size: 0.75rem; + letter-spacing: 0.05em; + color: var(--color-ash); + margin: var(--spacing-md) 0 0; +} + +.why-panel-meta code { + font-family: var(--font-mono); + font-size: 0.875em; + color: var(--color-charcoal); +} + +.why-panel-meta a { + color: var(--color-ink); + text-decoration: underline; + text-underline-offset: 3px; + text-decoration-color: var(--color-accent); +} + +.why-panel-meta a:hover { color: var(--color-accent); } + +@keyframes whyFadeIn { + from { opacity: 0; transform: translateY(6px); } + to { opacity: 1; transform: translateY(0); } +} + +@media (prefers-reduced-motion: reduce) { + .why-panel { animation: none; } +} + +@media (max-width: 900px) { + .why-section { + padding-left: var(--spacing-md); + padding-right: var(--spacing-md); + } + .why-layout { + grid-template-columns: 1fr; + gap: var(--spacing-lg); + } + .why-panels { + padding-left: 0; + min-height: auto; + } + .why-tab-label { + font-size: 1rem; + } + .why-tab-num { + font-size: 0.625rem; + } +} diff --git a/public/index.html b/public/index.html index ebee82c22..df08eb076 100644 --- a/public/index.html +++ b/public/index.html @@ -75,10 +75,11 @@ 01Foundation 02Language 03Antidote - 04Visual - 05Install - 06New - 07FAQ + 04Why + 05Visual + 06Install + 07New + 08FAQ @@ -286,10 +287,77 @@
    - -
    + +
    04 +

    Why Impeccable

    +
    +
    +

    Seven reasons this isn't another AI design tool.

    + +
    +
      +
    1. +
    2. +
    3. +
    4. +
    5. +
    6. +
    7. +
    + +
    +
    +

    Design that knows who it's for.

    +

    Most AI tools one-shot a plausible-looking mock. Impeccable starts with a conversation: audience, brand personality, anti-references, aesthetic direction. It captures the answer in PRODUCT.md and DESIGN.md and loads them on every command. The output is design that fits the actual business, not a generic impression of one.

    +

    /impeccable teach · /impeccable document · /impeccable shape

    +
    + + + + + + + + + + + + +
    +
    +
    +
    + + +
    +
    + 05

    Visual Mode

    @@ -330,7 +398,7 @@
    - 05 + 06

    Get Started

    @@ -505,7 +573,7 @@
    - 06 + 07

    What's New

    @@ -650,10 +718,10 @@
    - +
    - 07 + 08

    Frequently Asked Questions

    From 03a1953ba7eef2c4e980b775a1312563ca99a764 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Apr 2026 12:05:19 -0700 Subject: [PATCH 084/125] feat(site): add visuals + auto-rotate to Why Impeccable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-panel storytelling visualizations, pure HTML/CSS, no image assets: - 01 Intentional design: "Generic AI" dark/purple gradient card vs. warm editorial card with /impeccable vocabulary side by side. - 02 Brand and product, both: tiny brand mock (italic display headline) vs. product mock (mono/stats rows). - 03 Production codebases: dark terminal showing /impeccable polish reading DESIGN.md tokens and component APIs. - 04 Where you code: prompt bar with blinking caret + 4×2 grid of harness logos (Claude, Cursor, Codex, Gemini, Copilot, Antigravity, Kiro, OpenCode). - 05 DESIGN.md: a file-view of the six Stitch sections with a "Stitch spec" badge, plus an interop tagline. - 06 CI/CD: terminal showing `impeccable detect` failing CI with three issues and exit 1. - 07 Chrome extension: browser chrome + floating extension popup listing detections and two magenta outline boxes over "page content". Auto-rotation: 7s per tab, pauses on hover, stops entirely on any click/keyboard interaction (user-initiated navigation wins). Thin magenta progress bar animates on the active tab's left accent as the rotation progresses. IntersectionObserver gates the whole timer so it only runs while the section is on screen. prefers-reduced-motion disables the auto-rotation and the progress animation. Dropped the "Seven reasons..." lead line. --- public/app.js | 76 +++++- public/css/workflow.css | 584 ++++++++++++++++++++++++++++++++++++++++ public/index.html | 144 +++++++++- 3 files changed, 792 insertions(+), 12 deletions(-) diff --git a/public/app.js b/public/app.js index 397fdc563..0de7d11db 100644 --- a/public/app.js +++ b/public/app.js @@ -227,11 +227,22 @@ function initWhyTabs() { const panels = Array.from(container.querySelectorAll('.why-panel')); if (!tabs.length || !panels.length) return; - const activate = (index) => { + const CYCLE_MS = 7000; + const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; + let current = 0; + let timer = null; + let autoRotate = !reducedMotion; + let visible = false; + + const activate = (index, fromAuto = false) => { + current = index; tabs.forEach((tab, i) => { const on = i === index; tab.classList.toggle('is-active', on); tab.setAttribute('aria-selected', on ? 'true' : 'false'); + // Reset cycling class, re-add on the new active tab so the + // progress indicator restarts cleanly. + tab.classList.remove('is-cycling'); }); panels.forEach((panel, i) => { const on = i === index; @@ -239,19 +250,80 @@ function initWhyTabs() { if (on) panel.removeAttribute('hidden'); else panel.setAttribute('hidden', ''); }); + if (autoRotate && visible) { + // Force reflow so the animation restart is picked up. + const active = tabs[index]; + void active.offsetWidth; + active.classList.add('is-cycling'); + } + }; + + const scheduleNext = () => { + clearTimeout(timer); + if (!autoRotate || !visible) return; + timer = setTimeout(() => { + const next = (current + 1) % tabs.length; + activate(next, true); + scheduleNext(); + }, CYCLE_MS); + }; + + const stopAuto = () => { + autoRotate = false; + clearTimeout(timer); + tabs.forEach((t) => t.classList.remove('is-cycling')); }; tabs.forEach((tab, index) => { - tab.addEventListener('click', () => activate(index)); + tab.addEventListener('click', () => { + stopAuto(); + activate(index); + }); tab.addEventListener('keydown', (e) => { if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp') return; e.preventDefault(); + stopAuto(); const dir = e.key === 'ArrowDown' ? 1 : -1; const next = (index + dir + tabs.length) % tabs.length; tabs[next].focus(); activate(next); }); }); + + container.addEventListener('mouseenter', () => { + // Pause auto-rotation on hover. Resume only if still allowed and + // user hasn't interacted (stopAuto flips autoRotate off). + clearTimeout(timer); + tabs.forEach((t) => t.classList.remove('is-cycling')); + }); + container.addEventListener('mouseleave', () => { + if (autoRotate && visible) { + // Re-apply cycling class to current tab and resume the timer. + const active = tabs[current]; + void active.offsetWidth; + active.classList.add('is-cycling'); + scheduleNext(); + } + }); + + // Observe visibility so we only rotate while the user can see it. + const io = new IntersectionObserver((entries) => { + entries.forEach((e) => { + visible = e.isIntersecting; + if (visible) { + if (autoRotate) { + const active = tabs[current]; + void active.offsetWidth; + active.classList.add('is-cycling'); + scheduleNext(); + } + } else { + clearTimeout(timer); + tabs.forEach((t) => t.classList.remove('is-cycling')); + } + }); + }, { threshold: 0.35 }); + io.observe(container); } if (document.readyState === "loading") { diff --git a/public/css/workflow.css b/public/css/workflow.css index 7101f8814..13d8f70d8 100644 --- a/public/css/workflow.css +++ b/public/css/workflow.css @@ -1573,3 +1573,587 @@ font-size: 0.625rem; } } + +/* ============================================ + WHY — per-panel visuals + auto-rotation + ============================================ */ + +.why-tab-progress { + position: absolute; + left: -2px; + top: 0; + bottom: 0; + width: 2px; + background: var(--color-accent); + transform-origin: top; + transform: scaleY(0); + pointer-events: none; + opacity: 0; + transition: opacity 180ms var(--ease-out); +} + +.why-tab { position: relative; } +.why-tab.is-active .why-tab-progress { opacity: 1; } +.why-tab.is-active.is-cycling .why-tab-progress { + animation: whyTabProgress var(--why-cycle-ms, 7000ms) linear forwards; +} + +@keyframes whyTabProgress { + from { transform: scaleY(0); } + to { transform: scaleY(1); } +} + +@media (prefers-reduced-motion: reduce) { + .why-tab.is-active.is-cycling .why-tab-progress { + animation: none; + transform: scaleY(1); + } +} + +/* Visual frame — common base */ +.why-visual { + background: var(--color-paper); + border: 1px solid var(--color-mist); + border-radius: 8px; + padding: var(--spacing-md); + margin-bottom: var(--spacing-md); + min-height: 240px; + display: flex; + align-items: stretch; + position: relative; + overflow: hidden; +} + +/* ─ Panel 01: Generic vs PRODUCT.md ─ */ +.why-visual--compare { + gap: var(--spacing-md); +} +.why-compare-card { + flex: 1; + display: flex; + flex-direction: column; + gap: 10px; + min-width: 0; +} +.why-compare-label { + font-family: var(--font-mono); + font-size: 0.625rem; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--color-ash); +} +.why-slop-card { + flex: 1; + background: linear-gradient(135deg, oklch(35% 0.14 280), oklch(55% 0.18 220)); + border-radius: 10px; + padding: 14px; + color: white; + display: flex; + flex-direction: column; + gap: 6px; + box-shadow: 0 20px 40px oklch(40% 0.14 270 / 0.25); +} +.why-slop-pill { + font-family: 'Inter', system-ui, sans-serif; + font-size: 9px; + font-weight: 700; + letter-spacing: 0.12em; + background: rgba(255, 255, 255, 0.2); + padding: 2px 6px; + border-radius: 999px; + align-self: flex-start; +} +.why-slop-title { + font-family: 'Inter', system-ui, sans-serif; + font-size: 14px; + font-weight: 700; + background: linear-gradient(135deg, #fff, #c4b5fd); + -webkit-background-clip: text; + background-clip: text; + color: transparent; + line-height: 1.1; +} +.why-slop-line { + height: 4px; + background: rgba(255, 255, 255, 0.15); + border-radius: 2px; +} +.why-slop-line--short { width: 60%; } +.why-slop-cta { + font-family: 'Inter', system-ui, sans-serif; + font-size: 10px; + font-weight: 600; + padding: 6px 10px; + background: rgba(255, 255, 255, 0.2); + border-radius: 6px; + align-self: flex-start; + margin-top: auto; +} +.why-impeccable-card { + flex: 1; + background: var(--color-cream); + border: 1px solid var(--color-mist); + padding: 14px; + display: flex; + flex-direction: column; + gap: 6px; +} +.why-impeccable-kicker { + font-family: var(--font-mono); + font-size: 9px; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--color-accent); +} +.why-impeccable-title { + font-family: var(--font-display); + font-size: 22px; + line-height: 1.05; + color: var(--color-ink); +} +.why-impeccable-title em { + font-style: italic; + color: var(--color-accent); +} +.why-impeccable-line { + height: 4px; + background: var(--color-mist); + border-radius: 2px; +} +.why-impeccable-line--short { width: 55%; } +.why-impeccable-cta { + font-family: var(--font-body); + font-size: 11px; + font-weight: 500; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--color-ink); + border-bottom: 1.5px solid var(--color-ink); + align-self: flex-start; + margin-top: auto; + padding-bottom: 3px; +} + +/* ─ Panel 02: Brand vs Product registers ─ */ +.why-visual--registers { + gap: var(--spacing-md); +} +.why-register { + flex: 1; + display: flex; + flex-direction: column; + gap: 10px; + min-width: 0; +} +.why-register-label { + font-family: var(--font-mono); + font-size: 0.625rem; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--color-accent); +} +.why-register-mock { + flex: 1; + border-radius: 6px; + padding: 18px; + display: flex; + flex-direction: column; + justify-content: center; +} +.why-register-mock--brand { + background: var(--color-cream); + border: 1px solid var(--color-mist); + gap: 12px; +} +.why-brand-hero-mono { + font-family: var(--font-mono); + font-size: 9px; + letter-spacing: 0.24em; + text-transform: uppercase; + color: var(--color-ash); +} +.why-brand-hero-title { + font-family: var(--font-display); + font-size: 28px; + line-height: 1; + color: var(--color-ink); + letter-spacing: -0.02em; +} +.why-brand-hero-title em { + font-style: italic; + color: var(--color-accent); +} +.why-register-mock--product { + background: var(--color-paper); + border: 1px solid var(--color-mist); + padding: 0; + gap: 0; +} +.why-product-row { + display: flex; + justify-content: space-between; + align-items: baseline; + padding: 10px 14px; + border-bottom: 1px solid var(--color-mist); +} +.why-product-row:last-child { border-bottom: 0; } +.why-product-k { + font-family: var(--font-mono); + font-size: 10px; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--color-ash); +} +.why-product-v { + font-family: var(--font-body); + font-size: 14px; + font-weight: 500; + color: var(--color-ink); +} + +/* ─ Panel 03: Terminal output ─ */ +.why-visual--terminal, +.why-visual--ci { + padding: 0; + background: oklch(12% 0 0); + border-color: oklch(18% 0 0); +} +.why-terminal { + width: 100%; + display: flex; + flex-direction: column; +} +.why-terminal-header { + display: flex; + align-items: center; + gap: 6px; + padding: 10px 14px; + border-bottom: 1px solid oklch(20% 0 0); + background: oklch(14% 0 0); + border-radius: 7px 7px 0 0; +} +.why-terminal-dot { + width: 10px; + height: 10px; + border-radius: 50%; + background: oklch(35% 0 0); +} +.why-terminal-title { + font-family: var(--font-mono); + font-size: 11px; + color: oklch(65% 0 0); + margin-left: 10px; +} +.why-terminal-body { + padding: 14px; + font-family: var(--font-mono); + font-size: 12px; + line-height: 1.7; + color: oklch(80% 0 0); +} +.why-terminal-line { white-space: pre; } +.why-terminal-line--prompt { color: oklch(90% 0 0); } +.why-terminal-prompt { color: var(--color-accent); margin-right: 4px; } +.why-terminal-ok { color: oklch(75% 0.15 145); } +.why-terminal-arrow { color: var(--color-accent); } +.why-terminal-line--hint { + margin-top: 6px; + color: oklch(90% 0 0); +} + +/* ─ Panel 04: Harness grid ─ */ +.why-visual--harnesses { + flex-direction: column; + padding: 16px; + gap: 14px; +} +.why-prompt-bar { + font-family: var(--font-mono); + font-size: 12px; + color: var(--color-ink); + background: var(--color-cream); + border: 1px solid var(--color-mist); + border-radius: 4px; + padding: 8px 12px; + display: flex; + align-items: center; + gap: 2px; +} +.why-prompt-slash { + color: var(--color-accent); + margin-right: 4px; + font-weight: 500; +} +.why-prompt-caret { + display: inline-block; + width: 7px; + height: 14px; + background: var(--color-accent); + margin-left: 2px; + animation: whyCaret 1.1s steps(1) infinite; +} +@keyframes whyCaret { + 0%, 50% { opacity: 1; } + 50.01%, 100% { opacity: 0; } +} +.why-harness-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 8px; + flex: 1; +} +.why-harness { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 6px; + padding: 10px 4px; + background: var(--color-cream); + border: 1px solid var(--color-mist); + border-radius: 6px; + font-family: var(--font-mono); + font-size: 9px; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-charcoal); +} +.why-harness img { + width: 24px; + height: 24px; + object-fit: contain; + opacity: 0.85; +} + +/* ─ Panel 05: DESIGN.md file ─ */ +.why-visual--designmd { + padding: 0; +} +.why-designmd-file { + flex: 1; + display: flex; + flex-direction: column; + background: var(--color-paper); + border-radius: 7px; +} +.why-designmd-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 14px; + border-bottom: 1px solid var(--color-mist); + background: var(--color-cream); + border-radius: 7px 7px 0 0; +} +.why-designmd-filename { + font-family: var(--font-mono); + font-size: 11px; + font-weight: 500; + color: var(--color-ink); +} +.why-designmd-badge { + font-family: var(--font-mono); + font-size: 9px; + letter-spacing: 0.15em; + text-transform: uppercase; + color: var(--color-accent); + background: var(--color-accent-dim); + border: 1px solid var(--color-accent-soft); + padding: 3px 8px; + border-radius: 999px; +} +.why-designmd-sections { + list-style: none; + padding: 10px 14px; + margin: 0; + display: flex; + flex-direction: column; + font-family: var(--font-mono); + font-size: 12px; + line-height: 2; + color: var(--color-ink); +} +.why-designmd-num { + color: var(--color-accent); + margin-right: 8px; + font-weight: 500; +} +.why-designmd-footer { + padding: 10px 14px; + border-top: 1px solid var(--color-mist); + font-family: var(--font-display); + font-style: italic; + font-size: 13px; + color: var(--color-charcoal); +} + +/* ─ Panel 06: CI output ─ */ +.why-ci-window { + width: 100%; + display: flex; + flex-direction: column; +} +.why-ci-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 14px; + border-bottom: 1px solid oklch(20% 0 0); + background: oklch(14% 0 0); + border-radius: 7px 7px 0 0; +} +.why-ci-branch { + font-family: var(--font-mono); + font-size: 11px; + color: oklch(75% 0 0); +} +.why-ci-status { + font-family: var(--font-mono); + font-size: 10px; + letter-spacing: 0.1em; + text-transform: uppercase; + padding: 2px 8px; + border-radius: 999px; +} +.why-ci-status--fail { + color: oklch(78% 0.18 25); + background: oklch(30% 0.15 25 / 0.3); +} +.why-ci-body { + padding: 14px; + font-family: var(--font-mono); + font-size: 12px; + line-height: 1.8; + color: oklch(80% 0 0); +} +.why-ci-line { color: oklch(85% 0 0); } +.why-ci-cmd { color: var(--color-accent); margin-right: 6px; } +.why-ci-issue { + display: flex; + align-items: baseline; + gap: 10px; + padding-left: 4px; + color: oklch(85% 0 0); +} +.why-ci-issue code { + background: transparent; + color: oklch(70% 0.12 220); + padding: 0; + font-size: 1em; +} +.why-ci-x { color: oklch(75% 0.18 25); } +.why-ci-summary { + margin-top: 8px; + padding-top: 8px; + border-top: 1px solid oklch(20% 0 0); + font-weight: 500; + color: oklch(85% 0 0); +} + +/* ─ Panel 07: Chrome extension ─ */ +.why-visual--extension { + padding: 0; + background: var(--color-cream); +} +.why-browser { + flex: 1; + display: flex; + flex-direction: column; + background: var(--color-paper); + border-radius: 7px; + overflow: hidden; +} +.why-browser-chrome { + display: flex; + align-items: center; + gap: 6px; + padding: 10px 14px; + background: var(--color-mist); + border-bottom: 1px solid oklch(86% 0 0); +} +.why-browser-dot { + width: 9px; + height: 9px; + border-radius: 50%; + background: oklch(75% 0 0); +} +.why-browser-url { + margin-left: 12px; + padding: 3px 10px; + background: var(--color-paper); + border-radius: 4px; + font-family: var(--font-mono); + font-size: 10px; + color: var(--color-charcoal); + flex: 1; +} +.why-browser-body { + flex: 1; + position: relative; + padding: 20px; + background: + linear-gradient(var(--color-cream), var(--color-cream)) padding-box, + repeating-linear-gradient(90deg, transparent 0 60px, var(--color-mist) 60px 61px); +} +.why-ext-popup { + position: absolute; + top: 16px; + right: 16px; + width: 180px; + background: var(--color-paper); + border: 1px solid var(--color-mist); + border-radius: 6px; + box-shadow: 0 8px 24px oklch(0% 0 0 / 0.12); + overflow: hidden; + z-index: 2; +} +.why-ext-popup-header { + font-family: var(--font-mono); + font-size: 10px; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--color-ink); + padding: 8px 12px; + background: var(--color-cream); + border-bottom: 1px solid var(--color-mist); +} +.why-ext-popup-row { + display: flex; + align-items: center; + gap: 8px; + padding: 6px 12px; + font-size: 11px; + color: var(--color-charcoal); + border-bottom: 1px solid var(--color-mist); +} +.why-ext-popup-row:last-child { border-bottom: 0; } +.why-ext-sev { + color: var(--color-accent); + font-weight: 600; +} +.why-ext-overlay-a, +.why-ext-overlay-b { + position: absolute; + border: 2px solid var(--color-accent); + border-radius: 4px; + pointer-events: none; +} +.why-ext-overlay-a { + left: 20px; + top: 30px; + width: 42%; + height: 36px; +} +.why-ext-overlay-b { + left: 20px; + bottom: 24px; + width: 30%; + height: 30px; +} + +/* Mobile */ +@media (max-width: 700px) { + .why-visual { min-height: 200px; } + .why-harness-grid { grid-template-columns: repeat(3, 1fr); } + .why-compare-card, .why-register { gap: 8px; } +} diff --git a/public/index.html b/public/index.html index df08eb076..efa700036 100644 --- a/public/index.html +++ b/public/index.html @@ -294,57 +294,181 @@

    Why Impeccable

    -

    Seven reasons this isn't another AI design tool.

    -
      -
    1. -
    2. -
    3. -
    4. -
    5. -
    6. -
    7. +
    8. +
    9. +
    10. +
    11. +
    12. +
    13. +
    +
    +
    + Generic AI output +
    +
    PRO
    +
    Boost your workflow
    +
    +
    +
    Get Started →
    +
    +
    +
    + With PRODUCT.md loaded +
    + Vol. 03 +
    Design with intent.
    +
    +
    +
    Read the brief →
    +
    +
    +

    Design that knows who it's for.

    Most AI tools one-shot a plausible-looking mock. Impeccable starts with a conversation: audience, brand personality, anti-references, aesthetic direction. It captures the answer in PRODUCT.md and DESIGN.md and loads them on every command. The output is design that fits the actual business, not a generic impression of one.

    /impeccable teach · /impeccable document · /impeccable shape

    -

    Browse the full catalog →

    -

    Works in Claude Code, Cursor, Codex, Gemini CLI, Antigravity, Kiro, OpenCode, and more.

    @@ -1155,9 +1154,8 @@ diff --git a/public/privacy.html b/public/privacy.html index dd8a16008..21421ef0e 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -33,8 +33,7 @@ diff --git a/public/sitemap.xml b/public/sitemap.xml index eda7a842d..638e3b3e6 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -22,17 +22,11 @@ 0.9 - https://impeccable.style/anti-patterns - 2026-04-10 + https://impeccable.style/slop + 2026-04-23 weekly 0.9 - - https://impeccable.style/visual-mode - 2026-04-10 - weekly - 0.8 - https://impeccable.style/tutorials 2026-04-10 diff --git a/scripts/build-sub-pages.js b/scripts/build-sub-pages.js index 36ca8a383..b29316d71 100644 --- a/scripts/build-sub-pages.js +++ b/scripts/build-sub-pages.js @@ -1,13 +1,14 @@ /** - * Generate static HTML files for /skills, /anti-patterns, /tutorials. + * Generate static HTML files for /docs, /slop, /tutorials, /live-mode, + * /designing. * * Called from both scripts/build.js (before buildStaticSite) and * server/index.js (at module load), so dev and prod share the same * code path and output shape. * - * Output lives under public/docs/, public/anti-patterns/, - * public/tutorials/, all gitignored. Bun's HTML loader picks them up - * the same way it picks up the hand-authored pages. + * Output lives under public/docs/, public/slop/, public/tutorials/, all + * gitignored. Bun's HTML loader picks them up the same way it picks up + * the hand-authored pages. */ import fs from 'node:fs'; @@ -425,31 +426,42 @@ function groupRulesBySection(rules) { } /** - * Render the anti-patterns sidebar: a table of contents of rule sections - * with per-section rule counts. Every entry anchor-jumps to the section - * in the main column. + * Render the /slop sidebar: a table of contents for the four top-level + * sections (See it / Try it live / The catalog / Run it yourself), with + * the catalog's per-section anchors nested under "The catalog". */ -function renderAntiPatternsSidebar(grouped) { - const entries = grouped.order +function renderSlopSidebar(grouped, gallerySize) { + const catalogEntries = grouped.order .filter((section) => grouped.bySection[section]?.length > 0) .map((section) => { const slug = slugify(section); const count = grouped.bySection[section].length; - return `
  • ${escapeHtml(section)}${count}
  • `; + return `
  • ${escapeHtml(section)}${count}
  • `; }) .join('\n'); + const catalogTotal = grouped.order + .reduce((sum, s) => sum + (grouped.bySection[s]?.length || 0), 0); + return ` -
    @@ -1244,61 +1334,6 @@ ${bodyHtml} `; } -/** - * Render the /anti-patterns main column content. - */ -function renderAntiPatternsMain(grouped, totalRules) { - let sectionsHtml = ''; - for (const section of grouped.order) { - const rules = grouped.bySection[section] || []; - if (rules.length === 0) continue; - const slug = slugify(section); - sectionsHtml += ` -
    -
    -

    ${escapeHtml(section)}

    -

    ${rules.length} ${rules.length === 1 ? 'rule' : 'rules'}

    -
    -
    -${rules.map(renderRuleCard).join('\n')} -
    -
    `; - } - - const detectedCount = grouped.order - .flatMap((s) => grouped.bySection[s] || []) - .filter((r) => r.layer !== 'llm').length; - const llmCount = totalRules - detectedCount; - - return ` -
    -
    -

    ${totalRules} rules

    -

    Anti-patterns

    -

    The full catalog of patterns /impeccable teaches against. ${detectedCount} are caught by a deterministic detector (npx impeccable detect or the browser extension). ${llmCount} can only be flagged by /impeccable critique's LLM review pass. Want to see them live on real pages? Try Visual Mode, or iterate past them on your own dev server with Live Mode.

    -
    - -
    - - How to read this - - -
    -

    AI slop rules flag the visible tells of AI-generated UIs. Quality rules flag general design mistakes that are not AI-specific but still hurt the work. Each rule also shows how it is detected:

    -
    -
    CLI
    Deterministic. Runs from npx impeccable detect on files, no browser required.
    -
    Browser
    Deterministic, but needs real browser layout. Runs via the browser extension or Puppeteer, not the plain CLI.
    -
    LLM only
    No deterministic detector. Caught by /impeccable critique during its LLM design review.
    -
    -
    -
    - -
    -${sectionsHtml} -
    -
    `; -} - /** * Entry point. Generates all sub-page HTML files. * @@ -1309,12 +1344,18 @@ export async function generateSubPages(rootDir) { const data = await buildSubPageData(rootDir); const outDirs = { docs: path.join(rootDir, 'public/docs'), - antiPatterns: path.join(rootDir, 'public/anti-patterns'), + slop: path.join(rootDir, 'public/slop'), tutorials: path.join(rootDir, 'public/tutorials'), - visualMode: path.join(rootDir, 'public/visual-mode'), liveMode: path.join(rootDir, 'public/live-mode'), designing: path.join(rootDir, 'public/designing'), }; + // Clean up legacy output dirs from /anti-patterns and /visual-mode, + // which have been merged into /slop. A stray file in either would + // otherwise keep getting served by Bun's static handler. + for (const legacy of ['public/anti-patterns', 'public/visual-mode']) { + const dir = path.join(rootDir, legacy); + if (fs.existsSync(dir)) fs.rmSync(dir, { recursive: true, force: true }); + } // Fresh output dirs each time so stale files don't linger. for (const dir of Object.values(outDirs)) { @@ -1363,20 +1404,21 @@ export async function generateSubPages(rootDir) { generated.push(out); } - // Anti-patterns index: single page, docs-browser shell with TOC sidebar. + // Slop: merged anti-patterns catalog + visual-mode overlay demo + gallery. + // Single page, docs-browser shell with a nested TOC sidebar. { const grouped = groupRulesBySection(data.rules); - const sidebar = renderAntiPatternsSidebar(grouped); - const main = renderAntiPatternsMain(grouped, data.rules.length); + const sidebar = renderSlopSidebar(grouped, GALLERY_ITEMS.length); + const main = renderSlopMain(grouped, data.rules.length); const html = renderPage({ - title: 'Anti-patterns | Impeccable', - description: `${data.rules.length} deterministic detection rules that flag the visible tells of AI-generated interfaces and common quality issues. Used by npx impeccable detect and the browser extension.`, + title: 'Slop | Impeccable', + description: `${data.rules.length} patterns that mark an interface as AI-generated, plus the live detection overlay that catches them in place. The rule catalog behind npx impeccable detect, the browser extension, and /impeccable critique.`, bodyHtml: wrapInDocsLayout(sidebar, main), - activeNav: 'anti-patterns', - canonicalPath: '/anti-patterns', - bodyClass: 'sub-page skills-layout-page anti-patterns-page', + activeNav: 'slop', + canonicalPath: '/slop', + bodyClass: 'sub-page skills-layout-page slop-page', }); - const out = path.join(outDirs.antiPatterns, 'index.html'); + const out = path.join(outDirs.slop, 'index.html'); fs.writeFileSync(out, html, 'utf-8'); generated.push(out); } @@ -1398,25 +1440,9 @@ export async function generateSubPages(rootDir) { generated.push(out); } - // Visual Mode: single standalone page, no sidebar, single-column layout. - { - const html = renderPage({ - title: 'Visual Mode | Impeccable', - description: - 'See every anti-pattern flagged directly on the page. Live detection overlay from Impeccable, available via /impeccable critique, npx impeccable live, or the upcoming Chrome extension.', - bodyHtml: renderVisualModeMain(), - activeNav: 'visual-mode', - canonicalPath: '/visual-mode', - bodyClass: 'sub-page visual-mode-page-body', - }); - const out = path.join(outDirs.visualMode, 'index.html'); - fs.writeFileSync(out, html, 'utf-8'); - generated.push(out); - } - - // Live Mode: marketing landing mirroring /visual-mode. Needs live-mode.css - // (not imported by sub-pages.css to keep the base bundle small) and the - // live-demo JS module to animate the demo. + // Live Mode: marketing landing mirroring the other single-column pages. + // Needs live-mode.css (not imported by sub-pages.css to keep the base + // bundle small) and the live-demo JS module to animate the demo. { const extraHead = ` diff --git a/scripts/build.js b/scripts/build.js index 5be6b3ae8..63ea66def 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -259,7 +259,7 @@ async function buildStaticSite(extraEntrypoints = []) { // Older Bun versions (e.g. the one Cloudflare Pages ships) don't dedupe // shared CSS/JS chunks across HTML entrypoints — every entry tries to // emit its own copy, and three different sub-pages all named index.html - // (under skills/, tutorials/, anti-patterns/) collide on the same + // (under docs/, tutorials/, slop/) collide on the same // chunk filename. Including [dir] in the chunk template scopes each // chunk to its entry's directory so the names stay unique even when // dedupe is off. Local Bun still emits a single shared chunk; CF Bun @@ -527,15 +527,17 @@ function generateCFConfig(buildDir) { fs.writeFileSync(path.join(buildDir, '_headers'), headers); // _redirects: rewrite JSON API routes to static files (200 = rewrite, not redirect). - // Also permanent redirects for legacy URLs: /skills -> /docs, /cheatsheet -> /docs. + // Plus permanent redirects for legacy URLs. const redirects = `/api/skills /_data/api/skills.json 200 /api/commands /_data/api/commands.json 200 /api/patterns /_data/api/patterns.json 200 /api/command-source/:id /_data/api/command-source/:id.json 200 -/gallery /visual-mode#try-it-live 301 +/gallery /slop#try-it-live 301 /cheatsheet /docs 301 /skills /docs 301 /skills/:id /docs/:id 301 +/anti-patterns /slop#catalog 301 +/visual-mode /slop#see-it 301 `; fs.writeFileSync(path.join(buildDir, '_redirects'), redirects); @@ -557,7 +559,7 @@ function generateCFConfig(buildDir) { async function build() { console.log('🔨 Building cross-provider design skills...\n'); - // Pre-generate sub-pages (skills, anti-patterns, tutorials) from source + // Pre-generate sub-pages (docs, slop, tutorials, live-mode, designing) from source console.log('📝 Generating sub-pages...'); const { files: subPageFiles } = await generateSubPages(ROOT_DIR); console.log(`✓ Generated ${subPageFiles.length} sub-page(s)\n`); diff --git a/scripts/lib/render-page.js b/scripts/lib/render-page.js index ece3c2a79..437844537 100644 --- a/scripts/lib/render-page.js +++ b/scripts/lib/render-page.js @@ -33,7 +33,7 @@ export function readHeaderPartial() { * the default nav href state. Matches on `data-nav="{activeNav}"`. * * @param {string} headerHtml - * @param {string} activeNav - one of: home, skills, anti-patterns, tutorials, gallery, github + * @param {string} activeNav - one of: home, designing, docs, slop, live, github * @returns {string} */ export function applyActiveNav(headerHtml, activeNav) { diff --git a/scripts/lib/utils.js b/scripts/lib/utils.js index 37b1cbd0e..b94e0daa6 100644 --- a/scripts/lib/utils.js +++ b/scripts/lib/utils.js @@ -272,8 +272,7 @@ export function writeFile(filePath, content) { */ // Curated short-list for the homepage Antidote section. Intentionally // hand-written (not auto-extracted) so the copy stays tight and -// editorial. The long-form catalog lives on /anti-patterns — this is -// the teaser. +// editorial. The long-form catalog lives on /slop — this is the teaser. const CURATED_CATEGORIES = [ { name: 'Typography', @@ -356,7 +355,7 @@ const CURATED_CATEGORIES = [ export function readPatterns(_rootDir, _relativePath) { // Hand-curated list — see CURATED_CATEGORIES above. The homepage - // Antidote teaser uses this; the full catalog lives on /anti-patterns. + // Antidote teaser uses this; the full catalog lives on /slop. return { patterns: CURATED_CATEGORIES.map((c) => ({ name: c.name, items: c.do })), antipatterns: CURATED_CATEGORIES.map((c) => ({ name: c.name, items: c.dont })), diff --git a/server/index.js b/server/index.js index a802204e7..d9ff01b20 100644 --- a/server/index.js +++ b/server/index.js @@ -44,9 +44,11 @@ const server = serve({ // Legacy URL redirects (kept stable for external links and existing users). "/cheatsheet": Response.redirect("/docs", 301), - "/gallery": Response.redirect("/visual-mode#try-it-live", 301), + "/gallery": Response.redirect("/slop#try-it-live", 301), "/skills": Response.redirect("/docs", 301), "/skills/:id": (req) => Response.redirect(`/docs/${req.params.id}`, 301), + "/anti-patterns": Response.redirect("/slop#catalog", 301), + "/visual-mode": Response.redirect("/slop#see-it", 301), // Generated sub-pages — served directly from the pre-generated files "/docs": () => serveGenerated(path.join(ROOT_DIR, "public/docs/index.html")), @@ -54,8 +56,7 @@ const server = serve({ const id = req.params.id.replace(/[^a-z0-9-]/gi, ""); return serveGenerated(path.join(ROOT_DIR, `public/docs/${id}.html`)); }, - "/anti-patterns": () => serveGenerated(path.join(ROOT_DIR, "public/anti-patterns/index.html")), - "/visual-mode": () => serveGenerated(path.join(ROOT_DIR, "public/visual-mode/index.html")), + "/slop": () => serveGenerated(path.join(ROOT_DIR, "public/slop/index.html")), "/live-mode": () => serveGenerated(path.join(ROOT_DIR, "public/live-mode/index.html")), "/designing": () => serveGenerated(path.join(ROOT_DIR, "public/designing/index.html")), "/tutorials": () => serveGenerated(path.join(ROOT_DIR, "public/tutorials/index.html")), From df72ca2a58d930cb9f62489555bfdbf437dc69f7 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 13:28:35 -0700 Subject: [PATCH 120/125] docs(impeccable): clarify live mode param expectations for freeform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Section 7 no longer reads as default-zero: composition-sized targets, freeform bias toward 1–2 dials on non-tiny surfaces, hard cap of four. Cross-link freeform to §7 in the action loader; sync all harness copies. Made-with: Cursor --- .agents/skills/impeccable/reference/live.md | 30 +++++++++++-------- .claude/skills/impeccable/reference/live.md | 30 +++++++++++-------- .cursor/skills/impeccable/reference/live.md | 30 +++++++++++-------- .gemini/skills/impeccable/reference/live.md | 30 +++++++++++-------- .github/skills/impeccable/reference/live.md | 30 +++++++++++-------- .kiro/skills/impeccable/reference/live.md | 30 +++++++++++-------- .opencode/skills/impeccable/reference/live.md | 30 +++++++++++-------- .pi/skills/impeccable/reference/live.md | 30 +++++++++++-------- .rovodev/skills/impeccable/reference/live.md | 30 +++++++++++-------- .trae-cn/skills/impeccable/reference/live.md | 30 +++++++++++-------- .trae/skills/impeccable/reference/live.md | 30 +++++++++++-------- source/skills/impeccable/reference/live.md | 30 +++++++++++-------- 12 files changed, 216 insertions(+), 144 deletions(-) diff --git a/.agents/skills/impeccable/reference/live.md b/.agents/skills/impeccable/reference/live.md index aab6fa008..dedb9df54 100644 --- a/.agents/skills/impeccable/reference/live.md +++ b/.agents/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.claude/skills/impeccable/reference/live.md b/.claude/skills/impeccable/reference/live.md index c6ff0fa02..c48531628 100644 --- a/.claude/skills/impeccable/reference/live.md +++ b/.claude/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.cursor/skills/impeccable/reference/live.md b/.cursor/skills/impeccable/reference/live.md index 123777f49..1b0cff696 100644 --- a/.cursor/skills/impeccable/reference/live.md +++ b/.cursor/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.gemini/skills/impeccable/reference/live.md b/.gemini/skills/impeccable/reference/live.md index 99fef6802..0587665e1 100644 --- a/.gemini/skills/impeccable/reference/live.md +++ b/.gemini/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.github/skills/impeccable/reference/live.md b/.github/skills/impeccable/reference/live.md index 2ed9258e8..0aa0f55dd 100644 --- a/.github/skills/impeccable/reference/live.md +++ b/.github/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.kiro/skills/impeccable/reference/live.md b/.kiro/skills/impeccable/reference/live.md index 0d4c79d7f..1afdd2d13 100644 --- a/.kiro/skills/impeccable/reference/live.md +++ b/.kiro/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.opencode/skills/impeccable/reference/live.md b/.opencode/skills/impeccable/reference/live.md index b3c387ecc..cc0536279 100644 --- a/.opencode/skills/impeccable/reference/live.md +++ b/.opencode/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.pi/skills/impeccable/reference/live.md b/.pi/skills/impeccable/reference/live.md index 9d6add218..1530cda77 100644 --- a/.pi/skills/impeccable/reference/live.md +++ b/.pi/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.rovodev/skills/impeccable/reference/live.md b/.rovodev/skills/impeccable/reference/live.md index 06a9160a1..dc52b8956 100644 --- a/.rovodev/skills/impeccable/reference/live.md +++ b/.rovodev/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.trae-cn/skills/impeccable/reference/live.md b/.trae-cn/skills/impeccable/reference/live.md index d5639e2bf..7d5d97fc5 100644 --- a/.trae-cn/skills/impeccable/reference/live.md +++ b/.trae-cn/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/.trae/skills/impeccable/reference/live.md b/.trae/skills/impeccable/reference/live.md index 77fe5580e..837516fa3 100644 --- a/.trae/skills/impeccable/reference/live.md +++ b/.trae/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. diff --git a/source/skills/impeccable/reference/live.md b/source/skills/impeccable/reference/live.md index 10e13851b..df55f8d4b 100644 --- a/source/skills/impeccable/reference/live.md +++ b/source/skills/impeccable/reference/live.md @@ -97,9 +97,9 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below. ### 3. Load the action's reference -If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. +If `event.action` is `impeccable` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you. -Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. +Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it. ### 4. Plan three genuinely distinct directions @@ -181,20 +181,26 @@ The first variant has no `display: none` (visible by default). All others do. If One edit, all variants — the browser's MutationObserver picks everything up in one pass. -### 7. Parameters (optional, 2-5 per variant) +### 7. Parameters (composition-sized, 0–4 per variant) -Each variant can expose coarse knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. +Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement. The browser docks a small panel to the right of the outline with one control per parameter. The user drags/clicks and sees instant feedback: there is zero regeneration cost because the knob toggles a CSS variable or data attribute that the variant's scoped CSS is already authored against. -**When to use.** Any time the variant has a meaningful axis the user might want to dial in: color amount, density, motion intensity, scale ratio. Not micro-level margin tweaks; those defeat the point. +**What “optional” does not mean.** Parameters are not nice-to-have decoration on large work. The word meant “omit controls that are redundant or cosmetic,” not “default to zero because three variants were enough work.” -**Budget scales with the element's visual weight, not the user's curiosity.** Knobs need real estate to produce noticeably different output; slapping three on a small element just crowds the panel without making anything feel tunable. +**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters. -- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** A slider can't meaningfully reshape one element; just use variants. -- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0-1 params.** Only add one if it's a clear dominant axis (e.g. density on a card with visible internal rhythm). -- **Medium composition** — section component, nav cluster, dense card, short feature block (6-15 visual children): **2 params.** -- **Large composition** — hero section, full page region, spread layout, anything with strong internal structure (16+ visual children or multiple sub-sections): **3-4 params.** +**Freeform (`action` is `impeccable`) bias.** You did not load `reference/bolder.md` (etc.), so you must **choose** 1–2 signature-like axes yourself. Prefer knobs that sit on the same dimensions as your three directions (e.g. all three riffs on editorial density → expose `density` or a `steps` “air / snug / packed”; two directions differ mostly in chroma → add `color-amount`). A hero, section, or other **large** surface that ships with **0** params needs a one-line reason in your head (e.g. “truly a fixed-point A/B/C comparison, no shared dial”), not a default habit. -When in doubt, fewer. The user can always ask for more variants to explore an axis you didn't expose as a knob. Count by visual children, not by DOM-node depth; a deeply-nested-but-visually-simple card still counts as small. +**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise. + +- **Leaf / tiny** — a single button, icon, input, bare heading, solitary paragraph: **0 params.** +- **Small composition** — labeled input, simple card, short callout (≤ ~5 visual children): **0–1** params when one dominant axis is obvious; otherwise **0.** +- **Medium composition** — section component, nav cluster, dense card, short feature block (6–15 visual children): **target 2**; **1** is acceptable if the block is simple; **0** only when variants are truly fixed points. +- **Large composition** — hero section, full page region, spread layout, strong internal structure (16+ visual children or multiple sub-sections): **target 2–3**; **up to 4** when several independent axes (e.g. structure `steps` + `density` + one accent) are all authored in scoped CSS. + +**When in doubt, ask whether a dial exists before defaulting to zero.** The user can always request more variants, but the point of live mode is instant tuning without another Go. Crowding the panel is bad; **under-shipping** knobs on a dense composition is the more common failure for freeform. Count by **visual** children, not DOM depth; a shallow-but-wide hero is still large. + +**Hard cap per variant** — at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it. **How to declare.** Put a JSON manifest on the variant wrapper: @@ -218,7 +224,7 @@ When in doubt, fewer. The user can always ask for more variants to explore an ax - `steps` — segmented radio. Drives a data attribute `data-p-` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`. - `toggle` — on/off switch. Drives BOTH a CSS var (`--p-: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`. -**Signature params per action.** Each action has one or two signature params that MUST be exposed when the variant can meaningfully express them. Check the action's reference file for the list. Layer 1-2 variant-specific params on top. +**Signature params per action.** For named sub-commands, read that action’s `reference/.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`impeccable`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs. **Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later. From 37f79cd0138b62d6428ed52bba1acfd59d79524f Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 13:32:32 -0700 Subject: [PATCH 121/125] feat(site): foreground visualize-first workflow on /designing + Case carousel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /designing §01 is reframed around the words → pictures → code arc. The phase sub covers teach, shape, and craft in one breath; the body splits into two labeled micro-steps ("teach · in words" and "shape + craft · in pictures") so the new image-gen spread reads as step 2 of the same flow instead of a separate topic. Generated plates from GPT Image 2 sit as an editorial two-up beside their brand and hi-fi captions. Also fixes a long-standing font-size mismatch where inside .designing-phase-sub fell back to the browser's default monospace. Homepage: inserts a new "Visualize, then build" slot at position 02 of The Case carousel, compact two-plate visual, shifts the remaining eight slots to 03-09. Co-Authored-By: Claude Opus 4.7 (1M context) --- public/assets/openai_image_2_brand.jpg | Bin 0 -> 217600 bytes public/assets/openai_image_2_hifi.jpg | Bin 0 -> 222579 bytes public/css/docs-visuals.css | 149 +++++++++++++++++++------ public/css/workflow.css | 51 +++++++++ public/designing/index.html | 93 +++++++++------ public/index.html | 39 +++++-- scripts/build-sub-pages.js | 73 ++++++------ 7 files changed, 290 insertions(+), 115 deletions(-) create mode 100644 public/assets/openai_image_2_brand.jpg create mode 100644 public/assets/openai_image_2_hifi.jpg diff --git a/public/assets/openai_image_2_brand.jpg b/public/assets/openai_image_2_brand.jpg new file mode 100644 index 0000000000000000000000000000000000000000..121494228f556b685607e50a83f2e911a4658942 GIT binary patch literal 217600 zcmbrl^;=Zm_da}p5di@Qq;n{xyK_WJI+QNyM!I1@q`Nz%q!|HekQiZr0cnBZB{&Qz z(o*{6eLdIbFL?Go^UK-Sb!M-#_P+O8_qxx&<$wPHV0D$3DgX`+0N~tr;NL0`4dCCm zhxiW(2p$qWy6=xkiHS)cQ-R6uI~6M>E#>{i%EZpZaQ_qMe)^PKTwYXIR9;g_Nz=;I zDm1hP=l|~m{(S++2tWWnfQQ2Z;F96sk>UIs0mK0S7Z(rbe{=o6hJy>jdvHHf!uz}b zU;Doi00$QjbU*a(J3x$w1K@)3!1qJfQnwK<3DJ-TbN~=p%N9rUfsls1vGP?`B~5~& z1}y=Q20*MqFIh!mT$JLuaTNhvO5h1^Bqwn+xj*NGG`Nyn<0%xZ_8bO$;ZuUJ;|eMR z05pePt=c%N;vrr&?EWvvBaDx3*7F%Ct`V4!>M6vDZX{lYJd!&f zY^|mY1Gtpb)W*%)gyIJ?%kG~Og9id;Ku8LET=h{}6B6CHE(hbR#$^D98w83Z=Y_JA ztAooT^_5<+B1lgzCD8ZuJ`~jjkKq-;6Dh>A0 z@F{^cC!;7($%79NXgXQ5^5Z`cqSfQDAv5{F$ibTi3_&>YTA<|#0FGJ=0ey=Nj-m!T zNVrI8D2~30m0gGy`jm780F^yW)~&LJ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+#meL8jj{WB_9@2}H*ZX=h z6D5ix!J8iv&8!Z-hoFDY!Q-U*tZV-Pcwd&ztX#)8${RQ)onzg1{w+r>30KR?lvGJ` z-LRH0XR|XjDS2+=;0gvBazxE~SPNzp^`{e#FBmmzmR*gT3E0g$pDfVKH79)PZ?t#q zcsgjfm_UfAM%cMJ9}%1L0E^~Oc};NVVHav|W`MZS$-E$Av~7iH)N3$PMJMv4p9qn_q3zglfA!~hU44Zh& zkl3vqAlB|+^iOqJbA+LieoylTDUg>EPIby8qyrCvA(o~)M+{ee1sn5CPY&%(o;AOr znpF5zO=6&>%o?T^9qY)@JV?yJ=qPc9I*l!0_(6Gi{G6YRI#?i z&P$2z2g(FMejB$wGI=$$s5pq68U&YhJwdxKW}CO=&%*OoAsn>5K)8;*5=IHTtQ!lhl*QO~D<|x$w*ZOl15f-e#|z0IR34=7&buIUaA@*OJzk zjv>|y(E=G%3Dn`olE|d0xdW(&(@r+jyCC9e0RwD6V*k>Oi8C&^kg~1HR*0oHsfvmQ zG=lpg?#G8o>Vy|z$?&sT1_$%P^PocS(`=~apty66qqk#d6&}VEbWdqGy{t0s6fYp` z#*RhDVEHxo8-;_Z^%PDJRhO$ZFK7U~LSy{%*M=VDEBS{w8|q`S;eHq<$6E|3;0*W_ z4>i1aw6%sbx*r>biFv~)QO(!KePh*yD-wdyWcZu0a!uhPccDNN${*a=n_66TbB4-# zYBZ5o#$(;8&Dad&+jJmoi54~rRwpalNi!O4zN!h?W`qJtCbXTMiL3Zu)$D>rJ|!
    01 · Start

    From a blank file to a designed feature.

    -

    Run /impeccable teach once per project to establish PRODUCT.md and DESIGN.md. Then reach for /impeccable craft and describe what you want to build. Shape, build, and iterate happen inside one invocation.

    +

    Three commands, one arc. /impeccable teach writes the brief, once per project. /impeccable shape drafts a reference you can look at. /impeccable craft codes toward what you can see. Words, then pictures, then code.

    -
    -
    -
    -
    - PRODUCT.md - Written by teach -
    -
    -
    - Register - Product. Design serves the task. +
    +
    + teach · in words +
    +
    +
    + PRODUCT.md + Written by teach
    -
    - Users - SREs on call, reading fast, often in the dark. -
    -
    - Voice - Calm, clinical, no hype. -
    -
    - Anti-references - Purple gradients. Glassmorphism. Hype. +
    +
    + Register + Product. Design serves the task. +
    +
    + Users + SREs on call, reading fast, often in the dark. +
    +
    + Voice + Calm, clinical, no hype. +
    +
    + Anti-references + Purple gradients. Glassmorphism. Hype. +
    -
    -
    -

    Teach runs a short discovery interview about audience, register, voice, and anti-references. It writes PRODUCT.md and, if there's code to scan, a DESIGN.md.

    -

    From that point on, every command reads both files before generating. Craft, polish, critique, live, all of them.

    +
    +

    Teach runs a short discovery interview about audience, register, voice, and anti-references. It writes PRODUCT.md and, if there's code to scan, a DESIGN.md. Every later command reads both files before generating.

    +
    - +
    + shape + craft · in pictures +

    Since image generation crossed the reference-quality threshold, shape drafts a brand toolkit you can review at a glance, and craft codes toward a hi-fi mock instead of a paragraph.

    + +
    +
    +
    + Auto-generated brand toolkit plate: identity lockups, colour palette, type specimens, icon system, and application mocks for a fictional AI design conference, rendered in warm earth tones. +
    +
    + Shape +

    Brand toolkit. Identity, palette, type, icon language, applications, social tiles, UI direction. One plate, reviewable at a glance. Approved decisions get written into DESIGN.md.

    +
    +
    + +
    +
    + Auto-generated hi-fi landing-page mock: a long vertical editorial comp for a fictional Tokyo AI design conference, in warm earth tones with committed serif display type. +
    +
    + Craft +

    Hi-fi reference. The destination, before the first line of CSS. Craft codes toward a concrete image, not an abstract brief. That is the step change.

    +
    +
    +
    + +

    Plates generated by OpenAI GPT Image 2. Gemini Nano Banana Pro, Imagen 4 Ultra, and Grok Imagen work the same way, via Codex, Gemini CLI, and compatible harnesses.

    +

    @ zSKnZKT3zO_bS#6l{L9y)PAuf=l8m$Ic~J9N`-6p+HR+wYcPX^Kp_91hPRKNH=MCes zC>pVQ1NCewXtDk=^LqkU1FsQ%_CJ&v>%ZBNcB+&e6W`YhU#f&o^S|ilpAeHR;Z9(8 zv29*&V)C%$#rm))<((5z(0^aIYGr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M9aG9NlRjmKSiO*K{^gpxa z(QD>xi!OE4lU%Ii_A+u&%%#Tp8TwYU`wm`tn|DJRlJs=`Exy69q%-8cfS>}W=Go$T zeoy@N2s?ZDExWE}&Y^tsDKN2f-0O)eHBZ&n{vLnR%{&*JuYnHjnJm=uqAXQ}tN8RR zM~5Dza)pa6EEm}3-H12J17137E}vlbiyz{|o6iMTKeyPFlfJH_Lq{!&c^?cx=nw;LDlk<_acb>w=%}2z{Dw>X+7XY2RC~f0N zOR4S1b}iBs(TtiCAG%gHQpkTsd_+Y3rR0G5zfu2b1#o?2y#L1fr$PS~R%W*?=>HzA%selqPGI$R;TZl!3<)-2f9*t) z{B42zcT+eHF$FqGbV`c_B|eb2XbEh2O_B0WWt-%dWo^{a80UpmX^y;SP1}#+1An9AcGO^Mxl#wVM2ycx9oGs*FX^&K=1X z!G5Kjx3}C@o#~Y0IOWk9HNL-XuU1(IEAqa4mhw@N_s`@LB@>V21gwzw^F?cGfG4kp hMI+~Wh4WK1-yBl&w13NR(B+hnpiz@r{k{7CHvwwN!yfHome Designing Docs - Anti-Patterns + Slop Live - Overlay @@ -108,50 +107,76 @@

    diff --git a/public/index.html b/public/index.html index 6dedd6be4..ddd827708 100644 --- a/public/index.html +++ b/public/index.html @@ -88,6 +88,8 @@ + +

    Impeccable

    Design fluency for AI harnesses

    @@ -130,6 +132,8 @@ + +
    @@ -250,13 +254,14 @@
    1. -
    2. -
    3. -
    4. -
    5. -
    6. -
    7. -
    8. +
    9. +
    10. +
    11. +
    12. +
    13. +
    14. +
    15. +
    @@ -298,6 +303,26 @@
    + +
    From e0ab3a73b7f6aa2f3ad931cc8f379edd98981038 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 16:44:46 -0700 Subject: [PATCH 122/125] feat(live + site): preserve variant attr on accept, designing-page redesigns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Runtime fix in live-browser.js: the 2s static-server fallback in handleAccept now swaps the outer wrapper with the `[data-impeccable-variant="N"]` div itself (+ display:contents), matching what live-accept.mjs writes to disk. Scope rules anchored on the variant attribute keep matching on the non-HMR path, so the accepted design no longer flashes unstyled until reload. Propagated to all harness script copies. /designing: - §03 Polish redesigned as drenched magenta masthead: commands live in the band, three title/description columns beneath on cream. - §04 Maintain redesigned as architectural poster diptych: extract + document vizzes become the hero element, caption below. - §05 Interop section removed. - §05 (was §06) "Pick a register" renamed to "Brand, or product." with a two-lane hairline-divided layout and an auto-selected framing in the sub. Live mode status: BETA → ALPHA across the periodic table, magazine spread, and docs callout, reflecting real-world-testing readiness. Skill bootstrap: removed the `` block from source/SKILL.md (the source repo is the origin; running cleanup-deprecated here would touch legitimate source). CLAUDE.md and AGENTS.md now document the skip. Co-Authored-By: Claude Opus 4.7 (1M context) --- .agents/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .claude/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .cursor/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .gemini/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .github/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .kiro/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .opencode/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .pi/skills/impeccable/SKILL.md | 16 - .pi/skills/impeccable/scripts/live-browser.js | 8 +- .rovodev/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .trae-cn/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- .trae/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- AGENTS.md | 4 + CLAUDE.md | 6 + content/site/skills/live.md | 5 + public/css/docs-visuals.css | 482 ++++++++++-------- public/designing/index.html | 158 +++--- public/index.html | 2 +- public/js/components/framework-viz.js | 8 +- public/js/components/glass-terminal.js | 10 +- public/js/data.js | 4 +- public/live-mode/index.html | 3 +- scripts/build-sub-pages.js | 165 +++--- source/skills/impeccable/SKILL.md | 16 - .../skills/impeccable/scripts/live-browser.js | 8 +- 35 files changed, 524 insertions(+), 611 deletions(-) diff --git a/.agents/skills/impeccable/SKILL.md b/.agents/skills/impeccable/SKILL.md index 873292cfd..576199435 100644 --- a/.agents/skills/impeccable/SKILL.md +++ b/.agents/skills/impeccable/SKILL.md @@ -5,22 +5,6 @@ description: Use when the user wants to design, redesign, shape, critique, audit Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands ($audit, $polish, $critique, etc.) are now accessed through $impeccable (e.g., `$impeccable audit`). I'll clean up the old standalone skill files. Use `$impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .agents/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.agents/skills/impeccable/scripts/live-browser.js b/.agents/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.agents/skills/impeccable/scripts/live-browser.js +++ b/.agents/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.claude/skills/impeccable/SKILL.md b/.claude/skills/impeccable/SKILL.md index e2e7930e8..5978f72de 100644 --- a/.claude/skills/impeccable/SKILL.md +++ b/.claude/skills/impeccable/SKILL.md @@ -11,22 +11,6 @@ allowed-tools: Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .claude/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.claude/skills/impeccable/scripts/live-browser.js b/.claude/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.claude/skills/impeccable/scripts/live-browser.js +++ b/.claude/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.cursor/skills/impeccable/SKILL.md b/.cursor/skills/impeccable/SKILL.md index 7834b5bb1..9f579cd95 100644 --- a/.cursor/skills/impeccable/SKILL.md +++ b/.cursor/skills/impeccable/SKILL.md @@ -7,22 +7,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .cursor/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.cursor/skills/impeccable/scripts/live-browser.js b/.cursor/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.cursor/skills/impeccable/scripts/live-browser.js +++ b/.cursor/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.gemini/skills/impeccable/SKILL.md b/.gemini/skills/impeccable/SKILL.md index bb93640ab..49c8c81eb 100644 --- a/.gemini/skills/impeccable/SKILL.md +++ b/.gemini/skills/impeccable/SKILL.md @@ -6,22 +6,6 @@ version: 3.0.0 Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .gemini/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.gemini/skills/impeccable/scripts/live-browser.js b/.gemini/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.gemini/skills/impeccable/scripts/live-browser.js +++ b/.gemini/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.github/skills/impeccable/SKILL.md b/.github/skills/impeccable/SKILL.md index 30ef89843..47754c347 100644 --- a/.github/skills/impeccable/SKILL.md +++ b/.github/skills/impeccable/SKILL.md @@ -9,22 +9,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .github/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.github/skills/impeccable/scripts/live-browser.js b/.github/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.github/skills/impeccable/scripts/live-browser.js +++ b/.github/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.kiro/skills/impeccable/SKILL.md b/.kiro/skills/impeccable/SKILL.md index c3dc00364..05c07fba1 100644 --- a/.kiro/skills/impeccable/SKILL.md +++ b/.kiro/skills/impeccable/SKILL.md @@ -7,22 +7,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .kiro/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.kiro/skills/impeccable/scripts/live-browser.js b/.kiro/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.kiro/skills/impeccable/scripts/live-browser.js +++ b/.kiro/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.opencode/skills/impeccable/SKILL.md b/.opencode/skills/impeccable/SKILL.md index e186eca85..e9b79285d 100644 --- a/.opencode/skills/impeccable/SKILL.md +++ b/.opencode/skills/impeccable/SKILL.md @@ -11,22 +11,6 @@ allowed-tools: Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .opencode/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.opencode/skills/impeccable/scripts/live-browser.js b/.opencode/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.opencode/skills/impeccable/scripts/live-browser.js +++ b/.opencode/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.pi/skills/impeccable/SKILL.md b/.pi/skills/impeccable/SKILL.md index e1d5b859e..0553686db 100644 --- a/.pi/skills/impeccable/SKILL.md +++ b/.pi/skills/impeccable/SKILL.md @@ -9,22 +9,6 @@ allowed-tools: Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .pi/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.pi/skills/impeccable/scripts/live-browser.js b/.pi/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.pi/skills/impeccable/scripts/live-browser.js +++ b/.pi/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.rovodev/skills/impeccable/SKILL.md b/.rovodev/skills/impeccable/SKILL.md index 12d459937..3e21cada6 100644 --- a/.rovodev/skills/impeccable/SKILL.md +++ b/.rovodev/skills/impeccable/SKILL.md @@ -11,22 +11,6 @@ allowed-tools: Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .rovodev/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.rovodev/skills/impeccable/scripts/live-browser.js b/.rovodev/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.rovodev/skills/impeccable/scripts/live-browser.js +++ b/.rovodev/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.trae-cn/skills/impeccable/SKILL.md b/.trae-cn/skills/impeccable/SKILL.md index 5682fbe4b..f471d8537 100644 --- a/.trae-cn/skills/impeccable/SKILL.md +++ b/.trae-cn/skills/impeccable/SKILL.md @@ -9,22 +9,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .trae-cn/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.trae-cn/skills/impeccable/scripts/live-browser.js b/.trae-cn/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.trae-cn/skills/impeccable/scripts/live-browser.js +++ b/.trae-cn/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/.trae/skills/impeccable/SKILL.md b/.trae/skills/impeccable/SKILL.md index a097b0a41..9b5d10abd 100644 --- a/.trae/skills/impeccable/SKILL.md +++ b/.trae/skills/impeccable/SKILL.md @@ -9,22 +9,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node .trae/skills/impeccable/scripts/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/.trae/skills/impeccable/scripts/live-browser.js b/.trae/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/.trae/skills/impeccable/scripts/live-browser.js +++ b/.trae/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } diff --git a/AGENTS.md b/AGENTS.md index 954bc3df1..8bc23b79d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,9 @@ # Repository Guidelines +## Skill bootstrap: skip the post-update-cleanup step + +If you load the Impeccable skill from `.agents/skills/impeccable/SKILL.md` (or any sibling harness directory under this repo), it begins with a `` block that runs `scripts/cleanup-deprecated.mjs` and then self-deletes. **Do not run it here, and do not delete the block.** This repo is the source of truth for the skill; cleanup-deprecated assumes a consumer project and would touch legitimate source files. The block is regenerated from `source/skills/impeccable/SKILL.md` on every `bun run build`, so any deletion churns back. Skip it silently and proceed with the task. + ## Project Structure & Module Organization `source/` is the source of truth. Author skills in `source/skills/impeccable/` and keep provider output in `dist/` generated, not hand-edited. Build logic lives in `scripts/`, with provider configs in `scripts/lib/transformers/`. Runtime detection code ships from `src/`. The website lives in `public/`, local API/dev serving lives in `server/`, and regression coverage lives in `tests/` with fixtures under `tests/fixtures/`. diff --git a/CLAUDE.md b/CLAUDE.md index f5ce038ef..23e40722e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,5 +1,11 @@ # Project Instructions for Claude +## Skill bootstrap: skip the post-update-cleanup step + +The `` block at the top of `.claude/skills/impeccable/SKILL.md` runs `scripts/cleanup-deprecated.mjs` and then self-deletes. **Do not run it in this repo, and do not delete the block.** This repo is the source of truth for the Impeccable skill; the cleanup script scans for "leftover" skill files to remove and its judgment doesn't fit a repo where the skill lives in `source/`. The block is also regenerated from `source/skills/impeccable/SKILL.md` on every `bun run build`, so any deletion churns back on the next build. Skip the step silently and proceed. + +Same rule for AGENTS.md and every other harness-specific instruction file: treat post-update-cleanup as a no-op in this repo. + ## Architecture (v3.0+) There is **one** user-invocable skill, `impeccable`, with **23 commands** underneath it. Users type `/impeccable polish`, `/impeccable audit`, etc. The skill is defined in `source/skills/impeccable/`: diff --git a/content/site/skills/live.md b/content/site/skills/live.md index 99cacf47d..ae2969609 100644 --- a/content/site/skills/live.md +++ b/content/site/skills/live.md @@ -7,6 +7,11 @@ tagline: "Iterate on UI in the browser. Pick an element, drop a comment, get thr See it in action, with the animated demo, at /live-mode. This page is the reference for what your AI harness reads when the command runs. +
    + + Status: alpha. Live Mode works end-to-end and is ready to try, but it still needs more testing against real-world repos and framework configs. Expect rough edges on uncommon setups, and please report what breaks. +
    +
    diff --git a/public/css/docs-visuals.css b/public/css/docs-visuals.css index 65af36bec..531516a92 100644 --- a/public/css/docs-visuals.css +++ b/public/css/docs-visuals.css @@ -1319,6 +1319,24 @@ max-width: 56ch; } +.live-mode-page-alpha-note { + font-family: var(--font-body); + font-size: 0.9375rem; + line-height: 1.55; + color: var(--color-ash); + margin: 0; + max-width: 56ch; + padding: 10px 14px; + border-left: 2px solid var(--color-accent); + background: color-mix(in oklab, var(--color-accent) 6%, transparent); + border-radius: 0 4px 4px 0; +} + +.live-mode-page-alpha-note strong { + color: var(--color-ink); + font-weight: 600; +} + .live-mode-start { display: flex; align-items: center; @@ -2411,47 +2429,87 @@ PHASE 3 — Polish (3-column editorial, no cards) ============================================ */ +/* Polish section — drenched magenta masthead band over a three-column + title/description grid. Commands live in the band so the grid stays + focused on the editorial titles. */ .designing-polish { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: clamp(1.5rem, 3vw, 2.5rem); + display: block; } -@media (max-width: 720px) { - .designing-polish { - grid-template-columns: 1fr; - gap: var(--spacing-lg, 32px); - } +.designing-polish-band { + background: var(--color-accent); + padding: 20px 28px; + display: grid; + grid-template-columns: auto 1fr auto; + gap: 24px; + align-items: baseline; + color: oklch(98% 0 0); +} + +.designing-polish-band-label { + font-family: var(--font-mono); + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.22em; + text-transform: uppercase; + opacity: 0.85; +} + +.designing-polish-band-cmds { + display: flex; + font-family: var(--font-mono); + font-size: 0.8125rem; + font-weight: 500; + letter-spacing: 0.05em; +} + +.designing-polish-band-cmds a { + display: inline-block; + padding: 4px 16px; + color: inherit; + text-decoration: none; + border-right: 1px solid color-mix(in oklch, currentColor 32%, transparent); +} + +.designing-polish-band-cmds a:first-child { padding-left: 0; } +.designing-polish-band-cmds a:last-child { border-right: 0; padding-right: 0; } + +.designing-polish-band-cmds a:hover { + text-decoration: underline; + text-underline-offset: 3px; +} + +.designing-polish-band-meta { + font-family: var(--font-mono); + font-size: 0.625rem; + letter-spacing: 0.2em; + text-transform: uppercase; + opacity: 0.75; +} + +.designing-polish-grid { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 28px; + padding: 28px; + background: var(--color-cream); + border-left: 1px solid var(--color-mist); + border-right: 1px solid var(--color-mist); + border-bottom: 1px solid var(--color-mist); } .designing-polish-col { display: flex; flex-direction: column; - gap: var(--spacing-sm, 16px); - padding-top: var(--spacing-sm, 16px); - border-top: 1px solid var(--color-ink); + gap: 10px; } -.designing-polish-cmd { - font-family: var(--font-mono); - font-size: 0.75rem; - color: var(--color-accent); -} - -.designing-polish-cmd a { - color: inherit; - text-decoration: underline; - text-underline-offset: 3px; - text-decoration-thickness: 1px; -} - -.designing-polish-cmd a:hover { text-decoration-thickness: 2px; } - .designing-polish-name { font-family: var(--font-display); font-style: italic; + font-weight: 400; font-size: 1.5rem; - line-height: 1.1; + line-height: 1.15; color: var(--color-ink); margin: 0; } @@ -2459,51 +2517,80 @@ .designing-polish-desc { font-family: var(--font-body); font-size: 0.9375rem; - line-height: 1.7; + line-height: 1.6; color: var(--color-charcoal); margin: 0; } +@media (max-width: 720px) { + .designing-polish-grid { + grid-template-columns: 1fr; + } + .designing-polish-band { + grid-template-columns: 1fr; + gap: 10px; + } +} + /* ============================================ PHASE 4 — Maintain (two editorial columns + one hero viz each) ============================================ */ +/* Maintain section — architectural poster diptych. Each tile presents the + domain visualization as the hero (stage) with a quiet caption beneath + (command link, italic title, short description). */ .designing-maintain { display: grid; grid-template-columns: 1fr 1fr; - gap: clamp(1.5rem, 3vw, 2.5rem); + gap: clamp(1.5rem, 3vw, 2rem); } -@media (max-width: 720px) { - .designing-maintain { - grid-template-columns: 1fr; - gap: var(--spacing-xl, 48px); - } -} - -.designing-maintain-col { +.designing-maintain-tile { + margin: 0; display: flex; flex-direction: column; - gap: var(--spacing-sm, 16px); + gap: 18px; + min-width: 0; +} + +.designing-maintain-stage { + aspect-ratio: 5 / 3; + background: var(--color-cream); + border: 1px solid var(--color-mist); + display: grid; + place-items: center; + padding: 28px; + overflow: hidden; +} + +.designing-maintain-caption { + display: flex; + flex-direction: column; + gap: 6px; } .designing-maintain-label { font-family: var(--font-mono); - font-size: 0.75rem; + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--color-accent); } .designing-maintain-label a { - color: var(--color-accent); - text-decoration: underline; - text-underline-offset: 3px; - text-decoration-thickness: 1px; + color: inherit; + text-decoration: none; } -.designing-maintain-label a:hover { text-decoration-thickness: 2px; } +.designing-maintain-label a:hover { + color: var(--color-accent-hover); +} .designing-maintain-name { font-family: var(--font-display); font-style: italic; + font-weight: 400; font-size: 1.5rem; line-height: 1.15; color: var(--color-ink); @@ -2512,159 +2599,191 @@ .designing-maintain-desc { font-family: var(--font-body); - font-size: 0.9375rem; - line-height: 1.7; + font-size: 0.875rem; + line-height: 1.55; color: var(--color-charcoal); - margin: 0 0 var(--spacing-md, 24px) 0; + margin: 0; + max-width: 42ch; } -/* Extract consolidation viz — inline, no card */ +/* Extract consolidation viz — cloud of pills converging on a single primitive */ .designing-extract-viz { - display: grid; - grid-template-columns: 1fr auto 1fr; - gap: 14px; + display: flex; align-items: center; + gap: 20px; + flex-wrap: nowrap; + justify-content: center; + width: 100%; } .designing-extract-before { display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 4px; -} - -.designing-extract-btn { - padding: 6px 4px; - background: var(--color-paper); - border: 1px solid var(--color-mist); - border-radius: 3px; - font-family: var(--font-body); - font-size: 9px; - text-align: center; - color: var(--color-charcoal); -} - -.designing-extract-btn:nth-child(1) { background: oklch(97% 0.01 20); } -.designing-extract-btn:nth-child(3) { background: oklch(97% 0.01 220); color: oklch(40% 0.06 220); } -.designing-extract-btn:nth-child(4) { border-radius: 0; } -.designing-extract-btn:nth-child(6) { border-radius: 999px; } - -.designing-extract-arrow { - color: var(--color-accent); - font-size: 16px; -} - -.designing-extract-after { - padding: 10px; - background: var(--color-ink); - color: var(--color-paper); - font-family: var(--font-body); - font-size: 11px; - font-weight: 500; - letter-spacing: 0.06em; - text-transform: uppercase; - border-radius: 4px; - text-align: center; - min-height: 42px; - display: flex; - align-items: center; + grid-template-columns: repeat(2, auto); + gap: 6px; justify-content: center; } -/* DESIGN.md inline preview */ -.designing-designmd-preview { - padding: 10px 14px; - background: var(--color-cream); - border-radius: 6px; - font-family: var(--font-mono); +.designing-extract-btn { + display: inline-block; + padding: 5px 12px; + background: var(--color-paper); + border: 1px solid var(--color-mist); + font-family: var(--font-body); font-size: 0.75rem; - line-height: 1.85; - color: var(--color-ink); + color: var(--color-ash); + opacity: 0.75; +} + +.designing-extract-arrow { + font-family: var(--font-display); + font-style: italic; + font-size: 2.5rem; + line-height: 1; + color: var(--color-accent); +} + +.designing-extract-after { + display: inline-block; + padding: 10px 22px; + background: var(--color-ink); + color: var(--color-paper); + font-family: var(--font-body); + font-size: 1rem; + font-weight: 500; + letter-spacing: 0.04em; +} + +/* DESIGN.md index — enlarged list of numbered sections */ +.designing-designmd-preview { + display: flex; + flex-direction: column; + gap: 8px; + width: 100%; + max-width: 280px; } .designing-designmd-preview-line { - display: flex; - gap: 10px; - align-items: baseline; + display: grid; + grid-template-columns: 32px 1fr; + gap: 14px; + padding-bottom: 6px; + border-bottom: 1px solid var(--color-mist); + font-family: var(--font-body); + font-size: 0.9375rem; + color: var(--color-ink); } +.designing-designmd-preview-line:last-child { border-bottom: 0; } + .designing-designmd-preview-num { - color: var(--color-ash); - min-width: 18px; + font-family: var(--font-mono); + font-size: 0.75rem; + color: var(--color-accent); +} + +@media (max-width: 720px) { + .designing-maintain { + grid-template-columns: 1fr; + gap: var(--spacing-xl, 48px); + } + .designing-extract-viz { flex-wrap: wrap; } } /* ============================================ APPENDIX: Register (cross-link, quieter aside) ============================================ */ -.designing-register { - display: grid; - grid-template-columns: 1fr 1.6fr; - gap: clamp(1.5rem, 4vw, 2.5rem); - align-items: center; -} - -@media (max-width: 640px) { - .designing-register { - grid-template-columns: 1fr; - } -} - -.designing-register-preview { +/* Two-lane explainer — brand vs product as twin columns divided by a + hairline, each with its own mock to make the vocabulary visible. */ +.designing-lanes { display: grid; grid-template-columns: 1fr 1fr; - gap: 8px; + gap: 0; + margin-bottom: var(--spacing-lg, 32px); } -.designing-register-mini { - padding: 14px 12px; - border-radius: 6px; +.designing-lane { + padding: 0 clamp(18px, 3vw, 32px); display: flex; flex-direction: column; - gap: 4px; - min-height: 88px; - justify-content: center; + gap: 14px; + border-left: 1px solid var(--color-mist); } -.designing-register-mini--brand { +.designing-lane:first-child { + padding-left: 0; + border-left: 0; +} + +.designing-lane-kind { + font-family: var(--font-mono); + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--color-accent); +} + +.designing-lane-rule { + margin: 0; + font-family: var(--font-body); + font-size: 0.9375rem; + line-height: 1.55; + color: var(--color-charcoal); + max-width: 38ch; +} + +.designing-lane-mock { + padding: 28px 20px; + display: flex; + flex-direction: column; + gap: 6px; + justify-content: center; + min-height: 116px; + border: 1px solid var(--color-mist); +} + +.designing-lane-mock--brand { background: oklch(96% 0.02 30); } -.designing-register-mini--brand .designing-register-mini-label { +.designing-lane-mock--brand .designing-lane-mock-label { font-family: var(--font-mono); - font-size: 8px; + font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: oklch(40% 0.12 30); } -.designing-register-mini--brand .designing-register-mini-title { +.designing-lane-mock--brand .designing-lane-mock-title { font-family: var(--font-display); font-style: italic; - font-size: 14px; + font-size: 22px; color: oklch(20% 0.1 30); line-height: 1.1; } -.designing-register-mini--product { +.designing-lane-mock--product { background: var(--color-cream); } -.designing-register-mini--product .designing-register-mini-label { +.designing-lane-mock--product .designing-lane-mock-label { font-family: var(--font-body); - font-size: 9px; + font-size: 10px; font-weight: 600; color: var(--color-ash); + letter-spacing: 0.04em; } -.designing-register-mini--product .designing-register-mini-title { +.designing-lane-mock--product .designing-lane-mock-title { font-family: var(--font-body); font-weight: 600; - font-size: 13px; + font-size: 15px; color: var(--color-ink); - line-height: 1.2; + line-height: 1.25; } -.designing-register-link { +.designing-lane-link { font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; @@ -2673,93 +2792,26 @@ text-underline-offset: 3px; text-decoration-thickness: 1px; display: inline-block; - margin-top: var(--spacing-md, 24px); - margin-bottom: var(--spacing-sm, 16px); } -.designing-register-link:hover { +.designing-lane-link:hover { text-decoration-thickness: 2px; } -/* ============================================ - APPENDIX: Interop (minimal inline diagram) - ============================================ */ - -.designing-interop { - display: grid; - grid-template-columns: 1fr auto 1fr; - gap: 16px 24px; - align-items: center; - justify-items: center; - font-family: var(--font-body); - font-size: 0.9375rem; - color: var(--color-ink); - padding: 32px 16px; - border: 1px solid var(--color-mist); - border-radius: 8px; - background: var(--color-cream); -} - @media (max-width: 640px) { - .designing-interop { + .designing-lanes { grid-template-columns: 1fr; - padding: 24px 16px; + gap: var(--spacing-md, 24px); + } + .designing-lane { + padding: var(--spacing-md, 24px) 0 0 0; + border-left: 0; + border-top: 1px solid var(--color-mist); + } + .designing-lane:first-child { + padding-top: 0; + border-top: 0; } -} - -.designing-interop-side { - display: flex; - flex-direction: column; - gap: 6px; - align-items: center; - text-align: center; -} - -.designing-interop-side-label { - font-family: var(--font-mono); - font-size: 0.625rem; - letter-spacing: 0.16em; - text-transform: uppercase; - color: var(--color-ash); -} - -.designing-interop-side-list { - display: flex; - flex-direction: column; - gap: 4px; - font-family: var(--font-body); - font-size: 0.9375rem; - color: var(--color-ink); -} - -.designing-interop-node { - padding: 8px 16px; - background: var(--color-paper); - border: 1px solid var(--color-mist); - border-radius: 6px; - white-space: nowrap; -} - -.designing-interop-node--center { - background: var(--color-ink); - color: var(--color-paper); - border-color: transparent; - font-family: var(--font-mono); - font-size: 0.875rem; - padding: 12px 20px; -} - -.designing-interop-arrow { - display: flex; - align-items: center; - justify-content: center; - color: var(--color-accent); - font-size: 18px; - line-height: 1; -} - -@media (max-width: 640px) { - .designing-interop-arrow { transform: rotate(90deg); } } /* ============================================ diff --git a/public/designing/index.html b/public/designing/index.html index 5194e18c2..3c0a39ecb 100644 --- a/public/designing/index.html +++ b/public/designing/index.html @@ -275,20 +275,28 @@
    -
    - /impeccable audit -

    Score it.

    -

    Five dimensions scored 0 to 4: accessibility, performance, theming, responsive, anti-patterns. Findings tagged P0 to P3.

    +
    + Pre-ship +
    + audit + clarify + harden +
    + 03 · 04
    -
    - /impeccable clarify -

    Rewrite the copy.

    -

    Labels, error messages, empty-state prose, microcopy. Tuned to the audience from PRODUCT.md.

    -
    -
    - /impeccable harden -

    Stress-test reality.

    -

    60-character names, German product titles, prices in the billions, 500s, offline. Production data is messy.

    +
    +
    +

    Score it.

    +

    Five dimensions scored 0 to 4: accessibility, performance, theming, responsive, anti-patterns. Findings tagged P0 to P3.

    +
    +
    +

    Rewrite the copy.

    +

    Labels, error messages, empty-state prose, microcopy. Tuned to the audience from PRODUCT.md.

    +
    +
    +

    Stress-test reality.

    +

    60-character names, German product titles, prices in the billions, 500s, offline. Production data is messy.

    +
    @@ -303,90 +311,76 @@
    -
    - /impeccable extract -

    Consolidate drift.

    -

    Find patterns used three or more times with the same intent. Propose tokens and primitives. Migrate call sites in the same pass.

    -
    -
    +
    - Before any of this -

    Pick a register.

    -

    Brand and product surfaces have different defaults. Impeccable tracks this in PRODUCT.md as a single field, so commands like typeset, animate, and colorize adapt their vocabulary to match.

    + Two lanes +

    Brand, or product.

    +

    Two defaults with different vocabularies. Impeccable picks the lane from your task cue and PRODUCT.md before every command, so typeset, animate, colorize, and friends adjust their output to match. You rarely need to set it by hand.

    -
    - -
    - -
    -
    - Interop -

    Your system travels.

    -

    DESIGN.md follows the format Google Stitch publishes. Not a lock-in. When you outgrow Impeccable or want a second opinion from another tool, the file comes with you.

    -
    - -
    -
    + Read the brand-vs-product tutorial →
    diff --git a/public/index.html b/public/index.html index ddd827708..2bbc4b709 100644 --- a/public/index.html +++ b/public/index.html @@ -554,7 +554,7 @@
    04 -

    Live Mode BETA

    +

    Live Mode ALPHA

    Pick any element in the browser. Drop a comment or a stroke. Hit Go. Three production-quality variants swap in via your framework's HMR. Accept the one you want and it writes back to source.

    diff --git a/public/js/components/framework-viz.js b/public/js/components/framework-viz.js index 1caf03d55..bde86bac2 100644 --- a/public/js/components/framework-viz.js +++ b/public/js/components/framework-viz.js @@ -4,7 +4,7 @@ * Hover tooltips show description and relationships inline. */ -import { commandCategories, commandRelationships, betaCommands } from '../data.js'; +import { commandCategories, commandRelationships, alphaCommands } from '../data.js'; const categoryColors = { create: { bg: 'var(--cat-create-bg)', border: 'var(--cat-create-border)', text: 'var(--cat-create-text)' }, @@ -298,8 +298,8 @@ export class PeriodicTable { } el.appendChild(name); - // Beta badge - if (betaCommands.includes(cmd)) { + // Alpha badge + if (alphaCommands.includes(cmd)) { const badge = document.createElement('div'); badge.style.cssText = ` position: absolute; @@ -312,7 +312,7 @@ export class PeriodicTable { opacity: 0.45; text-transform: uppercase; `; - badge.textContent = 'β'; + badge.textContent = 'α'; el.appendChild(badge); } diff --git a/public/js/components/glass-terminal.js b/public/js/components/glass-terminal.js index cd1673482..71f79f357 100644 --- a/public/js/components/glass-terminal.js +++ b/public/js/components/glass-terminal.js @@ -1,6 +1,6 @@ import { renderCommandDemo, initCommandDemo } from "../demo-renderer.js"; import { initSplitCompare } from "../effects/split-compare.js"; -import { commandProcessSteps, commandCategories, commandRelationships, betaCommands } from "../data.js"; +import { commandProcessSteps, commandCategories, commandRelationships, alphaCommands } from "../data.js"; // Track current split instance and command for cleanup let currentSplitInstance = null; @@ -134,14 +134,14 @@ function renderDesktopLayout(container, commands) { const fisheyeHTML = filteredCommands.map((cmd, i) => { const cat = commandCategories[cmd.id] || 'other'; - const isBeta = betaCommands.includes(cmd.id); + const isAlpha = alphaCommands.includes(cmd.id); // The root skill is shown as "/impeccable", everything else is a sub-command // displayed without a slash (invocation is /impeccable ) const isRoot = cmd.id === 'impeccable'; const label = isRoot ? `/impeccable` : cmd.id; - return ``; + return ``; }).join(''); container.innerHTML = ` @@ -166,7 +166,7 @@ function renderDesktopLayout(container, commands) { function renderSpread(cmd, index, isActive) { const cat = commandCategories[cmd.id] || 'other'; - const isBeta = betaCommands.includes(cmd.id); + const isAlpha = alphaCommands.includes(cmd.id); const relationship = commandRelationships[cmd.id]; // Build relationship flow let flowHTML = ''; @@ -213,7 +213,7 @@ function renderSpread(cmd, index, isActive) {
    ${categoryLabels[cat] || cat} -

    ${nameHTML}${isBeta ? 'BETA' : ''}

    +

    ${nameHTML}${isAlpha ? 'ALPHA' : ''}

    ${cmd.tagline || cmd.description}

    ${flowHTML}
    diff --git a/public/js/data.js b/public/js/data.js index 25e61a855..16a0ab53f 100644 --- a/public/js/data.js +++ b/public/js/data.js @@ -12,8 +12,8 @@ export const readyCommands = [ 'layout' // First command to be fully completed ]; -// Commands marked as beta — shown with a badge in the UI -export const betaCommands = [ +// Commands marked as alpha — shown with a badge in the UI +export const alphaCommands = [ 'live' ]; diff --git a/public/live-mode/index.html b/public/live-mode/index.html index 2668afe19..1a76f9ded 100644 --- a/public/live-mode/index.html +++ b/public/live-mode/index.html @@ -46,9 +46,10 @@
    -

    New in v3.0 Beta

    +

    New in v3.0 Alpha

    Live Mode

    Pick any element in the browser. Drop a comment or a stroke. Three production-quality variants swap in via your framework's HMR. Accept the one you want and it writes back to source.

    +

    Why alpha: Live Mode works end-to-end and is ready to try, but it still needs more testing against real-world repos and framework configs. Expect rough edges on uncommon setups, and please report what breaks.

    $ /impeccable live diff --git a/scripts/build-sub-pages.js b/scripts/build-sub-pages.js index d714512d3..96d1b914e 100644 --- a/scripts/build-sub-pages.js +++ b/scripts/build-sub-pages.js @@ -263,7 +263,7 @@ function renderSkillsOverviewMain(skillsByCategory, allSkills) { const tagline = skill.editorial?.frontmatter?.tagline || skill.description; const shortTagline = tagline.length > 140 ? tagline.slice(0, 137) + '...' : tagline; const rel = COMMAND_RELATIONSHIPS[skill.id] || {}; - const isBeta = skill.id === 'live'; + const isAlpha = skill.id === 'live'; let metaHtml = ''; if (rel.pairs) { @@ -281,7 +281,7 @@ function renderSkillsOverviewMain(skillsByCategory, allSkills) { return `
    - /impeccable ${escapeHtml(skill.id)}${isBeta ? ' BETA' : ''} + /impeccable ${escapeHtml(skill.id)}${isAlpha ? ' ALPHA' : ''}

    ${escapeHtml(shortTagline)}

    @@ -805,9 +805,10 @@ function renderLiveModeMain() { return `
    -

    New in v3.0 Beta

    +

    New in v3.0 Alpha

    Live Mode

    Pick any element in the browser. Drop a comment or a stroke. Three production-quality variants swap in via your framework's HMR. Accept the one you want and it writes back to source.

    +

    Why alpha: Live Mode works end-to-end and is ready to try, but it still needs more testing against real-world repos and framework configs. Expect rough edges on uncommon setups, and please report what breaks.

    $ /impeccable live @@ -1143,20 +1144,28 @@ function renderDesigningMain() {
    -
    - /impeccable audit -

    Score it.

    -

    Five dimensions scored 0 to 4: accessibility, performance, theming, responsive, anti-patterns. Findings tagged P0 to P3.

    +
    + Pre-ship +
    + audit + clarify + harden +
    + 03 · 04
    -
    - /impeccable clarify -

    Rewrite the copy.

    -

    Labels, error messages, empty-state prose, microcopy. Tuned to the audience from PRODUCT.md.

    -
    -
    - /impeccable harden -

    Stress-test reality.

    -

    60-character names, German product titles, prices in the billions, 500s, offline. Production data is messy.

    +
    +
    +

    Score it.

    +

    Five dimensions scored 0 to 4: accessibility, performance, theming, responsive, anti-patterns. Findings tagged P0 to P3.

    +
    +
    +

    Rewrite the copy.

    +

    Labels, error messages, empty-state prose, microcopy. Tuned to the audience from PRODUCT.md.

    +
    +
    +

    Stress-test reality.

    +

    60-character names, German product titles, prices in the billions, 500s, offline. Production data is messy.

    +
    @@ -1171,90 +1180,76 @@ function renderDesigningMain() {
    -
    - /impeccable extract -

    Consolidate drift.

    -

    Find patterns used three or more times with the same intent. Propose tokens and primitives. Migrate call sites in the same pass.

    -
    -
    +
    - Before any of this -

    Pick a register.

    -

    Brand and product surfaces have different defaults. Impeccable tracks this in PRODUCT.md as a single field, so commands like typeset, animate, and colorize adapt their vocabulary to match.

    + Two lanes +

    Brand, or product.

    +

    Two defaults with different vocabularies. Impeccable picks the lane from your task cue and PRODUCT.md before every command, so typeset, animate, colorize, and friends adjust their output to match. You rarely need to set it by hand.

    -
    - -
    - -
    -
    - Interop -

    Your system travels.

    -

    DESIGN.md follows the format Google Stitch publishes. Not a lock-in. When you outgrow Impeccable or want a second opinion from another tool, the file comes with you.

    -
    - -
    -
    + Read the brand-vs-product tutorial →
    diff --git a/source/skills/impeccable/SKILL.md b/source/skills/impeccable/SKILL.md index 7d11094c6..3e30929bd 100644 --- a/source/skills/impeccable/SKILL.md +++ b/source/skills/impeccable/SKILL.md @@ -10,22 +10,6 @@ license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md f Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft. - -BEFORE doing any design work, run this one-time maintenance step. Tell the user: - -> **Impeccable 3.0 consolidation.** All standalone commands ({{command_prefix}}audit, {{command_prefix}}polish, {{command_prefix}}critique, etc.) are now accessed through {{command_prefix}}impeccable (e.g., `{{command_prefix}}impeccable audit`). I'll clean up the old standalone skill files. Use `{{command_prefix}}impeccable pin ` to restore shortcuts for commands you use often. - -Then run: - -```bash -node {{scripts_path}}/cleanup-deprecated.mjs -``` - -If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on. - -After running the script, delete this entire section (from `` through `` inclusive) from THIS file so it does not run again until the next update. Save the file. - - ## Setup (non-optional) Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project. diff --git a/source/skills/impeccable/scripts/live-browser.js b/source/skills/impeccable/scripts/live-browser.js index 8b1839211..65e779628 100644 --- a/source/skills/impeccable/scripts/live-browser.js +++ b/source/skills/impeccable/scripts/live-browser.js @@ -2818,14 +2818,18 @@ void main() { // Static-server / no-HMR fallback: if the wrapper is still around 2s after // the cleanup above, swap it out manually. By now React has either moved - // on or the app isn't React at all. + // on or the app isn't React at all. Preserve the `data-impeccable-variant="N"` + // div (with display:contents) so @scope rules anchored to the variant + // attribute keep matching until reload replaces it with the carbonize block. setTimeout(function() { const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]'); if (!wrapper) return; const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]'); if (accepted && accepted.firstElementChild) { const parent = wrapper.parentElement; - if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper); + if (!parent) return; + accepted.style.display = 'contents'; + parent.replaceChild(accepted, wrapper); } }, 2000); } From 5613891aa64f92ba2982338c0436b76d67bcdb8e Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 16:56:29 -0700 Subject: [PATCH 123/125] docs(typography): absorb tactical additions from typecraft-guide-skill Merged ten tactical items from ehmo/typecraft-guide-skill into the typography reference at the upstream author's request: dark-mode weight/tracking/leading compensation, font-display: optional vs swap, preload-critical-weight-only, variable fonts for 3+ weights, clamp() max-to-min ratio bound, container/ font-size coupling to preserve measure, text-wrap: balance / pretty, font-optical-sizing: auto, quantified ALL-CAPS tracking (5-12%), and the paragraph-rhythm rule (space OR indent, never both). Skipped: platform-specific tables (iOS/Android/print), confidence markers, severity-graded report format, academic sources, and the punctuation subsection (em-dash prescription conflicts with the project copy rule). Attribution lives in NOTICE.md, not inside the skill content. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .pi/skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- NOTICE.md | 8 +++++ .../skills/impeccable/reference/typography.md | 29 ++++++++++++++++++- 13 files changed, 344 insertions(+), 12 deletions(-) diff --git a/.agents/skills/impeccable/reference/typography.md b/.agents/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.agents/skills/impeccable/reference/typography.md +++ b/.agents/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.claude/skills/impeccable/reference/typography.md b/.claude/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.claude/skills/impeccable/reference/typography.md +++ b/.claude/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.cursor/skills/impeccable/reference/typography.md b/.cursor/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.cursor/skills/impeccable/reference/typography.md +++ b/.cursor/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.gemini/skills/impeccable/reference/typography.md b/.gemini/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.gemini/skills/impeccable/reference/typography.md +++ b/.gemini/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.github/skills/impeccable/reference/typography.md b/.github/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.github/skills/impeccable/reference/typography.md +++ b/.github/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.kiro/skills/impeccable/reference/typography.md b/.kiro/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.kiro/skills/impeccable/reference/typography.md +++ b/.kiro/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.opencode/skills/impeccable/reference/typography.md b/.opencode/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.opencode/skills/impeccable/reference/typography.md +++ b/.opencode/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.pi/skills/impeccable/reference/typography.md b/.pi/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.pi/skills/impeccable/reference/typography.md +++ b/.pi/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.rovodev/skills/impeccable/reference/typography.md b/.rovodev/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.rovodev/skills/impeccable/reference/typography.md +++ b/.rovodev/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.trae-cn/skills/impeccable/reference/typography.md b/.trae-cn/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.trae-cn/skills/impeccable/reference/typography.md +++ b/.trae-cn/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/.trae/skills/impeccable/reference/typography.md b/.trae/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/.trae/skills/impeccable/reference/typography.md +++ b/.trae/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. diff --git a/NOTICE.md b/NOTICE.md index 4a0fe1a81..ac91432b6 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -15,3 +15,11 @@ This project extends the original with: - 7 domain-specific reference files (typography, color-and-contrast, spatial-design, motion-design, interaction-design, responsive-design, ux-writing) - 23 commands - Expanded patterns and anti-patterns + +## Typecraft Guide Skill + +The `typography.md` reference in this project incorporates a set of tactical additions merged in from ehmo's `typecraft-guide-skill` at the author's request: dark-mode weight/tracking compensation, `font-display: optional` vs `swap`, preload-critical-weight-only guidance, variable fonts for 3+ weights, `clamp()` max-to-min ratio bound, responsive measure/container coupling, `text-wrap: balance` / `pretty`, `font-optical-sizing: auto`, ALL-CAPS tracking quantification, and the paragraph-rhythm rule (space OR indent, never both). + +**Original work:** https://github.com/ehmo/typecraft-guide-skill +**Original license:** see upstream repo +**Author:** ehmo diff --git a/source/skills/impeccable/reference/typography.md b/source/skills/impeccable/reference/typography.md index cae643e5c..6fc75ea9a 100644 --- a/source/skills/impeccable/reference/typography.md +++ b/source/skills/impeccable/reference/typography.md @@ -26,7 +26,9 @@ Popular ratios: 1.25 (major third), 1.333 (perfect fourth), 1.5 (perfect fifth). Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scales inversely with line length—narrow columns need tighter leading, wide columns need more. -**Non-obvious**: Increase line-height for light text on dark backgrounds. The perceived weight is lighter, so text needs more breathing room. Add 0.05-0.1 to your normal line-height. +**Non-obvious**: Light text on dark backgrounds needs compensation on three axes, not just one. Bump line-height by 0.05–0.1, add a touch of letter-spacing (0.01–0.02em), and optionally step the body weight up one notch (regular → medium). The perceived weight drops across all three; fix all three. + +**Paragraph rhythm**: Pick either space between paragraphs OR first-line indentation. Never both. Digital usually wants space; editorial/long-form can justify indent-only. ## Font Selection & Pairing @@ -81,6 +83,12 @@ body { Tools like [Fontaine](https://github.com/unjs/fontaine) calculate these overrides automatically. +**`swap` vs `optional`**: `swap` shows fallback text immediately and FOUT-swaps when the web font arrives. `optional` uses the fallback if the web font misses a small load budget (~100ms) and avoids the shift entirely. Pick `optional` when zero layout shift matters more than seeing the branded font on slow networks. + +**Preload the critical weight only**: typically the regular-weight body font used above the fold. Preloading every weight costs more bandwidth than it saves. + +**Variable fonts for 3+ weights or styles**: a single variable font file is usually smaller than three static weight files, gives fractional weight control, and pairs well with `font-optical-sizing: auto`. For 1–2 weights, static is fine. + ## Modern Web Typography ### Fluid Type @@ -91,6 +99,10 @@ Fluid typography via `clamp(min, preferred, max)` scales text smoothly with the **Use fixed `rem` scales for**: App UIs, dashboards, and data-dense interfaces. No major app design system (Material, Polaris, Primer, Carbon) uses fluid type in product UI — fixed scales with optional breakpoint adjustments give the spatial predictability that container-based layouts need. Body text should also be fixed even on marketing pages, since the size difference across viewports is too small to warrant it. +**Bound your clamp()**: keep `max-size ≤ ~2.5 × min-size`. Wider ratios break the browser's zoom and reflow behaviour and make large viewports feel like the page is shouting. + +**Scale container width and font-size together** so effective character measure stays in the 45–75ch band at every viewport. A heading that widens faster than its container drifts out of the comfortable measure at the top end. + ### OpenType Features Most developers don't know these exist. Use them for polish: @@ -114,6 +126,21 @@ body { font-kerning: normal; } Check what features your font supports at [Wakamai Fondue](https://wakamaifondue.com/). +### Rendering polish + +```css +/* Even out heading line lengths (browser picks better break points) */ +h1, h2, h3 { text-wrap: balance; } + +/* Reduce orphans and ragged endings in long prose */ +article p { text-wrap: pretty; } + +/* Variable fonts: pick the right optical-size master automatically */ +body { font-optical-sizing: auto; } +``` + +**ALL-CAPS tracking**: capitals sit too close at default spacing. Add 5–12% letter-spacing (`letter-spacing: 0.05em` to `0.12em`) to short all-caps labels, eyebrows, and small headings. Real small caps (via `font-variant-caps`) need the same treatment, slightly gentler. + ## Typography System Architecture Name tokens semantically (`--text-body`, `--text-heading`), not by value (`--font-size-16`). Include font stacks, size scale, weights, line-heights, and letter-spacing in your token system. From a42d21856cc9763666d5fdad71f2c7c8b11d8910 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 17:06:09 -0700 Subject: [PATCH 124/125] fix(skill): resolve cursor bot findings on colorize + critique MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit colorize.md: the brand-register paragraph claimed "a dominant color can own the page" and "accent rate stays ≤10%" in the same breath. SKILL.md scopes the ≤10% rule to Restrained only; Committed / Full palette / Drenched exceed it on purpose, and brand.md explicitly encourages those strategies. Rewritten to defer to the color-strategy ladder. critique.md: two cross-references still pointed at "Step 4" / "Step 5" after those headers were renamed to "Ask the User" / "Recommended Actions". Swapped the references to the new names so the flow is self-consistent. Co-Authored-By: Claude Opus 4.7 (1M context) --- .agents/skills/impeccable/reference/colorize.md | 4 ++-- .agents/skills/impeccable/reference/critique.md | 4 ++-- .claude/skills/impeccable/reference/colorize.md | 4 ++-- .claude/skills/impeccable/reference/critique.md | 4 ++-- .cursor/skills/impeccable/reference/colorize.md | 4 ++-- .cursor/skills/impeccable/reference/critique.md | 4 ++-- .gemini/skills/impeccable/reference/colorize.md | 4 ++-- .gemini/skills/impeccable/reference/critique.md | 4 ++-- .github/skills/impeccable/reference/colorize.md | 4 ++-- .github/skills/impeccable/reference/critique.md | 4 ++-- .kiro/skills/impeccable/reference/colorize.md | 4 ++-- .kiro/skills/impeccable/reference/critique.md | 4 ++-- .opencode/skills/impeccable/reference/colorize.md | 4 ++-- .opencode/skills/impeccable/reference/critique.md | 4 ++-- .pi/skills/impeccable/reference/colorize.md | 4 ++-- .pi/skills/impeccable/reference/critique.md | 4 ++-- .rovodev/skills/impeccable/reference/colorize.md | 4 ++-- .rovodev/skills/impeccable/reference/critique.md | 4 ++-- .trae-cn/skills/impeccable/reference/colorize.md | 4 ++-- .trae-cn/skills/impeccable/reference/critique.md | 4 ++-- .trae/skills/impeccable/reference/colorize.md | 4 ++-- .trae/skills/impeccable/reference/critique.md | 4 ++-- source/skills/impeccable/reference/colorize.md | 4 ++-- source/skills/impeccable/reference/critique.md | 4 ++-- 24 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.agents/skills/impeccable/reference/colorize.md b/.agents/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.agents/skills/impeccable/reference/colorize.md +++ b/.agents/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.agents/skills/impeccable/reference/critique.md b/.agents/skills/impeccable/reference/critique.md index 93f4e9e4b..78fa241ce 100644 --- a/.agents/skills/impeccable/reference/critique.md +++ b/.agents/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.claude/skills/impeccable/reference/colorize.md b/.claude/skills/impeccable/reference/colorize.md index ab3e40953..2e3e52afb 100644 --- a/.claude/skills/impeccable/reference/colorize.md +++ b/.claude/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.claude/skills/impeccable/reference/critique.md b/.claude/skills/impeccable/reference/critique.md index d81d03efd..f4d230098 100644 --- a/.claude/skills/impeccable/reference/critique.md +++ b/.claude/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.cursor/skills/impeccable/reference/colorize.md b/.cursor/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.cursor/skills/impeccable/reference/colorize.md +++ b/.cursor/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.cursor/skills/impeccable/reference/critique.md b/.cursor/skills/impeccable/reference/critique.md index 19f0d053a..9bc43cd21 100644 --- a/.cursor/skills/impeccable/reference/critique.md +++ b/.cursor/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.gemini/skills/impeccable/reference/colorize.md b/.gemini/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.gemini/skills/impeccable/reference/colorize.md +++ b/.gemini/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.gemini/skills/impeccable/reference/critique.md b/.gemini/skills/impeccable/reference/critique.md index a1c33a4f5..701a72b7e 100644 --- a/.gemini/skills/impeccable/reference/critique.md +++ b/.gemini/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.github/skills/impeccable/reference/colorize.md b/.github/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.github/skills/impeccable/reference/colorize.md +++ b/.github/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.github/skills/impeccable/reference/critique.md b/.github/skills/impeccable/reference/critique.md index f1c67a151..4d003ddcd 100644 --- a/.github/skills/impeccable/reference/critique.md +++ b/.github/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.kiro/skills/impeccable/reference/colorize.md b/.kiro/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.kiro/skills/impeccable/reference/colorize.md +++ b/.kiro/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.kiro/skills/impeccable/reference/critique.md b/.kiro/skills/impeccable/reference/critique.md index 16f4f7ec5..fb9de1ad1 100644 --- a/.kiro/skills/impeccable/reference/critique.md +++ b/.kiro/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.opencode/skills/impeccable/reference/colorize.md b/.opencode/skills/impeccable/reference/colorize.md index d0428a8b9..da5025524 100644 --- a/.opencode/skills/impeccable/reference/colorize.md +++ b/.opencode/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.opencode/skills/impeccable/reference/critique.md b/.opencode/skills/impeccable/reference/critique.md index 74b5dbb26..76e49cf0e 100644 --- a/.opencode/skills/impeccable/reference/critique.md +++ b/.opencode/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.pi/skills/impeccable/reference/colorize.md b/.pi/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.pi/skills/impeccable/reference/colorize.md +++ b/.pi/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.pi/skills/impeccable/reference/critique.md b/.pi/skills/impeccable/reference/critique.md index d6c4e0f55..b8068446f 100644 --- a/.pi/skills/impeccable/reference/critique.md +++ b/.pi/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.rovodev/skills/impeccable/reference/colorize.md b/.rovodev/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.rovodev/skills/impeccable/reference/colorize.md +++ b/.rovodev/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.rovodev/skills/impeccable/reference/critique.md b/.rovodev/skills/impeccable/reference/critique.md index d6c4e0f55..b8068446f 100644 --- a/.rovodev/skills/impeccable/reference/critique.md +++ b/.rovodev/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.trae-cn/skills/impeccable/reference/colorize.md b/.trae-cn/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.trae-cn/skills/impeccable/reference/colorize.md +++ b/.trae-cn/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.trae-cn/skills/impeccable/reference/critique.md b/.trae-cn/skills/impeccable/reference/critique.md index d639d3650..04f48df56 100644 --- a/.trae-cn/skills/impeccable/reference/critique.md +++ b/.trae-cn/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/.trae/skills/impeccable/reference/colorize.md b/.trae/skills/impeccable/reference/colorize.md index 1bd52004f..176185e69 100644 --- a/.trae/skills/impeccable/reference/colorize.md +++ b/.trae/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/.trae/skills/impeccable/reference/critique.md b/.trae/skills/impeccable/reference/critique.md index d639d3650..04f48df56 100644 --- a/.trae/skills/impeccable/reference/critique.md +++ b/.trae/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary diff --git a/source/skills/impeccable/reference/colorize.md b/source/skills/impeccable/reference/colorize.md index 07ae3c3e1..b71896714 100644 --- a/source/skills/impeccable/reference/colorize.md +++ b/source/skills/impeccable/reference/colorize.md @@ -6,9 +6,9 @@ Strategically introduce color to designs that are too monochromatic, gray, or la ## Register -Brand: palette IS voice. A dominant color can own the page; unexpected combinations are allowed. Accent rate stays ≤10% — rarity is what makes it pop. +Brand: palette IS voice. Pick a color strategy first per SKILL.md (Restrained / Committed / Full palette / Drenched) and follow its dosage. Committed, Full palette, and Drenched deliberately exceed the ≤10% rule — that rule is Restrained only. Unexpected combinations are allowed; a dominant color can own the page when the chosen strategy calls for it. -Product: semantic-first. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. +Product: semantic-first and almost always Restrained. Accent color is reserved for primary action, current selection, and state indicators — not decoration. Every color has a consistent meaning across every screen. --- diff --git a/source/skills/impeccable/reference/critique.md b/source/skills/impeccable/reference/critique.md index 880feaffa..2f5321e30 100644 --- a/source/skills/impeccable/reference/critique.md +++ b/source/skills/impeccable/reference/critique.md @@ -182,11 +182,11 @@ Ask questions along these lines (adapt to the specific findings; do NOT ask gene - Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions. - Keep it to 2-4 questions maximum. Respect the user's time. - Offer concrete options, not open-ended prompts. -- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Step 5. +- If findings are straightforward (e.g., only 1-2 clear issues), skip questions and go directly to Recommended Actions. ### Recommended Actions -**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Step 4. +**After receiving the user's answers**, present a prioritized action summary reflecting the user's priorities and scope from Ask the User. #### Action Summary From 0760cdf3e907e7c96bb6524ac58933f5ffca4782 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 23 Apr 2026 18:03:57 -0700 Subject: [PATCH 125/125] fix(skill): update stale SKILL.md font-tag reference in typography.md typography.md pointed at SKILL.md's `` and `` XML tags, which were removed in the v3 consolidation and moved into brand.md as the "Font selection procedure" and "Reflex-reject list" sections. Agents loading typography.md via the craft flow were chasing content that no longer existed. Now points at brand.md with correct section names. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .pi/skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- .../skills/impeccable/reference/typography.md | 2 +- public/index.html | 19 +++++++++++++++++++ public/privacy.html | 3 +++ .../skills/impeccable/reference/typography.md | 2 +- 14 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.agents/skills/impeccable/reference/typography.md b/.agents/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.agents/skills/impeccable/reference/typography.md +++ b/.agents/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.claude/skills/impeccable/reference/typography.md b/.claude/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.claude/skills/impeccable/reference/typography.md +++ b/.claude/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.cursor/skills/impeccable/reference/typography.md b/.cursor/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.cursor/skills/impeccable/reference/typography.md +++ b/.cursor/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.gemini/skills/impeccable/reference/typography.md b/.gemini/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.gemini/skills/impeccable/reference/typography.md +++ b/.gemini/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.github/skills/impeccable/reference/typography.md b/.github/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.github/skills/impeccable/reference/typography.md +++ b/.github/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.kiro/skills/impeccable/reference/typography.md b/.kiro/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.kiro/skills/impeccable/reference/typography.md +++ b/.kiro/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.opencode/skills/impeccable/reference/typography.md b/.opencode/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.opencode/skills/impeccable/reference/typography.md +++ b/.opencode/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.pi/skills/impeccable/reference/typography.md b/.pi/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.pi/skills/impeccable/reference/typography.md +++ b/.pi/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.rovodev/skills/impeccable/reference/typography.md b/.rovodev/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.rovodev/skills/impeccable/reference/typography.md +++ b/.rovodev/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.trae-cn/skills/impeccable/reference/typography.md b/.trae-cn/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.trae-cn/skills/impeccable/reference/typography.md +++ b/.trae-cn/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/.trae/skills/impeccable/reference/typography.md b/.trae/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/.trae/skills/impeccable/reference/typography.md +++ b/.trae/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against diff --git a/public/index.html b/public/index.html index 2bbc4b709..78a359b12 100644 --- a/public/index.html +++ b/public/index.html @@ -90,6 +90,14 @@ + + + + + + + +

    Impeccable

    Design fluency for AI harnesses

    @@ -134,6 +142,14 @@ + + + + + + + +
    @@ -1203,5 +1219,8 @@ + + + diff --git a/public/privacy.html b/public/privacy.html index 21421ef0e..d32f34df3 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -76,5 +76,8 @@

    Contact

    Questions about this policy? Open an issue on GitHub or reach out to @pbakaus.

    + + + diff --git a/source/skills/impeccable/reference/typography.md b/source/skills/impeccable/reference/typography.md index 6fc75ea9a..7134051a8 100644 --- a/source/skills/impeccable/reference/typography.md +++ b/source/skills/impeccable/reference/typography.md @@ -32,7 +32,7 @@ Use `ch` units for character-based measure (`max-width: 65ch`). Line-height scal ## Font Selection & Pairing -The tactical selection procedure and the full banned-fonts list live in SKILL.md's `` and `` tags (already loaded when this reference is consulted). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. +The tactical selection procedure and the reflex-reject list live in [reference/brand.md](brand.md) under **Font selection procedure** and **Reflex-reject list** (loaded for brand-register tasks). The rest of this section covers the adjacent knowledge: anti-reflex corrections, system font use, and pairing rules. ### Anti-reflexes worth defending against