Skip to content

Commit 7f8aa64

Browse files
docs(skills): the objectstack-automation entry file is cut back to the router budget (#39230)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgUMzxRnkW8ZpdbwwJggSNds)_ Part of #34770 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;发给 AI 的「流程、审批、触发器、集成」技能说明,入口文件从约 10.8 KB 缩到 9 KB,规则一条没少,几段示例和细节挪进了同一技能的参考文件。 - 为什么做:这是「技能目录瘦身」里自动化技能这一份;入口文件每次都整份装进 AI 的上下文,越长越贵,也越容易漏读。 - 出错会怎样:只动教 AI 的文字,没有产品行为变化,可以直接撤回;风险是 AI 少读一段后答错,评测二十九道题、每题三遍:改动后对八十一次,改动前对七十九次,没有哪道题在改动后每遍都错而改动前能对;有出入的三道题又各跑了六遍,结论不变。 - 要你做什么:暂时无;审核意见已改完,复审通过后再请你批准。 ## Rulings this executes - **Card Scope** (decision record on the card): an entry file holds first checks, the traps and a routing list; 6–9 KB, hard cap 500 lines; everything else goes behind a pointer; no trap is removed until a publish-time check covers it or it stays inline. - **Zone order for this PR** (PR 9, `objectstack-automation` only): the same shape as the earlier entry files; the entry ends at or under 9,000 bytes; nothing #38971 added (the `save_notice` translation key, the delegated-administration gate) is lost; a reference file may grow only by what moved out of the entry. - **7128031203** fork 4 = A: a ratchet row may rise by text that MOVED between files when each row is pinned at its measurement with zero headroom and the sum of ceilings does not rise. Used here for one row (below). - **7168461386** = A: the flow-shape facts that ruling put back stay in the entry: `type: 'schedule'` and where its cadence sits, `once per run`, `dialect: 'cel'`, the rule on `{…}` references in a value slot, and `defineAssignmentRule` beside its approval step. Each is in the cut entry. - **7176941587**: the "Nothing to read yet?" line and the flow's project-form sentence stay (both are in the cut entry). Q3 A of the same record: "the triggers#6 false load is the eval seat's to fix, by adding `objectstack-query` to that trigger case's candidate set. This PR does not change it." - **7249189592**, the parity rule, in its own words: "a `config-plugins-ops` case whose result flips between runs on both trees (main and head) is treated as unstable on both and does not block the PR. … A case that fails on every run of head while main passes is still a regression." Claim amendment 7249198313 reads it for every PR of this split: "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 still a regression." The rule's text covers a case that flips on both trees and a case that fails every head run. A case that drops on the head only gets its own fact-loss reading, as the series has done (reports 7300470521 and 7305292150). All of that is under Acceptance notes. ## Review round Contract review 7364905628 (PASS on `40c74104`: one should-fix, three nits) and the seat's L1 record 7364954194 (REWORK: R1 to R3). One patch round, commits `e07adc1b` and `d0180669`, then a plain merge of `main`. - **S1, fixed.** The cut entry kept "Writing a `readonly` field? Set `runAs: 'system'`" and had dropped the limit beside it, so an author following the bullet could declare a button-started flow `runAs: 'system'` and get `403` on every click; no publish-time check covers that shape. The bullet now ends: "A button starts a system flow only as `screen` / `api`, or through a `subflow` node." The long form (the `403`, why the `subflow` route is preferred) stays in `references/examples-flows.md` § Failure routing & `runAs` — the rest. Paid inside the entry: the `notify` row's purpose is "See below"; the integrations pointer is shorter; the last `runAs` bullet says "gate an elevated flow here" without repeating `screen` / `api`; item 3's sentence about the later node is shorter. - **N1, fixed.** `## Assignment rules` reads "never a hook that picks an owner, nor a counter field". - **N2, taken.** Item 3 of Valid-but-silently-wrong: the `script` node's block now follows the sentence about `config.function`, and the sentence about the later `update_record` comes after the block, with its `fields` literal in the entry's TypeScript form. - **N3, fixed.** The entry row's comment block says the triggers routing row joined the `examples-flows.md` routing line, and that the button rule's limit stays in the entry. - **R1, fixed in this body.** The parity ruling is quoted in its own words above, and the cases that differ are classified one by one under Acceptance notes. - **R2, measured: flows 4 is unstable on both texts, and the `isOutput` example is not put back.** Run alone at six repeats: 4 of 6 on `main`'s text, 4 of 6 on the head's. The reading is under Acceptance notes. - **R3 (a), fixed.** The footer is in the AGENTS.md form. - **R3 (b), not taken.** The attribution link still names this card's own thread: this session's standing attribution rule fixes those two lines as given. The machine-read marker is the same either way, and the zone thread is `cmsg_016iMXWSZDzqWRWvWzdNo8wgUwbwcnVFGBgQzaCTFpnAff` in the same project. - **The moved-text note** now says what the 776 bytes are (below, and in the changeset). The entry went 8,992 to 8,991 bytes and 189 to 190 lines in this round; its row is re-pinned at the measurement, 2242 to 2241. The reference file did not change in this round. ## What changes `skills/objectstack-automation/SKILL.md` is cut from 10,810 bytes to 8,991 (215 lines to 190). The frontmatter and the title are byte-identical, so what loads the skill does not change. Every heading is kept, in the same order, so every anchor and every heading the hosted door serves still resolves. Nothing an author can write changes: this is wording only. **What pays for the cut**, by kind (the changeset lists every sentence and its other home): | Kind | What | Bytes it answers | |:--|:--|:--| | Said twice | Sentences `references/examples-flows.md` already held in full: the `autolaunched` gloss, the long form of the button rule (its limit stays in the entry as one clause), the dropped-condition and computed-operand notes under filter operands, the run user spelling, the long form of the assignment-rule warning and what an assignment rule routes | cut from the entry, nothing added | | The contract's | The second `variables` entry (an output variable): `FlowVariableSchema` in `automation/flow.zod.ts` | cut from the entry | | Routing | The routing table became a three-item list; its triggers row joined the flows line, its assignment-rules row became a link inside `## Assignment rules` | cut from the entry | | Table wording | The three record-write rows share one row; three purposes that restate the node's name are gone | cut from the entry | | **Moved** | Five passages with no other home went to `references/examples-flows.md`: the `message` and `sourceObject` / `sourceId` / `actionUrl` lines of the `notify` example; "route around the node with a `decision`; to match an empty field, write the literal `null`"; the `registerFlow` and executor doors with the `has(record.owner)` spelling; the second node of the `script` example | **+776 bytes** in the reference file: about 655 moved, about 120 seating them (the lead-in sentence, the code fence, indentation, the clause naming the three doors) | | Cut, no other home | "Most are caught by `objectstack build`" (first check 4 and each item say where a trap is refused); "evaluated before the query"; the `package.json` path of first check 1; "As JSON:"; "mail-only," | cut | **What #38971 added is all still in the entry**: the `save_notice` row with its translation key (`flows.{flow}.notices.{node_id}.message`, in the saver's locale) and the delegated-administration gate, whole (the gate judges a grant as the user the run acts for, past an approval the decider, and records them as `granted_by`, or refuses it). **Sizes** (bytes; tokens are the ratchet's, the release-stamp line unpriced): | | `main` at `5a0bb8dd` | head `b8eea5f6` | |:--|--:|--:| | `skills/objectstack-automation/SKILL.md` | 10,810 B · 215 lines · 2,696 tokens | 8,991 B · 190 lines · 2,241 tokens | | `skills/objectstack-automation/references/examples-flows.md` | 25,729 B · 432 lines · 6,433 tokens | 26,505 B · 445 lines · 6,627 tokens | | `skills/objectstack-automation/**` (10 files) | 117,869 B | 116,826 B | | all 14 `SKILL.md` | 121,252 B · 2,146 lines | 119,433 B · 2,121 lines | | `skills/` (115 files) | 1,176,327 B | 1,175,284 B | | ratchet, authored sum (61 rows) | 182,414 tokens | 182,153 tokens | | ratchet, bundle total | 291,290 tokens | 291,029 tokens | **Budget reading.** 8,991 bytes is on the 9 KB line, as the earlier entry files were. What remains is the ruled facts, the #38971 additions, the served sections with their required blocks, and the traps; the entry was not cut further. ## Tests All on the pushed head `b8eea5f6`, exit 0 each: - `pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-state-route-doc-spelling.test.ts` (under the verify lock, `VERDICT command-exit 0`): 1 file, 8 tests passed. It pins this entry as a teaching site of the state-introspection route. - `pnpm --filter @objectstack/spec run check:skill-examples`: `344 prose examples type-check across 3 surface(s)`. The entry's TypeScript block is among them. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: `24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators.` No behaviour a test pins changed, so no ablation is owed. The eval rounds are under Acceptance notes. ## Live check The eval rounds under Acceptance notes are the live check a `skills/**` text change owes: `skill-evals --skills objectstack-automation` on both texts, read on the with-skill arm, subscription login only (`oauth_token`, no API key), at the model tier and effort the parity ruling names. The two full rounds ran at three repeats on every case because the zone's order asked for the full parity round; the review round ran only the cases its edits touch, and the three cases the L1 record asked about at six repeats. Notional cost the CLI reported, nothing billed: $12.89 and $12.85 for the two full rounds, $3.74 for the review round's ten cases, $1.38 + $2.40 + $1.17 for the six-repeat runs. ## Acceptance notes ### Eval rounds Command, every round: `pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-automation --repeats N --concurrency 4`, with `--case` for the partial rounds; CLI 2.1.334, subscription login, guard `--max-utilization 0.9` (the default), window `seven_day`, status `allowed`. `evals/**` is untouched (read-only measurement hold). Records, with every answer: `/mnt/project-files/card-34770/eval/` in the project's files. **Round 1, the full parity pair** (29 behaviour cases on both arms and 7 trigger cases, three repeats, 195 of 195 turns each). Before: `main`'s text at `75a2d578` (unchanged on `main` since), 00:08Z to 00:23Z. After: the cut text at `918df212`, 00:28Z to 00:44Z. | | `main`'s entry, 10,810 B | cut entry at `918df212`, 8,992 B | |:--|--:|--:| | behaviour, with-skill | **79/87** | **81/87** | | behaviour, no-skill | 0/87 | 0/87 | | trigger cases | 21/21 | 20/21 | Every behaviour case is 3 of 3 on both texts except: flows 2 (`main` 1/3, head 3/3), flows 4 (3/3, 2/3), flows 12 (1/3, 3/3), flows 14 (0/3, 0/3), flows 19 (3/3, 2/3), integrations 1 (2/3, 2/3). Trigger case 6: 3/3, 2/3. **Round 2, the review round's text** (`e07adc1b`; the two skill files are byte-identical on the pushed head), the ten cases its edits touch, three repeats, 60 of 60 turns: with-skill 26/30, no-skill 0/30. Flows 1, 5, 7, 12, 21 and integrations 2, 3: 3/3. Flows 11: 1/3. Flows 19: 2/3. Integrations 1: 2/3. **Round 3, six repeats by `--case`** on the three cases that read lower on the head in round 1 or 2: | case | `main`'s text (`440331f1`), ×6 | head's text (`e07adc1b`), ×6 | all runs, `main` | all runs, head | |:--|--:|--:|--:|--:| | flows 4 | 4/6 | 4/6 | 7/9 | 6/9 | | flows 11 | 6/6 | 6/6 | 9/9 | 10/12 | | flows 19 | 4/6 | 6/6 | 7/9 | 10/12 | `main`'s text ran in the head checkout with the two skill files checked out from `440331f1` (the runner reads `skills/` from disk); the files were restored and the tree confirmed clean before the head's run. ### Reading, case by case **No case fails on every run of the head while `main` passes it.** The one case at 0 of 3 on the head (flows 14) is 0 of 3 on `main` too. - **Flows 4 (onboarding wizard): flips on both trees; unstable on both under the ruling.** 4 of 6 on each text. `main`'s two failures are answers with no `variables` key, on the text that still has the `isOutput` example; the head's round-1 failure is the same miss; the head's two six-repeat failures are correct screen flows that say, in prose, that a wizard which never branches would be a `type: 'wizard'` form view, which is the case's forbidden literal and comes from a line of the reference file this PR does not change. No with-skill answer on either text writes `isInput` or `isOutput` (0 of 18). The missing-`variables` answer is 2 of 9 on `main` and 1 of 9 on the head. So the cut of the second `variables` entry is not what the case measures: no fact is lost, and nothing goes back under ruling 7168461386. The `isOutput` key's home is the contract, `FlowVariableSchema`, where first check 3 sends the reader. - **Flows 19 (should the reacting flow run as system): flips on both trees; unstable on both under the ruling.** `main` 4 of 6 at six repeats; the head 2/3, 2/3 and 6/6. Every failing answer on the head is a prose answer with no flow code, so the literal `record-after-update` is absent; the entry sentence the case leans on (the record-change trigger with `triggerType: 'record-after-update'` and its `previous.` / `record.` condition) is unchanged. - **Flows 11 (grant a permission set from a flow): a head-only drop in one round, outside the ruling's text; fact-loss reading: none.** 3/3 on both texts in round 1, 1/3 on the head in round 2, then 6/6 on both. The entry bullet the case tests (identity elevation and the delegated-administration gate, #38971's addition) is byte-identical on `main` and the head. Both failing answers are correct: `runAs: 'user'`, a `create_record` on `sys_user_permission_set`, system refused. They do not spell `PERMISSION_DENIED` (one also omits `delegated-administration`). No fact is lost, so nothing goes back under ruling 7168461386. - **Trigger case 6 (a validation rule; must not load): a head-only one-run drop, outside the ruling's text; already ruled.** 3/3 on `main`, 2/3 on the head. The frontmatter, which is all a trigger turn sees before it decides, is byte-identical. The failing turn searched the empty project, found only this skill's files and read two of them. Ruling 7176941587 Q3 A: that false load is the eval seat's to fix, and this PR does not change it. - **Integrations 1 (DocuSign): 2/3 on both texts in rounds 1 and 2**; one answer in each has no `defineConnector`. Unstable on both. - **Flows 14 (a notification that opens the case): 0/3 on both.** Every answer writes `sourceObject:`, the case's forbidden literal; the rule a correct answer needs ("with neither and no `actionUrl` the notice links to the trigger record") is in the entry on both texts. Recorded here and in the report; the case file is under the measurement hold. - **Flows 2 and flows 12: higher on the head** (3/3 against 1/3). ### Other notes - **Two ratchet rows move** (the claim was amended for the second, comment 7363248355). `skills/objectstack-automation/SKILL.md`: 2696 to 2241, `ceil((8991 - 27) / 4) = ceil(8964 / 4)`, lowered, headroom 0. `skills/objectstack-automation/references/examples-flows.md`: 6433 to 6627, `ceil(26505 / 4)`, raised by +194 for the 776 bytes placed there by this PR, headroom 0, under ruling 7128031203 fork 4 = A. The sum of ceilings falls by 261 (−455 + 194); no row is added. Each row carries its arithmetic and its authority in a comment above it. - **What the 776 bytes are.** About 655 bytes are passages that left the entry: two example lines under "`notify` — the rest", one sentence under "Filter operands — the rest", the doors and the empty-field spelling in item 1, and the persisting node in item 2 of "Value slots and the other silent traps — the rest". About 120 bytes seat them: the lead-in "The node that persists the entry's `outputVariable: 'ai'`:", the code fence, indentation, and the clause "A `{…}` token is refused at …" (one clause after it is reworded to follow: "The spellings a refused `{…}` token is given" now reads "The spellings it is given"). Nothing is removed from the reference file. The skill as a whole is 1,043 bytes smaller. - **Served sections, and the hosted door's repoint check.** The entry has seven sections the hosted door serves by exact heading (`packages/spec/scripts/skill-served-sections.json`): Data Operations, External Integration, `notify`, Failure routing & `runAs`, Filter operands (`config.filter`), Valid-but-silently-wrong, Integrations are declared, not coded. All seven keep their headings and their block forms (`notify` its one JSON node; Valid-but-silently-wrong its JSON node list and its TypeScript block), and `check:skill-served-sections` is green. The text inside each of the seven is shorter. The cloud door pins a commit of this repository and rewrites passages inside served sections; **whoever bumps the cloud pin past this commit owes the repoint check** (the same carrier as #36934). Not done here: this session cannot read the cloud repository. - **Anchors.** None is removed or renamed. `skills/objectstack-data/rules/validation.md` links `#failure-routing--runas`; the two reference files name "§ Failure routing", "§ Flows" and items 3 and 4 of Valid-but-silently-wrong in prose; each still resolves. One link is new: `## Assignment rules` links `references/examples-flows.md#assignment-rules`. - **The state-introspection route** (`GET /api/v1/meta/object/:name/state/:field?from=:state`) stays in the entry, on the routing line for approvals and state machines: `packages/rest/src/meta-state-route-doc-spelling.test.ts` pins this file as a teaching site of it. - **Out of scope, named as ordered**: the card's catalog line (the published catalog "falls toward 0.5 MB") is not this PR's to meet or to edit. `skills/` is 1,176,327 bytes before and 1,175,284 after. - **Not done here**: `evals/**` is untouched; no file is added under `skills/`; no published docs page is edited; no reviewer is requested and the PR stays a draft (governed surface). ## Verification Read first, by risk: 1. `skills/objectstack-automation/SKILL.md`, the whole file (190 lines): is anything a model needs before it opens a reference file missing? The risk hunks are `### Failure routing & runAs` (the button clause, restored in the review round), item 1 and item 3 of `## Valid-but-silently-wrong` (the doors a `{…}` token is refused at, and the second node of the `script` pair, both now in the reference file), `### notify` (the example lost four lines) and `### Filter operands`. 2. `skills/objectstack-automation/references/examples-flows.md`: five insertions, each seating a passage that left the entry. 3. `.changeset/34770-automation-skill-router.md`: the "what left, and what answers it now" list is the record of every cut. 4. `scripts/check-skills-token-ratchet.mjs`: the two rows and their comment blocks. Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints `ratcheted (authored) 182153 / 182153 (+0)`, `skills/objectstack-automation/SKILL.md 2241 / 2241 (+0)` and `skills/objectstack-automation/references/examples-flows.md 6627 / 6627 (+0)`; `wc -c skills/objectstack-automation/SKILL.md` prints 8991. Gates, local, each exit code captured before any pipe. The whole derived list ran again on the pushed head `b8eea5f6` (tree `5c021e60`), after a plain merge of `main` at `5a0bb8dd` (the gate tool reported a stale tree before it) and a build of the merged workspace under the verify lock (`pnpm build --concurrency=2`, `124 successful, 124 total`, `VERDICT command-exit 0`). The first head, `40c74104`, had the same list green and CI green (29 success, 18 expected skips). <details><summary>Derived families on head `b8eea5f6`: 71 derived, 71 run green, 0 NOT MEASURED</summary> - Reconciliation: `✓ dispatch-gates --ran: 71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED (a DERIVED zero — all 71 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) 182153 / 182153 (+0)`, `bundle total 291029`); its `--self-test`: exit 0. - `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`: the line quoted under Tests. - `pnpm check:skill-links`: `283 relative link(s) in 76 published skill file(s) resolve; 159 fragment(s) name a real heading under GitHub's slug rule.` - `pnpm check:skill-identifier-liveness`: `Leg 1: 453 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s).` - `pnpm check:dual-build-cjs-loads`: `128 published require entry point(s) across 75 package(s) load; 2623 emitted CommonJS file(s) parse`. - `pnpm check:dts-closure`: `124 built package(s) swept - 329/329 declared declaration file(s) present across 121 package(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: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 head `b8eea5f6`, all exit 0</summary> - `pnpm --filter @objectstack/spec run check:generated`, after the merge and the build: `All 14 generated artifacts are up to date`. - `pnpm check:doc-anchors`: `1225 internal #fragment link(s) across 369 source file(s) all resolve to a real heading`. - `pnpm check:skill-top-level-keys`, `pnpm check:skill-frame-freshness`: exit 0. - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: `0 anchored files in the change set — nothing judged.` </details> `node scripts/pm/overlap-check.mjs` on `b8eea5f6`: `VERDICT clean exit 0` (`origin/main` merges cleanly; #39234 shares the ratchet script and merges cleanly; #38857, the release bot's version PR, shares the entry's stamp line and merges cleanly). Not run locally: `test:repo` and the test shards (CI's). --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6Caj1WJjAUzogG5YWv5)_ <!-- signed: repo:objectstack@os-bill · os-bill · session_01Utp6Caj1WJjAUzogG5YWv5 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 599a005 commit 7f8aa64

4 files changed

Lines changed: 142 additions & 89 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-automation entry file is cut back to the router budget
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-automation/SKILL.md` goes from 10.8 KB to 9.0 KB (215 lines to 190). No heading changes, the frontmatter is byte-identical, and nothing an author can write changes: this is wording only. The seven sections a hosted door serves by heading keep their headings and their JSON and TypeScript blocks.
11+
12+
**What the entry keeps.** The four first checks and the "nothing to read yet" line; the routing list; a flow's project form and its `type` list with `type: 'schedule'` and where the cadence sits; `variables` as an array; the trigger on the start node's `config`; the `type: 'approval'` node; the two node tables with the `save_notice` translation key (`flows.{flow}.notices.{node_id}.message`, read in the saver's locale); the `notify` node with its recipient forms, the source pair rule and the option label evaluated once per run; the five failure-routing and `runAs` rules, the delegated-administration gate whole; the `null` filter operand; the four accepted-then-wrong items; `defineAssignmentRule` beside its approval node; and the declared-connector rule.
13+
14+
**What left, and what answers it now.**
15+
16+
- First check 1 no longer names `node_modules/@objectstack/spec/package.json`; the installed package's version is where every package keeps it.
17+
- The routing table is a list of three files. Its row for triggers is part of the `references/examples-flows.md` line, its row for assignment rules is a link inside `## Assignment rules`, and `## Integrations are declared, not coded` names its reference file as a path, since the routing list links it.
18+
- The gloss on `autolaunched` ("no user interaction: started by events, APIs or other flows"): `references/examples-flows.md` § Flow Types.
19+
- The second `variables` entry (`{ name: 'approval_result', type: 'boolean', isOutput: true }`): the contract, `FlowVariableSchema` in `node_modules/@objectstack/spec/src/automation/flow.zod.ts`.
20+
- `create_record`, `update_record` and `delete_record` share one table row; "Call an HTTP API" and "Display a UI form" left the `http` and `screen` rows, and the `notify` row points at its section below; the `connector_action` row no longer says its `connectorConfig.input` is a value-slot map (`references/examples-flows.md` § External Integration — the rest).
21+
- From the `notify` JSON node: `message` with its `date:long` formatter and the `sourceObject` / `sourceId` / `actionUrl` keys. Both examples now stand in `references/examples-flows.md` § `notify` — the rest; the entry keeps the rule (the pair is a pair, and a notify that writes none of the three links to the trigger record).
22+
- "A button cannot start a `runAs: 'system'` `autolaunched`, `record_change` or `schedule` flow: elevate the write, not the flow, through a `subflow` node" is one clause now, on the same bullet: "A button starts a system flow only as `screen` / `api`, or through a `subflow` node." The long form, with the `403` and why the `subflow` route is preferred, is `references/examples-flows.md` § Failure routing & `runAs` — the rest. The last bullet of that section reads "gate an elevated flow here", without repeating `screen` / `api`.
23+
- From § Filter operands: "evaluated before the query" is cut; "a dropped condition widens a query" and "a computed operand is a value, never a query operator" are what `references/examples-flows.md` § Filter operands — the rest already says at more length (the dropped condition that lets a `delete_record` empty the object; the value types a computed operand may be); "route around the node with a `decision`; to match an empty field, write the literal `null`" moved there.
24+
- From item 1 of § Valid-but-silently-wrong: `input.*` and `collection` (the reference lists whose slots they are), the `registerFlow` and executor doors and the `has(record.owner) ? record.owner : null` spelling (moved to item 1 of the reference's § Value slots), and the run user `current_user.id` (already there). The entry still names `objectstack validate` and `expression-invalid`.
25+
- From item 3: the second node of the JSON pair. The entry says in one sentence, under the `script` node, what the later `update_record` writes; the node itself moved to item 2 of the reference's § Value slots. The remaining node's names are shorter (`helpdesk.triage`, `category`).
26+
- "Most are caught by `objectstack build`" under § Valid-but-silently-wrong: cut, with no other home. First check 4 says most traps pass `os validate`, and each item says where it is refused.
27+
- From § Assignment rules: "it routes each inserted row whose `owner_id` and `queue` are both still empty, once, never on update" and the long form of the hook-and-counter warning: `references/examples-flows.md` § Assignment rules, which already held both. The entry keeps "never a hook that picks an owner, nor a counter field".
28+
29+
**`references/examples-flows.md`** grows by 776 bytes: about 655 are the passages that left the entry and had no other home (listed above), and about 120 are what seats them there (the sentence that introduces the persisting node, its code fence, indentation, and the clause naming the three doors that refuse a `{…}` token). Nothing else in it changed. The skill as a whole is 1,043 bytes smaller.
30+
31+
**Ratchet.** `scripts/check-skills-token-ratchet.mjs`: the `skills/objectstack-automation/SKILL.md` row goes 2696 to 2241 and the `references/examples-flows.md` row 6433 to 6627, each pinned at its file's measurement with no headroom; the sum of ceilings falls by 261.

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,29 @@ export const CEILINGS = new Map([
958958
// pinned AT the measurement. The entry is over the 2670 of ruling record 7168461386 by this
959959
// raise and by no more than it.
960960
// ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 27) / 4) == ceil(10783 / 4)
961-
['skills/objectstack-automation/SKILL.md', 2696],
961+
// 2696 -> 2241 (#34770, the entry is cut back to the router budget its Done-when names, 6-9
962+
// KB): LOWERED. Every fact ruling record 7168461386 ordered into the entry stays in it (the
963+
// project form and the `type` list with `type: 'schedule'` and its cadence, `variables`, the
964+
// `type: 'approval'` node, the option label evaluated once per run, the refused `{…}` token
965+
// beside its CEL envelope, `requiredPermissions`, `defineAssignmentRule` beside its approval
966+
// node), and so do the `save_notice` translation key and the delegated-administration gate
967+
// of the 2696 block above, both whole. What pays: restatements whose other home is
968+
// `references/examples-flows.md` (the `autolaunched` gloss, the long form of the button
969+
// rule, the widened-query clause and the computed-operand sentence of § Filter operands, the
970+
// value-slot keys that file lists, the assignment rule's once-per-insert sentence), the
971+
// routing table's rows for triggers (now on the `examples-flows.md` routing line) and for
972+
// assignment rules (now a link inside that section), the package.json path of first check
973+
// 1, the second `variables` entry and "Most are caught by `objectstack build`". The limit
974+
// of the button rule stays in the entry as one clause on the `readonly` bullet (contract
975+
// review 7364905628, S1: no publish-time check covers that trap). 776 bytes had no other
976+
// home and MOVED to `references/examples-flows.md`, whose row rises by them: the notify
977+
// `message` and source-pair examples, the two remedies of a `null` operand, the three doors
978+
// that refuse a `{…}` token with the empty-field spelling, and the node that persists a
979+
// `script` node's `outputVariable`. The state-introspection route stays for the reason the
980+
// 6903 block gives. 10810 bytes (10783 priced) -> 8991 (8964 priced) -> 2241 tokens, pinned
981+
// AT the measurement; the 9 KB budget is pinned again from here on.
982+
// ceil(($(wc -c < skills/objectstack-automation/SKILL.md) - 27) / 4) == ceil(8964 / 4)
983+
['skills/objectstack-automation/SKILL.md', 2241],
962984
// 13783 -> 13892 (2026-08-31 app-repo-principles raise, see the block above).
963985
// The invariant-vs-transition-gate choice, placed in the field-conditional-rule
964986
// bullet list where the tool is actually picked. Both wrong picks are silent:
@@ -2512,7 +2534,19 @@ export const CEILINGS = new Map([
25122534
// record 7168461386. `references/state-machines-and-approvals.md` keeps `main`'s row: its one
25132535
// re-pointed reference is paid inside the file.
25142536
// ceil($(wc -c < skills/objectstack-automation/references/examples-flows.md) / 4) == ceil(25729 / 4)
2515-
['skills/objectstack-automation/references/examples-flows.md', 6433],
2537+
// 6433 -> 6627 (#34770, the entry is cut back to the router budget): RAISED by text that
2538+
// MOVED in from `skills/objectstack-automation/SKILL.md`, which had no other home: the
2539+
// notify `message` example with its formatter and the `sourceObject` / `sourceId` /
2540+
// `actionUrl` example (`## notify — the rest`), "Route around the node with a `decision`; to
2541+
// match an empty field, write the literal `null`" (`## Filter operands — the rest`), the
2542+
// three doors that refuse a `{…}` token and the empty-field spelling (item 1 of `## Value
2543+
// slots and the other silent traps — the rest`) and the `update_record` node that persists
2544+
// a `script` node's `outputVariable` (item 2 there). Authority: ruling record 7128031203,
2545+
// fork 4 = A, which covers later moves of the same kind: the row equals the measured bytes
2546+
// moved in, with zero headroom, and the sum of ceilings does not rise (this row +194, the
2547+
// entry's row -455). 25729 -> 26505 bytes (+776) -> 6627 tokens, pinned AT the measurement.
2548+
// ceil($(wc -c < skills/objectstack-automation/references/examples-flows.md) / 4) == ceil(26505 / 4)
2549+
['skills/objectstack-automation/references/examples-flows.md', 6627],
25162550
// NEW FILE (card #27223): one recipe per integration archetype — OpenAPI with
25172551
// a static key, remote MCP with a static header, plain REST, the vendor
25182552
// callback, a hand-written document for a spec-less vendor — plus the two

0 commit comments

Comments
 (0)