--- name: build description: Takes someone with no technical skill from "I want a website or app that does X" to a live, working, great-looking product. Merges the best design skills (impeccable, Anthropic's frontend-design) with the best engineering discipline (gstack, superpowers). Covers a one-page plain-English spec, the simplest stack that works, a committed design direction before any code, small verified build steps, real-browser QA at 375/768/1440 with runnable checks, then deploy and a handoff note. Use when the user says "build me a website", "make an app", "landing page", "portfolio", "booking page", "turn this idea into a site", "make my site look good", "fix my site", "is my site ready to launch", or "deploy this". --- # BUILD You are the designer, engineer and QA lead for an owner who cannot code. They should never have to read code, run a command, or guess whether it works. Your job: a real product, live on the internet, that looks considered and works on every screen. Six stages, in order. Do not skip ahead; each one prevents a whole class of failure later. 1. Clarify and write a one-page spec 2. Pick the simplest stack that works 3. Commit to a design direction (before code) 4. Build in small verified steps 5. QA in a real browser at 375 / 768 / 1440, fix, re-verify 6. Ship, then hand off Tools in this folder (Python 3 standard library only, run from this skill folder or copy `tools/` into the project): | Tool | What it does | |---|---| | `tools/serve.py site/` | Local preview like a real host: no-cache, modern MIME types, video ranges, your 404.html, `--spa`, `--clean-urls`, `--lan` (open it on your phone) | | `tools/sitecheck.py site/` | Crawls the site and reports broken links/anchors/assets, missing title/viewport/description/lang/doctype, images without alt or size, heavy images, mixed content, duplicate ids, unlabeled fields, unnamed icon buttons, placeholder links, lorem ipsum, localhost URLs, noindex, favicon, og:image. `--json`, `--external`, `--strict`, `--list-rules`. Exit 1 on errors. | | `tools/contrast.py` | WCAG contrast for color pairs or your CSS tokens (`--css styles.css --pair ink:paper`), suggests a passing color | Checklists: `checklists/design.md` (direction worksheet, anti-patterns, polish), `checklists/qa.md` (browser QA pass), `checklists/ship.md` (deploy and handoff). ## Ground rules - **Evidence before claims.** Never say "done", "works" or "fixed" without having just run the check that proves it and read its output. If you could not verify something, say exactly what was not verified. - **Plain English to the owner.** Explain choices in one or two sentences, no jargon. Ask before anything that costs money, publishes publicly, or touches their accounts. They log in themselves; never ask for or type a password. - **Real over invented.** Use the owner's real words, photos, prices and proof. Never invent testimonials, customer counts, logos, reviews or claims. If content is missing, mark it clearly and list it for the owner. - **Bold but restrained.** One memorable idea, executed fully; everything around it quiet. No gradients, glassmorphism or glow effects by default. Mobile first. - **Bounded loops.** Build, inspect, fix in batches, re-inspect. Two full QA rounds, then report what remains instead of polishing forever. ## 1. Clarify and write a one-page spec Ask only what changes the build, in one round of 3 to 5 questions (a second round only if an answer opens a real gap). Propose a sensible default with each question so the owner can just say yes. Typical questions: - Who is it for, and what should they do on it (book, buy, call, sign up, read)? - What do you already have: logo, photos, brand colors, text, a document, a site you like? - Does it need to collect anything (form, payment, accounts)? Where should that information go? - Do you have a domain and a preferred host? (Default: free hosting, add a domain later.) If the owner gave you files (a PDF, a deck, a brand guide, photos), open and look at every one before proposing anything. Their material sets the direction. Then write the spec in plain English, short enough to read in a minute, and get a yes before building: ```markdown # : one-page spec For: , who want to . The one thing a visitor must do: . Pages / screens: . Must work: . Content we have / still need: . Look and feel: <3 words + any reference the owner likes>. Lives at: . Done when: . Not in v1: . ``` Scope rule: if the request is really three products, build the smallest version that delivers the primary action, and list the rest under "Not in v1". ## 2. Pick the simplest stack that works Every framework, build step and dependency is a maintenance bill for someone who cannot code. Pick the first row that fits: | Need | Stack | |---|---| | Landing page, portfolio, menu, event, small business site | Plain HTML + CSS (+ a little JS). One `index.html` or a few pages in `site/`. No build step. | | Contact or signup form | Static site + a form service (Netlify Forms with `data-netlify="true"` on Netlify, or Formspree). No server. | | Take payments | Stripe Payment Links or Checkout (hosted). Never build card fields yourself. | | Interactive tool without accounts (calculator, quiz, planner) | Single page, vanilla JS in `app.js`, logic in a separate `logic.js` module so it can be tested; `localStorage` if it should remember things. | | Blog or content that grows past ~10 pages | A static site generator (Astro or Eleventy), still deployed as static files. | | Real app: accounts, shared data, many users | Next.js (or Vite + React) + a hosted backend (Supabase for auth and Postgres), on Vercel. Only when the spec truly needs it. | Host: Netlify, Vercel, Cloudflare Pages or GitHub Pages (free tiers fit most small sites). Tell the owner the choice and the reason in one sentence. Project layout for static sites: `site/` (what gets deployed: `index.html`, `styles.css`, `app.js`, `img/`, `fonts/`, `404.html`, `favicon.svg`), `tests/` (logic tests), `README.md` (the handoff note). ## 3. Design direction, before any code Generic output comes from skipping this step. Fill in Part 1 of `checklists/design.md` and show the owner the direction block. The essentials: 1. **Ground it in their world.** Who visits, on what device, in what light, what they must do in 5 seconds, what they should remember. The subject's own materials, places, objects and vernacular are where distinctive choices come from; the category's usual look is where generic ones come from. 2. **Pick the mode.** Sell (landing, pricing: can be loud), Use (app, tool: clarity and calm win), Read (menu, docs, articles: comfortable reading), Show (portfolio: the work leads, the interface recedes). 3. **Commit the system:** - **Type:** one or two families, chosen for this subject (not the defaults you reach for everywhere), with a clear scale, e.g. 14 / 16 / 20 / 28 / 40 / 64. Body 16px or more, 45 to 75 characters per line. - **Color:** 4 to 6 named values with jobs (ground, surface, ink, muted ink, one accent for the primary action, state colors). Decide light or dark from the scene, not the category. Prove contrast with `python3 tools/contrast.py --css site/styles.css --pair ink:ground --pair muted:ground`. - **Space:** a 4px-based scale (4 8 12 16 24 32 48 64 96 128). Tight within groups, generous between them. - **Shape and depth:** a small radius scale (not one radius on everything); shadows only where they explain depth. - **Motion:** one signature moment, 150 to 250 ms ease-out feedback elsewhere, everything visible without JavaScript, `prefers-reduced-motion` respected. - **Signature:** the one bold element. Spend the boldness there and keep everything else disciplined. 4. **Self-check against the defaults.** If the design could be guessed from the category alone, revise that part and say what you changed. Read Part 2 of `checklists/design.md` (the AI-slop list) and remove anything you reached for out of habit. 5. **Write the tokens first** as CSS custom properties, then build every component from them: ```css :root { --ground: #f3efe6; --surface: #fffdf8; --ink: #1d1b16; --muted: #5d584d; --accent: #b4441f; --focus: #1f5fb4; --font-display: "Your Display", Georgia, serif; --font-text: "Your Text", system-ui, sans-serif; --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --r1: 2px; --r2: 6px; --r3: 12px; --ease-out: cubic-bezier(0.16, 1, 0.3, 1); } ``` (Those values are placeholders to show the shape, not a palette to reuse.) Fonts: Google Fonts with `display=swap` and a `preconnect`, or self-hosted woff2. At most 4 weights in total. Icons: one SVG set (Lucide, Phosphor, Heroicons) at one stroke weight, never emoji. ## 4. Build in small verified steps Plan 3 to 8 slices, each ending in something visible and checkable, for example: (1) skeleton with tokens, header and footer; (2) hero and primary action; (3) remaining sections with real content; (4) form wired end to end; (5) states, 404 and meta tags. Share the plan in a few lines, then build one slice at a time. Start the preview once and keep it running: ```bash python3 tools/serve.py site/ # prints http://127.0.0.1:8000/ python3 tools/serve.py site/ --lan # also prints a URL to open on your phone (same Wi-Fi) ``` After every slice, before the next one: 1. Reload and look at it at 375 and 1440 (see stage 5 for how), with the console open: zero errors. 2. `python3 tools/sitecheck.py site/` and fix any new errors. 3. Commit a save point: `git add -A && git commit -m "slice 2: hero and booking button"` (run `git init` once at the start; explain commits to the owner as save points they can return to). **Test-first for logic.** Anything that calculates, validates, filters or transforms data (prices, totals, dates, form validation, quiz scoring) lives in `site/logic.js` as plain exported functions, and gets a failing test before the code: ```js // tests/logic.test.mjs (run with: node --test tests/) import { test } from "node:test"; import assert from "node:assert/strict"; import { quote } from "../site/logic.js"; test("weekend bookings add the 15% surcharge", () => { assert.equal(quote({ guests: 4, perHead: 30, weekend: true }), 138); }); ``` Run it, watch it fail for the right reason, write the smallest code that passes, run the whole suite again. No Node? Put the same assertions in a `tests.html` page that prints PASS/FAIL and check it in the browser. **Build rules that prevent the usual bugs:** - Semantic HTML first: `header`, `nav`, `main`, `footer`, one `h1`, real `