Skip to content

prototype(look): a dozen tokens and a brief make a tool read as its company - #572

Closed
allisonmahmood wants to merge 4 commits into
mainfrom
prototype/company-look
Closed

allisonmahmood wants to merge 4 commits into
mainfrom
prototype/company-look

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Prototype: will not merge. It stays open as the record of #563, step 1 of #547. The verdict is accepted and settled on #547; the build continues in #564 to #569.

#547 bets that about a dozen fixed tokens, plain-element styles and a brief are enough for a fresh agent to build a tool that reads as the company. The build tickets (#565 to #569) lock the token names, the publish checks and generation, and token names become a contract every patch depends on. So this checks the bet before any of that is built.

Comparison page: https://post.patchyhq.com/d/od3afj7fpmhi (public, unlisted)

What's here

  • Four looks. Linear, Duolingo, Vanguard and the Patchy look, each captured by an agent following a draft of the global skill's capture reference (capture.md). Each has look.css, LOOK.md, a placeholder logo and the agent's capture notes. No brand fonts or real logos.
  • The specimen. The fixed page a look is judged by (specimen/specimen.html).
  • Fresh-agent runs. Six of them share one prompt. Opus 5.5 with no conversation context built a tier 1 spend-request tracker in each look and once with no look. A seventh prompt, a Halloween contest, ran in a repo carrying Vanguard's look. Two more changed the finished Linear tool after Duolingo's look arrived as a new revision: one extended it, and one was told to update it to the current look. Each run's sources and report are in runs/.
  • A CLI switch that stands in for generation. With PATCHY_PROTOTYPE_LOOK, init, refresh and dev start write patchy/_generated/look.css, the logo and a patchy-look skill. The scaffold imports the look. Nothing else on the platform changed.
  • Checks and measurements. scripts/check.mjs runs the draft look publish checks, and scripts/measure-run.mjs measures how each tool used the look. prototypes/company-look/README.md has the file map.

What it found

  • Each look tool reads as its company; the no-look control doesn't.
    • How the agents found the look: only through one line in AGENTS.md. Each read the skill before writing CSS, never edited generated files, and lifted the brief's component recipes nearly verbatim.
    • Cost: 3.5 to 5 minutes and about $1.30 a build, with 85 to 100 token references per tool. The only colour literals are status colours.
    • The control: with no look, the agent found the global skill's plan-doc style in node_modules and rebuilt it by hand: 672 lines, 21 literals and 25 variables of its own.
  • Overrides work. The Halloween agent removed the look import and said once that the page doesn't use the company look.
  • A new look revision needs no code change for colours, fonts, radius, logo and light or dark: 12 of 12 re-skins. Structure and voice stay as built. Two things broke:
    • hard-coded status colours stayed light on a dark look;
    • Linear's 4px spacing unit, against everyone else's 8px, changed density by about 50%.
  • Fonts. Fonts embedded in look.css as data: load in the tier 1 frame. Three Inter weights make look.css 418 KB. Without them, the fallback stacks still read as the brand.
  • Changing an existing tool after a revision.
    • Asked to add features, an agent kept the tool's own style, as the precedence rule says. It also had to reset Duolingo's lipped plain-button style, which had leaked onto the tool's own buttons.
    • Told "update this tool to our current look", an agent rebuilt it in Duolingo's style in under 4 minutes.
  • Astra's review (GPT-6 Astra) tightened the token definitions, the contrast rule and the "no look" state. It listed what each build ticket still has to test; the comparison page carries that list.
  • Captures took 8 to 14 minutes, with no bot blocks at Linear, Duolingo or Vanguard.

Verdict (accepted by Allison, 2026-10-07)

  1. Fifteen tokens: the 13 plus --look-success and --look-warning. Colour tokens are opaque #RRGGBB.

    • Status colours were the one gap every capture and three of the four tools hit, and the only thing that broke in a re-skin.
    • Pending is neutral, shown in fg or muted, not warning.
    • --look-link stays: all four looks set it apart from the accent.
  2. Tighter definitions, since the names are a permanent contract:

    • --look-accent: the principal brand emphasis fill. Text on it uses --look-accent-fg. It doesn't mean the primary button, selection or status; three of the four brands don't fill their primary button with it. A plain button is the look's call.
    • --look-space: the reference layout gap, nominally 8px, not the smallest grid step. A label gap is half of it, related controls one, panel padding three. Linear's 4px made re-skins change density by about 50%.
    • --look-surface: an alternate ground that carries the same foregrounds as bg.
    • --look-border: decorative separators and frames. Control outlines are the look's call.
  3. One contrast rule. Every foreground (fg, muted, link, danger, success, warning) reaches 4.5:1 on both bg and surface, and accent-fg reaches it on accent. Today's looks would need three small fixes: Duolingo's danger (4.30) and muted on surface (4.24), and Vanguard's muted on surface (4.21).

  4. Not added:

    • a mono font, a second radius, a border width, surface levels, a danger foreground, type-scale tokens;
    • a dark variant. One look is one colour scheme, and color-scheme may sit in :root.

    Recipes carry literals for sizes, weights, shadows and pills.

  5. The brief keeps its nine sections, and recipes ship markup with their CSS. One agent had to rebuild the tabs recipe on buttons because it styled links. Components must include a badge per status (neutral too), tabs or a segmented filter, a select and a small button. The reference allows pseudo-classes in element styles, and literal sizes.

  6. The specimen keeps its current contents and adds a badge per status, plus focus, hover, invalid, disabled and busy states. It checks look.css and the tokens, not the brief's recipes, and it says so.

  7. Size cap: the folder is at most 512 KiB of published bytes, embedded fonts included. LOOK.md is at most 32 KiB.

  8. "No company look" stays a state. Generation writes the Patchy look as Patchy's default, with no company logo and never as a company revision. look restore none returns to it.

  9. A new revision recolours existing tools; it doesn't restructure them. In the revision runs, an agent extending the Linear tool under Duolingo's look kept the tool's own style, as the precedence rule says. An agent told "update this tool to our current look" rebuilt it in Duolingo's style in under 4 minutes. Change notices say this, and the way to match a new look is that one line, pasted to the owner's agent.

  10. Plain-element styles carry no signature effects. Duolingo's plain button (lip shadow, press transform, uppercase) leaked into the Linear tool's own tab and ghost buttons after the revision, and the agent had to reset it. In look.css, element styles set colours, fonts, borders, radius and spacing only. Shadows, transforms, text-transform and letter-spacing go in the brief's recipes, which patches copy and own.

Try it

pnpm install && pnpm dev up team        # prints the environment folder
export PATCHY_DEV_ENV=<that folder>
node prototypes/company-look/scripts/check.mjs       # publish checks over every look
node prototypes/company-look/scripts/specimen.mjs    # .local/company-look/specimen-<look>.png
node prototypes/company-look/scripts/comparison.mjs  # .local/company-look/comparison.html
prototypes/company-look/runs/run.sh spend-mine linear TASK.md "Spend requests"   # a fresh agent in a look

Run agents from a folder outside $HOME. Claude Code loads ~/.claude/CLAUDE.md as an ancestor file even with --setting-sources project, which includes the pnpm dev up agent workspace, so its agent isn't fresh.

  • Not breaking: prototype, never merged.

Built by Claude Opus 5.5 in Claude Code, running in T3 Code.

…sh-agent tools

Throwaway build for #563, never merged. Four looks (Linear, Duolingo,
Vanguard and the Patchy look) captured by following a draft capture
reference; the specimen; six fresh agents building the same tier 1 tool
in each look, with no look, and a Halloween page over Vanguard's look;
twelve re-skins; the publish checks over real brands; and a CLI switch,
PATCHY_PROTOTYPE_LOOK, that stands in for look generation.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area:cli Touches the cli area area:docs Touches the docs area size:xl Over 1,000 changed lines; review in multiple passes labels Oct 6, 2026
…eview in the verdict

Two fresh agents changed the finished Linear tool after Duolingo's look arrived as a
new revision: one extended it, one was told to update it to the current look.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Prototype, will not merge, real version has already been merged and deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Touches the cli area area:docs Touches the docs area size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant