Skip to content

feat(patchy): onboarding sets up the company look, and the personal default style retires - #582

Closed
allisonmahmood wants to merge 45 commits into
mainfrom
look/569-look-onboarding
Closed

allisonmahmood wants to merge 45 commits into
mainfrom
look/569-look-onboarding

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Onboarding still captured a personal style.md that only one person's static pages ever read, and a static page in a company with no look had no way to reach the Patchy look. This moves onboarding and the global skill to the company look and retires the personal default style.

Onboarding. Right after login, the agent runs patchy look --json and whoami:

  • An admin whose company has no look gets a guess from their email domain ("You're at acme.com. Want your tools to look like Acme?"). A webmail address gets no guess: the agent asks for a site once, or moves on. On yes, it captures the site on the person's machine, shows the specimen with patchy look preview, sums the look up in one line and publishes revision 1.
  • A member is asked nothing. Someone joining a company with a look is told their tools will use it.
  • The portal's setup line (Set up Patchy using …/llms.txt) runs this step too, because that login is the first time an agent meets a company's creator.

The global skill.

  • Static pages, the welcome page included, settle their style in the spec's order: what the person asked for, the page's own style, the company look, the Patchy look.
  • Agents write patchy look --json to a file and copy look.css and the logo by script, because embedded fonts can make the read half a megabyte. When the read fails, they fix the login or retry, and write a plain page rather than invent a look.
  • The welcome page's CSS now uses only the look's tokens, so it takes whichever look applies. Its badges carry status in text and border on bg or surface, the grounds the look checks verify.
  • The look changes only on an explicit request. A member is told who the admins are and can publish a draft's specimen as a page to show them. An admin sees look preview --compare before look publish.
  • style-file.md becomes look-capture.md, built from the prototype's capture draft and its four capture notes. patchy-plan-style.md goes, because the Patchy look replaces it.

The wire. GET /api/look (and patchy look --json) now carries patchyLook: the Patchy look's look.css and LOOK.md while current is null, and null otherwise. It also carries admins, so a member's agent can name the admins without attempting a change. The Patchy look moves from packages/sdk/looks/patchy/ to packages/companies/looks/patchy/. Looks reads it once, and both generation and the look API use that one copy. Its brief now heads pages with the company's name, since the stand-in never carries Patchy's logo.

Retired. status --json drops hasDefaultStyle, and nothing reads or writes style.md. There is no migration, since nobody has a setup yet.

Tried with fresh agents (Claude Code in /tmp with only the rewritten skill, against pnpm dev up team plus two companies made through create-or-join):

  • An admin at a real company domain was asked the guess question. The agent captured the site from the product's own CSS in about three minutes, showed the specimen and published revision 1. It then published the welcome page in that look, logo included.
  • A Gmail admin got no guess, skipped, and got the welcome page in the Patchy look.
  • A member of a company with a look was asked nothing and told their tools use it.
  • A member asking for a darker green was told only Ada can change it, and published the draft's specimen as acme/look-draft.
  • An admin asking the same got look preview --compare and published revision 2 only after approving.
  • The creator's real path, on a machine with nothing installed: given only the portal's setup line, the agent ran the installer, relayed the login, then asked the guess question. llms.txt needed no change. After the capture, the person said "that's our marketing website, not our product". The agent didn't argue or publish; it found the app behind a login, asked for product material, re-captured from the help centre's app screenshots and the sign-in screen, and published revision 1 once approved. It then handed back to "ask for your first tool" without a welcome page.
  • Ambiguous domains: eng.<domain> was fetched and guessed as the bare domain. A domain that now redirects to another company's site was named as such, and the agent asked for the right site instead of guessing.

Closes #569

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

allisonmahmood and others added 30 commits October 7, 2026 04:39
Tier 0's content policy had no font-src, so default-src 'none' blocked
every font, even a data: one. Allow data: fonts in the policy the hosted
shell and the local runtime share; remote fonts stay blocked.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Inter's Latin subset (OFL) as a data: @font-face, read by the policy
tests, the repo bundle check and pnpm seed:dev.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
One pure module, @patchy/core/look, that the CLI and the instance both run:
the 15 tokens declared once each as opaque #RRGGBB, no !important, everything
inside @layer look, WCAG contrast for text on both grounds and accent-fg on
accent, data: URLs only, and the two size caps from the limits registry.
The four prototype looks, contrast-fixed, are its fixtures.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A company owns numbered look revisions, each with its author, time, note and
three files, and a nullable pointer to the current one. GET /api/look is for
any active member; POST /api/look/publish and /api/look/restore are admin-only
and refuse members with the active admins' names. Publishing reruns the core
look checks and serializes per company; restore moves the pointer only. Both
report business events after commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
patchy look prints the company's current revision and history, with the
files' contents under --json. look publish checks a look folder with the core
look checks before sending it; look restore takes a revision number or none.
A member's refusal relays the admins to ask in the failure document.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d commits

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Duolingo's lip, press and uppercase labels and Patchy's hover shadow and press
move from plain elements into LOOK.md recipes; element styles keep to colours,
fonts, borders, radius and spacing, as the verdict on #547 asks.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A token counts only in a :root rule directly inside @layer look, and
@Property may not register one. Escaped names, string addresses in
image-set() and src(), NUL characters, and a logo with script, handlers or
foreignObject are refused. A leading @charset and the @layer look; statement
are accepted.

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

Looks.Revision and Current become plain interfaces; nothing decodes them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s colour only

Refusing every @Property closes an escaped prelude registering a token; a look
never needs one. The Linear fixture's plain button hover drops its brightness
filter for a colour mix.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The specimen is one fixed page that ships in the CLI, styled only by a
look. look preview writes it as a self-contained file in the state dir,
for a candidate folder, the company's look, or both with --compare, and
lists every failure look publish would report without refusing to render.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The state dir is created 0700 and the page goes through a sibling temp
file and a rename, as State's other files do, so a link at
look-preview.html is replaced instead of truncating its target.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… has them

- hover and focus stand-ins replace each pseudo-class in place with :is(),
  inside :not() and :is() too, so negations and :focus:not(:focus-visible)
  behave as the real state would
- the specimen's own CSS follows the look unlayered, so its amount column
  and error spacing aren't overridden by the look's element styles
- badges keep text on the verified ground and carry status in the border
- no <form>, so the single-look page publishes as a tier 0 page
- compare frames are border-box, ending a 1px overflow; a browser test
  renders a compare page

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… as a page

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Generation writes it for a company with no look, so it has to be in the
server image; core's fixtures folder is not. The fixture helper reads it
from its new home.

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

Every generation now carries patchy/_generated/look.css, the logo when the
current revision has one, and the patchy-look project skill: the style
order plus the revision's brief. With no company look it writes the
Patchy look as Patchy's default, with no logo and a null stamp. index.json
records the revision as `look`, in the shape `patchy look --json` uses.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Tier 1 and 2 starters import patchy/_generated/look.css from src/main.tsx;
the tier 0 starter links it from index.html, and the single-file build
inlines it, embedded fonts included. AGENTS.md points at the patchy-look
skill. Tests cover the starter page building in a look with an embedded
font at tiers 0 and 1, and refresh swapping look files while page source
stays untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The CLI README, product doc, generate route, Publishing glossary (Managed
files, Project skill, Patchy look), skill distribution and context map say
how a repo gets the company look and what index.json's look records.
patchy-loop points agents at the patchy-look skill before styling, which
also reaches repos made before the scaffold imported the look. The image
build checks the Patchy look ships.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sequential replaces let a note containing <!-- look-brief --> take the
brief and leave the real marker unfilled. One pass over the template never
searches filled text. The generated README no longer calls the Patchy look
the company's.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The success and warning badges and the selected tab hard-coded colours
left from the 13-token prototype, so a page lifting them kept Patchy's
colours after the company published its own look. They now tint
--look-success, --look-warning and --look-accent. The provenance line no
longer names paths a patch repo doesn't have.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood and others added 8 commits October 7, 2026 08:45
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…mand

The scan now covers every HTML, CSS and script file outside dependencies,
builds, dot folders and generated files, so a root stylesheet that imports the
look counts, and it skips comment lines, so a commented-out import doesn't.
Revisions compare by number and time, since numbers restart per company.

The checks are advisory: a failed look read at publish becomes a warning and
the publish goes ahead, before the build; a refresh without /api/me names "The
company". Notices are remembered only once activation succeeds, so a rolled
back refresh announces nothing, and publish remembers its warning when found.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e admins

A static page settles its style with `patchy look --json`, but a company with
no look got `current: null` and nothing to style by. The read now carries the
Patchy look's `look.css` and `LOOK.md` as `patchyLook` while `current` is
null, and `admins`, so a member's agent can say who changes the look without
attempting a change.

The Patchy look moves from the SDK into Companies beside the look it stands
in for; `Looks` reads it once and generation uses the same copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The company look replaces the personal default style, so nothing reads or
writes `style.md` and `status --json` drops `hasDefaultStyle`. Nobody has a
setup yet, so there is no migration.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tand-in and admins

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…yle retires

Onboarding's style question becomes the company look: after login, an admin
whose company has no look is asked "You're at acme.com. Want your tools to look
like Acme?", from their email domain unless it is webmail; the agent captures
the site, shows the specimen and publishes revision 1. A member is asked
nothing, and someone joining a company with a look is told their tools use it.
The portal's setup line runs this step too, since it is the first moment an
agent meets a company's creator.

Static pages and the welcome page settle their style with `patchy look --json`
in the spec's order; the welcome page's own CSS uses only the look's tokens.
Changing the look takes an explicit request: a member hears who the admins are
and can show a draft's specimen as a page; an admin's change shows the
comparison first. `style-file.md` becomes the capture reference, and the old
plan-doc style goes now that the Patchy look is reachable.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling 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 7, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review round 1 (stack orchestration for #547): one Claude Opus 5.5 reviewer and three GPT-6.1 Sol reviewers (wire + CLI + retirement; the global skill as a fresh agent reads it; an independent fresh-agent probe of two acceptance scenarios against a dev instance), read-only against f272c07.

Agreed sound: the look read's new shape (patchyLook when the company has none, admins shared with the refusal) with docs/API.md rendered clean; the Patchy look owned by Companies, read once at startup, shipped without its logo and checked into the image; style.md and hasDefaultStyle gone everywhere, status --json down to six keys, the lock hash matching; the deleted references replaced by look-capture.md carrying the prototype's findings; the fresh-agent probe reproduced a member joining being asked nothing and a member asking to change the look being told who the admins are and offered a draft, with no publish attempted. Opus's stack-wide check found nothing #547's first build promised that no PR delivers.

Sent to the builder: the welcome page must follow the same four-level style order as every static page, and its badges must not tint a ground the checks didn't verify; the skill should tell agents to save patchy look --json to a file rather than print a look with embedded fonts into context; run the company creator's real path once (the portal's setup line through llms.txt) and the ticket's ambiguous-domain and rejected-capture cases; Path.fromFileUrl instead of a diagnostic opt-out; a two-file schema for patchyLook; the Patchy brief's logo line and "avoid" list against the welcome template; a fallback sentence for a failed look read; the Patchy look glossary entry moves to Companies.

For landing: the look read's shape changed between #577 and this PR, so the six PRs land back to back and deploy once.

Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code.

allisonmahmood and others added 3 commits October 7, 2026 10:55
…rough Path

patchyLook's schema is look.css and LOOK.md alone, so the API docs stop
offering a logo the Patchy look never has, and Looks locates the shipped
folder with Path.fromFileUrl instead of a node:url opt-out.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s read into a file

The welcome page settles its style by the same four-level order as any static
page, so a request or the published page's own style wins on a redo. Its
badges carry status in text and border on bg or surface, the grounds the look
checks verify. Agents write patchy look --json to a file and copy look.css and
the logo by script, since embedded fonts can make the read half a megabyte,
and the skill says what to do when the read fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The Patchy look never carries a logo, so its header recipe and logo section
show the company's name instead of Patchy's mark. Its avoid list narrows grids
of cards to dashboards tiled with them, as its layout section already says.
The Patchy look's glossary entry moves to Companies, which ships it.

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

Copy link
Copy Markdown
Owner Author

Review round 2: the orchestrator read the fix commits (53660bb..86af107) and the builder's dispositions. The welcome page follows the four-level style order and its badges carry status in a border on a checked ground; the skill has agents write patchy look --json to a file and copy files by script; a failed look read has a stated fallback; Looks reads the shipped Patchy look through Path.fromFileUrl; patchyLook is a two-file schema with docs/API.md re-rendered; the Patchy brief heads pages with the company's name; the glossary entry moved to Companies. Three more fresh-agent runs covered the creator's real path through the portal's setup line (the look question fired; llms.txt needed no change), a subdomain and a redirecting domain, and an owner rejecting a marketing-site capture. A separate whole-stack end-to-end run on this tip passed every step. CI is green on 86af107 after two re-runs of the Node 24 test job, which hit the open flakes #499 and #507 in untouched suites. Follow-ups filed: #583 (blank names in look text).

Verdict from the orchestrator: ready to merge after #581. The six PRs land bottom-up (#576 → #577 → #578 → #579 → #581 → #582) and deploy once, since the look read's wire shape changed between #577 and this PR.

Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code.

allisonmahmood added a commit that referenced this pull request Oct 7, 2026
New patch repos start unstyled: the company look (#565) exists, but
nothing carries it into a repo, so every agent invents a style or
rebuilds Patchy's by hand.

Generation now carries the look as managed files, so init, refresh and
dev start all write it:

- `patchy/_generated/look.css`, plus `patchy/_generated/logo.svg` when
the current revision has one.
- The `patchy-look` project skill: a release-bound template
(`packages/sdk/skills/patchy-look/SKILL.md`) with the style order, the
token meanings and how to use the logo, filled with which look this is
and the revision's `LOOK.md`.
- `index.json` gains `look`: the revision the files came from, in the
shape `patchy look --json` uses (`{ revision, author: { id, name },
createdAt, note }`), or `null`. #568 builds its notices on this.

With no company look, generation writes the Patchy look as Patchy's
default: no logo, a `null` stamp, and the skill says the company has
none yet. The Patchy look's files moved from core's fixtures to
`packages/sdk/looks/patchy/` so they ship in the server image; the image
build checks they're there, and the logo stays behind. (Later in the
stack, #582 moves them again to `packages/companies/looks/patchy/`, so
the look API can hand the same files to static pages.)

The starters use it: tier 1 and 2 `src/main.tsx` import `look.css`, and
tier 0's `index.html` links it. The single-file build inlines it,
embedded fonts included, so the first `patchy dev` page is in the
company's look at every tier. `AGENTS.md` gets one line pointing at the
skill, and `patchy-loop` points there too, which reaches repos made
before this change.

Closes #567

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Base automatically changed from look/568-look-notices to main October 7, 2026 15:26
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Closed in favour of #598: after the stack rebase onto main, GitHub kept this PR's head at the pre-rebase commit and refused to reopen it. #598 carries the identical commits from the same branch; the review record stays here.

Posted by Claude Fable 5.1 (orchestrator) in Claude Code, running in T3 Code.

allisonmahmood added a commit that referenced this pull request Oct 7, 2026
…efault style retires (#598)

Onboarding still captured a personal `style.md` that only one person's
static pages ever read, and a static page in a company with no look had
no way to reach the Patchy look. This moves onboarding and the global
skill to the company look and retires the personal default style.

**Onboarding.** Right after login, the agent runs `patchy look --json`
and `whoami`:
- An admin whose company has no look gets a guess from their email
domain ("You're at acme.com. Want your tools to look like Acme?"). A
webmail address gets no guess: the agent asks for a site once, or moves
on. On yes, it captures the site on the person's machine, shows the
specimen with `patchy look preview`, sums the look up in one line and
publishes revision 1.
- A member is asked nothing. Someone joining a company with a look is
told their tools will use it.
- The portal's setup line (`Set up Patchy using …/llms.txt`) runs this
step too, because that login is the first time an agent meets a
company's creator.

**The global skill.**
- Static pages, the welcome page included, settle their style in the
spec's order: what the person asked for, the page's own style, the
company look, the Patchy look.
- Agents write `patchy look --json` to a file and copy `look.css` and
the logo by script, because embedded fonts can make the read half a
megabyte. When the read fails, they fix the login or retry, and write a
plain page rather than invent a look.
- The welcome page's CSS now uses only the look's tokens, so it takes
whichever look applies. Its badges carry status in text and border on bg
or surface, the grounds the look checks verify.
- The look changes only on an explicit request. A member is told who the
admins are and can publish a draft's specimen as a page to show them. An
admin sees `look preview --compare` before `look publish`.
- `style-file.md` becomes `look-capture.md`, built from the prototype's
capture draft and its four capture notes. `patchy-plan-style.md` goes,
because the Patchy look replaces it.

**The wire.** `GET /api/look` (and `patchy look --json`) now carries
`patchyLook`: the Patchy look's `look.css` and `LOOK.md` while `current`
is null, and null otherwise. It also carries `admins`, so a member's
agent can name the admins without attempting a change. The Patchy look
moves from `packages/sdk/looks/patchy/` to
`packages/companies/looks/patchy/`. `Looks` reads it once, and both
generation and the look API use that one copy. Its brief now heads pages
with the company's name, since the stand-in never carries Patchy's logo.

**Retired.** `status --json` drops `hasDefaultStyle`, and nothing reads
or writes `style.md`. There is no migration, since nobody has a setup
yet.

**Tried with fresh agents** (Claude Code in `/tmp` with only the
rewritten skill, against `pnpm dev up team` plus two companies made
through create-or-join):
- An admin at a real company domain was asked the guess question. The
agent captured the site from the product's own CSS in about three
minutes, showed the specimen and published revision 1. It then published
the welcome page in that look, logo included.
- A Gmail admin got no guess, skipped, and got the welcome page in the
Patchy look.
- A member of a company with a look was asked nothing and told their
tools use it.
- A member asking for a darker green was told only Ada can change it,
and published the draft's specimen as `acme/look-draft`.
- An admin asking the same got `look preview --compare` and published
revision 2 only after approving.
- The creator's real path, on a machine with nothing installed: given
only the portal's setup line, the agent ran the installer, relayed the
login, then asked the guess question. `llms.txt` needed no change. After
the capture, the person said "that's our marketing website, not our
product". The agent didn't argue or publish; it found the app behind a
login, asked for product material, re-captured from the help centre's
app screenshots and the sign-in screen, and published revision 1 once
approved. It then handed back to "ask for your first tool" without a
welcome page.
- Ambiguous domains: `eng.<domain>` was fetched and guessed as the bare
domain. A domain that now redirects to another company's site was named
as such, and the agent asked for the right site instead of guessing.

Closes #569

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



Replaces #582, whose GitHub record stopped tracking the branch after it
was rebased onto `main` for landing; the commits are identical. Review
rounds and the orchestrator's verdicts are on #582.

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
allisonmahmood added a commit that referenced this pull request Oct 7, 2026
Release 8 of What's new, written for the deploy of the company look
stack (#547, first build). It covers everything merged after release 7's
`through`.

- **New: Your tools can look like your company** — #577, #579
- **New: Preview a look before you publish it** — #578
- **New: Setting up Patchy sets up your look** — #598 (the rebased
replacement for #582)
- **Improved: Patches hear when the look changes** — #581
- **Improved: Static pages can use embedded fonts** — #576
- Behind the scenes: the personal style file retires (#598)

Written by Claude Fable 5.1 in Claude Code, running in T3 Code.

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:server Touches the server 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.

feat(patchy): onboarding sets up the company look, and the personal default style retires

1 participant