Skip to content

Make Agent Design Taste installable, routable and internally consistent - #1

Merged
aievolutionpl merged 1 commit into
mainfrom
claude/design-taste-onboarding-q6c7re
Sep 4, 2026
Merged

aievolutionpl merged 1 commit into
mainfrom
claude/design-taste-onboarding-q6c7re

Conversation

@aievolutionpl

Copy link
Copy Markdown
Owner

The design knowledge was already strong. The gaps were onboarding, context routing, and a handful of rules that contradicted each other. This addresses all three without replacing any existing system.

98 files changed · +10,632 / −1,797


1. Onboarding — the README as a mental installer

A human should know what to do in 30 seconds; an agent reading the same file should know too.

  • AGENT-BOOTSTRAP.md — a 75-line universal entry point: 10 steps, reading order by task, and an explicit what NOT to load table.
  • README.md rewritten — three concrete install modes (one-shot / project / global), a copy-paste one-shot prompt, a FOR AI AGENTS section, the workflow diagram, measured context costs, and a verification question to confirm the install worked.
  • README.pl.md — full Polish translation, language switch at the top of both. No more mixed languages in one file.
  • docs/INTEGRATIONS.md — per-agent setup for Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, Gemini CLI, Lovable and v0. Every mechanism was checked against that tool's own documentation before being written down — file paths, precedence order, size caps, frontmatter fields. Nothing guessed.
  • adapters/ + scripts/install.sh — copy-paste instruction files per agent, installed with one command (--dry-run and no-overwrite-without---force).

2. Context routing — never load all 15 styles

  • docs/CONTEXT-PROFILES.md — LIGHT (~3k) / STANDARD (~8k) / FULL (~25k), with per-file token costs measured by validate.py --budget, not estimated.
  • design-taste.manifest.json + styles/index.json — machine-readable routing: ids, aliases, paths, scoring weights, veto conditions, supporting and incompatible styles. Another agent can route without parsing prose.
  • All 15 style DNAs together cost ~41k tokens. One costs ~2.7k and is already a complete brief. That argument is now stated in the README, the bootstrap, the skill and the manifest.

3. Contradictions resolved

Was Now
SKILL.md said "390px first"; step 8 and three other files said 375px 390 × 844 is canonical, 360 is the narrow floor. One ladder: 1440 / 768 / 390 / 360. Enforced by a validator check.
SKILL.md: "never invent colors/fonts outside the chosen tokens" vs DECISION-MATRIX: "keep existing brand colors/fonts" One precedence chain in docs/PRECEDENCE.md: brand & legal ▸ accessibility ▸ product ▸ style DNA ▸ repo tokens ▸ agent taste, plus ANALYZE → MAP → ADAPT for projects that already have a design system, and an explicit rule for the brand-vs-contrast collision (keep the brand, derive an accessible variant in the same hue family).
README showed a style folder with 4 files and linked a non-existent assets/decision-tree.png Real structure including tokens.json and tokens.tailwind.css — the strongest argument for developers.

4. Deepened, not replaced

  • DECISION-MATRIX.md — 11 brief signals, absolute veto gates, and a weighted scoring card per style. The agent must now output why the runner-up loses.
  • ANTI-SLOP.md — BLOCKER / STRONG SMELL / MINOR SMELL severity, plus new detections (every section in a card, generic icon grids, meaningless metric cards, generic marketing copy, desktop merely stacked for mobile).
  • evaluation/DESIGN-TASTE-SCORE.md — 13 weighted categories summing to 100, 8 hard blockers that fail a design regardless of total, accessibility carrying the highest single weight (12).
  • LAYOUT-PATTERNS.md — the 43 patterns became a decision library: when to use, density fit, fitting/conflicting styles, mobile recomposition, CTA placement, accessibility notes, and the common AI mistake for each.
  • typography/, visual-language/, component-patterns/ substantially expanded (typeface signals and metrics, Polish/CE diacritics, font-loading cost; per-style image direction table; 19 components × 8 interaction states).
  • New accessibility/ACCESSIBILITY.md (a quality gate with a per-style failure table) and responsive/RESPONSIVE-FOUNDATIONS.md (recomposition, not stacking).
  • All 15 style DNAs restructured into one 24-section architecture. Each gained a design philosophy, responsive behaviour, style combinations, and a real signature move — the generic placeholder is gone. Individuality preserved: Neumorphism still warns about itself, Maximalism still doesn't apologise.

5. Bugs fixed

  • gen_tokens.py emitted invalid Tailwind v4: --color--bg (doubled prefix), --radiu--sm (rstrip('s') ate the namespace), --fontSize--h1 (camelCase). Now correct --color-* / --text-* / --radius-* / --shadow-* / --ease-* / --container-* namespaces.
  • tokens.json keys had leading dashes ("-bg").
  • Both scripts had a hard-coded absolute path from the author's machine.
  • Five styles were missing token categories they were documented as having; 15-expressive-kinetic-typography had no --shadow-focus at all, which is an accessibility requirement.
  • 07-neumorphism had a duplicated "When NOT to use" section and a vague citation; an unverifiable research citation in MODE-ROUTING.md was removed.

6. Verification

python3 scripts/validate.py            # 943 checks — all passing
python3 scripts/validate.py --budget   # measured context cost per file
node    scripts/screenshot.mjs 10      # render at 1440/768/390/360

scripts/validate.py checks style folders, required files, token categories, generated-file freshness, the 24-section architecture, every internal link, every example.html parse, manifest path resolution, duplicate ids and aliases, and stale viewport references.

scripts/screenshot.mjs renders any page or example at all four canonical viewports and exits non-zero on horizontal overflow at mobile — it makes rendered verification a step you can run, not an instruction you can skip. Screenshots go to a gitignored directory; no binaries added.

A GitHub Actions workflow runs the validator, verifies generated files are committed, prints the context budget, and smoke-tests the installer.

Also added: CONTRIBUTING.md (with a full checklist for style #16), CHANGELOG.md, LICENSE, docs/STYLE-TEMPLATE.md, docs/EXAMPLE-WORKFLOW.md (one brief followed end to end, with the actual context cost at the bottom).

Compatibility notes

Three changes are breaking for anyone who pinned to the old structure, and are listed in CHANGELOG.md:

  1. Style README headings changed (24-section architecture) — deep links to anchors need updating.
  2. 375px390px as the canonical mobile viewport.
  3. SKILL.md hard rule 3 was rewritten.

Core directory names were deliberately not renamed — external installations reference them by path.

Not done

  • No screenshot binaries committed (script provided instead, per "do not add giant binary assets unnecessarily").
  • The preview gallery links to docs/index.html with instructions for enabling GitHub Pages, rather than claiming a live URL I could not verify from this environment.
  • Per-style hero / dashboard / mobile example variants were not added — each style still ships one example.html. Worth a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MSG5kjLk3ZvmZy2C4B17kP


Generated by Claude Code

The design knowledge was already strong. The gaps were onboarding, context
routing, and a handful of rules that contradicted each other. This addresses
all three without replacing any of the existing systems.

Onboarding
- AGENT-BOOTSTRAP.md: a 75-line universal entry point (10 steps + what NOT to load)
- README rewritten as a dual human/agent entrypoint: three concrete install
  modes, a copy-paste one-shot prompt, a FOR AI AGENTS section, the workflow
  diagram, and measured context costs
- README.pl.md: full Polish translation with a language switch in both files
- docs/INTEGRATIONS.md: per-agent setup for Claude Code, Codex, Cursor,
  Windsurf, GitHub Copilot, Gemini CLI, Lovable and v0 — every mechanism
  checked against that tool's own documentation, nothing guessed
- adapters/ + scripts/install.sh: copy-paste instruction files per agent

Context routing
- docs/CONTEXT-PROFILES.md: LIGHT / STANDARD / FULL with per-file token costs
  measured by `validate.py --budget`
- design-taste.manifest.json + styles/index.json: machine-readable routing —
  ids, aliases, paths, scoring weights, veto conditions, style compatibility
- The rule made explicit everywhere: never load all 15 styles (~41k tokens)

Contradictions resolved
- Canonical mobile viewport is now 390px (360 as the narrow floor). The repo
  previously said "390px first" in one place and 375px in another.
- SKILL.md hard rule 3 rewritten. "Never invent colors/fonts outside the chosen
  tokens" conflicted with "preserve existing brand colors/fonts". Both are now
  expressed through one precedence chain (docs/PRECEDENCE.md):
  brand ▸ accessibility ▸ product ▸ style DNA ▸ tokens ▸ agent taste,
  with ANALYZE → MAP → ADAPT for projects that already have a design system.

Deepened, not replaced
- DECISION-MATRIX: 11 brief signals, absolute veto gates, weighted scoring
  cards per style — the agent must now say why the runner-up loses
- ANTI-SLOP: BLOCKER / STRONG / MINOR severity + new detections
- DESIGN-TASTE-SCORE: 13 weighted categories summing to 100, 8 hard blockers,
  accessibility carrying the highest single weight
- LAYOUT-PATTERNS: 43 patterns became a decision library (when to use, density,
  fitting/conflicting styles, mobile recomposition, CTA, a11y, AI mistake)
- typography / visual-language / component-patterns substantially expanded;
  new accessibility/ and responsive/ foundations
- All 15 style DNAs restructured into one 24-section architecture, each gaining
  a design philosophy, responsive behaviour, style combinations and a real
  signature move — individuality preserved

Fixed
- gen_tokens.py emitted invalid Tailwind v4 (--color--bg, --radiu--sm,
  --fontSize--h1); now correct namespaces. tokens.json keys had leading dashes.
- Scripts had a hard-coded path from the author's machine
- Five styles were missing documented token categories; kinetic typography had
  no --shadow-focus at all, which is an accessibility requirement

Verification
- scripts/validate.py: 943 structural checks (folders, links, generated-file
  freshness, token categories, the 24-section architecture, example HTML)
- scripts/screenshot.mjs: renders any page at 1440/768/390/360 and fails on
  mobile overflow — makes rendered verification a real step, not an instruction
- GitHub Actions workflow running all of it
- CONTRIBUTING.md, CHANGELOG.md, LICENSE, docs/STYLE-TEMPLATE.md

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSG5kjLk3ZvmZy2C4B17kP
@aievolutionpl
aievolutionpl marked this pull request as ready for review September 4, 2026 15:03
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@aievolutionpl
aievolutionpl merged commit 45d9dd6 into main Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants