From b36d92b92ae072ed94793cb0c7f19fa936539620 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 11:56:13 +0000 Subject: [PATCH 1/7] docs(skills): the checked action examples no longer name a location Seven checked examples (six os:check TypeScript blocks and the served Actions JSON fence) drop their `locations` key, so each one compiles against the action location vocabulary on main and against the one that replaces it. No prose, table or teaching changes, and no new word is taught. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- skills/objectstack-ai/SKILL.md | 1 - skills/objectstack-ui/SKILL.md | 2 +- skills/objectstack-ui/rules/actions.md | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/skills/objectstack-ai/SKILL.md b/skills/objectstack-ai/SKILL.md index 881fcef3a6a..e0ef1835abe 100644 --- a/skills/objectstack-ai/SKILL.md +++ b/skills/objectstack-ai/SKILL.md @@ -186,7 +186,6 @@ export default defineAction({ label: 'Ask AI', objectName: 'contract', type: 'ask_ai', - locations: ['record_header'], }); ``` diff --git a/skills/objectstack-ui/SKILL.md b/skills/objectstack-ui/SKILL.md index 2c9d8a83e8a..2c14f9ea962 100644 --- a/skills/objectstack-ui/SKILL.md +++ b/skills/objectstack-ui/SKILL.md @@ -133,7 +133,7 @@ reports success and changes nothing. Call the API, with the option `value`, never its label ([Actions](./rules/actions.md)): ```json -{ "name": "mark_done", "label": "Mark as done", "objectName": "task", "locations": ["record_header"], +{ "name": "mark_done", "label": "Mark as done", "objectName": "task", "type": "script", "body": { "language": "js", "capabilities": ["api.write"], "source": "await ctx.api.object('task').update({ id: ctx.recordId, status: 'done' });" } } ``` diff --git a/skills/objectstack-ui/rules/actions.md b/skills/objectstack-ui/rules/actions.md index 182d6f87868..03c49d94aed 100644 --- a/skills/objectstack-ui/rules/actions.md +++ b/skills/objectstack-ui/rules/actions.md @@ -66,7 +66,6 @@ export const ReassignLeadAction = defineAction({ objectName: 'lead', type: 'api', target: 'lead', - locations: ['record_header', 'list_item'], disabled: P`record.status == "converted"`, disabledReason: 'A converted lead is reassigned from its opportunity.', params: [{ field: 'owner_id', required: true }], @@ -93,7 +92,6 @@ export const ConvertLeadAction = defineAction({ icon: 'arrow-right-circle', type: 'flow', target: 'crm_lead_conversion', - locations: ['record_header', 'list_item'], visible: P`record.status == "qualified" && record.is_converted == false`, confirmText: 'Convert this lead?', successMessage: 'Lead converted.', @@ -177,7 +175,6 @@ export const PrintA3Action = defineAction({ type: 'url', target: '/print/a3?id=${ctx.recordId}', // interpolated at click openIn: 'new-tab', - locations: ['record_header'], }); ``` @@ -202,7 +199,6 @@ export const OpenInvoicePdfAction = defineAction({ target: 'crm_open_invoice_pdf', opensInNewTab: true, newTabUrl: '/api/v1/invoice/{recordId}/pdf', - locations: ['record_header'], }); ``` @@ -236,7 +232,6 @@ export const AddInvoiceLineAction = defineAction({ label: 'Add Line', objectName: 'invoice', type: 'script', - locations: ['record_header'], params: [ { field: 'product', objectOverride: 'invoice_line', required: true }, { field: 'quantity', objectOverride: 'invoice_line', required: true }, From 431c3427331a5938994cdbf4dfb1ce448d6d289e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 11:58:58 +0000 Subject: [PATCH 2/7] chore(skills): three token ratchet rows follow their files down The checked action examples lost their `locations` key, so three published skill files are shorter: 6799 to 6791, 2264 to 2256 and 3890 to 3844 tokens. Each row is pinned at its file's measurement. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- scripts/check-skills-token-ratchet.mjs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 7ebfaaec6c6..231662a9a5c 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -443,7 +443,9 @@ export const CEILINGS = new Map([ // Modify All cast no field vote). 27230 -> 27225 bytes; the row follows the measurement down. // 6800 -> 6799 (card #37304): the `supportKb` example's two renamed keys add // two bytes and its comment gives back six; the row follows the measurement down. - ['skills/objectstack-ai/SKILL.md', 6799], // -18 (was 6824), then -5 A2′ (was 6806) + // 6799 -> 6791: the Ask AI example drops its `locations` line (32 bytes), so it compiles + // under both action location vocabularies; the row follows the measurement down. + ['skills/objectstack-ai/SKILL.md', 6791], // -18 (was 6824), then -5 A2′ (was 6806) // -12 (was 6331): the `http.server` decision-table row dropped a trailing // clause that taught `contributes.routes` as a key that "parses but serves // nothing". The key is retired — an authored entry is now REFUSED, carrying @@ -1083,7 +1085,9 @@ export const CEILINGS = new Map([ // (-41 bytes). Net shrink, so no raise: the ceiling follows the file down to the // measurement, 9133 bytes (9113 priced) -> 9107 (9087 priced) -> 2272 tokens. // ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9087 / 4) - ['skills/objectstack-ui/SKILL.md', 2264], // -8 to the measurement (was 2272) + // 2264 -> 2256: the Actions JSON fence drops its `locations` key (32 bytes), so it parses + // under both action location vocabularies; the row follows the measurement down. + ['skills/objectstack-ui/SKILL.md', 2256], // -8 to the measurement (was 2264) // 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision // batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report // template and the v17-canonical shapes block moved VERBATIM into @@ -1652,7 +1656,10 @@ export const CEILINGS = new Map([ // measured remainder only. Same ruling (2026-10-27, tap A): 「A:先削重复,余额按实测提高」 // (ruling record 6513306068, letter B). // ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15559 / 4) - ['skills/objectstack-ui/rules/actions.md', 3890], + // 3890 -> 3844: five checked examples drop their `locations` line (186 bytes), so each + // compiles under both action location vocabularies; the row follows the measurement down. + // ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15373 / 4) + ['skills/objectstack-ui/rules/actions.md', 3844], // 6090 -> 6252 (#19715, card item 4): a 5-line table of contents at the top, // anchors to the file's existing headings, nothing else changed. +162 tokens, // zero headroom to absorb any of it, ceiling +162. Maintainer ruling From 661e8e90a2a9081825c476239120b1b96acfa7f0 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 12:07:37 +0000 Subject: [PATCH 3/7] chore(changeset): a patch note for the skills action examples The published skills package ships the catalog, so the examples that dropped their `locations` key take a patch changeset with both declaration lines. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- .../37895-skills-action-examples-no-location-key.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/37895-skills-action-examples-no-location-key.md diff --git a/.changeset/37895-skills-action-examples-no-location-key.md b/.changeset/37895-skills-action-examples-no-location-key.md new file mode 100644 index 00000000000..3479159c8dc --- /dev/null +++ b/.changeset/37895-skills-action-examples-no-location-key.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the checked action examples no longer carry a `locations` key + +Clause-②: no +Metadata-protocol: none + +Seven examples drop their `locations` key: the Ask AI example in `skills/objectstack-ai/SKILL.md`, the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md` (Actions), and five `defineAction` examples in `skills/objectstack-ui/rules/actions.md` (`crm_reassign_lead`, `crm_convert_lead`, `crm_print_a3`, `crm_open_invoice_pdf`, `crm_add_invoice_line`). Nothing an author can write changes, and the text around the examples is as it was: an action still draws only where its `locations` or a list view places it, so an action copied from one of these examples needs its `locations` added. Three token ceilings follow their files down to the measurement (6799 to 6791, 2264 to 2256, 3890 to 3844). From d7c3960e9c1581413cc2bbf1a0a5be84129c730f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 12:59:39 +0000 Subject: [PATCH 4/7] chore(changeset): the skills note names the merged ratchet numbers Main lowered the objectstack-ai row to 6795 before this branch merged it, so the note's first pair is 6795 to 6787. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- .changeset/37895-skills-action-examples-no-location-key.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/37895-skills-action-examples-no-location-key.md b/.changeset/37895-skills-action-examples-no-location-key.md index 3479159c8dc..b35a789bda7 100644 --- a/.changeset/37895-skills-action-examples-no-location-key.md +++ b/.changeset/37895-skills-action-examples-no-location-key.md @@ -7,4 +7,4 @@ docs(skills): the checked action examples no longer carry a `locations` key Clause-②: no Metadata-protocol: none -Seven examples drop their `locations` key: the Ask AI example in `skills/objectstack-ai/SKILL.md`, the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md` (Actions), and five `defineAction` examples in `skills/objectstack-ui/rules/actions.md` (`crm_reassign_lead`, `crm_convert_lead`, `crm_print_a3`, `crm_open_invoice_pdf`, `crm_add_invoice_line`). Nothing an author can write changes, and the text around the examples is as it was: an action still draws only where its `locations` or a list view places it, so an action copied from one of these examples needs its `locations` added. Three token ceilings follow their files down to the measurement (6799 to 6791, 2264 to 2256, 3890 to 3844). +Seven examples drop their `locations` key: the Ask AI example in `skills/objectstack-ai/SKILL.md`, the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md` (Actions), and five `defineAction` examples in `skills/objectstack-ui/rules/actions.md` (`crm_reassign_lead`, `crm_convert_lead`, `crm_print_a3`, `crm_open_invoice_pdf`, `crm_add_invoice_line`). Nothing an author can write changes, and the text around the examples is as it was: an action still draws only where its `locations` or a list view places it, so an action copied from one of these examples needs its `locations` added. Three token ceilings follow their files down to the measurement (6795 to 6787, 2264 to 2256, 3890 to 3844). From 78295ae309aac3fd5c88ddd4ab1439037928e7f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 14:40:31 +0000 Subject: [PATCH 5/7] chore(changeset): the skills note counts the six examples that remain Main replaced the Ask AI section, so this branch changes six examples and two token ceilings; the note no longer names the seventh example or the objectstack-ai row. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- .changeset/37895-skills-action-examples-no-location-key.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/37895-skills-action-examples-no-location-key.md b/.changeset/37895-skills-action-examples-no-location-key.md index b35a789bda7..bb7be896b50 100644 --- a/.changeset/37895-skills-action-examples-no-location-key.md +++ b/.changeset/37895-skills-action-examples-no-location-key.md @@ -7,4 +7,4 @@ docs(skills): the checked action examples no longer carry a `locations` key Clause-②: no Metadata-protocol: none -Seven examples drop their `locations` key: the Ask AI example in `skills/objectstack-ai/SKILL.md`, the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md` (Actions), and five `defineAction` examples in `skills/objectstack-ui/rules/actions.md` (`crm_reassign_lead`, `crm_convert_lead`, `crm_print_a3`, `crm_open_invoice_pdf`, `crm_add_invoice_line`). Nothing an author can write changes, and the text around the examples is as it was: an action still draws only where its `locations` or a list view places it, so an action copied from one of these examples needs its `locations` added. Three token ceilings follow their files down to the measurement (6795 to 6787, 2264 to 2256, 3890 to 3844). +Six examples drop their `locations` key: the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md` (Actions), and five `defineAction` examples in `skills/objectstack-ui/rules/actions.md` (`crm_reassign_lead`, `crm_convert_lead`, `crm_print_a3`, `crm_open_invoice_pdf`, `crm_add_invoice_line`). Nothing an author can write changes, and the text around the examples is as it was: an action still draws only where its `locations` or a list view places it, so an action copied from one of these examples needs its `locations` added. Two token ceilings follow their files down to the measurement (2264 to 2256, 3890 to 3844). From 27cb6e21d35cde6e11d675a4ad89cb6b023b70e5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 01:59:24 +0000 Subject: [PATCH 6/7] docs(skills): teach the action locations that say what an action acts on The location table in the actions rule lists list, record, record_page, record_row, record_related and record_section, with one line naming what replaced the four page-part words. Six examples declare a placement again, and five eval cases expect the new words. Three token rows move to their measurements. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- .../37895-skills-action-locations-acted-on.md | 16 ++++++++++ scripts/check-skills-token-ratchet.mjs | 32 +++++++++++++++++-- skills/objectstack-formula/SKILL.md | 2 +- skills/objectstack-ui/SKILL.md | 4 +-- skills/objectstack-ui/evals/record-page.json | 2 +- .../evals/views-apps-actions-pages.json | 12 +++---- skills/objectstack-ui/rules/actions.md | 26 +++++++++------ skills/objectstack-ui/rules/record-page.md | 2 +- 8 files changed, 72 insertions(+), 24 deletions(-) create mode 100644 .changeset/37895-skills-action-locations-acted-on.md diff --git a/.changeset/37895-skills-action-locations-acted-on.md b/.changeset/37895-skills-action-locations-acted-on.md new file mode 100644 index 00000000000..d5904d6c743 --- /dev/null +++ b/.changeset/37895-skills-action-locations-acted-on.md @@ -0,0 +1,16 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the published skills teach the action `locations` words of protocol 19 + +Clause-②: no +Metadata-protocol: none + +`skills/objectstack-ui/rules/actions.md`: the location table lists `list` (acts on no record: the list page toolbar), `record` (acts on one record, on the record page and on each list row; the default), `record_page` (the record page only), `record_row` (each list row only), `record_related` and `record_section`. One line under it names what replaced `list_toolbar`, `list_item`, `record_header` and `record_more`. The `actionLayout` paragraph says the `record` arm takes `record` / `record_page` actions and the `list` arm takes `list` actions. + +The six examples that had dropped their `locations` key declare a placement again: `"locations": ["record"]` on the "Mark as done" JSON in `skills/objectstack-ui/SKILL.md`; `['record']` on `crm_reassign_lead`, `crm_convert_lead`, `crm_open_invoice_pdf` and `crm_add_invoice_line`; and `['record_page']` on `crm_print_a3`. This replaces the earlier note in this release, which said that an action copied from one of them needs its `locations` added. + +`skills/objectstack-ui/rules/record-page.md` and `skills/objectstack-formula/SKILL.md` each change one sentence to the new words, and five eval cases under `skills/objectstack-ui/evals/` expect them. Nothing an author can write changes: these are the words `@objectstack/spec` 19 already accepts. + +Token ceilings: `skills/objectstack-ui/rules/actions.md` 3844 to 3918, after one restating sentence was cut from it; `skills/objectstack-ui/SKILL.md` 2256 to 2253; `skills/objectstack-formula/SKILL.md` 6090 to 6088. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index 7e3ec5b2384..de409c18f4c 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -813,7 +813,10 @@ export const CEILINGS = new Map([ // 6090; the ceiling moves +82, the measured remainder only. Pinned AT the // measurement. // ceil(($(wc -c < skills/objectstack-formula/SKILL.md) - 20) / 4) == ceil(24357 / 4) - ['skills/objectstack-formula/SKILL.md', 6090], // -53 (was 6055), then -5 A2′ (was 6002), then +11 (was 5997), then +82 (was 6008) + // 6090 -> 6088: the action `visible` / `disabled` paragraph says "a list row" where it wrote + // the retired action location word `list_item` (-7 bytes); the row follows the measurement + // down, 24384 bytes (24357 priced) -> 24377 (24350 priced) -> 6088 tokens. + ['skills/objectstack-formula/SKILL.md', 6088], // -53 (was 6055), then -5 A2′ (was 6002), then +11 (was 5997), then +82 (was 6008), then -2 (was 6090) ['skills/objectstack-i18n/SKILL.md', 6333], // -11 (was 6349), then -5 A2′ (was 6338) // 12705 -> 12984 (2026-08-31 app-repo-principles raise, see the block above). // The largest of the five and the frame the other four are read under: what an @@ -1125,7 +1128,14 @@ export const CEILINGS = new Map([ // ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9087 / 4) // 2264 -> 2256: the Actions JSON fence drops its `locations` key (32 bytes), so it parses // under both action location vocabularies; the row follows the measurement down. - ['skills/objectstack-ui/SKILL.md', 2256], // -8 to the measurement (was 2264) + // 2256 -> 2253: the Actions JSON fence declares its placement again, in the protocol-19 word + // (`"locations": ["record"],`, +25 bytes; it had dropped the key so that it parsed under + // both vocabularies). PAID DOWN FIRST by one restatement cut from this file: " over an + // image, avatar or file field" beside `gallery` in the List Views kind list (-36 bytes), + // which the paragraph right below it says as the fields `gallery.coverField` takes. Net + // shrink, so no raise: the ceiling follows the file down to the measurement, 9050 bytes + // (9023 priced) -> 9039 (9012 priced) -> 2253 tokens. + ['skills/objectstack-ui/SKILL.md', 2253], // -3 to the measurement (was 2256) // 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision // batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report // template and the v17-canonical shapes block moved VERBATIM into @@ -1697,7 +1707,23 @@ export const CEILINGS = new Map([ // 3890 -> 3844: five checked examples drop their `locations` line (186 bytes), so each // compiles under both action location vocabularies; the row follows the measurement down. // ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15373 / 4) - ['skills/objectstack-ui/rules/actions.md', 3844], + // 3844 -> 3918: the file teaches the protocol-19 action location vocabulary, which says what + // an action acts on (`list`, `record`, and the narrow words `record_page`, `record_row`, + // `record_related`, `record_section`). The location table's four page-part rows become four + // rows in those words, one line under the table names what replaced each old word, the + // `actionLayout` paragraph and the `defaultFromRow` sentence name the new words, and the five + // checked examples declare a placement again (130 bytes; the 3890 -> 3844 note above is the + // 186 they dropped). PAID DOWN FIRST by 62 bytes of restatement in this file: the opening + // "Actions are user-triggered operations on an object or a view." (the paragraph under it + // says how `objectName` binds an action to an object and how a view names one). Nothing else + // in the file restates another passage, so the same ruling's second half carries the rest. + // Arithmetic: the text adds 359 bytes, the cut removes 62, so the file is 15373 -> 15670 + // bytes -> 3918 tokens, headroom 0 before, ceiling +74, the measured remainder only, pinned + // AT the measurement (28 above the 3890 the row held before the examples dropped their key). + // Same ruling (2026-10-27, tap A): 「A:先削重复,余额按实测提高」 (ruling record 6513306068, + // letter B). + // ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15670 / 4) + ['skills/objectstack-ui/rules/actions.md', 3918], // 6090 -> 6252 (#19715, card item 4): a 5-line table of contents at the top, // anchors to the file's existing headings, nothing else changed. +162 tokens, // zero headroom to absorb any of it, ceiling +162. Maintainer ruling diff --git a/skills/objectstack-formula/SKILL.md b/skills/objectstack-formula/SKILL.md index 1f706598487..177c1938bdf 100644 --- a/skills/objectstack-formula/SKILL.md +++ b/skills/objectstack-formula/SKILL.md @@ -136,7 +136,7 @@ does not satisfy that gate. `has()` over an **undeclared** key stays legal: that is its use there — telling "absent from this PATCH" apart from "explicitly null". **The exception: action `visible` / `disabled` are client-side and sparse.** -They bind the row the client already holds, and that row — a `list_item` row +They bind the row the client already holds, and that row — a list row above all — lacks a key when the column is outside the view's projection, when field-level security refuses it, or when it was never written (the mongo and memory drivers). diff --git a/skills/objectstack-ui/SKILL.md b/skills/objectstack-ui/SKILL.md index 0d5881b25c4..06535561ba4 100644 --- a/skills/objectstack-ui/SKILL.md +++ b/skills/objectstack-ui/SKILL.md @@ -87,7 +87,7 @@ Two more: [List Views](#list-views), [Actions](#actions). ### List Views A list view's `type`: `grid` (the default table), `kanban` (a board by status), -`gallery` (cards over an image, avatar or file field), `calendar`, `timeline` +`gallery` (cards), `calendar`, `timeline` (a chronological stream), `gantt` (start/end bars with dependencies), `map` (`location` fields), `chart` (an aggregate over the object), `tree` (a self-referencing hierarchy). @@ -133,7 +133,7 @@ reports success and changes nothing. Call the API, with the option `value`, never its label ([Actions](./rules/actions.md)): ```json -{ "name": "mark_done", "label": "Mark as done", "objectName": "task", +{ "name": "mark_done", "label": "Mark as done", "objectName": "task", "locations": ["record"], "type": "script", "body": { "language": "js", "capabilities": ["api.write"], "source": "await ctx.api.object('task').update({ id: ctx.recordId, status: 'done' });" } } ``` diff --git a/skills/objectstack-ui/evals/record-page.json b/skills/objectstack-ui/evals/record-page.json index aa8d25982c7..d6dc3e37404 100644 --- a/skills/objectstack-ui/evals/record-page.json +++ b/skills/objectstack-ui/evals/record-page.json @@ -45,7 +45,7 @@ { "id": 3, "prompt": "Our account record page is a custom `kind: 'full'` page with its own tab strip. Installed packages keep adding header actions to `account` (an 'Open in billing' link, for one), and none of them ever shows in the page header. Make the header show every action placed on the account's header, including ones a package adds later, without us listing ids. None of the project's files are in this directory: write the change in your answer.", - "expected_output": "Keep the `kind: 'full'` page and its tab strip, and set `placedActions: true` on its `page:header` node: `{ type: 'page:header', properties: { placedActions: true } }`. The header then draws every action of `account` whose `locations` include `record_header` or `record_more`, read live, so a package's action appears without a page edit. No `actions` id list beside it: an authored list is the whole set, and `placedActions: true` beside one is refused. Not a return to a `slotted` page and never a `slots.tabs`.", + "expected_output": "Keep the `kind: 'full'` page and its tab strip, and set `placedActions: true` on its `page:header` node: `{ type: 'page:header', properties: { placedActions: true } }`. The header then draws every action of `account` whose `locations` include `record` or `record_page`, read live, so a package's action appears without a page edit. No `actions` id list beside it: an authored list is the whole set, and `placedActions: true` beside one is refused. Not a return to a `slotted` page and never a `slots.tabs`.", "files": [], "assertions": { "must_contain": [ diff --git a/skills/objectstack-ui/evals/views-apps-actions-pages.json b/skills/objectstack-ui/evals/views-apps-actions-pages.json index 160d7d4ca97..8172c250de2 100644 --- a/skills/objectstack-ui/evals/views-apps-actions-pages.json +++ b/skills/objectstack-ui/evals/views-apps-actions-pages.json @@ -24,10 +24,10 @@ { "id": 3, "prompt": "Add a Convert action on `lead` — only for qualified, not-yet-converted leads, from the record header and each list row, launching the `crm_lead_conversion` flow — and a bulk 'Add to campaign' that asks which campaign, for the selected rows.", - "expected_output": "Two `defineAction` items. Convert: `type: 'flow'`, `target: 'crm_lead_conversion'`, `locations: ['record_header', 'list_item']`, `visible: P`record.status == \"qualified\" && record.is_converted == false`` (bare CEL, never brace-wrapped), `confirmText`, `successMessage`, `refreshAfter: true`. Bulk: `type: 'script'`, `execution: 'perRecord'`, wired by the lead list view's `bulkActions: ['']`, a field-backed `params: [{ field: 'campaign_id', objectOverride: 'campaign', required: true }]`, and a `body` that runs once per ticked row and reads that row's id as `ctx.recordId`.", + "expected_output": "Two `defineAction` items. Convert: `type: 'flow'`, `target: 'crm_lead_conversion'`, `locations: ['record']`, `visible: P`record.status == \"qualified\" && record.is_converted == false`` (bare CEL, never brace-wrapped), `confirmText`, `successMessage`, `refreshAfter: true`. Bulk: `type: 'script'`, `execution: 'perRecord'`, wired by the lead list view's `bulkActions: ['']`, a field-backed `params: [{ field: 'campaign_id', objectOverride: 'campaign', required: true }]`, and a `body` that runs once per ticked row and reads that row's id as `ctx.recordId`.", "files": [], "assertions": { - "must_contain": ["defineAction", "locations", "record_header", "bulkActions", "visible", "successMessage", "ctx.recordId"], + "must_contain": ["defineAction", "locations", "'record'", "bulkActions", "visible", "successMessage", "ctx.recordId"], "must_not_contain": ["{record.", "input.selectedIds"] } }, @@ -134,7 +134,7 @@ { "id": 14, "prompt": "Add a 'Mark as done' button on `task` records that sets `status` to Done (the option is labelled Done, its value is `done`).", - "expected_output": "A `defineAction`, not a view: `name`, `label: 'Mark as done'`, `objectName: 'task'`, `locations: ['record_header']`, `type: 'script'`, `body: { language: 'js', source: \"await ctx.api.object('task').update({ id: ctx.recordId, status: 'done' });\", capabilities: ['api.write'] }`, `refreshAfter: true`. The body CALLS the update with the option value: a body that returns `{ status: 'done' }` or assigns to `ctx.record` writes nothing, an `expression` body cannot write, and without `api.write` the sandbox refuses the call.", + "expected_output": "A `defineAction`, not a view: `name`, `label: 'Mark as done'`, `objectName: 'task'`, `locations: ['record']`, `type: 'script'`, `body: { language: 'js', source: \"await ctx.api.object('task').update({ id: ctx.recordId, status: 'done' });\", capabilities: ['api.write'] }`, `refreshAfter: true`. The body CALLS the update with the option value: a body that returns `{ status: 'done' }` or assigns to `ctx.record` writes nothing, an `expression` body cannot write, and without `api.write` the sandbox refuses the call.", "files": [], "assertions": { "must_contain": ["defineAction", "objectName: 'task'", "ctx.api.object('task').update", "ctx.recordId", "api.write", "status: 'done'"], @@ -233,8 +233,8 @@ }, { "id": 24, - "prompt": "`crm_opportunity` has five record actions, all placed at `record_header`: `mark_won`, `mark_lost`, `clone`, `share`, `archive`. The team wants Mark Won, Mark Lost, Clone and Share as header buttons in that order, Archive under More, and on the list page Export as a button after the `mass_assign` toolbar action. Write the metadata that does this.", - "expected_output": "One key on the object, no page file and no edit to any action: `actionLayout: { record: { pinned: ['mark_won', 'mark_lost', 'clone'], more: ['share', 'archive'] }, list: { pinned: ['mass_assign', '$export'] } }`. The answer says an arm pins at most three buttons, so the fourth requested button, Share, leads `more` instead (a fourth name in `pinned` is refused). The `record` arm holds for the record page, the side preview and the phone action bar alike. `$export` is the list page's built-in, named only in the `list` arm's `pinned`; `mass_assign` must be placed at `list_toolbar` or `os validate` refuses the name. Not four names in `pinned`, not an `order` renumbering on each action (shared by every surface, and it names no buttons), not `$export` in `more`, and not a `definePage` header listing action ids.", + "prompt": "`crm_opportunity` has five record actions, all placed at `record_page`: `mark_won`, `mark_lost`, `clone`, `share`, `archive`. The team wants Mark Won, Mark Lost, Clone and Share as header buttons in that order, Archive under More, and on the list page Export as a button after the `mass_assign` toolbar action. Write the metadata that does this.", + "expected_output": "One key on the object, no page file and no edit to any action: `actionLayout: { record: { pinned: ['mark_won', 'mark_lost', 'clone'], more: ['share', 'archive'] }, list: { pinned: ['mass_assign', '$export'] } }`. The answer says an arm pins at most three buttons, so the fourth requested button, Share, leads `more` instead (a fourth name in `pinned` is refused). The `record` arm holds for the record page, the side preview and the phone action bar alike. `$export` is the list page's built-in, named only in the `list` arm's `pinned`; `mass_assign` must be placed at `list` or `os validate` refuses the name. Not four names in `pinned`, not an `order` renumbering on each action (shared by every surface, and it names no buttons), not `$export` in `more`, and not a `definePage` header listing action ids.", "files": [], "assertions": { "must_contain": ["actionLayout", "pinned", "more", "$export"], @@ -254,7 +254,7 @@ { "id": 26, "prompt": "Add a 'Delete Task' button on the `project_task` record page that deletes the task. Our in-app assistant must be able to run it too, but only after the user agrees, since a deleted task's time entries go with it.", - "expected_output": "One registered `defineAction` on `objectName: 'project_task'` with a placement (`locations: ['record_header']`), a body that deletes the current record (a `type: 'script'` `js` body calling `ctx.api.object('project_task').delete(...)` on `ctx.recordId`, with `capabilities: ['api.write']`), `confirmText` for the person clicking, and `ai: { exposed: true, description: '…', requiresConfirmation: true }`. `confirmText` is the click dialog's copy only and gates no AI call, so the assistant's run is held for the user's approval by `ai.requiresConfirmation: true`, not by `confirmText` or by a sentence in `ai.description` asking the model to confirm first.", + "expected_output": "One registered `defineAction` on `objectName: 'project_task'` with a placement (`locations: ['record_page']`), a body that deletes the current record (a `type: 'script'` `js` body calling `ctx.api.object('project_task').delete(...)` on `ctx.recordId`, with `capabilities: ['api.write']`), `confirmText` for the person clicking, and `ai: { exposed: true, description: '…', requiresConfirmation: true }`. `confirmText` is the click dialog's copy only and gates no AI call, so the assistant's run is held for the user's approval by `ai.requiresConfirmation: true`, not by `confirmText` or by a sentence in `ai.description` asking the model to confirm first.", "files": [], "assertions": { "must_contain": ["requiresConfirmation: true", "exposed: true", "confirmText", "project_task"], diff --git a/skills/objectstack-ui/rules/actions.md b/skills/objectstack-ui/rules/actions.md index 83548250d5f..629bd519616 100644 --- a/skills/objectstack-ui/rules/actions.md +++ b/skills/objectstack-ui/rules/actions.md @@ -1,6 +1,5 @@ # Actions -Actions are user-triggered operations on an object or a view. Register them under `defineStack({ actions: [...] })`; the six types: [Action Types](../SKILL.md#action-types). @@ -17,23 +16,25 @@ in `language: 'js'` (an `expression` body has no I/O) with ## Where Actions Appear (`locations`) -| Value | Surface | +| Value | Acts on, and where | |:-----------------|:--------| -| `record_header` | Detail page header | -| `record_more` | Detail page overflow menu (⋯) | +| `list` | No record: the list page toolbar; one ticked row is its `recordId`, several are refused (no `_selectedIds`) | +| `record` | One record, the default: the record page and each list row | +| `record_page` | The record page only; `component: 'action:menu'` puts it in the ⋯ menu | +| `record_row` | Each list row only | | `record_related` | Related-list section in a record | | `record_section` | Body section/tab of a record | -| `list_item` | Per-row action in list views | -| `list_toolbar` | Toolbar button; one ticked row is its `recordId`, several are refused (no `_selectedIds`) | + +Until protocol 19: `list_toolbar` (now `list`), `list_item` (`record_row`), `record_header` / `record_more` (`record_page`). ## Button Order (`actionLayout`) The object's `actionLayout` arranges one scope per arm: `{ record: { pinned: ['crm_convert_lead'], more: ['crm_print_a3'] } }`. `pinned` (required; `[]` pins none) names at most 3 buttons, in order; every other action -goes to the ⋯ menu, those `more` names first. `record` takes `record_header` / -`record_more` actions wherever that header draws (record page, side preview, -phone bar, a row's ⋮ menu order); `list` takes `list_toolbar` actions and may +goes to the ⋯ menu, those `more` names first. `record` takes `record` / +`record_page` actions wherever that header draws (record page, side preview, +phone bar, a row's ⋮ menu order); `list` takes `list` actions and may pin `$import` / `$export` (pinned only). `os validate` refuses a name the arm's scope does not place, on the object or an extension of one the same stack defines. On an installed object only its paired `.custom` package's extension @@ -65,6 +66,7 @@ export const ReassignLeadAction = defineAction({ name: 'crm_reassign_lead', label: 'Reassign Lead', objectName: 'lead', + locations: ['record'], type: 'api', target: 'lead', disabled: P`record.status == "converted"`, @@ -90,6 +92,7 @@ export const ConvertLeadAction = defineAction({ name: 'crm_convert_lead', label: 'Convert Lead', objectName: 'lead', + locations: ['record'], icon: 'arrow-right-circle', type: 'flow', target: 'crm_lead_conversion', @@ -173,6 +176,7 @@ export const PrintA3Action = defineAction({ name: 'crm_print_a3', label: 'Print A3', objectName: 'lead', + locations: ['record_page'], type: 'url', target: '/print/a3?id=${ctx.recordId}', // interpolated at click openIn: 'new-tab', @@ -196,6 +200,7 @@ export const OpenInvoicePdfAction = defineAction({ name: 'crm_open_invoice_pdf', label: 'Open PDF', objectName: 'invoice', + locations: ['record'], type: 'script', target: 'crm_open_invoice_pdf', opensInNewTab: true, @@ -216,7 +221,7 @@ placeholder and widget come from the object metadata (`widget` only while the param keeps or restates the field's `type`; a param that overrides `type` names its own `widget`); `objectOverride` borrows a field of another object, and `defaultFromRow: true` -pre-fills from the selected row in `list_item`. +pre-fills from the list row it runs on (`record` / `record_row`). **An action that adds a child line sets its price.** `lookupAutofill` fills only the form and the grid, and a stored `expression` reads only its own row, so a @@ -232,6 +237,7 @@ export const AddInvoiceLineAction = defineAction({ name: 'crm_add_invoice_line', label: 'Add Line', objectName: 'invoice', + locations: ['record'], type: 'script', params: [ { field: 'product', objectOverride: 'invoice_line', required: true }, diff --git a/skills/objectstack-ui/rules/record-page.md b/skills/objectstack-ui/rules/record-page.md index 38d66eeafd8..ec48c879944 100644 --- a/skills/objectstack-ui/rules/record-page.md +++ b/skills/objectstack-ui/rules/record-page.md @@ -37,7 +37,7 @@ refused by name. `isDefault: true` makes it the object's default record page. that looks nothing like the default (a chart tab, a bespoke strip) is `kind: 'full'`: `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_more`. +draws no `record_section` action: one that must show there also lists `record_page`. **5 · On an object's list the name opens the page, its hover icon the drawer.** `navigation.mode` is deprecated there: `drawer`, `page`, `new_window` change From a7aee8ef0e6dd277ad8a9f56841e431178c9775d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 02:43:46 +0000 Subject: [PATCH 7/7] docs(skills): the List Views kind list keeps its gallery phrase The phrase beside gallery goes back as it was, and the token row of the UI skill moves to its measurement with no cut. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --- .../37895-skills-action-locations-acted-on.md | 2 +- scripts/check-skills-token-ratchet.mjs | 17 ++++++++++------- skills/objectstack-ui/SKILL.md | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.changeset/37895-skills-action-locations-acted-on.md b/.changeset/37895-skills-action-locations-acted-on.md index d5904d6c743..4e2232cbbc0 100644 --- a/.changeset/37895-skills-action-locations-acted-on.md +++ b/.changeset/37895-skills-action-locations-acted-on.md @@ -13,4 +13,4 @@ The six examples that had dropped their `locations` key declare a placement agai `skills/objectstack-ui/rules/record-page.md` and `skills/objectstack-formula/SKILL.md` each change one sentence to the new words, and five eval cases under `skills/objectstack-ui/evals/` expect them. Nothing an author can write changes: these are the words `@objectstack/spec` 19 already accepts. -Token ceilings: `skills/objectstack-ui/rules/actions.md` 3844 to 3918, after one restating sentence was cut from it; `skills/objectstack-ui/SKILL.md` 2256 to 2253; `skills/objectstack-formula/SKILL.md` 6090 to 6088. +Token ceilings: `skills/objectstack-ui/rules/actions.md` 3844 to 3918, after one restating sentence was cut from it; `skills/objectstack-ui/SKILL.md` 2256 to 2262; `skills/objectstack-formula/SKILL.md` 6090 to 6088. diff --git a/scripts/check-skills-token-ratchet.mjs b/scripts/check-skills-token-ratchet.mjs index de409c18f4c..d884ac1ef5c 100644 --- a/scripts/check-skills-token-ratchet.mjs +++ b/scripts/check-skills-token-ratchet.mjs @@ -1128,14 +1128,17 @@ export const CEILINGS = new Map([ // ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9087 / 4) // 2264 -> 2256: the Actions JSON fence drops its `locations` key (32 bytes), so it parses // under both action location vocabularies; the row follows the measurement down. - // 2256 -> 2253: the Actions JSON fence declares its placement again, in the protocol-19 word + // 2256 -> 2262: the Actions JSON fence declares its placement again, in the protocol-19 word // (`"locations": ["record"],`, +25 bytes; it had dropped the key so that it parsed under - // both vocabularies). PAID DOWN FIRST by one restatement cut from this file: " over an - // image, avatar or file field" beside `gallery` in the List Views kind list (-36 bytes), - // which the paragraph right below it says as the fields `gallery.coverField` takes. Net - // shrink, so no raise: the ceiling follows the file down to the measurement, 9050 bytes - // (9023 priced) -> 9039 (9012 priced) -> 2253 tokens. - ['skills/objectstack-ui/SKILL.md', 2253], // -3 to the measurement (was 2256) + // both vocabularies, the 2264 -> 2256 note above). No cut pays for it: the one passage + // weighed as restatement, " over an image, avatar or file field" beside `gallery` in the + // List Views kind list, was ruled teaching by the seat's review of the PR and stays, and + // nothing else in the file restates another passage. So the ruling's second half carries the + // delta: 9050 bytes (9023 priced) -> 9075 (9048 priced) -> 2262 tokens, headroom 0 before, + // ceiling +6, the measured remainder only, pinned AT the measurement (2 under the 2264 the + // row held before the fence dropped its key). Standing ruling (2026-10-27, tap A): + // 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). + ['skills/objectstack-ui/SKILL.md', 2262], // +6 to the measurement (was 2256) // 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision // batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report // template and the v17-canonical shapes block moved VERBATIM into diff --git a/skills/objectstack-ui/SKILL.md b/skills/objectstack-ui/SKILL.md index 06535561ba4..f71a97fb091 100644 --- a/skills/objectstack-ui/SKILL.md +++ b/skills/objectstack-ui/SKILL.md @@ -87,7 +87,7 @@ Two more: [List Views](#list-views), [Actions](#actions). ### List Views A list view's `type`: `grid` (the default table), `kanban` (a board by status), -`gallery` (cards), `calendar`, `timeline` +`gallery` (cards over an image, avatar or file field), `calendar`, `timeline` (a chronological stream), `gantt` (start/end bars with dependencies), `map` (`location` fields), `chart` (an aggregate over the object), `tree` (a self-referencing hierarchy).