Repository navigation
Commit b492198
docs(skills): the checked action examples drop their locations key (#37947)
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)_
Part of #37895
This is PR 1 of 2 on that card. It lands before #36495 (draft PR
#37929), so that #37929's `check:skill-examples` and
`check:skill-served-sections` go green. PR 2, the teaching of the new
words, stays behind #36495.
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:写应用的 AI 助手读到的六个按钮示例,不再写明按钮放在哪里;说明文字和位置对照表一字未动,也没有教任何新词。
- 为什么做:这是「按钮位置改用新词」这项工作的前置一步。旧的位置词即将退役,这六个示例不先让路,那项改动的两道示例检查过不了。
- 出错会怎样:照抄示例的人会得到一个哪里都不显示的按钮,校验时有一条提醒告诉他补上位置;本改动只删了几行,可以直接撤回。
- 要你做什么:在「按钮位置改用新词」那项改动之前合并本改动(技能包属于要你亲手合并的范围)。
## What changes
Six checked examples in the published skills drop their `locations` key.
Eight old words leave compiled text; no word is added. (A seventh,
`ask_about_contract` in `skills/objectstack-ai/SKILL.md`, left with C1s
#37937, which deleted its whole Ask AI block; see the update below.)
| File | Example | Line on the base | Words dropped |
|:--|:--|:--|:--|
| `skills/objectstack-ui/SKILL.md` | `mark_done`, § Actions, JSON fence
1 | 136 | `record_header` |
| `skills/objectstack-ui/rules/actions.md` | `crm_reassign_lead`
(os:check) | 69 | `record_header`, `list_item` |
| `skills/objectstack-ui/rules/actions.md` | `crm_convert_lead`
(os:check) | 96 | `record_header`, `list_item` |
| `skills/objectstack-ui/rules/actions.md` | `crm_print_a3` (os:check) |
180 | `record_header` |
| `skills/objectstack-ui/rules/actions.md` | `crm_open_invoice_pdf`
(os:check) | 205 | `record_header` |
| `skills/objectstack-ui/rules/actions.md` | `crm_add_invoice_line`
(os:check) | 239 | `record_header` |
Two more files move because the gates measure them as owed:
- `scripts/check-skills-token-ratchet.mjs`: two rows follow their files
down to the measurement (2264 to 2256, 3890 to 3844). The gate refuses a
ceiling above its file's measurement. The `objectstack-ai` row is
`main`'s own (6609) after the merges below.
- `.changeset/37895-skills-action-examples-no-location-key.md`: a
`patch` for `@objectstack/skills`, which ships the catalog.
Not changed: every sentence, the location table (`actions.md` lines 17
to 26), the `actionLayout` paragraph, `actions.md` line 222,
`skills/objectstack-formula/SKILL.md`,
`skills/objectstack-ui/rules/record-page.md` and the eval fixtures. None
of them is compiled, and they are PR 2's.
## Why
On #37929's branch the action location vocabulary is `list`, `record`,
`record_page`, `record_row`, `record_related`, `record_section`. On main
it is `list_toolbar`, `list_item`, `record_header`, `record_more`,
`record_related`, `record_section`. The only words both accept are
`record_related` and `record_section`, and neither means a record-header
button. So each example drops the key instead of taking a word with a
different meaning.
## Size of the published skills
| Reading | Lines before | Lines after | Tokens before | Tokens after |
|:--|--:|--:|--:|--:|
| `skills/objectstack-ai/SKILL.md` | 487 | 486 | 6799 | 6791 |
| `skills/objectstack-ui/SKILL.md` | 165 | 165 | 2264 | 2256 |
| `skills/objectstack-ui/rules/actions.md` | 266 | 261 | 3890 | 3844 |
| Bundle: all 14 `SKILL.md` files | 4959 | 4958 | 65451 | 65435 |
| Authored files the ratchet prices | n/a | n/a | 199689 | 199627 |
Net change under `skills/`: 1 line added, 7 removed. Tokens are the
ratchet's own count, `ceil(utf8 bytes / 4)` with the release-stamp line
left out.
## Tests
**Update at head `78295ae3`.** Two real merges of `main` (`d7c3960e`,
then `e5898ad9` on `4de4e3e9`) and one changeset commit. Net diff
against `main`: 4 files, +18 / −8, `skills/` net −5. The two
`objectstack-ui` rows measure 2256 and 3844 on the merged tree.
`check:skill-examples` exits 0 with 351 examples (the one that left is
Ask AI). `check:skill-served-sections`, the ratchet and its
`--self-test` exit 0. Merge delta reports are on #37895; the review
records are on this PR. The size table and readings below are the first
measurement and still count the `objectstack-ai` row.
The readings below are at head `661e8e90`, on base `f926dfab`
(origin/main when the worktree was made).
<details>
<summary>Main-based tree: the two spec gates and the token
ratchet</summary>
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0.
`352 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.`
- `node scripts/check-skills-token-ratchet.mjs`: exit 0. `61 authored
bundle file(s) within their ceilings`. Before the three rows moved it
was exit 1, `3 of 114 published bundle file(s) failed their check`, each
row above its measurement (by 8, 8 and 46).
- `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 20 passed (20)`.
</details>
<details>
<summary>#37929's branch at e3b2ea9: red before these edits, green with
them</summary>
Method: a second worktree, detached at `e3b2ea95`. `@objectstack/spec`,
`@objectstack/client` and `@objectstack/client-react` were built there
(turbo, 47 tasks). The gates ran once on the untouched tree, as the
control. Then this PR's `skills/` diff was applied with `git apply`, and
the gates ran again. The two `objectstack-ui` files were byte-identical
to this PR's head after the apply.
- Control, `check:skill-served-sections`: exit 1.
`skills/objectstack-ui/SKILL.md § Actions: JSON fence 1 is refused as
Action: locations.0`.
- Control, `check:skill-examples`: exit 1. Eight `TS2322` errors, at
`skills/objectstack-ai/SKILL.md:189:15` and
`skills/objectstack-ui/rules/actions.md` 69:15, 69:32, 96:15, 96:32,
180:15, 205:15, 239:15.
- With the edits, `check:skill-served-sections`: exit 0. `10 JSON
fence(s) parse and pass their spec validators.`
- With the edits, `check:skill-examples`: exit 0. `352 prose examples
type-check across 3 surface(s)`.
The token ratchet on that tree stays red on that branch's own three rows
until main, with this PR in it, is merged there. That is not a reading
about this PR.
</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 5 changed paths. Each was run 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.
- `check:skill-examples` is outside the derived list; it was run because
the order names it.
</details>
## Acceptance notes
- **The examples now show an action with no placement.** The text above
them still says that an action with neither `locations` nor a list view
naming it renders nowhere, and the Ask AI paragraph still says to
declare the action in `locations`. An action copied from one of these
seven examples as it stands draws the `action-no-placement` warning at
`os validate` and no button. No sentence was added to say so: the order
set a budget of zero added lines and no new word. PR 2 gives each of the
six examples its placement again, in the new words. Carrier: PR 2 on
this card.
- **The token rows are banked.** The three ceilings are 62 tokens lower
in total. When PR 2 writes `locations` back, those three files grow
again. The ratchet's header gives one path for a row to go up:
restatement cut from the same file first, then the measured remainder,
with the standing ruling quoted in the PR body.
- **The sibling branch landed first.** C1s #37937 (`4de4e3e9`) deleted
the whole Ask AI block. The merge `e5898ad9` keeps `main`'s
`skills/objectstack-ai/SKILL.md` byte for byte, so this PR no longer
touches that file, and the ratchet row stays `main`'s 6609.
- **Old words that stay.** `git grep` for the four retired words under
`skills/` still finds prose, the location table and eval fixtures. They
are not compiled and they are PR 2's.
- **Main moved after the base.** origin/main went from `f926dfab` to
`a3c229ea` during the run. None of the five files changed there and `git
merge-tree` reports a clean merge. The readings above were not repeated
on the merged tree.
## Verification
Read first, by risk:
1. `skills/objectstack-ui/SKILL.md`, the hunk at line 136. This JSON is
served to clients by the hosted door, and it is the one example in a
section whose headline is that a write button needs a placement.
2. `skills/objectstack-ui/rules/actions.md`, the hunks at lines 69 and
96. Each dropped two words, a header placement and a row placement.
3. `scripts/check-skills-token-ratchet.mjs`, the three rows. Each new
number is the gate's own measurement.
Two-minute check, no build needed: `pnpm --filter @objectstack/spec run
check:skill-served-sections`. Expect the last line to end with `10 JSON
fence(s) parse and pass their spec validators.` and exit 0.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema changes.)
- [x] 2. Every name I added uses the casing for its kind. (No name
added.)
- [x] 3. No formatter ran. `pnpm lint` is CI's on this PR.
- [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: not touched.
- [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.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0b87f12 commit b492198
4 files changed
Lines changed: 18 additions & 8 deletions
File tree
- .changeset
- scripts
- skills/objectstack-ui
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | | - | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1094 | 1096 | | |
1095 | 1097 | | |
1096 | 1098 | | |
| |||
1659 | 1661 | | |
1660 | 1662 | | |
1661 | 1663 | | |
1662 | | - | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1663 | 1668 | | |
1664 | 1669 | | |
1665 | 1670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| |||
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
180 | | - | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
| |||
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
205 | | - | |
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
| |||
236 | 232 | | |
237 | 233 | | |
238 | 234 | | |
239 | | - | |
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
| |||
0 commit comments