Repository navigation
Commit 99fbaa6
docs(skills): line items in the parent's form are taught as a parent field group naming the child (#36250)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XC63go34oEMBFaBgqpoDC8N)_
Fixes #36224
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:照着技能搭「主表带明细」(发票带发票行、报价单带报价行)的作者和
AI,以前学到的是在明细的关联字段上打一个开关,结果新建表单里并没有明细;现在技能教的是在主表上加一个指向明细的分组,表单里才能直接录明细。应用的使用者无感,变的是技能教的内容。
- 为什么做:属于「对外发布的技能包教的内容要和运行时一致」这条线,替按技能生成应用的作者解决「发票、报价单的新建表单里录不了明细」的问题。
- 出错会怎样:只改技能文字、示例和评测用例,不动运行时;写错的话作者拿到的仍是一段不对的教法,直接回退这个合并即可。
- 要你做什么:这是受治理的技能文字改动(Tier H),复核记录判定它涉及权限相关的字样,不走低风险臂,需要你本人审阅批准后才能合并。L1
ACCEPT 7073837543,契约 PASS 7073893301(head c8770a8)。
## What changes
State at head `c8770a8f` (two commits). The rule taught is the one the
spec publishes on `fieldGroups[].relatedList`
(`packages/spec/src/data/object.zod.ts`) and on `inlineEdit`
(`packages/spec/src/data/field.zod.ts`): the parent's entry form inlines
a child where a field group of the parent names it, `inlineEdit` only
picks how the rows are edited, and a child no group names is not
inlined, whatever `inlineEdit` says.
Three published texts, each with one minimal example and the "without
it, nothing changes" line:
- **`skills/objectstack-data/rules/relationships.md`, Inline Editing.**
The opening paragraph taught `inlineEdit: true` on the child's FK as
what makes the parent's form render the grid. It now says the form
enters a child's rows where a field group of the parent names that
child, that the group draws the table at its place in the record's
details and in the entry form (below the form's fields when its sections
name no field group), and that without the group the child is a tab and
the form has no lines. The example is the parent's `fieldGroups` entry
beside the child FK. The "set `inlineEdit` only for line items"
paragraph is now "name only true line-item children; leave associations
as tabs". The form-factor ladder stays where it was; its lead sentence
reads "`inlineEdit` only picks how a placed child's rows are entered".
The `'grid'` example's parent comment points at the group.
- **`skills/objectstack-ui/rules/list-views.md`, Master-Detail Forms.**
Item 1 was "Relationship `inlineEdit` (default, zero UI config)". It is
now "A parent field group naming the child (zero view config)", with the
`fieldGroups` entry inline, the nothing-changes line, and the pointer to
the data rule for the ladder. Item 2 (`subforms`) says "or inline a
child no group names".
- **`skills/objectstack-ui/SKILL.md`, trap 2.** The trap title was
"`inlineEdit` on the child's `master_detail` field". It is now "a parent
field group naming the child", with the entry inline and the
nothing-changes line; the "Add line" and `'bulk'` clauses are kept.
Evals (`skills/**/evals`, not ratcheted):
- `skills/objectstack-data/evals/objects-fields-relationships.json`,
case 2 ("Model invoices with line items…"): it required `inlineEdit` in
the answer and its `expected_output` named "`inlineEdit` on that
relationship". Both are removed; nothing about form entry is asserted
there, because the prompt does not ask for it.
- Same file, new case 25 (「新建报价单时要在表单里直接录明细」, objects named in the
prompt): `must_contain` is `fieldGroups` and `relatedList:
'quote_line'`; `must_not_contain` is `definePage`.
- `skills/objectstack-ui/evals/views-apps-actions-pages.json`, case 6
(invoice entry as a stepped form): its `expected_output` carried the
same stale sentence as `list-views.md` item 1 and its `must_contain`
held `inlineEdit`. The sentence now names the parent field group and the
token is `relatedList`. This file is one more than the claim's file
surface names; see Acceptance notes.
Changeset `.changeset/36224-inline-edit-form-group.md`:
`@objectstack/skills` patch.
## Tests
All readings at head `c8770a8f`, tree `objectstack-ai/objectstack`,
merge base `a5a5312f`.
<details><summary>Token ratchet, size and line budget</summary>
- `node scripts/check-skills-token-ratchet.mjs`: exit 0, no ceiling row
moved, the script is untouched.
- `rules/relationships.md`: 4198 to 4156 tokens (ceiling 4203; headroom
5 to 47); 16790 to 16623 bytes; 408 to 402 lines.
- `rules/list-views.md`: 4448 to 4447 tokens (ceiling 4448; headroom 0
to 1); 17790 to 17788 bytes; 414 to 413 lines.
- `objectstack-ui/SKILL.md`: 2167 to 2210 tokens (ceiling 2272; headroom
105 to 62); 8687 to 8860 bytes; 161 to 163 lines. This file grows by 43
tokens inside its existing headroom: its only stale text was the trap's
title clause, and the example plus the nothing-changes line are longer
than that clause.
- Ratcheted authored total: 197486 before, 197486 after. Eval fixtures
(measured, not ratcheted): 76731 to 77052. Bundle total: 288824 to
289145.
- Every `SKILL.md` summed: 4947 lines before, 4949 after. Every markdown
file under `skills/`: 18654 before, 18649 after.
- PR net added lines (`git diff --numstat` against the merge base,
changeset included): 68 added, 49 deleted, net +19 (budget 30). The
three markdown files together: 40 added, 45 deleted, net -5 (budget +6).
</details>
<details><summary>Gates run locally</summary>
- Derived list (`node scripts/pm/dispatch-gates.mjs --commands`, 50
commands), run under `scripts/pm/os-verify-lock.sh`, each exit code
captured before any pipe: 46 exit 0, 4 exit 3.
- `node scripts/pm/dispatch-gates.mjs --ran`: `50 derived, 46 run, 4
NOT-MEASURED, 0 UNRUN`, exit 0. The four are `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure` and
`check:sourcemap-no-sources-content`: each answered PREREQUISITE NOT MET
(they read a whole-workspace build), none reads a file of this diff, and
they are left to CI.
- `check:doc-formula-expressions` first answered exit 3 on an unbuilt
tree; after `turbo run build` of `@objectstack/formula` and
`@objectstack/lint` it ran: lock verdict `command-exit 0`.
- Among the 46: the ratchet and its `--self-test`,
`check-empty-changeset`, `check-changeset-no-major`,
`check-adr-0087-registration`, `check:skill-docs`,
`check:skill-served-sections`, `check:skill-links`,
`check:skill-identifier-liveness`, `check:skill-compatibility`,
`check:skill-frame-sync`, `check:nul-bytes`, `check:pm-skill-id-lint`,
`check:doc-authoring`, `check:role-word`, `check:published-files`,
`check-closing-keyword-parity`.
- `node scripts/pm/overlap-check.mjs
--branch=claude/issue-36224-inline-edit-form-group`: `VERDICT clean exit
0` against `origin/main` and the heads of PRs 36222, 36158 and 35129
(the three that share a file with this one).
- Not derived, tried once: `check:skill-examples` answered exit 3 (its
client SDK surface needs a build); NOT MEASURED locally, CI's.
</details>
<details><summary>Skill-evals test file and catalog read</summary>
- `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2
test/skill-evals/skill-evals.test.ts` after building the package's
dependency closure: `Test Files 1 passed (1)`, `Tests 38 passed (38)`,
lock verdict `command-exit 0`. A first run on the unbuilt tree failed to
load (`@objectstack/types` had no entry) and measured nothing.
- `pnpm --filter @objectstack/scenarios skill-evals --skills
objectstack-data,objectstack-ui --dry-run` (no model call): exit 0,
`objectstack-data: 67 case(s)`, `objectstack-ui: 44 case(s)`, no
refusal.
- Cases 2, 25 and 6: every `must_contain` token is in the case's own
`expected_output`; 0 `must_not_contain` hits in either file.
- No eval round was run (a round is the eval seat's). Case 2 and case 6
changed a token list, so earlier records of them are set apart on a
regrade.
</details>
No ablation: the diff changes prose, examples and eval fixtures, no
tested behaviour.
## Acceptance notes
- Premise measured at `a5a5312f`: the three places still taught the old
rule (`relationships.md` 249-283, `list-views.md` 370-378,
`objectstack-ui/SKILL.md` 48-52). Ratchet readings matched the dispatch:
4198/4203, 4448/4448, 2167/2272.
- In-place fix outside the claimed file surface:
`skills/objectstack-ui/evals/views-apps-actions-pages.json` case 6. Same
defect (the same sentence, as an eval's expected answer), no other open
PR head changes that file (overlap check above), same gate families.
Left alone, the eval would grade the corrected text against the old
answer.
- Data case 2 asserts nothing about form entry now. Whether a line-item
model should get the placing group when the request does not ask for
form entry is not said by the spec's descriptions, so neither the text
nor that case teaches it.
- `objectstack-ui/SKILL.md` is not paid in full inside the file (43
tokens, see Tests); the ratcheted total across the catalog is unchanged.
- Same family, not fixed here (reported to the seat, not filed):
- `skills/objectstack-data/references/lint-rules.md`, three rows
describe the inline-entry lint rules by `inlineEdit`. Measured on the
built `@objectstack/lint` at this head: an `invoice_line` child with
`inlineEdit: true` and no parent group still gets
`relationship/line-items-inline-edit`, and one with no `inlineEdit`
whose parent group names it gets none. The table says the opposite
trigger. That file has 0 tokens of headroom.
- `skills/objectstack-data/rules/field-types.md`, the `repeater` row
points at "a child object (`master_detail`, `inlineEdit: 'grid'`)" for a
typed list, with no group.
- Covered by PR 36222 (the tab and field-group text of the record page),
not touched here: the "Detail-page related lists" part of
`relationships.md`, `rules/record-page.md` and `evals/record-page.json`.
- `main` moved two commits after the branch point (to `c30ce97c`);
neither touches `skills/**` or the ratchet, so the branch was not merged
forward.
## Verification
Read first, by risk:
1. `skills/objectstack-data/rules/relationships.md`, the first paragraph
and example under "Inline Editing (Master-Detail Entry)": it carries the
rule and the wording must not claim more than the spec's description.
2. `skills/objectstack-ui/rules/list-views.md`, item 1 under
"Master-Detail Forms": the file sits 1 token under its ceiling.
3. `skills/objectstack-data/evals/objects-fields-relationships.json`,
cases 2 and 25 token lists.
Two-minute check: `node scripts/check-skills-token-ratchet.mjs` exits 0
and prints `rules/relationships.md is 4156 tokens (ceiling 4203;
headroom 47)`, `rules/list-views.md is 4447 tokens (ceiling 4448;
headroom 1)` and `objectstack-ui/SKILL.md is 2210 tokens (ceiling 2272;
headroom 62)`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5kDGa1ViantgrfH797)_
<!-- signed: repo:objectstack#4 · os-project-manager ·
session_01FEkQ5krBqrrgxCYgjXmfbv -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1555dbf commit 99fbaa6
6 files changed
Lines changed: 68 additions & 49 deletions
File tree
- .changeset
- skills
- objectstack-data
- evals
- rules
- objectstack-ui
- evals
- 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 | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
435 | 449 | | |
436 | 450 | | |
437 | 451 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
275 | 271 | | |
276 | 272 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
282 | 276 | | |
283 | 277 | | |
284 | 278 | | |
285 | 279 | | |
286 | 280 | | |
287 | | - | |
| 281 | + | |
288 | 282 | | |
289 | 283 | | |
290 | 284 | | |
| |||
300 | 294 | | |
301 | 295 | | |
302 | 296 | | |
303 | | - | |
| 297 | + | |
304 | 298 | | |
305 | 299 | | |
306 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
375 | 376 | | |
376 | | - | |
377 | | - | |
| 377 | + | |
| 378 | + | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | | - | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
| 398 | + | |
| 399 | + | |
401 | 400 | | |
402 | 401 | | |
403 | 402 | | |
| |||
0 commit comments