From b85b091debcf8e2aa715084900783eb1ffa81fda Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 00:59:20 +0000 Subject: [PATCH 1/3] docs(skills): record-page rule teaches pinOverview and object-level fieldTabs The objectstack-ui record-page rule said layout follows the surface's width, never a key. Two object keys now re-arrange the standard record page: pinOverview and fieldTabs. Step 1 teaches both, the example declares both, and the eval set gains one case per key. Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude --- .changeset/38680-record-page-skill-keys.md | 10 ++++++ skills/objectstack-ui/evals/record-page.json | 38 ++++++++++++++++++++ skills/objectstack-ui/rules/record-page.md | 25 +++++++++++-- 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 .changeset/38680-record-page-skill-keys.md diff --git a/.changeset/38680-record-page-skill-keys.md b/.changeset/38680-record-page-skill-keys.md new file mode 100644 index 00000000000..fa8d33cfeea --- /dev/null +++ b/.changeset/38680-record-page-skill-keys.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the objectstack-ui record-page rule teaches `pinOverview` and the object-level `fieldTabs` + +Clause-②: no +Metadata-protocol: none + +`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. diff --git a/skills/objectstack-ui/evals/record-page.json b/skills/objectstack-ui/evals/record-page.json index d6dc3e37404..0be9acaa573 100644 --- a/skills/objectstack-ui/evals/record-page.json +++ b/skills/objectstack-ui/evals/record-page.json @@ -114,6 +114,44 @@ "relatedLists: ['quote_line'" ] } + }, + { + "id": 7, + "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.", + "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 `kind: 'full'` or slotted page, and no `relatedLists` change.", + "files": [], + "assertions": { + "must_contain": [ + "pinOverview: false" + ], + "must_not_contain": [ + "pinOverview: true", + "definePage(", + "kind: 'full'", + "kind: 'slotted'", + "slots: { tabs" + ] + } + }, + { + "id": 8, + "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'] }]`.", + "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 `kind: 'full'` page, no form view sections.", + "files": [], + "assertions": { + "must_contain": [ + "fieldTabs", + "groups: ['content', 'import']" + ], + "must_not_contain": [ + "fieldTabs: [{ label", + "label: 'Content', groups", + "definePage(", + "kind: 'full'", + "slots: { tabs", + "sections:" + ] + } } ] } diff --git a/skills/objectstack-ui/rules/record-page.md b/skills/objectstack-ui/rules/record-page.md index ec48c879944..31954023c8a 100644 --- a/skills/objectstack-ui/rules/record-page.md +++ b/skills/objectstack-ui/rules/record-page.md @@ -10,10 +10,25 @@ no stage bar or key-field strip (`highlightFields` feeds hover cards, pickers an related-list columns). `fieldGroups` are the Details sections in array order, each listing its members in `fields` (absent: the fields whose `group` names it); `editMode` (`'modal'` | `'page'`) is how Edit opens. Layout follows the surface's -width, never a key: a full page fitting 320 px of details beside 400 px of tabs +width: a full page fitting 320 px of details beside 400 px of tabs pins the details left of the tabs, unless they hold a child table or no other tab exists; else one column, Details first. +Two object keys re-arrange the standard page; write one only when asked, never +a page file. Print and `kind: 'full' | 'html' | 'react'` pages read neither, and +an object extension is refused both with guidance: the defining package declares them. +- `pinOverview: false`: the desktop full page never pins, at any width: Details + is the first tab, open by default, its fields in up to three columns by width, + child table or not. Absent or `true`: derived as above. The side preview and a + phone are unchanged; a page too narrow to pin keeps Details first either way. +- `fieldTabs: [{ key, groups }]`: the named `fieldGroups` leave Details for one + tab per entry, right after it and before the step 2 tabs, in order; the reader + cannot move or hide them. The first group's `label` and `icon` title the tab; + pinned, the first one opens beside Details. Refused: an undeclared group, a + group in two tabs, a `relatedList` group, a repeated `key`, and `fields`: that + is the form-level `FormSchema.fieldTabs` (same name, lists field names). The + entry form is unchanged. + **2 · The parent's `relatedLists` is the tab list.** Without it nothing changes: every related list is a tab, then `sys_attachment` (with `enable.files`), `sys_approval_request`, `sys_activity`. Declared, only the named @@ -57,8 +72,12 @@ import { ObjectSchema } from '@objectstack/spec/data'; export const Quote = ObjectSchema.create({ name: 'quote', sharingModel: 'private', - fields: { name: { type: 'text' }, amount: { type: 'currency' } }, - fieldGroups: [{ key: 'basic', label: 'Basic', fields: ['amount', 'name'] }], + fields: { name: { type: 'text' }, amount: { type: 'currency' }, terms: { type: 'textarea' } }, + fieldGroups: [ + { key: 'basic', label: 'Basic', fields: ['amount', 'name'] }, + { key: 'terms', label: 'Terms', fields: ['terms'] }, + ], + pinOverview: false, fieldTabs: [{ key: 'terms', groups: ['terms'] }], // each only when asked relatedLists: [{ list: 'quote_line', label: 'Lines', columns: ['product'] }, 'sys_activity'], }); ``` From f71d42484234567cf83c9356d1234fa4e5ac0d2f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 01:23:25 +0000 Subject: [PATCH 2/3] docs(skills): tighten the record-page keys teaching, pay down restatement, move the token row The new step 1 paragraph says each key once. Four restating clauses of record-page.md are deleted first (94 bytes). The file's row in the published-skills token ratchet moves 990 -> 1249, the measured remainder, pinned at the measurement, on the standing ruling of record 6513306068. Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude --- .changeset/38680-record-page-skill-keys.md | 1 + scripts/check-skills-token-ratchet.mjs | 16 +++++++++- skills/objectstack-ui/rules/record-page.md | 34 ++++++++++------------ 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.changeset/38680-record-page-skill-keys.md b/.changeset/38680-record-page-skill-keys.md index fa8d33cfeea..57a249b44ec 100644 --- a/.changeset/38680-record-page-skill-keys.md +++ b/.changeset/38680-record-page-skill-keys.md @@ -8,3 +8,4 @@ Clause-②: no Metadata-protocol: none `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. +The file's token ceiling moves from 990 to 1249: four restating clauses of the same file are deleted first, and the row moves by the measured remainder. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index e744a1f17e1..b760dcff1da 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2218,7 +2218,21 @@ export const CEILINGS = new Map([ // labels it (Activity) in place of the Chinese word, and step 5's "(one page at two // widths)" aside — step 1 already says layout follows the surface's width — is gone; the // ceiling follows the file down to the measurement (3961 bytes). - ['skills/objectstack-ui/rules/record-page.md', 990], // -1 to the measurement (was 991) + // 991 -> 990: -1 to the measurement. + // 990 -> 1249 (card #38680): step 1 teaches the two object keys that re-arrange the + // standard record page, `pinOverview` and the object-level `fieldTabs` (what each does on + // the desktop full page, the surfaces that do not read them, the object-extension refusal, + // the four `fieldTabs` parse refusals and the form-level `FormSchema.fieldTabs` it is not), + // and the one checked example declares both. Raise path the standing ruling + // 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID DOWN FIRST, 94 + // bytes: step 1's false clause "never a key" and its "the Console synthesizes it from the + // object alone" (the title and the step's own heading say it), step 2's "nothing changes" + // (the default it introduces follows it), and step 4's second "is `kind: 'full'`" (its + // heading says it). Arithmetic against `main`'s 3959 bytes (headroom 0): the file is + // 3959 -> 4993 bytes, so the row moves +259, the measured remainder only. Pinned AT the + // measurement. + // ceil($(wc -c < skills/objectstack-ui/rules/record-page.md) / 4) == ceil(4993 / 4) + ['skills/objectstack-ui/rules/record-page.md', 1249], // ── 2026-09-22 the #19715 split — decision batch #213 item 1 ───────────── // The maintainer ruled the four over-500-line published SKILL.md files split diff --git a/skills/objectstack-ui/rules/record-page.md b/skills/objectstack-ui/rules/record-page.md index 31954023c8a..462a6034c73 100644 --- a/skills/objectstack-ui/rules/record-page.md +++ b/skills/objectstack-ui/rules/record-page.md @@ -2,9 +2,8 @@ Read in order: each step is the remedy for the one before it; author `*.page.ts` only at step 3 or 4 (ADR-0085). -**1 · The object's declarations produce the page.** With no page assigned, the -Console synthesizes it from the object alone: `nameField` is the -title, `stageField` the status tag beside it whose menu moves the stage (each +**1 · The object's declarations produce the page.** With no page assigned, +`nameField` is the title, `stageField` the status tag beside it whose menu moves the stage (each option declares `kind: 'open' | 'won' | 'lost'`; `false` suppresses it); there is no stage bar or key-field strip (`highlightFields` feeds hover cards, pickers and related-list columns). `fieldGroups` are the Details sections in array order, @@ -15,21 +14,20 @@ pins the details left of the tabs, unless they hold a child table or no other tab exists; else one column, Details first. Two object keys re-arrange the standard page; write one only when asked, never -a page file. Print and `kind: 'full' | 'html' | 'react'` pages read neither, and -an object extension is refused both with guidance: the defining package declares them. -- `pinOverview: false`: the desktop full page never pins, at any width: Details - is the first tab, open by default, its fields in up to three columns by width, - child table or not. Absent or `true`: derived as above. The side preview and a - phone are unchanged; a page too narrow to pin keeps Details first either way. +a page file. Print and `kind: 'full' | 'html' | 'react'` pages read neither; an +object extension is refused both (the defining package declares them). +- `pinOverview: false`: the desktop full page never pins: Details is its first + tab, open by default, fields in up to three columns by width, child table or + not (`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 it and before the step 2 tabs, in order; the reader - cannot move or hide them. The first group's `label` and `icon` title the tab; - pinned, the first one opens beside Details. Refused: an undeclared group, a - group in two tabs, a `relatedList` group, a repeated `key`, and `fields`: that - is the form-level `FormSchema.fieldTabs` (same name, lists field names). The - entry form is unchanged. + tab per entry, right after it and before the step 2 tabs, in order; readers + cannot move or hide them. The first group's `label` and `icon` title the tab. + Refused: an undeclared group, a group in two tabs, a `relatedList` group, a + repeated `key`, and `fields` (the form-level `FormSchema.fieldTabs`, same + name, lists field names). The entry form is unchanged. -**2 · The parent's `relatedLists` is the tab list.** Without it nothing changes: +**2 · The parent's `relatedLists` is the tab list.** Without it every related list is a tab, then `sys_attachment` (with `enable.files`), `sys_approval_request`, `sys_activity`. Declared, only the named lists show, in order (unlisted approvals and the stream still follow): "tasks @@ -48,8 +46,8 @@ slots it names (`header`, `actions`, `alerts`, `highlights`, `details`, `discussion`), each whole. No `tabs` slot: `slots.tabs`, `slots.related` and `slots.relatedLists` are refused by name. `isDefault: true` makes it the object's default record page. -**4 · `kind: 'full'` is the escape hatch, on the desktop full page.** A page -that looks nothing like the default (a chart tab, a bespoke strip) is `kind: 'full'`: `regions` drawn as authored ([Pages](./pages.md)). +**4 · `kind: 'full'` is the escape hatch, on the desktop full page.** For a page +that looks nothing like the default (a chart tab, a bespoke strip): `regions` drawn as authored ([Pages](./pages.md)). A phone and the drawer draw the standard page (steps 1–3); no key keeps a full page there, only a page named in the URL (a print page) draws everywhere. The standard page draws no `record_section` action: one that must show there also lists `record_page`. From bb6a823f13ddb2a132b771731dbae8b4c3791217 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 02:01:51 +0000 Subject: [PATCH 3/3] fix(skills): record-page eval cases 7 and 8 forbid the wrong spelling, not a mention of it A must_not_contain entry is a literal substring match, so the bare kind: 'full' entry failed each case's own reference answer. Both cases now forbid the code spelling, and the reference answers say no full page. The rule drops one repeat of the opening line; its token row follows the measurement down, 1249 -> 1244. The changeset names the deleted clauses as one false and three restating. Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude --- .changeset/38680-record-page-skill-keys.md | 2 +- scripts/check-skills-token-ratchet.mjs | 14 +++++++------- skills/objectstack-ui/evals/record-page.json | 10 +++++----- skills/objectstack-ui/rules/record-page.md | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.changeset/38680-record-page-skill-keys.md b/.changeset/38680-record-page-skill-keys.md index 57a249b44ec..551b09852db 100644 --- a/.changeset/38680-record-page-skill-keys.md +++ b/.changeset/38680-record-page-skill-keys.md @@ -8,4 +8,4 @@ Clause-②: no Metadata-protocol: none `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. -The file's token ceiling moves from 990 to 1249: four restating clauses of the same file are deleted first, and the row moves by the measured remainder. +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. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index b760dcff1da..81999816d62 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -2219,20 +2219,20 @@ export const CEILINGS = new Map([ // widths)" aside — step 1 already says layout follows the surface's width — is gone; the // ceiling follows the file down to the measurement (3961 bytes). // 991 -> 990: -1 to the measurement. - // 990 -> 1249 (card #38680): step 1 teaches the two object keys that re-arrange the + // 990 -> 1244 (card #38680): step 1 teaches the two object keys that re-arrange the // standard record page, `pinOverview` and the object-level `fieldTabs` (what each does on // the desktop full page, the surfaces that do not read them, the object-extension refusal, // the four `fieldTabs` parse refusals and the form-level `FormSchema.fieldTabs` it is not), // and the one checked example declares both. Raise path the standing ruling - // 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID DOWN FIRST, 94 - // bytes: step 1's false clause "never a key" and its "the Console synthesizes it from the - // object alone" (the title and the step's own heading say it), step 2's "nothing changes" + // 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). PAID DOWN FIRST, 81 + // bytes of restatement beside the 13 of step 1's false clause "never a key": step 1's "the + // Console synthesizes it from the object alone" (the title and the step's own heading say it), step 2's "nothing changes" // (the default it introduces follows it), and step 4's second "is `kind: 'full'`" (its // heading says it). Arithmetic against `main`'s 3959 bytes (headroom 0): the file is - // 3959 -> 4993 bytes, so the row moves +259, the measured remainder only. Pinned AT the + // 3959 -> 4974 bytes, so the row moves +254, the measured remainder only. Pinned AT the // measurement. - // ceil($(wc -c < skills/objectstack-ui/rules/record-page.md) / 4) == ceil(4993 / 4) - ['skills/objectstack-ui/rules/record-page.md', 1249], + // ceil($(wc -c < skills/objectstack-ui/rules/record-page.md) / 4) == ceil(4974 / 4) + ['skills/objectstack-ui/rules/record-page.md', 1244], // ── 2026-09-22 the #19715 split — decision batch #213 item 1 ───────────── // The maintainer ruled the four over-500-line published SKILL.md files split diff --git a/skills/objectstack-ui/evals/record-page.json b/skills/objectstack-ui/evals/record-page.json index 0be9acaa573..d9584f211ab 100644 --- a/skills/objectstack-ui/evals/record-page.json +++ b/skills/objectstack-ui/evals/record-page.json @@ -118,7 +118,7 @@ { "id": 7, "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.", - "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 `kind: 'full'` or slotted page, and no `relatedLists` change.", + "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.", "files": [], "assertions": { "must_contain": [ @@ -127,8 +127,8 @@ "must_not_contain": [ "pinOverview: true", "definePage(", - "kind: 'full'", - "kind: 'slotted'", + "kind: 'full',", + "kind: 'slotted',", "slots: { tabs" ] } @@ -136,7 +136,7 @@ { "id": 8, "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'] }]`.", - "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 `kind: 'full'` page, no form view sections.", + "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.", "files": [], "assertions": { "must_contain": [ @@ -147,7 +147,7 @@ "fieldTabs: [{ label", "label: 'Content', groups", "definePage(", - "kind: 'full'", + "kind: 'full',", "slots: { tabs", "sections:" ] diff --git a/skills/objectstack-ui/rules/record-page.md b/skills/objectstack-ui/rules/record-page.md index 462a6034c73..ae3251de236 100644 --- a/skills/objectstack-ui/rules/record-page.md +++ b/skills/objectstack-ui/rules/record-page.md @@ -13,9 +13,9 @@ width: a full page fitting 320 px of details beside 400 px of tabs pins the details left of the tabs, unless they hold a child table or no other tab exists; else one column, Details first. -Two object keys re-arrange the standard page; write one only when asked, never -a page file. Print and `kind: 'full' | 'html' | 'react'` pages read neither; an -object extension is refused both (the defining package declares them). +Two object keys re-arrange the standard page; write one only when asked. Print +and `kind: 'full' | 'html' | 'react'` pages read neither; an object extension is +refused both (the defining package declares them). - `pinOverview: false`: the desktop full page never pins: Details is its first tab, open by default, fields in up to three columns by width, child table or not (`true` forces nothing). The side preview, a phone and a narrow page never