Skip to content

Commit cad3030

Browse files
docs(skills): teach the action locations that say what an action acts on (#38104)
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoEfAeSobHZgSLfHP3844ZfC)_ Fixes #37895 This is PR 2 of 2 on that card. PR 1 was #37947 (merged as `b4921982`); #37929 put the new words on `main` as `58b513a6`. **Ordering: this must land before the next `next` prerelease is cut** (serial note 7227457027 on the card). `main` has refused the four retired location words since `58b513a6`, and the published skills still teach them. A prerelease cut before this lands ships skills that teach words its own save door refuses. Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:写应用的 AI 助手读到的「按钮放在哪里」说明换成了新词,只说按钮作用在列表上还是一条记录上;六个按钮示例重新写明了位置。 - 为什么做:「按钮位置改用新词」这项工作已经合入主线,旧的四个位置词保存时会被拒绝,而技能包还在教旧词。 - 出错会怎样:照技能包写按钮的 AI 助手会写出保存不了、或者哪里都不显示的按钮;本改动只动说明文字和示例,可以直接撤回。 - 要你做什么:在下一个预发布版本切出之前合并本改动(技能包属于要你亲手合并的范围)。 ## What changes The published skills teach the action `locations` vocabulary that `@objectstack/spec` 19 accepts: `list` (acts on no record) and `record` (acts on one record: the record page and each list row), with the narrow words `record_page`, `record_row`, `record_related` and `record_section`. Vocabulary ruling on #36495, verbatim: 「照卡上这套」 (7213827153). | File | Change | |:--|:--| | `skills/objectstack-ui/rules/actions.md` | The location table's four page-part rows become `list`, `record`, `record_page`, `record_row`. One line under the table names what replaced each old word. The `actionLayout` paragraph says the `record` arm takes `record` / `record_page` actions and the `list` arm takes `list` actions, which is what `validateObjectActionLayout` enforces. The `defaultFromRow` sentence names `record` / `record_row`. Five checked examples declare `locations` again. The opening sentence is cut (see the token rows). | | `skills/objectstack-ui/SKILL.md` | The "Mark as done" JSON in Actions declares `"locations": ["record"]`. Nothing else changes: against `main` the file differs by that key alone. | | `skills/objectstack-ui/rules/record-page.md` | A `record_section` action that must show on the standard page also lists `record_page`. | | `skills/objectstack-formula/SKILL.md` | "a list row" in place of the retired word in the sparse-row paragraph. | | `skills/objectstack-ui/evals/views-apps-actions-pages.json` | Cases 3, 14, 24 and 26 expect the new words. Case 3's `must_contain` token is `'record'`. | | `skills/objectstack-ui/evals/record-page.json` | Case 3: `placedActions: true` draws the actions placed at `record` or `record_page`. | | `scripts/check-skills-token-ratchet.mjs` | Three rows move to their measurements (below). | | `.changeset/37895-skills-action-locations-acted-on.md` | `patch` for `@objectstack/skills`. | `skills/objectstack-ai` is not touched: no Ask AI example and no placement is written back there. ### The word each example takes | Example | Before PR 1 | Now | Drawn | |:--|:--|:--|:--| | `crm_reassign_lead` | `record_header`, `list_item` | `record` | as before | | `crm_convert_lead` | `record_header`, `list_item` | `record` | as before | | `crm_print_a3` | `record_header` | `record_page` | as before | | `mark_done` (SKILL.md JSON) | `record_header` | `record` | also on each list row | | `crm_open_invoice_pdf` | `record_header` | `record` | also on each list row | | `crm_add_invoice_line` | `record_header` | `record` | also on each list row | The first three are the lossless conversion (`action-locations-acted-on`). The last three were header-only and now take `record`. This is a judgement, and the alternative is `record_page` on those three lines: - The spec's docblock calls `record` "the word an action that acts on a record writes by default", and the ruled vocabulary treats the other four as exception words. Nothing in these three examples, or in eval case 14's prompt (a "button on `task` records"), limits the action to the record page. - An agent copies the placement it sees. With `record_page` on four of six examples, agent-written apps would use an exception word as the norm. - None of the three carries a `visible` or `disabled` predicate, so the sparse list row adds no risk to them. - `crm_print_a3` keeps `record_page`: N1 asks for its placement back, and it gives the file one checked example of a narrow word in the `record` arm. Eval cases 24 and 26 use `record_page`: case 24 describes existing header actions, and case 26's prompt asks for a button "on the record page". ## Why #37929 retired `list_toolbar`, `list_item`, `record_header` and `record_more` on `main`. The skills are what an agent reads before it writes an action, so an agent following them wrote a word that validate and save refuse. PR 1 had also left six examples with no placement at all, which made the `actionLayout` example beside them an error (N1). ## Acceptance checklist - [x] Card: `git grep -nE "record_header|record_more|list_item|list_toolbar" -- skills/` returns one line, `skills/objectstack-ui/rules/actions.md:28`, the line that names the conversion. - [x] Card: eval expected outputs use the new words; the token rows follow the measurement; the skills checks pass (Tests). - [x] N1 (7218905729): `crm_convert_lead` and `crm_print_a3` are placed in the `record` arm's scope again. A probe that runs `@objectstack/lint`'s two rules over the examples as written reports 2 `object-action-layout-not-placed` on `main` and 0 at this head. - [x] N2 as corrected in 7221834136: six examples declare a placement again, and the eval cases that expected the old words moved with them. Nothing is written back into `skills/objectstack-ai`; its eval case 10 still refuses `locations:`. - [x] Ordering (7227457027): stated at the top of this body. ## Size of the published skills | Reading | Lines before | Lines after | Tokens before | Tokens after | |:--|--:|--:|--:|--:| | `skills/objectstack-ui/rules/actions.md` | 262 | 268 | 3844 | 3918 | | `skills/objectstack-ui/SKILL.md` | 165 | 165 | 2256 | 2262 | | `skills/objectstack-ui/rules/record-page.md` | 64 | 64 | 990 | 990 | | `skills/objectstack-formula/SKILL.md` | 485 | 485 | 6090 | 6088 | | `skills/objectstack-ui/evals/views-apps-actions-pages.json` | 275 | 275 | not ratcheted | not ratcheted | | `skills/objectstack-ui/evals/record-page.json` | 119 | 119 | not ratcheted | not ratcheted | | Bundle: all 14 `SKILL.md` files | 4936 | 4936 | 65337 | 65341 | | Authored files the ratchet prices | n/a | n/a | 199591 | 199669 | | Eval fixtures (measured, not ratcheted) | n/a | n/a | 88563 | 88550 | Net change under `skills/`: 26 lines added, 20 removed, **+6** against a budget of +6. Tokens are the ratchet's own count, `ceil(utf8 bytes / 4)` with the release-stamp line left out. ### Token rows - `skills/objectstack-ui/rules/actions.md` **3844 to 3918 (+74)**, by the standing maintainer ruling of 2026-10-27, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Restatement cut first, in the same file: the opening "Actions are user-triggered operations on an object or a view." (62 bytes; the paragraph under it says how `objectName` binds an action to an object and how a view names one). The new text adds 359 bytes, of which 130 are the five `locations` lines PR 1 took out as 186. The file is 15373 to 15670 bytes, and the row is pinned at the measurement. It is 28 above the 3890 the row held before PR 1. - `skills/objectstack-ui/SKILL.md` **2256 to 2262 (+6)**, by the same standing ruling, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Nothing is paid down: the file has no restatement to cut, and the seat ruled at 2026-11-28T02:42Z that the gallery phrase " over an image, avatar or file field" teaches and stays (ruling on the card). The +25 bytes are the `"locations": ["record"],` key PR 1 removed as 32 bytes; the file is 9050 to 9075 bytes (9048 priced), and the row ends 2 under the 2264 it held before this card. - `skills/objectstack-formula/SKILL.md` 6090 to 6088: 7 bytes shorter; the row follows it down. - `skills/objectstack-ui/rules/record-page.md`: 990, unchanged (the two words have the same length). ## Tests The gates below were re-run at head `a7aee8ef` (the seat's 02:42Z rework, which restored one phrase in `skills/objectstack-ui/SKILL.md` and moved its row); the branch's diff against `main` (`f72f3353`) was empty before the first edit. The placement probe, the `platform-catalog` test and the eval dry run were read at `27cb6e21`; the rework touches no example, fixture or script logic. <details> <summary>Skills gates: all exit 0</summary> `@objectstack/spec`, `@objectstack/client` and `@objectstack/client-react` were built first (turbo, 47 tasks, 0 cached, `VERDICT command-exit 0`). - `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0. `351 prose examples type-check across 3 surface(s)`. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: exit 0. `24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators.` - `pnpm --filter @objectstack/spec run check:skill-docs`: exit 0. `Skill docs in sync`. - `pnpm --filter @objectstack/spec run check:skill-refs`: exit 0. `10 generated files in sync with packages/spec`. - `node scripts/check-skills-token-ratchet.mjs`: exit 0. `61 authored bundle file(s) within their ceilings`. On the first commit, before the rows moved, it was exit 1, `3 of 114 published bundle file(s) failed their check`; at this head the three rows sit at their measurement (3918, 2262, 6088). - `node scripts/check-skills-token-ratchet.mjs --self-test`: exit 0. `111 cases pass`. - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts` (the one test file that names the ratchet script): `Test Files 1 passed (1)`, `Tests 21 passed (21)`. - `pnpm --filter @objectstack/scenarios skill-evals --dry-run --skills objectstack-ui` (the strict reader of the eval fixtures; no model call): exit 0, `objectstack-ui: 51 case(s)`. - `pnpm check:nul-bytes`: exit 0. </details> <details> <summary>Derived gate families: 68 derived, 67 run, 1 not measured</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 68 commands for the 8 changed paths. Each ran with its exit code recorded before any pipe, and `--ran` answered: `68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. - 67 commands: exit 0. - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: exit 3, `PREREQUISITE NOT MET`. It reads the `dist/` of every package, and this tree built only the three packages above. The diff changes no package source, so this one is CI's. - Outside the derived list, run because the order names them: `check:skill-examples`, `check:skill-refs`, the `platform-catalog` test and the eval reader's dry run. - `pnpm --dir ui run check:skill-eval-tokens` exits 0, but it scans the `skills/objectui` bundle only. It is no reading about the fixtures this PR edits. - `pnpm check:dev-prereqs` (local-only family) exits 1: 63 of 110 packages have no `dist/` here, which is the targeted build above and nothing about this diff. </details> <details> <summary>Does any gate check the examples for a missing or misplaced placement? No.</summary> - `check:skill-examples` type-checks the marked TypeScript blocks. An action with no `locations` compiles. - `check:skill-served-sections` parses the JSON fences with the spec schema. `locations` is optional there. - `action-no-placement` and `object-action-layout-not-placed` are `@objectstack/lint` rules. They run in `os validate`, `os build` and `os lint` over a whole stack, and no gate feeds them the skill examples. One-off probe (not committed): it reads the `defineAction` blocks of `rules/actions.md`, the Actions JSON fence of `SKILL.md` and the `actionLayout` example at a git ref, builds a stack from them, and calls `validateActionLocations` and `validateObjectActionLayout` from the built `@objectstack/lint`. | Ref | `action-no-placement` | `object-action-layout-not-placed` | |:--|:--|:--| | `origin/main` (`f72f3353`) | 7 | 2 (`record.pinned[0]`, `record.more[0]`) | | `27cb6e21` (examples unchanged at `a7aee8ef`) | 1 (`crm_create_campaign`) | 0 | `crm_create_campaign` has never carried `locations`: a list view's `bulkActions` places it by name, and the probe's stack has no view. </details> ## Acceptance notes - **PR 1's changeset is not edited.** It says an action copied from one of the six examples needs its `locations` added. This PR's changeset says that it replaces that note. Both ship in the same release. - **The branch.** The remote branch was absent when this run started: `git ls-remote` listed no such head, and `refs/pull/37947/head` still held `78295ae3`. The work starts from `78295ae3` plus a real merge of `main` (`b8b31cca`), and the first push created the branch again, with no force. - **NOT MEASURED: a skill-evals round** (the with-skill and no-skill pass rates), reason: it needs a Claude Code login and model calls, and it is not a merge gate. - **Case 3's token.** `'record'` is single-quoted, as the file's other code tokens are. An answer that writes `['record_page', 'record_row']` is valid metadata and fails the token. The old token, `record_header`, had the same limit. - **Not changed, outside this card:** `rules/actions.md` line 3 says "the six types", and the Action Types table it links to has seven rows. `content/docs/protocol/objectui/actions.mdx` says the console does not draw `record_related` yet, while `RelatedRecordActionsBridge.tsx` reads it; this is a reading of the source and was not exercised. - **Main moved after the merge.** `origin/main` went from `f72f3353` to `93fa9118` during the run (two commits: `packages/runtime`, a changeset, and the lockfile and workspace files). Neither touches a file of this PR, and the branch was not merged again. At `a7aee8ef`, `origin/main` is `6e06729a`; `git merge-tree` with it is clean and the PR reads `mergeable_state: clean`. ## Verification Read first, by risk: 1. `skills/objectstack-ui/rules/actions.md`: the location table hunk, and the `locations` line of each of the five examples (the word chosen for the three header-only ones). 2. `scripts/check-skills-token-ratchet.mjs`: the two raises, the `rules/actions.md` row (3844 to 3918) and the `skills/objectstack-ui/SKILL.md` row (2256 to 2262). 3. `skills/objectstack-ui/evals/views-apps-actions-pages.json`: case 3's `must_contain`. Two-minute check: run `git grep -nE "record_header|record_more|list_item|list_toolbar" -- skills/`. Expect exactly one line, `skills/objectstack-ui/rules/actions.md:28`, which begins "Until protocol 19:". ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema is touched.) - [x] 2. Every name I added uses the casing for its kind. (No name is added.) - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm lint` is CI's run and was not run locally.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched; `check:skill-docs` and `check:skill-refs` are in sync.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (The maintainer's rulings are quoted in their own words, and the quick-read section is the house form.) - [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (All but `pnpm lint`, as item 3.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e606bab commit cad3030

8 files changed

Lines changed: 74 additions & 23 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the published skills teach the action `locations` words of protocol 19
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`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.
11+
12+
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.
13+
14+
`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.
15+
16+
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.

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

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,10 @@ export const CEILINGS = new Map([
830830
// 6090; the ceiling moves +82, the measured remainder only. Pinned AT the
831831
// measurement.
832832
// ceil(($(wc -c < skills/objectstack-formula/SKILL.md) - 20) / 4) == ceil(24357 / 4)
833-
['skills/objectstack-formula/SKILL.md', 6090], // -53 (was 6055), then -5 A2′ (was 6002), then +11 (was 5997), then +82 (was 6008)
833+
// 6090 -> 6088: the action `visible` / `disabled` paragraph says "a list row" where it wrote
834+
// the retired action location word `list_item` (-7 bytes); the row follows the measurement
835+
// down, 24384 bytes (24357 priced) -> 24377 (24350 priced) -> 6088 tokens.
836+
['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)
834837
['skills/objectstack-i18n/SKILL.md', 6333], // -11 (was 6349), then -5 A2′ (was 6338)
835838
// 12705 -> 12984 (2026-08-31 app-repo-principles raise, see the block above).
836839
// The largest of the five and the frame the other four are read under: what an
@@ -1142,7 +1145,17 @@ export const CEILINGS = new Map([
11421145
// ceil(($(wc -c < skills/objectstack-ui/SKILL.md) - 20) / 4) == ceil(9087 / 4)
11431146
// 2264 -> 2256: the Actions JSON fence drops its `locations` key (32 bytes), so it parses
11441147
// under both action location vocabularies; the row follows the measurement down.
1145-
['skills/objectstack-ui/SKILL.md', 2256], // -8 to the measurement (was 2264)
1148+
// 2256 -> 2262: the Actions JSON fence declares its placement again, in the protocol-19 word
1149+
// (`"locations": ["record"],`, +25 bytes; it had dropped the key so that it parsed under
1150+
// both vocabularies, the 2264 -> 2256 note above). No cut pays for it: the one passage
1151+
// weighed as restatement, " over an image, avatar or file field" beside `gallery` in the
1152+
// List Views kind list, was ruled teaching by the seat's review of the PR and stays, and
1153+
// nothing else in the file restates another passage. So the ruling's second half carries the
1154+
// delta: 9050 bytes (9023 priced) -> 9075 (9048 priced) -> 2262 tokens, headroom 0 before,
1155+
// ceiling +6, the measured remainder only, pinned AT the measurement (2 under the 2264 the
1156+
// row held before the fence dropped its key). Standing ruling (2026-10-27, tap A):
1157+
// 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B).
1158+
['skills/objectstack-ui/SKILL.md', 2262], // +6 to the measurement (was 2256)
11461159
// 8333 -> 6193: RE-LOCK at the landed count after the #19715 split (decision
11471160
// batch #213 item 1, maintainer 「1 2 4 同意」): the worked R1, the report
11481161
// template and the v17-canonical shapes block moved VERBATIM into
@@ -1714,7 +1727,23 @@ export const CEILINGS = new Map([
17141727
// 3890 -> 3844: five checked examples drop their `locations` line (186 bytes), so each
17151728
// compiles under both action location vocabularies; the row follows the measurement down.
17161729
// ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15373 / 4)
1717-
['skills/objectstack-ui/rules/actions.md', 3844],
1730+
// 3844 -> 3918: the file teaches the protocol-19 action location vocabulary, which says what
1731+
// an action acts on (`list`, `record`, and the narrow words `record_page`, `record_row`,
1732+
// `record_related`, `record_section`). The location table's four page-part rows become four
1733+
// rows in those words, one line under the table names what replaced each old word, the
1734+
// `actionLayout` paragraph and the `defaultFromRow` sentence name the new words, and the five
1735+
// checked examples declare a placement again (130 bytes; the 3890 -> 3844 note above is the
1736+
// 186 they dropped). PAID DOWN FIRST by 62 bytes of restatement in this file: the opening
1737+
// "Actions are user-triggered operations on an object or a view." (the paragraph under it
1738+
// says how `objectName` binds an action to an object and how a view names one). Nothing else
1739+
// in the file restates another passage, so the same ruling's second half carries the rest.
1740+
// Arithmetic: the text adds 359 bytes, the cut removes 62, so the file is 15373 -> 15670
1741+
// bytes -> 3918 tokens, headroom 0 before, ceiling +74, the measured remainder only, pinned
1742+
// AT the measurement (28 above the 3890 the row held before the examples dropped their key).
1743+
// Same ruling (2026-10-27, tap A): 「A:先削重复,余额按实测提高」 (ruling record 6513306068,
1744+
// letter B).
1745+
// ceil($(wc -c < skills/objectstack-ui/rules/actions.md) / 4) == ceil(15670 / 4)
1746+
['skills/objectstack-ui/rules/actions.md', 3918],
17181747
// 6090 -> 6252 (#19715, card item 4): a 5-line table of contents at the top,
17191748
// anchors to the file's existing headings, nothing else changed. +162 tokens,
17201749
// zero headroom to absorb any of it, ceiling +162. Maintainer ruling

‎skills/objectstack-formula/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ does not satisfy that gate. `has()` over an **undeclared** key stays legal: that
136136
is its use there — telling "absent from this PATCH" apart from "explicitly null".
137137

138138
**The exception: action `visible` / `disabled` are client-side and sparse.**
139-
They bind the row the client already holds, and that row — a `list_item` row
139+
They bind the row the client already holds, and that row — a list row
140140
above all — lacks a key when the column is outside the view's projection, when
141141
field-level security refuses it, or when it was never written (the mongo and
142142
memory drivers).

‎skills/objectstack-ui/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ reports success and changes nothing. Call the API, with the option `value`,
133133
never its label ([Actions](./rules/actions.md)):
134134

135135
```json
136-
{ "name": "mark_done", "label": "Mark as done", "objectName": "task",
136+
{ "name": "mark_done", "label": "Mark as done", "objectName": "task", "locations": ["record"],
137137
"type": "script", "body": { "language": "js", "capabilities": ["api.write"],
138138
"source": "await ctx.api.object('task').update({ id: ctx.recordId, status: 'done' });" } }
139139
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
{
4646
"id": 3,
4747
"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.",
48-
"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`.",
48+
"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`.",
4949
"files": [],
5050
"assertions": {
5151
"must_contain": [

‎skills/objectstack-ui/evals/views-apps-actions-pages.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
{
2525
"id": 3,
2626
"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.",
27-
"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: ['<name>']`, 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`.",
27+
"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: ['<name>']`, 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`.",
2828
"files": [],
2929
"assertions": {
30-
"must_contain": ["defineAction", "locations", "record_header", "bulkActions", "visible", "successMessage", "ctx.recordId"],
30+
"must_contain": ["defineAction", "locations", "'record'", "bulkActions", "visible", "successMessage", "ctx.recordId"],
3131
"must_not_contain": ["{record.", "input.selectedIds"]
3232
}
3333
},
@@ -134,7 +134,7 @@
134134
{
135135
"id": 14,
136136
"prompt": "Add a 'Mark as done' button on `task` records that sets `status` to Done (the option is labelled Done, its value is `done`).",
137-
"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.",
137+
"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.",
138138
"files": [],
139139
"assertions": {
140140
"must_contain": ["defineAction", "objectName: 'task'", "ctx.api.object('task').update", "ctx.recordId", "api.write", "status: 'done'"],
@@ -233,8 +233,8 @@
233233
},
234234
{
235235
"id": 24,
236-
"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.",
237-
"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.",
236+
"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.",
237+
"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.",
238238
"files": [],
239239
"assertions": {
240240
"must_contain": ["actionLayout", "pinned", "more", "$export"],
@@ -254,7 +254,7 @@
254254
{
255255
"id": 26,
256256
"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.",
257-
"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.",
257+
"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.",
258258
"files": [],
259259
"assertions": {
260260
"must_contain": ["requiresConfirmation: true", "exposed: true", "confirmText", "project_task"],

0 commit comments

Comments
 (0)