Skip to content

docs(skills): the objectstack-i18n entry file becomes a router - #38663

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-tc3h02
Nov 30, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-tc3h02

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Part of #34770

Clause-②: no
Metadata-protocol: none

Part of, not the closing form: the catalog-size line of the card's Done-when is not met by this PR. This is PR 3 of the per-skill split, under dispatch order 7265010468 and claim 7264988593.

维护者速读

  • 用户能看到什么变化:用户无感。发给 AI 的「多语言翻译」技能说明,入口文件从约 25 KB 缩到 9 KB:入口只留开工前三项检查、一段可照抄的翻译包示例、一张「每种界面文字该写在哪个键下」的路径清单、七个「能通过检查却翻不出来」的坑,以及其余内容去哪里查的指路表。
  • 为什么做:这是「技能目录瘦身」的第六份(界面、数据、自动化、平台、跨大版本升级五份已完成)。入口文件每次都整份装进 AI 的上下文,越长越贵,也越容易漏读。
  • 出错会怎样:只动教 AI 的文字,没有产品行为变化;风险是 AI 少读一段后答错。改动前后都跑了评测:十六道题里,改动后通过四十二次(每题三遍共四十八次),改动前是三十八次;仍不过的两题里,一题在改动前的文字上就三遍都不过,另一题两边都时过时不过,没有哪一题是改动后才每遍都不过的。可整笔撤回。
  • 要你做的:无。席位核对与合约审查通过后,会按治理规则请审批人批准。

Rulings this executes

  • Card Scope (decision record on the card, S3 = A): the entry file holds first checks, at most about 8 traps and a routing list; 6–9 KB, hard cap 500 lines; restated option lists and key tables go behind a pointer; no trap is removed until a publish-time check covers it or it stays inline.
  • 7128031203 fork 4 = A: ratchet rows are pinned at the measurement with zero headroom, and the sum of ceilings does not rise. Here no row rises and none is added.
  • 7168461386 = A: text an eval shows the entry lost goes back into the entry. Used twice in this PR (see Eval parity).
  • Seat order for this PR (7265010468): same shape as PR 2; the cut, not the move, lowers the catalog total; no new file under skills/ (a new file needs a new ratchet row, which stays with a human).
  • Ruling record 7249189592, the parity rule: a case whose result flips between runs on both trees is unstable on both and does not block; a case that fails on every run of the head while main passes is a regression.

What changes

The entry file becomes a router. skills/objectstack-i18n/SKILL.md: 25,285 → 8,996 bytes, 504 → 160 lines, 6,315 → 2,243 tokens. Frontmatter (description, triggers) is byte-identical. It now holds:

  • ## First checks, three: read the stack's i18n block, its translations and the contract before writing a key; which of defaultLocale, sourceLocale, supportedLocales and fallbackLocale is which, with the English-source, Chinese-audience declaration; verify with os i18n check and os validate.
  • ## A bundle: one type-checked example (two locales, one object with a field, an option and an action, one message, the stack registration) and one paragraph on the translation metadata item.
  • ## Key map: every group and every key as one path listing, then six notes for the placements a path cannot show (child-object keys, a form's own heading, table columns beside fields with one worked example, parent-side related lists, report blocks and book groups, flow steps).
  • ## Traps, seven, each a bundle that parses and ships and then translates nothing or the wrong text: an option key is the stored value; double braces only, no ICU MessageFormat; os i18n extract writes objects and globalActions only unless told otherwise; coverage is not freshness; a generated module is an objects subtree and withSourceFallback needs the source-hashes companion; server-written text is in the organization's language; an app-authored refusal has no en floor.
  • ## Where to go: four rows (the contract, the service contract, the published i18n standard page, the sibling skills).

No text moved. This skill has no hand-written reference file (references/_index.md is generated), and a new file needs a new ratchet row. So what left the entry was cut, each behind what now answers it:

Old entry section Now
Translation Configuration, Stack-Level I18n Config First check 2 keeps the four properties and the worked declaration. Cut: the property table and the three refused alias spellings (the contract's strict shape refuses each and names sourceLocale); one sentence on the language of validation, delete-restriction and permission-denial messages (platform behaviour, nothing for a bundle author to write).
Authoring Translation Bundles ## A bundle. The two long examples become one that shows each nesting level once.
Object-Level Translation Structure ## Key map: the same keys as paths. Cut: the condition on each key (which declaration it needs), which the contract carries in the key's .describe() text and os validate reports as translation-target-unknown, an error; the glosses on top-level groups; the four-line sample block, of which the table-column line stays as code and the inline-title and report-block lines as paths.
Naming Conventions Cut. First check 1 says a key must match a declared name; a key that does not is translation-target-unknown.
File Organization Strategies Cut. ## A bundle keeps the one fact that bites: nothing loads a directory.
Authoring at Runtime: the translation Item Kept, one paragraph under ## A bundle.
Message Interpolation Trap 2.
Translation Coverage First check 3 and trap 4. Cut: the other flags (each command's --help lists them) and the coverage and diff shapes (the contract).
Integration with II18nService Routing row 2, which still names the three optional methods no adapter ships. Cut: the method list, the locale ladder (routing row 3), the registration paragraph and the three REST routes.
Server-Composed User Text Traps 6 and 7 keep the app-authored half. Cut: the paragraph on sentences the platform composes itself.
Translation Workflow Best Practices Traps 3 and 5.
Shipped examples Cut.
Common Pitfalls (the retired o.* shape) Cut. defineTranslationBundle and the metadata save both refuse the retired keys and answer with the key to write.
Verify your work, References, See Also First check 3 and the routing table.

Sizes (bytes · lines · ratchet tokens):

before (f5da514b) after (06c77b1b)
SKILL.md (entry) 25,285 · 504 · 6,315 8,996 · 160 · 2,243
skills/objectstack-i18n/** (4 files) 44,121 · 746 27,832 · 402
all 14 SKILL.md together 196,948 · 3,750 180,659 · 3,406
whole skills/ tree (115 files) 1,231,233 1,214,944
whole tree without evals/ (73 files) 872,024 855,735
ratchet: authored tokens = sum of all ceilings 200,348 196,276
ratchet: bundle total, tokens 305,013 300,941

Budget reading: the entry is 8,996 B, inside the card's 6–9 KB line, and 160 lines against the 500-line cap. The whole catalog is 16,289 bytes smaller, all of it cut.

Ratchet row (scripts/check-skills-token-ratchet.mjs), pinned AT its measurement, zero headroom: skills/objectstack-i18n/SKILL.md 6315 → 2243 (−4,072). It is the skill's only row. The sum of all ceilings goes 200,348 → 196,276.

Tests

Eval parity

Judged by ruling record 7249189592. No case fails on every run of the head while main passes. On 1235a12d, the last head a full round ran on, the with-skill arm passes 42 of 48 turns against 38 of 48 on main's text; two cases fail there, case 5 (fails on main in every run alike) and case 12 (flips on both trees). The review-round head 06c77b1b changes two sentences of the entry; the four cases those sentences bear on were read again on it.

Skill evals, both arms, one command line for every round (skill-evals --skills objectstack-i18n --repeats 3 --model sonnet --effort medium --concurrency 4; the extra readings add --case and change --repeats; CLI 2.1.332, subscription login). 16 behaviour cases in evals/bundles-locales-coverage.json and 7 trigger cases in evals/triggers.json, both untouched.

reading tree with-skill no-skill with-skill cases below 3/3
before round f5da514b 38/48 1/48 5 (0/3) · 9 (1/3) · 11 (1/3) · 12 (1/3) · 16 (2/3)
first router head d27a5088 36/48 2/48 3 (1/3) · 5 (0/3) · 10 (2/3) · 11 (0/3) · 12 (0/3)
second head 878eb3ea 34/48 3/48 4 (1/3) · 5 (0/3) · 9 (1/3) · 10 (2/3) · 11 (1/3) · 12 (0/3) · 16 (2/3)
second head, cases 3, 10, 11, 12, four repeats 878eb3ea 10/16 0/16 11 (2/4) · 12 (0/4)
third head, full round 1235a12d 42/48 1/48 5 (0/3) · 12 (0/3)
third head, cases 3, 4, 11, 12, three repeats 1235a12d 8/12 0/12 11 (1/3) · 12 (1/3)
review-round head, cases 6, 10, 12, 16, three repeats 06c77b1b 9/12 0/12 12 (0/3)
review-round head, case 12, eight repeats 06c77b1b 2/8 0/8 12 (2/8)

Trigger cases, every full round on every tree: loaded when it should 15/15, left alone when it should not 6/6.

  • Case 12 (which key carries a result table's column headers) passes 1 of 3 on main, 1 of 6 on 1235a12d and 2 of 11 on 06c77b1b: it flips on both trees. Each failing answer, on both trees, gives the right key path and the right code and fails on a literal: most warn against the wrong nesting by quoting it ("don't nest it as error: { message }"), which is the literal the case forbids; a few spell the path with its placeholders and so omit the literal resultDialog.columns.rows. Before the worked example went back in (below) the head read 0 of 16.
  • Case 11 (English source, Chinese audience) passes 1 of 3 on main and 4 of 6 on 1235a12d. The failing answer gives the right declaration and adds "don't set defaultLocale: 'en'", the literal the case forbids.
  • Case 5 (extract ran, check still reports app keys missing) fails in every reading on both trees: the answer gives the --no-objects-only course and omits the literal --strict, which the entry carries on both trees.
  • Case 3 (relabel in Studio with no redeploy) was a real loss on the first head: 3/3 on main, 1/3 on d27a5088, where the entry named defineTranslation only inside a parenthesis and two answers showed the item as a bare object. The sentence is an instruction again ("author with defineTranslation"): 7 of 7 on the second head, 6 of 6 on the third.
  • Cases 4, 9, 10 and 16 each missed single runs on one tree or both (4: 1/3 on the second head, 3/3 on main and 6/6 on the third head; 9 and 16: below 3/3 on main itself; 10: a heading "No title:" in a correct answer matched the forbidden literal title:). All four are 3/3 on the third head; cases 6, 10 and 16 are 3/3 on the review-round head.

Two restorations under ruling 7168461386 came out of these rounds: the defineTranslation sentence (case 3), and the one worked table-column example the original file carried, resultDialog: { columns: { rows: { email: '邮箱', 'error.message': '原因' } } } (case 12). Both are paid inside the entry.

Round records
  • Before round on f5da514b: 117 of 117 turns, 5.7 min.
  • Round on d27a5088: 117 of 117 turns, 5.9 min.
  • Round on 878eb3ea: 117 of 117 turns, 6.5 min. Extra readings on it: 32 of 32 turns, 1.6 min.
  • Round on 1235a12d: 117 of 117 turns, 6.1 min. Extra readings on it: 24 of 24 turns, 1.3 min.
  • Readings on 06c77b1b: cases 6, 10, 12, 16, 24 of 24 turns, 1.3 min; case 12 alone, 16 of 16 turns.
  • Two probes on the working tree, between 878eb3ea and 1235a12d, 24 turns each. Without the table-column example: case 12 0/6, case 4 5/6. With it (the text that became 1235a12d, less four small edits elsewhere in the file): case 12 3/6, case 10 5/6.
  • Every must_contain literal of the 16 cases that the entry carried before, it still carries (70 literals read; 58 carried before and after, 0 lost; 12 appear in neither tree and come from the prompts).

Other tests

On 1235a12d and again on 06c77b1b, under the verify lock (VERDICT command-exit 0 each), the same counts both times:

  • pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts scripts/skill-map-guards.test.ts (the suite that names the ratchet script, and the one that names this skill): Test Files 2 passed (2), Tests 57 passed (57).
  • pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/created-summary.test.ts (it names the skill in its catalog list): Test Files 1 passed (1), Tests 12 passed (12).

No ablation: the diff changes prose and one ledger, no tested behaviour. No test in the repository reads this entry's prose.

Acceptance notes

Open question for the seat or the approver:

  • The key map stays inline (3.4 KB of the entry's 9.0 KB) and is not cut to a pointer at the contract. The order's shape line says key tables go behind a pointer to the contract or the generated reference. Here the generated reference lists files, not keys; the contract is 3,340 lines; eleven of the sixteen eval cases ask which key carries a text; and the eval sandbox, like an MCP-only session, has no node_modules to read. So the section became a path listing (8.3 KB to 3.4 KB) and stayed. If a hand-written reference file is wanted instead, it needs a new ratchet row, which the standing ruling leaves to a human; the map then moves there verbatim and the entry drops to about 5.6 KB.

Decided here (small, no shipped behaviour), each open to reversal in review:

  • "Every trap stays inline unless a publish-time check covers it" was read as: a bundle that parses, ships and then translates nothing or the wrong text stays inline. Inline: the seven traps and the six placement notes. Cut to the contract, each loud when hit: a retired key, a misspelled alias, a key under a parent that does not declare it (defineTranslationBundle refuses the first two with the key to write; os validate reports the third as translation-target-unknown, an error).
  • The option-key trap stays inline although a check names it: translation-option-key-unknown is a warning, so the bundle ships.
  • Paid inside the entry for the two restorations and a truthful routing row: the pluralLabel line of the example (the key is in the map), the words "(deep-merge)", "optional," and "forever", and "refusal guidance" shortened to "refusals".
  • Review round on 06c77b1b (contract review 7266118883: PASS, S1, N1, N2). S1, fixed: the key map's opening sentence gave {path}, {column_path} and {list} each "a plain string" value; the contract holds a string under fields.{path} and {column_path} only, an object with label under _relatedLists.{list} and a column map under columns.{path}. The sentence now reads "fields.{path} and {column_path} hold plain strings". N2, fixed: the first placement note names lookup beside master_detail, as the contract does for both inlineTitle and relatedListTitle. Both are paid inside the entry, 8,998 to 8,996 B, the row unchanged at 2243: the routing table's last row names the sibling skills with shorter glosses, and two traps are a few words shorter. N1, left: bulkActions.{def}, a dataset member and a report block's description still stop above their leaf keys. Naming them costs about 70 bytes the entry does not have, each miss is refused loudly or reported by os i18n check, and routing row 1 sends them to the contract. The changeset no longer says the map names every key and every group; it says where the map stops.
  • Routing row 3 names only what its page holds (locale resolution and fallback). The first head promised routes and coverage shapes there; the page has neither. The coverage shapes are in the contract (row 1). The three /api/v1/i18n routes are not linked from the entry: a bundle author writes none of them, and a second link did not fit. The changeset names the page that documents them.
  • Section anchors of the entry changed. The changeset lists every anchor that left SKILL.md. No file in this repository links one of them.
  • Footer form: this body ends with the single block AGENTS.md prescribes for a PR body, not the two-line form the launching thread's reminder proposed, because a stacked two-line block is measured to store as three attribution blocks.

Noted, not changed:

  • The literals of eval cases 5, 10, 11 and 12 fail correct answers (above). Case 12 forbids error: {, which a warning quotes; its sibling case 10 forbids the code form verdict: { summary: ', which a warning does not match. That is a reading of the eval file; the parity rule treats the cases as fixed, so this PR does not touch them.
  • The commit message of 1235a12d says "twenty-two readings"; the count is 16 (3 on d27a5088, 7 on 878eb3ea, 6 on the first probe). The branch is not rewritten for it; the squash takes this body.
  • The version PR chore: version packages (next) #38192 touches the entry's stamp line; overlap-check reads it as merging cleanly.

Verification

Read first, by risk:

  1. skills/objectstack-i18n/SKILL.md, the whole file: is anything a model needs before opening the contract missing? The risk hunks are ## Key map (the listing and its six notes replace an 8 KB table) and ## Traps.
  2. .changeset/34770-i18n-skill-router.md: the "what left, and what answers it now" list is the record of every cut.
  3. scripts/check-skills-token-ratchet.mjs: the one objectstack-i18n row.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints ratcheted (authored) 196276 / 196276 (+0) and skills/objectstack-i18n/SKILL.md 2243 / 2243 (+0); wc -c skills/objectstack-i18n/SKILL.md prints 8996.

Gates, local, each exit code captured before any pipe. The whole derived list ran on 1235a12d; 06c77b1b differs from it by six lines of the entry, two comment lines of the ratchet row and one paragraph of the changeset, so the families that read those were run again on it.

On `06c77b1b`: the families the review round reaches, all exit 0
  • node scripts/check-skills-token-ratchet.mjs: ratcheted (authored) 196276 / 196276 (+0), skills/objectstack-i18n/SKILL.md 2243 / 2243 (+0); its --self-test exit 0.
  • pnpm check:skill-links: 290 relative link(s) in 76 published skill file(s) resolve; 161 fragment(s) name a real heading under GitHub's slug rule.
  • pnpm check:doc-anchors: 1178 internal #fragment link(s) across 366 source file(s) all resolve to a real heading.
  • pnpm check:skill-identifier-liveness, check:skill-compatibility, check:nul-bytes, check:role-word, check:corpus-claim-drift, check:published-readme-links, spec check:skill-docs: exit 0.
  • check-changeset-no-major, check-empty-changeset, check-adr-0087-registration, check:changeset-gate-self-tests, check-platform-checklist --changed-from origin/main (nothing judged): exit 0.
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 before the push.
  • Not run again: spec check:skill-examples (no code block changed).

On 1235a12d:

Derived families: 69 derived, 68 run green, 1 NOT MEASURED
  • Reconciliation: ✓ dispatch-gates --ran: 69 derived famil(ies) accounted for — 68 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).
  • NOT MEASURED: pnpm check:dual-build-cjs-loads, exit 3, Run pnpm build first. ⛔ This is NOT a pass: nothing was measured. It reads every package's built dist/, and this container holds no full build. The diff touches no package source; CI's run is the reading.
  • pnpm check:dts-closure is recorded from its second run. Its first run, in the list, exited 1 naming missing declaration files while a package build of this session was rewriting those dist/ folders; run again with no build in flight it exits 0: 47 built package(s) swept - 189/189 declared declaration file(s) present.
  • node scripts/check-skills-token-ratchet.mjs: ✓ check-skills-token-ratchet: 61 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted. (ratcheted (authored) 196276 / 196276 (+0), bundle total 300941); its --self-test: 111 cases pass.
  • pnpm check:skill-links: 290 relative link(s) in 76 published skill file(s) resolve; 161 fragment(s) name a real heading under GitHub's slug rule.
  • pnpm check:skill-identifier-liveness: Leg 1: 540 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s).
  • pnpm --filter @objectstack/spec run check:skill-docs: Skill docs in sync.
  • pnpm check:skill-compatibility, check:skill-frame-sync, check:role-word, check:corpus-claim-drift, check:doc-authoring, check:published-files: exit 0. pnpm check:nul-bytes: no raw ASCII control bytes.
  • The changeset gates (check-changeset-no-major, check-empty-changeset, check-adr-0087-registration, check:changeset-gate-self-tests): exit 0. pnpm check:pm-dispatch-gates (fast tier): exit 0.
Beside the derived list, all exit 0
  • pnpm --filter @objectstack/spec run check:skill-examples: 351 prose examples type-check across 3 surface(s). The entry's one example is among them. Its first run exited 3 (a client package was not built); it was run again after that build.
  • pnpm --filter @objectstack/spec run check:skill-refs: 10 generated files in sync with packages/spec.
  • pnpm --filter @objectstack/spec run check:skill-served-sections: 24 served section(s), each heading exactly once in its file (the hosted door serves no section of this skill).
  • pnpm check:doc-anchors: 1178 internal #fragment link(s) across 366 source file(s) all resolve to a real heading.
  • pnpm check:published-readme-links: 564 outbound link(s) across 168 published markdown file(s), 99 docs-site page(s) resolved.
  • pnpm check:skill-top-level-keys: exit 0.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: 0 anchored files in the change set — nothing judged.
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 before each push.
  • The body gates on this text (check-closing-keyword-parity --body, check-partof-closing-keyword): exit 0.

Base: the branch is cut from f5da514b; main has moved nine commits since (to 74a15cb7), none touching skills/, the ratchet script or the translation contract, and was not merged in. CI on the head is the seat's reading.


Generated by Claude Code

skills/objectstack-i18n/SKILL.md goes from 25,285 to 8,991 bytes (504 lines
to 160), frontmatter byte-identical. It keeps three first checks, one
type-checked bundle, the key map as one path listing with the placements a
path cannot show, seven traps and a routing table. The skill has no
hand-authored reference file, so the rest is cut behind a pointer to the
contract, to `os validate` or to the published i18n standard page.

The ratchet row follows the measurement down, 6315 -> 2241, zero headroom.

Claude-Session: https://claude.ai/code/session_01JQwxbaa1vPDVusyBxyGMG6
Co-authored-by: Claude <noreply@anthropic.com>
…on item; changeset

The first eval round on the router showed the entry no longer led an answer to
defineTranslation for a no-redeploy relabel (3 of 3 on main's text, 1 of 3 on
the router). The sentence is an instruction again. Paid inside the entry: 8,991
to 9,000 bytes; the ratchet row follows the measurement, 2241 to 2244.

Claude-Session: https://claude.ai/code/session_01JQwxbaa1vPDVusyBxyGMG6
Co-authored-by: Claude <noreply@anthropic.com>
… routing row names what its page holds

Twenty-two readings of the table-column question on the router without the
example carried the wrong nesting in a warning every time; with the example the
original file had, the answer copies the shape. The routing row no longer
promises routes and coverage shapes of a page that has neither. Paid inside the
entry: 9,000 to 8,998 bytes; the ratchet row follows the measurement, 2244 to
2243.

Claude-Session: https://claude.ai/code/session_01JQwxbaa1vPDVusyBxyGMG6
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head 1235a12 · 2026-11-30T01:17Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1235a12d897d2b06f3624ed9ce29fa619edfe224
Local-runs: none
Scope: skills/objectstack-i18n/SKILL.md + scripts/check-skills-token-ratchet.mjs
Security-touching: no
Rule-change-verified: none

Read: card #34770 and its 54 comments (rulings 7128031203, 7168461386, 7176941587, parity record 7249189592, claim 7264988593 and dev report 7265952071 in full; no earlier contract review names this head), PR #38663's body and three files, the net diff against main (merge base f5da514b; main is 7 commits ahead, none on skills/, the ratchet script, translation.zod.ts or the i18n CLI), and the head's check-runs. The eval readings are the dev's report (7265952071); no gate measures them and this review did not re-run them.

Check-runs at the read: every concluded run is success or skipped, none red. All eight Lint · jobs, Lint & Repo Gates, Check Changeset, Governed Surface Queue Guard, PR-body guards, Type Check · source gates, Type Check · debt ledger, Test UI and Test Core (3/12) are success. Still pending: Build Core, Live E2E UI, Test Core (1/12), Test Core (2/12), Type Check · consumer gates, Type Check · workspace. The PASS below is on the tree; the pending runs are the seat's to read before it acts.

① Derived judgments

  • Published text of @objectstack/skills: the i18n entry shrinks 25,285 → 8,998 B, 504 → 160 lines. Right. Inside the card's 6–9 KB line and 500-line cap. Sections beyond first checks, traps and routing (## A bundle, ## Key map) match the merged routers on main (platform keeps defineStack() keys, UI keeps View Types).
  • Frontmatter (lines 1–17: name, description, license, compatibility, metadata) is byte-identical to the merge base. Right. The trigger surface does not move.
  • 27 section anchors leave the entry, 5 arrive. Right. The link and anchor gates run in the green Lint · jobs; no served-section ledger row names this skill.
  • No accept-set change. No schema, CLI or runtime file is in the diff. Every key the entry's map and example write was read against packages/spec/src/system/translation.zod.ts on main and exists there under the parent shown.
  • The ratchet gate's accept-set for this file narrows: ceiling 6315 → 2243. Right, and intended by ruling 7128031203 ④: later growth of this entry needs a ruling.
  • Security line. no: no hunk on the head teaches permission, sharing, credential, token or authentication behaviour. Two deletions drop descriptive mentions (the three /api/v1/i18n routes "for signed-in callers"; the language of permission-denial messages); the permissions map line is a label key for permission sets; "tokens" in the ratchet comment are size units.

② Semver level

.changeset/34770-i18n-skill-router.md bumps @objectstack/skills by patch. Right: prose only, no shape, flag or behaviour changes, the same level PRs #38434 and #38586 of this split took. Check Changeset is success.

Clause-②: no on the PR body and in the changeset, no arm. Agrees with the diff: nothing an app's metadata may declare is widened or narrowed. Metadata-protocol: none agrees too.

For the lane seat, whose file this is: the changeset says the key map "names every group and every key under objects.{object} ... and every top-level group". The tree does not bear "every": the top-level forms group is absent (it was absent from the old entry too), and bulkActions.{def} and params.{param} stop above their leaf keys. The entry itself makes no such claim and routes "a key or shape not above" to the contract.

③ Boundary flags

  • Open question: key map inline (3.4 KB) or behind a pointer. Answered: A, keep inline. The card's Scope line sends restated key tables behind a pointer, but the only pointers available are the generated index (it lists files, not keys) and a 3,340-line contract that a session without node_modules cannot read; eleven of sixteen eval cases ask for a key's placement; ruling 7168461386 settled budget against reachability in favour of reachability; and the entry meets the budget with the map in it. Option B adds a file and a ratchet row, which ruling 7128031203 leaves to the maintainer: it is a follow-up for him, not a condition of this PR. No escalation.
  • Commit 1235a12d says twenty-two readings of case 12; the count is 16. Answered: no action. The squash takes the PR body, which carries 16.
  • Four eval literals fail correct answers on both trees (cases 5, 10, 11, 12). Answered: not this PR's. Ruling 7176941587 Q1 B and Q3 A leave eval-file defects to the file's owner, and the PR leaves both eval files untouched. The seat routes them to the eval-literal defect card filed after PR docs(skills): the objectstack-platform entry file becomes a router #38434. They are also why the parity reading for case 12 is thin (see ④).
  • Deviations in the report (trailer and footer form, alias branch, claim naming the older branch, main not merged in, routes not linked): none touches the contract. main not merged in is harmless at this read: no commit on main since the base touches a path of this diff.
  • "Every trap stays inline unless a publish-time check covers it", read by the dev as: silent failures stay, loud ones go. Answered: the reading holds, and the cut list was checked against it in ④.
  • SQL push-down. Not applicable: prose and one ledger number, no query, no id materialisation, no join.

④ Design judgment

skills/objectstack-i18n/SKILL.md

Traps. Each silent failure the old entry taught is still inline: option key is the stored value (trap 1, with "only warn", which matches translation-option-key-unknown being a warning); double braces only, no ICU (2); --objects-only defaults on (3; default: true in extract.ts on main); coverage is not freshness (4; --check "Write nothing" on main); the generated module is an objects subtree and withSourceFallback takes the hashes fourth (5; signature (translated, source, recorded, filledFrom?) on main); organization language for texts and records (6); no en floor for app refusals (7); and the six placement notes (child-object keys, form title, helpText against help, columns beside fields, _relatedLists on the parent, block name and group key, flow step groups).

Cuts. Each cut item was checked for a loud answer on main: the retired o dialect and its siblings, the three sourceLocale aliases, settings, relatedLists, any key under preflight but fields and columns (all refused by strictObject with a prescription; TRANSLATION_KEY_GUIDANCE and the alias tables are in the contract); a key over an undeclared target (translation-target-unknown); a bound action under globalActions (error). The platform-composed userMessage ladder, the REST routes, the adapter method list and the layout table ask nothing of a bundle author. No silent trap was found removed.

Pointers. All resolve on the head: ./references/_index.md (exists, names translation.zod.ts); node_modules/@objectstack/spec/src/system/translation.zod.ts; @objectstack/spec/contracts (exported; II18nService declares the three optional methods); content/docs/protocol/kernel/i18n-standard.mdx exists on main and holds both the request-locale order and the resolveLocaleAmong ladder; the four sibling skills exist; @objectstack/platform-objects/apps exports withSourceFallback; defineTranslation and TranslationItemSchema are in the contract.

Eval prompts. Every expected key path of the sixteen cases is derivable from the head's map, notes and traps; the two restorations ruling 7168461386 calls for are in the tree (line 67 author with defineTranslation; line 113 the worked columns example). Parity under ruling record 7249189592, on the dev's readings: 42/48 on the head against 38/48 on main; case 5 fails on both in every run; case 12 reads 1/3 on main and 1/6 on the head, so it is not "fails on every run of the head", but by one passing run. The rule is met; the margin is the eval literal's, as the dev reports, and is unverified here.

Rulings. 7128031203 ④: one row, at the measurement, no row raised or added, the sum falls. 7168461386: restorations paid inside the entry, no row rises. 7176941587: zero headroom kept, eval files untouched.

Findings:

  • S1 (should-fix) — the key map's opening sentence (lines 73–74) says {path}, {column_path} and {list} are each one key, "its value a plain string". That is false against the contract for two of the three places it names: _relatedLists.{list} is strictObject({ label }), and resultDialog.columns.{path} / preflight.columns.{path} is a record of column path to string. The map lines below and the worked example show the right shape, so the entry contradicts itself, and a bundle that follows the sentence is refused by defineTranslationBundle, loudly. New in this PR: the old row said "label of ... by its literal list". Fix inside the entry: keep "one key, dots included" for all three and "value a plain string" for fields.{path} and {column_path} only.
  • N1 (nit) — three map paths end on an object node where the old entry named the leaves: bulkActions.{def} (label, confirmText, confirmLabel, params), datasets.{dataset}.{dimensions,measures}.{member} (label, description), and a report block's description. Each miss is a strict refusal or a missing key in os i18n check, and the contract row answers it.
  • N2 (nit) — line 106–107 ties relatedListTitle to the master_detail field of the same sentence; the old entry said a lookup or master_detail field draws that list.
  • N3 (nit, older than this PR) — the map never names the top-level forms group, nor a flow's successMessage, errorMessage, notices, refusals and screens.{node_id}.fields; the old entry did not either. Routing row 1 covers them. A candidate for the seat's follow-up list, not for this diff.

No must-fix.

scripts/check-skills-token-ratchet.mjs (the objectstack-i18n CEILINGS row)

Agrees with the contract. The file on the head is 8,998 B; less the 27-byte stamp line, 8,971 priced; ceil(8971 / 4) = 2243, the row's value, zero headroom. 6315 − 2243 = 4072, the fall the comment states. The diff changes this one row and adds none, so the sum of ceilings falls by 4072 and cannot rise. The comment names its authority (#34691 S3 = A). The ratchet step and its self-test run in lint.yml, whose Lint · jobs are all success on this head. No finding.

Implemented-by: claude/project-thread-tc3h02
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu

VERDICT: PASS

…he changeset says what the map covers

Contract review S1: the map's opening sentence gave all three literal keys a
plain-string value; a related-list key holds an object with a label and a
table field's column map holds column paths. The sentence now claims a string
only where the contract has one. The placement note names lookup beside
master_detail, as the contract does. Paid inside the entry: 8,998 to 8,996
bytes; the ratchet row stays at the measurement, 2243.

Claude-Session: https://claude.ai/code/session_01JQwxbaa1vPDVusyBxyGMG6
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head 06c77b1 · 2026-11-30T01:40Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 06c77b1bc96833840d8de7197a1aadb3a3c5fe53
Local-runs: none
Scope: skills/objectstack-i18n/SKILL.md + scripts/check-skills-token-ratchet.mjs
Security-touching: no
Rule-change-verified: none

Delta record. It judges git diff 1235a12d 06c77b1b (one commit, the same three files, 9 lines in and 9 out) and anything that commit newly makes false; everything else stands as judged in this seat's record on 1235a12d. Read: the delta diff, the head's file sizes, and the check-runs on 06c77b1b. No eval reading on this head was among the inputs, and none was re-run here.

Check-runs at the read: none red. All eight Lint · jobs, Lint & Repo Gates, Build Core, Live E2E UI, Governed Surface Queue Guard, PR-body guards, Type Check · source gates, Type Check · debt ledger, Test UI, Test Core (3/12) and one Check Changeset run are success. Still pending: Test Core (1/12), Test Core (2/12), Type Check · consumer gates, Type Check · workspace, and a second Check Changeset run. The pending runs are the seat's to read before it acts.

① Derived judgments

  • No new accept-set or public-surface change. The delta rewords five places in the entry, one changeset paragraph and two numbers in a ratchet comment. Frontmatter lines 1–17 are byte-identical to 1235a12d. The entry is 8,996 B and 160 lines, inside the card's budget.
  • Security line. no: none of the five reworded places teaches permission, sharing, credential, token or authentication behaviour.

② Semver level

Unchanged: @objectstack/skills patch, right for prose. Clause-②: no, and Metadata-protocol: none, both untouched by the delta and still in agreement with the diff.

The changeset overstatement is closed. The paragraph no longer says "every": it now says the map lists the groups under objects.{object} and the top-level groups the old entry listed, that it stops above the leaf keys of bulkActions.{def}, params.{param}, a dataset member and a report block's description, and that it does not list forms. Each of those statements is true of the head's map.

③ Boundary flags

No new flag in the delta. The three answered on 1235a12d (key map inline: keep; commit-message count: no action; four eval literals: the eval file's owner) stand. SQL push-down: not applicable, prose and a comment.

④ Design judgment

skills/objectstack-i18n/SKILL.md

  • S1: closed. Lines 73–74 now read "{path}, {column_path} and {list} are the declared string as one key, dots included; fields.{path} and {column_path} hold plain strings". Both halves agree with the contract on main: resultDialog.fields and preflight.fields are records of string, a columns.{path} node is a record of column path to string, and _relatedLists.{list} (an object with label) is no longer called a plain string.
  • N2: closed. The note now says a master_detail or lookup field. That is true of both keys it governs: the contract's own text on inlineTitle and on relatedListTitle each names a master_detail / lookup field. The old entry tied inlineTitle to master_detail alone, so this is a small correction toward the contract, not a new claim against it.
  • N1: left open by the dev's choice, now stated in the changeset. Accepted: a nit, each miss is a loud refusal or a missing key in os i18n check, and routing row 1 answers it.
  • N3: unchanged, older than this PR, now stated in the changeset (forms). Still a candidate for the seat's follow-up list.

The three edits that paid for the fixes make nothing false:

  • Trap 2, "is left as written" for "passes through as written": same meaning.
  • Trap 6, "use the Localization setting, else i18n.defaultLocale" (the words "if set" dropped): same order, and the literal defaultLocale that eval case 15 requires is kept.
  • Routing row 4 drops the parenthesised lists of what each sibling skill covers, keeping "(and hooks)" and "(and actions)". The four skills named still exist; the row routes as before with less detail.

One limit on this judgment: the reworded sentences sit under eval cases 1, 8, 15 and 16. Every literal those cases require is still in the entry, but no eval round on 06c77b1b was among the inputs.

No must-fix, no should-fix.

scripts/check-skills-token-ratchet.mjs (the objectstack-i18n CEILINGS row)

Agrees with the contract. The file on the head is 8,996 B; less the 27-byte stamp line, 8,969 priced; ceil(8969 / 4) = 2243, the row's unchanged value, so it is still pinned at the measurement in the gate's own unit. The comment's two byte figures were updated to 8996 and 8969 and are right; the stated fall of 4072 in the sum of ceilings is unchanged and right. The ratchet step runs in lint.yml, whose Lint · jobs are all success on this head. No finding.

Implemented-by: claude/project-thread-tc3h02
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

维护者速读

  • 用户能看到什么变化:对外发布的 i18n 技能入口从 25 KB 缩到 9 KB,AI 读它更快更准;评测 42/48 对 main 的 38/48,没有用例变差。
  • 风险:只改技能文字和字节上限表,不动代码。
  • 要你做什么:os-zhuang 批准后合并(发布冻结期间席位不入队)。

席位核对

ACCEPT · L1 · area o2-S1 · Head-sha 06c77b1bc96833840d8de7197a1aadb3a3c5fe53 · 2026-11-30T02:12Z

  • Contract review at CONTRACT_REVIEW_TIER: PASS 7266118883 (S1 should-fix), delta PASS 7266390241 on this head closing S1 and N2; N1 and N3 accepted as nits, stated in the changeset.
  • Checks at this head: 31 success, 18 expected skip, 0 failed, 0 pending.
  • Ratchet: objectstack-i18n row 6315 → 2243 at measurement (zero headroom), sum of ceilings 200,348 → 196,276; entry 25,285 B / 504 lines → 8,996 B / 160 lines; frontmatter byte-identical.
  • Eval parity (rule of ruling 7128031203 ②, applied by analogy): main 38/48, head 42/48 on the first head; no case fails on head while passing on main; case 12 flips on both trees.
  • Key map stays inline (option A, the seat's call: 11 of 16 eval cases ask about it; B needs a new ratchet row).
  • Changeset read sentence by sentence: true after the delta.
  • Part of #34770: the card keeps pm:dispatched; next skill PRs follow serially (they share the CEILINGS table).
  • Tier H (skills/**): requesting review from os-zhuang. Release freeze: no enqueue by the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

2026-11-30T02:13Z · Hand-off: seat ACCEPT above at this head; requesting review from os-zhuang (Tier H governed surface). Release freeze: the seat does not enqueue.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 30, 2026 02:14
@os-zhuang
os-zhuang enabled auto-merge November 30, 2026 02:15
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 1fef2ed Nov 30, 2026
55 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-tc3h02 branch November 30, 2026 02:36
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…jectstack-ai#38795)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi99QsuPTPkC1uKm2mViUT3Rf)_

Part of objectstack-ai#34770

Clause-②: no
Metadata-protocol: none

`Part of`, not the closing form: the catalog-size line of the card's
Done-when is not met by this PR. This is PR 4 of the per-skill split,
under claim 7280537583 and its amendment 7280758590.

## 维护者速读

- 用户能看到什么变化:用户无感。发给 AI 的「表达式与公式」技能说明,入口文件从约 24 KB 缩到 9
KB:入口只留开工前四项检查、一段可照抄的示例、一份可用函数名单、八个「写得通过却算错或被拒」的坑,以及其余内容去哪里查的指路表。
- 为什么做:这是「技能目录瘦身」的第七份(界面、数据、自动化、平台、跨大版本升级、多语言翻译六份已完成)。入口文件每次都整份装进 AI
的上下文,越长越贵,也越容易漏读。
- 出错会怎样:只动教 AI 的文字,没有产品行为变化;风险是 AI
少读一段后答错。改动前后都跑了评测:十四道题每题三遍共四十二次,最新一版通过三十九次,改动前是三十二次;没有哪一题是改动后才每遍都不过的。合约审查提的两处应改(示例里一条判断在新建记录时会报错;一句「算不出就中止写入」说得过宽)已在入口内改好。可整笔撤回。
- 要你做的:无。席位核对与合约审查通过后,会按治理规则请审批人批准。

## Rulings this executes

- **Card Scope** (decision record on the card, S3 = A): the entry file
holds first checks, at most about 8 traps and a routing list; 6–9 KB,
hard cap 500 lines; restated option lists and function tables go behind
a pointer; no trap is removed until a publish-time check covers it or it
stays inline.
- **7128031203** fork 4 = A: ratchet rows are pinned at the measurement
with zero headroom, and the sum of ceilings does not rise. Here no row
rises and none is added.
- **7168461386** = A: text an eval shows the entry lost goes back into
the entry, paid inside the entry. Used three times in this PR (see Eval
parity).
- **Ruling record 7249189592**, the parity rule: a case whose result
flips between runs on both trees is unstable on both and does not block;
a case that fails on every run of the head while `main` passes is a
regression.
- **Seat order for this PR** (claim amendment 7280758590): same shape as
PR 3 (objectstack-ai#38663); no new file under `skills/` (a new file needs a new
ratchet row, which stays with a human); the cut, not a move, lowers the
catalog total.

## What changes

**The entry file becomes a router.**
`skills/objectstack-formula/SKILL.md`: 24,377 → 8,999 bytes, 485 → 135
lines, 6,088 → 2,243 tokens. Frontmatter (description, tags) is
byte-identical. It now holds:

- `## First checks`, four: the installed contract wins over the
`compatibility` line; read the object's declared fields and the contract
of the key that takes the expression, and never recall a function; bare
CEL under the `F`, `P` or `cel` tag, never braces round a field
reference, with the Salesforce spellings it keeps; verify with `os
validate`, `os build` or the `validate_expression` agent tool.
- One type-checked block, eight lines: a text formula with every
nullable operand coalesced, a guarded divisor, the two date wraps, a
`label()` formula, a null-guarded predicate, the transition predicate
behind its insert guard (`previous != null && …`), a seed value.
- `## Scope and functions`: the roots an expression can read, and every
advertised function name as a call form, in five lines.
- `## Traps`, eight: `has()` is not a null check on a server-evaluated
predicate; action `visible` / `disabled` are the exception; a transition
compares `previous`; a list field is never compared with a scalar; a
`date` / `datetime` field is its ISO text; `label()` and the working-day
functions belong to a formula or a stored field's `expression`; a
dynamic seed value is the `cel` tag; a `template` is not CEL.
- `## Where to go`: six rows (the contract, the published formulas page,
and the four sibling skills). Three run-time facts ride the rows that
send them elsewhere: a `formula` field is virtual; a view filter is not
CEL; a form-view `visibleWhen` faults open.

**No text moved.** This skill has no hand-written reference file
(`references/_index.md` is generated), and a new file needs a new
ratchet row. So what left the entry was cut, each behind what now
answers it:

| Old entry section | Now |
|:--|:--|
| Opening callout (bare CEL, no braces) | First check 3, which describes
the mistake and no longer spells it. |
| Skill Boundaries | The frontmatter description and the routing table.
|
| Core contract | The opening paragraph (the envelope, the three
dialects, no `js`) and first check 3 (structured output carries the
envelope). Cut: the engine behind each dialect and the helper column;
the block shows the three CEL tags, and the `cron` and `tmpl` tags are
in the contract. |
| CEL syntax cheat-sheet | The roots line of `## Scope and functions`,
with `os.org` still limited to `id` and `tier`. Cut: the operator rows,
which are plain CEL. The list-equality paragraph is trap 4, with the
three positive membership forms; the three negated forms are cut (the
same guard, negated). |
| `has()` is NOT a null check | Traps 1 and 2. The publish-time refusal,
the flow condition's bare name and the action guard all stay. |
| ObjectStack CEL standard library | The function list keeps every name.
Cut to the published page: what each function returns and the
per-function notes. Kept as traps: the date text rule and the helpers
that replace date arithmetic (5), the option label and the working-day
placement (6). |
| Mandatory patterns 1 to 5 | The type-checked block carries one line
for each; trap 7 is the seed rule and trap 3 the `previous` rule. Cut:
the wrong-on-purpose examples, and the table of where `previous` is
bound with the per-row rewrite rule, both of which
`skills/objectstack-data/references/data-hooks.md` carries. Kept in trap
3: a hook `condition` that cannot evaluate aborts the write, and the 10
000-row refusal. |
| Mechanical translation table | First check 3 keeps nine rows (the five
operators, `ISBLANK`, `OLD` / `NEW`, the bare field). The rest is on the
published page; each legacy spelling fails the build. The flow exception
is in trap 1. |
| Surfaces that take an Expression | Cut to the contract. Kept: a
bare-string `defaultValue` is a literal (first check 3); a `formula`
field is virtual and a view filter is not CEL (routing row 3); a
form-view `visibleWhen` faults open (routing row 6); a `SharingRule`
condition must lower to a filter (trap 4). |
| Cron and template surfaces | Trap 8 keeps the template grammar, the
empty render of a missing path and the two currency forms. Cut: the cron
grammar and both dialects' carriers (the contract). |
| Verify your work, See also | First check 4 and routing row 1. |

**Sizes** (bytes · lines · ratchet tokens):

| | before (`main` at `6cc2024e`, merged in) | after (`50530b6b`) |
|:--|--:|--:|
| `SKILL.md` (entry) | 24,377 · 485 · 6,088 | 8,999 · 135 · 2,243 |
| `skills/objectstack-formula/**` (4 files) | 37,883 · 701 | 22,505 ·
351 |
| all 14 `SKILL.md` together | 180,656 · 3,406 | 165,278 · 3,056 |
| whole `skills/` tree (115 files) | 1,214,886 | 1,199,508 |
| whole tree without `evals/` (73 files) | 855,732 | 840,354 |
| ratchet: authored tokens = sum of all ceilings | 196,275 | 192,430 |
| ratchet: bundle total, tokens | 300,926 | 297,081 |

The `main` column moved since the first delivery (it was read on
`f576dee5`): `main` lowered another skill's row by one token, so its sum
of ceilings is 196,275. The bundle total on `main` is the head's reading
plus this row's fall; the entry is the only file under `skills/` that
differs.

**Budget reading:** the entry is 8,999 B, inside the card's 6–9 KB line,
and 135 lines against the 500-line cap. The whole catalog is 15,378
bytes smaller, all of it cut.

**Ratchet row** (`scripts/check-skills-token-ratchet.mjs`), pinned AT
its measurement, zero headroom: `skills/objectstack-formula/SKILL.md`
6088 → 2243 (−3,845): `ceil((8999 − 27) / 4) = ceil(8972 / 4) = 2243`.
It is the skill's only row. The sum of all ceilings goes 196,275 →
192,430. The first delivery pinned the row at 2237 (8,974 bytes); the
review round's two fixes cost 27 bytes, one blank line and one comma pay
2, and the row follows the measurement up by 6 tokens. Against `main` no
row rises.

## Tests

### Eval parity

Judged by ruling record 7249189592. **No case fails on every run of the
head while `main` passes.** On the current head (`50530b6b`, the review
round's text) the with-skill arm passes 39 of 42 turns against 32 of 42
on `main`'s text; on the first delivery's text (`327903f6`) it passed 41
of 42. The three misses on the current head are two runs of case 7,
which flips on both trees, and one run of case 13, a correct condition
written without the `P` tag; case 13 read 6 of 6 on a second reading.

Skill evals, both arms, one command line for every full round: `pnpm
--filter @objectstack/scenarios skill-evals --skills objectstack-formula
--repeats 3 --concurrency 4`, with the model and effort flags PR 3's
rounds used (the extra readings add `--case` and `--repeats 6`); CLI
2.1.332, subscription login. 14 behaviour cases in
`evals/cel-predicates-formulas.json` and 7 trigger cases in
`evals/triggers.json`, both untouched.

| reading | tree | with-skill | no-skill | with-skill cases below 3/3 |
|:--|:--|--:|--:|:--|
| before round | `f576dee5` | 32/42 | 0/42 | 4 (0/3) · 7 (2/3) · 8 (2/3)
· 9 (2/3) · 12 (0/3) · 14 (2/3) |
| first router head | `75b00bcc` | 37/42 | 0/42 | 10 (0/3) · 11 (2/3) ·
12 (2/3) |
| second head | `b93fb9bf` | 40/42 | 0/42 | 11 (1/3) |
| third head | `9643441f` | 40/42 | 0/42 | 7 (1/3) |
| third head, cases 7 and 11, six repeats | `9643441f` | 8/12 | 0/12 | 7
(3/6) · 11 (5/6) |
| `main`'s text, cases 7 and 11, six repeats | `f576dee5` text | 7/12 |
0/12 | 7 (1/6) |
| fourth head | `822cd547` | 40/42 | 0/42 | 4 (2/3) · 7 (2/3) |
| first delivery's text, full round | `327903f6` | 41/42 | 0/42 | 11
(2/3) |
| **review round's text, full round** | `50530b6b` | **39/42** | 0/42 |
7 (1/3) · 13 (2/3) |
| review round's text, case 13, six repeats | `50530b6b` | 6/6 | 0/6 |
none |

Trigger cases, every full round on every tree: loaded when it should
15/15, left alone when it should not 6/6.

- **Case 10** (a `datetime` field as `YYYY-MM-DD` text) was a real loss
on the first head: 3/3 on `main`, 0/3 on `75b00bcc`. Every answer gave
the right formula; each then quoted the refused form, which the case
forbids, because the first head's sentence said "the build refuses the
bare field there". The sentence reads as it did before the cut ("wrap it
in `date()` first") and the two wraps are lines of the type-checked
block: 3/3 on every later head.
- **Cases 10 and 11, a missing `F` tag** on the first head (one run each
wrote the formula bare or as an envelope): the first head named no tag
in its first checks. First check 3 now says which tag a formula, a
predicate and a seed value take.
- **Case 3** (the transition predicate, the case the review round's two
fixes bear on) is 3/3 on `50530b6b`, as on every earlier reading. All
three answers write `previous != null && previous.status != 'escalated'
&& record.status == 'escalated'` and say why the guard is there. So did
the three answers on each of `9643441f`, `822cd547` and `327903f6`, from
trap 3's text; on `main`'s text all three wrote the unguarded line. The
fix makes the block agree with what the answers already gave.
- **Case 13** (a hook `condition` on a `tags` field) is 2/3 on
`50530b6b` and was 3/3 on every earlier reading of both trees. The miss
gives the right membership form, null-guarded and parenthesised, in a
fenced block without the `P` tag, the literal the case requires. A
second reading of the case alone, six repeats on the same head, is 6/6:
8 of 9 on this head. The round's edits do not touch the tag sentence or
trap 4.
- **Case 9** (a record-change flow's edge condition, the site S2
separates from a hook) is 3/3 on `50530b6b`.
- **Case 7** (compare the stored value, never the option label) flips on
both trees: 3 of 9 on `main`'s text, 15 of 21 across the first five
heads and 1 of 3 on `50530b6b`. Every failing answer compares the stored
value and then says a predicate cannot call `label()`, which is the
literal the case forbids. One failing answer on `822cd547` did show a
loss of precision: it carried the action guard over to a form-view
`visibleWhen`, because one trap named both as client-side. Trap 2 is
about action `visible` / `disabled` alone again, and the form-view fact
moved to the routing row: 3/3 on `327903f6`. The two failing answers on
`50530b6b` are of the first kind: each compares the stored value and
names `label()` as the thing a predicate cannot call.
- **Case 11** (a multi-select's labels as text) passes 9 of 9 on
`main`'s text, 16 of 21 across the first five heads (by head: 2/3, 1/3,
8/9, 3/3, 2/3) and 3 of 3 on `50530b6b`. Four of the five failing
answers give `label(record.no_margin_reasons)` under the `F` tag and add
a sentence that names `joinNonEmpty` (as the thing not to use, or as an
option for another separator), the literal the case forbids; the fifth
is the first head's missing tag. It fails on every run of no head, so
the parity rule does not block on it. It is the one case where `main` is
steadier than the head, and it is reported as that: a likely cause is
that the function list now sits one section above the trap, where `main`
had it in a table further up a longer file.
- **Cases 4, 9, 12 and 14** pass more often on the head. Case 4 (0/3 on
`main`, 14 of 15 across the first five heads, 3/3 on `50530b6b`) and
cases 9 and 14 failed on `main` when a correct answer quoted a wrong
form the old entry spelled out (the JavaScript date constructor, the
brace form); the router describes those mistakes in words and does not
spell them. Case 12 (0/3 on `main`) failed there because every answer
wrapped the field in `date()` inside `addDays`; the block now carries
`isoDate(addDays(record.due_date, 7))` as a line.

Three restorations under ruling 7168461386 came out of these rounds,
each paid inside the entry: the date sentence (case 10), the tag
sentence (cases 10 and 11), and the action-only guard (case 7). A fourth
edit came from reading the contract text, not from an eval: a flow
condition's bare name is the field only where no flow variable or node
id holds it.

<details><summary>Round records</summary>

- Before round on `f576dee5`: 105 of 105 turns, 4.6 min.
- Rounds on `75b00bcc`, `b93fb9bf`, `9643441f`, `822cd547` and
`327903f6`: 105 of 105 turns each, 4.5 min each.
- Extra reading on `9643441f`, cases 7 and 11, six repeats: 24 of 24
turns, 1.1 min.
- Extra reading on `main`'s text, same cases and repeats: 24 of 24
turns, 1.1 min. The runner has no flag for a second tree, so `main`'s
`SKILL.md` was restored into the working tree for this one reading and
put back (`git hash-object` equal before and after); its round header
names `9643441f` "with uncommitted changes under the runner or skills/".
- No full round ran on `77804a7a`: it differs from `327903f6` by two
sentences of the changeset, and the turn never reads a changeset.
- Review round, full round on `50530b6b`: 105 of 105 turns, 4.3 min.
Extra reading on `50530b6b`, case 13, six repeats: 12 of 12 turns. A
full round was run and not only the cases the two sentences bear on (3,
9 and 13): the edited line sits in the block every answer copies from.
- Every `must_contain` literal of the 14 cases that the entry carried
before, it still carries (35 literals read; 28 carried before and after,
0 lost, 1 gained; 6 appear in neither tree and come from the prompts).

</details>

### Other tests

On `50530b6b`, under the verify lock (`VERDICT command-exit 0` each),
and with the same counts on `9643441f`, `822cd547`, `327903f6` and
`77804a7a`:

- `pnpm --filter @objectstack/formula exec vitest run --maxWorkers=2
src/skill-catalog-sync.test.ts src/cel-stdlib-drift.test.ts` (the first
reads this entry and requires every advertised function in it as a call
form): `Test Files 2 passed (2)`, `Tests 5 passed (5)`.
- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2
scripts/platform-catalog.test.ts scripts/skill-map-guards.test.ts` (the
suite that names the ratchet script, and the one that names this skill):
`Test Files 2 passed (2)`, `Tests 57 passed (57)`.
- `pnpm --filter create-objectstack exec vitest run --maxWorkers=2
src/created-summary.test.ts` (it names the skill in its catalog list):
`Test Files 1 passed (1)`, `Tests 12 passed (12)`.
- `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2
src/hook-condition-previous-scope.test.ts` and `pnpm --filter
@objectstack/trigger-record-change exec vitest run --maxWorkers=2
src/bulk-write-per-row-context.test.ts` (each names the skill in a
comment; neither reads it): 25 and 4 tests passed.

No ablation: the diff changes prose and one ledger, no tested behaviour.

## Acceptance notes

Review round (contract review 7286361695 on `77804a7a`, VERDICT PASS, no
must-fix; the L1 note 7286117663 raised S1 first):

- **S1, fixed.** The checked block's transition line carries `previous
!= null && ` in front, the form trap 3 prescribes. Unguarded it faults
on insert, where `previous` is `null`, and the build does not refuse it
(the null-guard gate judges ordering and arithmetic operators, and the
line uses `!=`). Eval case 3's required literals still match, 3/3.
- **S2, fixed.** Trap 3's sentence reads "A hook `condition` that cannot
evaluate (…) ABORTS the write with no `onError` escape". The cut had
widened it to every site the trap lists; a record-change trigger's run
fails while the write lands (`validate-null-guards.ts`, outcome
`run-fails`; trap 1 says so for a flow), and an advisory validation rule
is skipped, so the sentence names the hook alone, as `main`'s text did.
- **Paid inside the entry**: +27 bytes for the two fixes, −1 for the
doubled blank line after the frontmatter, −1 for a comma; 8,974 → 8,999
bytes. The ratchet row is re-pinned at the new measurement. The
changeset's line count (135) and its sentence on the abort are corrected
to match.
- **N1, N2 and N3 are left**, as the review accepts them: no byte is
free under the 9 KB line.
- **`main` is merged in** (`6cc2024e`, a plain merge commit): it moved
one other ratchet row, the textual merge was clean, and the workspace
was rebuilt before any gate ran.

Ruled by the contract review, recorded here as it stands in the entry:

- **The function names stay inline (ruled A)** (about 0.9 KB of the
entry's 9.0 KB) and are not cut to a pointer. The card's shape line
sends function tables behind a pointer, and
`packages/formula/src/skill-catalog-sync.test.ts` requires every name of
`CEL_STDLIB_FUNCTIONS` in this file as a call form. That test is outside
this claim's file surface, and `@objectstack/formula` ships `dist` only,
so an installed project has no source to read the list from. So the
tables became a list of call forms and what each function returns went
to the published page. If the list should leave too, the test moves
first, in its own change.

Decided here (small, no shipped behaviour), each open to reversal in
review:

- **"No trap is removed unless a publish-time check covers it or it
stays inline" was read as: an expression that parses and then fails or
reads wrong at run time stays inline.** Inline: the eight traps and the
three facts on the routing rows. Cut to a pointer, each loud at the
build: an unknown function, a legacy spelling, a malformed envelope, the
retired `titleFormat` key.
- **Four traps stay inline although the build refuses them** (the
nullable operand, the list compared with a scalar, the date text in a
timestamp call, date arithmetic): the refusal says what is wrong, and
the entry carries the form to write instead, which is what the eval
cases about them ask for (2, 4, 5, 9, 10, 12, 13 and 14).
- **The entry describes wrong forms and no longer spells them** (the
brace form, the JavaScript date, a number added to `today()`, `CONCAT`).
An answer that quotes a wrong form fails the cases that forbid it, on
either tree. The contract review ruled the brace example stays in words
(A).
- **A version check opens the first checks**, as in the other router
entries; the old entry had none. Paid by dropping the cron grammar
sentence.
- **Section anchors of the entry changed.** The changeset lists every
anchor that left `SKILL.md`. No file in this repository links one of
them.
- **Four lines in the summary above, not six**: the standing order for
this card thread asks for six, and the agent file that binds the dev
fixes four named lines and wins on conflict.
- **Footer form**: this body ends with the single block AGENTS.md
prescribes for a PR body.

Noted, not changed:

- The literals of eval cases 4, 7 and 11 fail correct answers (above).
The parity rule treats the cases as fixed, so this PR does not touch
them.
- The published formulas page lists the legacy rows the entry dropped,
except four of the five functions the old table marked as having no CEL
counterpart (`MID`, `LEFT`, `RIGHT`, `SUBSTITUTE`; it has `MONTH_DIFF`).
Each fails the build as an unknown function, with or without a row.
- The version PR objectstack-ai#38192 touches the entry's stamp line, and objectstack-ai#38787 and
objectstack-ai#38790 touch other rows of the ratchet table; `overlap-check` reads each
as merging cleanly. It reads objectstack-ai#38497 as a conflict in the ratchet script:
that PR conflicts with `main` itself there, in one hunk on the
`objectstack-ai` row, and the hunk is byte-identical with and without
this branch; the formula row is outside it.

## Verification

Read first, by risk:

1. `skills/objectstack-formula/SKILL.md`, the whole file: is anything a
model needs before opening the contract missing? The risk hunks are `##
Traps` (eight items replace most of the old file) and the function list.
2. `.changeset/34770-formula-skill-router.md`: the "what left, and what
answers it now" list is the record of every cut.
3. `scripts/check-skills-token-ratchet.mjs`: the one
`objectstack-formula` row.

Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints
`ratcheted (authored) 192430 / 192430 (+0)` and
`skills/objectstack-formula/SKILL.md 2243 / 2243 (+0)`; `wc -c
skills/objectstack-formula/SKILL.md` prints 8999.

Gates, local, each exit code captured before any pipe. The whole derived
list ran on `50530b6b`, and before it on `9643441f`, `822cd547`,
`327903f6` and `77804a7a`, 69 of 69 each time.

<details><summary>Derived families on `50530b6b`: 69 derived, 69 run
green, 0 NOT MEASURED</summary>

- Reconciliation: `✓ dispatch-gates --ran: 69 derived famil(ies)
accounted for — 69 run, 0 NOT-MEASURED (a DERIVED zero — all 69 recorded
an exit code and none of them is 3).`
- `node scripts/check-skills-token-ratchet.mjs`: `✓
check-skills-token-ratchet: 61 authored bundle file(s) within their
ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured,
not ratcheted.` (`ratcheted (authored) 192430 / 192430 (+0)`, `bundle
total 297081`); its `--self-test`: `111 cases pass`.
- `pnpm check:dual-build-cjs-loads`: `126 published require entry
point(s) across 74 package(s) load; 2593 emitted CommonJS file(s)
parse`. It reads every package's built `dist/`; a full `pnpm build
--concurrency=2` ran first on the merged tree under the verify lock
(`VERDICT command-exit 0`, 123 tasks).
- `pnpm check:dts-closure`: `123 built package(s) swept - 324/324
declared declaration file(s) present`.
- `pnpm check:skill-links`: `290 relative link(s) in 76 published skill
file(s) resolve; 161 fragment(s) name a real heading under GitHub's slug
rule.`
- `pnpm check:skill-identifier-liveness`: `Leg 1: 527 citation(s) over
76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0
ledgered gap(s).`
- `pnpm --filter @objectstack/spec run check:skill-docs`, `pnpm --filter
@objectstack/lint run check:doc-formula-expressions`, `pnpm
check:skill-compatibility`, `check:skill-frame-sync`, `check:role-word`,
`check:corpus-claim-drift`, `check:doc-authoring`,
`check:published-files`, `check:nul-bytes`,
`check:cross-package-test-inputs`: exit 0.
- The changeset gates (`check-changeset-no-major`,
`check-empty-changeset`, `check-adr-0087-registration`,
`check:changeset-gate-self-tests`): exit 0. `pnpm
check:pm-dispatch-gates`: exit 0.

</details>

<details><summary>Beside the derived list, on `50530b6b`, all exit 0 but
the last</summary>

- `pnpm --filter @objectstack/spec run check:skill-examples`: `347 prose
examples type-check across 3 surface(s)`. The entry's one block is among
them.
- `pnpm --filter @objectstack/spec run check:skill-refs`: `10 generated
files in sync with packages/spec`.
- `pnpm --filter @objectstack/spec run check:skill-served-sections`: `24
served section(s), each heading exactly once in its file` (the hosted
door serves no section of this skill).
- `pnpm check:doc-anchors`: `1184 internal #fragment link(s) across 368
source file(s) all resolve to a real heading`.
- `pnpm check:published-readme-links`: `566 outbound link(s) across 168
published markdown file(s)`, `99 docs-site page(s) resolved`; the
formulas page the entry links is one of them.
- `pnpm check:skill-top-level-keys`: exit 0.
- `pnpm --filter @objectstack/spec check:generated` after the merge and
the rebuild: exit 0.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: `0 anchored files in the change set — nothing judged.`
- `node scripts/pm/overlap-check.mjs`: `VERDICT clean exit 0` at each
push of the first delivery (on the second it ran right after). Before
the review round's push: `VERDICT overlap exit 1`, for objectstack-ai#38497 alone,
whose conflict in the ratchet script is its own against `main` (see
Noted above); `main`, objectstack-ai#38787, objectstack-ai#38790 and objectstack-ai#38192 merge cleanly.

</details>

Base: the branch is cut from `f576dee5` and carries one merge of `main`
at `6cc2024e` (merge commit `b9e30211`); `main` had not moved further at
the review round's push. CI on the head is the seat's reading.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS)_

<!-- signed: repo:objectstack@os-steve · os-steve ·
session_01ADHkmSAjFEZHRpRq3WCj6z -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…stack-ai#38802)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi99QsuPTPkC1uKm2mViUT3Rf)_

Part of objectstack-ai#34770

Clause-②: no
Metadata-protocol: none

`Part of`, not the closing form: the catalog-size line of the card's
Done-when is not met by this PR. This is PR 5 of the per-skill split,
under claim 7280537583 and its amendments 7280758590 and 7288186602.

## 维护者速读

- 用户能看到什么变化:用户无感。发给 AI 的「接口设计」技能说明,入口文件从约 21 KB 缩到 9
KB:入口只留开工前四项检查、平台自动提供的接口清单、一个对象可以开放的六种操作、一段可照抄的自定义接口示例、六个「写得通过、上线后却答错或被拒」的坑,以及其余内容去哪里查的指路表。
- 为什么做:这是「技能目录瘦身」的第八份(界面、数据、自动化、平台、跨大版本升级、多语言翻译、表达式与公式七份已完成)。入口文件每次都整份装进
AI 的上下文,越长越贵,也越容易漏读。
- 出错会怎样:只动教 AI 的文字,没有产品行为变化;风险是 AI
少读一段后答错。改动前后各跑完一轮评测(八道题每题三遍,共二十四次):改动后通过十次,改动前九次;没有哪一道题是改动后才每遍都不过的。有四道题前后都是每遍不过,原因前后一样:三道是答案内容对、却没写出题目要求的某个词,一道是
AI 没有打开这份技能说明;这是题目和触发方式的问题,本次没有动。这两轮是经你同意、越过本周额度九成保护线跑的。可整笔撤回。
- 要你做什么:无。席位核对、合约审查与评测对比都已有结果,接下来由席位按治理规则请审批人批准。

## Rulings this executes

- **Card Scope** (decision record on the card, S3 = A): the entry file
holds first checks, at most about 8 traps and a routing list; 6–9 KB,
hard cap 500 lines; restated option lists and tables go behind a
pointer; no trap is removed until a publish-time check covers it or it
stays inline.
- **7128031203** fork 4 = A: ratchet rows are pinned at the measurement
with zero headroom, and the sum of ceilings does not rise. Here no row
rises and none is added.
- **7168461386** = A: text an eval shows the entry lost goes back into
the entry, paid inside the entry. Not used: the two full rounds show no
fact the entry lost (see Eval parity).
- **Ruling record 7249189592**, the parity rule: a case whose result
flips between runs on both trees is unstable on both and does not block;
a case that fails on every run of the head while `main` passes is a
regression. Read below: no case is one.
- **Seat order for this PR** (claim amendment 7288186602, PR 5 =
`objectstack-api`): same shape as PR 3 (objectstack-ai#38663) and PR 4 (objectstack-ai#38795); no
new file under `skills/` (a new file needs a new ratchet row, which
stays with a human); the cut, not a move, lowers the catalog total.

## What changes

**The entry file becomes a router.** `skills/objectstack-api/SKILL.md`:
21,359 → 8,986 bytes, 438 → 151 lines, 5,333 → 2,240 tokens. Frontmatter
(description, tags) is byte-identical. It now holds:

- `## First checks`, four: the installed contract wins over the
`compatibility` line, and an `apis:` block written before protocol 17
turns live; read the stack's `apis`, its `manifest.namespace` and the
object's `apiMethods`, and prefer a generated route; read the contract
and never recall a key or a code; verify with `os validate` or `os
build` and read the publish rejection, which carries the fix.
- `## Generated routes`: one listing (the `data` routes, the two `batch`
routes, import and export, the metadata read), the two routes that do
not exist (`/bulk`, a `GET` aggregate), and the two request contracts a
client gets wrong: the metadata list's closed query set with `?names=`,
and an import mapping's entry form, the only one that carries `applyOn`.
- `## API Methods (Operations)`: the six authorable primitives and what
each of the eight derived operations derives from. The heading and the
six names are held by a gate (see Acceptance notes).
- `## A declared endpoint`: the two servable `type` values, one
type-checked example (the path carve-out, `object_operation` with
`objectParams`, `cacheTtlSeconds`), and the mapping rule (move and
rename only; `transform` is rejected).
- `## Traps`, six: an anonymous endpoint needs an armed budget
(`rateLimit.enabled: true`); an app never mounts on `http.server`,
handler code runs in a flow, an inbound webhook is a `type: 'api'` flow,
and three cases have no app surface; `DELETE` is not final (the recycle
bin, the restore door, the two grants); a `PATCH` with no version token
skips the concurrency check; a public form answers `404 FORM_NOT_FOUND`
unless its `sharing` declares all three keys, strips fields outside its
sections, and is withheld on a walled posture with only a warning;
`userMessage` is the sentence for a person.
- `## Where to go`: six rows (the endpoint contract and its page, the
HTTP protocol page, the error contracts and catalog, the auth contract,
the forms page, the three sibling skills).

**No text moved.** This skill has no hand-written reference file
(`references/_index.md` is generated), and a new file needs a new
ratchet row. So what left the entry was cut, each behind what now
answers it:

| Old entry section | Now |
|:--|:--|
| Skill Boundaries | The frontmatter description and the last routing
row. |
| Auto-Generated APIs | The routes listing, with the two absent routes.
|
| Metadata API (`/meta`) | The first note under the listing: the closed
query set, `?names=`, the two refusals. Cut to the HTTP protocol page:
the one metadata type whose list refuses `names`. |
| Public (anonymous) Form Endpoints | Trap 5: the three `sharing` keys,
the two doors, what the declaration grants, the stripped fields and the
hook to write, the walled-posture withholding. Cut to the forms page:
the file-field rule (an error at `os validate` and at publish), the
`guest_portal` name, the two form contracts. |
| Declarative Endpoints; Choosing between `apis:` and a code handler |
`## A declared endpoint` and trap 2. |
| The path carve-out | The example's two comments (`manifest.namespace`
is required and never derived; the path shape). |
| Five publish gates, each with a prescription | First check 4 (read the
rejection, it carries the fix) and routing row 1. The entry no longer
counts the gates. |
| `authRequired` and the D6 pairing | Trap 1, whole: the default, the
armed budget, why `windowMs` / `maxRequests` alone meter nothing, the
separate metering. |
| Mapping keys: projection only | One sentence under the example. Cut,
each a publish refusal that names the key: `inputMapping` on a `find` /
`get` / `delete` operation, two entries writing one target path. |
| Upgrading a pre-17 stack | First check 1 names the upgrade guide's
entry; the steps are there. |
| Endpoint Naming Conventions | Cut. Its two patterns are not paths an
app can declare (see Acceptance notes). |
| API Methods (Operations) | Kept under the same heading, as prose: the
six primitives, the eight derived operations and their sources, `upsert`
having no route. Cut: the per-primitive route table (the routes listing
carries the routes) and the size of the `ApiOperation` vocabulary. |
| Discovery & Health | Cut: discovery to the HTTP protocol page; the
health routes are not a thing a stack declares. |
| Dispatcher Error Codes | Routing row 3 (`api/dispatcher.zod.ts`). |
| Realtime Subscriptions | Cut: `references/_index.md` lists both
contract files, and first check 3 sends there. |
| Authentication & Authorization | Routing row 4: `AuthProvider` with
its six members, `LoginRequestSchema`, and that an endpoint has
`authRequired` and no nested `auth` block. Cut to the contract: the
login request's field list, and the flat `public` + `permissions` pair
of the plugin route registry. |
| Error Envelopes & the Code Ledger | Routing row 3 (a code in no ledger
fails CI) and trap 6. Cut to the contract and the error catalog: the two
envelope shapes, the two-tier vocabulary, the downstream-ledger recipe,
the locale ladder's subtag steps, the `advisories[]` element. |
| Best Practices | First check 2 (prefer a generated route), the
`upsert` clause, and the routes listing. Cut: the envelope shapes (the
contract). |
| Common Pitfalls | Traps 4 and 3. Cut to the two protocol pages, each
loud when hit: the quoted-empty entity tag, the four restore refusals,
the list / purge / empty doors. |
| Verify your work; References | First checks 4 and 3. |

**Sizes** (bytes · lines · ratchet tokens):

| | before (`main` at `2fba8349`, merged in) | after (head `2b912f16`) |
|:--|--:|--:|
| `SKILL.md` (entry) | 21,359 · 438 · 5,333 | 8,986 · 151 · 2,240 |
| `skills/objectstack-api/**` (3 files) | 33,220 · 569 | 20,847 · 282 |
| all 14 `SKILL.md` together | 165,278 · 3,056 | 152,905 · 2,769 |
| whole `skills/` tree (115 files) | 1,200,447 | 1,188,074 |
| whole tree without `evals/` (73 files) | 841,293 | 828,920 |
| ratchet: authored tokens = sum of all ceilings | 192,665 | 189,572 |
| ratchet: bundle total, tokens | 297,316 | 294,223 |

The head column is measured. The tree and bundle figures of the `main`
column are the head's reading plus this entry's fall: the entry is the
only file under `skills/` that differs (`git diff --stat origin/main
HEAD -- skills`: 1 file). The sum of ceilings on `main` is read from
`main`'s own table (61 rows).

**Budget reading:** the entry is 8,986 B, inside the card's 6–9 KB line,
and 151 lines against the 500-line cap. The whole catalog is 12,373
bytes smaller, all of it cut.

**Ratchet row** (`scripts/check-skills-token-ratchet.mjs`), pinned AT
its measurement, zero headroom: `skills/objectstack-api/SKILL.md` 5333 →
2240 (−3,093): `ceil((8986 − 27) / 4) = ceil(8959 / 4) = 2240`. It is
the skill's only row. The sum of all ceilings goes 192,665 → 189,572. No
row rises and none is added.

## Tests

### Eval parity

Judged by ruling record 7249189592. **No case fails on every run of the
head while `main` passes.** The with-skill arm passes 10 of 24 turns on
the head against 9 of 24 on `main`'s text. Three cases pass 3/3 on both
trees, four fail 3/3 on both trees for the same reason on each, and one
(case 6) goes 0/3 → 1/3.

Both arms, one command line for both rounds: `pnpm --filter
@objectstack/scenarios skill-evals --skills objectstack-api --repeats 3
--concurrency 4 --max-utilization 0.99`, with the model and effort flags
PR 3's rounds used; CLI 2.1.333, subscription login. The two rounds ran
back to back in one window (2026-12-01 00:32Z to 00:38Z), each from a
clean checkout of its commit. 8 behaviour cases in
`evals/endpoints-auth-routes.json`, untouched; this skill has no trigger
file, so there is no trigger reading to give.

| reading | tree | with-skill | no-skill | with-skill cases below 3/3 |
|:--|:--|--:|--:|:--|
| before round | `2fba8349` (`main`'s text; the entry is unchanged on
`main` since) | 9/24 | 0/24 | 3 (0/3) · 4 (0/3) · 5 (0/3) · 6 (0/3) · 8
(0/3) |
| **after round** | `2b912f16` (this head) | **10/24** | 0/24 | 3 (0/3)
· 4 (0/3) · 5 (0/3) · 6 (1/3) · 8 (0/3) |

| case | subject | `main` | head | what the failing answers have in
common, on both trees |
|:--|:--|--:|--:|:--|
| 1 | a declared `GET` feed | 3/3 | 3/3 | |
| 2 | an anonymous endpoint's budget | 3/3 | 3/3 | |
| 3 | a signed inbound webhook | 0/3 | 0/3 | Every answer refuses to
mount on `http.server` and sends the Stripe callback to a `type: 'api'`
flow whose start node declares the vendor header as `config.signature`.
That is what both entries and the contract say; the case requires the
literal `x-objectstack-signature`, the platform's own header, which a
Stripe answer has no reason to name. Two of three answers on `main` and
one of three on the head also leave out `functions`. |
| 4 | sign-in providers | 0/3 | 0/3 | Every answer names `AuthProvider`,
`auth.zod.ts`, `google` and `github` and stops because the project has
no files; none names `LoginRequestSchema`, the fifth required literal.
Both entries carry it. |
| 5 | `apiMethods`, `/batch`, the recycle bin | 0/3 | 0/3 | Every answer
gives the primitives, the absent `/bulk` route, the derived `restore`
and the recycle-bin restore route; none writes the table name
`sys_recycle_bin`. Both entries carry it. One head answer also names the
import route and not `/batch` (all three `main` answers name `/batch`).
|
| 6 | an import mapping's `applyOn` | 0/3 | 1/3 | Two of three turns on
each tree answer without opening the skill, and fail. The one turn that
opens it passes on the head and fails on `main`, where the entry form
(`sourceField`, `targetField`) was not in the entry. |
| 7 | the metadata list's `?names=` | 3/3 | 3/3 | |
| 8 | `userMessage` on a batch publish | 0/3 | 0/3 | No turn on either
tree opens the skill; every answer builds the per-code translation table
the case forbids. The description that decides whether the skill is
opened is the frontmatter, byte-identical in this PR. |

- **No restoration under ruling 7168461386**: no failing answer on the
head traces to a sentence the cut removed. The literals the failing
answers miss (`x-objectstack-signature`, `LoginRequestSchema`,
`sys_recycle_bin`, `userMessage`) are all carried by the head's entry,
and by `main`'s.
- **Case 5, one observation that is not a regression under the rule**:
one of the three head answers does not name `/batch`. The case fails on
every run of both trees on another literal, so the rule does not read
it; the head's entry names `/batch` in the routes listing and in the
`apiMethods` paragraph. It is reported as seen, one run.
- **Cases 3, 4, 5 and 8 cannot show a regression as they stand**: they
fail on every run of `main`. Cases 3 to 5 fail on a literal a correct
answer need not write, and cases 6 and 8 mostly on the skill not being
opened. The parity rule treats the cases as fixed, so this PR does not
touch them (see Acceptance notes).
- **No extra repeats were run**: no case flips in the direction the rule
reads, and the window is short.

Before the full rounds, the same check that calls no model: of the 27
`must_contain` literals of the 8 cases, the entry carried 24 before and
after, lost 0 and gained 2 (`sourceField`, `targetField`, case 6); 1 is
in neither tree (`/api/v1/meta/object`, which an answer composes from
the route). No `must_not_contain` literal appears in either tree's
entry.

<details><summary>Round records</summary>

- Before round on `2fba8349`: 48 of 48 turns, 2.4 min, exit 0. After
round on `2b912f16`: 48 of 48 turns, 2.6 min, exit 0. No turn timed out.
- Quota: the runner's guard was raised from its default 0.9 to 0.99 for
these two rounds, on the maintainer's answer in the project chat
(2026-12-01 00:30Z, option B of the three put to him: run now past the
0.9 line). Seven-day window as each turn reported it: 0.95 on every turn
of the before round; 0.95 rising to 0.96 during the after round; status
`allowed_warning` throughout, no turn rejected.
- The first attempt, on 2026-11-30, was stopped by the guard at its
default after 4 of 48 turns on each tree (utilization 0.90 and 0.91;
cases 1 and 2 passed once each on both trees). Those stopped rounds ran
on CLI 2.1.332 and are not counted in the table above.

</details>

### Other tests

On tree `d53fb207` (local head `57c7738b`, the same tree as the pushed
head `2b912f16`), under the verify lock (`VERDICT command-exit 0` each):

- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2
scripts/platform-catalog.test.ts scripts/skill-map-guards.test.ts` (the
suite that names the ratchet script, and the skill-map guards): `Test
Files 2 passed (2)`, `Tests 57 passed (57)`.
- `pnpm --filter create-objectstack exec vitest run --maxWorkers=2
src/created-summary.test.ts` (the one test file in the tree that names
this skill): `Test Files 1 passed (1)`, `Tests 12 passed (12)`.

No ablation: the diff changes prose and one ledger, no tested behaviour.

## Acceptance notes

Held by a gate, recorded here as it stands in the entry:

- **The heading `## API Methods (Operations)` and the six primitive
names stay inline.** `scripts/check-skill-identifier-liveness.mjs`
registers that section of this file as exhaustive for `ApiMethod` and
requires every member in it. That script is outside this claim's file
surface. So the section became four lines of prose under its old
heading, and the route table went to the routes listing. If the section
should leave too, the registration moves first, in its own change.

Decided here (small, no shipped behaviour), each open to reversal in
review:

- **"No trap is removed unless a publish-time check covers it or it
stays inline" was read as: a declaration or a call that passes and then
answers wrong at run time stays inline.** Inline: the six traps and the
two request contracts under the routes listing. Cut to a pointer, each
loud when hit: a wrong endpoint key (the strict shape refuses it and
names the key to write), the publish gates one by one, the two further
mapping refusals, the restore refusals, the quoted-empty entity tag.
- **Two traps stay inline although a check exists.** Trap 1: the gate
refuses `authRequired: false` without an armed budget, and the entry
carries the form to write, which is what eval case 2 asks for. Trap 5's
walled-posture sentence: its check only warns at save and publish, and a
warning is not a refusal, so the consequence (the form is withheld) and
the declaration that resolves it stay, the standard PR 3 applied to its
own warning-only rules.
- **The endpoint naming table is cut, not moved.** Its two patterns (an
object-scoped action path and a domain action path) are not paths an app
can declare: a declared path lives under the app's own carve-out, and
the endpoint matcher has no path-template syntax. The table taught a
form the publish gate rejects.
- **`AuthProvider` keeps its six members inline** (0.1 KB): a provider
name that is not a member is an authoring mistake the entry can stop
before the contract is opened, and eval case 4 asks for the names.
- **The health routes are cut with no pointer.** Nothing in a stack
declares them, and the HTTP protocol page has no health section, so a
pointer there would be untrue.
- **The entry no longer counts the publish gates.** The published pages
count them differently (four on one, five on another, for the same
checks); the entry says the rejection arrives one gate at a time and
carries its fix.
- **Trap 6 is scoped to the sites where it is true**: "show
`userMessage`, never `message`" is said of a batch publish's
`probes.issues[]` alone, and the flow door's order (`userMessage`, then
`details.innerRefusal`, then `message`) is given beside it. The locale
sentence is said of platform text.
- **A version check opens the first checks**, as in the other router
entries; here it also carries the one upgrade fact that changes what an
old `apis:` block does.
- **Section anchors of the entry changed.** The changeset lists every
anchor that left `SKILL.md` (24) and the five new ones;
`#api-methods-operations` stays. No file in this repository links one of
the old ones.
- **Four lines in the summary above, not six**: the standing order for
this card thread asks for six, and the agent file that binds the dev
fixes four named lines and wins on conflict.
- **Footer form**: this body ends with the single block AGENTS.md
prescribes for a PR body.

Noted, not changed:

- Four eval cases fail on every run of both trees (Eval parity). Case
3's expected answer says an inbound `type: 'api'` flow verifies only the
platform's own signature header, while `main`'s entry and the contract
(`automation/api-trigger-signature.zod.ts`) also give a vendor's HMAC
header declared as `config.signature`, and every answer on both trees
follows the contract. Cases 4 and 5 each require one name
(`LoginRequestSchema`, `sys_recycle_bin`) that a correct answer leaves
out. Case 8 never opens the skill, and case 6 does in one turn of three.
The parity rule treats the cases as fixed and the frontmatter is
byte-identical by order, so this PR touches neither. Carrier: none;
noted for whoever owns the case file and the description.
- `main` moved during the work: PR 4 of this split (objectstack-ai#38795) and a rise
of one `objectstack-data` row merged. `main` is merged in (`2fba8349`, a
plain merge commit); the textual merge was clean and the workspace was
rebuilt before any gate ran.

## Verification

Read first, by risk:

1. `skills/objectstack-api/SKILL.md`, the whole file: is anything a
model needs before opening the contract missing? The risk hunks are `##
Traps` (six items replace most of the old file) and trap 2, which
carries the whole "no handler code" teaching.
2. `.changeset/34770-api-skill-router.md`: the "what left, and what
answers it now" list is the record of every cut.
3. `scripts/check-skills-token-ratchet.mjs`: the one `objectstack-api`
row.

Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints
`ratcheted (authored) 189572 / 189572 (+0)` and
`skills/objectstack-api/SKILL.md 2240 / 2240 (+0)`; `wc -c
skills/objectstack-api/SKILL.md` prints 8986.

Gates, local, each exit code captured before any pipe. The whole derived
list ran on tree `d53fb207` (local head `57c7738b`; the pushed head
`2b912f16` carries the same tree, `main` unmoved at `2fba8349`), after
the merge of `main` and a full rebuild.

<details><summary>Derived families on tree `d53fb207`: 69 derived, 69
run green, 0 NOT MEASURED</summary>

- Reconciliation: `✓ dispatch-gates --ran: 69 derived famil(ies)
accounted for — 69 run, 0 NOT-MEASURED (a DERIVED zero — all 69 recorded
an exit code and none of them is 3).` No STALE TREE warning.
- `node scripts/check-skills-token-ratchet.mjs`: `✓
check-skills-token-ratchet: 61 authored bundle file(s) within their
ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured,
not ratcheted.` (`ratcheted (authored) 189572 / 189572 (+0)`, `bundle
total 294223`); its `--self-test`: `111 cases pass`.
- `pnpm check:dual-build-cjs-loads`: `126 published require entry
point(s) across 74 package(s) load; 2593 emitted CommonJS file(s)
parse`. It reads every package's built `dist/`; a full `pnpm build
--concurrency=2` ran first on the merged tree under the verify lock
(`VERDICT command-exit 0`, 123 tasks).
- `pnpm check:dts-closure`: `123 built package(s) swept - 324/324
declared declaration file(s) present`.
- `pnpm check:skill-links`: `290 relative link(s) in 76 published skill
file(s) resolve; 160 fragment(s) name a real heading under GitHub's slug
rule.`
- `pnpm check:skill-identifier-liveness`: `Leg 1: 517 citation(s) over
76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0
ledgered gap(s).`
- `pnpm --filter @objectstack/spec run check:skill-docs`, `pnpm --filter
@objectstack/lint run check:doc-formula-expressions`, `pnpm
check:skill-compatibility`, `check:skill-frame-sync`, `check:role-word`,
`check:corpus-claim-drift`, `check:doc-authoring`,
`check:published-files`, `check:nul-bytes`,
`check:cross-package-test-inputs`, `check:ratchet-remedy-authority`:
exit 0.
- The changeset gates (`check-changeset-no-major`,
`check-empty-changeset`, `check-adr-0087-registration`,
`check:changeset-gate-self-tests`): exit 0. `pnpm
check:pm-dispatch-gates`: exit 0.

</details>

<details><summary>Beside the derived list, on tree `d53fb207`, all exit
0</summary>

- `pnpm --filter @objectstack/spec run check:skill-examples`: `347 prose
examples type-check across 3 surface(s)`. The entry's one block is among
them.
- `pnpm --filter @objectstack/spec run check:skill-refs`: `10 generated
files in sync with packages/spec`.
- `pnpm --filter @objectstack/spec run check:skill-served-sections`: `24
served section(s), each heading exactly once in its file`.
- `pnpm check:doc-anchors`: `1186 internal #fragment link(s) across 368
source file(s) all resolve to a real heading`.
- `pnpm check:published-readme-links`: `566 outbound link(s) across 168
published markdown file(s)`, `99 docs-site page(s) resolved`; the four
pages the entry links are among them.
- `pnpm check:skill-top-level-keys`: exit 0.
- `pnpm --filter @objectstack/spec check:generated` after the merge and
the rebuild: `All 14 generated artifacts are up to date`.
- `node scripts/check-platform-checklist.mjs --changed-from
origin/main`: `0 anchored files in the change set — nothing judged.`
- `node scripts/check-nul-bytes.mjs`: exit 0; a control-byte scan of the
three changed files finds none.

</details>

Not run locally: `test:repo` (CI's).

Base: the router commit was written on a local branch cut from
`f7252bc3` while PR objectstack-ai#38795 held this branch; after objectstack-ai#38795 landed, the
thread branch took `main` at `2fba8349` (merge `840c3aa8`) and the
router commit was cherry-picked onto it as `2b912f16`, whose tree is the
gated tree `d53fb207`. `overlap-check` before the push: origin/main,
objectstack-ai#38797, objectstack-ai#38790 and objectstack-ai#38192 merge cleanly; objectstack-ai#38497 conflicts in the ratchet
file against `main` itself (another skill's row), not this branch's. CI
on the head is the seat's reading.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS)_

<!-- signed: repo:objectstack@os-steve · os-steve ·
session_01ADHkmSAjFEZHRpRq3WCj6z -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/l tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants