Repository navigation
docs(sdk): AGENTS.md and the skills state the platform facts builders kept missing - #1249
Conversation
e5cddc3 to
b41dd5b
Compare
e451a4a to
793f6bd
Compare
…w ids reach tables Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e is written; get refuses an empty id Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rguments and restyled buttons behave Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n facts for repos that already exist Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts too, and button colour depends on the look Co-Authored-By: Claude Opus 5.5 <[email protected]>
…do, with a paged handler example Builders kept getting the same platform behaviour wrong because the skills left it unstated or buried: - patchy-tables: a declared index lists ascending, so a limit keeps the oldest rows; rows past the limit come only through the cursor. The example now asks for "desc". Corrects the per-patch re-run default to 2. - patchy-server: one handler example that pages with a cursor and throws declared errors; every export is callable from the page; a HandlerError's message is its code; an action's writes commit one by one and an unknown_outcome may have committed; a refused retry() settles nothing; ctx.agent is null wherever no tool reaches; a re-export can rename and drops the guest mark; add members installs the members skill. - patchy-preact: useQuery has no skip, calls reject with two kinds of error and a mutation's unknown_outcome carries retry(); useFileUrl fetches the whole file on mount. - patchy-look: element rules for headings and paragraphs hold like the button's; names in the brief's markup are placeholders. - patchy-files: what a URL fetch costs, and cleanup after an uncertain write. Text repeated word for word in another installed skill is cut to a pointer. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…es and where the members skill comes from AGENTS.md is the text every builder has in context from the first turn, so the facts the skills now state are repeated there in a line each: a HandlerError's message is its code and every server export is callable from the page; agents reach only agent/ exports, so ctx.agent is null elsewhere; useQuery has no skip and a lost mutation reply carries retry(); the look's heading and paragraph rules; list returns one page and a declared index lists ascending; useFileUrl downloads on mount; add members declares the directory and installs its skill. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…n's dev writes are in its skill Co-Authored-By: Claude Opus 5.5 <[email protected]>
793f6bd to
e5d850a
Compare
…le handles every declared code From review of the last round: - A declared index is ascending by its columns, then id; it is oldest first only when eq fixes every indexed column (skill comment and AGENTS.md). - The page's error example branches on "missing" too, so no code reaches the screen as text. - Only handler runs leave log entries; refusals before a run don't. - unknown_outcome means the outcome is uncertain; only a mutation that went out carries retry(). - patchy-server points to patchy-preact for when useQuery runs instead of repeating it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: match the diff. A revert leaves the new AGENTS sentences in repos initialized meanwhile; their platform facts also hold on the preceding base, whose runtime implementations are unchanged by this PR. Release-bound skills regenerate. No Verification
Exact-head CI is green, including Node 22/24/26, Bun, browser, live Clerk, cross-platform install and rollback-rehearsal. The separate server-image check is green. Integration jobs skipped by their change gates are not counted as run. Not run
Notes
|
…s types refuse (#1418) ## What changed The tables skill told builders that a list comes back newest first "on the built-in `createdAt` index", and gave a `createdAt` range "on the built-in index". At runtime, `index: "createdAt"` works. But `ListOptions` only accepts a declared index or a ref column there, so a builder who passes it gets a type error. Both sentences now describe leaving `index` out, which is what the types allow and what the runtime does by default. Found by the acceptance check on #1249. ## Look at `packages/sdk/skills/patchy-tables/SKILL.md`, the "Indexed pages" section, two sentences: - **The range example:** "With an index, equality must cover its leading columns; at most one trailing column can have a range. Without one, rows are listed by `createdAt`, which takes a range such as `range: { column: "createdAt", gte: … }`." - **The list order:** "Its default depends on the index: newest first without an index, ascending by the columns of a declared index or a ref." This is what the types say about the three forms. I compiled each one against `ListOptions` with `effect-tsgo` and then deleted the scratch file: ```text omitted: { range: { column: "createdAt", gte: "2026-01-01T00:00:00.000Z" } } compiles declared: { index: "byDone", eq: { done: false } } compiles named: { index: "createdAt" } error TS2322: Type '"createdAt"' is not assignable to type '"byDone"'. ``` ## How it was verified - Format, plus the SDK tests that read the skills (`install`, `FrontDoor`, `SdkApi`): 34 pass. - The type check above, on this branch. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — the text of one release-bound skill; no code changes. - **What does a revert leave behind?** Nothing. The skill goes back to its old wording when a repo next refreshes. - **Does the release before it still work with that?** Yes. Claude Opus 5.5 in Claude Code, through T3 Code. Co-authored-by: Allison Mahmood <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…ey shortcuts (#1421) ## What changed This adds release 42's What's new entry, written from `1cd6d12`. It covers everything merged since release 41's `through` (`a25a9c5`), and sets the `patchy` release to `0.42.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: Tell Patchy what it's missing | #1217, #1218, #1219, #1227, #1228 | | New: Turn off single-key shortcuts | #1276, #1279, #1301 | | Fixed: Typing reaches the patch again | #1407, #1412 | | Fixed: Dialogs in patches keep your place | #1420, #1255 | | Behind the scenes: plainer facts for agents building patches | #1249, #1256, #1297, #1418 | | Behind the scenes: Patchy stores teams and audiences ahead of teams | #1416 | | Patch changes: Mod+/ and `client.close()` in patchy/hotkeys; single-key shortcuts can be off; Tab wraps in plain modal dialogs | #1279, #1301, #1420 | #1376 is release 41's own entry. #1400, #1406, #1414, #1415, #1302, #1413 and #1419 are test, CI and dev tooling and need no line. The teams bridge (#1416) ships alone in this release so teams (#1417) can follow in the next one with a release to roll back to that reads its data closed. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `7f93b91` (release 41) to this PR's merge.** No PR in the range is labelled `one-way`, and every Release impact answer says release 41 still works: - **#1217** adds migration `0037_feedback`, a schema release 41 never reads. **#1227** and **#1228** write into it. - **#1276** adds migration `0038_single_key_shortcuts`, a column with a default that release 41 never selects. - **#1416** adds migrations `0039_company_teams` to `0041_connection_audiences`, which hold tables that stay empty until teams ship, and widens one scope check. Its CI rehearsal ran `7f93b91 → head → 7f93b91 → head` on one set of data, and all four steps passed. - **#1279**, **#1301**, **#1255** and **#1420** change the SDK and the shell. Patches built on this release carry a `shortcutSetting` manifest field that release 41 reads without refusing, and its shell names no frame, so every shortcut stays on. - **#1218** and **#1219** add CLI commands and an optional `feedbackHint` in `--json` failures. A CLI from this release refuses to publish to an older instance before sending anything, as any mismatched release does. - Everything else is skill text, docs, tests and CI. If this release misbehaves, roll back to `7f93b91` (release 41). Written by Claude Opus 5.5 in Claude Code, through T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
Agents building on Patchy kept tripping over the same few platform behaviours that nothing they read said plainly. The fixes are facts, one or two sentences each, in the two places builders read: the
AGENTS.mdthatpatchy initwrites, and the project skills.allow-forms, so<form onSubmit>with a submit button sends nothing. This caused 27 of the 53 failing runs on main (51%), nearly all of them Terra's.Errordoesn't reach the page. Anything a handler throws besides a declaredHandlerError, or one of Patchy's own refusals, arrives ashandler_failed, with its message lost.t.enumlists the accepted values in the schema;t.text()names none.button's text, as the Patchy look does. A button restyled with a light background then keeps the look's cream text and disappears.ctx.vieweris, and how a row id reachesctx.tables.<t>.get. This was the most common reason builders left the skills to read Patchy's type declarations.getrefuses an empty id.A last round of edits, written by Claude Fable 5.2 from the judges' findings on this branch, is the last four commits, the last of them fixing a review of the round:
eqfixes them all, unless it passesorder: "desc"; and rows pastlimitcome only through the cursor. The tables example passes both, and patchy-server gains a paged handler example.HandlerError'smessageis its code. The generated client exportsisHandlerErrorandisPatchyError, and patchy-preact shows a page telling them apart and keepingretry()for a lost reply.useQuerycan't be skipped, so a query that can't run yet belongs in a component rendered once it can.useFileUrldownloads the whole file as soon as it mounts, and each download counts against the viewer's 300 calls a minute.unknown_outcomemay have committed.server/export is callable from the page.ctx.agentis null where no tool arrives, and a re-export can rename a tool withas.pnpm patchy add members.Part of #1141. Supersedes #1244, whose change is the first commit here.
Look at
8a3b347)The goal was 4.0 or more on every judge dimension. Fit, platform and UX meet it; correctness (3.90) and code (3.94) don't yet. UX and code are level with main in this run, within noise, though round K moved both. The rest of the correctness gap is design choices: paging, which agent tools exist, copying a handler instead of re-exporting it, receipt cleanup. Five rounds of facts didn't move those (see below).
not_adminrefusals. In another, Ben's request wasn't on Ada's starting view.Held-out tasks (#1242
recipe-book, #1243standup, ×3, never used to choose a change): checks pass 9/12 → 12/12; judges 3.68 → 4.04, correctness 3.04 → 3.75.On today's main, with the last round. Measured after rebasing onto
7f93b91:7f93b91)teamscenario's Cleo hasn't accepted the terms, so when the grader opens a patch as her it gets the terms prompt and the patch never loads. Every cheers and spend-approvals build fails there. That hits both sides equally, so the comparison holds, but these pass rates can't be compared with the ×6 above.Where the facts go matters more than what they say. Terra (Codex) loads
AGENTS.mdinto its instructions and reads the skills as long tool output. Each fact in this table was first tried in a skill alone, and none changed what Terra built there. InAGENTS.md, each did:AGENTS.mdErrorishandler_failedt.enumis in the tool's schemaAGENTS.mdis written once, atpatchy init;refreshnever touches it. So each fact also goes into its skill, as it was measured there, so builders in existing repos get it too. Those skill versions measured neutral on their own, not harmful. After review, three sentences were tightened without changing what they tell a builder. A business refusal is a declaredHandlerError, and Patchy's own refusals keep their codes. A tool's description counts as well as its schema. The button rule holds when the look sets a button text colour.War room, Terra, one build each side (round K): before, the Resolved and All filter tabs are cream text on cream and only Open shows; after, all three read.
Every round, kept and dropped
Each round is an A/B suite: base and head both build all five training tasks ×3, both builders (Claude Code on Sonnet 5.5, Codex on Terra 6.1), both judges (Opus 5.5, Sol 6.1): 30 runs and 60 verdicts a side (H2, run twice: 60 and 120). Rounds after A are measured against #1244 + A.
ctx.viewer's shape; row ids reach tables asId<"table">(×6)standuptooHandlerError's message is its code; theerrorslistAGENTS.mdand patchy-preact: forms never submit in the frame; patchy-tables:getrefuses an empty idt.member()column holdsuser.id, a copied name goes stale; patchy-tables: filtering a fetched page misses later pagest.enumis in the tool's schemaputby a caller's name,useFileUrlfetches on mountErrorreaches the page ashandler_failedAGENTS.md: G's facthandler_failedfailures 1 → 0AGENTS.md: C'st.enumfactAGENTS.md: alistreturns one page and a cursorAGENTS.md: F's button factErrorrefusals and 1 free-text agent argument, H's and I's targets, which K's branch lackedJudges are the mean of the five dimensions over both judges; each round is 30 runs and 60 verdicts a side (H2: 60 runs and 120 verdicts).
What didn't work, and why
cats whole skill files on both sides of every A/B, so a heading never gated whether it saw the form rule (H1). It saw it, and wrote a native form about half the time anyway. The same fact inAGENTS.mdworked.t.member()column holds a stable id (B), that leaving out an agent tool closes it to agents (C), that filtering a fetched page misses later pages (B, and J inAGENTS.md), or that a declared index lists oldest first (F) left the designs unchanged. Truncation findings stayed at 65 → 67 and 17 → 19. Only facts about behaviour the builder didn't know changed what it built. The exception came in the last round: it restated paging as whatlistdoes, with an example passingorderand the cursor, and the paging findings halved (38 → 17).teamscenario's company is Acme Co, so those pages were right and the judges wrong. Dropped (D). The last round says only that the sample's names are placeholders and the company's name iscompany.name.How it was verified
8a3b347), ×6 (two ×3 suites on the same commits), all five training tasks, both builders, both judges.recipe-bookand feat(dev): held-out eval task, a daily standup where people own their entries #1243standup, merged locally onto main, with this branch on top. They were never used to choose a change. Result, ×3, 24 verdicts a side: pass 9/12 (75%) → 12/12 (100%); judges 3.68 → 4.04 (fit 3.79 → 4.17, platform 3.96 → 4.25, correctness 3.04 → 3.75, UX 3.92 → 4.13, code 3.71 → 3.88); native-form pages 3 → 0.packages/serving/src/shell.ts, the frame'ssandbox="allow-scripts allow-modals"packages/runtime/src/Invocation.ts,HandlerFailed's fixed messagepackages/api/src/agentTools.tspackages/companies/looks/patchy/look.css, thebuttonrulepackages/api/src/runtime.ts,tables.gettakesNonEmptyTextContextBase.viewer: Meinpackages/patchy/src/server.tsc8af5ed, before the last commit's two wording fixes and a clean rebase) against the first five commits, ×3; and the first five against main in a separate ×3 suite, both on7f93b91. Each claim in it was checked against the code:TableOperations.tsfor list order,handlerError.ts,generateClient.tsandgenerateServer.tsfor refusals and imports,useQuery.ts, the admission inRuntime.tsfor file downloads,registry.tsfor limits,handlerDescriptors.tsfor re-exports,Generation.tsfor the members skill, andlook.css.missingcode to show as text; only handler runs leave log entries; a call never sent fails withunknown_outcomeand noretry(); and patchy-server repeated patchy-preact onuseQuery.install,FrontDoorandSdkApi) andinitProject.test.ts(15) pass. Before the last round,env -u NODE_ENV pnpm check: format, lint, typecheck and synth pass; 2,828 of 2,830 tests pass. The two that timed out at 30 s (cliRepoPublish,devServerWatch) did so while four eval suites shared the machine; rerun alone withinitProject.test.ts, all 38 pass.Noise, so the numbers read right. The same main commit read between 3.89 and 3.99 mean across suites, and one run is 3.3 points of a ×3 pass rate. Rounds were kept when their target moved and their pass rate held; K is the stated exception. The headline numbers pool two ×3 suites run on the same two commits.
Found on the way, outside this PR:
teamscenario's Cleo, who hasn't accepted the terms, so two of the five tasks can't pass. A fix: the eval accepts the current terms for every person it signs in as.replacethat arrives after a latersubscribeis refused with 409, and the grader fails any check whose page logged an error. That can fail a correct build.Release impact
Breaking — requires action from anyone already running this
Not breaking — no action required: skill text, and the
AGENTS.mdtext new repos get.What does a revert leave behind? Repos initialised in between keep the new
AGENTS.mdsentences, which stay true; skills regenerate from the release.Does the release before it still work with that? Yes.
Claude Opus 5.5 in Claude Code, through T3 Code; the last round's skill edits by Claude Fable 5.2.