Repository navigation
Description
Part of the launch (#416). Absorbs #108 (the copy). Design reviewed with GPT 6.1 Sol in codex, 2026-10-02.
Problem
A new beta user's agent has no way to learn how to install Patchy. The CLI is deliberately not on npm: each instance serves its own release (GET /api/release: an immutable tarball URL plus SHA-512). The install steps live only in the repo README and inside the global skill, which ships inside the package it would be installing. Nothing registers that skill with Claude Code, Codex or Cursor. The empty portal says "Ask your agent to publish a page with Patchy" (packages/portal/src/render.ts:323), but the agent has nothing to go on.
The flow
The user pastes one line to their agent:
Set up Patchy using https:///llms.txt
/llms.txtsays what Patchy is, gives the install command, and says to read the installed skill next.- The agent runs the instance's installer. On macOS and Linux:
PowerShell does the same with
work=$(mktemp -d) && curl -fsS https://<host>/install.mjs -o "$work/install.mjs" && node "$work/install.mjs" && patchy login --api-url https://<host> --json
Invoke-WebRequestandpatchy.cmd. - Login relays the URL and code to the person as it does today, and saves the instance.
--api-urlis persisted before confirmation (packages/patchy/src/Login.ts:187), so later commands need no flag.
What to build
GET /install.mjs, served by the instance withPATCHY_PUBLIC_BASE_URLbaked in, about 100–160 lines inpackages/sdk. It checks Node ≥ 22.22.0 and npm. It fetches/api/release, downloads the exact tarball and verifies SHA-512; that catches damaged or mismatched downloads, though it's no defence against a compromised origin. Then it runsnpm install --global --ignore-scripts --no-audit --no-fund <file>, calls the newly installedpatchy setup --jsonby absolute path, and returns the executable and skill paths, with actionable errors for PATH and permission problems. Running it again is the upgrade path, and it always reinstalls rather than skipping on a version-string match.patchy setuplinks the whole bundled skill directory, references included, as~/.agents/skills/patchyand~/.claude/skills/patchy: symlinks on POSIX, junctions on Windows. It is idempotent, refuses to replace a directory it doesn't own, and returns the paths so the running agent can read the skill straight away.patchy setup --removeremoves only what setup created. Follows ADR-0004 (exit codes,--json).GET /llms.txt: short. The Node requirement, the commands above, the browser handoff, and where the skill is. The bundled skill owns everything after that.- Global upgrade guidance. A global CLI on the wrong release is currently told
Run: patchy refresh(packages/patchy/src/CliError.ts:127), but refresh updates a repo, not the global CLI. Point the global case at the instance's installer, and keeppnpm patchy refreshfor repos. - The empty portal gets the copyable line. This is a copy change: per Allison's design rule, publish mocks and get a pick before editing the real page.
- Surfaces: the global skill and its lock hash,
packages/patchy/README.md,docs/SKILL_DISTRIBUTION.md, ADR-0004 forsetup, ADR-0011 if the release story changes, anddocs/API.mdfor the two routes.
The invitation and waitlist emails carry the same line, but those are Clerk templates set in the dashboard (#480), not code.
Copy
An agent drafts the /llms.txt and portal copy from README.md and docs/product.md: what Patchy Cloud is, that it's a private beta, and how an agent gets in. Allison edits it in review.
Cut
npm publishing or an npm bootstrapper, npx skills add from GitHub (main can describe a different release than the instance), automatic self-updates, installing Node for the user, agent plugins or MCP, and detecting every agent's skill directory.
Test
Fresh install and upgrade on macOS, Linux and Windows. Also: Node missing or too old; an unwritable npm prefix or patchy missing from PATH; paths with spaces; Windows npm shims; integrity failure before anything installs; a conflicting skill directory; repeated setup and remove; login persistence. #416's clean-machine check runs this flow on production.
Done when
On a clean machine, an agent given only the one line installs Patchy, registers the skill, logs the person in and publishes a page.
Activity
allisonmahmood commentedon Sep 2, 2026
Parked until staging is up and running. The route only earns its keep once there is a served address an outside agent can land on, and the copy (#108) waits on the new auth story for the "how an agent gets in" part anyway. Pick this and #108 up together once staging exists.
allisonmahmood commentedon Sep 2, 2026
#37 (version endpoint and request logging) rides along with this and #108: the three land together once staging is up.
[-]feat(server): GET /llms.txt route[/-][+]feat(server): the agent front door: /llms.txt, an installer and patchy setup[/+]allisonmahmood commentedon Oct 2, 2026
Rescoped 2026-10-02 for the launch. No longer parked: production is the address an outside agent lands on, and device login is the access story the copy needed. #108's copy is folded in, with an agent drafting and Allison editing in review. #37 is no longer grouped with this.
allisonmahmood commentedon Oct 2, 2026
Agent Brief
Category: enhancement
Summary: An outside agent given only
Set up Patchy using https://<host>/llms.txtinstalls the instance's CLI, registers the global skill and logs the person in.Current behavior:
patchypackage is not on a registry. The instance reports its release at the publicGET /api/release(release,package.tarball,package.integrityas asha512-…SRI).package.tarballis a relative path (/sdk/patchy-<release>-<digest>.tgz);refreshresolves it against the instance URL.node_modules/patchy/skills/patchy/, but nothing links it into any agent's skill directory.ReleaseMismatch, whose message saysRun: patchy refresh. Static-file publish raises it, butrefreshreconciles the patch repo in the working directory and cannot upgrade a global CLI.patchy login --api-url <url>saves the instance before confirmation, so later commands need no flag.Desired behavior:
GET /llms.txt, public, short: what Patchy Cloud is, that it is a private beta, Node ≥ 22.22.0, the install-and-login commands below for macOS/Linux and PowerShell, the browser handoff, and the installed skill's path to read next. The bundled skill owns everything after login. Draft the copy from the README anddocs/product.md; Allison edits it in review.GET /install.mjs, public, served with the instance's public base URL baked in. A dependency-free Node script of about 100–160 lines, living in the SDK package beside the tarball route. It:/api/release, resolvespackage.tarballagainst the base URL, downloads it to a temp directory and verifies SHA-512 againstpackage.integritybefore installing anything. This catches damaged or mismatched downloads, not a compromised origin;npm install --global --ignore-scripts --no-audit --no-fund <file>, even on a version match: rerunning the installer is the upgrade path;patchy setup --jsonby absolute path under the npm global prefix (patchyon POSIX,patchy.cmdon Windows), then prints the executable and skill paths;patchymissing from PATH;The documented POSIX line:
PowerShell does the same with
Invoke-WebRequestandpatchy.cmd.patchy setup [--remove] [--json]links the package's whole bundled skill directory, references included, as~/.agents/skills/patchyand~/.claude/skills/patchy: symlinks on POSIX, junctions on Windows.patchypackage'sskills/patchydirectory. It creates missing links and replaces owned links, including links into an old npm prefix after a Node switch. Already-correct links are a no-op. It refuses a real directory, a file or a link to anything else, and names the path.--removedeletes only owned links.SKILL.mdpath. Exit codes and--jsonfollow ADR-0004.FileSystemsymlink takes no link type, so junctions likely need Nodefswith a per-file@effect-diagnosticsopt-out and a reason.Upgrade guidance. A stale global CLI with no patch repo in play is told to rerun the instance's installer, and the message includes the instance URL. Inside a patch repo the guidance stays
pnpm patchy refresh. Branch on whether a repo is involved, not onReleaseMismatch.component:cliarises on both paths.Portal empty state gets the copyable line
Set up Patchy using <publicBaseUrl>/llms.txt. Stop before editing the page: build a few distinct static mocks, publish them with thepatchpageskill, post the URL on this issue and wait for Allison's pick. The rest of this brief does not wait on the pick. The page edit follows theui-consistencyspec.Surfaces:
skills-lock.jsonhash is refreshed;setup;setup;docs/SKILL_DISTRIBUTION.mdsays setup links the global skill (its "does not publish it to a skill directory" line changes);docs/API.mdcovers the two routes, documented the way the tarball route is.ADR-0011 changes only if the release story does; it should not.
Key interfaces:
Release(release,package.tarball,package.integrity): read it, don't change it.PATCHY_PUBLIC_BASE_URL): baked into/install.mjsand used in/llms.txtand the portal line.ReleaseMismatch: its global-case guidance changes; it may need the instance URL as a field.setupcommand in the CLI's command table./apipaths as public. Company handles are[a-z0-9-], so dotted root paths cannot collide with them.Acceptance criteria:
GET /llms.txtandGET /install.mjsanswer without a session and carry the instance's base URL; tests cover both.patchy login --api-url <host> --jsonreturning the login handoff. A second run reinstalls and keeps the links.npm installruns, and nothing is installed.patchymissing from PATH each fail with a message naming the fix.patchy setupis idempotent, replaces an owned link to a stale package, and refuses a real directory or foreign link with ADR-0004's exit code and JSON error.setup --removeremoves only owned links. Tests cover these.pnpm patchy refresh.pnpm verifypasses.Out of scope:
npx skills addfrom GitHub~/.agents/skillsand~/.claude/skillsGET /api/releaseor the tarball routeallisonmahmood commentedon Oct 2, 2026
Portal empty-state mocks for the setup line: https://post.patchyhq.com/d/nu13cerlx61o (public, unlisted)
The portal runs no page script, so "copyable" means one click selects the whole line (
copy-address). The rest of #36 is being built now; the page edit waits for your pick.Made by Claude Opus 5.5 via Claude Code.
fix(server): the installer survives Volta, cmd expansion, IPv6 hosts …
fix(server): installer follow-ups from the codex re-review
feat(portal): the empty portal walks a person through setting up thei…
feat(server): the agent front door: /llms.txt, an installer and patch…
fix(server): review fixes for the front door
fix(server): the installer survives Volta, cmd expansion, IPv6 hosts …
fix(server): installer follow-ups from the codex re-review
feat(portal): the empty portal walks a person through setting up thei…