Repository navigation
Commit 8456562
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
- .changeset
- scripts
- skills/objectstack-ui
- evals
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2233 | 2233 | | |
2234 | 2234 | | |
2235 | 2235 | | |
2236 | | - | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
2237 | 2251 | | |
2238 | 2252 | | |
2239 | 2253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
117 | 155 | | |
118 | 156 | | |
119 | 157 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
36 | | - | |
37 | | - | |
| 49 | + | |
| 50 | + | |
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
| |||
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
61 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
62 | 79 | | |
63 | 80 | | |
64 | 81 | | |
0 commit comments