Skip to content

Commit 8456562

Browse files
docs(skills): the record-page rule teaches pinOverview and object-level fieldTabs (#38813)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB7Un8hgmYaC4XFXQuvaosiq)_ Fixes #38680 Clause-②: no Metadata-protocol: none Skills-docs: updated here ## 维护者速读 - 用户能看到什么变化:用 AI 搭应用的人,在要求“记录页不要把详情钉在左侧”或“把某几组字段单独放成页签”时,AI 现在会直接在对象上写对应的配置项,而不是另写一张自定义页面;应用的最终用户无感。 - 为什么做:属于“记录页”这条线的收尾。两个配置项已经上线,但对外发布的技能说明里还写着“布局只看宽度,没有配置项”,这句话已经不成立。 - 出错会怎样:最坏是说明写得不准,AI 照着写出被平台拒收的配置;纯说明文字和测评题,可以直接撤回,不影响任何功能。 - 要你做什么:请审这段说明并批准一次(对外发布的技能说明须由你本人批);该文件的字数上限按你定过的“先削重复,余额按实测提高”上调了 254 个计量单位,批准时请一并过目。 ## What changes `skills/objectstack-ui/rules/record-page.md`, step 1: - The sentence "Layout follows the surface's width, never a key" loses "never a key". The width rule itself is unchanged. - A new paragraph teaches the two object keys that re-arrange the standard record page, each once, and says to write one only when asked. Print pages and authored `kind: 'full' | 'html' | 'react'` pages read neither key, and an object extension is refused both. - `pinOverview: false`: the desktop full page never pins; Details is its first tab, open by default, fields in up to three columns by width. `true` forces nothing. The side preview, a phone and a narrow page never pin either way. - `fieldTabs: [{ key, groups }]`: the named `fieldGroups` leave Details for one tab per entry, right after Details and before the related-list tabs of step 2, in declared order; readers cannot move or hide them. The first group's `label` and `icon` title the tab. The paragraph lists the four parse refusals and says `fields` on an entry is refused because that is the form-level `FormSchema.fieldTabs` (same name, lists field names). The entry form is unchanged. - The one checked example declares both keys, with a second field group so the field tab does not empty Details. - Step 2 still says `relatedLists` is the related-tab list. `skills/objectstack-ui/evals/record-page.json` gains two cases. Case 7 asks for a record page that does not pin its details and requires `pinOverview: false`. Case 8 asks for two named field groups on a tab of their own and requires `fieldTabs` with `groups: ['content', 'import']`. Both refuse `definePage(`, the code spelling `kind: 'full',` and a tabs slot. A forbidden entry is matched as a literal substring, so neither case forbids a bare mention: each reference answer says "no full page" and passes its own case, as do cases 1 to 6 (checked by script: every `must_contain` present, no `must_not_contain` hit, in all eight reference answers). `scripts/check-skills-token-ratchet.mjs`: the `rules/record-page.md` row moves 990 to 1244, with its arithmetic comment. No other row is touched. `.changeset/38680-record-page-skill-keys.md`: `@objectstack/skills` patch. ### The token ceiling: paid down first, then raised by the measured remainder The file sat at zero headroom (990 tokens, 3959 bytes). The raise runs on the standing maintainer ruling of 2026-10-27, quoted verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Deleted first from the same file, 94 bytes in four clauses: one false (13 bytes) and three restating (81 bytes): | Where | Deleted | Why | Bytes | |:---|:---|:---|---:| | Step 1 | ", never a key" | a false clause, not restatement: false since the two keys landed | 13 | | Step 1 | "the Console synthesizes it from the object alone:" | restatement: the title and the step's own heading say it | 50 | | Step 2 | "nothing changes:" | restatement: the default it introduces follows it in the same sentence | 17 | | Step 4 | the second "is `kind: 'full'`" | restatement: the step's heading says it | 14 | Every sentence evals 1 to 8 pin is kept. The file is then 3959 to 4974 bytes, which is 1244 tokens by the gate's convention, so the row moves +254, the measured remainder only, pinned at the measurement. The first push of this pull request measured 1304; tightening the new paragraph and the deletions brought it to 1249, and the review round's cut of a repeated "never a page file" (the file's opening line already says where a page file is authored) to 1244. ### Skill size readings | Reading | Before | After | |:---|---:|---:| | `rules/record-page.md`, lines | 64 | 81 | | `rules/record-page.md`, bytes | 3959 | 4974 | | `rules/record-page.md`, tokens (gate convention, bytes / 4 rounded up) | 990 | 1244 | | All published `SKILL.md` files, lines | 3056 | 3056 | | Ratcheted authored bundle, tokens | 192660 | 192914 | | `evals/record-page.json`, lines (not ratcheted) | 119 | 157 | Net lines in `record-page.md`: +17 (26 added, 9 removed), under the card budget of 35. ## Tests No package source is touched, so no package test or type check is owed, and no tested behaviour changed, so there is no ablation. - `pnpm --filter @objectstack/spec run check:skill-examples` on `f71d4248` (the example block is byte-identical on `bb6a823f`, where CI runs it again), after building `@objectstack/spec` and the `@objectstack/client-react` closure under the verify lock: exit 0, `347 prose examples type-check across 3 surface(s)`. The edited example is one of them. - A probe against the built `@objectstack/spec` on `b85b091d`, one line per sentence the rule now states: - the example object parses, with `pinOverview` false and the one field tab kept; - `fields` on a `fieldTabs` entry is refused, and the refusal names the form-level `FormSchema.fieldTabs`; - an undeclared group, a group two tabs name and a repeated `key` are each refused at their own path; - `ObjectExtensionSchema` refuses `pinOverview` and `fieldTabs` as unrecognised keys, each with its guidance. - The renderer facts were read on `origin/main` `0fc9eab9`: `ui/packages/plugin-detail/src/RecordPageColumns.tsx` (`pinOverview` passed on the desktop full page alone; field tabs placed before the related tabs and counted as other tabs for the pin) and `ui/packages/app-shell/src/views/RecordDetailView.tsx` (a phone passes no `pinOverview`). ## Acceptance notes - The card asks to say where each key has no effect, naming "side preview, phone, narrow page". For `pinOverview` the rule says the side preview, a phone and a narrow page never pin either way. It does not say a narrow page is unchanged in every respect: with `false`, the renderer also lays the fields out by width there. For `fieldTabs` the rule names the surfaces the schema says do not read it (the entry form, print pages, authored pages). It does not say the side preview or a phone ignore field tabs, because the renderer does not gate them on the full page. Read from the code, not measured in a browser. - The rule does not restate that a `fieldTabs` entry takes no `label`, `icon` or `visibleWhen`, nor that on a pinned page the first field tab opens beside Details. The parse refuses each of the three keys with its own guidance, and the schema docblock carries the rest. - No other file under `skills/` says "never a key" or names either key: `git grep` over `skills/` at `0fc9eab9` finds both only in this rule after the change. - A contract review at CONTRACT_REVIEW_TIER is owed on this pull request before it is handed over. This is a Tier H surface (`skills/**`): it stays draft. ## Verification First files to read, by risk: 1. `skills/objectstack-ui/rules/record-page.md`, the new paragraph in step 1: every sentence is a claim about shipped behaviour. 2. `skills/objectstack-ui/evals/record-page.json`, cases 7 and 8: the `must_contain` and `must_not_contain` strings. Two-minute check: `node scripts/check-skills-token-ratchet.mjs`. Expected: exit 0, with the line `skills/objectstack-ui/rules/record-page.md is 1244 tokens (ceiling 1244; headroom 0)`. <details><summary>Local gates on bb6a823 (dispatch-gates derivation, exit codes captured before any pipe)</summary> `Run reconciliation — 67 derived, 62 run, 5 NOT-MEASURED, 0 UNRUN.` Each NOT-MEASURED is a recorded exit 3, PREREQUISITE NOT MET: the gate reads a full workspace build this change does not owe. | Result | Commands | |:---|:---| | exit 3, NOT MEASURED, CI's | `pnpm --filter @objectstack/lint run check:doc-formula-expressions`, `pnpm check:dts-closure`, `pnpm check:dual-build-cjs-loads`, `pnpm check:lean-entry-closure`, `pnpm check:sourcemap-no-sources-content` | | exit 0 | the other 62, among them `node scripts/check-skills-token-ratchet.mjs` and its `--self-test`, `pnpm check:skill-links`, `pnpm check:skill-identifier-liveness`, `pnpm check:skill-compatibility`, `pnpm check:skill-frame-sync`, `pnpm check:doc-authoring`, `pnpm check:nul-bytes`, `pnpm check:pm-skill-id-lint`, `pnpm check:published-files`, `node scripts/check-empty-changeset.mjs --base origin/main` | `node scripts/pm/overlap-check.mjs` before the push: `VERDICT clean exit 0` against `origin/main`. `pnpm --dir ui run check:skill-eval-tokens`: exit 0. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7)_ <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzfcCk7a8bQdgyaxzu7 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f5d6ca3 commit 8456562

4 files changed

Lines changed: 90 additions & 10 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-ui record-page rule teaches `pinOverview` and the object-level `fieldTabs`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/rules/record-page.md`: step 1 no longer says the record page's layout follows "never a key". It now teaches the two object keys that re-arrange the standard record page. `pinOverview: false` keeps the desktop full page from pinning the details, which become its first tab; the side preview and a phone are unchanged. `fieldTabs: [{ key, groups }]` draws named field groups as tabs of their own right after the details; the note lists what the parse refuses and says this is not the form-level `FormSchema.fieldTabs`, which lists field names. Print pages and authored `kind: 'full' | 'html' | 'react'` pages read neither key, and an object extension is refused both. The example declares both keys. `relatedLists` stays the related-tab list. `evals/record-page.json` gains one case per key.
11+
The file's token ceiling moves from 990 to 1244: four clauses of the same file (one false, three restating) are deleted first, and the row moves by the measured remainder.

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,21 @@ export const CEILINGS = new Map([
22332233
// labels it (Activity) in place of the Chinese word, and step 5's "(one page at two
22342234
// widths)" aside — step 1 already says layout follows the surface's width — is gone; the
22352235
// ceiling follows the file down to the measurement (3961 bytes).
2236-
['skills/objectstack-ui/rules/record-page.md', 990], // -1 to the measurement (was 991)
2236+
// 991 -> 990: -1 to the measurement.
2237+
// 990 -> 1244 (card #38680): step 1 teaches the two object keys that re-arrange the
2238+
// standard record page, `pinOverview` and the object-level `fieldTabs` (what each does on
2239+
// the desktop full page, the surfaces that do not read them, the object-extension refusal,
2240+
// the four `fieldTabs` parse refusals and the form-level `FormSchema.fieldTabs` it is not),
2241+
// and the one checked example declares both. Raise path the standing ruling
2242+
// 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID DOWN FIRST, 81
2243+
// bytes of restatement beside the 13 of step 1's false clause "never a key": step 1's "the
2244+
// Console synthesizes it from the object alone" (the title and the step's own heading say it), step 2's "nothing changes"
2245+
// (the default it introduces follows it), and step 4's second "is `kind: 'full'`" (its
2246+
// heading says it). Arithmetic against `main`'s 3959 bytes (headroom 0): the file is
2247+
// 3959 -> 4974 bytes, so the row moves +254, the measured remainder only. Pinned AT the
2248+
// measurement.
2249+
// ceil($(wc -c < skills/objectstack-ui/rules/record-page.md) / 4) == ceil(4974 / 4)
2250+
['skills/objectstack-ui/rules/record-page.md', 1244],
22372251

22382252
// ── 2026-09-22 the #19715 split — decision batch #213 item 1 ─────────────
22392253
// The maintainer ruled the four over-500-line published SKILL.md files split

‎skills/objectstack-ui/evals/record-page.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,44 @@
114114
"relatedLists: ['quote_line'"
115115
]
116116
}
117+
},
118+
{
119+
"id": 7,
120+
"prompt": "Our policy records are long documents. On a desktop the policy record page pins the details in a narrow left column beside the tabs; stop that, so the details are the first tab and use the page's width. The `policy` object is defined in our own package and has Tasks and Attachments tabs today.",
121+
"expected_output": "One key on the `policy` object: `pinOverview: false`. The desktop full page then never pins, at any width: Details is the first tab, open by default, and its fields lay out by width in up to three columns; the Tasks and Attachments tabs follow as before. Absent or `true` the pin is derived from the width, so the key is written only for this. The side preview and a phone draw the same either way. It is declared on the object itself (an object extension is refused it). No page file, no full or slotted page, and no `relatedLists` change.",
122+
"files": [],
123+
"assertions": {
124+
"must_contain": [
125+
"pinOverview: false"
126+
],
127+
"must_not_contain": [
128+
"pinOverview: true",
129+
"definePage(",
130+
"kind: 'full',",
131+
"kind: 'slotted',",
132+
"slots: { tabs"
133+
]
134+
}
135+
},
136+
{
137+
"id": 8,
138+
"prompt": "On the policy record page, put the Content and Original field groups on a tab of their own, titled Content, right after the details; Basic stays in the details. The policy declares `fieldGroups: [{ key: 'basic', label: 'Basic', fields: ['title', 'owner'] }, { key: 'content', label: 'Content', fields: ['body'] }, { key: 'import', label: 'Original', fields: ['source_file'] }]`.",
139+
"expected_output": "One key on the `policy` object, beside the `fieldGroups` it already declares: `fieldTabs: [{ key: 'content', groups: ['content', 'import'] }]`. An entry names field GROUPS, not fields: the two groups leave Details and draw as one tab right after it, before the related-list tabs, and the tab takes its title and icon from its first group, so `content` comes first and the entry carries no `label`. Basic stays in Details because no tab names it, and `relatedLists` is untouched (it is still the related-tab list). This is not the form-level `FormSchema.fieldTabs`, which shares the name and lists field names: `fields` on an entry here is refused. No page file, no full page, no form view sections.",
140+
"files": [],
141+
"assertions": {
142+
"must_contain": [
143+
"fieldTabs",
144+
"groups: ['content', 'import']"
145+
],
146+
"must_not_contain": [
147+
"fieldTabs: [{ label",
148+
"label: 'Content', groups",
149+
"definePage(",
150+
"kind: 'full',",
151+
"slots: { tabs",
152+
"sections:"
153+
]
154+
}
117155
}
118156
]
119157
}

‎skills/objectstack-ui/rules/record-page.md‎

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,32 @@
22

33
Read in order: each step is the remedy for the one before it; author `*.page.ts` only at step 3 or 4 (ADR-0085).
44

5-
**1 · The object's declarations produce the page.** With no page assigned, the
6-
Console synthesizes it from the object alone: `nameField` is the
7-
title, `stageField` the status tag beside it whose menu moves the stage (each
5+
**1 · The object's declarations produce the page.** With no page assigned,
6+
`nameField` is the title, `stageField` the status tag beside it whose menu moves the stage (each
87
option declares `kind: 'open' | 'won' | 'lost'`; `false` suppresses it); there is
98
no stage bar or key-field strip (`highlightFields` feeds hover cards, pickers and
109
related-list columns). `fieldGroups` are the Details sections in array order,
1110
each listing its members in `fields` (absent: the fields whose `group` names it);
1211
`editMode` (`'modal'` | `'page'`) is how Edit opens. Layout follows the surface's
13-
width, never a key: a full page fitting 320 px of details beside 400 px of tabs
12+
width: a full page fitting 320 px of details beside 400 px of tabs
1413
pins the details left of the tabs, unless they hold a child table or no other
1514
tab exists; else one column, Details first.
1615

17-
**2 · The parent's `relatedLists` is the tab list.** Without it nothing changes:
16+
Two object keys re-arrange the standard page; write one only when asked. Print
17+
and `kind: 'full' | 'html' | 'react'` pages read neither; an object extension is
18+
refused both (the defining package declares them).
19+
- `pinOverview: false`: the desktop full page never pins: Details is its first
20+
tab, open by default, fields in up to three columns by width, child table or
21+
not (`true` forces nothing). The side preview, a phone and a narrow page never
22+
pin either way.
23+
- `fieldTabs: [{ key, groups }]`: the named `fieldGroups` leave Details for one
24+
tab per entry, right after it and before the step 2 tabs, in order; readers
25+
cannot move or hide them. The first group's `label` and `icon` title the tab.
26+
Refused: an undeclared group, a group in two tabs, a `relatedList` group, a
27+
repeated `key`, and `fields` (the form-level `FormSchema.fieldTabs`, same
28+
name, lists field names). The entry form is unchanged.
29+
30+
**2 · The parent's `relatedLists` is the tab list.** Without it
1831
every related list is a tab, then `sys_attachment` (with `enable.files`),
1932
`sys_approval_request`, `sys_activity`. Declared, only the named
2033
lists show, in order (unlisted approvals and the stream still follow): "tasks
@@ -33,8 +46,8 @@ slots it names (`header`, `actions`, `alerts`, `highlights`, `details`,
3346
`discussion`), each whole. No `tabs` slot: `slots.tabs`, `slots.related` and `slots.relatedLists` are
3447
refused by name. `isDefault: true` makes it the object's default record page.
3548

36-
**4 · `kind: 'full'` is the escape hatch, on the desktop full page.** A page
37-
that looks nothing like the default (a chart tab, a bespoke strip) is `kind: 'full'`: `regions` drawn as authored ([Pages](./pages.md)).
49+
**4 · `kind: 'full'` is the escape hatch, on the desktop full page.** For a page
50+
that looks nothing like the default (a chart tab, a bespoke strip): `regions` drawn as authored ([Pages](./pages.md)).
3851
A phone and the drawer draw the standard page (steps 1–3); no key keeps a full page
3952
there, only a page named in the URL (a print page) draws everywhere. The standard page
4053
draws no `record_section` action: one that must show there also lists `record_page`.
@@ -57,8 +70,12 @@ import { ObjectSchema } from '@objectstack/spec/data';
5770

5871
export const Quote = ObjectSchema.create({
5972
name: 'quote', sharingModel: 'private',
60-
fields: { name: { type: 'text' }, amount: { type: 'currency' } },
61-
fieldGroups: [{ key: 'basic', label: 'Basic', fields: ['amount', 'name'] }],
73+
fields: { name: { type: 'text' }, amount: { type: 'currency' }, terms: { type: 'textarea' } },
74+
fieldGroups: [
75+
{ key: 'basic', label: 'Basic', fields: ['amount', 'name'] },
76+
{ key: 'terms', label: 'Terms', fields: ['terms'] },
77+
],
78+
pinOverview: false, fieldTabs: [{ key: 'terms', groups: ['terms'] }], // each only when asked
6279
relatedLists: [{ list: 'quote_line', label: 'Lines', columns: ['product'] }, 'sys_activity'],
6380
});
6481
```

0 commit comments

Comments
 (0)