diff --git a/CLAUDE.md b/CLAUDE.md index f3b5082..ef7b6f1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,7 +57,10 @@ Pre-commit is configured with `no-commit-to-branch` — direct commits to `main` - `templates/` — copy-paste boilerplates organized by category: `ansible.md`, `docker/` (genericStack, n8n-compose), `scriptTemplates/` (Go, Python, Shell), `serverlessFunctionTemplates/` (AWS Lambda, GCP, Netlify), `webTemplates/`. Each category directory has a README; the root README has a full template index. - `scripts/` — standalone scripts and utilities: `appleScripts/` (AppleScript/Automator apps with accompanying notes), `cmd/` (command snippets). -- `ai/` — AI assets (skills, prompts, agents, rules, evals, etc.); mostly placeholder directories at this stage. +- `ai/` — AI assets organized by type: `skills/`, `prompts/`, `agents/`, `rules/`, `evals/`, `tools/`, `workflows/`, `mcp/`, `knowledge/`, `memories/`. Most are placeholder directories for now; `skills/` is the populated one. Skills follow the Agent Skills convention — a `SKILL.md` with YAML frontmatter (`name`, `description`) plus optional `references/`. Current content is a `design/` suite for the Claude Design → code workflow: + - `skills/design/explore-designs/` — guides using Claude Design to explore design directions (asks about the target frontend stack/tooling). + - `skills/design/create-design-system/` — placeholder for design-system setup. + - `skills/design/design-handoff/` — full skill: reconcile a finished Claude Design export into a real codebase (tokens → shadcn/Tailwind v4 OKLCH, `/brand` page, contrast + licensing gates). - `snippets/` — small reusable code snippets (placeholder). - `docs/` — project docs, e.g. the new-project checklist. - `test/` — tool configuration used by scans (e.g. `whisperConfig.yml` for Whispers); not actual tests. diff --git a/README.md b/README.md index d37deb7..514226f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Author: Evan Harmon | --- | --- | | [`templates/`](./templates/) | Copy-paste boilerplates organized by category — see the [template index](#template-index) below | | [`scripts/`](./scripts/) | Standalone scripts and utilities (AppleScript/Automator apps, command snippets) | -| [`ai/`](./ai/) | AI assets — skills, prompts, agents, rules, evals, etc. (work in progress) | +| [`ai/`](./ai/) | AI assets — skills, prompts, agents, rules, evals, etc. — see the [AI assets index](#ai-assets) below | | [`snippets/`](./snippets/) | Small reusable code snippets (work in progress) | | [`docs/`](./docs/) | Project docs, e.g. the new-project [checklist](./docs/CHECKLIST.md) | @@ -38,6 +38,16 @@ Author: Evan Harmon See [`templates/README.md`](./templates/README.md) for conventions and per-category details. +## AI Assets + +`ai/` collects reusable AI assets organized by type — `skills/`, `prompts/`, `agents/`, `rules/`, `evals/`, `tools/`, `workflows/`, `mcp/`, `knowledge/`, and `memories/`. Most are placeholders for now; the populated area is **skills**, which follow the Agent Skills convention (a `SKILL.md` with `name`/`description` frontmatter). + +| Skill | Status | Description | +| --- | --- | --- | +| [`design/explore-designs`](./ai/skills/design/explore-designs/) | Draft | Guides using Claude Design to explore design directions across your frontend stack | +| [`design/create-design-system`](./ai/skills/design/create-design-system/) | Placeholder | Design-system setup | +| [`design/design-handoff`](./ai/skills/design/design-handoff/) | Ready | Reconciles a finished Claude Design export into a real codebase — tokens → shadcn/Tailwind v4 OKLCH, `/brand` page, contrast + licensing gates | + ## Inspired by Other Boilerplate Repos - diff --git a/ai/skills/design/create-design-system/.gitkeep b/ai/skills/design/create-design-system/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ai/skills/design/design-handoff/SKILL.md b/ai/skills/design/design-handoff/SKILL.md new file mode 100644 index 0000000..a54a0ec --- /dev/null +++ b/ai/skills/design/design-handoff/SKILL.md @@ -0,0 +1,191 @@ +--- +name: design-handoff +description: >- + Implement a finished Claude Design in the actual code repo. Use this whenever + the user has exported a design from Claude Design (Anthropic's design canvas product) + and wants to turn it into real code — phrases like "I finished designing in + Claude Design", "implement this design", "do the design handoff", "I exported + the handoff bundle", "turn this design into code", etc. This is the Claude Design → + code-repo implementation workflow for the stack in this repo. + NOTE: this is NOT session/context handoff between + agent sessions — it is specifically about implementing a visual/UX design in code. + Trigger it even if the user doesn't say the word "skill". +--- + +# Design Handoff (Claude Design → repo) + +Turn a finished Claude Design into working, on-brand code in this repo. The native Claude Design export drops a **handoff bundle** (usually standalone HTML/CSS/JS, screenshots, the tokens it used, and a README) into the repo; your job is to reconcile that generic bundle into _this repo's_ conventions — not to paste it in verbatim. + +The core principle running through every step: **`src/styles/globals.css` is the canonical runtime token source, and `DESIGN.md` is the AI-facing statement of intent.** When they disagree, `globals.css` wins for runtime. The handoff bundle is the reference for the _intended_ design — it stays in place until **the user has reviewed the implementation and approved it**, and only then is it removed before merge. Never assume your implementation is correct; the user decides whether it matches the intent. + +## Definition of done + +Copy this checklist into your reply at the **start** of the run and tick each +box as you finish it. Do not report the handoff complete until every box is +checked. The three **gates** are blocking — you may not take the action a gate +guards until its box is true. + +Reconciliation + +- [ ] Implemented from the canonical **un-suffixed** sources, not the `?v=N` snapshots +- [ ] Tokens merged into `globals.css` by **role** (not export name), for Tailwind v4, OKLCH, three-layer — export never blind-pasted +- [ ] `.dark` authored by hand: brand hue held constant, neutrals inverted +- [ ] `DESIGN.md` reconciled, not clobbered + +Implementation + +- [ ] shadcn/ui + Lucide only; styled **exclusively** with semantic tokens (zero arbitrary hex / one-off color literals) +- [ ] States covered: default, empty, loading, error, disabled +- [ ] `/brand` updated in the **same** change (can't drift from `DESIGN.md`/`globals.css`) +- [ ] Assets placed correctly: static → repo, dynamic/user media → R2; fonts self-hosted OFL/Apache `.woff2` in public/fonts; favicons generated from the mark +- [ ] OKLCH for color values; **three-tier semantic** token naming (primitive → semantic → component). + +Gates (each blocks the action it guards — do not proceed until true) + +- [ ] **Licensing** (blocks commit): every font/icon/image cleared for commercial use; anything unclear stopped and flagged, not guessed +- [ ] **Contrast** (blocks sign-off): static `task lint:design` green **and** rendered ratios measured on the running page — both themes, every text role incl. long-form prose — reported as **numbers**, never "looks fine". WCAG AA (4.5:1). +- [ ] **Sign-off** (blocks deletion): screenshots shown (both themes, all built states), deltas surfaced, user has **explicitly approved** — not inferred from a green build or your own confidence + +Close-out (only once the sign-off gate is true) + +- [ ] `task verify` green and the build compiles; hooks never bypassed (`--no-verify` prohibited) +- [ ] Handoff bundle deleted (or a thin screenshot + intent note extracted first if states remain) +- [ ] `docs/design/` updated; DDR flagged if a real design-system decision was made +- [ ] Conventional Commit; PR opened for human review (no direct merge to `main`) + +## Inputs + +- A handoff bundle at `docs/design/handoff-/`. If you can't find one, ask the user where the export landed (or whether they've exported yet) before proceeding. +- The existing repo: `DESIGN.md` (root), `src/styles/globals.css`, `docs/design/`, `Taskfile.yml`, and the project's `CLAUDE.md`. + +## Stack (target for all implementation) + +TypeScript 6 or above, React, Vite, pnpm, Node 24 or above, Astro 6 or above, Tailwind CSS v4 or above, shadcn/ui, Cloudflare Pages/Workers. Favor **shadcn/ui** for components and **Lucide** for icons. + +--- + +## Procedure + +Work through these in order. Explanations of _why_ are included because they change how you make judgment calls. + +### 0. Locate and read the bundle + +`view` the `docs/design/handoff-/` directory. Read the README (it states the design intent and structure), look at the screenshots, and note the tokens and component structure it used. This is your spec — but it's a _generic_ spec, not yet adapted to the stack. + +**Load the file the prototype actually renders, not a stale snapshot.** Claude Design exports cache-bust its scripts with query strings, e.g. `