Skip to content

docs(skills): objectstack-data and objectstack-automation SKILL.md become routers - #36158

Draft
objectstack-fleet[bot] wants to merge 13 commits into
mainfrom
claude/issue-34770-skill-router-budget
Draft

objectstack-fleet[bot] wants to merge 13 commits into
mainfrom
claude/issue-34770-skill-router-budget

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #34770
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用 AI 搭建数据模型和自动化流程的用户无感;AI 每次加载这两份技能先读到的入口文件,从约 27 KB 缩到 9 KB,只留动手前的检查、运行时才出错的陷阱、和「做什么就打开哪份文件」的表。
  • 为什么做:属于「MCP 二期与问数」专题里「已发布技能内容」这条线:入口越短,AI 越早读到真正相关的那份规则,不在长文里漏掉关键陷阱。
  • 出错会怎样:AI 可能没去打开被搬走的那份文件而答错;另外托管产品按标题原样下发这两份入口里的十一节,这十一节现在更短,搬走的细节托管客户端暂时读不到。撤回只需回退这一次合并,不涉及数据和运行时。
  • 要你做什么:定一件事:托管产品下发的那十一节,是按现在的精简版合并,还是等云端把读取位置指向新文件后再合并。

What changes

The entry files of two published skills become routers. Frontmatter (lines 1–17, description included) is byte-identical to main in both.

File main at 411fe24b This head
skills/objectstack-data/SKILL.md 26,608 bytes · 472 lines · 6,647 tokens 8,998 bytes · 166 lines · 2,245 tokens
skills/objectstack-automation/SKILL.md 28,192 bytes · 479 lines · 7,043 tokens 8,990 bytes · 181 lines · 2,243 tokens
skills/objectstack-ui/SKILL.md 8,687 bytes · 161 lines no diff (see Acceptance note 6)

Each entry now holds:

  • First checks (4). The installed @objectstack/spec version; what the project already has; the type's contract (references/_index.md to the Zod source; what a running environment's GET /api/v1/meta/types does and does not say); os validate before reporting done.
  • Traps that parse and then fail at run time.
    • objectstack-data, eight places: three numbered (a changed field does not reach a database that has rows; search reads only the object's own stored columns; an object you do not own is extended, never redeclared), ## Conditional Field Rules, and the four sections the hosted door serves.
    • objectstack-automation, eight places: the trigger-on-the-start-node paragraph and the seven sections the hosted door serves.
  • Where to go. One table: what is being authored, the file to open first. It opens with "Open the file for what you are writing before you write it."
  • One bound enumeration stays inline in objectstack-data: ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, which check-skill-identifier-liveness binds to that file by heading.

No new file. Text that left landed in files that already existed, and each receiving section holds only what its SKILL.md section no longer says:

File Bytes before → after What it received
objectstack-data/references/examples-objects.md 6,894 → 13,362 ## Object keys (the rows the entry no longer carries, the enable flags that surprise), ## Search Fields (searchableFields) whole, ## Object Extension Model whole
objectstack-data/rules/field-types.md 14,163 → 16,994 ## Changing a field that has data (main's Schema evolution section, whole), ## Choosing a type (the detail behind Field Type Selection)
objectstack-data/rules/validation.md 11,031 → 13,754 ## Conditional Field Rules: the checked example, its bullets, what a bare field ref does at run time
objectstack-data/rules/security.md 16,272 → 18,245 ## Ownership queues whole, ## Access depth (the mechanics behind the bound section)
objectstack-data/rules/relationships.md 16,790 → 17,372 ## Record owner, and other people on a record
objectstack-automation/references/examples-flows.md 6,170 → 26,509 Flow Types, packaged flows, the control-flow node table, the detail of http / connector_action / screen, Flow Variables, Triggers, Assignment rules, and a "the rest" section for each of notify, failure routing and runAs, filter operands, value slots. The two existing examples are byte-identical under a new ## Long examples
objectstack-automation/references/integration-recipes.md 10,376 → 12,219 ## Inbound webhook (api) triggers whole, ## When the answer is platform code

The sections the hosted door serves by exact heading

packages/spec/scripts/skill-served-sections.json lists eleven sections of these two entry files. All eleven headings stay in SKILL.md, once each, at main's level, with the form the list declares (the JSON object, the JSON notify node, the JSON node pair beside its TypeScript block). Their text is shorter, so the hosted door serves less until its table points at the new homes:

Served section (in SKILL.md) Bytes on main → now Where the rest is
data · ### Object Definition 3,946 → 1,344 references/examples-objects.md § Object keys
data · ### Field Type Selection 1,433 → 763 rules/field-types.md § Choosing a type
data · ### Relationship Patterns 1,649 → 873 rules/relationships.md § Relationship Types (already there), § Record owner, and other people on a record
data · ### Validation Patterns 1,062 → 497 rules/validation.md § Available Rule Types, § State Machine Validation (both already there)
automation · #### Data Operations 464 → 464 unchanged
automation · #### External Integration 2,613 → 802 references/examples-flows.md § External Integration — the rest
automation · the notify section 2,125 → 894 references/examples-flows.md § notify — the rest
automation · ### Failure routing & runAs 3,706 → 958 references/examples-flows.md § Failure routing & runAs — the rest
automation · ### Filter operands (config.filter) 1,174 → 410 references/examples-flows.md § Filter operands — the rest
automation · ## Valid-but-silently-wrong (passes build, fails at runtime) 5,075 → 1,921 references/examples-flows.md § Value slots and the other silent traps — the rest
automation · ## Integrations are declared, not coded 876 → 409 references/integration-recipes.md § When the answer is platform code

Not touched: the other thirteen served sections, including the two the hosted door serves with passages replaced (examples-flows.md § Time-relative triggers, state-machines-and-approvals.md § Approval Best Practices). The first is byte-identical (sha-256 of the section before and after: 982502ce6e3a0d73… both); the second file is not in the diff.

Every rule that left an entry file, and where it is now

(a) moved to a file the router routes to · (b) a restated list now served by the contract · (c) a check refuses it at parse, publish or os validate · inline = still in SKILL.md.

objectstack-data
What SKILL.md held on main Disposition Home now
Skill Boundaries table inline The frontmatter description names the neighbours; the routing table names the files
Quick Reference — Detailed Rules (13 links) inline The routing table
Object Definition: JSON example inline Same heading
Object Definition: required-properties table inline + (c) Two bullets (name, sharingModel); a publish without sharingModel is refused security-owd-unset
Object Definition: four-value sharingModel table and the posture paragraph inline One bullet with the four values and when each fits
Object Definition: ownership sentence (a) references/examples-objects.md § Object keys; rules/relationships.md § Record owner
Optional properties: pluralLabel, icon, namespace inline Bullets of Object Definition
Optional properties: highlightFields, nameField (a) + inline § Object keys; nameField also one bullet inline
Optional properties: label, datasource, displayNameField, enable, fieldGroups, lifecycle (b) data/object.zod.ts through references/_index.md; § Object keys says so. lifecycle and fieldGroups keep their own files
Optional properties: titleFormat (c) A save and os validate refuse the key (title-format-retired)
enable: apiMethods, feeds, activities, aiReadable (a) § Object keys
enable: trackHistory, searchable, apiEnabled, files, clone (b) ObjectCapabilities in data/object.zod.ts
Search Fields, the mirror prescription, mirror maintenance inline + (a) Trap 2; references/examples-objects.md § Search Fields, whole
Conditional Field Rules: where the rules go, readonlyWhen / readonly drop the value, gate versus invariant inline ## Conditional Field Rules
Conditional Field Rules: the checked example, the other bullets (a) rules/validation.md § Conditional Field Rules
Schema evolution table, required is not NOT NULL, the stale-column tell-tale inline + (a) Trap 1; rules/field-types.md § Changing a field that has data, whole
Naming Rules Summary inline Routing table (Naming)
Field Type Selection: secret not password, user, formula, the flag, the save-time default inline Same heading
Field Type Selection: the must-be-checked rule, the seeded-row default, why a person stays optional (a) rules/field-types.md § Choosing a type
Relationship Patterns: status, approvals, owner, many-to-many rows inline Same heading
Relationship Patterns: one-to-many and hierarchy rows (a) rules/relationships.md § Relationship Types and § Patterns, already there
Relationship Patterns: a handler apart from the owner, injected labels, ownership: 'none', positional read of a multi-value lookup (a) rules/relationships.md § Record owner, and other people on a record
Validation Patterns: inverted script, insert reads null, initialStates, no unique type inline Same heading
Validation Patterns: the list of six types (a) rules/validation.md § Available Rule Types, already there
Index Patterns (a) rules/indexing.md § The declaration surface, § Syntax, § Unique scope, already there
Object Extension Model inline + (a) Trap 3; references/examples-objects.md § Object Extension Model, whole
Security intro (no object-level permissions or hooks key) (c) ObjectSchema.create() rejects both as unknown keys
Access depth: the five values, the open-source boundary, fail closed inline Same heading (bound)
Access depth: how a scope resolves, what the CLI reports (a) rules/security.md § Access depth
Ownership queues (a) rules/security.md § Ownership queues, whole
Verify your work: the gate inline First check 4
Verify your work: what a bare field ref does at run time (a) + (c) rules/validation.md § Conditional Field Rules; os validate refuses it
objectstack-automation
What SKILL.md held on main Disposition Home now
When to Use; conditions are CEL envelopes (a) references/examples-flows.md, opening note
Flow Types table; a stepped form is no flow (a) § Flow Types
A packaged flow: .custom override, toggle, clone, defaultActive (a) § A flow an installed package ships
Flow Node Types intro; a type no executor runs (a) + (c) § Flow Node Types; refused at publish (flow-node-type-no-executor)
Control Flow table (loop, parallel, try_catch, map, wait, subflow, gateways) (a) § Control Flow, whole
Data Operations table inline Same heading, byte-identical
External Integration: http timeout, no credential in url / headers, durable inline + (a) Same heading; § External Integration — the rest
External Integration: connector_action judged at dispatch inline + (a) Same heading; the inputSchema detail in § External Integration — the rest
External Integration: screen (file, record_link, progress) inline + (a) One row inline; the field contract in § External Integration — the rest
Human Decision table (a) One line under § Flow Node Types; the routing table's approvals row
notify: the JSON node, recipients, title XOR template, the link pair inline Same heading. The example no longer shows topic and severity; they are in the RAW bullet of § notify — the rest
notify: RAW keys, audience selectors in full, the option-label formatter (a) § notify — the rest
Flow Variables (a) § Flow Variables
Failure routing: the fault edge, the error label trap inline + (c) Same heading; flow-error-label-not-fault
Failure routing: what routes and what is fatal, the handler's variables, retry interplay (a) § Failure routing & runAs — the rest
runAs: readonly needs system, elevate the write, identity assignment, pin the organization, who may start inline Same heading, five bullets
runAs: the detail of each, and a hook's own runAs (a) § Failure routing & runAs — the rest
Filter operands: value slot, null refuses the node, a value never an operator inline Same heading
Filter operands: the placeholder hand-off, relation hops, comparand shapes (a) § Filter operands — the rest
Valid-but-silently-wrong 1–4: the four statements, the node pair, the registration inline Same heading
Valid-but-silently-wrong: the full slot list, text slots, function name resolution, invalid_option (a) § Value slots and the other silent traps — the rest
State machines pointer and its route inline Routing table
Assignment rules (a) references/examples-flows.md § Assignment rules, whole
Triggers: no top-level key, the start-node config, guard a self-write inline ## Flows, first paragraph
Triggers: the requires token table, trigger types, prefer after, a throwing before-trigger (a) § Triggers — Event-Driven Automation
Inbound webhook (api) triggers (a) references/integration-recipes.md § Inbound webhook (api) triggers, whole
Integrations: the rule inline Same heading
Integrations: when it is platform code (a) references/integration-recipes.md § When the answer is platform code
Verify your work; References inline First checks 3 and 4

One correction. The multi-value lookup note in objectstack-data showed a {record.tags.0} token "in flow values". objectstack-automation on main teaches that a value slot refuses that token and gives 'record.tags[0]' as its replacement. The note, now in rules/relationships.md, shows record.tags[0].

Ratchet rows changed (scripts/check-skills-token-ratchet.mjs)

Row Before After Bytes
skills/objectstack-data/SKILL.md 6710 2245 26,608 → 8,998 (lowered)
skills/objectstack-automation/SKILL.md 7045 2243 28,192 → 8,990 (lowered)
skills/objectstack-data/references/examples-objects.md 1728 3341 6,894 → 13,362 (+6,468)
skills/objectstack-data/rules/field-types.md 3541 4249 14,163 → 16,994 (+2,831)
skills/objectstack-data/rules/relationships.md 4203 4343 16,790 → 17,372 (+582)
skills/objectstack-data/rules/security.md 4068 4562 16,272 → 18,245 (+1,973)
skills/objectstack-data/rules/validation.md 2761 3439 11,031 → 13,754 (+2,723)
skills/objectstack-automation/references/examples-flows.md 1543 6628 6,170 → 26,509 (+20,339)
skills/objectstack-automation/references/integration-recipes.md 2595 3055 10,376 → 12,219 (+1,843)

Every row is pinned at the measurement, zero headroom, and its comment says what moved from where. The two SKILL.md rows now hold the 9 KB budget mechanically: a later addition to either entry file is red until it is paid for in the same file. The sum of ceilings falls from 202,541 to 202,452 tokens (−89), authored tokens from 197,431 to 197,420.

Authority for the seven raises, the same as part 1's four (PR #35077): decision record 6943107981 on #34691, S3 = A, 「三点都同意,按最终计划把后续里程碑的卡全部立出来」, whose S3 target reads "a router-sized SKILL.md (6–9 KB, at most 500 lines) … pointers to the contract instead of restated lists"; and the standing ruling of 2026-10-27, 「A:先削重复,余额按实测提高」 (record 6513306068). Paid down first: each moved section was cut to the complement of what its entry section still says (the full-section copies of the automation reference measured 29,784 bytes against 26,509 now), and the restated rows listed under (b) and (c) above were not carried over.

Tests

Skill evals, before and after: NOT MEASURED, two rounds owed

The runner starts here (claude auth status: logged in, oauth_token), and it ran 8 turns of a before-round on the base tree. I stopped it: every turn's record read the login's seven-day window at 0.88 to 0.89 (allowed_warning, resets 2026-11-22T03:00Z), and the runner stops scheduling at 0.9, so neither round could finish. The 8 turns are not a measurement and are not reported as one.

Owed, both on the same side of #35649 (merged, and inside both trees), on a login with room for about 380 turns:

# BEFORE: a checkout of main at 411fe24b, or any main that does not hold this PR
pnpm install && pnpm --filter '@objectstack/scenarios^...' build
pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-data,objectstack-automation --concurrency 4 --out BEFORE_DIR
# AFTER: this branch at its head, same commands, --out AFTER_DIR

Each round is 88 behaviour cases on two arms plus 14 trigger cases, 190 turns. The card's done-when reads the with-skill pass rate of the after-round against the before-round. objectstack-ui has no diff, so this PR owes it no round.

Reachability of every eval token (deterministic)

node ui/scripts/check-skill-eval-tokens.mjs at this head: exit 0, "Every must_contain token is taught by its own skill bundle."

What moved behind a hop, read off both trees by one script (a token the old SKILL.md held and the new one does not, with the files that hold it now):

  • objectstack-data: 59 behaviour cases, 215 must_contain tokens. 40 tokens in 22 cases are no longer in SKILL.md; every one is in a file the routing table names. 28 tokens are in no bundle file on either tree (they are words of the expected answer).
  • objectstack-automation: 29 behaviour cases, 126 tokens. 26 tokens in 12 cases are no longer in SKILL.md; every one is in references/examples-flows.md, integration-recipes.md or state-machines-and-approvals.md. 12 tokens are in no bundle file on either tree.
The 34 cases whose tokens now sit one hop away
Case Token(s) no longer in SKILL.md Home, and the route
data hooks#1 project_name, beforeInsert, afterUpdate references/examples-objects.md § Search Fields; Trap 2
data hooks#3, #11 defineDatasource, remoteName, columnMap rules/datasources.md; routing row
data hooks#4, #30, #31, #34, #14, #32, #35 defineSeed, externalId, upsert, locale, fallback, 422 references/seeds.md; routing row
data hooks#8 defineQueue, type: 'position', CONCURRENT_UPDATE rules/security.md § Ownership queues; routing row
data hooks#9 INVALID_FIELD rules/security.md; routing row
data hooks#10, #12, #13 beforeInsert, beforeUpdate, afterUpdate, condition: references/data-hooks.md; routing row
data objects#1, #6, #14 options, required: true, value: ' rules/field-types.md, references/examples-objects.md; routing rows
data objects#3 unique: 'organization' rules/indexing.md; § Validation Patterns links it
data objects#5, #7, #21 hotcrm.custom, extend: 'crm_account', region__c, label: 'Sector', translations, industry, customer references/examples-objects.md § Object Extension Model; Trap 3
automation flows#1 edges references/examples-flows.md § Long examples
automation flows#3 approval_revise, revise references/state-machines-and-approvals.md; routing row
automation flows#9 defaultValue § External Integration — the rest (screen, record_link)
automation flows#11 delegated-administration, granted_by § Failure routing & runAs — the rest; the identity bullet is inline
automation flows#12, #21 defineAssignmentRule, type: 'queue', value: 'crm_support_intake', dependencies, 'acme.crm' § Assignment rules; routing row
automation flows#13, #24 .custom, overrides:, basedOn, /toggle, defaultActive: false, toggle § A flow an installed package ships; routing row
automation flows#15 option:opportunity.stage, once per run § notify — the rest
automation flows#20 dependencies, 'acme.crm' § Control Flow (subflow); routing row
automation flows#23 retried_callout_in_subflow § Control Flow (try_catch); routing row
automation integrations#1 secretRef, Swagger 2.0 references/integration-recipes.md; routing row

Nothing taught was lost (deterministic)

Every inline code span of each old SKILL.md, looked up in its skill's new bundle (all .md outside evals/):

  • objectstack-data: 225 distinct spans, 6 absent. Five belong to the rows not carried over ('default', displayNameField, apiEnabled, titleFormat, title-format-retired); one is the corrected token {record.tags.0}.
  • objectstack-automation: 328 distinct spans, 3 absent: dist/ (the os build aside), the wrong-form example of trap 2 (fields: { ref: … 'newRec' }; the right form stays), and one span that is present without its source: prefix.

No ablation: the diff changes documentation and ratchet numbers, no tested behaviour.

Acceptance notes

  1. The hosted door serves less text from eleven sections until its table moves (the one decision in this PR). The budget cannot be met with the eleven served sections whole: on main they are 8,090 bytes of the data entry and 16,033 of the automation entry. This PR takes the route part 1 took for objectstack-ui: every served heading stays in SKILL.md, unique, with real content, and the rest moves under a unique heading in an existing file, so the hosted table can point at it. Options: (A) land as built, and the hosted table adds the "rest" sections in its next skills bump; (B) hold this PR until that table change is ready; (C) put the eleven sections back whole, which leaves the entries at about 13 KB and 19 KB and the card's budget unmet. The cloud repository is not readable from this session; the list read is this repository's skill-served-sections.json.
  2. Both entries sit at the top of the 6–9 KB band (8,998 and 8,990 bytes). In objectstack-automation 5,858 of the 8,990 bytes are the seven served sections.
  3. The catalog total is flat: skills/** 1,165,890 → 1,165,837 bytes over 114 files (−53). objectstack-data falls 3,033 bytes; objectstack-automation rises 2,980, the cost of first checks and a routing table in a skill that had no link list to replace. All 14 SKILL.md files together: 260,553 bytes · 4,946 lines → 223,741 · 4,342.
  4. No new file, so references/examples-flows.md is now 26.5 KB and carries flows, triggers and assignment rules. A new ratchet row is the maintainer's pricing act; splitting that file into rules/flows.md, rules/triggers.md and rules/assignment-rules.md is a follow-up that needs those rows.
  5. Overlap. docs(skills): automation skill names a disabled package's hook 401 and the undeclared connector_action input refusal #36087 merged into main while this was in progress and conflicted in skills/objectstack-automation/SKILL.md, so main was merged once (b2226e0e). Its two hunks to that file now live where their sections moved: the connector_action row (the undeclared-key refusal) in references/examples-flows.md § External Integration — the rest, and the inbound-webhook bullets (the disabled package's 401) in references/integration-recipes.md § Inbound webhook, both in main's words; its edits to integration-recipes.md merged untouched. docs(skills): objects carry a colour from the nine-name palette; an object nav item draws its colour tile #36089 (open) adds a color key to the Object Definition JSON and a color row to the optional-properties table, and conflicts in skills/objectstack-data/SKILL.md: after this PR the row's home is references/examples-objects.md § Object keys. Whichever of the two lands second re-applies that hunk. Its lines are not touched here.
  6. objectstack-ui has no diff. Part 1 (PR docs(skills): objectstack-ui SKILL.md becomes a router #35077) made it a router. At the base it is 8,687 bytes, 161 lines, four first checks, seven traps (five listed, two under the served headings), a routing table.
  7. scripts/check-skills-token-ratchet.mjs is outside the claim's stated file surface and is in the diff because the gate reads the nine changed files: two rows lowered, seven moved to the measurement. Part 1's claim named it.
  8. Merging closes the card while its eval done-when is unmeasured. The two rounds above are owed first.
  9. Old anchors are listed in the changeset. The two anchors other skills link (objectstack-data/SKILL.md#conditional-field-rules, objectstack-automation/SKILL.md#failure-routing--runas, #valid-but-silently-wrong-passes-build-fails-at-runtime) still resolve.

Verification

Read first, by risk:

  1. skills/objectstack-automation/SKILL.md: the seven served sections. Risky hunk: ### Failure routing & runAs, 3.7 KB of blockquotes down to five bullets. Is each bullet still true alone?
  2. skills/objectstack-automation/references/examples-flows.md, the four "the rest" sections: they were rewritten as complements, not moved whole. Risky hunk: the identity-assignment and requiredPermissions blockquotes.
  3. skills/objectstack-data/SKILL.md § Object Definition: three tables became three bullets.

Two-minute check: node scripts/check-skills-token-ratchet.mjs. Expected: the last line reads ✓ check-skills-token-ratchet: 60 authored bundle file(s) within their ceilings, and the two entry rows read 2245 / 2245 and 2243 / 2243.

Head b2226e0e (one merge of main over 08639dad, see Acceptance note 5). Exit codes captured before any pipe.

Derived list. node scripts/pm/dispatch-gates.mjs --commands printed 69 commands at this head. All 69 ran: 68 exit 0, 1 exit 3. 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, prerequisite not met (it needs a full build, which this change does not owe locally). Left to CI.
  • The dist-reading gates (check:skill-docs, check:doc-formula-expressions, check:dts-closure, check:sourcemap-no-sources-content) read the @objectstack/scenarios^... and @objectstack/client-react... closures, built under the verify lock (VERDICT command-exit 0 both) before main was merged. Main brought ui/, three service files, docs and two automation skill files; nothing was rebuilt after it. Declared narrowing: CI builds the merge ref.

Outside the derived list, run at this head, all exit 0: packages/spec check:skill-examples (✅ 347 prose examples type-check across 3 surface(s): the moved os:check blocks compile where they now live); node scripts/check-doc-anchors.mjs (1090 fragment links resolve); node ui/scripts/check-skill-eval-tokens.mjs; and, because the diff edits the ratchet script, the one test that names it, packages/spec/scripts/platform-catalog.test.ts under the verify lock (1 file, 20 tests passed, VERDICT command-exit 0). The ratchet's own --self-test is in the derived list: 104 cases pass.

The twelve headings, one grep -c each (the eleven the hosted door reads from these two files, and the anchor two other skills link):

grep -c -E '^#{1,6} Object Definition$' skills/objectstack-data/SKILL.md -> 1
grep -c -E '^#{1,6} Field Type Selection$' skills/objectstack-data/SKILL.md -> 1
grep -c -E '^#{1,6} Relationship Patterns$' skills/objectstack-data/SKILL.md -> 1
grep -c -E '^#{1,6} Validation Patterns$' skills/objectstack-data/SKILL.md -> 1
grep -c -E '^#{1,6} Data Operations$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} External Integration$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} `notify`$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} Failure routing & `runAs`$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} Filter operands \(`config.filter`\)$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} Valid-but-silently-wrong \(passes build, fails at runtime\)$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} Integrations are declared, not coded$' skills/objectstack-automation/SKILL.md -> 1
grep -c -E '^#{1,6} Conditional Field Rules$' skills/objectstack-data/SKILL.md -> 1

Their levels are main's: ### for the four data sections and for notify, failure routing and filter operands, #### for Data Operations and External Integration, ## for the last two. pnpm --filter @objectstack/spec run check:skill-served-sections: ✓ 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.

Ratchet, overlap and landing-tier lines
   skills/objectstack-automation/SKILL.md                       2243 /   2243   (+0)
   skills/objectstack-automation/references/examples-flows.md   6628 /   6628   (+0)
   skills/objectstack-automation/references/integration-recipes.md   3055 /   3055   (+0)
   skills/objectstack-data/SKILL.md                             2245 /   2245   (+0)
   skills/objectstack-data/references/examples-objects.md       3341 /   3341   (+0)
   skills/objectstack-data/rules/field-types.md                 4249 /   4249   (+0)
   skills/objectstack-data/rules/relationships.md               4343 /   4343   (+0)
   skills/objectstack-data/rules/security.md                    4562 /   4562   (+0)
   skills/objectstack-data/rules/validation.md                  3439 /   3439   (+0)
   ratcheted (authored)                                       197420 / 202452   (-5032)
   bundle total (whole shipped tree)                          288731
✓ check-skills-token-ratchet: 60 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted.
overlap-check: claude/issue-34770-skill-router-budget (b2226e0ef3) changes 11 file(s); against origin/main (411fe24b43) and 2 PR head(s)
  ✓ origin/main: merges cleanly
  ✗ #36089 (shares skills/objectstack-data/SKILL.md): conflicts in skills/objectstack-data/SKILL.md
  ✓ #35129 (shares skills/objectstack-automation/SKILL.md, skills/objectstack-data/SKILL.md): merges cleanly
VERDICT overlap exit 1

Landing tier. node scripts/pm/check-governed-merges.mjs --branch claude/issue-34770-skill-router-budget: landing tier: H(人合), skills/** ×9; 1774 changed lines (+950 / −824) over 11 files, under the 3,000-line threshold. The tool exits 3 without a pull request number (its low-risk skills arm and head-repo reading are NOT MEASURED); by its allowlist that arm cannot apply, since the ratchet script is in the diff.

Not run locally, CI's: the type-check lanes, Build Core, Test Core (test:repo included), the repo lint, the dogfood battery (no ! in the title and no narrowing arm, so not owed here).


Generated by Claude Code

SKILL.md keeps the first checks, the run-time traps, the routing table
and the sections the hosted door serves by heading; the text that left
moved into the skill's existing rule and reference files.

Claude-Session: https://claude.ai/code/session_017xRBcULDAsasAL8sAQTfET
Co-authored-by: Claude <noreply@anthropic.com>
SKILL.md keeps the first checks, the routing table, the trigger rule and
the seven sections the hosted door serves by heading; the text that left
moved into references/examples-flows.md and integration-recipes.md.

Claude-Session: https://claude.ai/code/session_017xRBcULDAsasAL8sAQTfET
Co-authored-by: Claude <noreply@anthropic.com>
The moved data and automation text no longer repeats its SKILL.md
section; restated key rows a check already refuses are gone.

Claude-Session: https://claude.ai/code/session_017xRBcULDAsasAL8sAQTfET
Co-authored-by: Claude <noreply@anthropic.com>
… routers

The two SKILL.md rows follow their files down to the measurement, which
pins the 9 KB budget; seven receiving rows move by the measured bytes
that left the entry files.

Claude-Session: https://claude.ai/code/session_017xRBcULDAsasAL8sAQTfET
Co-authored-by: Claude <noreply@anthropic.com>
…ctor-input text

main's two hunks to objectstack-automation/SKILL.md land where this branch
moved their sections: the connector_action row in references/examples-flows.md,
the inbound-webhook bullets in references/integration-recipes.md. Three ratchet
rows re-pinned at the merged measurement.

Claude-Session: https://claude.ai/code/session_017xRBcULDAsasAL8sAQTfET
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl 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 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · sunhaolin · session_017xRBcULDAsasAL8sAQTfET
os-dev-report

{
  "issue": 34770,
  "status": "done",
  "branch": "claude/issue-34770-skill-router-budget",
  "pr": "https://github.com/objectstack-ai/objectstack/pull/36158",
  "head": "b2226e0e (one merge of origin/main 411fe24b over 08639dad)",
  "session": "session_017xRBcULDAsasAL8sAQTfET",
  "premise_still_valid": true,
  "summary": "skills/objectstack-data/SKILL.md (26,608 -> 8,998 bytes, 472 -> 166 lines) and skills/objectstack-automation/SKILL.md (28,192 -> 8,990 bytes, 479 -> 181 lines) are routers: four first checks, the traps that parse and then fail at run time, a routing table; frontmatter byte-identical. objectstack-ui has no diff: part 1 (PR #35077) already made it a router and it measures 8,687 bytes, 161 lines, seven traps at the base. No new file: text that left landed in seven existing rule and reference files, each receiving section cut to what its SKILL.md section no longer says, so skills/** is flat (1,165,890 -> 1,165,837 bytes, -53). The premise holds with one thing the dispatch did not name: the hosted door serves eleven sections of these two entry files by exact heading (packages/spec/scripts/skill-served-sections.json), 8,090 and 16,033 bytes on main, more than the budget. All eleven headings stay in SKILL.md, once each, at main's level and in their declared JSON forms, with shorter text; that is the fork in open_questions 1. The before and after eval rounds did not run: NOT MEASURED, owed.",
  "tests": "Skill evals: NOT MEASURED. The runner's login guard passes in this container (claude auth status: loggedIn true, authMethod oauth_token) and a before-round started on the untouched base tree; I stopped it after 8 turns because every record read the login's seven-day window at 0.88 to 0.89 (allowed_warning; it resets at 03:00 UTC on 22 November 2026) and the runner stops scheduling at 0.9. The 8 turns are not a measurement. Owed, both rounds on the same side of PR #35649 (in both trees), about 190 turns each: `pnpm install && pnpm --filter '@objectstack/scenarios^...' build && pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-data,objectstack-automation --concurrency 4 --out DIR`, once on main at 411fe24b and once on this branch head. Deterministic, at b2226e0e: ui/scripts/check-skill-eval-tokens.mjs exit 0 (every must_contain token is taught by its bundle); a both-trees script finds 40 tokens in 22 of 59 data cases and 26 tokens in 12 of 29 automation cases that the old SKILL.md held and the new one does not, every one in a file the routing table names (tabled per case in the PR body); a code-span loss check finds 6 of 225 data spans and 3 of 328 automation spans absent from the new bundles, each named and explained in the PR body. packages/spec check:skill-examples exit 0 (347 prose examples type-check, the moved os:check blocks included). packages/spec/scripts/platform-catalog.test.ts (the one test naming the edited ratchet script) under the verify lock: 1 file, 20 tests passed, VERDICT command-exit 0. No ablation: documentation and ratchet numbers only.",
  "gates": "Local, at b2226e0e, exit codes captured before any pipe: dispatch-gates --commands printed 69 commands; all 69 ran, 68 exit 0 and 1 exit 3 (pnpm check:dual-build-cjs-loads, prerequisite not met, NOT MEASURED, left to CI). --ran: '✓ dispatch-gates --ran: 69 derived famil(ies) accounted for — 68 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).' Inside that list: check-skills-token-ratchet (60 authored files within their ceilings; the nine changed rows at +0; ratcheted authored 197420 / 202452; bundle total 288731) and its --self-test (104 cases pass), check:skill-served-sections (24 served sections, each heading exactly once; 10 JSON fences pass their validators), check:skill-docs, check:skill-refs, check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:nul-bytes, check:published-files, check:pm-governed-merges, check:ratchet-remedy-authority. Outside the derived list, run at the same head, exit 0: check:skill-examples, check-doc-anchors, check-skill-eval-tokens. Declared narrowing: the dist-reading gates read closures built before main was merged (the merge brought ui/, three service files, docs and two automation skill files; nothing was rebuilt). overlap-check at b2226e0e against origin/main 411fe24b: main merges cleanly, #35129 merges cleanly, #36089 conflicts in skills/objectstack-data/SKILL.md; VERDICT overlap exit 1. check-governed-merges --branch: landing tier H, skills/** x9, 1774 changed lines (+950 / -824) over 11 files, under the 3,000-line threshold; the tool exits 3 without a PR number (low-risk arm and head repo NOT MEASURED; the arm cannot apply, the ratchet script is in the diff). CI on PR #36158 at report time, 39 check-runs: success 4 (Governed Surface Queue Guard, PR-body guards, Check PR Size, filter); in_progress 19 (Build Core, Plan Test Core shards, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, Auto Label, the six Lint lanes and Lint · ESLint, the four Type Check lanes, Lint · PM dispatch-gates); skipped 16; none red. Not waited for.",
  "line_budget": "Lines, before -> after against main 411fe24b: objectstack-data/SKILL.md 472 -> 166; objectstack-automation/SKILL.md 479 -> 181; examples-objects.md 191 -> 297; field-types.md 267 -> 314; relationships.md 408 -> 418; security.md 334 -> 371; validation.md 329 -> 390; examples-flows.md 145 -> 449; integration-recipes.md 186 -> 212. The nine files: 2,811 -> 2,798 lines. All 14 SKILL.md files: 4,946 -> 4,342 lines, 260,553 -> 223,741 bytes. Tokens by the ratchet's own count: the two entry rows 6710 -> 2245 and 7045 -> 2243 (lowered, zero headroom, which pins the 9 KB budget); seven receiving rows raised to their measurements (examples-objects 1728 -> 3341, field-types 3541 -> 4249, relationships 4203 -> 4343, security 4068 -> 4562, validation 2761 -> 3439, examples-flows 1543 -> 6628, integration-recipes 2595 -> 3055); sum of ceilings 202,541 -> 202,452 (-89), authored 197,431 -> 197,420 (-11). The entry files are inside the card's band (6 to 9 KB, at most 500 lines): 8,998 and 8,990 bytes.",
  "files_changed": [
    "skills/objectstack-data/SKILL.md",
    "skills/objectstack-data/references/examples-objects.md",
    "skills/objectstack-data/rules/field-types.md",
    "skills/objectstack-data/rules/relationships.md",
    "skills/objectstack-data/rules/security.md",
    "skills/objectstack-data/rules/validation.md",
    "skills/objectstack-automation/SKILL.md",
    "skills/objectstack-automation/references/examples-flows.md",
    "skills/objectstack-automation/references/integration-recipes.md",
    "scripts/check-skills-token-ratchet.mjs",
    ".changeset/34770-skills-data-automation-router.md"
  ],
  "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
  "mcp_calls": "7 GitHub MCP calls, all reads: issue_read x4 (card 34770 get and get_comments, decision record 34691 get and get_comments), pull_request_read x3 (PR 35077 get and get_comments, PR 36158 get_check_runs). No GitHub MCP write. Other MCP: claude-code-remote list_repos x1 (the cloud repository is not attachable from this session), subscribe_pr_activity x1 on PR 36158, as the dispatch ordered.",
  "api_writes": "2 relay writes: one repository_dispatch carrying pr_create (PR #36158, draft, assignee sunhaolin, no labels; read-back 32,019 bytes sent, 32,019 stored, identical), and this os-dev-report comment through post-stamped. git push x4 to the card branch is not counted.",
  "deviations": [
    "scripts/check-skills-token-ratchet.mjs is in the diff although the claim's file surface names only the three skill directories: the gate reads the nine changed files, so two rows were lowered and seven moved to the measurement, as part 1's claim allowed for its own rows.",
    "origin/main was merged once (b2226e0e): PR #36087 landed mid-task and conflicted in objectstack-automation/SKILL.md. Its two hunks were re-applied in main's words where their sections had moved (the connector_action row in references/examples-flows.md, the inbound-webhook bullets in references/integration-recipes.md); three ratchet rows were re-pinned. Nothing was rebuilt after the merge.",
    "One teaching correction rides along: objectstack-data showed a `{record.tags.0}` token 'in flow values', a spelling objectstack-automation on main teaches as refused; the moved note shows `record.tags[0]`.",
    "Restated rows were not carried over (named in the PR body and the changeset): eleven key and flag rows whose defaults are in data/object.zod.ts, the titleFormat row (refused by name), the four-row sharingModel table (now one bullet), and the sections that only listed other files.",
    "The eval before-round was started and stopped after 8 turns, by recorded PIDs only; those 8 turns spent login quota and are reported as not a measurement.",
    "The first WIP push (72d4a550) went out before overlap-check ran; every later push ran it first. All four pushes went out with VERDICT overlap exit 1 standing against open PR #36089 (and, until it merged, #36087): the check reports, it was not used as a gate.",
    "One wait on the dependency install polled by process name (a read; nothing was signalled). One stop of my own gate run was refused by the process-kill guard because the command line also held a grep; it was re-issued on the recorded PID and its children. Nothing was killed by name.",
    "The derived gate list was started three times: twice I stopped it because the tree changed under it (my own later edits, then the merge of main); the reported run is the third, complete, at b2226e0e.",
    "Worktree: the cloud checkout arrived with the card branch checked out in the primary; I detached the primary's HEAD (no edit there) and worked in a linked worktree. No empty-branch push (platform-designated branch).",
    "The PR body carries `Fixes #34770` as dispatched although the card's eval done-when is NOT MEASURED.",
    "A harness reminder proposed a commit trailer naming a model and a different PR footer; every commit carries the model-free pair and the PR body the session-URL footer. No model name is in any commit, the changeset, the PR or this comment.",
    "test:repo, the type-check lanes and the dogfood battery are left to CI."
  ],
  "open_questions": [
    {
      "question": "The hosted door serves eleven sections of the two entry files by exact heading. They cannot stay whole inside a 9 KB entry (8,090 and 16,033 bytes on main). This PR keeps every heading in SKILL.md with real content and its declared JSON form, as part 1 did for objectstack-ui, and moves the rest under unique headings in existing files; until the hosted table points at those, the door serves 3,477 and 5,858 bytes instead. Is that the wanted landing?",
      "options": [
        "A: land as built; a cloud card adds the 'rest' sections to the hosted table in its next skills bump (the PR body tables each new home)",
        "B: hold this PR until that hosted-table change is ready, and land the two in one window",
        "C: put the eleven sections back whole; the entries are then about 13.6 KB and 19.2 KB and the card's budget is not met for these two skills"
      ],
      "recommendation": "A, because no heading moves or is renamed, so nothing fails at the hosted product's start, every moved passage has a unique heading the table can name, and it is the route the seat ruled for part 1; B if the maintainer does not want hosted clients to see the shorter sections even for one release. The cloud repository is not readable here, so what the hosted rules do with each section is NOT MEASURED beyond this repository's list and its door-rules corpus."
    },
    {
      "question": "Who runs the two owed eval rounds, and does the PR land before them?",
      "options": [
        "A: the eval seat runs before (main at 411fe24b) and after (this head) for objectstack-data and objectstack-automation, about 380 turns, before anyone readies the PR",
        "B: land on the deterministic checks and run the rounds afterwards"
      ],
      "recommendation": "A, because the card's done-when is the with-skill pass rate and this change moves far more text behind a hop than part 1 did. This account's login read 0.88 to 0.89 of its seven-day window, so the rounds need another login or the reset."
    },
    {
      "question": "references/examples-flows.md is now 26.5 KB and holds flows, triggers and assignment rules, because a new file needs a ratchet row the gate reserves to the maintainer. Split it?",
      "options": [
        "A: leave it (this PR)",
        "B: a follow-up moves it into rules/flows.md, rules/triggers.md and rules/assignment-rules.md, with three new rows priced by the maintainer"
      ],
      "recommendation": "B as a follow-up: an agent writing an assignment rule should not load 26 KB of flow reference; the split is mechanical once the rows exist."
    },
    {
      "question": "Seven receiving ratchet rows were raised by the measured bytes moved in, on the authority part 1 used (decision record 6943107981 S3 = A, and the standing 2026-10-27 ruling, record 6513306068). No ruling names these seven files. Is that authority accepted again?",
      "options": [
        "A: accept, as on PR #35077 (sum of ceilings falls 89 tokens, authored falls 11)",
        "B: the maintainer rules the rows on this PR"
      ],
      "recommendation": "A; the Tier H approval this PR needs anyway is the place it is read."
    },
    {
      "question": "Open PR #36089 adds a `color` key to the Object Definition JSON and a `color` row to the optional-properties table, and conflicts with this PR in objectstack-data/SKILL.md. Which lands first?",
      "options": [
        "A: this PR first; #36089 re-applies its row in references/examples-objects.md § Object keys and its JSON key in SKILL.md",
        "B: #36089 first; this PR merges main and carries both hunks to those homes in a further round"
      ],
      "recommendation": "The seat's call; A keeps #36089's diff three lines, B costs this PR one more merge round and a re-pin of two rows."
    }
  ],
  "security_findings": "none",
  "out_of_scope_findings": [
    "carrier: cloud · the hosted table (packages/service-ai-studio/src/skills/published-refs.ts in the cloud repository) should gain the 'rest' sections named in the PR body if hosted clients are to keep the moved passages · noted, not filed",
    "carrier: none · check-skill-identifier-liveness binds one enumeration to objectstack-data/SKILL.md by heading (Access depth), which costs about 0.6 KB of the entry; moving it needs that script's binding re-pointed, outside this card's surface · noted, not filed",
    "carrier: none · the skill-evals runner has no with-skill-only mode, so a before/after comparison pays for the no-skill arm twice (about half of the 380 owed turns) · observation, not filed"
  ],
  "Dev-effort": "xhigh",
  "Rounds": 1
}

Generated by Claude Code

247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ld group, not inlineEdit (objectstack-ai#36280)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XC63go34oEMBFaBgqpoDC8N)_
Fixes objectstack-ai#36252
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:照着数据技能里的「检查规则表」写应用的作者和
AI,以前读到的是「明细子表没开行内编辑就会被提示」,而检查实际看的是「主表有没有用字段分组把明细放进表单」;现在这三条规则,以及字段类型表里「可重复项」那一行,都按实际判断来写。
- 为什么做:属于「对外发布的技能包教的内容要和运行时一致」这条线,替按技能生成应用的作者和 AI
解决「去调一个已经不起作用的开关、却猜不到检查什么时候报」的问题。
- 出错会怎样:只改技能文字和一条变更说明,不动检查本身;写错的话作者读到的仍是一段不准的说明,直接回退这个 PR 即可。
- 要你做什么:无。

## What changes

State at head `a5ea2daa9` (one commit on `origin/main` `c30ce97cd`).
Text only, in the published catalog; the rule ids and the lint are
unchanged.

`skills/objectstack-data/references/lint-rules.md`, the three "Catches"
cells:

- `relationship/line-items-inline-edit`: was "a `*_line`/`*_item`
master_detail child without `inlineEdit`"; now "a `*_line`/`*_item`
master_detail child placed by no parent field group
(`fieldGroups[].relatedList`)".
- `relationship/inline-edit-needs-bulk`: was "`inlineEdit` while the
parent's or child's `enable.apiMethods` omits `'bulk'`"; now "a child a
group places while the parent's or child's `enable.apiMethods` omits
`'bulk'`".
- `relationship/association-inline-edit`: was "an association
(comment/audit/activity) marked `inlineEdit` (clutters the parent form —
use a detail-page related list)"; now "an association
(comment/audit/activity) a group places (leave it a tab)".

`skills/objectstack-data/rules/field-types.md`, seat-added scope (seat
comment 7073941454 on PR objectstack-ai#36250), the `repeater` row: "a typed list is a
child object (`master_detail`, `inlineEdit: 'grid'`)" becomes "a typed
list is a `master_detail` child a parent `fieldGroups[].relatedList`
names". Three punctuation trims in the same section pay for it (the
section's intro line and the `composite` and `repeater` rows: an em dash
becomes a comma or a colon, two spaced slashes close up); no teaching is
removed.

Changeset `.changeset/36252-lint-rules-field-group.md`:
`@objectstack/skills` patch.

This agrees with the rule that PR objectstack-ai#36250 teaches in
`rules/relationships.md`: a parent field group naming the child places
it in the record details and the entry form, and `inlineEdit` only picks
how the rows are edited.

<details><summary>Each claim against the lint source (origin/main
c30ce97)</summary>

- None of the three rules reads `inlineEdit`. In
`packages/lint/src/data-model-rules.ts` the word occurs only in comments
and in one unrelated `fix` string (see Acceptance notes).
- R5, `relationship/line-items-inline-edit` (severity `suggestion`):
fires on a `master_detail` field of an object whose name matches
`LINE_ITEM_RE` when `isGroupPlaceableRelationship(def)` holds and
`formInlines(...)` is false. `formInlines` is
`isGroupPlaceableRelationship(def)` and
`fieldGroupsPlaceRelationship(parent.fieldGroups, child, field)`, which
reads each parent group's `relatedList` (a bare child name, or
`object.field`). Its `fix` line adds a `relatedList` group to the
parent's `fieldGroups`.
- `lintInlineEditBulk`, `relationship/inline-edit-needs-bulk` (severity
`warning`): for every group-placeable relationship that a parent field
group places, it warns once per object, parent or child, whose declared
`enable.apiMethods` does not allow `bulk`.
- R6, `relationship/association-inline-edit` (severity `warning`): fires
on a relationship of an association-named object when `formInlines(...)`
is true, i.e. a parent field group places it. Its message says to leave
it a tab of the record page; its `fix` removes the group.
- `repeater` row: the spec's own route sentence for a typed list
(`EMBEDDED_JSON_TYPED_LIST` in
`packages/spec/src/data/authoring-key-lint.ts`) reads: a child object
whose `master_detail` field points back at this object; a field group on
this object whose `relatedList` names that child edits its rows as an
inline grid on this object's form.

</details>

## Evals

No eval case pins the old wording, so none is changed. Searched
`skills/*/evals/*.json` for the three rule ids, for the old cell
wording, and for `repeater` and "typed list": zero hits. Three cases
mention `inlineEdit` for other reasons (objectstack-data case 2 and
objectstack-ui views case 6, both rewritten by PR objectstack-ai#36250; objectstack-ui
record-page case 1, see Acceptance notes). No eval round was run (a
round is the eval seat's).

## Tests

All readings at head `a5ea2daa9`.

<details><summary>Token ratchet, size and line budget</summary>

- `skills/objectstack-data/references/lint-rules.md`: 49 lines and 3735
bytes before, 49 lines and 3736 bytes after; 934 tokens before and after
(ceiling 934, headroom 0).
- `skills/objectstack-data/rules/field-types.md`: 267 lines and 14163
bytes before, 267 lines and 14162 bytes after; 3541 tokens before and
after (ceiling 3541, headroom 0).
- Whole package: every `SKILL.md` summed is 4947 lines before and after
(none is touched); the ratchet's bundle total is 288824 tokens after,
and the same before by the per-file identity above (both files keep
their token count; the before total was not run separately).
- `node scripts/check-skills-token-ratchet.mjs`: exit 0, "60 authored
bundle file(s) within their ceilings". No ceiling row is moved.
- Diff: 3 files, +16 / -6; net added lines 10 (changeset 10, skills 0),
inside the card's budget of 12.

</details>

<details><summary>Derived gates and the skill-evals test</summary>

- `node scripts/pm/dispatch-gates.mjs --commands`: 48 commands. All 48
ran under `os-verify-lock.sh`; 43 answered exit 0 on the first pass, and
5 answered exit 3 (PREREQUISITE NOT MET, nothing built yet):
`check:doc-formula-expressions`, `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`. After `pnpm build` (120 tasks
successful) the same five commands answered exit 0.
- `--ran` reconciliation: "48 derived famil(ies) accounted for, 48 run,
0 NOT-MEASURED", exit 0.
- `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2
test/skill-evals/skill-evals.test.ts`: Test Files 1 passed (1), Tests 38
passed (38); lock line `VERDICT command-exit 0`.
- `node scripts/pm/overlap-check.mjs
--branch=claude/issue-36252-lint-rules-field-group`: `VERDICT clean exit
0`; PR objectstack-ai#36158 shares `rules/field-types.md` and merges cleanly with this
branch.
- No ablation: the diff changes no behaviour a test pins.

</details>

## Acceptance notes

- Precision limit, declared: the `line-items-inline-edit` cell does not
spell the rule's one precondition, that the FK is one a group may place.
A line-item FK that itself declares `relatedList: true` or `false` is
never flagged, because a group naming it would be refused. The cell
stays at the table's summary level, like its `*_line`/`*_item` shorthand
for the ten suffixes the lint matches.
- The `line-items-inline-edit` cell uses the file's one byte of headroom
(3735 to 3736 bytes, 934 tokens either way). The `field-types.md` edit
is one byte smaller than before, so PR objectstack-ai#36158's measured row for that
file cannot be pushed up by this change.
- Out of scope, not changed here (lint source):
`packages/lint/src/data-model-rules.ts`, the `fix` line of
`field/embedded-sub-fields`, still says to make the typed list a child
object and that `inlineEdit: 'grid'` edits it inline. The spec's route
sentence and that rule's explanation text already name the parent field
group. Read, not run.
- Out of scope, not changed here (skills, same family):
`skills/objectstack-data/rules/relationships.md` § Detail-page related
lists and `skills/objectstack-ui/rules/record-page.md` item 2 still
teach that a `master_detail` child with no `relatedList` is a body table
by default, and objectstack-ui eval `record-page.json` case 1 expects
that answer. `packages/spec/src/data/related-list-body-table.ts` says it
is a tab by default and a body table only when a parent field group
names it. Read against the spec source, not run.

## Verification

Read first, by risk:

1. `skills/objectstack-data/references/lint-rules.md`, the three changed
rows (the published claim about when each rule fires).
2. `skills/objectstack-data/rules/field-types.md`, the `repeater` row
and the two byte-paying lines beside it.
3. `.changeset/36252-lint-rules-field-group.md`.

Two-minute check: `node scripts/check-skills-token-ratchet.mjs` exits 0
and prints `lint-rules.md 934 / 934 (+0)` and `field-types.md 3541 /
3541 (+0)`; then `grep -c "inlineEdit"
skills/objectstack-data/references/lint-rules.md` prints `0` (it printed
`3` on `origin/main` `c30ce97cd`; the rule ids are spelled `inline-edit`
and are unchanged).

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

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…child list still shows on a declared tab list (objectstack-ai#36527)

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

Fixes objectstack-ai#35902
Clause-②: no
Metadata-protocol: none

## 维护者速读

- **用户能看到什么变化**:用 AI 搭建应用的人,让自己的扩展包给别人的对象加字段或子表时,AI
现在会写明它们排在哪个字段、哪个页签后面;技能和指南不再说「别的包加的子表会被隐藏」;CRM 示例的客户对象演示了页签清单和分组自己列字段。
-
**为什么做**:属于「记录页的页签和字段分组改由父对象一处声明」专题:平台的四种新写法都已合并,这一批补上最后一种(扩展包声明位置)的技能、指南、评测和示例,免得「做了没人知道」。
- **出错会怎样**:AI 可能没写位置或写错,扩展包带来的字段和页签就按默认排在末尾,不丢数据;撤回只需回退这一次合并。
- **要你做什么**:批准合并这份技能与指南的更新。

## What changes

The fourth form of the parent-declared record page, an extension's
`place`, reaches the skills, the guide and an eval; the sentence that
said another package's child list is hidden goes; one repository example
declares a tab list.

| File | Change |
|:--|:--|
| `skills/objectstack-data/SKILL.md` § Object Extension Model |
`defineObjectExtension` takes `place`. One example with a field entry
and a list entry, the group form `{ group: { key, label }, after }`,
`before` as the other anchor, and the condition: placement applies where
the target declares `fieldGroups` / `relatedLists`. |
| `skills/objectstack-ui/rules/record-page.md` step 2 | "A child list
another package adds is hidden by a `relatedLists` that does not name it
(no package places its own list yet)" becomes "still shows, after the
named lists or where its extension's `place` puts it
(objectstack-data)". |
| `skills/objectstack-data/evals/objects-fields-relationships.json` case
26, `evals/README.md` | An add-on package puts its Tax ID field after
Industry in the account's Basic group and its Contracts tab after
Opportunities, on an account whose tab list names another child list
after Opportunities, so a missing list placement draws a different page.
Expected: two `place` entries on the package's own extension, no
redeclared `crm_account`, no `overrides:`. |
| `content/docs/ui/pages.mdx`, record page section | The same sentence
corrected (shows where the extension places it, or at the end of the
tabs, before approvals and the activity stream); a paragraph and a
checked `defineObjectExtension` example for `place`, linking the
object-extensions guide, which already documents the key. |
| `examples/app-crm/src/objects/account.object.ts` | `fieldGroups`
listing each group's `fields`, and `relatedLists` naming every tab in
order, one entry with its own `columns`, the two built-ins by object
name. |
| `examples/app-crm/src/translations/crm.translation.ts` | zh-CN labels
for the two new groups. |
| `.changeset/35902-skills-extension-place.md` | New,
`@objectstack/skills` patch. |
| `.changeset/35902-skills-related-lists-tabs.md` | DELIBERATE
CORRECTION, see below. |

What the skills already taught before this change, and is not in the
diff: the tab list with the three built-ins, an entry's `label` /
`columns`, a group's `fields`, and the group that places a child table,
each with its example and its eval (record-page evals 1, 4, 5, 6), and
the repository examples of a group placing a child table (the showcase
invoice, the CRM example's opportunity).

**DELIBERATE CORRECTION of a pending release note.**
`.changeset/35902-skills-related-lists-tabs.md` is on main and
unreleased. Its first bullet said: "A child list another package adds is
hidden by a `relatedLists` that does not name it." The platform change
that let a package place its own list made that false before any release
carried it. The sentence now reads: "A child list another package adds
still shows, after the named lists or where that package's extension
places it." Nothing else in the note changed. `Check Changeset` is red
on this by design; no `skip-changeset`.

### Skill size readings

| | main `316f7571` | This head |
|:--|:--|:--|
| `skills/objectstack-data/SKILL.md` | 473 lines · 26,832 bytes · 6,703
tokens (ceiling 6,710) | 473 lines · 26,858 bytes · 6,710 tokens
(ceiling 6,710, not raised) |
| `skills/objectstack-ui/rules/record-page.md` | 64 lines · 3,952 bytes
· 988 tokens (ceiling 991) | 64 lines · 3,958 bytes · 990 tokens
(ceiling 991, not raised) |
| All 14 `SKILL.md` files | 4,950 lines · 261,027 bytes | 4,950 lines ·
261,053 bytes |
| Ratcheted (authored) tokens | 197,533 | 197,542 |
| Eval fixtures (measured, not ratcheted) | 78,177 | 78,658 |
| `skills/**`, 114 files | 1,172,198 bytes | 1,174,155 bytes |

The data skill's entry file had 7 tokens of headroom and the `place`
paragraph costs about 75, so the rest is paid in the same file by
shorter wording, no ceiling moved. Every inline code span and every link
of the file on main is still in it (compared by script), except the one
signature that gained `place`. What the shorter wording no longer says,
all prose: "on 31/31 objects in the reference apps" (twice, on
`pluralLabel` and `icon`; the instruction to author both stays), "the
fundamental data entity in ObjectStack", the lead-in "The full table,
per-type config and traps" (the link stays), "stored and read ... on the
record" in the multi-value lookup note, "range" before `0–999`,
"incorrect/correct" before "examples", and "This axis is distinct from
`ownership`, which decides" (now "`ownership` is a separate axis").

## Tests

- No runtime behaviour changes, so no ablation.
- **The taught shapes parse.** The skill's example, its group form, the
guide's example and a `before` entry go through the built spec's
`defineObjectExtension`: 4 of 4 accepted. Control leg: an entry with
both `after` and `before`, and an entry with a misspelt key, are both
refused, so an accept is a measurement.
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0,
`349 prose examples type-check across 3 surface(s)`, the guide's new
block among them, against a spec built at this base (full build under
the verify lock, `VERDICT command-exit 0`).
- **The example app.** `@objectstack/example-crm`: `typecheck` exit 0;
`test` 7 files, 51 tests passed (under the verify lock, `VERDICT
command-exit 0`); `validate` "Validation passed", no warning.
- **Eval token reachability.** `node
ui/scripts/check-skill-eval-tokens.mjs`: exit 0, "Every must_contain
token is taught by its own skill bundle."
- **Skill evals: NOT MEASURED.** No eval round ran here. The card's
"four eval cases pass" and the new case 26 are owed a round: `pnpm
--filter @objectstack/scenarios skill-evals --skills
objectstack-data,objectstack-ui`.

## Acceptance notes

1. **This slice is the card's last.** Item 5 of the card (HotCRM
declares `relatedLists` on its five main objects) lives in another
repository and is carried by objectstack-ai/hotcrm#2742, which the seat
filed from the hand-off on the card (comment 7082792445); it waits for a
release that carries these keys. Seat record: card comment 7083107636.
2. **Overlap.** `overlap-check` at this head exits 1 on two open pull
requests. The draft that turns the data skill's entry file into a
router, objectstack-ai#36158, rewrites `skills/objectstack-data/SKILL.md` whole: this
pull request does not wait for it (the seat's call), and whichever lands
second merges main and replays its entry-file text. If the router lands
first, the `place` paragraph belongs in `references/examples-objects.md`
§ Object Extension Model, where that draft moves the section, and the
wording payments here are dropped. The release pull request (`chore:
version packages`) deletes every pending note, so a corrected pending
note conflicts with it by construction; the release job regenerates it
from main.
3. **A `relatedLists` entry's `label` has no translation key that I
could find.** The CRM example's entries carry no `label` for that
reason. Read from `packages/spec/src/system/translation.zod.ts`: it has
`relatedListTitle` under the child's field and `_sections` for groups,
and no key for a tab-list entry's `label`. The console's reading was not
traced and nothing was reproduced at run time. The seat filed the
observation as objectstack-ai#36528.
4. **The example lives in the CRM example, not the showcase.** The
showcase account's record page is pinned by an end-to-end shape test,
and the CRM example's account had neither key.
5. **The multi-value lookup note keeps its `{record.tags.0}` token.**
The router draft above records that the automation skill refuses that
token in a value slot and corrects it; this change only shortened the
sentence around it.
6. **Merging ends the card while its eval done-when is unmeasured.** The
round named under Tests is owed; the seat filed objectstack-ai#36535 as its carrier,
for the eval lane to run on main after the merge.
7. **Guide example.** The record page section of the guide carries the
full Quote example from the parent card already; this change adds the
extension half beside it.

## Verification

**Read first, by risk:**

1. `skills/objectstack-data/SKILL.md`: the payments. Risky hunk: the
Object Extension Model guard, where "`extend` is not object-level
`ownership`" replaced a longer sentence; the four enum values stay.
2. `skills/objectstack-ui/rules/record-page.md` step 2: one sentence
flips from "hidden" to "still shows".
3. `examples/app-crm/src/objects/account.object.ts`: the declared tab
list names all four child lists, so no tab the page had is dropped.

**Two-minute check:** `node scripts/check-skills-token-ratchet.mjs`.
Expected: the last line reads `✓ check-skills-token-ratchet: 60 authored
bundle file(s) within their ceilings`, and the two changed rows read
`6710 / 6710` and `990 / 991`.

**Head `8c346d66`**, two commits. The readings below were taken at
`b9cdb233`; the second commit, from the contract review's finding S1,
changes one eval fixture (the prompt's tab list and one sentence of the
expected answer) and one comment in the CRM example. Re-run at
`8c346d66`: `check-skills-token-ratchet` exit 0,
`ui/scripts/check-skill-eval-tokens.mjs` exit 0, `check-nul-bytes` exit
0, the CRM example's `typecheck` exit 0. Exit codes captured before any
pipe.

**Derived list.** `node scripts/pm/dispatch-gates.mjs --commands`
printed 90 commands. All 90 ran at `b9cdb233`: 89 exit 0, 1 exit 1. The
exit 1 is `node scripts/check-empty-changeset.mjs --base origin/main`,
red by design on the corrected pending note (DELIBERATE CORRECTION
above); its other half reads "No empty-frontmatter changeset introduced
by this diff (2 declaring changeset(s) added)".

Reconciliation: `✓ dispatch-gates --ran: 90 derived famil(ies) accounted
for — 90 run, 0 NOT-MEASURED (a DERIVED zero — all 90 recorded an exit
code and none of them is 3).`

The dist-reading gates in that list read a full build of this tree
(`pnpm build`, 13m40s, `VERDICT command-exit 0`). The build ran before
the last wording edits to the two skill files and the guide; none of
those files is a build input of the packages the gates read, and the
gates themselves ran after the final commit.

**Outside the derived list:** `node scripts/pm/overlap-check.mjs` exit 1
(Acceptance note 2); the example app's three commands and the eval-token
check under Tests.

**Not run locally, CI's:** the type-check lanes, `Build Core`, `Test
Core`, the repo lint, the docs build.

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

<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmTSjgh1xF2oiht7G2Z -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
…hole arrangement (fieldGroups, relatedLists) (objectstack-ai#36568)

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

Fixes objectstack-ai#36541

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用 AI 写配置的客户,想给已安装软件包里的对象重排记录页(换字段分组、调页签顺序、隐藏页签)时,AI
现在知道这份排布要写在该软件包配套的环境定制包里;以前技能没讲这件事,AI 要么不会用,要么写进别的扩展包后被拒收。
- 属于「记录页标签与分组」专题:环境管理员整页排布的能力上一步已经上线,这一步把它教给 AI 作者,并补一道考题。
- 如果教错,AI 会把排布写到会被拒收的位置,保存或校验时当场报错并给出改法,数据不受影响;撤回这次改动,技能文字就回到原样。
- 审批这次对外技能文字的改动(技能包属于受管范围,需要你来合入)。

## Fix round 1

Head `90a673de67`, one commit on top of `0db54351e8`, answering the
contract review of that head (record 7087999230).

- **S1, the refused writer is named by what the judge tests.** The
paragraph's last sentence read "In any other package both keys are
refused at those doors". That is false for a `.custom` package that is
not the object's pair: `judgeExtensionArrangement` returns no refusal
when `isCustomizationPackage(packageId)` holds
(`packages/metadata-protocol/src/protocol-extension-arrangement.ts:94`;
the predicate is the id's `.custom` suffix over a valid base,
`packages/spec/src/kernel/customization-package.ts:119`), and the key
descriptions say such a package "is not refused at those doors: the
registry merge does not apply what it writes here ... and the boot log
names it" (`CUSTOM_ARRANGEMENT_WRITER`,
`packages/spec/src/data/object.zod.ts:6832`). Both files read again on
`main` at `abe95a950d`: unchanged since `d463c46f`. The sentence now
reads "Outside a `.custom` package both keys are refused at those doors:
use `place`." The changeset's first bullet carries the same words.
- **Bytes.** The new wording is 7 bytes longer and the file had exactly
7 priced bytes of headroom, so nothing more is cut: 26,853 to 26,860
bytes, 6,709 to 6,710 tokens, ceiling 6,710 unchanged.
- **N1, case 27 asserts `place:`.** The token `place` also matched the
word "replaces", so an answer that never said what the add-on package
writes could pass. It is `place:` now, the token case 26 uses; the
reference answer already contains `place: [`. Regraded below.
- **N2 is left as it is.** No byte remains after S1, and the review ties
the clause to bytes being left.

## What changes

**One paragraph in `skills/objectstack-data/SKILL.md`, § Object
Extension Model** (lines 386 to 390 at head `90a673de67`), inside the
paragraph about an object an installed package ships, right after the
sentence that lists the doors of the `__c` rule:

> Only the pair's extension may also write `fieldGroups` and
`relatedLists`, shaped as on an object. A written key replaces that
arrangement whole (the owner's and every `place`): an unlisted field
shows after the last group, an unnamed tab still shows after the listed
ones, and `{ list: 'crm_note', hidden: true }` hides a tab. Outside a
`.custom` package both keys are refused at those doors: use `place`.

"Those doors" are the ones the sentence before it names: save, publish
and install, `os validate` and `os build`.

**What it teaches is what is on `main`** (PR objectstack-ai#36517, merge commit
`45ef94ef`; ADR-0146 D2, D3 and D10), read at `d463c46f`:

| Sentence | Where it is on `main` |
|:---|:---|
| The two keys, in an object's shapes |
`packages/spec/src/data/object.zod.ts:7070` (`fieldGroups`, an array of
the object's group schema) and `:7082` (`relatedLists`); the key list is
`CUSTOM_ARRANGEMENT_KEYS`,
`packages/spec/src/data/field-customization.ts:124` |
| `{ list, hidden: true }` |
`packages/spec/src/data/object.zod.ts:6703`: `hidden` is a boolean on
the extension's entry only; an object's own entry refuses it by name
(`:1347`) |
| A written key replaces whole; an unlisted field after the last group;
an unnamed tab still shows after the listed ones | the two key
descriptions, `packages/spec/src/data/object.zod.ts:6837` and `:6863`;
the fold is `applyCustomArrangement`,
`packages/objectql/src/registry-custom-arrangement.ts:144` |
| Only the pair writes them; outside a `.custom` package they are
refused and the writer is told to use `place` | one judge,
`judgeExtensionArrangement`,
`packages/metadata-protocol/src/protocol-extension-arrangement.ts:91`.
Its answer is `VALIDATION_ERROR` / 400 (`:116`); the message, measured
on this PR's eval shape: "`relatedLists` in the extension of object
'crm_account' in package 'acme_contracts': only the object extension of
a base's paired `.custom` package declares an object's whole arrangement
(ADR-0146 D10). Remove the key and place what this package brings with
`place`, e.g. `place: [{ list: 'contract', after: 'opportunity' }]`." |
| The doors | save
`packages/metadata-protocol/src/protocol-save.ts:1390`; publish
`protocol-history-and-publish.ts:1062`; restore
`protocol-authoring-gate.ts:129` (all three through
`objectExtensionItemRefusal`, `protocol-object-extension-item.ts:257`);
`os validate` `packages/cli/src/commands/validate.ts:895`; `os build`
`packages/cli/src/commands/compile.ts:948`; install
`packages/cloud-connection/src/marketplace-install-local-plugin.ts:3192`
(`VALIDATION_ERROR` / 422, one row per key in `details.refusals`) |

**Paid for in the same file; the token ceiling is not raised.** The file
had 0 tokens of headroom (6,710 of 6,710). The paragraph is 407 bytes
(400 before fix round 1); five restatements are cut, 405 bytes, and the
content of each stays in the bundle. The remaining 2 bytes come out of
the 2 priced bytes the file had under its ceiling:

| Cut from `SKILL.md` | Bytes | Where the content stays |
|:---|---:|:---|
| § Validation Patterns, the note that on insert an omitted optional
field reads as `null` in a predicate | 240 | `rules/validation.md` lines
80 to 83 (the same note) and line 17 (a `script` rule judges the merged
record: prior row plus this write) |
| § Index Patterns, "`unique` defaults to `false`; omit it when that is
what you mean." | 66 | `rules/indexing.md` line 11 |
| Quick Reference, the lifecycle row's "append-only objects must declare
one" | 42 | the `lifecycle` row of the optional-properties table in the
same file ("Required for append-only, high-write-rate objects") and
`rules/lifecycle.md` line 14 |
| The `sharingModel` heading's "(ADR-0090 D4; legacy aliases removed)" |
38 | `references/lint-rules.md` line 23 (`security-owd-alias`: a legacy
spelling is an error, ADR-0090 D4) |
| The `pluralLabel` row's `(e.g., "Accounts")` | 19 | the object JSON
example in the same file (`"pluralLabel": "Accounts"`) |

**The two readings** (tokens in the ratchet's convention, `ceil(utf8
bytes / 4)`, the release-stamp line not priced):

| | Before (`d463c46f`) | After (`90a673de67`) |
|:---|:---|:---|
| `skills/objectstack-data/SKILL.md` | 473 lines · 26,858 bytes · 6,710
tokens (ceiling 6,710) | 472 lines · 26,860 bytes · 6,710 tokens
(ceiling 6,710, unchanged) |
| All 14 `skills/*/SKILL.md` | 4,951 lines · 261,175 bytes | 4,950 lines
· 261,177 bytes |
| Ratcheted (authored) tokens, whole bundle | 197,573 | 197,573 |
| Eval fixtures (measured, not ratcheted) | 81,141 | 81,720 |
| Bundle total | 293,321 | 293,900 |

**One eval case**,
`skills/objectstack-data/evals/objects-fields-relationships.json` case
27: an add-on package put the tab arrangement (two tabs swapped, one
hidden) on its own extension of an installed object and `os validate`
refused it. The answer moves the arrangement to the object extension of
the base's paired `.custom` package and names `place` as what the add-on
package writes. `must_contain`: `hotcrm.custom`,
`defineObjectExtension`, `extend: 'crm_account'`, `relatedLists`,
`hidden: true`, `place:`.

Two riders in the eval directory:

- Case 26 (the `place` case) said in its reference answer that "an
extension has neither key". That stopped being true when the two keys
shipped, and the new paragraph says the opposite, so the parenthesis now
reads: only the object extension of HotCRM's paired `hotcrm.custom`
package writes those keys; here they are refused. Its prompt and
assertions are unchanged, so its case hash is unchanged.
- `evals/README.md` lists what the file covers and gains the new case's
topic.

**Changeset**: `.changeset/36541-skills-custom-arrangement.md`,
`@objectstack/skills` patch.

## Tests

The grader and gate readings are at head `90a673de67`, tree clean. The
door suites were run at `0db54351e8`; fix round 1 touches no file they
read.

<details>
<summary>The eval file's reference answers under its own
grader</summary>

`gradeAnswer` (`packages/qa/scenarios/src/skill-evals/grade.ts`) over
each case's `expected_output`, cases parsed by the runner's own
`parseEvalFile`. No model round was run.

| Tree | Reading |
|:---|:---|
| `d463c46f` (control) | 26 cases parsed, 0 refusals; reference answers
PASS 26/26 |
| `0db54351e8` (the head reviewed before) | 27 cases parsed, 0 refusals;
reference answers PASS 27/27; case 26 PASS; case 27 PASS |
| `90a673de67` | 27 cases parsed, 0 refusals; reference answers PASS
27/27; case 26 PASS; case 27 PASS |

Named answers for case 27, each graded under the assertions of both
heads and each as expected:

| Answer | At `0db54351e8` (`place`) | At `90a673de67` (`place:`) |
|:---|:---|:---|
| the reference answer | PASS | PASS |
| a short answer: the pair, the arrangement, `place: [...]` for the
add-on package | PASS | PASS |
| the pair and the arrangement, "the key replaces the tab list whole",
nothing about what the add-on package writes (the N1 control) | PASS |
FAIL, `missing=["place:"]` |
| the arrangement kept on the add-on package, the pair never named |
FAIL, `missing=["hotcrm.custom"]` | FAIL, `missing=["hotcrm.custom"]` |
| the pair named, the tab hidden by leaving it out (an object's own
rule) | FAIL, `missing=["hidden: true"]` | FAIL, `missing=["hidden:
true"]` |

At `0db54351e8` two more named answers were graded as expected: the
object redeclared with an `overrides` declaration (FAIL,
`forbidden=["name: 'crm_account'","overrides:"]`), and the pair named
with nothing said about the add-on package (FAIL, `missing=["place"]`).

The reference answer's extension, `{ extend: 'crm_account',
relatedLists: ['crm_opportunity', 'crm_contact', { list: 'crm_lead',
hidden: true }] }`, parses under `ObjectExtensionSchema`;
`judgeExtensionArrangement` answers 1 refusal for package
`acme_contracts` (path `objectExtensions[0].relatedLists`) and 0 for
`hotcrm.custom`.

`node ui/scripts/check-skill-eval-tokens.mjs`: exit 0, "Every
must_contain token is taught by its own skill bundle."

</details>

<details>
<summary>Which doors refuse: the suites of the merged protocol, run on
this head</summary>

The dispatch asked which doors actually refuse a writer that is not a
`.custom` package. Each door's suite was run, at `0db54351e8`, after
building its dependency closure (`turbo run build
--filter='@objectstack/cli^...'`, 64 tasks, exit 0), each run under the
shared verification lock:

| Door | Suite | Reading |
|:---|:---|:---|
| The judge, and the gate the save, publish and restore doors ask |
`packages/metadata-protocol/src/protocol-extension-arrangement.test.ts`
| exit 0, `Tests 13 passed (13)` |
| Save, through the real protocol and engine |
`packages/objectql/src/protocol-custom-arrangement.test.ts` | exit 0,
`Tests 6 passed (6)` |
| `os validate` and `os build`, both commands in process |
`packages/cli/test/validate-build-extension-arrangement.test.ts`,
`packages/cli/src/utils/extension-arrangement.test.ts` | exit 0, `Test
Files 2 passed (2)`, `Tests 10 passed (10)` |
| Install |
`packages/cloud-connection/src/marketplace-install-local-extension-arrangement.test.ts`
| exit 0, `Tests 5 passed (5)` |
| What a written key does (replaces whole, the unlisted field, the
unnamed tab, the hidden tab) |
`packages/objectql/src/registry-custom-arrangement.test.ts`,
`packages/spec/src/data/object-extension-arrangement.test.ts` | exit 0,
`Tests 33 passed (33)` and `Tests 53 passed (53)` |

The publish and restore doors are measured at the gate they call
(`objectExtensionItemRefusal`); that each of them calls it is read from
the call sites cited above, not from a run through the door.

</details>

<details>
<summary>Gates</summary>

`node scripts/pm/dispatch-gates.mjs --commands` at `90a673de67` derives
the same 50 commands as at `0db54351e8`. All 50 were run again on this
head, each exit code recorded before any pipe; `--ran` answers: "50
derived famil(ies) accounted for — 49 run, 1 NOT-MEASURED (1 DERIVED
from a recorded exit 3)", exit 0.

- 49 exit 0. Among them: `node scripts/check-skills-token-ratchet.mjs`
("60 authored bundle file(s) within their ceilings"; the data row reads
`6710 / 6710 (+0)`), `check:skill-docs`, `check:skill-served-sections`,
`check:skill-links`, `check:skill-identifier-liveness`,
`check:skill-compatibility`, `check:skill-frame-sync`,
`check:doc-authoring`, `check:doc-formula-expressions`,
`check:role-word`, `check:nul-bytes`, `check-empty-changeset`,
`check-changeset-no-major`, `check-adr-0087-registration`.
- NOT MEASURED: `pnpm check:dual-build-cjs-loads`, exit 3. It reads the
built output of every package and asks for a whole-workspace build; this
change touches no package source, and the full build was not made for
it. CI reads it.
- Outside the derived list, also run on this head: `check:skill-refs`
exit 0 ("10 generated files in sync"), `check:skill-examples` exit 0
("349 prose examples type-check across 3 surface(s)"), `node
ui/scripts/check-skill-eval-tokens.mjs` exit 0.
- The gates that read built output (`check:dts-closure`,
`check:published-files`, `check:sourcemap-no-sources-content`,
`check:driver-memory-census`, `check:lean-entry-closure`) answered exit
0 on a tree where the spec, lint, objectql, metadata-protocol and
client-react closures were built, not the whole workspace; their full
reading is CI's.

</details>

## Acceptance notes

1. **Overlap.** `node scripts/pm/overlap-check.mjs` at `90a673de67`:
`origin/main` (`abe95a950d`) merges cleanly; objectstack-ai#35129 and objectstack-ai#36559 merge
cleanly (objectstack-ai#36559 edits case 3 of the same eval file); draft objectstack-ai#36158
conflicts in `skills/objectstack-data/SKILL.md`. That one is known to
the seat and ruled: this card does not wait, and whichever of the two
lands second replays its text.
2. **`main` moved after the branch was cut**, `d463c46f` to
`abe95a950d`. It merges cleanly and the branch was not merged again.
3. **Both mechanism assumptions of the dispatch hold.** The refusal
fires at save, publish and install and at `os validate` / `os build`,
the doors the `__c` sentence already lists, so the paragraph says "at
those doors". `{ list, hidden: true }` is the schema's spelling.
4. **What the paragraph leaves to the refusal texts and the docs page**
(`content/docs/data-modeling/object-extensions.mdx`, "Arranging the
whole record page"), to stay inside the ratchet: a `place` entry beside
the key that replaces it is refused at parse with its own prescription;
a built-in tab is written as its bare name and cannot be hidden; a
`.custom` package that is not the object's pair is not refused, it is
skipped and named in the boot log (since fix round 1 the paragraph no
longer says the opposite; it still does not teach the skip); a list the
owner hid by leaving it out stays hidden until the arrangement names it;
a field is kept off the page by a group whose `visibleWhen` is false.
5. **Case 27's prompt carries two of its own `must_contain` tokens**
(`relatedLists`, `hidden: true`), because the colleague's refused
extension is quoted in it. The tokens the prompt does not hand over are
`hotcrm.custom`, `defineObjectExtension`, `extend: 'crm_account'` and
`place:`. With `place:` an answer that names `place` only in prose,
without an entry, does not pass; case 26 has the same property.
6. **`evals/README.md` is outside the file surface the claim lists.** It
is the index of the eval file and the same-file PR before this one
updated it with its case, so it is updated here too.
7. **The ceiling row is untouched at 6,710** and the file sits exactly
on it, with 0 tokens of headroom, as it did on `main`.

## Verification

**Read first:**

1. `skills/objectstack-data/SKILL.md` lines 386 to 390, the last
sentence first (fix round 1), beside `CUSTOM_ARRANGEMENT_WRITER` and the
two key descriptions in `packages/spec/src/data/object.zod.ts` (lines
6828 to 6888). The risk is a sentence that says more than the runtime
does.
2. The five deletions in the same diff, each against the home named in
the table above. The riskiest is the insert-null note: it leaves the
always-loaded file and stays in `rules/validation.md`.
3. Case 27, and the one changed parenthesis of case 26, in
`skills/objectstack-data/evals/objects-fields-relationships.json`.

**Two-minute check:** `node scripts/check-skills-token-ratchet.mjs`.
Expected: the data row reads `6710 / 6710 (+0)` and the last line reads
"60 authored bundle file(s) within their ceilings".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX

<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmPTDM2MxHR8cvoMVUX -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
… a named wizard form, and the sections ladder says New and Edit never read sections (objectstack-ai#36625)

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

Clause-②: no
Metadata-protocol: none
Skills-docs: updated here

## 维护者速读

- 用户能看到什么变化:照着技能包写应用的 AI,想要「一个对象上的分步表单」时,会被指到「由动作打开的具名分步表单」;也不会再以为「新建 /
编辑」弹窗能靠表单分区来重新排版。
- 为什么做:这是「内部新建和编辑表单退役」的收尾。平台已经改了,技能总目录和界面技能里还各留着一段旧说法。
- 出错会怎样:AI 照旧文字写出的分步表单或分区不会生效。本次只改两段技能文字,撤回这一个合并就恢复原样。
-
要你做什么:技能包属于受管文件,本单保持草稿,等席位的契约审核记录后落地;数据技能和自动化技能里的同类旧说法留给第二阶段(等另一张在途的数据技能改动先合并)。

## What changes

Stage 1 of the card: the two passages that do not intersect PR objectstack-ai#36158.

- **`skills/README.md`**, "Cross-skill routing", the "Screen flows vs.
views" bullet. Before: a stepped form over one object that never
branches is "a form view, `type: 'wizard'`", with no door named. On
`main` the only form views that load are a named one an action of `type:
'form'` opens and a public one; an object's New and Edit load none.
After: the bullet names the named wizard form and the action that opens
it, and says an object's own New and Edit never step because they are
built from its fields and `fieldGroups`. The screen-flow half (branches,
or several objects, is automation) is unchanged.
- **`skills/objectstack-ui/rules/navigation.md`**, "Record
Presentation", the `sections` bullet. Before: step 2 of the ladder read
"when one surface needs a local arrangement, a section may name a
declared group", in a section about a record's create / edit / detail.
After: the bullet opens by saying New and Edit never read `sections`
(linking "Form Views" in `rules/list-views.md`), and names what does: a
named or public form, and a page's `record:details` or form block. The
three steps of the ladder are kept. The enumerate step's example "a
wizard/pane structure" becomes "a wizard's steps": `pane` left the
section shape in spec 18.3.0, and a wizard step is the case that must
enumerate `fields`, because `group` is refused there.
- **`.changeset/36611-skills-wizard-routing-sections.md`**:
`@objectstack/skills` patch.

No eval case teaches either passage (`git grep -n -i "wizard\|sections"
skills/objectstack-ui/evals` at this head: one trigger prompt, one
`must_not_contain` token, and prose about field groups), so no eval file
changes.

**Left for stage 2** (a second PR on this card, Blocked-by objectstack-ai#36158, which
edits all three files): `skills/objectstack-data/rules/relationships.md`
(the pointer to the removed subforms override), `showOnCreate` in
objectstack-data, and the same routing sentence in
`skills/objectstack-automation/SKILL.md` line 44. Until stage 2 lands,
that automation line still reads "an objectstack-ui form view, `type:
'wizard'`", shorter than the README now is.

### Token and line readings (no ceiling is changed)

| File | Lines before → after | Bytes before → after | Tokens before →
after | Ceiling |
|:--|:--|:--|:--|:--|
| `skills/objectstack-ui/rules/navigation.md` | 191 → 191 | 10216 →
10216 | 2554 → 2554 | 2564 (unchanged, headroom 10 as before) |
| `skills/README.md` | 146 → 148 | 10753 → 10893 | 2689 → 2724 by the
same convention | none: outside the ratchet's population ("population 3"
in the checker's header), not inside any published skill directory |
| All `SKILL.md` files under `skills/`, summed | 4948 → 4948 | | | |
| Ratcheted (authored) total | | | 197572 → 197572 | 202541 |
| Bundle total (whole shipped tree) | | | 294087 → 294087 | |

The new sentence in `navigation.md` is paid in full by cuts inside the
same bullet ("in order", "when one surface needs a local arrangement",
"at all", "genuinely", "at parse", "beside it", and shorter wording of
the last sentence). Readings at `affa89e7a9` against base `ed0edb1b50`.

## Tests

No package source changed, so no package suite is owed. No ablation:
prose only.

Local gates at `affa89e7a9`: the 49 commands `dispatch-gates.mjs
--commands` derives, each run with its exit code recorded; `--ran`
answers "49 derived famil(ies) accounted for — 47 run, 2 NOT-MEASURED".
The two are `check:dual-build-cjs-loads` and `check:lean-entry-closure`
(exit 3, PREREQUISITE NOT MET: they read built `dist/` of packages this
diff does not touch; CI decides). Among the 47:
`check-skills-token-ratchet` exit 0, `check:skill-links` exit 0,
`check:skill-docs` exit 0, `check:doc-formula-expressions` exit 0,
`check:nul-bytes` exit 0.

## Acceptance notes

Each taught sentence against `main` (`ed0edb1b50`):

- New and Edit are built from the object's fields and field groups, and
read no form view:
`ui/packages/app-shell/src/utils/recordFormFields.ts:29`
(`recordFormFieldNames`), called by the dialog
(`ui/packages/app-shell/src/console/AppContent.tsx:1791`), the full page
(`ui/packages/app-shell/src/views/RecordFormPage.tsx:296`) and an
action-opened create or edit
(`ui/packages/app-shell/src/hooks/useActionModal.tsx:289`).
- An internal form parses and steers nothing, with a warning:
`packages/lint/src/validate-internal-form-views.ts:36` and `:91-112`.
- An action of `type: 'form'` opens a named form at its own page:
`ui/packages/core/src/actions/ActionRunner.ts:2931-2939`
(`executeForm`), route `ui/apps/console/src/App.tsx:456`;
`packages/spec/src/ui/action.zod.ts:693` and `:719`.
- That page honours `wizard` (a step per section) and `tabbed`:
`ui/apps/console/src/components/FormPage.tsx:2841` and `:2848`; type
enum `packages/spec/src/ui/view.zod.ts:5341-5343`.
- A named form resolves a `group` section:
`ui/apps/console/src/components/FormPage.tsx:845-857`. `group` on a
wizard step is refused: `packages/spec/src/ui/view.zod.ts:5727-5737`.
- A page's `record:details` block takes `sections` with a `group`
reference: `packages/spec/src/ui/component.zod.ts:1327`, `:1379`,
`:1549`. The `object-form` and `object-master-detail-form` blocks take
them too: `:7259`, `:7540`; resolved in
`ui/packages/plugin-form/src/ObjectForm.tsx:336`.
- `pane` is gone from both section shapes:
`packages/spec/src/ui/view.zod.ts:4106-4115`,
`packages/spec/src/ui/component.zod.ts:6556-6559`.

Noted, not filed: an `object-form` page block also accepts `formType:
'wizard'` (`packages/spec/src/ui/component.zod.ts:7220`), a second ui
home for a stepped single-object form. The README bullet names only the
named form, the home "Form Views" teaches; whether the routing should
name the page block as well is the reviewer's call.

## Verification

Read first, by risk: (1) the `sections` bullet in
`skills/objectstack-ui/rules/navigation.md`, the one hunk in a ratcheted
file; (2) the routing bullet in `skills/README.md`.

Two-minute check: `node scripts/check-skills-token-ratchet.mjs`,
expected line "skills/objectstack-ui/rules/navigation.md is 2554 tokens
(ceiling 2564; headroom 10)" and exit 0.

CI check-runs: not read at the time this body was written.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX
<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmPTDM2MxHR8cvoMVUX -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 23, 2026
… relocated text; ratchet rows not yet re-pinned

Claude-Session: https://claude.ai/code/session_01QSeKYoBFwgPdc8gN56sREh
Co-authored-by: Claude <noreply@anthropic.com>
… nine rows re-pinned at the measurement

Main's additions to the two entry files since the branch point (the colour row, fieldHistory, an
extension's place, the paired .custom arrangement, showOnCreate, the option-label and subflow
corrections) now sit at their relocated homes, so the receiving files grew. Paid inside the moved
text by cutting sentences that restate what the entry's traps and served sections say, two long
table separators, and connective text; the insert-null note leaves the entry as it left main's.
The sum of ceilings is 23 tokens under main's, every moved row at zero headroom.

Claude-Session: https://claude.ai/code/session_01QSeKYoBFwgPdc8gN56sREh
Co-authored-by: Claude <noreply@anthropic.com>
…ome; two pointers name where their sections moved

Main's Validation Patterns ended with the clause that a state machine's transitions keys and
values are option values, never labels; no file of the bundle said it after the move and no
publish check covers it. It is one sentence of rules/validation.md § State Machine Validation.
The Prerequisite pointer in examples-flows.md and the Assignment rules pointer in
state-machines-and-approvals.md name the sections' homes instead of SKILL.md. Rows re-pinned:
validation.md 3466, examples-flows.md 6551; the sum of ceilings is 203,009 against main's 203,016.

Claude-Session: https://claude.ai/code/session_01QSeKYoBFwgPdc8gN56sREh
Co-authored-by: Claude <noreply@anthropic.com>
Main's entry said defineStack errors unless the stack declares requires: ['hierarchy-security'];
the routed home kept only that the capability is needed. rules/security.md now names the refusal
and its code (STACK_HIERARCHY_SCOPE_CAPABILITY_REQUIRED, read off packages/spec/src/stack.zod.ts
and the runtime authoring gate), paid inside the file by two restatement cuts; the row is
re-pinned at 4771, three tokens below the ceiling this PR had asked for.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8fbebd2797f62b61f2dd2cbc1bd251480d8fafe1
Local-runs: probe — byte counts of the ten skill blobs at main and at the head (git cat-file -s) and the sum of the ratchet rows read from both blobs, for ruling ④A; nothing built, tested or re-run
Scope: skills/objectstack-automation/SKILL.md, skills/objectstack-automation/references/examples-flows.md, skills/objectstack-automation/references/integration-recipes.md, skills/objectstack-automation/references/state-machines-and-approvals.md, skills/objectstack-data/SKILL.md, skills/objectstack-data/references/examples-objects.md, skills/objectstack-data/rules/field-types.md, skills/objectstack-data/rules/relationships.md, skills/objectstack-data/rules/security.md, skills/objectstack-data/rules/validation.md + scripts/check-skills-token-ratchet.mjs
Security-touching: yes
Rule-change-verified: none

Full review of PR #36158 (card #34770) on this head, isolated from the build. Inputs: the card and all 23 of its comments (ruling 7128031203, dev reports 7151308696 and 7153988410 among them), the PR, its net diff against main, and the 45 check-runs on the head. The diff is read against main at 1b91538b; main has not moved on any path of this diff since the merge base d15e4391. The PR body is stale and was not graded.

① Derived judgments

  • Accept set, schema. No packages/spec/src path, no key, value or refusal moves. Clause-②: no and Metadata-protocol: none are right.
  • Published surface. The two entry files become routers: objectstack-data/SKILL.md 26,854 → 8,902 bytes, 165 lines; objectstack-automation/SKILL.md 28,198 → 8,973 bytes, 181 lines; lines 1–17 byte-identical to main in both. Inside the card's budget (6–9 KB, 500 lines). Right.
  • Anchors. The anchors that leave the two entries are listed in the changeset; the two that other skills link (#conditional-field-rules, #failure-routing--runas) are still there. Right.
  • Hosted served sections (packages/spec/scripts/skill-served-sections.json, not in the diff). I checked 20 headings in the six touched files that carry one: the eleven served ones in the two entries, the linked Conditional Field Rules and the bound Access depth … beside them, Time-relative triggers …, the four approval sections, State Machine Validation, Roll-up Summaries. Each occurs once, at main's level. Shorter text under the eleven is ruling ①A. Two served sections changed in round 3 and are no longer byte-identical to main: Time-relative triggers … (3 bytes, the pointer) and State Machine Validation (the restored clause); headings and JSON fences untouched. Right.
  • Ratchet rows (ruling ④A). From the blobs:
Row File bytes main → head ceil(bytes / 4) Row main → head
objectstack-data/SKILL.md 26,854 → 8,902 (8,882 priced) 2221 6710 → 2221
objectstack-automation/SKILL.md 28,198 → 8,973 (8,953 priced) 2239 7045 → 2239
data/references/examples-objects.md 6,892 → 14,338 3585 1728 → 3585
data/rules/field-types.md 14,156 → 16,748 4187 3541 → 4187
data/rules/relationships.md 16,765 → 17,325 4332 4203 → 4332
data/rules/security.md 17,168 → 19,082 4771 4292 → 4771
data/rules/validation.md 11,031 → 13,861 3466 2761 → 3466
automation/references/examples-flows.md 6,170 → 26,203 6551 1543 → 6551
automation/references/integration-recipes.md 10,379 → 12,222 3056 2595 → 3056
automation/references/state-machines-and-approvals.md 23,734 → 23,743 5936 5936, not raised

(a) Every raised row equals its measurement, zero headroom. (b) All 60 rows sum to 203,016 on main and 203,006 on the head (−10); the nine moved rows 34,418 → 34,408. Only the nine moved rows differ from main. Right as arithmetic; what the security.md row is made of is S3 and S4 below.

  • Teaching that changed instead of moving. (i) The multi-value lookup note shows record.tags[0] where main showed {record.tags.0}: right, it is the spelling objectstack-automation teaches on main. (ii) rules/security.md § Access depth gains a refusal sentence that main does not have: wrong, S3. (iii) rules/security.md loses two glosses main has: S4.

② Semver level

One changeset, '@objectstack/skills': patch, with Clause-②: no and Metadata-protocol: none. It matches what the diff publishes (skill prose; the ratchet script is not published). Check Changeset is green.

③ Boundary flags

  • Round 3 may have run partly below tier, so every round-3 hunk was read, not a sample. Commits after 71540330: the merge d8298889 touches none of this PR's files; 76f014c9 has three text hunks (the two pointers, the transitions clause), all hold; 8fbebd27 has three, all in rules/security.md, and they are S3 and S4. The ratchet rows both commits moved are in the table above.
  • S1: closed. rules/validation.md § State Machine Validation now reads "transitions keys and values are option values, never labels", main's clause, in a section the hosted door serves.
  • S2: closed. examples-flows.md says "§ Prerequisite above" and that heading is line 223 of the same file; state-machines-and-approvals.md says "examples-flows.md § Assignment rules" and that heading exists. SKILL.md § Failure routing in the approvals file is still a real home.
  • Dev deviation, the extra fix beyond the round's two items (report 7153988410): it is where both findings sit.
  • Dev deviation, the flow-shape harness is uncommitted. Its count was not re-run. By reading: the three cron spellings in the automation bundle each carry a timezone; the only label-shaped comparison is the one the text names as refused at publish; "parses, matches no row and never fires" is gone.
  • Open question, landing order (both reports): answered. The seat already holds edits to the two entry files until this PR lands, which is the dev's first answer; nothing to escalate.
  • Open questions of report 7151308696, pointers and pay-down: the pointers are fixed (S2). The three lead-ins turned into one-line pointers are each stated by the entry's trap 1, 2 or 3; accepted as built.
  • PR body. It still opens Fixes #34770; ruling 7128031203 makes the first line Part of #34770. The zone refreshes it before the PR is readied.
  • Eval after-round (ruling ②A). It was aimed at this head. The fixes below move the head, so the round runs on the next one.
  • SQL push-down: no code in the diff; nothing to judge.
  • Author: objectstack-fleet[bot]. Check-runs on the head: 45, 29 success, 16 skipped, none failing, none pending.
  • Landing tier: H either way (the ratchet script is in the diff, and this record reads Security-touching: yes: the moved text teaches readScope / writeScope, ownership queues, runAs elevation and identity assignment).

④ Design judgment

S3 (must-fix) — rules/security.md § Access depth teaches a refusal the runtime does not make. The head says: "defineStack, a save and a publish refuse a hierarchy-relative grant the stack does not declare (STACK_HIERARCHY_SCOPE_CAPABILITY_REQUIRED)". main's entry said only that defineStack errors unless the stack declares requires: ['hierarchy-security']. Read against main's code:

  • packages/spec/src/stack.zod.ts (validateHierarchyScopeCapability, error class at line 4272): defineStack refuses with that code when requires omits the token. This third holds.

  • packages/metadata-protocol/src/protocol-authoring-gate.ts (the evt.state !== 'active' branch): "no rule gates a draft"; a draft save answers 2xx with the finding as a warning. A save is not refused.

  • packages/metadata-protocol/src/runtime-authoring-gate.ts (findHierarchyScopeCapabilityGaps): the publish refusal is rule hierarchy-scope-capability-required inside the 422 INVALID_METADATA envelope, and its condition is that no hierarchy resolver is mounted on the runtime, a fact of the deployment, not the stack's requires line. Neither the code nor the condition in the sentence is the publish door's.

    An author who reads this and sees a draft save succeed can conclude the grant is declared and enforced, while it fails closed to own. The row comment in the ratchet script calls the file's growth "no new teaching"; this sentence is new teaching. Fix: say what each door does (defineStack refuses with the stack code when requires omits the token; a publish on a runtime with no resolver is refused hierarchy-scope-capability-required; a draft save warns), or go back to main's one clause.

S4 (should-fix) — the cut that pays for S3's sentence deletes teaching, not restatement. In the sharing bullet of rules/security.md, main glosses the three RESOURCE_CONFLICT reasons: outside-closure "(only a non-dependency or an environment item holds …)", ambiguous-in-closure "(two dependencies do)", ambiguous-in-environment "(the one it reaches and a non-dependency do)". The head keeps the middle gloss and drops the other two (−107 bytes). The report calls them "already stated by the bullet above"; the bullet above is the choose-by-key list and states neither, and no other file of objectstack-data names these reasons at all (objectstack-automation glosses them for an assignment rule and an approver, with a different environment case). The position bullet's "(the environment: a set authored in Setup; …)" now explains a case the queue bullet no longer mentions. This matters for ④A: restoring the 107 bytes alone puts the row at 4798 and the sum 17 tokens above main's, so condition (b) holds on this head only through this cut. Fix: restore the two glosses and pay with a real restatement, or take the remainder to the maintainer as ④A's last clause says. The second cut ("The two closure refusals are as for a queue above") is fine once the glosses are back.

Nothing-lost sweep. I read main's two entry files sentence by sentence against the head's two entries and the seven receiving files, and ran a span scan as a cross-check (data: 6 of 249 code spans absent from the head bundle; automation: 3 of 331; the sets the dev names). I found no third lost trap. Because the sweep ran against main's current entries, it also covers every later main edit to the moved text, PR #36932's among them: item 4 is split in main's words (the half no check reads stays in the entry; the half publish refuses is in "Value slots and the other silent traps — the rest", item 3), and the subflow row, the Flow Types and Control Flow tables, the color, fieldHistory, trackHistory rows, place, the paired .custom arrangement and showOnCreate are main's text. In the files this PR only adds to, the diff against main shows this PR's insertions and nothing else, apart from S4's cut and the pointer edits.

Not carried, and why it holds:

  • The label, datasource, displayNameField, searchable, apiEnabled, files, clone rows: each key and default is in packages/spec/src/data/object.zod.ts, which the entry's third check points at.
  • titleFormat: refused by name at save and os validate, as main itself says. The object-level permissions / hooks keys: refused at parse.
  • Moved to homes that already existed, each checked in the head bundle: the name pattern (rules/naming.md), field.columnName (rules/datasources.md), the optional master under controlled_by_parent (rules/relationships.md), the six rule types and the update-only machine (rules/validation.md), the index surface (rules/indexing.md), the append-only rule (rules/lifecycle.md), the credential hand-off (references/integration-recipes.md).

Growth is moved text (④A (a)). Every added line of the seven receiving files is a sentence or row of main's entries, verbatim or split with the entry, plus one-line "Beyond SKILL.md § …" connectives. The one exception is S3's sentence.

Pay-down cuts. The 17 earlier ones are content-preserving: the three lead-ins are stated by traps 1–3; the value-slot and text-slot lists in "the rest" are the exact complements of the entry's lists (their union is main's list); the sweep and fault-edge clauses are the entry's bullets; the insert-reads-null sentence is main's own removal; the rest is separators and connectives. Of the two cuts this round, one is S4.

Per file.

File Holds?
objectstack-data/SKILL.md Yes. Each compressed statement matches main's text (security-owd-unset, renamedFrom, the four sharingModel values, initialStates).
objectstack-automation/SKILL.md Yes. The seven served sections keep their declared forms; item 4 carries PR #36932's wording.
references/examples-objects.md Yes.
rules/field-types.md Yes.
rules/relationships.md Yes.
rules/validation.md Yes (S1 closed here).
rules/security.md No: S3, S4. The moved Ownership queues section and the rest of Access depth are main's text.
references/examples-flows.md Yes. The two long examples are byte-identical but for the S2 pointer.
references/integration-recipes.md Yes; both added sections are verbatim.
references/state-machines-and-approvals.md Yes (one pointer).
scripts/check-skills-token-ratchet.mjs Rows agree with the blobs. The security.md row comment is wrong where S3 and S4 are.

Nits (no effect on correctness or the contract):

  • "§ Prerequisite above" sits in a section the hosted door serves alone, where "above" names nothing; a file-qualified pointer would locate itself. The cloud repoint (cloud hosted skills door: repoint the eleven served sections of objectstack-data / objectstack-automation SKILL.md when the pin bump carries the router change #36934) can absorb it.
  • The ratchet script gains one comment line inside main's earlier security.md block (ceil(16272 / 4)), and the examples-flows.md row comment counts "three objectstack-automation files" where four are touched.
  • The changeset says "The two skills together did not grow"; at this head the ten files are 50 bytes larger than on main (161,347 → 161,397).
  • The data entry no longer names objectstack-api and objectstack-ui as neighbours (the Skill Boundaries table); the frontmatter names the other three.

Implemented-by: claude/issue-34770-skill-router-budget
Reviewed-by: session_01QSeKYpAquqtjzXJYi4WjeA

VERDICT: FAIL


Generated by Claude Code

…ad as on main

rules/security.md § Access depth said defineStack, a save and a publish refuse an undeclared
hierarchy-relative grant with one code. Only defineStack does (packages/spec/src/stack.zod.ts,
validateHierarchyScopeCapability); a draft save warns and a publish is refused under another
rule and another condition (packages/metadata-protocol/src/runtime-authoring-gate.ts). The
section carries the entry's own clause again: defineStack errors unless the stack declares
requires: ['hierarchy-security'].

The sharing bullet's `outside-closure` and `ambiguous-in-environment` glosses are back, byte
for byte; that bullet no longer differs from main. Paid inside the file: "paid" leaves "the
paid plugin goes in plugins[]", which SKILL.md § Access depth states with the plugin's name.

The row is re-pinned at its measurement, 4771 -> 4781 (19123 bytes); the 60 ceilings sum to
203016, the sum on main.

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

This branch has not been deployed

No deployments
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 size/xl 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.

skills: SKILL.md becomes a router with a size budget, and points to the contract instead of restating it

2 participants