Repository navigation
Commit f644321
docs(skills): teach an object extension's
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9WF2JA4aXQRy81L1mg6vYtR)_
Fixes #35902
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **用户能看到什么变化**:用 AI 搭建应用的人,让自己的扩展包给别人的对象加字段或子表时,AI
现在会写明它们排在哪个字段、哪个页签后面;技能和指南不再说「别的包加的子表会被隐藏」;CRM 示例的客户对象演示了页签清单和分组自己列字段。
-
**为什么做**:属于「记录页的页签和字段分组改由父对象一处声明」专题:平台的四种新写法都已合并,这一批补上最后一种(扩展包声明位置)的技能、指南、评测和示例,免得「做了没人知道」。
- **出错会怎样**:AI 可能没写位置或写错,扩展包带来的字段和页签就按默认排在末尾,不丢数据;撤回只需回退这一次合并。
- **要你做什么**:批准合并这份技能与指南的更新。
## What changes
The fourth form of the parent-declared record page, an extension's
`place`, reaches the skills, the guide and an eval; the sentence that
said another package's child list is hidden goes; one repository example
declares a tab list.
| File | Change |
|:--|:--|
| `skills/objectstack-data/SKILL.md` § Object Extension Model |
`defineObjectExtension` takes `place`. One example with a field entry
and a list entry, the group form `{ group: { key, label }, after }`,
`before` as the other anchor, and the condition: placement applies where
the target declares `fieldGroups` / `relatedLists`. |
| `skills/objectstack-ui/rules/record-page.md` step 2 | "A child list
another package adds is hidden by a `relatedLists` that does not name it
(no package places its own list yet)" becomes "still shows, after the
named lists or where its extension's `place` puts it
(objectstack-data)". |
| `skills/objectstack-data/evals/objects-fields-relationships.json` case
26, `evals/README.md` | An add-on package puts its Tax ID field after
Industry in the account's Basic group and its Contracts tab after
Opportunities, on an account whose tab list names another child list
after Opportunities, so a missing list placement draws a different page.
Expected: two `place` entries on the package's own extension, no
redeclared `crm_account`, no `overrides:`. |
| `content/docs/ui/pages.mdx`, record page section | The same sentence
corrected (shows where the extension places it, or at the end of the
tabs, before approvals and the activity stream); a paragraph and a
checked `defineObjectExtension` example for `place`, linking the
object-extensions guide, which already documents the key. |
| `examples/app-crm/src/objects/account.object.ts` | `fieldGroups`
listing each group's `fields`, and `relatedLists` naming every tab in
order, one entry with its own `columns`, the two built-ins by object
name. |
| `examples/app-crm/src/translations/crm.translation.ts` | zh-CN labels
for the two new groups. |
| `.changeset/35902-skills-extension-place.md` | New,
`@objectstack/skills` patch. |
| `.changeset/35902-skills-related-lists-tabs.md` | DELIBERATE
CORRECTION, see below. |
What the skills already taught before this change, and is not in the
diff: the tab list with the three built-ins, an entry's `label` /
`columns`, a group's `fields`, and the group that places a child table,
each with its example and its eval (record-page evals 1, 4, 5, 6), and
the repository examples of a group placing a child table (the showcase
invoice, the CRM example's opportunity).
**DELIBERATE CORRECTION of a pending release note.**
`.changeset/35902-skills-related-lists-tabs.md` is on main and
unreleased. Its first bullet said: "A child list another package adds is
hidden by a `relatedLists` that does not name it." The platform change
that let a package place its own list made that false before any release
carried it. The sentence now reads: "A child list another package adds
still shows, after the named lists or where that package's extension
places it." Nothing else in the note changed. `Check Changeset` is red
on this by design; no `skip-changeset`.
### Skill size readings
| | main `316f7571` | This head |
|:--|:--|:--|
| `skills/objectstack-data/SKILL.md` | 473 lines · 26,832 bytes · 6,703
tokens (ceiling 6,710) | 473 lines · 26,858 bytes · 6,710 tokens
(ceiling 6,710, not raised) |
| `skills/objectstack-ui/rules/record-page.md` | 64 lines · 3,952 bytes
· 988 tokens (ceiling 991) | 64 lines · 3,958 bytes · 990 tokens
(ceiling 991, not raised) |
| All 14 `SKILL.md` files | 4,950 lines · 261,027 bytes | 4,950 lines ·
261,053 bytes |
| Ratcheted (authored) tokens | 197,533 | 197,542 |
| Eval fixtures (measured, not ratcheted) | 78,177 | 78,658 |
| `skills/**`, 114 files | 1,172,198 bytes | 1,174,155 bytes |
The data skill's entry file had 7 tokens of headroom and the `place`
paragraph costs about 75, so the rest is paid in the same file by
shorter wording, no ceiling moved. Every inline code span and every link
of the file on main is still in it (compared by script), except the one
signature that gained `place`. What the shorter wording no longer says,
all prose: "on 31/31 objects in the reference apps" (twice, on
`pluralLabel` and `icon`; the instruction to author both stays), "the
fundamental data entity in ObjectStack", the lead-in "The full table,
per-type config and traps" (the link stays), "stored and read ... on the
record" in the multi-value lookup note, "range" before `0–999`,
"incorrect/correct" before "examples", and "This axis is distinct from
`ownership`, which decides" (now "`ownership` is a separate axis").
## Tests
- No runtime behaviour changes, so no ablation.
- **The taught shapes parse.** The skill's example, its group form, the
guide's example and a `before` entry go through the built spec's
`defineObjectExtension`: 4 of 4 accepted. Control leg: an entry with
both `after` and `before`, and an entry with a misspelt key, are both
refused, so an accept is a measurement.
- `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0,
`349 prose examples type-check across 3 surface(s)`, the guide's new
block among them, against a spec built at this base (full build under
the verify lock, `VERDICT command-exit 0`).
- **The example app.** `@objectstack/example-crm`: `typecheck` exit 0;
`test` 7 files, 51 tests passed (under the verify lock, `VERDICT
command-exit 0`); `validate` "Validation passed", no warning.
- **Eval token reachability.** `node
ui/scripts/check-skill-eval-tokens.mjs`: exit 0, "Every must_contain
token is taught by its own skill bundle."
- **Skill evals: NOT MEASURED.** No eval round ran here. The card's
"four eval cases pass" and the new case 26 are owed a round: `pnpm
--filter @objectstack/scenarios skill-evals --skills
objectstack-data,objectstack-ui`.
## Acceptance notes
1. **This slice is the card's last.** Item 5 of the card (HotCRM
declares `relatedLists` on its five main objects) lives in another
repository and is carried by objectstack-ai/hotcrm#2742, which the seat
filed from the hand-off on the card (comment 7082792445); it waits for a
release that carries these keys. Seat record: card comment 7083107636.
2. **Overlap.** `overlap-check` at this head exits 1 on two open pull
requests. The draft that turns the data skill's entry file into a
router, #36158, rewrites `skills/objectstack-data/SKILL.md` whole: this
pull request does not wait for it (the seat's call), and whichever lands
second merges main and replays its entry-file text. If the router lands
first, the `place` paragraph belongs in `references/examples-objects.md`
§ Object Extension Model, where that draft moves the section, and the
wording payments here are dropped. The release pull request (`chore:
version packages`) deletes every pending note, so a corrected pending
note conflicts with it by construction; the release job regenerates it
from main.
3. **A `relatedLists` entry's `label` has no translation key that I
could find.** The CRM example's entries carry no `label` for that
reason. Read from `packages/spec/src/system/translation.zod.ts`: it has
`relatedListTitle` under the child's field and `_sections` for groups,
and no key for a tab-list entry's `label`. The console's reading was not
traced and nothing was reproduced at run time. The seat filed the
observation as #36528.
4. **The example lives in the CRM example, not the showcase.** The
showcase account's record page is pinned by an end-to-end shape test,
and the CRM example's account had neither key.
5. **The multi-value lookup note keeps its `{record.tags.0}` token.**
The router draft above records that the automation skill refuses that
token in a value slot and corrects it; this change only shortened the
sentence around it.
6. **Merging ends the card while its eval done-when is unmeasured.** The
round named under Tests is owed; the seat filed #36535 as its carrier,
for the eval lane to run on main after the merge.
7. **Guide example.** The record page section of the guide carries the
full Quote example from the parent card already; this change adds the
extension half beside it.
## Verification
**Read first, by risk:**
1. `skills/objectstack-data/SKILL.md`: the payments. Risky hunk: the
Object Extension Model guard, where "`extend` is not object-level
`ownership`" replaced a longer sentence; the four enum values stay.
2. `skills/objectstack-ui/rules/record-page.md` step 2: one sentence
flips from "hidden" to "still shows".
3. `examples/app-crm/src/objects/account.object.ts`: the declared tab
list names all four child lists, so no tab the page had is dropped.
**Two-minute check:** `node scripts/check-skills-token-ratchet.mjs`.
Expected: the last line reads `✓ check-skills-token-ratchet: 60 authored
bundle file(s) within their ceilings`, and the two changed rows read
`6710 / 6710` and `990 / 991`.
**Head `8c346d66`**, two commits. The readings below were taken at
`b9cdb233`; the second commit, from the contract review's finding S1,
changes one eval fixture (the prompt's tab list and one sentence of the
expected answer) and one comment in the CRM example. Re-run at
`8c346d66`: `check-skills-token-ratchet` exit 0,
`ui/scripts/check-skill-eval-tokens.mjs` exit 0, `check-nul-bytes` exit
0, the CRM example's `typecheck` exit 0. Exit codes captured before any
pipe.
**Derived list.** `node scripts/pm/dispatch-gates.mjs --commands`
printed 90 commands. All 90 ran at `b9cdb233`: 89 exit 0, 1 exit 1. The
exit 1 is `node scripts/check-empty-changeset.mjs --base origin/main`,
red by design on the corrected pending note (DELIBERATE CORRECTION
above); its other half reads "No empty-frontmatter changeset introduced
by this diff (2 declaring changeset(s) added)".
Reconciliation: `✓ dispatch-gates --ran: 90 derived famil(ies) accounted
for — 90 run, 0 NOT-MEASURED (a DERIVED zero — all 90 recorded an exit
code and none of them is 3).`
The dist-reading gates in that list read a full build of this tree
(`pnpm build`, 13m40s, `VERDICT command-exit 0`). The build ran before
the last wording edits to the two skill files and the guide; none of
those files is a build input of the packages the gates read, and the
gates themselves ran after the final commit.
**Outside the derived list:** `node scripts/pm/overlap-check.mjs` exit 1
(Acceptance note 2); the example app's three commands and the eval-token
check under Tests.
**Not run locally, CI's:** the type-check lanes, `Build Core`, `Test
Core`, the repo lint, the docs build.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmTSjgh1xF2oiht7G2Z)_
<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmTSjgh1xF2oiht7G2Z -->
---------
Co-authored-by: Claude <noreply@anthropic.com>place; another package's child list still shows on a declared tab list (#36527)1 parent cd51dbb commit f644321
9 files changed
Lines changed: 106 additions & 24 deletions
File tree
- .changeset
- content/docs/ui
- examples/app-crm/src
- objects
- translations
- skills
- objectstack-data
- evals
- objectstack-ui/rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
263 | 286 | | |
264 | 287 | | |
265 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
49 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
87 | | - | |
| 85 | + | |
| 86 | + | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
277 | | - | |
| 276 | + | |
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
282 | | - | |
| 280 | + | |
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| |||
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
315 | | - | |
316 | | - | |
317 | | - | |
| 313 | + | |
| 314 | + | |
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
| |||
359 | 356 | | |
360 | 357 | | |
361 | 358 | | |
362 | | - | |
| 359 | + | |
363 | 360 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
449 | 468 | | |
450 | 469 | | |
451 | 470 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments